Commit Graph

1405 Commits

Author SHA1 Message Date
herhut@google.com 075cd1c904 Extend closure tracer to also trace dynamic tear offs and use the result to identify closures that might be passed to Function.apply
BUG=
R=floitsch@google.com

Committed: https://code.google.com/p/dart/source/detail?r=35057
Reverted: https://code.google.com/p/dart/source/detail?r=35062

Review URL: https://codereview.chromium.org//223403003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35518 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 09:46:07 +00:00
ahe@google.com 80238d2c62 Don't use fatal errors in message_kind_test.dart.
BUG=http://dartbug.com/18363
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//246733004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35422 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 12:53:44 +00:00
asgerf@google.com 402931f341 dart2dart backend: AST and unparser for backend.
Note that the AST and unparser are not yet integrated with the actual code generation.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//250523003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35421 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 12:35:35 +00:00
ahe@google.com 740542e755 Complain if there are pending classes.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//233353002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35420 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 09:11:49 +00:00
herhut@google.com 16e142f117 Always treat [call] members as closures during tracing.
BUG= http://dartbug.com/18383
R=sra@google.com

Review URL: https://codereview.chromium.org//250553004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35417 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 06:49:41 +00:00
ahe@google.com 579d8aaaae Change ErrorNode to masquerade as a null literal.
BUG=http://dartbug.com/18072
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//246963005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35388 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 18:13:34 +00:00
ahe@google.com 4efb06b55c Improve error-recovery from unmatched braces.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//251523002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35372 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 14:48:02 +00:00
lrn@google.com 2a93b93c1c Remove unmodifiable map wrappers that could instead use UnmodifiableMapView.
R=sgjesse@google.com

Committed: https://code.google.com/p/dart/source/detail?r=35244

Review URL: https://codereview.chromium.org//214723002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35361 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 08:51:41 +00:00
sigurdm@google.com 00910f947b Insert checks before deferred calls and accesses.
These checks will throw an error if the library was not loaded.

R=floitsch@google.com, johnniwinther@google.com

Committed: https://code.google.com/p/dart/source/detail?r=35306

Was reverted by Issue 247863005 r35308 due to failing co19-test

Review URL: https://codereview.chromium.org//232563006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35355 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 07:51:35 +00:00
sigurdm@google.com a31796ed37 Revert "Insert checks before deferred calls and accesses."
This reverts commit r35306.

Review URL: https://codereview.chromium.org//247863005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35308 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 09:23:33 +00:00
sigurdm@google.com 910fffd40d Insert checks before deferred calls and accesses.
These checks will throw an error if the library was not loaded.

R=floitsch@google.com, johnniwinther@google.com

Review URL: https://codereview.chromium.org//232563006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35306 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 07:56:03 +00:00
sra@google.com 8129aff312 Redo "JS templates"
Improve Primitives.objectTypeName

The slightly different layout of the functions (they are now parsed and pretty-printed) confused a heuristic for getting a plausible type name from an arbitrary JS object's constructor function.  Fix is to improve the heuristic.

TBR=floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//248473004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35301 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 04:44:07 +00:00
sra@google.com 5c9f933f2d Revert "JS templates"
TBR=floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//246633006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35299 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 03:41:56 +00:00
sra@google.com 40b540d93c JS templates
This CL mostly removes the 'fluent' API and replaces it with templates.

The JS code is parsed and converted (compiled) into an instantiation function.
The instantation function can be reused to stamp out similar copies.

This has made the large helper functions more readable since they are now mostly real JavaScript code.

Notes:

'if (#) stmt' adds a conditional statement if the argument is a Dart
bool.  It constructs the tree if the argument is a JS Expression.

Fixed the statement template arguments so that '#;' is required.

There is a template manager that reuses templates with the same source.
This is persistent between compilation since the strings should be all 'constant'.

I am currently hunting down the strings parsed by 'js(string)'.
I have reduced it from 18k to O(500) for vampire.
The blocker is the runtime type parameters system - it generates an AST, prints it, and reparses it, giving an unbounded number of small templates, mostly with no parameters.  So these templates are not cached and pay the price of repeated compilation.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//237583014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35296 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 03:30:50 +00:00
sra@google.com 52649a1ebd Redo "Add more MiniJsParser functionality."
BUG=

Review URL: https://codereview.chromium.org//238633007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35137 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-16 22:43:57 +00:00
zarah@google.com 64af980cbf Add index consistency check to source map validation tests.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//232943003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35012 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-14 07:38:35 +00:00
lrn@google.com aa4720eda5 Expect only jsshell fails timer test.
Review URL: https://codereview.chromium.org//228323004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34980 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-11 16:23:50 +00:00
kmillikin@google.com b445b4d6d2 Support local variables in dart2dart.
Other than translating the definitions, local variables are identical
to parameters.

R=karlklose@google.com, floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//231863007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34968 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-11 10:47:14 +00:00
ahe@google.com 46a6b65bef Copy types object when using a cached compiler.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//233233002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34927 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 14:26:19 +00:00
karlklose@google.com 8812723b22 Fix dart2js/identity_test.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//232763003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34918 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 11:48:23 +00:00
sigurdm@google.com dc92146b57 Load deferred chunks in the right order.
A chunk can depend on classes in shared chunks. Therefore sort they are
sorted, and loaded sequentially.

BUG= dartbug.com/17890
R=floitsch@google.com

Committed: https://code.google.com/p/dart/source/detail?r=34698

Reverted: r34702

Review URL: https://codereview.chromium.org//221663005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34915 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 08:48:11 +00:00
lrn@google.com a9765ca50d Increase count of compiled methods for dart2js from 376 to 377.
Review URL: https://codereview.chromium.org//230823002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34876 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 13:10:47 +00:00
zarah@google.com da02c01660 Remove redundancy in source map entries.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//228003005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34866 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 09:49:10 +00:00
johnniwinther@google.com fbe2b8bcc7 Compute frontend/backend specific constants.
BUG=
R=floitsch@google.com, karlklose@google.com

Committed: https://code.google.com/p/dart/source/detail?r=34811

Review URL: https://codereview.chromium.org//221873002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34862 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 07:40:54 +00:00
sra@google.com 200aad53d1 Redo "Construct literal maps using factory constructor."
TBR=floitsch@google.com

Review URL: https://codereview.chromium.org//228293008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34841 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 20:51:47 +00:00
johnniwinther@google.com eb2cc7614b Revert "Compute frontend/backend specific constants."
This reverts commit r34811.

BUG=

Review URL: https://codereview.chromium.org//226953003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34816 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 10:18:09 +00:00
johnniwinther@google.com 33c86b9fcd Compute frontend/backend specific constants.
BUG=
R=floitsch@google.com, karlklose@google.com

Review URL: https://codereview.chromium.org//221873002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34811 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 07:11:45 +00:00
zarah@google.com 0cdd09effa Add test for checking sources in source map file.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//225773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34730 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 11:32:16 +00:00
floitsch@google.com 47a1edad2b Move mirrors-test from dart2js_extra to lib/mirrors.
R=ahe@google.com

Review URL: https://codereview.chromium.org//223673007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34728 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 09:48:31 +00:00
herhut@google.com 4f3939dc5d Allow use of [keys] from a map by using different bailout strategy.
BUG=
R=floitsch@google.com, karlklose@google.com

Review URL: https://codereview.chromium.org//216673003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34726 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 08:06:17 +00:00
karlklose@google.com 6995d6a5b0 Fix dart2js_extra/type_error_message_test work in minified mode.
R=sigurdm@google.com

Review URL: https://codereview.chromium.org//225423002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34724 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 07:50:07 +00:00
sigurdm@google.com 9150d1ce0c Revert "Load deferred chunks in the right order."
This reverts commit 34698.

Review URL: https://codereview.chromium.org//223373004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34702 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 12:47:20 +00:00
sigurdm@google.com 22d8c97cd2 Load deferred chunks in the right order.
A chunk can depend on classes in shared chunks. Therefore sort they are
sorted, and loaded sequentially.

BUG= dartbug.com/17890
R=floitsch@google.com

Review URL: https://codereview.chromium.org//221663005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34698 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 12:15:18 +00:00
sigurdm@google.com 0d8f355788 Improve the mirror support for deferred loading by registering elements only included by mirror-usage seperately.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//220203004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34685 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 08:01:17 +00:00
kmillikin@google.com 308b898f93 Update an out-of-date test.
Update a test that checks text expectations for dart2dart.

R=floitsch@google.com
BUG=

Review URL: https://codereview.chromium.org//222203002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34645 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 14:02:13 +00:00
zarah@google.com 751c19f655 Add end-to-end test for consistency in source map file and js file.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//219263003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34642 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 09:30:26 +00:00
herhut@google.com 310a2d9b59 Rename [call$...] properties to [$...] in compiled code.
BUG=
R=floitsch@google.com, karlklose@google.com

Committed: https://code.google.com/p/dart/source/detail?r=34294
Reverted: https://code.google.com/p/dart/source/detail?r=34296

Committed: https://code.google.com/p/dart/source/detail?r=34301
Reverted: https://code.google.com/p/dart/source/detail?r=34309

Review URL: https://codereview.chromium.org//208043003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34640 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 08:22:57 +00:00
sra@google.com b3d2c4730e Emit read-modify-write of fields as assignment op.
Best improvements are swarm at 0.32% smaller, DeltaBlue 0.42% smaller; a little over half of that after minification and/or gzip.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//218993003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34614 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 20:10:55 +00:00
floitsch@google.com 4cf0157e5e Allow getField of methods.
BUG= http://dartbug.com/13002
R=karlklose@google.com

Review URL: https://codereview.chromium.org//217963002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34598 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 14:04:49 +00:00
sigurdm@google.com a7cf54b4cf Record the dependency of a implicit constructor to its superclass.
This lets deferred loading find the classes.

BUG= dartbug.com/Issue 17930
R=floitsch@google.com, johnniwinther@google.com

Review URL: https://codereview.chromium.org//219333005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34587 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 08:10:52 +00:00
johnniwinther@google.com c4c8d66a6a Handle cascade in type checker.
BUG=http://dartbug.com/17803
R=karlklose@google.com

Review URL: https://codereview.chromium.org//214673002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34585 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 07:01:18 +00:00
herhut@google.com 7df5c53da8 Fix handling of union on DictionaryTypeMask.
BUG= http://dartbug.com/17856
R=floitsch@google.com

Review URL: https://codereview.chromium.org//212693003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34500 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 12:19:00 +00:00
johnniwinther@google.com 0f0f677890 Add helpers library to dart2js.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//208423012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34410 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 07:31:38 +00:00
ajohnsen@google.com d9df646e1f Mark fake_thing_test as failing again.
BUG=

Review URL: https://codereview.chromium.org//212163002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34407 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 05:49:58 +00:00
sra@google.com 2ac2877336 Redo "Fix for queue closed crash"
BUG=

Review URL: https://codereview.chromium.org//196443005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34381 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 18:54:06 +00:00
sra@google.com cf4e4ce2de Revert "Fix for queue closed crash"
BUG=

Review URL: https://codereview.chromium.org//196443004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34375 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 17:51:35 +00:00
sra@google.com cdb1e37373 Fix for queue closed crash
It is possible for JavaScriptBackend.onQueueEmpty to be called twice, first time with isTreeShakingDisabled false (hence calling Enqueuer.enqueueReflectiveStaticFields), the second time with isTreeShakingDisabled true (hence calling Enqueuer.enqueueEverything).  The crash is caused by using the same flag to avoid repeating work for enqueueReflectiveStaticFields and enqueueEverything.

The fix is to split the flag so we can enqueue statics and later enqueue everything.

R=floitsch@google.com, johnniwinther@google.com

Review URL: https://codereview.chromium.org//206013004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34374 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 17:33:51 +00:00
sra@google.com b9685d70d4 Suppress code_motion_exception_test on platforms with unhelpful messages
Review URL: https://codereview.chromium.org//207543006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34348 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 02:09:29 +00:00
sra@google.com 8d77909581 Test for preservation of exception order with code motion
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//209693002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34344 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 00:53:11 +00:00
floitsch@google.com fec145e8c7 Revert "Fix checkedInstructionOrNonGenerateAtUseSite."
This reverts commit r34325.

Also revert "Update status file.", commit r34327.

Review URL: https://codereview.chromium.org//208263020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34335 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-24 21:51:00 +00:00