Commit Graph

323 Commits

Author SHA1 Message Date
Karl Klose 2a137d16db dart2js cps: Fix performance issues in optimization passes.
Type propagation, shrinking reductions, and let sinking each took
more than 2 minutes on a stress test, where now they take a few
seconds.

Huge hash tables (Map/Set) were a big problem, especially when used as
worklists.

Let sinking had an issue with a linear-time search for the enclosing
continuation of an expression. This has been replaced with a visitor
state.

The stress test was:

  tests/co19/src/LibTest/collection/ListBase/ListBase_class_A01_t02

This was only slow because negative constants get translated to
intercepted calls. That itself should be fixed, but the IR should
still be able to handle the stress.

The change in shrinking reductions altered the redex priority from
FIFO to LIFO which has a negative effect on code quality in
unwrapException (in any test case with a try/catch). It seems like
an existing issue that has surfaced.

Since I am going on vacation, I ask that someone would please
commit this on my behalf (assuming things are looking good).
--asgerf

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1252883003 .
2015-07-27 12:12:06 +02:00
Karl Klose 52f0390b68 dart2js cps: Update test expectations after 6b36c8acc6.
TBR=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1232133002 .
2015-07-10 14:19:10 +02:00
Karl Klose 71e2bec0a5 dart2js cps: Support JS_CURRENT_ISOLATE.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1222913003 .
2015-07-07 15:55:13 +02:00
Kevin Millikin 089ed2965b Implement try/finally by inlining the finally code.
Try/finally is implemented by inlining.  There is a try/catch to catch
exceptions in the try block.  The catch body contains the finally code
followed by a rethrow.  The code for finally is translated again after the
normal exit of the try block.  Break, continue, and return exits in the try
block have the finally code inlined just before the exit is taken.

Try/catch/finally is not yet supported, it requires some changes to the
assigned variables analysis.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1201983002.
2015-06-24 10:12:42 +02:00
Kevin Millikin bf595224d5 Implement simple switch statements as nested if/else.
Simple switch statements that do not have continue to labeled cases
are compiled into a chain if/else comparisons.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1191193005.
2015-06-22 11:29:31 +02:00
Karl Klose 3f46181244 cps-ir: Support foreign code.
R=kmillikin@google.com

Committed: https://github.com/dart-lang/sdk/commit/a120ee7c9071b60edccff066dcdade078f601377

Reverted: https://github.com/dart-lang/sdk/commit/40ed0daaaf71904d2da271e66ba8381ef857116d

Review URL: https://codereview.chromium.org//1185633003.
2015-06-19 13:44:58 +02:00
Karl Klose 40ed0daaaf Revert "cps-ir: Support foreign code."
This reverts commit a120ee7c90.

TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//1196443002.
2015-06-18 13:37:52 +02:00
Karl Klose a120ee7c90 cps-ir: Support foreign code.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1185633003.
2015-06-18 13:09:50 +02:00
Karl Klose bb45376735 Update dart2js-cps_ir status files.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1191433002.
2015-06-15 12:50:58 +02:00
Karl Klose e4b56654ff Update dart2js-cps_ir test expectations with better annotations.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1181613003.
2015-06-11 10:56:56 +02: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
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
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
ricow@google.com e92f697236 Remove dart2dart support from testing scripts and status files
I will leave it to the dart2js people to remove the support from the dart2js tools (there is also a bunch of comments still in code, do a git grep)

R=kustermann@google.com, floitsch@google.com, kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45588 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 11:29:55 +00:00
karlklose@google.com d839c64766 Establish test expectations for dart2js running with the CPS based backend.
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45162 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 11:44:02 +00:00
sigurdm@google.com c8680b6a22 Mark tests that crashes in host-checked mode
BUG=
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44433 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-12 15:25:57 +00:00
karlklose@google.com 3fb9f53b51 Update new dart2dart test expectations.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44362 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 09:34:24 +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
paulberry@google.com dffb8c8a68 Status updates for issue 22475.
TBR=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43843 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 15:18:39 +00:00
kevmoo@google.com 4cc4e28411 status files: trying out new SkipSlow flag
and selectively used SkipByDesign in more places

R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43815 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 17:21:39 +00:00
johnniwinther@google.com 2e253b6b39 Fix await parsing.
BUG=http://dartbug.com/22183
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43398 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 14:20:21 +00:00
whesse@google.com 247ff772d6 Update status files, replace "dartbug.com" with "Issue ".
BUG=
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42900 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 10:27:11 +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
johnniwinther@google.com 09fbe78e71 Move dart2js from sdk/lib/_internal/compiler to pkg/compiler
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41514 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 08:51:01 +00:00
johnniwinther@google.com 8637cfd322 Revert "Move dart2js from sdk/lib/_internal/compiler to pkg/compiler"
This reverts commit r41512.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41513 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 08:15:26 +00:00
johnniwinther@google.com 2b336e17f0 Move dart2js from sdk/lib/_internal/compiler to pkg/compiler
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41512 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 07:09:04 +00:00
ricow@google.com 5e9f1be94c Roll v8 deps to version 3.26.31.10
Remove suppression for source mirrors tests that was flaky before

R=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38057 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-08 12:34:55 +00:00
ricow@google.com 6c25ff971f Mark utils/source_mirrors_test as flaky on dart2js-d8
Filed issue 19874 to track this

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38053 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-08 08:27:05 +00:00
zra@google.com ec903e2d19 Updates status files for content shell on Android.
Review URL: https://codereview.chromium.org//377583002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38026 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 15:59:22 +00:00
johnniwinther@google.com f75df05ddd Add better error reporting to utils tests.
BUG=
R=herhut@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37999 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-04 07:48:08 +00:00
johnniwinther@google.com 13c4a04fff Generate mock libraries and assert that helpers are non-null.
BUG=
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37979 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-03 09:32:55 +00:00
whesse@google.com 5720b9be2c Update Android content_shell test status.
BUG=
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37944 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 12:29:07 +00:00
vsm@google.com 79ac5d3615 Mark tests as passing
These tests are fixed once: https://chromiumcodereview.appspot.com/350653002/
is landed.

BUG=17662
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37641 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-24 07:20:57 +00:00
ahe@google.com 76b86b10b3 Cover all browsers
R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37546 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 12:50:06 +00:00
ahe@google.com d888d146af Fix typo
Review URL: https://codereview.chromium.org//345053003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37544 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 12:41:52 +00:00
ahe@google.com bca9120a04 Update status due to issue 17662.
R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37542 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 12:36:29 +00:00
ahe@google.com 98523c01f8 Update imports to use package:compiler and package:try.
R=floitsch@google.com, johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37538 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 10:33:46 +00:00
johnniwinther@google.com 2422f91c80 Use metadata for patching.
BUG=
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37392 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 13:07:15 +00:00
johnniwinther@google.com 35b9debf90 Remove scanBuiltinLibraries.
BUG=
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37391 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 12:58:39 +00:00
zra@google.com 4a7e022d97 Adds intrinsics for arm64.
Also enables tests that no longer time-out.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36330 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-19 21:35:32 +00:00
zra@google.com 2f7cf531a0 Adds javascript overflow checking to arm64.
Also skips a test for timing out on the bot.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36232 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-15 17:38:13 +00:00
zra@google.com a048bdf09a Skips timing-out test on simarm64.
Review URL: https://codereview.chromium.org//274323003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36179 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 18:00:04 +00:00
zra@google.com 03f2f289b4 Adds Math Min/Max to arm64.
Also fixes bugs and enables tests.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36116 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-13 18:10:16 +00:00
floitsch@google.com 5c7a92fa0a Add missing methods to JSNull.
Review URL: https://codereview.chromium.org//267443005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35588 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 18:48:01 +00:00
floitsch@google.com bcb3c3e8ba Don't hide interceptors in mirrors.
The special code for mirrors was brittle and was the reason for several bugs.

BUG= http://dartbug.com/18076
BUG= http://dartbug.com/15405
BUG= http://dartbug.com/14025
BUG= http://dartbug.com/13842
BUG= http://dartbug.com/16804
BUG= http://dartbug.com/15555
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35586 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 18:21:11 +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
karlklose@google.com e1d588ff6e Fix fyi debug test expectations.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34729 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 10:03:18 +00:00
zra@google.com 2fe51715e5 Begins work on ARM64, first assembler test.
Most new code is in constants_arm64.h and
{assembler,disassembler,simulator}_arm64.{h,cc}

The rest of the CL just #def's out tests, modifies status files,
and adds UNIMPLEMENTED functions, etc.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34654 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 17:39:32 +00:00