karlklose@google.com
263d7f3874
Share the JavaScript based LinkedHashMap implementation between constant maps and the LinkedHashMap patch.
...
This fixes performance a performance issue with using enums, because their backing map required runtime type information before (due to a lack of precision on the analysis of factory constructors).
R=johnniwinther@google.com
bug= dartbug.com/22495
Review URL: https://codereview.chromium.org//949733003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43984 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 11:12:54 +00:00
zarah@google.com
3927b11265
Initialize "next" variable in async rewrite whenever there is a finally.
...
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//948353002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43983 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 10:42:52 +00:00
floitsch@google.com
6147a54e87
Revert "dart2js: Avoid escaping in strings if it's not necessary."
...
This reverts commit r43979.
Review URL: https://codereview.chromium.org//955613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43981 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 10:37:29 +00:00
floitsch@google.com
0dfaae2f07
dart2js: Better big-number shortening.
...
R=sra@google.com
Review URL: https://codereview.chromium.org//938323003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43980 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 10:22:14 +00:00
floitsch@google.com
45bc3c917c
dart2js: Avoid escaping in strings if it's not necessary.
...
BUG= http://dartbug.com/22145
R=johnniwinther@google.com , lrn@google.com , sra@google.com
Committed: https://code.google.com/p/dart/source/detail?r=43967
Reverted: https://code.google.com/p/dart/source/detail?r=43969
Review URL: https://codereview.chromium.org//930263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43979 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-24 09:50:09 +00:00
floitsch@google.com
a2babb87a7
Revert "dart2js: Avoid escaping in strings if it's not necessary."
...
This reverts commit r43967.
Review URL: https://codereview.chromium.org//952643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43969 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 18:42:50 +00:00
floitsch@google.com
543b359beb
dart2js: Avoid escaping in strings if it's not necessary.
...
BUG= http://dartbug.com/22145
R=johnniwinther@google.com , lrn@google.com , sra@google.com
Review URL: https://codereview.chromium.org//930263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43967 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 18:36:55 +00:00
floitsch@google.com
61bd144f76
Revert "Avoid printing braces for one-statement blocks in js-printer."
...
This reverts commit r43956.
Review URL: https://codereview.chromium.org//954493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43964 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 17:19:14 +00:00
floitsch@google.com
33896aef2d
dart2js: Don't emit fields that are named "eval" or "arguments".
...
R=zarah@google.com
Review URL: https://codereview.chromium.org//929503004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43961 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 16:24:53 +00:00
ahe@google.com
560747e2c9
Work around Safari for-in bug.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//938413002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43959 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 15:39:40 +00:00
sigurdm@google.com
69c64615f9
Avoid printing braces for one-statement blocks in js-printer.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//949753004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43956 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 14:50:57 +00:00
zarah@google.com
a0d0b963ae
Initialize "nextWhenCanceled" variable in async rewrite.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//950823003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43955 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 13:39:52 +00:00
asgerf@google.com
3d1bb0bbec
Propagate pseudo-constants expressions separately in tree rewriter.
...
Two constants would fail to swap places even though there clearly is no
danger of swapping side effects. Moreover, a constant would prevent other
expressions from propagating.
Example:
var z = foo();
var y = 1;
bar('x', y, z); // neither foo() or 1 propagates past 'x'
This change may be made redundant in the future by a more sophisticated
side-effect analysis.
But for now, it helps debugging since the code is more readable and
it's easier to see if other rewritings are working when they are not
blocked by redundant variable assignments.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//918653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43953 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 12:57:34 +00:00
zarah@google.com
4fd3777f74
dart2js: remove optimization when computing required type checks.
...
R=floitsch@google.com , herhut@google.com
Review URL: https://codereview.chromium.org//942063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43950 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 11:46:01 +00:00
asgerf@google.com
3275d74ffe
cps2js: Clean up some obsolete TODOs.
...
Also added DartSpecificNode interface for CPS and tree nodes that are
specific to the Dart backend.
BUG=
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//920703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43949 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 11:35:17 +00:00
asgerf@google.com
23f8f67f36
cps2js: Fix translation of captured 'this'.
...
Building the constructor call for a closure that captures 'this' would
fail because the ThisLocal is not bound in the enclosing environment.
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//916403002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43945 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 09:38:14 +00:00
karlklose@google.com
f43854ff8b
Revert "Use an enum in embedded_names as input to JS_GET_NAME."
...
This reverts commit r43869.
BUG= http://dartbug.com/22495
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//944423002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43943 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-23 08:29:40 +00:00
floitsch@google.com
cef3704d8e
dart2js: don't emit big integers as integer, but instead use their exponential representation.
...
BUG= http://dartbug.com/16600
R=herhut@google.com
Review URL: https://codereview.chromium.org//944863002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43913 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 14:29:46 +00:00
johnniwinther@google.com
44bcb14217
Small fixes in preparation for SemanticVisitor.
...
BUG=http://dartbug.com/20377
R=karlklose@google.com
Review URL: https://codereview.chromium.org//938173004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43912 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 14:25:12 +00:00
zarah@google.com
429e0f049a
dart2js: add function type to the model.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//940053002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43911 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 14:03:46 +00:00
herhut@google.com
cbde4578af
Fix Function.apply for static functions in new emitter.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//932523004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43910 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 12:47:06 +00:00
asgerf@google.com
917f9cb813
Handle super calls to fields or getters that look like method calls.
...
These are of form:
class A {
get foo => {..}
}
class B extends A {
m() {
super.foo(1, 2, 3);
}
}
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//913213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43909 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 12:01:58 +00:00
herhut@google.com
be3c508ffd
Fix type propagation for and operator.
...
BUG= http://dartbug.com/22427
R=floitsch@google.com
Review URL: https://codereview.chromium.org//941293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43908 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 11:49:10 +00:00
johnniwinther@google.com
78e30804e8
Make enum a keyword in dart2js.
...
BUG=http://dartbug.com/22478
R=floitsch@google.com
Review URL: https://codereview.chromium.org//944813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43906 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 10:54:48 +00:00
floitsch@google.com
27a30ee1de
dart2js: Support isDeferred on DependencyMirrors.
...
BUG= http://dartbug.com/22475
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//924393003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43905 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 10:37:44 +00:00
floitsch@google.com
5230b1a673
dart2js: only allocate one closure in 'setupClass' of the new emitter.
...
R=zarah@google.com
Review URL: https://codereview.chromium.org//939753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43901 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 09:10:14 +00:00
floitsch@google.com
0deab36c67
dart2js: Don't show "--enable-concrete-type-inference" in help.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//940713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43900 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 09:07:32 +00:00
sra@google.com
2602413b00
Fix for dart2js codegen issue 22487
...
R=herhut@google.com
Review URL: https://codereview.chromium.org//932363002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43887 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 19:04:41 +00:00
ahe@google.com
84ef02af67
Revert "Remove implicit dependencies."
...
This reverts r43874.
Revert "Register literals through backend."
This reverts r43876.
FAILED: dart2js-d8-checked release_ia32 utils/source_mirrors_test
out/ReleaseIA32/dart-sdk/lib/_internal/compiler/js_lib/preambles/d8.js:263: Uncaught Error: Invalid argument(s): "_Proxy" is a private identifier
Stack Trace:
Error
at dart.wrapException (/mnt/data/b/build/slave/dart2js-linux-release-checked-1-5-be/build/dart/out/ReleaseIA32/generated_compilations/dart2js-checked-sdk/tests_utils_source_mirrors_test/out.js:2990:15)
at dart.Symbol0.static.Symbol_validatePublicSymbol (/mnt/data/b/build/slave/dart2js-linux-release-checked-1-5-be/build/dart/out/ReleaseIA32/generated_compilations/dart2js-checked-sdk/tests_utils_source_mirrors_test/out.js:11047:19)
That is, attempting to create a symbol for _Proxy, which is something I did change.
Also, many dart2dart fails with errors like this:
Internal Error: Function signature has not been computed for function(Symbol#).
const factory Symbol(String name) = internal.Symbol;
^^^^^^
Also something that I changed.
Review URL: https://codereview.chromium.org//918893003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43878 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 15:31:39 +00:00
ahe@google.com
d9f2ea18a9
Register literals through backend.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//935033005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43876 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 13:54:25 +00:00
ahe@google.com
b3f2d3be1f
Remove implicit dependencies.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//930143002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43874 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 13:31:37 +00:00
herhut@google.com
f4ffcd1c4b
Use an enum in embedded_names as input to JS_GET_NAME.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//929313002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43869 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 10:28:23 +00:00
sigurdm@google.com
1227ed3eb9
Move the try-catch out of the async-function
...
V8 will not optimize bodies surrounded by try/catch. So it is moved to
js_helper.
To be applied on top of https://codereview.chromium.org/932053002/ .
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//926553005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43868 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 09:21:11 +00:00
sigurdm@google.com
6ff10c59a9
Support for interpolated declarations in the js parser.
...
Also use this support to avoid non-constant templates in async_rewrite.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//932053002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43837 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 13:00:41 +00:00
herhut@google.com
38512aca1b
Make value range analysis tolerate erroneous length expressions.
...
BUG= http://dartbug.com/21166
R=floitsch@google.com
Review URL: https://codereview.chromium.org//936483004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43836 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 12:11:58 +00:00
sigurdm@google.com
3ae9ac92c5
Fix error handling in dart2js async-await
...
BUG= dartbug.com/22372
R=floitsch@google.com
Review URL: https://codereview.chromium.org//925973002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43812 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 14:51:49 +00:00
herhut@google.com
da95947849
Make [EnumClassElement.enumValues] a [List].
...
BUG=
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//935613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43811 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 14:28:53 +00:00
herhut@google.com
f59c01304e
Implement Function.apply in the new emitter.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//928203003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43807 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 11:47:49 +00:00
floitsch@google.com
11cbcf647b
Avoid spurious "The compiler crashed" messages in batch mode.
...
BUG= http://dartbug.com/21926
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//923103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43799 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 11:52:29 +00:00
floitsch@google.com
a2bf14ba1d
Support @NoInlining in the ssa-builder.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//912223003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43798 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 11:50:37 +00:00
floitsch@google.com
2ffa638e82
dart2js: fix dart2js crash when getRuntimeTypeArgument was not registered.
...
R=johnniwinther@google.com , karlklose@google.com
Review URL: https://codereview.chromium.org//923113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43797 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 11:48:17 +00:00
zarah@google.com
ffc1bc179b
dart2js: register holder of constant in initial value of a static field.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//916413002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43796 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 11:05:30 +00:00
floitsch@google.com
a42251a060
dart2js: Track holders better when they are deferred.
...
R=zarah@google.com
Review URL: https://codereview.chromium.org//915043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43795 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 09:08:32 +00:00
floitsch@google.com
8a095c944b
dart2js: remove (broken) support for nsm on native classes.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//897243003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43759 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 14:20:28 +00:00
zarah@google.com
b79f2ac673
Initialize 'next' variable in async rewrite when using yield in finally blocks.
...
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//926433003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43758 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 14:11:48 +00:00
johnniwinther@google.com
1ea67720a6
Refactor SourceFile, SourceFileProvider and SourceLocation.
...
Main changes in:
pkg/compiler/lib/src/io/source_file.dart
pkg/compiler/lib/src/io/source_information.dart
pkg/compiler/lib/src/source_file_provider.dart
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//925943002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43756 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 14:02:32 +00:00
zarah@google.com
d2babfdb91
dart2js: add special getter to Closure class in new emitter.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//923463002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43753 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 13:03:03 +00:00
sra@google.com
58613e8885
Revert "dart2js: Refactoring, documentation, and a few bugfixes in Namer class."
...
I'm reverting this CL because it leaves so many bots red.
You should be able to create a branhc, revert this CL, upload, fix the problem, upload again and get a code review of the fixes without the reviewer needing to review the whole CL, just the delta.
These tests fail (many browser bots are red since they run the same test):
python tools/test.py -mrelease -cdart2js -rff --use-sdk --write-debug-log --write-test-outcome-log --clear_browser_cache --dart2js-batch -t60 html/custom_element_method_clash_test
python tools/test.py -mrelease -rdrt --use-sdk --write-debug-log --write-test-outcome-log --clear_browser_cache --checked -t240 try/web/incremental_compilation_update_test
TBR=asgerf@google.com
Review URL: https://codereview.chromium.org//917083003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43739 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 20:33:28 +00:00
asgerf@google.com
abc37952d4
dart2js: Refactoring, documentation, and a few bugfixes in Namer class.
...
See long doc comment in namer.dart.
BUG=
R=floitsch@google.com
Committed: https://code.google.com/p/dart/source/detail?r=43588
Reverted: https://code.google.com/p/dart/source/detail?r=43590
Review URL: https://codereview.chromium.org//891673003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43724 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 13:43:25 +00:00
sigurdm@google.com
4f0f538076
Let the CPS ir builder bail out when given a non-sync function.
...
BUG=
R=johnniwinther@google.com , karlklose@google.com
Review URL: https://codereview.chromium.org//912293004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43720 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 09:47:48 +00:00