This breaks out casts / coercions into:
Standard (on by default)
- DynamicCasts: dynamic -> T
- AssignmentCasts: T x = expr; // T must be a ground type
Inference (this will go away)
- InferableLiteral
- InferableClosure
- InferableAllocation
Implicit (no flag yet, but i'll add to disable by default)
- DownCastComposite: Any cast to a non-ground type
- DownCastImplicit: Any other implicit downcast not covered above
A flag is also added to enable/disable all wrapping. This is not off by default yet, but that is the intent.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1038583004
this also starts using compiled code in dart_core.js (just copy+paste for Object)
visitClassDeclaration was getting rather long, so it's now refactored to make the flow more clear.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1016003003
Now the HTML can include a hash in the URL for cachable resources, and the serve knows how to include cache-control headers.
In the process of doing so, I had to change a couple things that made it possible to fix#92 as well (producing different output in the command-line than in server mode).
R=vsm@google.com
Review URL: https://codereview.chromium.org/993213003
js_codegen.dart and patch_sdk.dart are the only human-changed files.
This also pulls in dart:isolate, which is depended on from one of the implementation libraries
This also moves dart:_* files back to `lib/_internal/compiler/js_lib/` because there's where libraries.dart points to, and hence Analyzer looks for them there. Alternatively, we could put them somewhere like `tool/input_sdk_internal` and then copy that file into the right path.
R=vsm@google.com
Review URL: https://codereview.chromium.org/955513008
There are a few examples of classes like this:
```dart
@patch
class StringBuffer {
... various @patch members ...
// no @patch here
void _writeString(str) { ... }
}
```
we need to merge in those members too
R=vsm@google.com
Review URL: https://codereview.chromium.org/955513007
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
Adds an explicit "extends dart.Object", which we probably want for other reasons (e.g. toString, runtimeType, hashCode)
Attempts to recover some readability by tweaking the name of the initialize functions. This closes#51, but we should open another tracking bug because there are concerning aspects to this workaround.
R=sigmund@google.com, vsm@google.com
Review URL: https://chromereviews.googleplex.com/150417015