kevmoo@google.com
2aabb54b66
add library canonicalUri to dart2js dump info
...
R=sra@google.com
Review URL: https://codereview.chromium.org//1145603002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45825 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 20:32:23 +00:00
johnmccutchan@google.com
f01c1490f7
Revert 45783
...
BUG=
Review URL: https://codereview.chromium.org//1138993005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45784 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 00:32:32 +00:00
johnmccutchan@google.com
95515238cc
Move 'dart:profiler' contents into 'dart:developer' and remove 'dart:profiler'
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//1139503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45783 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 23:48:04 +00:00
karlklose@google.com
9b32c9e673
Implement raw list checks.
...
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1123343008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45762 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 11:58:45 +00:00
karlklose@google.com
898138ad0a
Remove return that was reported as a dead-code when running build.py.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1133393002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45759 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 08:09:53 +00:00
sra@google.com
afbb537add
Better toString and Error.toSafeString output for closures for dart2js.
...
Closures that appear in error messages, especially NoSuchMethodError, need to identify the function so that captured error messages and stack traces are useful.
Old:
1. Instance of 'Object'
2. Instance of 'Object'
3. Instance of 'anonymous'
4. Instance of 'anonymous'
5. Instance of 'main_localFunction'
New:
1. Closure 'print'
2. Closure 'Widget_staticMethod'
3. Closure 'foo' of Instance of 'Widget'
4. Closure 'remainder' of 1234
5. Closure 'main_localFunction'
In minified code the names are (usually) minified. Being able to unminify them later is separate issue.
This CL makes NoSuchMethodError variants more uniform in quoting of method to assist unminifying the message.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1138313002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45753 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 23:47:23 +00:00
floitsch@google.com
d22c29b57b
dart2js: keep track of non-final static fields.
...
Dart2js used to just emit static non-final fields, even if they were not referenced.
This is bad, because in some cases it referenced a constant that didn't exist (was tree-shaken away). In the old emitter this just became a reference to a non-existing property, but in the new emitter it crashed.
This CL also fixes (partially) static non-final fields for the lazy emitter.
R=sra@google.com
Review URL: https://codereview.chromium.org//1132363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45752 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 23:34:42 +00:00
asgerf@google.com
f5f1eb643d
dart2js cps: Introduce GetStatic/SetStatic.
...
The GetStatic is used for reading static fields and tearing off
static methods.
Invoking a static getter/setter (not from a field) is still an
InvokeStatic, which IMO is the way it should remain.
BUG=
R=karlklose@google.com
Committed: https://code.google.com/p/dart/source/detail?r=45735
Reverted: https://code.google.com/p/dart/source/detail?r=45737
Review URL: https://codereview.chromium.org//1134063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45738 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 14:19:40 +00:00
asgerf@google.com
961c805398
Revert "dart2js cps: Introduce GetStatic/SetStatic."
...
This reverts commit 28e4518df87c72cb8e23fe6d73b7750ad0f2183a.
TBR=karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//1136523008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45737 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 13:53:15 +00:00
asgerf@google.com
2c90643171
dart2js cps: Introduce GetStatic/SetStatic.
...
The GetStatic is used for reading static fields and tearing off
static methods.
Invoking a static getter/setter (not from a field) is still an
InvokeStatic, which IMO is the way it should remain.
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1134063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45735 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 13:35:49 +00:00
floitsch@google.com
ac5e4d906c
dart2js: compile metadata lazily in the lazy emitter.
...
In the lazy emitter evaluates the metadata lazily at first access.
Does this by keeping two arrays. The first one containing the unparsed expressions. The second one containing the evaluated expressions.
R=sra@google.com
Review URL: https://codereview.chromium.org//1137883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45726 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 03:13:02 +00:00
floitsch@google.com
a66524586f
dart2js: build metadata-types lazily in the new emitter.
...
Instead of building all types in the TYPES table eagerly, evaluate them lazily at first access.
R=sra@google.com
Review URL: https://codereview.chromium.org//1123413002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45723 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 00:39:00 +00:00
johnniwinther@google.com
95e30b7b3c
Fix test for TypeImpl.==
...
BUG=
Review URL: https://codereview.chromium.org//1135043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45694 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 15:52:51 +00:00
johnniwinther@google.com
0f75f9272d
Forward instantiation type to LocalsHandler.
...
BUG=
R=zarah@google.com
Review URL: https://codereview.chromium.org//1133903003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45693 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 15:45:22 +00:00
johnniwinther@google.com
4103f9d13e
Add Accessor, Getter, and Setter elements.
...
+ a bit of model polishing
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//1132783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45689 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 15:09:49 +00:00
johnniwinther@google.com
0d4ab12dcf
Add ConstantExpression.evaluate.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1121233002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45687 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 14:34:01 +00:00
johnniwinther@google.com
6e42a3aab3
Refactor index operator in SimpleTypeInferrer.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1120633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45683 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 13:14:53 +00:00
karlklose@google.com
a295eb38fe
Add import missing from r45680.
...
TBR=sigurdm@google.com
Review URL: https://codereview.chromium.org//1134083002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45682 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 13:14:15 +00:00
johnniwinther@google.com
091c7eddae
Add ConstantConstructor to ConstantExpression system.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1115183002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45681 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 12:46:17 +00:00
karlklose@google.com
0eaa4d4717
cps-ir: Support compilation of methods that use interceptor calling convention.
...
This is a modified version of sra@'s CL https://codereview.chromium.org/1020243002/ with kmillikin@'s comments addressed.
R=sigurdm@google.com , kmillikin@google.com
Review URL: https://codereview.chromium.org//1109403002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45680 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 12:38:14 +00:00
asgerf@google.com
9630163eaf
dart2js cps: Handle error cases.
...
A new IR node CreateInvocationMirror has been introduced, which is
needed for creating calls to noSuchMethod. The main reason for this node
is that the JS constructor for Invocation objects require the internal
(minified) name of the target, which the builder does not know.
I don't think the IR pipeline should depend on the Namer, so the IR node
is preserved all the way to codegen.
R=floitsch@google.com , kmillikin@google.com
Review URL: https://codereview.chromium.org//1130813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45678 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 09:06:12 +00:00
sigurdm@google.com
8a609d2ac3
Add missing implementations.
...
BUG=
Review URL: https://codereview.chromium.org//1137683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45642 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 11:02:13 +00:00
herhut@google.com
8704402c63
dart2js: Properly track descriptor asts for dumpinfo.
...
BUG=
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1131253002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45639 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 10:27:31 +00:00
sigurdm@google.com
1ce5158350
Insert the right checks for redirecting factories to deferred constructors.
...
BUG=https://code.google.com/p/dart/issues/detail?id=23399
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1127363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45637 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 09:18:00 +00:00
kmillikin@google.com
6ab3c55366
Fix an assertion failure in dart2js.
...
In the CPS translation we assert that a mutable variable added to the CPS
term belongs to the function currently being compiled, which is reasonable.
However, in the JS backend this didn't work as written. The variable
element can report that it belongs to a Dart function, and the function
currently being compiled can be a synthesized .call method of a closure
class representing that Dart function.
The solution presented here is to plumb the mapping from Dart function to
closure class .call methods through to where the mutable variables are
created. It might be better, but a lot more complicated, to make the
variable elements able to correctly report their owner after closure
conversion.
R=asgerf@google.com , karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//1084413003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45636 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 08:58:00 +00:00
herhut@google.com
76694b7cdd
dart2js: Use JavaScript asts instead of CodeBuffers when assembling output units.
...
BUG=
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1129333003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45635 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 08:57:50 +00:00
kmillikin@google.com
638a5ba35f
Support 'on T' catch clauses and multiple clauses.
...
The sequence of clauses is translated into the corresponding nested if-else
statements. The last else is the catch-all clause (no 'on T') if there is
one or implicitly 'rethrow' otherwise.
If there is a catch-all clause (no 'on T'), then any clauses after it
are unreachable. The language specification allows such unreachable
clauses without an error.
R=asgerf@google.com , karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//1125813004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45634 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 08:49:26 +00:00
sra@google.com
6ab9b2ceb2
Optimize DateTime properties
...
Several small pieces fit together to improve calendar arithmetic code in a customer's app.
1. Mark DateTime primitives that return small integers as returning uint31.
2. uint31 + uint31 -> uint32 in type inference.
3. uint32 / N can be generated as (uint32 / N) | 0 when N >= 2.
R=floitsch@google.com
Committed: https://code.google.com/p/dart/source/detail?r=45621
Review URL: https://codereview.chromium.org//1106443003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45625 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 00:52:29 +00:00
sra@google.com
532a7948d8
Optimize DateTime properties
...
Several small pieces fit together to improve calendar arithmetic code in a customer's app.
1. Mark DateTime primitives that return small integers as returning uint31.
2. uint31 + uint31 -> uint32 in type inference.
3. uint32 / N can be generated as (uint32 / N) | 0 when N >= 2.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1106443003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45621 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 21:39:17 +00:00
sigmund@google.com
d0002db5ed
Avoid reparsing metadata expressions
...
BUG= http://dartbug.com/23404
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1126423002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45600 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 17:07:04 +00:00
johnniwinther@google.com
f238761664
Improve resolution/codegen separation invariant.
...
BUG=
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1126163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45593 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 13:30:05 +00:00
johnniwinther@google.com
065b2163e3
Differentiate between unresolved class and constructor.
...
BUG=
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1130773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45591 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 13:02:49 +00:00
het@google.com
acfd54f53a
Report malformed URIs in library dependencies as errors.
...
For instance: "import '../../Udyn[mic ils/expect.dart';" used to cause an internal compiler error. The error is now caught and the compiler reports the invalid import.
BUG=http://dartbug.com/23228
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1131593006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45580 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 00:11:47 +00:00
sra@google.com
ac0f1ade9e
Recognize unmodifiable lists
...
Add a new type, JSUnmodifiableArray, that is the type returned by
List.unmodifiable and the type of const list literals.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1126063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45575 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 21:25:25 +00:00
floitsch@google.com
067bdb8331
dart2js: Access to metadata and types goes through builtins.
...
Instead of exposing an embedded constant "METADATA" and "TYPES" provide a builtin-function that reads these values.
This allows us to implement the metadata and types table differently. In particular we want to be able to generate them lazily.
R=sra@google.com
Review URL: https://codereview.chromium.org//1125083002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45574 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 21:20:17 +00:00
herhut@google.com
a37bc208f1
dartjs: Remove unused isFromMainOutputUnit.
...
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//1131493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45559 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 10:13:29 +00:00
herhut@google.com
a79c250c13
dart2js: Inline across deferred output units if that leads to reduced size.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1117223002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45553 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 08:37:54 +00:00
floitsch@google.com
10d128dc5e
dart2js: add builtin 'isSubtype'.
...
R=sra@google.com
Review URL: https://codereview.chromium.org//1121313007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45546 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 00:52:04 +00:00
floitsch@google.com
ceabb95bd6
dart2js: add classNameFromIsCheckProperty to compiler builtins.
...
R=sra@google.com
Review URL: https://codereview.chromium.org//1106613006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45537 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 19:32:19 +00:00
johnniwinther@google.com
ed0fead09e
Fix dart2dart
...
BUG=
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1127623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45491 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 15:02:30 +00:00
johnniwinther@google.com
af1b401714
Handle default values on constant redirecting factories.
...
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//1118423003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45490 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 13:39:14 +00:00
asgerf@google.com
5a2bb3b761
cps-ir: Remove redundant identical() calls in type propagation.
...
Also, use the inferred type from dynamic method calls.
Changed the file from a "part of" to a re-exported file
so the imports are not polluting the other optimization passes.
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1086323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45488 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 12:14:17 +00:00
zarah@google.com
654c29d329
Revert "dart2js: add type arguments to constructor in case the class needs rti."
...
This reverts commit -r45485.
BUG=
Review URL: https://codereview.chromium.org//1124613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45487 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 11:45:31 +00:00
asgerf@google.com
5522990c4f
tree-ir: Move labeled statements outside loops.
...
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1094433003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45486 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 11:26:23 +00:00
zarah@google.com
53d47da67a
dart2js: add type arguments to constructor in case the class needs rti.
...
R=herhut@google.com
Committed: https://code.google.com/p/dart/source/detail?r=45277
Reverted: https://code.google.com/p/dart/source/detail?r=45281
Review URL: https://codereview.chromium.org//1092263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45485 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 09:37:58 +00:00
karlklose@google.com
6abb79a95b
cps-ir: Implement type tests for interface types without type arguments.
...
R=sigurdm@google.com , kmillikin@google.com
Review URL: https://codereview.chromium.org//1110813005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45484 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 07:58:38 +00:00
sigurdm@google.com
1e723f68d1
Allow use of deferred type-literals in non-constant contexts.
...
BUG= dartbug.com/22893
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1109393012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45459 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-30 11:38:54 +00:00
karlklose@google.com
3164951779
Change code to remove two warnings that are reported when running build.py.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1110063012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45458 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-30 09:48:46 +00:00
johnniwinther@google.com
8361a9a7f0
Refactor to make visitDynamicSend deprecated.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1112843004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45456 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-30 09:15:53 +00:00
herhut@google.com
fb553a3e20
dart2js: Do not emit closure classes if their instantiation is dead code.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1109033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45454 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-29 19:19:37 +00:00