Florian Loitsch
f02074dc9e
dart2js: Create program_builder directory and move corresponding files.
...
R=herhut@google.com
Review URL: https://codereview.chromium.org//1207343003 .
2015-07-07 14:56:27 +02:00
Florian Loitsch
7833348429
dart2js: Remove unneeded getters in full emitter.
...
R=herhut@google.com
Review URL: https://codereview.chromium.org//1227643002 .
2015-07-07 14:55:42 +02:00
Florian Loitsch
908865c47e
dart2js: Rename emitters.
...
The "old" and "new" name was not helpful.
R=herhut@google.com
Review URL: https://codereview.chromium.org//1220333003 .
2015-07-07 14:47:33 +02:00
Asger Feldthaus
fb8c42cbdb
dart2js cps: Ensure definitions are specialized before their uses.
...
Specializing a node may depend on how its operands are defined, but
they may no longer depend on how its result is used.
Patterns that depended on its result being converted to a boolean
violated this rule, but fortunately they could be refactored to
satisfy the rule, by matching the node doing doing the boolean
conversion.
By processing definitions before their uses, we avoid creating new
redexes for a node that has already been processed.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1220123004 .
2015-07-07 13:28:54 +02:00
Karl Klose
a26a536d86
Rewrite code to avoid dead code hints during build.
...
R=whesse@google.com
Review URL: https://codereview.chromium.org//1221243009 .
2015-07-07 10:50:19 +02:00
Stephan Herhut
ff442643fc
dart2js: Move functionThatReturnsNull to Isolate.
...
BUG=
R=karlklose@google.com
TBR=floitsch@google.com
Committed: https://github.com/dart-lang/sdk/commit/84e6d695ab9ced79b83f6e19a6ea751ca83a5e7a
Reverted: https://github.com/dart-lang/sdk/commit/3570e3199e129eca1435b6a0924d817e4682883a
Review URL: https://codereview.chromium.org//1224693004 .
2015-07-07 10:25:46 +02:00
Florian Loitsch
8d0b368669
Move nativeInfo encoding into NativeGenerator.
...
R=herhut@google.com
Review URL: https://codereview.chromium.org//1215463006 .
2015-07-06 18:10:26 +02:00
Stephan Herhut
3570e3199e
Revert "dart2js: Move functionThatReturnsNull to Isolate."
...
This reverts commit 84e6d695ab .
BUG=
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//1226853002 .
2015-07-06 17:00:13 +02:00
Stephan Herhut
84e6d695ab
dart2js: Move functionThatReturnsNull to Isolate.
...
BUG=
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//1224693004 .
2015-07-06 16:24:53 +02:00
Stephan Herhut
c6eb91b438
dart2js: Use separate namespace for constants.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1224603002 .
2015-07-06 15:00:01 +02:00
Asger Feldthaus
208e48ab7a
dart2js cps: Do not build type casts for casting to 'dynamic'.
...
Code generation assumes such redundant nodes do not occur.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1215713005 .
2015-07-06 14:35:08 +02:00
Asger Feldthaus
535ed4042f
dart2js cps: Do not rewrite calls on torn-off intercepted methods.
...
For example:
getInterceptor(foo).get$toString(foo).call$0()
Should be rewritten to:
getInterceptor(foo).toString$0(foo)
But would erroneously be rewritten to:
getInterceptor(foo).toString$0()
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1222763003 .
2015-07-06 13:08:34 +02:00
Johnni Winther
8aa5245b14
Support serialization of the compiler backbone.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1192103002 .
2015-07-06 11:30:51 +02:00
Asger Feldthaus
0220393797
dart2js cps: Bugfix in operator specialization.
...
Binary operators were always replaced with string concatenation if both
operands were strings.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1210403008 .
2015-07-06 11:15:02 +02:00
Asger Feldthaus
dbd197acdd
dart2js cps: Fuse tear-off and call invocation.
...
For example:
new Foo().bar.call(123)
==>
new Foo().bar(123)
This does not trigger much right now, but it will matter when forEach
is rewritten to a loop in a later CL.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1220193003 .
2015-07-03 14:44:47 +02:00
Asger Feldthaus
61f47e7384
dart2js cps: Ensure JSArray is emitted when we see a type cast.
...
This is a workaround to resolve an issue that is affecting a lot
of tests.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1214123003 .
2015-07-03 14:32:01 +02:00
Stephan Herhut
9fa33e4e72
dart2js: Implement frequency based naming.
...
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org//1212613009 .
2015-07-03 13:06:35 +02:00
Stephan Herhut
5c4749ac92
dart2js: Give the globals holder for deferred loading a fixed name.
...
R=floitsch@google.com , sigurdm@google.com
BUG=
Review URL: https://codereview.chromium.org//1220233003 .
2015-07-03 12:46:54 +02:00
Asger Feldthaus
4660cd6833
dart2js cps: Fix bug in assignment propagation.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1222673002 .
2015-07-02 18:13:40 +02:00
Asger Feldthaus
a8d36ce761
dart2js cps: Cleanup.
...
Add LetCont.two constructor for convenience.
Remove old code for specialized static calls to getInterceptor.
This should had been done in a previous CL where the Interceptor IR node
was added.
Remove InvokeStatic.isEffectivelyConstant, since this was only used for
interceptor and identical calls, which are no longer static calls.
Remove redundant imports and use consistent parameters for SourceInformation.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1218843003 .
2015-07-02 18:01:41 +02:00
Asger Feldthaus
1b9d41c5e7
dart2js cps: Reanalyze subterms when they get inserted.
...
This shouldn't change any visible behavior right now, but the change is
needed in a bigger incoming CL.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1218223004 .
2015-07-02 17:49:06 +02:00
Asger Feldthaus
01d2d2cb73
dart2js cps: Do not propagate uses of loop variables past their update.
...
Also some documentation specifying the SSA-like assumptions we make
about the input to StatementRewriter.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1215503012 .
2015-07-02 15:15:04 +02:00
Florian Loitsch
24fbfa7f78
Revert "Fix runtimeType.toString for tear-offs."
...
This reverts commit 87a7ca0720 .
Review URL: https://codereview.chromium.org//1220793012 .
2015-07-02 13:57:07 +02:00
Stephan Herhut
7ea6facff6
dart2js: Reuse names for constructor bodes.
...
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org//1215223002 .
2015-07-02 11:41:09 +02:00
Florian Loitsch
87a7ca0720
Fix runtimeType.toString for tear-offs.
...
Tear-offs are constructed by building a fresh constructor on the fly. However, that constructor is unnamed and didn't have the 'builtin$cls' property set. As such, the runtime-type system was unable to extract a good name and wasn't able to provide a good 'toString' for it. With this CL the constructor has a good 'name' set.
Also removes the 'builtin$cls' property that was a duplicate of 'name'. Whenever we defined a new Dart class, we added a 'builtin$cls' property on the constructor which was a duplicate of the name. This was necessary, because IE doesn't store the function name on the constructor. However, there we can just assign the 'name' field, and don't need to introduce a new field-name ('builtin$cls'). As such, we can always use the 'name' property.
R=sra@google.com
Review URL: https://codereview.chromium.org//1213033002 .
2015-07-02 10:59:31 +02:00
Johnni Winther
048a4651fe
Create and test source mapping for invocations.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1196433002 .
2015-07-02 10:38:19 +02:00
Stephan Herhut
964afc0523
dart2js: Fix regression in minified names for one shot interceptors.
...
R=sra@google.com
BUG= http://dartbug.com/23731
Review URL: https://codereview.chromium.org//1220793006 .
2015-07-01 11:01:01 +02:00
Stephen Adams
6d1b57277a
Tweak order of parts of lazy initializer list.
...
Keeping all the names together rather than sandwiching the function makes it less confusing to read.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org//1221823002 .
2015-06-30 17:32:46 -07:00
Stephen Adams
0b19fb7f26
Use 'a' as the first field name rather than 'Q'.
...
Miniscule extra compression plus it bothered me.
TBR=herhut@google.com
Review URL: https://codereview.chromium.org//1214853008 .
2015-06-30 14:04:29 -07:00
Sigmund Cherem
b18c5a3e7c
sdk files reorganization to make dart2js a proper package
...
BUG=
R=brianwilkerson@google.com , floitsch@google.com , whesse@google.com
Review URL: https://codereview.chromium.org//1212513002 .
2015-06-29 10:21:14 -07:00
Johnni Winther
76f1fec4f9
Translate package URIs to resource URIs for diagnostics.
...
Closes #23699
BUG=http://dartbug.com/23699
R=ahe@google.com , het@google.com
Review URL: https://codereview.chromium.org//1205373002 .
2015-06-29 17:13:31 +02:00
Asger Feldthaus
009cc956d1
dart2js cps: Fix a couple of minor issues.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1212663004 .
2015-06-29 16:44:58 +02:00
Asger Feldthaus
4f8d7b42d2
dart2js cps: Set receiver type in type propagation.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1214643003 .
2015-06-29 16:01:44 +02:00
Asger Feldthaus
34302b1320
dart2js cps: Translate synthesized mixin constructors.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1216593002 .
2015-06-29 15:28:40 +02:00
Stephan Herhut
63ccf506d7
dart2js: Fix off-by-one in assert.
...
TBR=johnniwinther@google.com
BUG=
Review URL: https://codereview.chromium.org//1217823002 .
2015-06-29 14:41:10 +02:00
Asger Feldthaus
ec55d46148
dart2js cps: Fix translation of local constants.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1211393003 .
2015-06-29 14:32:49 +02:00
Stephan Herhut
d24580087d
dart2js: Extract minified field naming into mixin.
...
R=johnniwinther@google.com
BUG=
Review URL: https://codereview.chromium.org//1209973002 .
2015-06-29 14:19:59 +02:00
Johnni Winther
74d04a6a48
Compute constant constructors in resolution.
...
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//1218793002 .
2015-06-29 12:56:06 +02:00
Sigmund Cherem
76cb9faa27
Update some files from CRLF to LF
...
R=sra@google.com
Review URL: https://codereview.chromium.org//1214853002 .
2015-06-26 16:55:46 -07:00
Stephen Adams
7d6051f21e
Mark static function getters as used in codegen.
...
Move marking from SSA builder to codegen. If the only a reference to (a closure over a) static or top level function is optimized away, it is no longer retained in the generated code.
R=ahe@google.com , sigmund@google.com
Committed: https://github.com/dart-lang/sdk/commit/4d784a7d0165aa768695d5d185c6b82c29501759
Reverted.
Review URL: https://codereview.chromium.org//1211223002 .
2015-06-26 08:36:15 -07:00
Johnni Winther
4dced50c38
Use a FunctionSignature in CallStructure.signatureApplies
...
BUG=
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//1213833002 .
2015-06-26 14:53:02 +02:00
Asger Feldthaus
e7e3706c59
dart2js cps: Better fallthrough analysis and eliminate "return null".
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1203423003 .
2015-06-26 14:14:12 +02:00
Stephan Herhut
b3730bc4eb
dart2js: Fix encoding of field names in csp mode.
...
R=floitsch@google.com
BUG=
Review URL: https://codereview.chromium.org//1215613002 .
2015-06-26 13:00:53 +02:00
Johnni Winther
02d52374d4
Implement SsaBuilder without the ResolvedVisitor.
...
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//1212433002 .
2015-06-26 12:48:26 +02:00
Stephen Adams
c1df2abeb0
Revert "Mark static function getters as used in codegen."
...
BUG=
Review URL: https://codereview.chromium.org//1215513003 .
2015-06-25 21:20:52 -07:00
Stephen Adams
4d784a7d01
Mark static function getters as used in codegen.
...
Move marking from SSA builder to codegen. If the only a reference to (a closure over a) static or top level function is optimized away, it is no longer retained in the generated code.
R=sigmund@google.com
Review URL: https://codereview.chromium.org//1211223002 .
2015-06-25 20:29:38 -07:00
Asger Feldthaus
cf920ec66c
dart2js cps: Fix codegen for foreign statements.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1203353003 .
2015-06-25 16:07:56 +02:00
Asger Feldthaus
fceb7f00dc
dart2js cps: Handle checks against mutable and extendable lists.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1206873003 .
2015-06-25 15:03:00 +02:00
Stephan Herhut
fbbc4c08ed
dart2js: Also use new abstract names in csp mode.
...
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//1207823005 .
2015-06-25 12:54:38 +02:00
Stephan Herhut
d5a57db06a
dart2js: Fix nsm emitter in non-minified mode.
...
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//1211503003 .
2015-06-25 11:21:10 +02:00