Commit Graph

1541 Commits

Author SHA1 Message Date
Lasse R.H. Nielsen d6b01b5028 Fix type-error in base64.dart
Fixes issue #25577.
BUG= http://dartbug.com/25577

Review URL: https://codereview.chromium.org/1630933004.
2016-01-28 13:15:01 +01:00
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
Paul Berry 2858cfd29f Mark #25287 as fixed in the status file
Based on buildbot behavior, bug #25287 appears to have been fixed by
commit ccf3870ffc.  (See
https://build.chromium.org/p/client.dart/builders/analyzer_experimental-linux-release-be/builds/5582/steps/tests%20--host-checked%20--checked/logs/stdio).

This should fix the analyzer buildbot.

TBR=skybrian@google.com

Review URL: https://codereview.chromium.org/1636023002 .
2016-01-26 04:51:16 -08:00
Stephen Adams e3810ceff2 Use existing test for reflectClass(List).createInstance(...)
TBR=asgerf@google.com

Review URL: https://codereview.chromium.org/1632163004 .
2016-01-25 21:58:14 -08:00
Stephen Adams 4a01c6a1cf List constructor sentinel must not implement 'int' (extend JSInt).
Having a regular object that 'is' a number was causing horrible problems for type inference and generated code quality.

To get this to work required fixes in type inference and the collection of reified default argument values.

Fixes issue https://github.com/dart-lang/sdk/issues/25566

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1629553002 .
2016-01-25 20:40:39 -08:00
Zachary Anderson 80f358dede Adds targets for simarmv6 and armv6
related #25562

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1624593002 .
2016-01-22 13:07:48 -08:00
Jacob Richman c1d669131b TBR. Turns out these tests still fail just for a different reason.
BUG=

Review URL: https://codereview.chromium.org/1586133006 .
2016-01-15 14:05:29 -08:00
Stephen Adams d7237c5275 Don't inline methods that only throw.
R=sigmund@google.com

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

Reverted: https://github.com/dart-lang/sdk/commit/890e900c3100daf34e08cba632d277101eec18bc

Review URL: https://codereview.chromium.org/1587053003 .
2016-01-15 11:35:46 -08:00
Jacob Richman cf7ae2e0cb Support JS$ prefix for dart and fix bug where _operator_getter and the [] operator were used inconsistently. Would only impact future use cases where js APIs returned types not auto-proxied with dart:html.
Support typed JS interop classes that extend the behavior of  dart:html types in Dartium.

This theoretically enables supporting package:dom at the same time as dart:html as well as helping with
JavaScript libraries that monkey patch the dom.

Also support JS$ name prefix to resolve name conflicts with dart reserved words and with
dart:html libraries.
Cleanup addEventListener and friends so they are consistent with typed JS Interop and fix
bugs in the unlikely case where multiple functions have the same identity hash.
Add checks to make it easier to catch when allowInterop is accidentally omitted
when using the new typed JavaScript interop. You will now get an exception
any time you pass a Function to JS via the new typed interop without first
calling allowInterop.

BUG=
R=alanknight@google.com

Review URL: https://codereview.chromium.org/1583773003 .
2016-01-15 10:40:32 -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
Sigmund Cherem c10c55bb92 cpsir: update status files
Review URL: https://codereview.chromium.org/1563833003 .
2016-01-06 14:27:24 -08:00
Johnni Winther 306537be79 Add test of unittests.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1562023002.
2016-01-06 13:19:41 +01: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
Ryan Macnak c740fea545 VM: Fix crash parsing metadata with a closure as a const constructor argument.
BUG=http://dartbug.com/25240
R=hausner@google.com

Review URL: https://codereview.chromium.org/1534033003 .
2015-12-17 17:18:01 -08:00
Johnni Winther 7716ef5da1 Report compile-time error on disallowed metadata values.
Closes #14548

R=karlklose@google.com

Review URL: https://codereview.chromium.org/1510863004.
2015-12-09 15:48:38 +01:00
Asger Feldthaus 3b289d4436 dart2js cps: Extend type masks to handle reflective invocations.
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1430453002 .
2015-11-27 10:48:37 +01:00
Lasse R.H. Nielsen 5363e5c945 Make dart2js code retain the original stack trace for uncaught async errors.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1383213002 .
2015-11-17 15:17:04 +01:00
Srdjan Mitrovic 0553fd711b Disable a failing test on Windows, release, ia32; filed issue.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1439123002 .
2015-11-12 14:26:19 -08:00
John McCutchan 291befa1cd Redo TimelineTask API
A TimelineTask represents an asynchronous track of operations on the timeline.

The old API allowed multiple isolates to emit events simultaneously on the same task or to start / finish events in any order. This isn't supported by our UI and probably many other tools that consume trace-event.

With this change, operations within a TimelineTask must complete in the reverse order of their start calls (aka a stack). You can pass a TimelineTask from one isolate to another but you must first complete all open operations before passing it.

Example:

var task = new TimelineTask();

task.start('Some phase');
await someFuture;
task.finish();

Also: Add support for instant events.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1412183008 .
2015-11-11 10:59:38 -08:00
Lasse R.H. Nielsen 98a5da5948 Mark stream_periodic6_test failing on jsshell.
Review URL: https://codereview.chromium.org/1434463002 .
2015-11-04 12:35:03 +01:00
Lasse R.H. Nielsen 5009e57524 If computation of Stream.periodic throws, forward the error to the stream.
Fixes issue #24766
BUG= http://dartbug.com/24766
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1415533015.
2015-11-04 10:27:49 +01:00
Florian Schneider eb3186b7bd Fix flaky async test.
Replacing > with >= since finishing in 10 to 11 ms is to be expected.

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

Review URL: https://codereview.chromium.org/1415413012 .
2015-11-03 23:30:00 +01:00
Asger Feldthaus f4429324eb dart2js cps: Fix codegen for yield.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/1415843006 .
2015-11-03 14:21:52 +01:00
Florian Schneider e75056ccb4 VM: Fix bug with CHA-based inlining in --noopt mode.
Use propagated cids (not abstract types) only to specialize instance calls.

BUG=dartbug.com/24789
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1419013006 .
2015-11-02 19:48:26 +01:00
Florian Schneider dde638f7db Mark tests failing with --noopt in the status files.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1415823004 .
2015-10-31 01:45:50 +01:00
Asger Feldthaus 3634c3998a dart2js: Bugfix for when 'await' occurs in an initializer list.
If the JS ast contains an initializer list:

  var x = foo(), y = await x;

It would be retained as a single statement and generate invalid output
that awaits 'x' before it has been defined.

CLOSES=23997

BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1427593003 .
2015-10-27 11:36:57 +01:00
Lasse R.H. Nielsen 289a22182e Add support for decoding URL-safe encoded base64.
Also support "%3D" instead of "=" as padding, but no other percent escapes.

This is only for decoding, encoding is still as strict as possible.

R=nweiz@google.com

Review URL: https://codereview.chromium.org/1419983003 .
2015-10-26 09:41:30 +01:00
Lasse R.H. Nielsen b70109683b Implement cryptographically secure random numbers by using crypto.getRandomValues.
Closes https://github.com/dart-lang/sdk/issues/24687

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

Review URL: https://codereview.chromium.org/1413923004 .
2015-10-23 11:14:37 +02: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
Regis Crelier 09954546fb Add a 'secure' constructor to Random in dart:math returning a cryptographically
secure random generator which reads from the entropy source provided by the
embedder for every generated random value.
Add a test.
Fixes #1746.

R=lrn@google.com

Review URL: https://codereview.chromium.org/1398453004 .
2015-10-15 10:16:03 -07:00
Ryan Macnak 5532a354c3 Add a test configuration for noopt so we can add status file entries for it.
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1409543004 .
2015-10-14 12:36:39 -07:00
Asger Feldthaus c4b418a2c3 dart2js cps: Updated status file for host-checked mode.
BUG=

Review URL: https://codereview.chromium.org/1402943003 .
2015-10-13 15:31:40 +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 bd4c7a8a07 Add Base64 codec to dart:convert.
This is a simple converter that only accepts and produces plain base-64 strings
with the default alphabet and no whitespace.

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

Review URL: https://codereview.chromium.org//1370073002 .
2015-09-29 13:49:53 +02:00
Alan Knight f3261b5608 Suppress the slow_consumer test, fails on drt/checked with heap exhaustion
BUG=

Review URL: https://codereview.chromium.org//1374093002 .
2015-09-28 16:34:38 -07:00
Karl Klose e28e578731 dart2js cps: Support sync* and yield.
R=asgerf@google.com, kmillikin@google.com

Review URL: https://codereview.chromium.org//1353843002 .
2015-09-23 11:01:34 +02:00
Terry L. Lucas c5a690fa26 Revert "Mark tests problems because of Dartium JSInterop"
This reverts commit d1a7ee9ad7.

TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1355683005 .
2015-09-18 11:00:54 -07:00
Terry L. Lucas d1a7ee9ad7 Mark tests problems because of Dartium JSInterop
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1358503002 .
2015-09-18 09:37:37 -07:00
Terry L. Lucas 7b322c246c Dartium JS Enabled take 2
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1348173002 .
2015-09-16 07:13:53 -07:00
Terry L. Lucas 09c804aa78 Revert "Dartium JS Interop enabled."
This reverts commit 403bd1698d.

TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1345083002 .
2015-09-15 19:44:26 -07:00
Terry L. Lucas 403bd1698d Dartium JS Interop enabled.
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1349493003 .
2015-09-15 17:36:47 -07:00
Asger Feldthaus 19cb08fa05 dart2js cps: Remove code after calls that cannot return.
This should resolve an outstanding issue with unreachable code being
transformed. A subterm in the unreachable code would get specialized
and then reanalyzed while some of the definitions in scope have no type.

This changes a lot of test case results. Some test results
have changed in very surprising ways, but I would argue
these are separate bugs that we should hunt down.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1335273003 .
2015-09-15 17:46:48 +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
William Hesse 13bf8ff9f8 Breaking Change: merge BoringSSL branch into master
This replaces the NSS secure networking library from Mozilla
with the BoringSSL library from Google. This library, based
on OpenSSL, reads certificates from files in PEM format, rather
than storing certificates and keys in a SQLite database, the
way NSS does. There will be a blog post, changelog entries,
and other documentation of the breaking changes.

Review URL: https://codereview.chromium.org//1319703002 .
2015-08-26 14:42:12 +02: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
Lasse R.H. Nielsen 1a7ff8578d Make line_splitter_test not use multi-line strings.
Apparently dart2js and the VM disagrees on which characters are in
a multi-line string if the source uses Windows line endings.

Fixes issue 23856

BUG= http://dartbug.com/23856
R=sgjesse@google.com

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

Review URL: https://codereview.chromium.org//1294353003 .
2015-08-19 12:35:28 +02:00
Lasse R.H. Nielsen 194c729a2a Make line_splitter_test not use multi-line strings.
Apparently dart2js and the VM disagrees on which characters are in
a multi-line string if the source uses Windows line endings.

Fixes issue 23856

BUG= http://dartbug.com/23856
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1294353003.
2015-08-19 11:27:14 +02:00
Asger Feldthaus 496a1e0085 dart2js cps: More status files updates.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1302473002 .
2015-08-18 11:01:05 +02:00
Florian Loitsch debf1d6f7c Don't zone-register async callbacks for every await call in the VM.
This has the nice side-effect that the stack_trace package provides nicer chains.
Fixes issue 23394.

R=hausner@google.com

Committed: https://github.com/dart-lang/sdk/commit/4dae43d63727268f2e0cc45d6020246eb49177b8
Reverted: https://github.com/dart-lang/sdk/commit/cb4f9fc925c5a92c6cf756751e38296383f66507

Review URL: https://codereview.chromium.org//1274133002 .
2015-08-17 19:26:50 +02:00
Florian Loitsch cb4f9fc925 Revert "Don't zone-register async callbacks for every await call in the VM."
This reverts commit 4dae43d637.

Review URL: https://codereview.chromium.org//1296973002 .
2015-08-17 16:43:35 +02:00