Commit Graph

23 Commits

Author SHA1 Message Date
John Messerly 7cb01cb2a6 tweaks to build/test scripts
this is a follow up to reverted https://github.com/dart-lang/dev_compiler/pull/114
it relands it so it can pass on travis, with some additional tweaks to names

The new structure is:

    tool/
      presubmit.sh  # both build and test
      build_sdk.sh
      test.sh
      coverage.sh
    test/test.sh    # deprecated, with a warning message

Thoughts?

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1042863004
2015-03-30 12:52:03 -07:00
John Messerly 2de38f1bf7 Revert "Reuse test.sh under Travis and fixe failing test" 2015-03-30 12:22:02 -07:00
Patrice Chalin dfff27cf78 Reuse test.sh under Travis and fixed failing test
Now running test.sh under Travis (actually script has been renamed to
`tool/build_and_test.sh` since it built and tested :). Keeping
`test.sh` as alias to build_and_test.sh in case people are used to
using it in the test directory.

Also removed `_visitOrEmpty` to resolve the following analyzer hint (so
that tests would pass):
> [hint] The method '_visitOrEmpty' is not used
(/Users/chalin/git/dev_compiler/lib/src/codegen/js_codegen.dart, line
2028, col 16)
2015-03-27 17:48:48 -07:00
Patrice Chalin f73b4ec612 Make codegen_test more self contained
Addressed codegen_test `TODO(jmesserly): it'd be nice to do all cleanup
here …`.
2015-03-26 11:52:49 -07:00
John Messerly e1c8e996b7 Replace dart_core.js with actual compiled SDK
Almost no calls are going to work at this point, but core.js can load
now and there is enough in place to continue to load sunflower.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1020043002
2015-03-20 09:41:00 -07:00
Sigmund Cherem fa03b6b422 Move sunflower to a new directory, make final tweaks to make it all work.
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1007313003
2015-03-18 15:53:59 -07:00
Sigmund Cherem d08b3e49bd Do cleanup instead of excluding runtime files
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/985933004
2015-03-12 10:06:19 -07:00
Sigmund Cherem a6befe3a1d Add dart_core.js (fixes #89)
R=vsm@google.com

Review URL: https://codereview.chromium.org/986023003
2015-03-10 18:31:32 -07:00
Sigmund Cherem 4e4dd98e6b Add widget to display errors, and report graph errors correctly.
This fixes the compiler so that all error messages in dependency_graph are reported via the reporter and unifies how errors are constructed in other places as well. With all errors reported together, we use a widget (adapted from polymer) to display the error messages as part of the app in server mode.

R=vsm@google.com

Review URL: https://codereview.chromium.org/988483006
2015-03-09 11:37:22 -07:00
Sigmund Cherem 7dd29efd8f Initial cut for a development server
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/973433003
2015-03-04 09:40:06 -08:00
John Messerly 010ce41dea skip map files in test.sh diff
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/979503002
2015-03-03 14:08:43 -08:00
John Messerly 0e46bb35ba fix formatting to include test, exclude lib/src/js
R=sigmund@google.com

Review URL: https://codereview.chromium.org/953093005
2015-02-24 16:56:13 -08:00
John Messerly 6c7cd9b731 Begin to handle some of the *_patch.dart files
Moves: test/sdk --> tool/input_sdk_src
Also moves: test/sdk/lib/_internal/js_lib --> tool/input_sdk_patch
we'll eventually need to customize that code

Adds tool/patch_sdk.dart, an offline transformation step that produces: test/generated_sdk

Essentially this merges the "external" declarations and the @patch syntactically. There's a comment in tool/patch_sdk.dart explaining the rationale behind this approach.

There's still *lots* to do in the generated code. This does none of that. The only new code is tool/patch_sdk.dart and the minimum changes to test/codegen_test.dart and js_codegen.dart to get test.sh running and debuggable.

Tracking bug for SDK is https://github.com/dart-lang/dart-dev-compiler/issues/58

R=sigmund@google.com, vsm@google.com

Review URL: https://chromereviews.googleplex.com/157137013
2015-02-20 08:58:01 -08:00
John Messerly 267f6fb0a1 exclude test from dartfmt
formatter is currently failing on generated code files

Review URL: https://chromereviews.googleplex.com/150227013
2015-02-12 11:44:00 -08:00
John Messerly 27ba5723d9 some test script fixes to get it running cleanly on dart_codegen
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/150927013
2015-02-04 09:31:50 -08:00
Leaf Petersen 3b3f101787 This CL rolls up a number of changes to the dart code generation.
Import/export directives are preserved, and new ones are generated using package syntax using Vijay's logic.  This is not yet robust for relative URIs, but is sufficient for our purposes.

Wrapper hoisting is disabled, and various wrapper generation bugs are fixed.

Type name qualification is done more selectively, and more correctly.

Casting is disabled in const contexts, with a severe warning.

Coercions and wrappers now both call into the dart logging runtime, and pass various useful information (currently mostly ignored).

This also adds some preliminary dart codegen tests, and hence includes a number of expected output files in the test/dart_codegen/expect directory.

BUG=
R=jmesserly@google.com, vsm@google.com

Review URL: https://chromereviews.googleplex.com/141427014
2015-02-03 16:42:13 -08:00
John Messerly 3438d26f5f check in SDK dart:core snapshot for tests
also tweaks the formatter to ignore it for ease of diffing

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/145337013
2015-01-28 16:41:34 -08:00
John Messerly c08494e36f add sdk version check
R=sigmund@google.com

Review URL: https://chromereviews.googleplex.com/140347013
2015-01-27 15:14:53 -08:00
John Messerly bc57422371 catch more things in dartanalyzer
inspired by kevmoo's change here --> https://chromereviews.googleplex.com/126507013/

R=sigmund@google.com

Review URL: https://chromereviews.googleplex.com/126517013
2015-01-27 14:36:39 -08:00
Sigmund Cherem 2bc4a36580 Run formatter in test.sh
R=jmesserly@google.com

Review URL: https://chromereviews.googleplex.com/133597013
2015-01-27 12:18:46 -08:00
Leaf Petersen 89da130295 More typechecker tests, support for failing tests
This CL adds support for marking tests as known failures using the following syntax:

/*expectation1::shouldbe::expectation2*/

where expectation is either "level:StaticInfo" as before, or "pass".

The meaning is that the test is currently exhibiting incorrect behavior expectation1, but should exhibit behavior expectation2.

The test will succeed so long as expectation1 is matched, but a summary of the number of "shouldbe" expectations is printed at the end of running the test script.  Currently this is just implemented as grep, we can make this fancier eventually.

I'm not particularly attached to the syntax, feel free to suggest alternatives.

This CL also adds a bunch of fairly mechanical tests of subtyping, a number of which we are definitely failing, and some of which we may or may not be failing depending on where we wish to insert automatic fixup code.

BUG=
R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/129027013
2014-12-16 10:30:13 -08:00
Sigmund Cherem 02a4650a24 Refactor: move code around a bit
- bin/
    devc.dart

- lib/
    devc.dart

    src/
       info.dart # static info we compute, used by checker & backends
       checker/  # implementation details for the checker
          checker.dart  # checking algorithm
          rules.dart    # type checking rules
          resolver.dart # same as today, type resolution via analyzer
       emitter/
          ...
- test/
     checker/    # unit tests for the checker internals
     codegen/    # left as is - maybe should rename to emitter?
     samples/    # stand alone samples that we run in the end_to_end tests.
     ...

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/128957013
2014-12-11 15:13:54 -08:00
John Messerly 3124c7ec89 add the ability to easily test codegen by diffing against expected output
this makes changes easy to spot

some of this code was taken from old polymer.dart test scripts :)

R=sigmund@google.com

Review URL: https://chromereviews.googleplex.com/121567013
2014-12-09 16:52:05 -08:00