this avoids reloading file contents many times during a compile. `.contents.data` == bad!
also fixes#73, using Analyzer's LineInfo instead of FileSpan to avoid finding line breaks over and over
I did some manual testing on sunflower as well as diffing SDK messages before and after
The one baseline change (23 -> 22) seems more accurate than it was before.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1141013002
This prunes out INFO messages by default - they end up being a substantial chunk of the payload in server mode. You can still serve them up by passing '-l ALL' or '-l INFO'.
R=leafp@google.com
Review URL: https://codereview.chromium.org/1126243004
Factored the load order logic into its own file, as it was easier to work with that way. We could definitely tweak the structure.
Also tried hoisting constants out to top level, but it's not quite ready yet, so splitting that work out into a separate CL.
(also fixes#152 about cleaning up lazyClass, and fixes#181 about static fields)
R=vsm@google.com
Review URL: https://codereview.chromium.org/1133593004
this was happening because we picked up an == operator from analyzer's Element
also adds an assert, because I took way too much time figuring out what the heck was happening there :)
R=vsm@google.com
Review URL: https://codereview.chromium.org/1139673005
readability regression, but fairly simple fix. looks okay in libraries with few imports, bad if they have a lot. ultimately I think this gets cleaned up as part of emitting modules + handling module lowering in JS codegen, see issue #34.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1122133003
Tightens up some typing issues (mostly in the collections) to eliminate some casts and dynamic calls. Also adds inference through parenthesized expressions.
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1122313002
This fixes all of the static errors from generating the SDK except those in the _interceptors library, and a set of errors associated with checks of the form (v is E) for generic type parameter E. Most of the fixes consist of adding missing generic parameters, or making overrides consistent. There are a few fixes to resolve issues around code that moved implicitly between hidden implementation classes and their public API classes, and some other miscellaneous fixes.
All of my changes are in the tool/input_sdk directory - the rest of the diff is generated code.
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/1112403004
static/top-levels don't need extension method, operator renames, or different slots* for private members
(static members are qualified by the static type, so they aren't ambiguous, e.g. Foo._foo and Bar._foo where Foo and Bar are in same/different libraries)
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1111863002
Nothing wrong with it there, but it was tangled up with the _emitClassIfNeeded code I'm trying to fix for use-before-define issues. Also _finishClassDef's reason for existing is shared code between FunctionTypeAlias/ClassTypeAlias/ClassDeclaration, so the fact that only one of those cares about jsPeer was a sign.
(My first thought was actually _finishClassMembers, but discovered the generics issue: https://github.com/dart-lang/dev_compiler/issues/154)
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1061543004
there are two basic strategies to fix: we either provide globals to the renamer, or it determines them based on use. I went with the second approach, as it fits more naturally with the current code generator.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1099813006
We were tracking currentClass for no real reason.
Also attempted to discern what visitSimpleIdentifier was actually doing. It now prefers the original element (the "field" not the synthetic getter/setter) whenever possible. Previously was a mismash.
This little change tripped on the (larger, not fixed yet) issue #138 ... but I think I found a way around the issue for now, by tweaking the private TypeDataArray class.
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1095563003
This CL makes us recognizes calls through call methods as not requiring dynamic invokes. The analyzer seems to do the wrong thing on the return types though, so we'll still get casts on the results. Bug filed here: dartbug.com/23252 .
This fixes#7.
BUG=
R=jacobr@google.com
Review URL: https://codereview.chromium.org/1092183003
Hook the coercion reifier into the JS backend.
The principle observed changes in the output are from the downward type inference eliminating casts.
The coercion reifier changes in this CL in two ways.
The first is a relatively minor change to factor out the instrumented runtime calls. The reifier is now parameterized by a runtime object. If present, casts, wraps, and type object creation are delegated to the runtime. Otherwise the reifier just produces cast objects directly. The JS codegen always does the latter.
The larger change is an attempt to make the new AST nodes be resolved. This is principally done for the typedefs produced for casts - we're not using wrapping right now so I've left that for future if we want it. This is a bit painful - if we continue down this path I think I'll want to factor this out into a ResolvedAstBuilder or somesuch, but for now this seems to be working.
The rest of the changes are just plumbing in the coercion reifier and its dependencies into the js backend.
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1096583002
JSTemporary is now identified by instance, not its String name. This provides enough information to do renaming correctly and avoid the bug in #136.
The namer now considers all scopes where the temporary is visible, and chooses a name that doesn't conflict with other identifiers. Because it only considers scopes where the temp appears, it does less renaming that the previous version.