karlklose@google.com
f0efba07a2
Add a helper to add a LetPrim node for a new primitive node.
...
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1010423002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44571 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 12:07:00 +00:00
sigurdm@google.com
25e11e6b29
Fix renaming of exception variables on left-hand-sides.
...
Also fix compound assignments.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1012783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44558 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-18 14:04:41 +00:00
herhut@google.com
4f5a80b4de
Revert "Abort tracing in type inference in the presence of await."
...
This reverts revision 44555.
BUG=
R=karlklose@google.com
TBR=karlklose@google.com
Review URL: https://codereview.chromium.org//1022433002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44556 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-18 12:10:30 +00:00
herhut@google.com
c9b6f9a8c2
Abort tracing in type inference in the presence of await.
...
BUG= http://dartbug.com/22868
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1013803006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44555 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-18 10:35:55 +00:00
zarah@google.com
941cc60606
dart2js: remove obsolete code in the old emitter.
...
R=herhut@google.com
Review URL: https://codereview.chromium.org//1013143002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44552 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-18 10:14:05 +00:00
sigurdm@google.com
3f8c12c425
Fix problems with async* and await for in dart2js.
...
The ssa backend would generate incorrect code for await for.
Async* finalizers would not be run when a paused stream is canceled.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1012623003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44503 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-16 14:10:29 +00:00
johnniwinther@google.com
ce07c4f19e
Pass the call selector for local invocations.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1001243003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44502 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-16 14:06:22 +00:00
kmillikin@google.com
056c76548b
dart2js: Split the SimplifyInterceptors pass out from the list of optimization passes.
...
The backend code generator assumes that SimplifyInterceptors is alwyas
run, otherwise it will crash. Split it out from the list of
optimizations to make it more clear that it should not be disabled.
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org//1002213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44501 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-16 10:11:09 +00:00
sigurdm@google.com
ac29738460
Fix "continue to a label" in dart2js async code.
...
Actually there were two independent problems
1: continue would jump to the starting point of the label, instead of
the continue-point of the labelled loop.
2: A for-initializer with no awaits in the for would still get its
variables hoisted, so
label: for(var i = 1; i < 10; i++) {continue label};
would transform to:
label: {
i = 1
for(; i < 10; i++) {continue label;}
}
And that fails.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1003213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44499 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-16 08:45:47 +00:00
herhut@google.com
36175534cb
Add call to deferred action method in csp constructors.
...
BUG=
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//1007873002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44464 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 15:48:46 +00:00
herhut@google.com
4832c0478b
Do not use namer for top-level global.
...
BUG=
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//1007833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44463 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 14:33:03 +00:00
herhut@google.com
1cf889e24d
Disable the use of __proto__ in incremental mode.
...
BUG=
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//1004183002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44460 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 13:07:24 +00:00
herhut@google.com
58efcbe0bb
Defer addStubs to class instantiation time.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//974803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44458 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 12:35:30 +00:00
sigurdm@google.com
5bf38f9c59
Fix handling of lazy and and or in async functions.
...
The two were interchanged.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//996103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44456 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 12:11:21 +00:00
herhut@google.com
bcca8dde85
Make use of __proto__ when available.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//957343002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44454 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 10:21:52 +00:00
floitsch@google.com
fea7ca3d16
dart2js: fix csp mode when minifying.
...
R=ricow@google.com
Review URL: https://codereview.chromium.org//1000043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44453 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 10:01:58 +00:00
floitsch@google.com
5ae2c0f6e9
dart2js: Emit libraries that are only used for typedefs.
...
R=zarah@google.com
Review URL: https://codereview.chromium.org//1004833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44452 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 09:55:32 +00:00
kmillikin@google.com
695aa5b57e
dart2js: Add support for do/while loops to the CPS backend.
...
Do/while loops are simpler than for loops, but more complicated than while
loops. Add support for them to the CPS translation.
BUG=
R=johnniwinther@google.com , karlklose@google.com
Review URL: https://codereview.chromium.org//1001793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44450 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 09:33:17 +00:00
sigurdm@google.com
d95886b484
Make sure to bind a method to its receiver if it is stored in a temporary.
...
Otherwise `this` is not bound when the temprary is invoked.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//972063003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44449 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-13 08:21:48 +00:00
floitsch@google.com
3b8843b175
dart2js: Handle zero-terminated content explicitly.
...
BUG= http://dartbug.com/22667
R=ajohnsen@google.com , johnniwinther@google.com
Review URL: https://codereview.chromium.org//992333003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44427 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 12:33:00 +00:00
brianwilkerson@google.com
0a35aec78f
Fix type promotion (issue 22732)
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//991033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44410 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 18:01:25 +00:00
herhut@google.com
5976f93275
Support @NoInline for constructor bodies.
...
BUG=
R=floitsch@google.com , johnniwinther@google.com
Review URL: https://codereview.chromium.org//987393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44402 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 14:15:07 +00:00
herhut@google.com
9a72b99fce
Ensure that descriptors have a prototype.
...
BUG= http://dartbug.com/22776
R=floitsch@google.com , karlklose@google.com
Review URL: https://codereview.chromium.org//998983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44401 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 13:39:10 +00:00
johnniwinther@google.com
da20a0abd7
Flag that --dump-info is not supported for dart2dart.
...
BUG=http://dartbug.com/22724
R=floitsch@google.com
Review URL: https://codereview.chromium.org//983363005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44400 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 13:12:42 +00:00
kmillikin@google.com
18968fd26e
Support static getters and setters in the new dart2js code generator.
...
Implicit getters and setters are translated as field accesses, real getters
and setters are translated as static function invocations.
R=karlklose@google.com , sra@google.com
BUG=
Review URL: https://codereview.chromium.org//994323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44399 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 12:06:18 +00:00
johnniwinther@google.com
d2cdaf06a7
Add SemanticVisitor to dart2js.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//929113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44393 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 09:24:10 +00:00
herhut@google.com
0f95c2df6b
Use no arguments when simulating implicit call to super constructor during type inference.
...
BUG= http://dartbug.com/22723
R=floitsch@google.com
Review URL: https://codereview.chromium.org//994823003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44380 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 17:33:28 +00:00
sigurdm@google.com
69984cd0f8
Fix dart2js for switches in async code with only awaits in the key.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//994853003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44371 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 14:25:00 +00:00
zarah@google.com
d62e45b914
dart2js: remove name string of function type encoding in metadata.
...
R=herhut@google.com
Review URL: https://codereview.chromium.org//974793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44365 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 11:41:12 +00:00
herhut@google.com
94e1fa8186
Adapt call to addStubs in incremental compilation to new signature.
...
BUG=
TBR=floitsch@google.com
Review URL: https://codereview.chromium.org//996623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44363 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 10:13:15 +00:00
zarah@google.com
d708313b0f
dart2js: replace null in arrays with array holes in type representations.
...
R=herhut@google.com
Review URL: https://codereview.chromium.org//987043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44361 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 09:22:33 +00:00
paulberry@google.com
50f820a13a
Temporary workaround for bug 22732.
...
Analyzer is failing to implement type promotion properly, causing it
to incorrectly flag "current.thenBlock" and "current.elseBlock" with a
warning.
As a temporary workaround, declare a variable with the correct type.
TBR=sra@google.com
Review URL: https://codereview.chromium.org//987133002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44333 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 18:09:29 +00:00
floitsch@google.com
028b1d45b7
dart2js: create constants lazily in the new emitter.
...
R=zarah@google.com
Review URL: https://codereview.chromium.org//952973004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44326 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 16:37:01 +00:00
sra@google.com
721b99244e
Remove more null receiver guards.
...
Sometimes when we inline methods with conditionals we have a graph
that looks like:
t1.toString;
if (true) // Not actually included in output.
t1.x = ...
This change recognizes that t1 will be 'tested' for null by t1.x, so
t1.toString can be removed.
This is the single-path version of a fix for http://dartbug.com/22577
R=floitsch@google.com , herhut@google.com
Review URL: https://codereview.chromium.org//985913002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44323 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 15:26:49 +00:00
herhut@google.com
5e5df130cc
Ensure that collectedClasses always contains a [globalObject, descriptor] pair.
...
BUG=
R=zarah@google.com
Review URL: https://codereview.chromium.org//993573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44322 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 15:14:45 +00:00
herhut@google.com
d8bc647568
Do not update original descriptor when building new one.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//963453002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44320 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 13:35:42 +00:00
herhut@google.com
10f0d0b5db
Simplify index computation in reflectionDataParser.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//961653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44318 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 13:29:39 +00:00
herhut@google.com
d5af6004be
Force slow objects for select objects during startup.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//948383003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44317 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 13:27:52 +00:00
herhut@google.com
c1d7da2ffd
Inline special case of inheritFrom to call site.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//946023004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44316 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 13:21:55 +00:00
floitsch@google.com
1f8851987f
dart2js: Allow multiple invocations of type.ensureResolved in new emitter.
...
R=zarah@google.com
Review URL: https://codereview.chromium.org//962853002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44315 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-09 10:45:18 +00:00
zarah@google.com
596bfa75c2
dart2js: split out types from metadata.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//981143003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44292 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 14:23:03 +00:00
sigurdm@google.com
4bea71e030
Fix dart2js async error handling of finallies nested in finallies.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//989503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44287 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 12:48:33 +00:00
asgerf@google.com
bc2b857a60
Integrity checker for CPS and Tree IR.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//981523002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44285 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 11:27:42 +00:00
asgerf@google.com
4d178cd9c5
dart2dart: Bugfix in copy propagator and rename Assign.definition->value.
...
Do not copy propagate variable if:
- The variable is accessed from an inner function.
- We are inside a try block.
- The moving assignment is a declaration.
The last point could be fixed by making the new assignment a declaration
as well, but for now I focused on fixing bugs and not making improvements.
I suspect the copy propagator will disappear entirely after the new
register allocator lands, but these bugs are currently blocking the
integrity checker from landing, and I want to land that first.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//980853002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44284 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 10:58:44 +00:00
karlklose@google.com
24eeb37c55
Implement type argument access and reification of runtime types.
...
R=asgerf@google.com
Review URL: https://codereview.chromium.org//968843003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44259 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 11:57:05 +00:00
johnniwinther@google.com
b2a8c702b7
Put IR builder visitors in a different library than IrBuilder.
...
BUG=
R=asgerf@google.com , kmillikin@google.com
Review URL: https://codereview.chromium.org//917663003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44258 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 11:32:22 +00:00
johnniwinther@google.com
48dd2273f3
Fix dart2dart new_backend
...
BUG=
R=asgerf@google.com
Review URL: https://codereview.chromium.org//980203002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44257 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 11:24:06 +00:00
karlklose@google.com
8519a8bc1b
Replace use of runtime type with name of the node in the CPS IrTracer.
...
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//982513004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44254 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 10:11:50 +00:00
johnniwinther@google.com
2182be0fc5
Support simple try in analyzer2dart.
...
BUG=
R=kmillikin@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//979813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44253 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-05 09:13:36 +00:00
asgerf@google.com
637c5b33b2
Translate constructors without bad references.
...
This came up while working on integrity checks for the CPS IR.
- Empty constructors to should not create orphaned references.
- Initializers should not use the body's return continuation object, they should each have their own.
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//977553004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44238 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-04 14:42:48 +00:00