sigurdm@google.com
e2b3d76994
Add option for outputting a deferred loading mapping.
...
With the option --deferred-map=<file> dart2js will output a json-file
describing which files will get loaded for a given deferred import.
The output looks like:
{
"_comment": "This mapping shows which compiled `.js` files are needed for a given deferred library import.",
"main.dart": {
"name": "mainLibrary",
"imports": {
"lib1": [
"out.js_2.part.js",
"out.js_1.part.js"
],
"lib2": [
"out.js_2.part.js",
"out.js_3.part.js"
],
"lib3": [
"out.js_5.part.js"
],
"lib4": [
"out.js_6.part.js"
]
}
},
"lib1.dart": {
"name": "<unnamed>",
"imports": {
"convert": [
"out.js_4.part.js"
]
}
}
}
BUG=dartbug.com/21869
R=floitsch@google.com
Review URL: https://codereview.chromium.org//785303003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42727 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 10:37:02 +00:00
johnniwinther@google.com
04e6184abe
Handle platform access through prefix in dart2dart
...
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//839063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42726 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 10:29:59 +00:00
floitsch@google.com
dc1835da68
dart2js: Merge intercepted names map.
...
R=ahe@google.com
Review URL: https://codereview.chromium.org//833623003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42694 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 14:16:33 +00:00
ahe@google.com
195696cd9c
More fatal errors to prevent crashes.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//839043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42693 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 14:05:35 +00:00
floitsch@google.com
11fa0a2a86
dart2js: Store mapTypeToInterceptor in embedded global.
...
R=ahe@google.com , sra@google.com
Review URL: https://codereview.chromium.org//813873008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42692 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 13:31:00 +00:00
floitsch@google.com
764358ad0e
dart2js: The main output unit always has a descriptor (at the very least main).
...
R=ahe@google.com
Review URL: https://codereview.chromium.org//823633005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42691 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 13:22:41 +00:00
ahe@google.com
3e3fd384dc
Quick work around dart2js crashes
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//841953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42687 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 11:33:53 +00:00
zarah@google.com
009cd7ff71
dart2js: Change name and comment of the flag needsArrayInitializerSupport.
...
R=ahe@google.com
Review URL: https://codereview.chromium.org//843503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42685 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 10:28:32 +00:00
ahe@google.com
a52a04a04a
Remove Compiler.reportFatalError.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//791263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42678 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 08:37:24 +00:00
ahe@google.com
cf8292288f
Throw ArgumentError if packageRoot is null.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//838773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42677 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 08:36:27 +00:00
zarah@google.com
38d47fce2c
dart2js: Change output so that in stack traces, dart method names get prefixed with 'dart.' instead of 'parseReflectionData'.
...
BUG=dartbug.com/22000
R=ahe@google.com , floitsch@google.com
Review URL: https://codereview.chromium.org//798873004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42661 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 14:18:55 +00:00
sigurdm@google.com
0df0c89ae6
Fix deferred loading with multiple apps on same page.
...
Even though two apps don't have to load a file twice, they still both have to initialize it.
Still missing this support for the new emitter.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//837903002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42660 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 14:05:51 +00:00
floitsch@google.com
131370189e
dart2js: First part of native support in the new emitter.
...
R=sra@google.com
Review URL: https://codereview.chromium.org//836753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42657 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 13:11:54 +00:00
floitsch@google.com
270bbb32ab
dart2js: Remove unused variable.
...
R=ahe@google.com
Review URL: https://codereview.chromium.org//832043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42655 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 13:08:37 +00:00
zarah@google.com
292cd0cfbe
Avoid emitting addStubs and tearOffCode when not needed.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//810933003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42654 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 13:07:38 +00:00
zarah@google.com
cfef07acad
dart2js OldEmitter: Small cleanups in output.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//834133002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42651 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 08:05:08 +00:00
floitsch@google.com
3afd53946c
dart2js: Add elements to the emitter's model.
...
R=zarah@google.com
Review URL: https://codereview.chromium.org//840553002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42638 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 17:25:04 +00:00
kmillikin@google.com
e79c7e72bf
Make scoping more prominent in the CPS IR's printed representation.
...
Before: LetPrim and LetCont had "internal define" scoping, extending to
the end of the body they were in. After: they have "let" scoping, with a
body as a subexpression.
This change makes it easier to see scoping in the printed representation.
It also makes the printed representation more closely resemble the
internal representation. Finally, it is an advantage if writing the IR
by hand because expressions are balanced (Emacs, for example, can copy or
cut a balances S-expression).
Argument lists are changed to be always nested (enclosed by parentheses).
The basic rule of thumb is that the syntactic forms of the IR should all
have fixed arity (matching the internal representation), so that variable
arity parts such as arguments are represented as a single list.
BUG=
R=asgerf@google.com , floitsch@google.com , sigurdm@google.com
Review URL: https://codereview.chromium.org//833353002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42630 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 12:49:28 +00:00
floitsch@google.com
e43670cb84
dart2js: make "boilerplate" function in Native generator.
...
R=sra@google.com
Review URL: https://codereview.chromium.org//830923003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42629 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 12:34:14 +00:00
floitsch@google.com
96ca1b8488
dart2js: move native boilerplate code into a separate file.
...
R=sra@google.com , zarah@google.com
Review URL: https://codereview.chromium.org//829473003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42627 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 12:25:33 +00:00
zarah@google.com
5ff81ff6bd
dart2js OldEmitter: name anonymous function so it does not need to be copied in deferred parts.
...
R=floitsch@google.com , sigurdm@google.com
Review URL: https://codereview.chromium.org//800903005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42626 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 12:05:14 +00:00
johnniwinther@google.com
a2dddc825a
Remove Compiler.assembledCode.
...
BUG=
R=floitsch@google.com
Committed: https://code.google.com/p/dart/source/detail?r=42592
Review URL: https://codereview.chromium.org//832363002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42623 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 11:06:23 +00:00
floitsch@google.com
3456aa38e6
dart2js: Share nativeSuperclassTagName between runtime and compiler.
...
R=sra@google.com
Review URL: https://codereview.chromium.org//829083002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42622 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 10:37:15 +00:00
johnniwinther@google.com
62b0c9426d
Improve message for import of part.
...
BUG=http://dartbug.com/21986
R=floitsch@google.com
Review URL: https://codereview.chromium.org//837473002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42621 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-06 10:23:15 +00:00
johnniwinther@google.com
f4b878129c
Revert "Remove Compiler.assembledCode."
...
This reverts commit r42592.
BUG=
Review URL: https://codereview.chromium.org//824103005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42594 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 14:38:00 +00:00
johnniwinther@google.com
fbc1274183
Remove Compiler.assembledCode.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//832363002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42592 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 14:06:51 +00:00
floitsch@google.com
f598816be1
dart2js: is-checks for the new emitter.
...
Also includes more fine-grained access to classes.
R=johnniwinther@google.com , kasperl@google.com , zarah@google.com
Review URL: https://codereview.chromium.org//809433004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42587 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 11:33:32 +00:00
zarah@google.com
2eabd2637a
Fix error in csp output.
...
Review URL: https://codereview.chromium.org//804193004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42586 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 10:55:38 +00:00
zarah@google.com
d6e525de1d
dart2js OldEmitter: inline FinishClasses.
...
R=floitsch@google.com
Committed: https://code.google.com/p/dart/source/detail?r=42582
Reverted: https://code.google.com/p/dart/source/detail?r=42583
Review URL: https://codereview.chromium.org//819993003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42585 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 09:15:45 +00:00
zarah@google.com
12adfe9cfe
Revert "dart2js OldEmitter: inline FinishClasses."
...
This reverts commit -r42582
Review URL: https://codereview.chromium.org//816113005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42583 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-02 10:33:04 +00:00
zarah@google.com
66bef0a48e
dart2js OldEmitter: inline FinishClasses.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//819993003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42582 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-02 09:29:51 +00:00
johnniwinther@google.com
2384a6fd8b
Add CodeOutput to prepare for emission without in-memory buffers.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//812233004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42573 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-30 11:40:52 +00:00
zarah@google.com
a56f7a94ff
dart2js OldEmitter: Change to named holes in js output strings plus some extra clean-ups.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//828753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42572 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-30 10:04:00 +00:00
ahe@google.com
e225e296db
Update unit tests
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//789873003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42507 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 14:44:11 +00:00
ahe@google.com
a7b3af240e
Incremental compilation of libraries with multiple parts.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//815123002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42506 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 13:43:54 +00:00
karlklose@google.com
9b4f58b0b5
Remove static state.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//790023004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42504 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 12:15:12 +00:00
sigurdm@google.com
ed041f149c
dart2js: Fix crash with reference to type literal in static context.
...
BUG= dartbug.com/21566
R=karlklose@google.com
Review URL: https://codereview.chromium.org//816663002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42458 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-18 13:43:40 +00:00
ahe@google.com
743cd666d4
Recover from incorrectly ordered library tags.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//811583004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42455 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-18 11:32:24 +00:00
sigurdm@google.com
b66b280dcb
Don't try to compile platform libraries with the new backend.
...
R=karlklose@google.com
Review URL: https://codereview.chromium.org//813013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42454 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-18 10:32:21 +00:00
johnniwinther@google.com
2b9de73a47
Fix analyzer2dart end2end.
...
BUG=http://dartbug.com/21872
R=karlklose@google.com
Review URL: https://codereview.chromium.org//812333002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42453 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-18 10:19:40 +00:00
karlklose@google.com
e4d05ef18c
Support synthetic default constructors.
...
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//810243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42452 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-18 09:53:49 +00:00
zarah@google.com
834587d0e2
Emit either csp or non-csp versions of the program.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//797513004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42451 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-18 09:22:14 +00:00
floitsch@google.com
194be91eaf
dart2js: Add a pointer from the emitter's JS code to the encoding part.
...
This makes it easier to understand how things are encoded and why the generated code must do these splits. (In Dart-editor a ctrl-click navigates to the comment and the code that encodes the data).
R=karlklose@google.com
Review URL: https://codereview.chromium.org//813603002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42440 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 15:42:07 +00:00
floitsch@google.com
9c0e28ff6e
dart2js: Remove builder dependency from type_test_generator.
...
R=karlklose@google.com
Review URL: https://codereview.chromium.org//812603004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42439 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 15:22:27 +00:00
kmillikin@google.com
9eac6999aa
Change the S-expression representation of constant values.
...
Before we called toStructuredString, which made no guarantee to
produce something that could be parsed as an S-expression. Instead
implement our own conversion to S-expressions.
R=karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//813753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42438 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 15:18:59 +00:00
floitsch@google.com
cbaddb1c06
dart2js: Change typedef encoding.
...
Currently typedefs have a descriptor field that looks like they don't have any super-class:
_Equality: {
"^": ":58"
}
When we call finishClass we thus assume that it's the Dart Object class. While this didn't hurt (as far as I could tell), it feels wrong.
Since typedefs are only emitted when reflection is enabled I'm ok with adding more code to the output (not that it's that much).
The output now looks as follows:
_Equality: {
"^": "Object;",
$typedefType: 58,
$$isTypedef: true
},
At the same time I removed the shared encoding class. It turns out that it doesn't give a lot of flexibility, and by using the shared embedded constant strings, the linkage is not too bad.
R=karlklose@google.com
Review URL: https://codereview.chromium.org//804423003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42437 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 15:17:58 +00:00
floitsch@google.com
b3a6035ebc
dart2js: Move type_test_emitter.
...
R=karlklose@google.com , zarah@google.com
Review URL: https://codereview.chromium.org//809483005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42436 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 15:07:53 +00:00
floitsch@google.com
79f0df2cc8
dart2js: put all type-test related properties on the prototype and not on the constructor.
...
R=karlklose@google.com
Committed: https://code.google.com/p/dart/source/detail?r=42392
Reverted: https://code.google.com/p/dart/source/detail?r=42408
Review URL: https://codereview.chromium.org//802653005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42435 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 15:05:15 +00:00
karlklose@google.com
da140779fa
Fix a type annotation.
...
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//816463002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42434 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 14:56:12 +00:00
karlklose@google.com
192b33e17a
Fix a merge error that was included in r42429.
...
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//812803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42431 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-17 14:42:28 +00:00