Update DartTime.parse to support arbitrary precision fractional seconds. So it now conforms to ISO8901 and RFC3339 standards.
Closes#24205Closes#39350https://github.com/dart-lang/sdk/pull/39350
GitOrigin-RevId: 66f15b6e646a65b7955c7b617647b8edfd680481
Change-Id: Ife2211e6cce5922b59cdde0d30ed3ef887cffcf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124903
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Change-Id: I8aa918b4065eaa9ae8e4501c6a77328659784f9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114848
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This refactoring achieves the following:
- Collect the integer operation semantics into one place instead of
having it sprinkled all over the constant evaluator with many
"if (targetingJavaScript)" tests.
- Avoid emitting the internal JavaScriptIntConstant node, which is
serialized as normal DoubleConstant nodes, thus achieving parity
between direct consumers and consumers seeing output that has been
serialized.
- Implement the JavaScript semantics for unsigned right shift.
- Fix truncating divide with a result outside int64 range incorrectly
clamping the result for JS targets.
- Fix positive hex constants >= 2^63 through int.fromEnvironment
producing negative values in dart2js.
- Clarify in Kernel documentation how numeric constants are represented
on VM vs JS targets.
Change-Id: If30bb2c2c77c54eff120b611b059c2ec726c99a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116525
Reviewed-by: Mayank Patke <fishythefish@google.com>
Just doing some test cleanup on massively failing tests. This test still won't pass until we support `>>>` but we can fix some of the issues.
Change-Id: I1a111455c969f21644ab2713f81f4ee00e7383f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115881
Auto-Submit: Mayank Patke <fishythefish@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Dart 2 shipped a year ago, so we're pretty well past a "preview". :)
Change-Id: I6c5d21ae4181e4228cc1fc49b6344cdb8fc43794
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115544
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Change-Id: I421fca89e748474a585f052532b86ef3ddbed4ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113681
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Fix typo in test, add @Since markers to new constructors.
Change-Id: I31abbf41049a3d5820d82165ab16ce8357c79132
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108722
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
No longer depends on the unspecified `Type.toString`.
Bug: http://dartbug.com/37452
Change-Id: Ie7eeeecdc8970831082e763edc46f195a8bfc7e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108275
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
dart2js will now fail with an unchecked ConcurrentModificationError.
Change-Id: I54ddc4198538f4b9276ef0f4692fd74590a38135
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108240
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
After moving ~175 lines to other files, the remaining ~1200 lines of
tests in date_time_test.dart passes on dart2js.
Change-Id: Id8366b90083c22f71e5ff2e3f36ac1f0358ec8e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108220
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Towards #37318
- appJit has been replaced by appJitk and is no longer.
- precompiled has been replaced by dartkp and is no longer used.
- For the precompiled runtime, default to dartkp.
- Remove status file references to these compiler options and normalize
status files.
Change-Id: I48728db13dc84737092a92314e2f474a9309f4d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106942
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
A negative result was wrongly returned as a positive value.
Since positive values are preferred, the implementation now adds the modulus
enough times to make the result positive.
Change-Id: I87a2ceb359345846740a749ab6b46b1d45e7ba21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103664
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
* Remove all `&& $strong` clauses.
* Delete all sections that include a `&& !$strong` clause.
Change-Id: Idd32cf5623793e3f98e3e998025bac079d88e2f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102223
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
After 347b72c260, this test began timing out on dartk-mac-debug-simdbc64.
Change-Id: I84fc6457c7e10068f761d25cbb1241e2c2f8ab49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100902
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
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>
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>
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>
This adds support to DDC's Kernel backend for instance constants
inlined across module boundaries, by saving private name symbols
so they can be referred to from outside of the current module.
Change-Id: I28d45d1844f5351f506cc7606dd1c4803037304e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98926
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
The test corelib_2/regexp/lookbehind_test/01 always passes or fails
uniformly on a single build. But on different builds, on dartdevk on
mac.
TBR: vsm@google.com
Bug: dartbug.com/36280
Change-Id: If70b7a2f0ce34e9f8ba3032d17e7244f2e84aa96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97332
Reviewed-by: William Hesse <whesse@google.com>
See https://github.com/tc39/proposal-regexp-named-groups
for a high-level description of the feature and examples. This is one of the
features requested in https://github.com/dart-lang/sdk/issues/34935.
This is a partial implementation because while there is a way to retrieve
groups via Dart by name, it requires casting the returned Match to the
new RegExpMatch interface to avoid changing the RegExp interface.
Changing the RegExp interface will happen in a future update, since there
are other planned changes to the RegExp interface coming soon and that way
we only change it once. See https://github.com/dart-lang/sdk/issues/36171
for more details on the planned changes.
Also, since only BMP regular expressions are supported, not full
Unicode ones (i.e., those with the /u flag in ECMAscript), \k<NAME>
will only be parsed as a named back reference if there are named
captures in the string. Otherwise, the \k will be parsed as the identity
escape for backwards compatibility. The new tests illustrate this
difference.
Change-Id: Ieeb0374813db78924c9aa8ac3e652dfb6d4a5934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95461
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
See https://github.com/tc39/proposal-regexp-lookbehind
for a high-level description of the feature and examples. This is one of the
features requested in https://github.com/dart-lang/sdk/issues/34935.
This work takes the feature as present in the v8 engine and appropriately
merges it into our irregexp fork. Notable changes to the irregexp codebase to
introduce this feature:
-----
We can no longer assume that all matching proceeds forwards, since lookbehind
matching proceeds backwards. Similarly, we cannot assume that we can only be
at the start of a string if we started matching from that point. The direction
of matching must also be taken into consideration when doing bounds checking,
which previously assumed the engine would never attempt to look before the
start of a string.
-----
We may now parse backreferences to captures before the capture they
reference, since we parse regular expressions left to right, but lookbehinds
perform captures as they evaluate the string from right to left. Since
RegExpBackReference objects contain a pointer to their corresponding capture,
this means that we may need to create RegExpCapture objects prior to the
parsing of the corresponding captured subexpression.
Thus, RegExpCapture objects are now only initialized with their index, and the
body is set later when the subexpression is encountered and parsed. This means
any method that operates on the body of a RegExpCapture can no longer be const,
which also affects the rest of the RegExpTree class hierarchy. This also means
that we don't have a valid max_match length for backreferences based off the
capture body, and must assume they can end up being any length.
-----
Change-Id: Iffe0e71b17b1a0c6fea77235e8aee5c093005811
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94540
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
The size of the result digit array was not computed correctly.
When 64-bit intrinsics are used, one extra digit pair must be allocated.
Change-Id: Id3ca3a16ef24b598e44bf25221d400b9be71248a
Reviewed-on: https://dart-review.googlesource.com/c/94683
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Support for the flutter runtime (sky_shell) was added to the Dart
test framework in the hope that one could run the flutter engine
through the Dart test suite. We never got around to running these
tests on the build bots, the sky_shell executable has been deprecated
and there are plans in the flutter engine team to have their own
unit test frame work.
See Issue https://github.com/flutter/flutter/issues/9115 for more
details.
Change-Id: I6ee9e8c919721dccecf4202ab0778939aeb79174
Reviewed-on: https://dart-review.googlesource.com/c/91103
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
I added these when we were maintaining the .status files with a script at the
time strong-mode was being implemented in the CFE. The comments are no longer
relevant.
TBR=paulberry@google.com
Change-Id: I3d37da32cd611731e3e0d91a5aa751fa550cc179
Reviewed-on: https://dart-review.googlesource.com/c/85408
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Change-Id: I2adff8cc7f49bcb9710dca2b692fb40761fae175
Reviewed-on: https://dart-review.googlesource.com/c/84082
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
This reverts commit 29ff9e4a6a.
Reason for revert: We seem to be seeing a number of dartkp failures after this commit.
Original change's description:
> [VM] Use c++/kernel2kernel constant evaluator for const StaticInvocation in the kernel IR
>
> Fixes https://github.com/dart-lang/sdk/issues/34770
>
> Change-Id: Ie0a3ea82992d70bfce04dcd8986b62f3e1dd5962
> Reviewed-on: https://dart-review.googlesource.com/c/79581
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com
Change-Id: Ib3f67e869e6bfa87161f7c580b0142d676e5a631
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/79467
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
If these intrinsics are called from interpreter and return garbage,
the interpreter might crash in Interpreter::InvokeCompiled while
inspecting the result.
Also, this CL contains a fix for the slow path of Int64 box
allocation in the interpreter.
Change-Id: I27143d38ed39fdc234520c57e85bff066cc8cde3
Reviewed-on: https://dart-review.googlesource.com/c/78187
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Also accept `#` in fragment.
Fix bug in parsing URI where first character of path needs escaping.
The characters are escaped, but parsing doesn't fail, like it previously
did on misplaced general delimiters in those places
Fixes#34451.
Bug: https://dartbug.com/34451
Change-Id: I99aa39bd2909661802ad9d1bb5dada94d579141b
Reviewed-on: https://dart-review.googlesource.com/74780
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
- option --no-preview-dart-2 will now result in an error
- change aot-assembly build rule to generate AOT snapshot using Dart 2
- generate coresnapshot using Dart 2 (this snapshot is not used yet, next CL which switch the isolate create code to use this snapshot)
- by pass all Dart1 test runs in the status file
- change the default compiler setting in test.py to use dartk
- have test.py not pick up any configuration for --no-preview-dart-2
Change-Id: Ia136943ebfd0fed0c52683b330745b3e2c7a7ce6
Reviewed-on: https://dart-review.googlesource.com/75820
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
If a field is initialized with null (either explicitly or implicitly),
field store can be omitted in bytecode. In such case, bytecode should
still convey the information about this initialization to VM for
field guards to work correctly.
Change-Id: I1fd45b858c3c521b97fa5dbffe0e15b1ea75d92f
Reviewed-on: https://dart-review.googlesource.com/76060
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Removed all sections labeled $compiler == dart2js and !$fasta.
Removed $fasta from all sections with $compiler == dart2js and merged
with existing sections as appropriate.
Some additional cleanup and normalization.
Change-Id: I8b93283a2cce22ce60e29d364c8d0e70dccbb6e3
Reviewed-on: https://dart-review.googlesource.com/71840
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Mark a test slow that otherwise times out on dartdevc kernel mode.
Change-Id: Id27683c54982f9a6afd1e41f566dd12aa67040de
Reviewed-on: https://dart-review.googlesource.com/69962
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Change-Id: Iffd934a67668901176a84c9b01512711a011652d
Reviewed-on: https://dart-review.googlesource.com/67803
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
This CL adds support to build.py and test.py for building/testing
a VM with the interpreter on x64, e.g.:
$ ./tools/gn.py -m release -a x64 --bytecode
$ ./tools/build.py -m release -a x64 --bytecode runtime
$ ./tools/test.py -m release -a x64 -r vm -c dartkb language_2
Change-Id: I956d23790636609d4a2e71129481fcbd7afef9a0
Reviewed-on: https://dart-review.googlesource.com/65206
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Also fixes#32585, Analyzer's int64 validation was rejecting integers
that are accepted by CFE/VM/int.parse.
Refactors DDC to allow us to emit errors from the CodeGenerator
(previously unsupported).
Change-Id: Ifd24ab90848cc42b226961e375167c557299c0b7
Reviewed-on: https://dart-review.googlesource.com/63023
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Revert "[gardening] Update arm64 status files."
This reverts commit ff0a1d6b67 as
updating multiplier is better solution than updating status files.
Bug: http://dartbug.com/33659
Change-Id: I064964e1fafe9c77fb24d5e9c324927b75cbacb0
Reviewed-on: https://dart-review.googlesource.com/63340
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
As per bug #33351, and based upon what dart2js does.
Change-Id: I18fec2685b22b094d191f4c70a58553a9132b86c
Reviewed-on: https://dart-review.googlesource.com/60841
Reviewed-by: Kevin Millikin <kmillikin@google.com>
- make Dart2 the default option for the command line VM
- add option --no-preview-dart-2 as a fallback option to run dart1
- change test scripts to use the executable dart for testing dart2 mode instead of
pkg/vm/tool/dart2
- adjust numerous build and test configurations
Change-Id: Id813fa5b71a89c7ec9335d3f6e83cfc9f35f86e7
Reviewed-on: https://dart-review.googlesource.com/58240
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>