Commit Graph

6018 Commits

Author SHA1 Message Date
Jens Johansen 43937aa9ca Don't let expression compilation bleed into real library
If an expression compilation issues problems of any sort, they are saved
in the target-libraries problemsAsJson field. That's not ideal,
as it means that they can be re-issued later, as well as possibly being
serialized into the dill file.

This CL resets the problemsAsJson field of the real library,
thus fixing the issue.

Change-Id: I765c2cc50059c6bcda6a56bb749869dd4b181876
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-30 11:38:48 +00:00
Jens Johansen 054d1a301c Another test for reissuing problems
Test that we don't reissue problems for unreferenced libraries.

Change-Id: I5cf223ead48d2cd1dac293899495a46f92f4a495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96785
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-30 11:05:53 +00:00
Jens Johansen 0325d50db2 [CFE] Add disambiguation for type parameters if needed
Change-Id: I440d8aabbc0eb3fe4242c769cca5ccef2dfe8948
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99150
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-30 11:00:58 +00:00
Jens Johansen d8739b582b Don't try to initialize from empty dill
Change-Id: I2de43e4a3959e494927455ce321620c77c3a7d36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97309
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-30 10:57:48 +00:00
Paul Berry e2d0f5a50b Add featureSet parameter to Parser constructor.
And deprecate old parser configuration setters.

Change-Id: Ib1507b8d2b20be7c883061e2a92ec9205d6a378f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100664
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-29 16:42:19 +00:00
Paul Berry 3d0cdc8956 Switch perf.dart completely over to Fasta parser.
The only remaining code in perf.dart that was using the legacy
analyzer parser was in parseDirectives, which is part of setup, and
not part of the code being performance tested, so there should be no
effect on the benchmark.

Change-Id: I4676b10c367d477499c96f5220e622bb390752a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100680
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-29 13:04:38 +00:00
Jens Johansen ed8e4255a4 Proposed fix to #36644
TL;DR: Unbind canonical names doesn't do what you think it does and
probably shouldn't (ever) be used. This CL stops using it in a few places.

Longer version:

When loading a dill file it:
- First loads the table of canonical names. These have no references yet.
- When a canonical name is asked for its reference it creates one if it
  doesn't yet have one.
- When loading, for instance, a library, it asks for the reference.

When unbinding a canonical name:
- It removes itself (the canonical name) from the reference
- It removes the reference in itself
- Note: Whatever has a pointer to the reference keeps it, and the
  reference points to whatever node it already pointed to.

This also means, that if we have a dill file that's split in two and:
- Load #1
- Load #2
that works fine, but if we
- Load #1
- Unbind canonical names
- Binds canonical names
- Load #2
stuff is not bound correctly (and an error is thrown).

And - the cause of this bug:
- Load #1
- Load #2
everything is fine
- Unbind canonical names
- Binds canonical names
- Load #2'
stuff is not bound correctly --- references points to stuff loaded as #2,
not as #2'. On top of being weird, wrong and confusing it also caused wrong
things to be but into the class hierarchy which ultimatly caused the crash.

This CL fixes it by not calling unbind and force loading of dill files
(at specific call sites) to create new libraries
(and in the process overwriting references ".node").

Revert "[dartdevc] Retry ddc incremental compile on crash"

This reverts commit ecdbdf00b8.

Revert "[kernel_worker] retry on failure"

This reverts commit 43eebea5a3.

Fixes #36644

Bug: #36644
Change-Id: Id8f548179e6a409b01f2ebfa3219f94cb64b1c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100380
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-26 07:18:28 +00:00
Paul Berry d6a09ff02f Prepare to publish analyzer version 0.36.2
Change-Id: I4ae73e8a55cf8c0d013152eb15bea74f2c1f69e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100321
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-24 02:32:36 +00:00
danrubel 81b028de78 cleanup some error codes
* replace CovariantAfterFinal with ModifierOutOfOrder
* replace ConstAndCovariant with ConflictingModifiers

Change-Id: If09551a28d4bffecaf009b4e836a67dfc939c0bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-23 14:22:12 +00:00
Brian Wilkerson 390ba6925d Allow nnbd to be enabled in tests
Change-Id: Iafe7abc132c664b0b16109b3c5d6fd8a6ac3b0c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100083
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-22 19:11:08 +00:00
Paul Berry 2d6313c9e4 Prepare to publish analyzer version 0.36.1
Change-Id: I84e132ff2b2635cc5703a58c88f5ab1767e4970e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-22 18:05:19 +00:00
Dan Rubel 08832508ec Forward "late" modifier to parser listeners
... and update parser tests to use preNonNullable feature set
to address comments in https://dart-review.googlesource.com/c/sdk/+/99963

Change-Id: I3a3293d65805807b7b95e887f829f3f0080ae3b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99964
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-22 17:20:10 +00:00
Dan Rubel fd48001ace Put NNBD modifiers behind a flag
Fix https://github.com/dart-lang/sdk/issues/36691

Change-Id: I48aa72eb6a4aa63d072089baaf99d249763095fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99963
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-22 15:31:09 +00:00
danrubel a2e06eafff allow built-in keywords as identifier in for-in loop
Fix https://github.com/dart-lang/sdk/issues/36678

Change-Id: I2af3a21e96c5654b12c199fc71d87f088e9d739d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99904
Auto-Submit: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-19 19:07:11 +00:00
danrubel 3ae2ef7763 parse "late" modifier
This updates the parser to recognize the "late" modifier and produce
errors when it is used improperly, but not yet notify the listeners.
Listeners will be updated in a subsequent CL.

Change-Id: Id15dfb1e3763872256e2ec93c83cf58adda096d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99786
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-19 01:25:26 +00:00
danrubel 0c0e49cd11 update keyword list to include "late" modifier
Change-Id: I10d815d78d8198749680af1b56eff8eb31a6f895
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-18 19:59:29 +00:00
danrubel 6384f629c0 new conflicting-modifiers error code
This adds a new "conflicting modifiers" error code for new NNBD
modifier errors and replaces the existing "const and var" error
code with the new error code.

Change-Id: I1997bbb7f66e62d2de3c5042b6ea85861f2e00d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-18 16:44:08 +00:00
danrubel f3703c1bce change "late" from built-in to keyword
Change-Id: I851bc1a6db305c6fa7f5be001af1632d6d69aa2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99739
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-18 16:42:28 +00:00
Dan Rubel ca28e2c8ce forward "required" modifier to parser listeners
... and have each report an error by default

Change-Id: If818a7bb207becbed95a97890632a1803917d285
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 21:19:51 +00:00
Dan Rubel dd3530450d make "late" and "required" builtin keywords
Change-Id: Ia352ec979bc04edcb1e9ee9733a3f86d8e5ce1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99644
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-17 18:51:01 +00:00
Dan Rubel 81e554ea43 parse "required" modifier for NNBD
This updates the parser to recognize the "required" modifier
but always reports an error when it is detected.
A subsequent CL will update the listeners to handle the new modifier.

This also cleans up ModifierContext initialization
and adds a new pseudo-keyword-used-as-type test

Change-Id: I83f9a6b410c2bfb3476e691d3e8482bf7c97b0dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99643
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-17 17:54:00 +00:00
Dan Rubel ebdefa3f5f add new "late" and "required" modifiers
Change-Id: Iec0acac1bb4280f31bd32297543eceb54f87f1ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-17 15:01:36 +00:00
Sigmund Cherem 523666a97a Fix messages_test.
Now that the feature is enabled by default, this status file needed to be updated.

TBR=dmitryas@google.com

Change-Id: Ib9ca7350e40da31fab7804fbcd89ca54180d5bd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99620
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-16 21:38:09 +00:00
Sigmund Cherem 8e73b3c006 Enable ui-as-code features.
Change-Id: I97781ffe5144c4b959cb3cb720e9cd06c22928ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99283
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-04-16 21:29:55 +00:00
Sigmund Cherem 4b7d256a06 Revert "Enable constant-update-2018 by default." and "Update .expect files in pkg/front_end after e9ca6a53"
This reverts commit e9ca6a5335 and d3e00fd35e.

Change-Id: I346d6156be19c4fceffa202a7ce9bfa931c7c14b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-16 20:20:12 +00:00
Sigmund Cherem f175b0baf8 Report errors for using control-flow and spread features in a const context
CFE detects the const context while parsing, so we can report the error message
early on before we do any transformations.

Change-Id: Ib1cadb28366eb6a9a18612206aa155b04a4a5b32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99540
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-16 19:50:55 +00:00
Dan Rubel 80dd5ca3d4 new "modifier out of order" error code
This replaces the const-after-factory error code
with a more general modifier-out-of-order error code.

Change-Id: I71baf2c96656241475c344cb33b887d8e0d456fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-16 19:28:55 +00:00
Johnni Winther 5af34ea93d [CFE] Handle invalid constant string interpolation in unevaluated constant expressions
Non-primitive constants were incorrectly stringified in an unevaluated
context. These are now, as with unevaluated constants, checked when the
string concatenation is fully evaluated.

Closes #36609

Change-Id: Ia3266ebcb9d497b277690244569812f7cd3e30c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99461
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2019-04-16 16:05:05 +00:00
Kevin Millikin e42a8032fb [cfe] Remove uninferred initializers from outlines
When performing top-level type inference based on overrides for fields
that have initializers, we never perform type inference for the
initializers.  Since type inference is the thing that rewrites shadow
AST nodes with their Kernel translation, we are left with
untransformed shadow nodes that cannot be serialized.

Instead, remove these initializers.  Fixes
https://github.com/dart-lang/sdk/issues/36498

Change-Id: I044fadd897e9f2d0e37f5ce0e5adaadb0e42a992
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99120
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-15 16:17:35 +00:00
Dmitry Stefantsov 4b42f87971 Remove unused import
Change-Id: I48175f0eecbd53fbe0c02b70c0a5f4d27ba88764
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99155
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-04-15 15:45:24 +00:00
Dmitry Stefantsov d3e00fd35e Update .expect files in pkg/front_end after e9ca6a53
TBR=askesc@google.com

Change-Id: I65e263c7ee627f94bc314346a322953f9e954899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99174
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-04-15 14:40:24 +00:00
Paul Berry 22a843a23d Fix precedence of postfix "!" operator
Change-Id: I00446e15cd7e19285b35742a1936c36b1faf4774
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99282
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-13 16:20:22 +00:00
Paul Berry f3dbfee467 Fix the error message template for EXPERIMENT_NOT_ENABLED.
Given an experiment named foo, it doesn't make sense to ask the user
to enable experiment --foo, since that's not the syntax for enabling
an experiment (the syntax is --enable-experiment=foo).  Changed to
'foo'.

Change-Id: I055461fb389a4338578fc7f260e252b8e3fe9a13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99286
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-13 16:19:23 +00:00
danrubel 2e7bd1359d parse dart language version comment
This updates the parser to recognize a language version comment
of the form

// @dart = <major>.<minor>

as specified in
https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/language-versioning.md#individual-library-language-version-override

Change-Id: I884620ac7da86025f5b408bcba8dd1f77e4c523c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99261
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-13 13:09:22 +00:00
Aske Simon Christensen e9ca6a5335 Enable constant-update-2018 by default.
Fixes https://github.com/dart-lang/sdk/issues/32517
Fixes https://github.com/dart-lang/sdk/issues/34189
Fixes https://github.com/dart-lang/sdk/issues/34192
Fixes https://github.com/dart-lang/sdk/issues/34205

Unskipping the skipped tests is tracked by
https://github.com/dart-lang/sdk/issues/36433 and
https://github.com/dart-lang/sdk/issues/36595.

Expectation files for front-end tests will need to be updated to make
front-end builders green. They are part of unapprovable suites.

Change-Id: I311f449af6feff5bf40740227a95aa06e0a9d84f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99169
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-12 13:30:15 +00:00
Aske Simon Christensen 4ed24862ee [CFE] Extra dummy SDK classes that the constant evaluator needs.
Change-Id: Ib82db42686f5b075e7c3a282e7c370849c4c28e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99167
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-12 11:03:11 +00:00
Aske Simon Christensen a3d13fbf54 [CFE] Option to report error on unevaluated constants.
Fixes https://github.com/dart-lang/sdk/issues/36565

Change-Id: I011e4b5242a02e06392af01ad77615c694fb62ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99121
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-04-12 08:15:57 +00:00
danrubel 5dd89ef9a0 fix invalid var init parser recovery
Fix https://github.com/Dart-Code/Dart-Code/issues/1548

Change-Id: Ib593c17fa8dfcee3c8ad139b72ceff56497d43a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99093
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-11 18:42:02 +00:00
Aske Simon Christensen f7ad0c4de8 [CFE] Avoid spurious circularity error when an error is evaluated again.
Fixes https://github.com/dart-lang/sdk/issues/36563

Change-Id: Ic078ad1f380ee92513948c5f85560db3c6a2941f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99163
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-11 13:45:14 +00:00
Jens Johansen f919c3985b Proper offstes on mixin classes
Change-Id: I1e7fcdae5713e8017aaf81e87afba20e59b9f789
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98338
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-11 12:32:44 +00:00
Jens Johansen 7f3ced4333 Set proper startCharOffset on enum classes
Change-Id: I2edf7b5484e4c0fc9728644c5e1166fb3adcd909
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98353
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-11 12:20:44 +00:00
Jens Johansen 6609ea21e2 Proper endoffset on enum classes
Change-Id: Ia6e04b8f84dbe9600d7d9a7fab17cb25e8c5a170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98345
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-11 12:19:44 +00:00
Jens Johansen 460d00616c Better printing of imports
Before a import of, say "hello.dart" was printed as
"import './hello.dart'".
Now instead it is printed as "import 'hello.dart'".

At the same time we get rid of a dependency.

Change-Id: I352f0f507168fde75358704ec9bf0e248bb8179d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98480
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-11 11:43:23 +00:00
Sigmund Cherem 5cc9455b65 scanner-tool: add explicit command-line arguments to enable printing tokens
This will be used instead of -DprintTokens=true.

Context: we use this tool in bazel where we use a modular pipeline. That
pipeline will no longer support dart environment variables due to
https://github.com/dart-lang/sdk/issues/36513.

In this specific file the intent was anyways to pass an option when
launching the program, so a command-line option is appropriate IMO.

Change-Id: I5187190a01afe59aef57ec6a7311b1e380313a81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99102
Reviewed-by: Ari Aye <ariaye@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-04-10 22:57:04 +00:00
Mayank Patke ab66a3808b Add more JS subtyping semantics to CFE constant evaluator.
If we're targeting a JS backend, `isSubtype` considers every int to be a
double. We need to additionally allow any integer-valued double to be an
int. This mainly allows us to handle signed zeroes correctly.

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

Change-Id: I00d1e693bb3f1268ac100a76c9bec8fcc612b182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99101
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-10 21:09:03 +00:00
Kevin Millikin ac02811081 [cfe] Allow expression compilation with constant-update-2018
Allow expressions to be compiled by the VM but without evaluating
constants.  This will use the VM's C++ constant evaluator.

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

Change-Id: Icd6e769e53db5d211a083d1f5cff7ddf88cc4da2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98675
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-10 14:13:56 +00:00
Dmitry Stefantsov 4ab4545ff7 [cfe] Add type and file offset to constant expressions
Closes #36471.

Bug: http://dartbug.com/36471
Change-Id: I5ac294057f2f69f1a8edfdf1106f65908fc257ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98677
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-10 09:55:36 +00:00
Ben Konyi 15b11b0183 [ VM / Service / Observatory ] The VM service now requires an authentication code by default.
Previously, a valid web socket connection would use the following URI:

`ws://127.0.0.1/ws`

Now, by default, the VM service requires a connection to be made with a
URI similar to the following:

`ws://127.0.0.1:8181/Ug_U0QVsqFs=/ws`

where `Ug_U0QVsqFs` is an authentication code generated and shared by the
service.

This behavior can be disabled with the `--disable-service-auth-codes`
flag.

Change-Id: I288aac58e3ba9d35dca8071f3f7e7a073896c271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98433
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-09 22:57:29 +00:00
Dmitry Stefantsov 1daac5c976 [cfe] Do the requested clean-up after implementing ui-as-code features
Change-Id: Ife3f816ca67ef3f43c13abd5563181ed29d05ed2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98668
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-09 11:37:28 +00:00
Vijay Menon 94baf382cc Revert "Revert "set empty environment defines to CompilerOptions""
Per our internal discussion, we need this afterall: see b/129881700

Change-Id: I2c1deebaa68640944fa83df1850be0dce40b188f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98805
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-04-08 14:15:53 +00:00