Commit Graph

62 Commits

Author SHA1 Message Date
Samir Jindel 4d77c7b3a6 [vm] Remove redundant type-checks from core libraries.
In conjunction with previous revisions, this improves several Flutter microbenchmarks by 2-4%.

Change-Id: Ic864fd586dc57d87b80cebd6ceace0a8165fa82b
Reviewed-on: https://dart-review.googlesource.com/c/88702
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-01-14 19:56:37 +00:00
Alexander Markov c3b5939965 [vm] Remove --limit-ints-to-64-bits option and old _Bigint class
Closes https://github.com/dart-lang/sdk/issues/33306

Change-Id: I7088d8b7143edbe24f5cefe4be037ad2006e0625
Reviewed-on: https://dart-review.googlesource.com/58101
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-04 20:10:40 +00:00
Lasse R.H. Nielsen 6f78471687 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: I7a12fea533d42b0fc8357086649df38ad01f3cdd
Reviewed-on: https://dart-review.googlesource.com/39140
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-07 06:12:53 +00:00
William Hesse 9c35cff5cd Revert "New methods on Iterable, List, Set, Queue, Map."
This reverts commit 0b59f24f97.

Reason for revert: Creates crashes in dart2js with kernel, see
https://luci-milo.appspot.com/buildbot/client.dart/dart2js-linux-d8-minified-1-5-be/9751

Original change's description:
> New methods on Iterable, List, Set, Queue, Map.
> Changes signature of Iterable.singleWhere.
> Makes LinkedHashMap no longer be a HashMap.
> 
> Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
> Reviewed-on: https://dart-review.googlesource.com/32541
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=lrn@google.com,leafp@google.com

Change-Id: Iab904f5885a5213ae2e16ef496eed0b6843185f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39060
Reviewed-by: William Hesse <whesse@google.com>
2018-02-06 13:32:19 +00:00
Lasse R.H. Nielsen 0b59f24f97 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
Reviewed-on: https://dart-review.googlesource.com/32541
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-06 11:17:46 +00:00
Peter von der Ahé 861550a28c Read patch files in strong mode
Closes https://github.com/dart-lang/sdk/issues/28822

Change-Id: I05e1d9885a39efca131d78d06cfd8a0e84276bb9
Reviewed-on: https://dart-review.googlesource.com/36641
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-02-05 14:35:36 +00:00
Régis Crelier 25d7d355db Provide distinct BigInt implementation classes in VM, dart2js, and dartdevc.
The classes are still identical, but will diverge as the VM will provide an
optimized version.

Change-Id: I8397fd927b89fa745ac7aa4b8d98e562140f731b
Reviewed-on: https://dart-review.googlesource.com/35521
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-01-29 18:12:34 +00:00
Lasse R.H. Nielsen 0b58c4bd10 Change some constant declarations to lowerCase.
Retain the old values.

Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.

Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen e61fc07b58 Revert "Change some constant declarations to lowerCase."
This reverts commit c048cfb178.

Reason for revert: VM code fingerprints needs update.

Original change's description:
> Change some constant declarations to lowerCase.
> 
> Retain the old values.
> 
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Florian Loitsch <floitsch@google.com>

TBR=lrn@google.com,floitsch@google.com

Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen c048cfb178 Change some constant declarations to lowerCase.
Retain the old values.

Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-14 11:13:04 +00:00
Vyacheslav Egorov 9cd7bc724d [VM, Kernel] Fix sync* implementation in checked mode
Change abefb7b432 introduced a typing issue
instead of fixing it: _SyncIterator<T>._current was actually used to return
either a value of type T (for yield) or value of type Iterable<T> (for yield*)
from the move callback.

This change refactors implementation of _SyncIterator in such a way that
_current is only used to return value for yield and a separate field
_yieldEachIterable is used to return Iterable<T> for yield*.

Change-Id: I3e3c832bbc8986d6976ddbb0856a1b5a127d845b
Reviewed-on: https://dart-review.googlesource.com/15542
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-20 18:15:28 +00:00
Vyacheslav Egorov 826b48ee8a [VM] Clean up typing violations in the numerics implementation.
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I93d7bca2ff627431f1a316bb01a5dada1b5f2354
Reviewed-on: https://dart-review.googlesource.com/14522
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-10-17 21:00:24 +00:00
Vyacheslav Egorov abefb7b432 [kernel] Assign proper types and interface targets to nodes created by async transformer.
Bug: https://github.com/dart-lang/sdk/issues/31070
Change-Id: Iaedbd425fcb6d243c0bfa93495335658553a9301
Reviewed-on: https://dart-review.googlesource.com/14481
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-10-17 17:44:00 +00:00
Peter von der Ahé e8aef37eac Clean up patches so they can be compiled by Fasta.
Change-Id: Ie436375c78496366accf0ba82938e54cbe30b143
Reviewed-on: https://dart-review.googlesource.com/3001
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-05 14:05:50 +00:00
Florian Loitsch ee46026671 Don't use LinkedList in the core libraries anymore.
R=lrn@google.com

Committed: https://github.com/dart-lang/sdk/commit/fe17b5b2bc24454dd2f596d8ce6e2e7661e87f10
Reverted: https://github.com/dart-lang/sdk/commit/5d4a786f4466ebcb06c36ed44f262c9e120a7273
Review-Url: https://codereview.chromium.org/2975443002 .
2017-07-28 21:14:11 +02:00
Florian Loitsch 5d4a786f44 Revert "Don't use LinkedList in the core libraries anymore."
This reverts commit fe17b5b2bc.

Review-Url: https://codereview.chromium.org/2974073002 .
2017-07-10 14:58:04 +02:00
Florian Loitsch fe17b5b2bc Don't use LinkedList in the core libraries anymore.
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2975443002 .
2017-07-10 14:09:24 +02:00
Jacob Richman 4360e99d18 Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Committed: https://github.com/dart-lang/sdk/commit/62be0eacfbb36bdc92a05c7c35bb4506621b6a3a
Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-21 10:07:26 -07:00
Jacob Richman 62be0eacfb Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-20 22:19:22 -07:00
Jacob Richman 88f8aacd5f Re-apply rolled back CL to apply dartfmt to runtime.
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2759973004 .
2017-03-20 21:44:59 -07:00
Ryan Macnak ea4744a06f Revert "Run dartfmt on all files under runtime."
This reverts commit 15f393f189.

The change caused many service test failures due to changed line numbers.

TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2762583003 .
2017-03-20 13:42:55 -07:00
Jacob Richman 15f393f189 Run dartfmt on all files under runtime.
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2751423005 .
2017-03-20 13:13:50 -07:00
Kevin Millikin fdb4c100e0 Move _fatal from dart:core to dart:_internal
_fatal was a private function in dart:core which was called from a
different library (dart:async).  It's not clear how it was supposed to
work or if it even did.  The uses in dart:async don't appear to be
covered by tests.

Move it to dart:_internal which exists exactly for sharing things
between the dart: libraries.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2684033006 .
2017-02-09 12:46:51 +01:00
Kevin Millikin f7b6f0cf1c Make the VM's dart:core and dart:async library patches clean.
Clean up the VM's dart:core and dart:async library patches so that
they are clean according to the patching rules implemented in the
analyzer.  Specifically:

  - If a member is patched in a patch file, it must be declared external
    in the SDK.

  - If a member is introduced in a patch file, it must be private.

  - A non-private superclass member cannot be overridden in a patch
    file.

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

Review-Url: https://codereview.chromium.org/2563633002 .
2016-12-15 10:10:09 +01:00
Vyacheslav Egorov eb8c24e133 Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451623006 .
2016-10-27 10:09:22 +02:00
Vyacheslav Egorov 12968edb9c Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork.""
This reverts commit 4e7a31262e.

Windows bots are broken now.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451893004 .
2016-10-26 17:07:18 +02:00
Vyacheslav Egorov 4e7a31262e Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This relands commit 2fed1c3905 with fixes to ensure that analyzer summaries are correctly created and XARM build does not try to use target binaries on the host.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2453773002 .
2016-10-26 16:48:28 +02:00
Vyacheslav Egorov cf7ff42e60 Revert "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This reverts commit 2fed1c3905.

SDK builds are failing

TBR=zra@google.com

Review URL: https://codereview.chromium.org/2455593002 .
2016-10-26 13:06:27 +02:00
Vyacheslav Egorov 2fed1c3905 Merge more Kernel infrastructure from kernel_sdk SDK fork.
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
  Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
  not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.

- bring test script modifications that allow to test Kernel pipeline

BUG=
R=asiva@google.com, kmillikin@google.com, whesse@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2434123003 .
2016-10-26 13:02:54 +02:00
Matthias Hausner 1a6d1eca32 Implement @patch annotation for patch class members
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.

Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2230383003 .
2016-08-10 12:54:57 -07:00
Matthias Hausner e11ca24053 Use metadata annotation @patch for patch classes
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.

The deprecated syntax is still supported, but a warning is printed when detected.

BUG=

Review URL: https://codereview.chromium.org/2220883004 .
2016-08-09 09:48:03 -07:00
John McCutchan c692a64e5a Rework how enums are implemented and reloaded
- Enum instances now hold their index and their label. Before the labels were held in a static array to the side and the index was used to look up the label.

- Before and after reload enum instances are now paired (by label) and put into the 'become' table.

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

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2153143002 .
2016-07-15 10:52:20 -07:00
Matthias Hausner 11767827db Add comment to async* support code
Addresses review comment.

Review URL: https://codereview.chromium.org/1751503002 .
2016-02-29 11:22:04 -08:00
Matthias Hausner 761ee7ec04 ‘Yield* e' should not access e.current eagerly
Match the implementation of dart2js.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1682173008 .
2016-02-12 13:28:16 -08: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
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
Florian Loitsch 4dae43d637 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

Review URL: https://codereview.chromium.org//1274133002 .
2015-08-17 15:58:19 +02:00
Ivan Posva f63db4960c - Implement resource loading via the Resource class.
R=asiva@google.com

Review URL: https://codereview.chromium.org//1264413002 .
2015-08-04 15:39:14 -07:00
Lasse R.H. Nielsen f8ce36df55 Add Resource class. Currently unimplemented.
R=herhut@google.com, iposva@google.com

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

Review URL: https://codereview.chromium.org//1181663002.
2015-06-26 11:42:02 +02:00
Lasse R.H. Nielsen 78a3db3128 Revert "Add Resource class. Currently unimplemented."
This reverts commit 2890a7a2a9.

Causes a dart2js test error and a significant amount of analyzer
warnings.

Review URL: https://codereview.chromium.org//1193273003.
2015-06-22 16:43:44 +02:00
Lasse R.H. Nielsen 2890a7a2a9 Add Resource class. Currently unimplemented.
R=herhut@google.com, iposva@google.com

Review URL: https://codereview.chromium.org//1181663002.
2015-06-22 15:05:14 +02:00
lrn@google.com 5351182e38 Add Map.unmodifiable constructor.
R=sgjesse@google.com, sra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45733 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 11:09:13 +00:00
hausner@google.com aa75044ff7 Fix spurious resume when awaiting future in async* code
Fixes issue reported in bug 23116.

The equivalent fix for dart2js contains a test case for this.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44985 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 22:09:20 +00:00
hausner@google.com 8c49660a7e Make await for cancel the stream when breaking out of the loop
Wrap the await-for loop in a try-finally statement that ensures that
the stream is cancelled. Also adding the ability to the
AsyncStartStreamController class to return a cancellation future.

The cancel() call at the end of the await-for loop is not awaiting
the cancellation future yet. This is not part of the spec at this
point.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44689 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-25 17:41:39 +00:00
lrn@google.com bddb668174 Add some async/await tests.
R=sgjesse@google.com, sigurdm@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44395 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 10:15:59 +00:00
lrn@google.com c54856f8be Revert "Add some async/await tests."
Some tests are failing on the bots.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44369 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 13:41:34 +00:00
lrn@google.com fc0f0c144a Add some async/await tests.
R=sgjesse@google.com, sigurdm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44368 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 12:56:38 +00:00
koda@google.com d73d6de73d Support enum keys in maps in messages.
Make enum classes implement hashCode, rather than use the identity hash code, so that they can be portably serialized.

BUG=dart:21675
R=asiva@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44278 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 02:57:34 +00:00
hausner@google.com 9a6ed9a718 Implement async* functions in VM
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44185 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-03 17:49:53 +00:00