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)
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
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/58R=sigmund@google.com, vsm@google.com
Review URL: https://chromereviews.googleplex.com/157137013
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
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
- 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