Commit Graph

12621 Commits

Author SHA1 Message Date
Asger Feldthaus fb0330df46 dart2js cps: Improve constant folding of equality operators.
Previously we would only fold comparisons between primitive constants, missing out on e.g. the list sentinel comparisons.

BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1583993005 .
2016-01-14 14:01:20 -08:00
Asger Feldthaus 1b9a7e0be5 dart2js cps: Avoid comparing boolean values to boolean constants.
E.g. (x === true) can be replaced with x if x is a boolean.

Box2D has some code where this happens.

BUG=
R=kmillikin@google.com, sra@google.com

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

Review URL: https://codereview.chromium.org/1588813002 .
2016-01-14 13:01:31 -08:00
Harry Terkelsen ba83822ca3 dart2js: clean up status file
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1589073002 .
2016-01-14 11:19:16 -08:00
Ivan Posva 7b75f2dbb7 - Allow specifying of package: URIs for packageConfig and packageRoot when
spawning a new isolate.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1586653003 .
2016-01-14 08:20:59 -08:00
Lasse R.H. Nielsen 2d44ed69e9 Implement (partially) ?? being compile-time constant in analyzer.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1577293002.
2016-01-14 16:17:52 +01:00
Stephen Adams 5d728e9b6e Add new cps_ir test omitted from last cl
BUG=

Review URL: https://codereview.chromium.org/1589503003 .
2016-01-13 20:19:16 -08:00
Stephen Adams a56036b0a3 Do TypePropagation again after inlining
R=asgerf@google.com

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

Reverted.

Review URL: https://codereview.chromium.org/1560963002 .
2016-01-13 20:03:47 -08:00
Stephen Adams 9db58343b3 dart2js cps: for(;;) is shorter than while(true)
R=asgerf@google.com

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

Reverted.

Review URL: https://codereview.chromium.org/1584693003 .
2016-01-13 12:57:13 -08:00
Paul Berry 51f8e5f82a Verify that import prefixes don't shadow exports.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1585753002 .
2016-01-13 12:45:21 -08:00
Regis Crelier ca1d105c5a Fix finalization of recursive type graph with bounds (issue 25389).
Add regression test.
Rename malformed_error to bound_error.
Fix internal name of bounded type (broken by a previous cl).

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1580643004 .
2016-01-13 11:19:14 -08:00
William Hesse ecd3129c25 Update status for co19 test that times out.
BUG=

Review URL: https://codereview.chromium.org/1582073002 .
2016-01-13 20:12:58 +01:00
Asger Feldthaus b5d2165883 dart2js cps: Update status file.
A test started failing after we changed the hints we set on continuation
parameters.  That should not affect semantics so the failure indicates
something else being wrong.

BUG=

Review URL: https://codereview.chromium.org/1581963003 .
2016-01-13 09:41:56 -08:00
Ivan Posva b508064e9e - Further updates of status files for Dartium.
BUG=

Review URL: https://codereview.chromium.org/1582913002 .
2016-01-13 09:17:17 -08:00
Paul Berry 353661ce57 Test that a deferred import of dart:core is ok.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1583823003 .
2016-01-13 08:24:28 -08:00
Florian Loitsch e775fa0932 Add support for 'dart.library.X' environment variables in dart2js.
R=johnniwinther@google.com, sigurdm@google.com

Committed: https://github.com/dart-lang/sdk/commit/369899c8ffca28f28a1af3cc323d1111c1a4a48a
Reverted: https://github.com/dart-lang/sdk/commit/b80994d6ad63ac30b400590cf51815e862c0e8a1

Review URL: https://codereview.chromium.org/1404183002 .
2016-01-13 16:34:46 +01:00
Lasse R.H. Nielsen f70bef4a2c Support the same parameter key more than once in Uri query parameters.
R=floitsch@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org/1520943002 .
2016-01-13 13:07:18 +01:00
Ivan Posva 8741a8dcda - Update status files.
BUG=

Review URL: https://codereview.chromium.org/1579213003 .
2016-01-13 01:39:40 -08:00
Ivan Posva ca40bd9233 Fix build:
- Update status files.

BUG=

Review URL: https://codereview.chromium.org/1580353002 .
2016-01-12 21:06:27 -08:00
Ivan Posva e33fdfbeef Fix build:
- Adjust dart2js expectations of testing of invalid package specifications.

BUG=

Review URL: https://codereview.chromium.org/1582723002 .
2016-01-12 19:50:23 -08:00
Ivan Posva d3b2afc6e0 Fix static warning in test:
- Remove void type from async function.

BUG=

Review URL: https://codereview.chromium.org/1585503003 .
2016-01-12 19:27:39 -08:00
Ivan Posva cf502e87f4 - Add packages directory missed by .gitignore file.
BUG=

Review URL: https://codereview.chromium.org/1588453002 .
2016-01-12 19:18:11 -08:00
Ivan Posva 6d066c7e53 Add package config support to dart:isolate
- Add "static Future<Uri> get packageRoot;",
  "static Future<Uri> get packageConfig;" and
  "static Future<Uri> resolvePackageUri(Uri packageUri)" to Isolate class.
- Added "Uri packageRoot, Uri packageConfig, bool automaticPackageResolution: false" parameters to spawnUri.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1553233002 .
2016-01-12 18:19:04 -08:00
Harry Terkelsen d4ce7f145d dart2js cps: update status files for passing tests
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/1581813004 .
2016-01-12 17:20:32 -08:00
Ryan Macnak 80702cb272 Fall back to inlining intervals to generate stack traces in --noopt. Inlined frames will lack line and column positions, but they will at least be expanded.
Fix stack traces when visible functions are inlined into an invisible function.

Fix off-by-one expanding inlined functions in the profiler.

BUG=http://dartbug.com/24783
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1582683003 .
2016-01-12 16:45:00 -08:00
Alan Knight 7f80dbbbe1 Revert "Mark supportsPointConversions deprecated and always true rather than testing DOMPoint"
This reverts commit 2dfdfe554e.

BUG=

Review URL: https://codereview.chromium.org/1583673002 .
2016-01-12 16:24:12 -08:00
Asger Feldthaus c85916dedc dart2js cps: Hoist unsafe expressions from loop entry.
Primitives that potentially throw cannot normally be hoisted, but we can
sometimes hoist them anyway if they are at the loop entry.

We now hoist GetLength, GetField, GetIndex, NullCheck, and BoundsCheck.

BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1578963002 .
2016-01-12 15:18:31 -08:00
Asger Feldthaus e6cc028c6f dart2js cps: Preserve parameter hints during eta and beta reductions.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/1582643002 .
2016-01-12 15:12:51 -08:00
Alan Knight 2dd20966d8 Unsuppress test now that Firefox on bots is updated. Bug 23479
BUG=

Review URL: https://codereview.chromium.org/1581833002 .
2016-01-12 13:58:42 -08:00
Alan Knight 2dfdfe554e Mark supportsPointConversions deprecated and always true rather than testing DOMPoint
BUG=

Review URL: https://codereview.chromium.org/1580203002 .
2016-01-12 13:52:38 -08:00
Sigmund Cherem c3b7e13c4c cpsir unittests: move all unittests into individual files and test runners.
Notes: most test code was copied from the original test files. The expectations
in patchset #1 are what we had in the files, expectations in patchset #2 are the
updated expectations.

Here is how the files under tests/compiler/dart2js/cps_ir/ are organized:
  - up_to_date_test.dart: test that checks that your files are up to date, and
    gives you the option to update them.
    - passing "update" as an argument will update all *_test.dart files in
      this folder and "update_all.dart".

  - some_name_N_test.dart: a unit test
    - takes cps_ir/input/some_name_N.dart as input, compiles it, and compares
      the output to cps_ir/expected/some_name_N.js
    - it accepts "update" as a command line argument to update the expectations in place

  - update_all.dart: updates expectations on all tests.

  - runner.dart: imported from all individual tests, basically an adaptation of
    the logic from js_backend_cps_ir.dart.

Test failures indicate how to update them, normally you will run 2 commands:
    up_to_date_test.dart update // to update the list of tests
    update_all.dart             // to update the expectations.

R=asgerf@google.com, kmillikin@google.com

Review URL: https://codereview.chromium.org/1576093003 .
2016-01-12 10:00:47 -08:00
Alan Knight 914bf02cde Switch to using HashChangeEvent constructor instead of initHashChangeEvent
BUG=

Review URL: https://codereview.chromium.org/1582443003 .
2016-01-12 09:42:06 -08:00
Florian Loitsch b80994d6ad Revert "Add support for 'dart.library.X' environment variables in dart2js."
This reverts commit 369899c8ff.

Review URL: https://codereview.chromium.org/1573243004 .
2016-01-12 14:41:00 +01:00
Florian Loitsch 369899c8ff Add support for 'dart.library.X' environment variables in dart2js.
R=johnniwinther@google.com, sigurdm@google.com

Review URL: https://codereview.chromium.org/1404183002 .
2016-01-12 13:58:46 +01:00
Lasse R.H. Nielsen fd59c87146 Make ?? a compile-time constant operator.
Update specification, change analyzer, VM and dart2js.

Fixes issue #25054.
BUG= http://dartbug.com/25054
R=floitsch@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org/1493693002 .
2016-01-12 12:30:07 +01:00
Stephen Adams a23c0c2fb5 Triage a few cps-ir failures
Added similar tests that don't rely on instances of List<T> carrying T.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1575273002 .
2016-01-11 18:51:57 -08:00
Zachary Anderson cbc4f025d7 Update status file for timing-out tests on windows.
R=asiva@google.com

Review URL: https://codereview.chromium.org/1575233002 .
2016-01-11 15:41:40 -08:00
Natalie Weizenbaum b33dcfdaad Remove the Dromaeo and TodoMVC samples.
No one was maintaining or using these, and they were stale to the point
that they were breaking pkgbuild tests because their dependencies
weren't compatible with the latest SDK.

This also removes tools/testing/perf_testing, which only tested these
two samples.

R=kevmoo@google.com

Review URL: https://codereview.chromium.org/1576153002 .
2016-01-11 13:09:26 -08:00
Sigmund Cherem 480193ec3a cpsir: mark unit test as slow
BUG=

Review URL: https://codereview.chromium.org/1577993002 .
2016-01-11 13:00:14 -08:00
Sigmund Cherem 0f626270ad cps_ir: add refinement on "success" arguments for a set of whitelisted methods
and operators.

R=asgerf@google.com

Review URL: https://codereview.chromium.org/1571953002 .
2016-01-11 10:48:14 -08:00
Johnni Winther 2ddf46bb85 Add EnumSet.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1568213003.
2016-01-11 11:29:44 +01:00
Asger Feldthaus e87b055c4e dart2js cps: Update status file.
BUG=

Review URL: https://codereview.chromium.org/1566423004 .
2016-01-08 15:26:55 -08:00
Lasse R.H. Nielsen 8487d57e48 Add Future.any and Stream.fromFutures.
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1563223002 .
2016-01-08 10:17:34 +01:00
Matthias Hausner 37ab1a9c7c Exclude faulty co19 tests
BUG=https://github.com/dart-lang/co19/issues/18
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1570453003 .
2016-01-07 13:41:41 -08:00
Asger Feldthaus e876b9aba9 dart2js cps: Update status files.
BUG=

Review URL: https://codereview.chromium.org/1563183005 .
2016-01-07 12:07:25 -08:00
Johnni Winther c6f0d75d81 Specialize message for parts as entry point
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1564803002.
2016-01-07 09:50:49 +01:00
Søren Gjesse eaf75a100e HeaderValues: Handle all parameters without values.
Some cases, an HttpHeader Value may contain all parameters and
no values. This changes ensures that such a header is parsed, that
it is handled correctly.

This was noticed when parsing the following header for websockets:
Sec-WebSocket-Extensions: permessage-deflate; client_no_context_takeover; client_max_window_bits; server_no_context_takeover

It was parsing with the value permessage-deflate (correct) with parameters:
{'client_no_context_takeover;' : 'client_max_window_bits',
'server_no_context_takeover' : null }

With this patch it now properly shows the parameters as:
{'client_no_context_takeover' : null,
'client_max_window_bits' : null,
'server_no_context_takeover' : null }

I've also included a test for this as well.

BUG=

Patch by Matthew Butler <butler.matthew@gmail.com>.

Review URL: https://codereview.chromium.org/1564913002 .
2016-01-07 09:03:53 +01:00
Asger Feldthaus d2a6980c1c dart2js cps: Generate increment and compound operators.
Expressions like `i = i + E` now become `i += E` or `++i` if E=1.

The same applies for field and index access.

BUG=
R=sigmund@google.com, sra@google.com

Review URL: https://codereview.chromium.org/1562893002 .
2016-01-06 16:56:33 -08:00
Asger Feldthaus bb129a2d07 dart2js cps: Disable units tests that check the exact compiler output.
These were sort of useful, but are way too expensive to maintain and
have broken the build bots way more often than they have uncovered bugs.

If we want to monitor the concrete compiler output we should build real
tools for that.  They are not unit tests.

BUG=

Review URL: https://codereview.chromium.org/1562263002 .
2016-01-06 16:47:48 -08:00
Asger Feldthaus eadb59e4c1 dart2js cps: Eliminate unary string concatenation.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/1563983002 .
2016-01-06 16:18:00 -08:00
Kevin Millikin 47461f8d2c dart2js Rebase a compiler test whose output has changed.
We are not currently inlining some list printing methods that contain
try/catch.

TBR=sra@google.com
BUG=

Review URL: https://codereview.chromium.org/1563883004 .
2016-01-07 00:01:11 +01:00