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
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
introduces a memoized function that produces the generic type instance
generic type parameters are closed over, making it easy to get them and ensure they flow correctly through base class/mixins.
also implements the unimplemented features in _typeName.
R=leafp@google.com, vsm@google.com
Review URL: https://chromereviews.googleplex.com/157627013
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 is very half baked. Putting it down to work on better type literal support for the moment.
Qs:
(1) What should we measure? cast failures mapped back to source? I don't think we inject anything else right now.
(2) How should we report? I just have dump function right now, but that'll be unwieldy on large apps.
R=jacobr@google.com, jmesserly@google.com
Review URL: https://chromereviews.googleplex.com/146737013
We'll need to figure out an efficient way to do this in JS output.
An alternative, suggested by Jacob, is only provide something like an applyTruncated function. E.g., something like:
dynamic applyTruncated(Function f, List args) {
var arity = getArity(f);
assert(args.length >= arity.min);
args = args.sublist(0, arity.max);
return Function.apply(f, args);
}
Jacob: is this what you have in mind?
If so, we could *only* provide this. The dart2j impl could use the existing code pattern of is-checks. The ddc implementation could map to JS apply (with a check for named params?).
Thoughts?
R=jacobr@google.com
Review URL: https://chromereviews.googleplex.com/137047014
- 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