Commit Graph

1015 Commits

Author SHA1 Message Date
Kevin Millikin fd9603d1d2 dart2js CPS: implement special handling of the Symbol constructor.
There is a 'const' Symbol constructor that is not expressible as a Dart
const constructor because it performs validation of its input.  This is
implemented in the libraries by using a dummy const constructor definition
that does not validate its input and replacing calls to 'new Symbol' with
calls to 'new Symbol.validated' in the compiler.

Without replacing calls to 'new Symbol', the non-validating dummy
implementation will be used, which is not correct.

Closes #24878.

R=asgerf@google.com
BUG=https://github.com/dart-lang/sdk/issues/24878

Review URL: https://codereview.chromium.org/1639313002 .
2016-01-28 08:55:35 +01:00
Stephen Adams 1673a64849 Add type info to JSArray.
JSArray<E>.typed has a specially generated body. We should be able to inline this. This makes all of the "new List.xxx()" paths work.

Literal lists are treated like maps - we generate a call to JSArray<E>.typed.  I need to change that to JSArray<E>.markGrowable.

R=asgerf@google.com

Review URL: https://codereview.chromium.org/1642493002 .
2016-01-27 13:47:12 -08:00
Lasse R.H. Nielsen 75d1366dbd Use WeakMap to support Expando if available.
Retains the existing code as fallback for settings without WeakMap for now.

Fixes issue #5144

BUG= http://dartbug.com/5144
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1599393003 .
2016-01-25 12:06:06 +01:00
Stephen Adams 33ac12a5a4 Lower map literals to constructor or function calls in builder
Remove LiteralMap from cps_ir and tree_ir.

R=asgerf@google.com

Review URL: https://codereview.chromium.org/1616143003 .
2016-01-21 19:32:13 -08:00
Stephen Adams 7d3b6b1827 Triage 3 cps_ir tests
TBR=sigmund@google.com

Review URL: https://codereview.chromium.org/1617973002 .
2016-01-21 10:56:47 -08: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
Stephen Adams 4fc394c96d js_runtime: streamline stringReplaceAllUnchecked
Use a literal RegExp to avoid creating new uncompiled RegExp each time.

R=floitsch@google.com

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

Reverted: https://github.com/dart-lang/sdk/commit/0d23ec2f7a7f2c1b5a0250de6bdd6e48aeace42d

Review URL: https://codereview.chromium.org/1557673002 .
2016-01-05 13:37:20 -08:00
Stephen Adams 0d23ec2f7a Revert "js_runtime: streamline stringReplaceAllUnchecked"
I missed a use of the REGEXP in another file.
I will recommit with the REGEXP replaced with a function.

Review URL: https://codereview.chromium.org/1559953002 .
2016-01-04 09:29:29 -08:00
Stephen Adams be1b32207b js_runtime: streamline stringReplaceAllUnchecked
Use a literal RegExp to avoid creating new uncompiled RegExp each time.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/1557673002 .
2016-01-04 08:26:01 -08:00
Ryan Macnak 6b964b83ac Add ./tools/test.py -c precompiler -r dart_precompiled.
- Make --gen/run-precompiled-snapshot take a directory to use for the snapshot pieces.
 - Throw on Platform.executeable to prevent tests from becoming fork-bombs.
 - Update status files so 'dart_precompiled' is generally expected to behave the same as 'vm'.

Currently multitests will fail unless run with --jobs=1 because the test harness assigns them the same temporary directory.

Running this also requires a great deal of space. My out directory is 380G.

BUG=http://dartbug.com/24975
R=fschneider@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org/1507943002 .
2015-12-18 12:08:10 -08:00
William Hesse 6485590527 Remove old java-based analyzer from test scripts and status files
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1537653002 .
2015-12-17 14:44:57 +01:00
Ryan Macnak d71b98cfe7 Further triage --noopt failures.
- Explain slow bigint tests.
 - Note that deferred loading tests are failing for a valid reason.

BUG=http://dartbug.com/24676
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1531903002 .
2015-12-16 16:24:36 -08:00
Stephen Adams 5d74a7a958 Upgrade confuse() function in corelib tests
TBD=floitsch@google.com

Review URL: https://codereview.chromium.org/1513373002 .
2015-12-10 12:59:31 -08:00
Florian Loitsch c95b4e46ff Enable more DateTime tests on dart2js.
Review URL: https://codereview.chromium.org/1520613002 .
2015-12-10 19:49:30 +01:00
Lasse R.H. Nielsen fa025f3337 Make int_parse_radix_test run ~30% faster.
BUG= https://github.com/dart-lang/fletch/issues/46
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1510843002 .
2015-12-10 11:06:20 +01:00
Florian Loitsch 581392cf17 Fix datetime test.
R=lrn@google.com

Review URL: https://codereview.chromium.org/1511773003 .
2015-12-09 20:24:40 +01:00
Florian Loitsch db643f5ae2 Fix datetime test.
Review URL: https://codereview.chromium.org/1514483003 .
2015-12-09 02:57:05 +01:00
Florian Loitsch 6c84c42e67 Add microsecond support to DateTime.
R=iposva@google.com, lrn@google.com

Review URL: https://codereview.chromium.org/1493033003 .
2015-12-09 00:46:46 +01:00
Lasse R.H. Nielsen 027b8dca39 Add StackTrace.current getter.
R=floitsch@google.com, iposva@google.com, sra@google.com

Review URL: https://codereview.chromium.org/1448003002.
2015-11-24 08:26:03 +01:00
Karl Klose b0b841d976 corelib: Do not print value in ArgumentError.notNull
R=lrn@google.com

Review URL: https://codereview.chromium.org/1460903003 .
2015-11-23 12:25:58 +01:00
Lasse R.H. Nielsen 50aa43569d Add "growable" parameter to List.filled constructor.
Fixes issue #24884
BUG= http://dartbug.com/24884
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1440663003 .
2015-11-13 09:30:46 +01:00
Lasse R.H. Nielsen ed0b187d58 Add data-URI support class to dart:core (next to Uri).
R=floitsch@google.com, fschneider@google.com

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

Review URL: https://codereview.chromium.org/1381033002 .
2015-11-12 13:02:20 +01:00
William Hesse df5ef1b136 Revert "Add data-URI support class to dart:core (next to Uri)."
This reverts commit bbc66c2c41.

BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org/1432203002 .
2015-11-11 11:42:04 +01:00
Kevin Millikin d20d3f6419 dart2js CPS: Triage an issue in the corelib tests.
R=asgerf@google.com
BUG=https://github.com/dart-lang/sdk/issues/24878

Review URL: https://codereview.chromium.org/1434933002 .
2015-11-11 11:32:49 +01:00
Lasse R.H. Nielsen bbc66c2c41 Add data-URI support class to dart:core (next to Uri).
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1381033002 .
2015-11-11 10:27:08 +01:00
Ryan Macnak 371a5dc932 Get tools/test.py --noopt green.
More specifically ./tools/test.py --noopt -mall -ax64,simarm,simarm64,simmips --exclude-suite=pkg

 - Add missing dart:io entry point.
 - Add checks that Dart_FinalizeLoading, Dart_Precompile, Dart_CreatePrecompiledSnapshot are called in order.
 - Add checks for --precompilation flag.
 - Add checks for dropped class in Dart_New/Allocate/AllocateWithNativeFields.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1407393005 .
2015-10-21 10:35:01 -07:00
Lasse R.H. Nielsen a8e3eb4e10 Fix bug in Uri.removeFragment.
It used the external getters for the existing port and query, which
are non-null even when the port or query are absent. This introduced
a new default-valued/empty part.

Also reordered declarations to have fields > constructors > rest.

Fixes issue #24593
BUG= http://dartbug.com/24593
R=asgerf@google.com

Review URL: https://codereview.chromium.org/1396973004.
2015-10-15 12:42:36 +02:00
Asger Feldthaus a50105543f dart2js cps: Add a pass for eliminating bounds checks.
The analysis uses a watered-down octagon domain which reduces range
analysis to a graph problem.

There are more ideas to try out to improve on this, but I think this is
a nice baseline to work from.

BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//1353443002 .
2015-10-13 16:40:54 +02:00
Asger Feldthaus f1a40e23c1 dart2js cps: Status updates and minor fixes for host checked mode.
CPS should now run the test suite cleanly in host-checked mode. Let's keep it that way.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1377323003 .
2015-10-02 15:36:21 +02:00
Lasse R.H. Nielsen 4e94938f7e Fix some cases where Map.containsValue did not accept Object as argument.
Add tests.
Also remove a left-over check in SplayTreeMap.

BUG= https://github.com/dart-lang/dev_compiler/issues/344
R=wibling@google.com

Review URL: https://codereview.chromium.org//1360053003 .
2015-09-23 11:26:55 +02:00
Lasse R.H. Nielsen d755dd65b9 Update range errors to agree on the numbers.
Also ensure that typed-data errors are consistent with other lists.

Fixes issue #24295
BUG= http://dartbug.com/24295
R=floitsch@google.com, iposva@google.com, sra@google.com

Review URL: https://codereview.chromium.org//1318943005 .
2015-09-11 13:05:36 +02:00
Karl Klose d9caf4a725 Move cps-ir section to the end of the file and update test expectations.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1312583008 .
2015-09-07 15:37:39 +02:00
Mads Ager 7ae093a3b8 Split double_parse_test into more multitests.
The 03 multitest cases are the ones that fail on arm using the
system strtod. Separating them out makes it easier to do suppresions
of only the parts of the tests that fail in a given configuration.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1312903010 .
2015-09-01 16:27:01 +02:00
Mads Ager bb25ca8215 Update jsshell expectations for double parsing now that the problematic cases are separated out.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1313333003 .
2015-09-01 12:09:17 +02:00
Mads Ager bb8ca393e1 Split two string to double corner cases into a separate multitest.
When using a simpler version of the doubleconversion library that
uses the system strtod to parse strings these cases fail on MacOS.
Splitting them out allows us to mark only these corner cases as
failing on MacOS.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1312893007 .
2015-09-01 10:20:04 +02:00
Asger Feldthaus 0216e21efc dart2js cps: Use 'this' instead of receiver-arg when possible.
This fixes a bug in how intercepted super calls were handled,
and enables the redundant receiver optimization.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1312393002 .
2015-08-26 16:06:41 +02:00
Harry Terkelsen bc0deb66d7 dart2js: fetch http Resources
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1308143002 .
2015-08-25 10:46:27 -07:00
Karl Klose 6820b95c1c dart2js cps: update test expectations.
TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//1303333003 .
2015-08-24 10:59:15 +02:00
Asger Feldthaus 689ea4f24a dart2js: Update status files.
dart2js/http_test passes when run in isolation, but always times out
on my machine when run in a large batch. I marked it as slow in
unchecked mode (was already marked as slow in checked mode).

Some timeouts that were fixed in dart2js cps but somehow were added to
the status file again.

Some tests in corelib fail in CPS.

BUG=

Review URL: https://codereview.chromium.org//1292223003 .
2015-08-18 10:35:47 +02:00
Lasse R.H. Nielsen 1b8f3fba14 Make List constructor give better error messages for non-int arguments
BUG= http://dartbug.com/15986
R=herhut@google.com, iposva@google.com, sra@google.com

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

Review URL: https://codereview.chromium.org//1214723009 .
2015-08-17 13:01:13 +02:00
Lasse R.H. Nielsen 51fa195f16 Revert "Make List constructor give better error messages for non-int arguments"
There are VM-only tests that assume exact text of failure.

BUG=

Review URL: https://codereview.chromium.org//1294483003 .
2015-08-14 15:05:17 +02:00
Lasse R.H. Nielsen 33c7663826 Make List constructor give better error messages for non-int arguments
BUG= http://dartbug.com/15986
R=herhut@google.com, iposva@google.com, sra@google.com

Review URL: https://codereview.chromium.org//1214723009 .
2015-08-14 13:44:19 +02:00
Lasse R.H. Nielsen 8301c6e7b2 Don't expect analyzer to fail resource tests.
Also make package have `publish_to:"none"` on pubspec.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1286713002 .
2015-08-11 11:35:36 +02:00
Lasse R.H. Nielsen c26095b1b3 Add resource tests.
R=sgjesse@google.com, whesse@google.com

Review URL: https://codereview.chromium.org//1276263002 .
2015-08-11 10:07:10 +02:00
Karl Klose 7eb3bb82b7 dart2js cps: update test expectations for new tests.
TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//1280603003 .
2015-08-07 08:36:47 +02:00
Johnni Winther 783ed933ff Fix boolean conversion bug in dart2js + update JSRegExp accordingly.
BUG=
R=herhut@google.com

Review URL: https://codereview.chromium.org//1259473005.
2015-07-27 14:19:26 +02:00
Asger Feldthaus 7d8067135c dart2js cps: Support 'on T' clauses without a 'catch'.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1247333003.
2015-07-23 12:39:10 +02:00
Karl Klose 1b7053bcf6 dart2js cps: Use CPS IR for patched functions and typed data.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1241303003 .
2015-07-22 13:07:35 +02:00
Lasse R.H. Nielsen 848f6c978c Do "path normalization" when creating a URI.
Path normaliztion removes '.' and '..' segments from a URI. Such relative references are only intended for URI References, and Uri References are only intended for resolving against a full URI.

We do path normalization on all URIs that have a scheme, authority or an absolute path, and partial normalization on what are really just relative paths. The partial normalization can leave ".." at the start of the path.

The URI reference resolution algorithm doesn't work as expected for a URI ending in "..". Resolving "./foo" wrt. a base of "/a/.." results in  "/a/foo" - this is avoided when the base is path normalized before it's used.

This also fixes the "normalizePath" function which currently removes leading '..' segments, contrary to its documentation. It also makes the function redundant since all URI paths are normalized automatically.

See discussion on http://dartbug.com/23688

Also fix bug in the removeDotSegments function.

R=floitsch@google.com

Review URL: https://codereview.chromium.org//1224263009.
2015-07-17 17:08:36 +02:00
Karl Klose 04dacd24f4 Remove functions white-listed for use of try-finally and switch, add JS_SET_CURRENT_ISOLATE.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1237573002 .
2015-07-14 10:26:38 +02:00