Commit Graph

2156 Commits

Author SHA1 Message Date
Jenny Messerly cb4b6157a2 fix #36205, static calls in dart:html should directly call the DOM
It looks like this code was implemented in the wrong place. At some
point reading the code (possibly during Kernel backend port), I noticed
this and left a TODO. This CL implements the solution described in it.

Change-Id: Iff837d471c87ec2fdb8f1a9a4afdb025af1a726f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97262
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-03-20 23:38:46 +00:00
Paul Berry 7d277c4a32 Introduce methods and classes to replace "2" variants left over from "UI as code" work.
The AST refactor for "UI as code" left behind a few things whose names
ended in "2".  This CL deprecates those things and creates
replacements that don't end in "2", so that we keep the API clean.  In
a future breaking change release of the analyzer we'll remove the
deprecated things.

The following methods and classes are added:
- ForStatement and ForStatementImpl
- ListLiteral.elements
- SetOrMapLiteral.elements
- AstVisitor.visitForStatement
- AstFactory.forStatement
- NodeLintRegistry.addForStatement

The following methods and classes are deprecated:
- ForStatement2 and ForStatement2Impl
- ListLiteral.elements2
- SetOrMapLiteral.elements2
- AstVisitor.visitForStatement2
- AstFactory.forStatement2
- NodeLintRegistry.addForStatement2

In a similar way to how we did the previous stage of AST migration,
the existing visitors have been modified so that the default
implementation of visitForStatement2 redirects to visitForStatement;
this allows clients to change their overrides of visitForStatement2 to
override visitForStatement instead.  Once all clients have been
migrated we will be able to delete the visitForStatement2 method.

Change-Id: Ife5949071fe4cb50791cd4f2f4b99a1bfaad54c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97360
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-03-20 22:58:55 +00:00
Konstantin Shcheglov 8556e97218 Remove ResultProvider and its implementations.
R=brianwilkerson@google.com

Change-Id: Ia946a4a68ad8a4da8a2f282a02a75fc809ec980a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97269
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-20 15:43:02 +00:00
Jens Johansen e9e0daee5c Add importUri and fileUri to Source.
This will enable the VM to map URIs to package-URIs to solve problems
such as https://github.com/dart-lang/sdk/issues/35859

Change-Id: I15520325a5b81a99a7e3f56c2e35fd775d9da946
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96905
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-20 08:44:33 +00:00
Paul Berry b18b626d78 Remove deprecated AST structures related to the "UI as code" feature.
This constitutes a breaking change, so the analyzer major version
number is bumped to 36.  Clients that have stopped using the removed
data structures (and the methods associated with them) should be
unaffected.

Change-Id: Iab68ecf8d10a13013ebb6b1198c54755225d0eb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-20 03:36:42 +00:00
Alan Knight 7eabbe70cd Make the --repl-compile option visible
Change-Id: I6da7062cf9357b2c8f53b980dc33827b7147f111
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97173
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2019-03-20 00:04:13 +00:00
Jenny Messerly 22c535ac6e [dartdevc] simplify code for emitting constants
This moves the code into a shared location (instead of being copied to
both of the Analyzer/Kernel-based backends), and removes support for
detecting type parameters in constants, which was allowed by strong
mode but is not legal in Dart 2.

Change-Id: Ic8bcf0aa1107bbb7147fd15b648a45e39478cef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96839
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-03-19 19:45:04 +00:00
Nicholas Shahan 55f3edadbe [dartdevc] Initial support for spread collections
- Only supports ddc with analyzer front end.
- Basic support for SpreadElement nodes used in collection literals.

Issue: #36006
Change-Id: I9b78c6ff34847625c8013a8e7af9a0f05a67541b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97045
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-19 16:56:08 +00:00
Stevie Strickland af5fc2d4d2 [VM] Partial support for named regexp captures.
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>
2019-03-19 10:40:15 +00:00
Aske Simon Christensen 1ea717f1c9 [CFE] Use Fasta diagnostics in constant evaluator.
The constant evaluator now generates all errors as Fasta diagnostic
messages. The ErrorReporter is simplified to just accept a diagnostic
message, or a notification that the constant evaluator encountered an
invalid expression (presumably put there due to an earlier error).

Also, the flow of control between the error reporter and the internal
abort exceptions is reversed, so the error reporter is now called as a
result of an abort exception being caught by the evaluate method.

Reland of https://dart-review.googlesource.com/c/sdk/+/96300

Change-Id: I7d32b6e98962b6ee781a6c96b593b00ee7fd8a89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97225
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 15:42:05 +00:00
Aske Simon Christensen 22718f4d60 [CFE] Always call the constant evaluator by the evaluate method.
Reland of https://dart-review.googlesource.com/c/sdk/+/96321

Change-Id: Ifb2b955d500c18a470503bad9f62f47e4c6a1fc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97117
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 15:42:05 +00:00
Aske Simon Christensen c10ee9971f [CFE] Move constant evaluator to Fasta.
Reland of https://dart-review.googlesource.com/c/sdk/+/96081

Change-Id: Ie9e6a0d26703469396fa6ea4803f49ce387f495b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97224
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 15:42:05 +00:00
William Hesse 3b2e368376 Revert 5 changes with failures
TBR=askesc@google.com

Revert "[CFE] Move constant evaluator to Fasta."

This reverts commit 845b5b2df1.

Revert "[CFE] Always call the constant evaluator by the evaluate method."

This reverts commit 91bc4ec2b9.

Revert "[CFE] Use Fasta diagnostics in the constant evaluator."

This reverts commit c7b572aa29.

Revert "[CFE] Check for null in constant evaluation"

This reverts commit e6d2751e9c.

Revert "Rename import after moving file."

This reverts commit a6e2c5eb4c.

Change-Id: Iadfe087c0110f6f331b82d990213f95d3ef4541b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97223
Reviewed-by: William Hesse <whesse@google.com>
2019-03-18 12:25:32 +00:00
Aske Simon Christensen c7b572aa29 [CFE] Use Fasta diagnostics in the constant evaluator.
The constant evaluator now generates all errors as Fasta diagnostic
messages. The ErrorReporter is simplified to just accept a diagnostic
message, or a notification that the constant evaluator encountered an
invalid expression (presumably put there due to an earlier error).

Also, the flow of control between the error reporter and the internal
abort exceptions is reversed, so the error reporter is now called as a
result of an abort exception being caught by the evaluate method.

Change-Id: I66f148cc4e202e328f895ae0b770f9b68c9f3c8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96300
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 10:42:14 +00:00
Aske Simon Christensen 91bc4ec2b9 [CFE] Always call the constant evaluator by the evaluate method.
Change-Id: I176139c98e968cd890a05c0517781f8fad4a0d7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96321
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-18 10:42:14 +00:00
Aske Simon Christensen 845b5b2df1 [CFE] Move constant evaluator to Fasta.
This is in preparation for recognizing Fasta-specific nodes in the
constant evaluator, and for using the Fasta diagnostics framework.

Change-Id: I8535fbb68e622f1814a1d577c348d87e573b6b34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96081
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 10:42:14 +00:00
Mark Zhou eeb8fc8ccd [dartdevc] Adding support for async operations in block expressions
Moving YieldFinder to shared_compiler


Change-Id: Id4d95447443929376f922005e10f66930630dfaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97040
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-03-17 22:03:22 +00:00
Jenny Messerly 68bfd72e44 [dartdevc] fix #36174, add flutter inspector transform to DDC
This is a temporary workaround to copy this file into DDC, based on
jacobr@'s suggestion. I tried to keep changes minimal.

Eventually this transform should be injected when Flutter SDK builds
DDC, rather than including it here. The transform is guarded behind
a flag, so build runner can decide whether to pass it (for now, it
could be hardcoded).

Change-Id: Id9d36456a726e6abb46b904321bc31db136d1c2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97022
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
2019-03-16 00:30:02 +00:00
Stephen Adams 7a90563ee3 [js_runtime] Try to avoid String.prototype.replace with replacement patterns
Change-Id: I4b063fe77592bbb0ad9f6ffb628c3bdd6323b20c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-03-15 21:51:15 +00:00
Stephen Adams 9b185051a9 Don't use lazy static initializer in Random.secure()
The lazy static initializer returns null after throwing on the first use.

Change-Id: I44fbb6f8af263dc5c813ed5dff2291fb27e48b4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96984
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-03-15 17:45:06 +00:00
Daco Harkes 638f13ff3d Revert "[ VM / dart:isolate ] Added ability to set names for spawned isolates."
This reverts commit 59525264e8.

Reason for revert: causes Flutter test observatory and protocol to deadlock.
Issue: https://github.com/dart-lang/sdk/issues/36232

Original change's description:
> [ VM / dart:isolate ] Added ability to set names for spawned isolates.
> 
> Fixes issue #34059
> 
> Change-Id: I315498b02edc184e9e408c93eddb78aa1a5a8a1d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/90341
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com,sigmund@google.com

Change-Id: I5f2115a2ac394a8d4c7c175bc97f2b88b65fcb49
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97107
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-03-15 14:40:37 +00:00
Mark Zhou 90d0443848 [dartdevc] Implementing block expressions and set constants
Change-Id: I8d04a6f256f41f7810e33c22a333d4807dad7049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95673
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-14 23:05:48 +00:00
Ben Konyi 59525264e8 [ VM / dart:isolate ] Added ability to set names for spawned isolates.
Fixes issue #34059

Change-Id: I315498b02edc184e9e408c93eddb78aa1a5a8a1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/90341
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-14 22:23:09 +00:00
Nicholas Shahan 0ee1413095 [dartdevc] Initial support for control flow collections
- Only supports ddc with analyzer frontend.
- Basic support for IfElement and ForElement nodes used in collection literals.

Issue: #36005
Change-Id: I0d93f8b5fa06c1dbbbf83eb3d9bd3a4834e32366
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95964
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-14 22:09:18 +00:00
Paul Berry 7c3ab264e5 Change link methods to take a DeclaredVariables object.
Change-Id: I6cc36f9152fb90642ec3261418e60ac3bdbe5acf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96922
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-14 19:52:24 +00:00
Konstantin Shcheglov eeb19b0416 Remove usages of ExtensionManager and package:plugin in general.
R=brianwilkerson@google.com

Change-Id: I489e72464474b3d40d7678f44562f65934f93288
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-14 15:31:08 +00:00
Paul Berry 31c47567dc Remove AnalysisOptionsForLink and plumb analysis options through linker.
This is a non-breaking change; the only way linking is exposed to
clients is through `SummaryBuilder`, which can get the analysis
options from the context.

Fixes #35747.

Change-Id: I273408f33a881ac32ab248cbc8f3e0644630563b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96829
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-13 22:39:53 +00:00
Lasse R.H. Nielsen 2e9ff26527 Fix overflow bug in BigInt implementations.
Fixes #36105

Bug: http://dartbug.com/36105
Change-Id: I9adf70d11474f844d2a4fbf5fcc3754562b1cf65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95644
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2019-03-08 16:11:08 +00:00
Aske Simon Christensen ff55d429f6 [kernel] Collection concatenation nodes.
These arise when the constant evaluator partially evaluates collections
containing spreads or control-flow constructs with unevaluated
subexpressions. They are removed by the final constant evaluation.

Change-Id: Icdd155c4805cbcefe6aa4b45c2f85ec258e7bd36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95760
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-03-08 13:08:55 +00:00
Kevin Millikin e8fa9a019b [ddc] Fix a front end test failure
This code causes a front_end test failure.  The code in question also
just looks wrong.

Change-Id: I8d3e7e4cd6fc4e919b48e5784bab84302b5639b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95657
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-03-07 08:47:13 +00:00
Mark Zhou 2f53b7913c [dartdevc] Including the current library for members from within an InstanceConstant
This resolves an issue where private fields of const objects would fail to properly initialize.

Change-Id: I587c27d2c2212929babc6b4168cffc9770ae9c86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95490
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-03-06 22:42:26 +00:00
Paul Berry 0124541d5f Deprecate AST data structures that will be obseleted by the "UI as code" feature
- ForStatement and ForEachStatement will be replaced by ForStatement2.
- MapLiteral and SetLiteral will be replaced by SetOrMapLiteral.

To ease the transition, the old classes are subtypes of the new
classes, so even though the analyzer still creates instances of the
old classes, clients should be able to start referring to the new
classes in their code.  The analyzer will stop creating instances of
MapLiteral and SetLiteral when the experimental flags for the "UI as
code" feature are turned on, and will stop creating instances of all 4
classes when we bump the major version number (which should happen
sometime in March).

For visitors, we've updated the base classes with the following default methods:
  visitForStatement(node) => visitForStatement2(node);
  visitForEachStatement(node) => visitForStatement2(node);
  visitMapLiteral(node) => visitSetOrMapLiteral(node);
  visitSetLiteral(node) => visitSetOrMapLiteral(node);

So clients should be able to start revising their visitors to override
the new visit methods rather than the old ones, and the visit methods
in the base classes will automatically forward to the new visit
methods.

Change-Id: Ifde3a2aa3c8c49ce4e65dfaabf086db4dabb73f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95665
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-06 21:43:50 +00:00
Aske Simon Christensen b5a1f6c36b Reland "[CFE] Move constant evaluation number semantics handling to front end."
This is a reland of c2b466b09f

Original change's description:
> [CFE] Move constant evaluation number semantics handling to front end.
> 
> JavaScript number semantics is currently implemented as the simplistic
> version previously present in DDC. This is a starting point for fully
> detailed JS number semantics.
> 
> Change-Id: Id728b3dacec892a5cbf7ece0d9faea51427f5f9b
> Reviewed-on: https://dart-review.googlesource.com/c/94746
> Commit-Queue: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

Change-Id: I1a488ef41bda819d34cb45cd481fd8fd88bfb01e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95460
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-06 10:30:37 +00:00
Jenny Messerly 5a8bdc7f34 [dartdevc] fix #36052, missing key in map should result in null
Change-Id: Ic32fb8689fd2163e162b80ad4682e9b10ba4eaee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94920
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-03-05 01:15:30 +00:00
Aske Simon Christensen 2b2e71770c [kernel] Add SetConstant node to Kernel.
Change-Id: I83da1afc9f15009c650a871a51ca8171b482d4df
Reviewed-on: https://dart-review.googlesource.com/c/94863
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-04 10:20:56 +00:00
Vijay Menon fa2d32e80a [ddc] Add api to query loaded libs
Change-Id: Ib82292081b1e7c1b08af9b57f8c8a0aef16cd0d8
Reviewed-on: https://dart-review.googlesource.com/c/94990
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-03-02 00:16:41 +00:00
Jenny Messerly 76d31a251e [dartdevc] fix hot restart static field reset
Fields are not currently getting reset after the 2nd time, unless the
module is reloaded. This moves the tracking to initialized fields,
rather than defined fields, which is more difficult to clear.

Change-Id: Ie25c151d16872fd330798aa3b7fb7ab0d8d14fc1
Reviewed-on: https://dart-review.googlesource.com/c/95060
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-03-01 23:56:01 +00:00
Régis Crelier c2a48ee065 [VM] Fix bigint left shift that could cause heap corruption when intrinsified.
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>
2019-03-01 18:59:10 +00:00
Aske Simon Christensen 1471b8e444 Revert "[CFE] Move constant evaluation number semantics handling to front end."
This reverts commit c2b466b09f.

Reason for revert: Broke precompiled, DDC and others.

Original change's description:
> [CFE] Move constant evaluation number semantics handling to front end.
> 
> JavaScript number semantics is currently implemented as the simplistic
> version previously present in DDC. This is a starting point for fully
> detailed JS number semantics.
> 
> Change-Id: Id728b3dacec892a5cbf7ece0d9faea51427f5f9b
> Reviewed-on: https://dart-review.googlesource.com/c/94746
> Commit-Queue: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

TBR=sigmund@google.com,askesc@google.com

Change-Id: I732c75b72df0e0f084ad2784349bee346ae5b7ed
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/95027
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-01 14:34:15 +00:00
Aske Simon Christensen c2b466b09f [CFE] Move constant evaluation number semantics handling to front end.
JavaScript number semantics is currently implemented as the simplistic
version previously present in DDC. This is a starting point for fully
detailed JS number semantics.

Change-Id: Id728b3dacec892a5cbf7ece0d9faea51427f5f9b
Reviewed-on: https://dart-review.googlesource.com/c/94746
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-01 13:30:53 +00:00
Alan Knight 19dbd70363 Catch errors in formatting function types
Change-Id: Ifa889ab486da4b86a2738857bf2c6d8a8ed0cfe4
Reviewed-on: https://dart-review.googlesource.com/c/93125
Commit-Queue: Alan Knight <alanknight@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-01 00:47:59 +00:00
Paul Berry c2e48195f0 Rename UiAsCodeVisitorMixin to UIAsCodeVisitorMixin
To conform to Dart style rules

Change-Id: I1cc7ef76d0d723725f6d0393ca6e2b7538fc2f3e
Reviewed-on: https://dart-review.googlesource.com/c/94900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-28 21:42:09 +00:00
Paul Berry 17195d2667 Eliminate uses of old AST node types from dev_compiler
Change-Id: I839ed26a159a48e39378e94b4884faf65e3bb028
Reviewed-on: https://dart-review.googlesource.com/c/94365
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-28 20:46:16 +00:00
Lasse R.H. Nielsen 7c70ab1817 Revert change that empirically doesn't improve code for dart2js stopwatch.
Change-Id: Ib7a29c51c9d503c251fb28be4edc0becdc0a68c2
Reviewed-on: https://dart-review.googlesource.com/c/94745
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2019-02-28 14:12:26 +00:00
Vijay Menon 3b8591d13e [ddc] Initial impl for invoking service extension
Change-Id: Ibdd61eb390c2b62641318ca60fb76b43a4a3cb27
Reviewed-on: https://dart-review.googlesource.com/c/94660
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-02-28 00:53:42 +00:00
Mike Fairhurst 1e2211bbb6 going to go ahead and just revert this. I don't think it is at all critical. Thanks for noticing the build failure Paul!
Revert "[DDC] Support implict casts in [ForLoopStatement2]"

This reverts commit b11cb39d66.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [DDC] Support implict casts in [ForLoopStatement2]
> 
> Change-Id: I3b34072fe5ddb9078b45802619aed374f52696f5
> Reviewed-on: https://dart-review.googlesource.com/c/94357
> Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Nicholas Shahan <nshahan@google.com>

TBR=mfairhurst@google.com,nshahan@google.com

Change-Id: I8f7b5252c3377a13fcb15c927d6bc6d718488bfd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94560
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-02-27 15:38:28 +00:00
Lasse R.H. Nielsen 40bab34fbd Fix Stopwatch timers to not overflow on intermediate computations.
With a nanosecond tick counter, the elapsedMicroseconds getter
could overflow if a stopwatch runs for only ~2.5 hours.

Change-Id: I10cb54bba928713a3127a6bfbd19346b01d775b0
Reviewed-on: https://dart-review.googlesource.com/c/94381
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-02-27 09:56:12 +00:00
Mark Zhou 2d58ea3b42 [dartdevc] fix #35554, throw NullThrownError when null is thrown
Change-Id: Ib792b8c30b8ddb91da07a3f16fb4450379139d95
Reviewed-on: https://dart-review.googlesource.com/c/94321
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Mark Zhou <markzipan@google.com>
2019-02-26 23:02:25 +00:00
Mike Fairhurst b11cb39d66 [DDC] Support implict casts in [ForLoopStatement2]
Change-Id: I3b34072fe5ddb9078b45802619aed374f52696f5
Reviewed-on: https://dart-review.googlesource.com/c/94357
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-02-26 22:42:25 +00:00
Mark Zhou 6532b24d71 Implementing constant visitors.
Did a couple of sweeps to discover which parts of the code will be "safe" to remove when we commit to the change (but this is incomplete).

Note: these changes don't contain some backend const checks.

experimental flag: constant-update-2018

Change-Id: Ibe1e0bc530db21dac1d678f02610cc0070340776
Reviewed-on: https://dart-review.googlesource.com/c/93720
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-02-23 00:00:31 +00:00