Commit graph

25 commits

Author SHA1 Message Date
Stevie Strickland 4028fec3b5 Reland "[vm] Finish adding support for ECMAScript 2018 features."
This work pulls in v8 support for these features with
appropriate changes for Dart and closes
https://github.com/dart-lang/sdk/issues/34935.

This adds support for the following features:

* Interpreting patterns as Unicode patterns instead of
  BMP patterns
* the dotAll flag (`/s`) for changing the behavior
  of '.' to also match line terminators
* Escapes for character classes described by Unicode
  property groups (e.g., \p{Greek} to match all Greek
  characters, or \P{Greek} for all non-Greek characters).

The following TC39 proposals describe some of the added features:

* https://github.com/tc39/proposal-regexp-dotall-flag
* https://github.com/tc39/proposal-regexp-unicode-property-escapes

These additional changes are included:

* Extends named capture group names to include the full
  range of identifier characters supported by ECMAScript,
  not just ASCII.
* Changing the RegExp interface to return RegExpMatch
  objects, not Match objects, so that downcasting is
  not necessary to use named capture groups from Dart

**Note**: The changes to the RegExp interface are a
breaking change for implementers of the RegExp interface.
Current users of the RegExp interface (i.e., code using Dart
RegExp objects) will not be affected.

Change-Id: Ie62e6082a0e2fedc1680ef2576ce0c6db80fc19a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100641
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stevie Strickland <sstrickl@google.com>
2019-04-29 09:11:48 +00:00
Keerti Parthasarathy 9238e25305 Revert "[vm] Finish adding support for ECMAScript 2018 features."
This reverts commit 5ebb640a67.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [vm] Finish adding support for ECMAScript 2018 features.
> 
> This work pulls in v8 support for these features with
> appropriate changes for Dart and closes
> https://github.com/dart-lang/sdk/issues/34935.
> 
> This adds support for the following features:
> 
> * Interpreting patterns as Unicode patterns instead of
>   BMP patterns
> * the dotAll flag (`/s`) for changing the behavior
>   of '.' to also match line terminators
> * Escapes for character classes described by Unicode
>   property groups (e.g., \p{Greek} to match all Greek
>   characters, or \P{Greek} for all non-Greek characters).
> 
> The following TC39 proposals describe some of the added features:
> 
> * https://github.com/tc39/proposal-regexp-dotall-flag
> * https://github.com/tc39/proposal-regexp-unicode-property-escapes
> 
> These additional changes are included:
> 
> * Extends named capture group names to include the full
>   range of identifier characters supported by ECMAScript,
>   not just ASCII.
> * Changing the RegExp interface to return RegExpMatch
>   objects, not Match objects, so that downcasting is
>   not necessary to use named capture groups from Dart
> 
> **Note**: The changes to the RegExp interface are a
> breaking change for implementers of the RegExp interface.
> Current users of the RegExp interface (i.e., code using Dart
> RegExp objects) will not be affected.
> 
> Change-Id: I0709ed0a8d5db36680e32bbad585594857b9ace4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95651
> Commit-Queue: Stevie Strickland <sstrickl@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=lrn@google.com,kustermann@google.com,jmesserly@google.com,johnniwinther@google.com,sstrickl@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I1eda0fee4fd9e94df095944049833a67b07277e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100560
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-25 14:29:51 +00:00
Stevie Strickland 5ebb640a67 [vm] Finish adding support for ECMAScript 2018 features.
This work pulls in v8 support for these features with
appropriate changes for Dart and closes
https://github.com/dart-lang/sdk/issues/34935.

This adds support for the following features:

* Interpreting patterns as Unicode patterns instead of
  BMP patterns
* the dotAll flag (`/s`) for changing the behavior
  of '.' to also match line terminators
* Escapes for character classes described by Unicode
  property groups (e.g., \p{Greek} to match all Greek
  characters, or \P{Greek} for all non-Greek characters).

The following TC39 proposals describe some of the added features:

* https://github.com/tc39/proposal-regexp-dotall-flag
* https://github.com/tc39/proposal-regexp-unicode-property-escapes

These additional changes are included:

* Extends named capture group names to include the full
  range of identifier characters supported by ECMAScript,
  not just ASCII.
* Changing the RegExp interface to return RegExpMatch
  objects, not Match objects, so that downcasting is
  not necessary to use named capture groups from Dart

**Note**: The changes to the RegExp interface are a
breaking change for implementers of the RegExp interface.
Current users of the RegExp interface (i.e., code using Dart
RegExp objects) will not be affected.

Change-Id: I0709ed0a8d5db36680e32bbad585594857b9ace4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95651
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-04-24 09:24:16 +00:00
Vyacheslav Egorov 7558644bd6 [vm/compiler] Move compiler state (CHA, deopt id) from Thread to a special class
Also move deopt id computation logic into a separate class and add a comment
explaining while deopt ids are incremented by 2.

Change-Id: Ife489be7d10c7198a8e7adf9e97e0c516d78ea55
Reviewed-on: https://dart-review.googlesource.com/72685
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-09-03 16:01:24 +00:00
Ryan Macnak 9b5a931b06 [vm] Replace most runtime/vm uses of OS::Print with OS::PrintErr.
Leave --print-snapshot-sizes on stdout because it is parsed by Flutter benchmarks.

Replace all runtime/bin uses of OS::Print with Log::Print.

Bug: https://github.com/dart-lang/sdk/issues/32134
Change-Id: I74aacfb410cdfa9270d06e7f6ab0534520c7c7ba
Reviewed-on: https://dart-review.googlesource.com/60021
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-13 19:51:40 +00:00
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Aske Simon Christensen ab7d9a5720 Omit JIT compiler from precompiled runtime on ARM, ARM64 and IA32.
Saves about a megabyte on the size of the precompiled runtime VM.

Next step will be to eliminate the assemblers and code stubs as well. This requires some more disentangling.

Until then, the X64 build still includes the compiler, since its assembler has a dependency on locations.cc, which is part of the compiler.

BUG= https://github.com/dart-lang/sdk/issues/30045
R=rmacnak@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2960413002 .
2017-07-11 12:01:49 +02:00
Ryan Macnak bcf2900a26 Reapply "Shuffle around deopt id allocation to give the flow graph builder a chance to record other data as they are allocated".
- Fix inlining of new List(n) to propogate deopt id.
 - Fix CreateArrayOpt to check for a Smi length.

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2900963008 .
2017-05-25 10:12:22 -07:00
Ryan Macnak 93864c0db9 Revert "Shuffle around deopt id allocation to give the flow graph builder a chance to record other data as they are allocated."
This reverts commit c94bebf289.

Review-Url: https://codereview.chromium.org/2904733003 .
2017-05-24 11:55:56 -07:00
Ryan Macnak c94bebf289 Shuffle around deopt id allocation to give the flow graph builder a chance to record other data as they are allocated.
We'll use deopt-id -> context-level or deopt-id -> scope mappings to find what variables are in scope for the debugger and async stack trace machinery.

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2896903002 .
2017-05-23 16:56:14 -07:00
Zachary Anderson a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Florian Schneider 944aed203a Remove left-over compiler-code from precompiled runtime.
Only instantiate IR classes in compiled regexp mode.

Remove remaining stub generation code.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1739173002 .
2016-02-26 06:59:36 -08:00
Ryan Macnak d1475c0356 Port irregexp bytecode compiler and interpreter from V8 r24065.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//1201383002 .
2015-07-07 14:43:32 -07:00
koda@google.com 9c181ec6d5 Thread/Isolate refactoring: new(Isolate*) -> new(Zone*)
Refactor all remaning cases where the current zone is used through new(Isolate*) and remove this interface.

Removing this interface is needed to move towards multiple threads per isolate, and also makes the caller more aware of the scope of the zone used, reducing the risk of use-after-free.

Make the current thread and the stack zone created around native/runtime entries directly available in their body, saving an indirection (and optimized away if unused).

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44541 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-17 19:24:26 +00:00
srdjan@google.com 12c5e2bbaf Cleanup: use const reference for ParsedFunction where possible.
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43226 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-28 00:41:09 +00:00
zerny@google.com c77ab72c54 Use a typed array for the irregexp stack.
BUG=
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43039 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 15:11:36 +00:00
zerny@google.com 786485b43b Use a fixed-size typed array for the dispatch offsets table.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42686 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-08 11:21:29 +00:00
zerny@google.com 9cd03044eb Eliminate bounds checks on fixed-length registers array.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42653 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 12:24:46 +00:00
zerny@google.com 2be85c9e7f Replace the use of local variables for irregexp registers by a typed array.
The use of locals put considerable pressure on register allocation and
caused lots of register shuffling.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42596 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 15:14:53 +00:00
zerny@google.com 59e4617216 Initialize offsets also for the unreachable branch (clang -Wsometimes-uninitialized).
TBR=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42100 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 09:39:21 +00:00
zerny@google.com 4fb54d853d Support use of external strings as inputs to LoadCodeUnitsInstr.
R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42099 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 09:26:48 +00:00
zerny@google.com 8e807c8550 Integrate the Irregexp Regular Expression Engine.
BUG=http://dartbug.com/19090
R=fschneider@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41983 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 09:32:43 +00:00
zerny@google.com 84a4135901 Revert "Integrate the Irregexp Regular Expression Engine."
This reverts commit https://code.google.com/p/dart/source/detail?r=41949

TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41950 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:36:40 +00:00
zerny@google.com 43ac0c6f33 Integrate the Irregexp Regular Expression Engine.
BUG=http://dartbug.com/19090
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41949 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:10:21 +00:00
zerny@google.com 94a510176b Copy irregexp related code from V8.
This "syntactic" change copies the irregexp code from V8 r24065 to Dart.
Compared to the V8 files the only changes are that the files have been
suitably renamed, headers and footers have been updated, and most of the
unneeded code has been replaced by a 'SNIP' marker. None of the files
are added to the build and they cannot compile. Integration with the
Dart VM is done in a follow-up CL [1].

[1]: https://codereview.chromium.org/683433003/

BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41455 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 10:00:31 +00:00