Commit Graph

4184 Commits

Author SHA1 Message Date
Johnni Winther 5b569a62d2 Remove code for supporting for generating code with compile time error
We don't support that currently and if we want to at some point in the future,
I'd rather implement it from scratch, and the current implementation tightly
couples various parts of the compiler to the `Compiler` object.

Change-Id: I6934df41bb363ea9a693a8181b5a0355774ba4b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101286
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-06 08:53:24 +00:00
Johnni Winther ba3dba3a00 Remove JavaScriptConstantTask and JavaScriptConstantCompiler
Change-Id: I85faab292604b977de2812a6530f7e3403d870bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101285
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-06 08:53:24 +00:00
Johnni Winther 102f4addda Include the static type in the receiver type of dynamic invoke
- and preserve the original receiver type information during type propagation updates.

Change-Id: I20087b282a3d018947043d7a3ab7c45f003eaee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100966
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-03 07:52:22 +00:00
Johnni Winther 8053c43dde Compute static types for for-in loops
Change-Id: I47e98eaf6df7d04286cb737bfdff135e6c0d34d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100843
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-01 14:06:39 +00:00
Johnni Winther 8d4816b7ff Reimplement member usage tracking
We now track member usage in terms of static, dynamic and super access
for reads, writes and invocations. The information collected during
closed world computation is now the basis for the potential member usage
in codegen, thus ensuring that we cannot conclude in codegen that for
instance a field is read dynamically when the closed world knows that
it is never read dynamically.

Closes #36516

Change-Id: I3a1cb87c71268c34bcd67e14a035d9d1be324ab0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100840
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-01 08:58:34 +00:00
Johnni Winther 7e0d76c5dd Compute BuiltWorld properties from member usage
Change-Id: I8a58d303c1c699aae2d6fe3a6dfdc43547b003a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-27 13:47:06 +00:00
Johnni Winther a1dd732ec6 Extract WorldBuilder results into an immutable BuiltWorld object
For resolution this is the KClosedWorld and for codegen this is the new
CodegenWorld object. This change removes the use of the world builders
after the world building has ended. It prepares for computing more of the
result data from the collected member usages.

Change-Id: I80032e3fc0e29179137b8c0380f09f68ab6fa03b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100540
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-26 07:52:58 +00:00
Johnni Winther 5fc8029587 Remove StaticMemberUsage and cleanup codegen world builder
Change-Id: I4fdc6148af671010d1aca55c05d08e55e9c1e9fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100245
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-25 08:45:20 +00:00
Johnni Winther c4ab0d2014 Inline create methods in JsKernelToElementMap
Change-Id: I911c7c81056f07dd15c23162489bbcd8bda5d05b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100221
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-24 06:57:16 +00:00
Johnni Winther 58ff41ad33 Add test for static tear-off
- to document the change (for the better) with CFE constant

Change-Id: I9b6673497fe07ccd4f92fc4c22df0ae3205f72a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99152
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-16 07:06:12 +00:00
Johnni Winther 394f88d5cf Create source information from ConstantExpression
(now that it has a fileOffset)

Change-Id: I057ca3cf04a941ccdb03a6d8ca58947650b1cbec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99161
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-12 07:37:17 +00:00
Mayank Patke b9cbb679f3 [dart2js] Add --experiment-new-rti flag.
This flag doesn't affect any behavior yet, but we can start implementing
the new RTI system behind it.

Change-Id: I8c6ae6c60a97394c628f68876e086d455a815ca1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98925
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-04-11 18:38:48 +00:00
Mayank Patke 919461badd Ensure boolified SSA nodes are non-null first.
Fixes https://github.com/dart-lang/sdk/issues/34147.

The Dart language specification says we should ensure booleans are
non-null in the following (non-exhaustive) situations:
* (ternary) conditional expressions - this includes the `!` operator
since `!x` is equivalent to `x ? false : true`
* arguments to logical boolean expressions (`||` and `&&`), modulo
short-circuiting
* `if` conditions
* `for` loop conditions
* `while` conditions
* `do`/`while` conditions

With control-flow-collections enabled, this CL will also cover
conditions in `if` elements and `for` elements. Tests for these already
exist in
language_2/control_flow_collections/{if,for}_null_condition_test.dart.

Change-Id: I2ce9a30adeb16a0a68411f358f69aeca08656dab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98780
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-10 00:28:10 +00:00
Johnni Winther 45a5349175 Track constant field initializers for field analysis.
Change-Id: I536975d235cbf7722b03aa7b0e2c9edd7c206484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98852
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-09 16:30:27 +00:00
Johnni Winther 4fc0e1f13d Use .nullType as type of null and fix null type handling in getStaticTypeAsInstanceOf
The .getStaticType results for NullLiteral and NullConstant are inconsistent. The former returns `const BottomType()` and the latter return `TypeEnvironment.nullType`.

To avoid this inconsistency and since `const BottomType()` is really the "unreachable" type, used for instance of for the type of a throw expression, the implementation is changed to consistently use the .nullType.

For this to work, getStaticTypeAsInstanceOf (and the equivalent dart2js implementation), and the `Type.fromStaticType` constructor in the VM type flow analysis have to special case the .nullType.

Change-Id: If6b806d4a39ef7b906275c43fa2089b9d140523b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98563
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-09 06:49:17 +00:00
Aske Simon Christensen a069ddda21 [CFE] Produce InstanceCreation from unevaluated constructor invocation.
Thread assert enable flag through in dart2js to make the dart2js cfe
constant evaluation unit test properly pass the flag.

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

Change-Id: Ie4ac86ce96feda1548120fed54ece9ca03387496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98570
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 12:22:50 +00:00
Mayank Patke 2f77af1c6f Fold identical(double.nan, double.nan) => false in dart2js.
Change-Id: Idc6b064e330af71bbc8525a48874d332d84f404a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98607
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-04-03 21:14:31 +00:00
Sigmund Cherem 35f45cf3f1 Remove _mainLibraryUri, replace with user-code-locations
This prepares the compiler to accept a modular mode that contains several
libraries as user-code locations

Change-Id: I04f6c1fe36eea23de79b3573855896c560996fe1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98457
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-04-03 19:34:41 +00:00
Sigmund Cherem 5fffa99993 Add helper method to clear batch-mode state
This is minor clean up step before adding modular support.

Change-Id: If06333d89c0484e76bfe51e60e344791c3a61be3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98456
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-04-03 19:34:41 +00:00
Johnni Winther 93d0e8279a Include liveness of type arguments in supertypes in RTI needed checks computation
Including supertypes (and not just superclasses) this time.

Change-Id: Ib398f6f2fab0ae502dd754727b482641793dd225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98569
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-03 15:03:46 +00:00
Johnni Winther 78fca5b2fa Include liveness of type argument in supertypes in RTI needed checks computation
Change-Id: Ifdde3e8694f8d39ccf10cac0d5dc2cb3cb9225bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98560
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-03 10:23:53 +00:00
Mayank Patke 335a854696 Implement JavaScript semantics for frontend constant folding.
Change-Id: I8232d0f5875d8471d8110582c44fc9d9b8a735f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98240
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-02 22:37:46 +00:00
Sigmund Cherem c26f1c6bf7 Do not assume stack trace is not null
Change-Id: Ib795cfdbcf9599f7e4bc2688b9a965f50c0b7c3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98421
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-04-02 00:02:53 +00:00
Johnni Winther 1a3e8dda3b Handle nested unevaluated constants in constant evaluator
The constant evaluator assumed that any ConstantExpression met during evaluation of a sub expression was not an unevaluated constant. This do occur, for instance when a field is initialized to an unevaluated constant. With the change, unevaluated constants met during evaluation are themselves evaluated.

This change also fixed handling of assert initializers in unevaluated constants.

Change-Id: Id9e676f40bc829c4d234f34a74ef0ca5c4c6ec48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98348
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-01 14:29:32 +00:00
Johnni Winther 05dd851566 Test late CFE constant evaluation.
Tests that dart2js can handle evaluation of unevaluated constants from CFE, including handling of potential compile-time errors found during evaluation.

The CL fixes a bug in the constant evaluator where it created map literals that were not marked as constant as needed.

Change-Id: I7df77a3c68e52392a143478b3567d19e09ebe6bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98347
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-01 13:05:52 +00:00
Johnni Winther 7ef28f0b03 Handle constant field init registration correctly.
+ avoid side-effects of checking enqueuer invariants

Change-Id: Id327371bc70e4b1b5fd4d326b8c8cf8caf50ea0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98142
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-29 16:44:15 +00:00
Johnni Winther da0de0a867 Handle native field impact correctly from ir constants
Change-Id: I0393fd57b78c7cb417888ec3e0ff139b888bf3a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98322
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-29 16:41:55 +00:00
Johnni Winther 05f3b12960 Add test for native declarations
Change-Id: Iea9d8d27e6fdefa6f47471a459cdb4363aab65e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98011
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-28 10:29:11 +00:00
Johnni Winther b978fdd142 Move experimental flag defaults to CFE
Change-Id: I9f1890f349fb19bbd792af071adc14ad4e50c364
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98010
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-28 10:19:51 +00:00
Johnni Winther 7baae76480 Always use ir constants in annotations when constant-update-2018 is enabled
Change-Id: Ib5ba6a908904c36a8580f6f47424b6982800dddd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98002
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-28 09:34:21 +00:00
Johnni Winther 10abacba10 Use hasOnlyNonDeferredImportPathsToConstant to add deferred constants
Change-Id: Ifd8b733c526fe4e7ae837a7d17c682e91717feb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98013
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-28 09:17:31 +00:00
Stephen Adams f226f4ff24 Improve type of typed-array load
- Typed array elements are never null, but type inference sometimes
  thinks they are.

- Annotated isNan and isFinite as pure.

Change-Id: I5fffd237374444db27665009cf550b26563bcf55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98046
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-03-27 23:22:50 +00:00
Johnni Winther 8a92d2a8d9 Collect types deeply for deferred loading
Change-Id: I7bbd9499975c78fcdcfa88ceba31cb2e8e5a7cc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97639
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-27 11:08:37 +00:00
Mayank Patke 419243fc4e Add support for BlockExpression.
Since we already have support for Block in our visitors, we can extend
them to support BlockExpression fairly easily.

co19_2 and language_2 tests still need to be unskipped, but we can't do
that until CFE respects the --enable-experiment=control-flow-collections
flag.

Change-Id: I48da19cc33dbf35c5ead3ea13266b01d3e0de959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97820
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-26 21:56:51 +00:00
Johnni Winther a8e51c5868 Bypass use of dart2js_platform.dill when experimental flags are non-default
Change-Id: I95e654c6c2a430f7aebb30ced92b33cd35aadca3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97634
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-03-26 13:18:24 +00:00
Sigmund Cherem ee79ca9a74 dart2js support for loading .dill files built modularly
Change-Id: Ie360b13b5be786df9101c96982400136c63dff00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97462
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-03-22 21:16:21 +00:00
Johnni Winther 87c553bf3c Ascribe constants to the member world impacts
Change-Id: I978a6453196b47dd4ed5f51dde1d81feaa4f2008
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97502
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-22 12:58:40 +00:00
Johnni Winther 3de6276ad6 Handle deferred constants in the ssa builder
Change-Id: I8fc5e4f01d00a0f1b5ad1b2b51495476f0ec625e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97328
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-22 09:06:03 +00:00
Johnni Winther 7dd4259d87 Handle ir constants in inferrer
Change-Id: Ie7b6ff9e62b3b8c78f6c04359cb72f77b249440c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97240
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-21 11:25:40 +00:00
Johnni Winther 8915407f2c Support computation of NativeData directly from IrAnnotationData
Change-Id: Ie11791b61e1ffbc011959d6d7a9f0a502cb1c74f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97114
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-21 10:44:21 +00:00
Nate Bosch b78e386bbb Remove ConstantUseKind enum
There is nothing constructing a `ConstantUse` through any path with a
use kind of `Indirect`.

- Remove the kind field and the only place reading it. Treat it as
  always `DIRECT`.
- Remove the unused `mirrors` and `typeVariableMirror` constructors.
- Preserve other named constructors even though they behave identically to avoid
  losing context at use sites.
- Make the `hashCode` getter lazy since it is only forwarding to the `value`.

Change-Id: I69a36fac245c74794b65e617b8cdd445a937bbee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97343
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-20 17:41:29 +00:00
Johnni Winther c4c0db440c Handle ir constants in noSuchMethod handling and deferred load
Change-Id: Ic57e44bd3f03d88119962c235fb6f136785d9ac1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97118
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-20 10:18:13 +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
Nate Bosch 7e14f2aded Removed mirror methods from DeferredLoadTask
These methods are not used and the only implementation throws.

Change-Id: I0174f9fd43447b8f49f63844a39aa90d40258f64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97348
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-03-20 00:15:12 +00:00
Nate Bosch dec7e65334 Delete Flags.enableExperimentalMirrors
Nothing is reading this option.

- Change the option handler to ignore to avoid breaking users passing it
  anyway.
- Remove the Flag constant.
- Remove the option.

Change-Id: I62f3b6ce7b3cf38ad310576b011d27ac78353fde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97346
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-03-20 00:11:54 +00:00
Nate Bosch 33100aa1ce Delete some copy/pasted doc comments
Where we have an `@override` which duplicate's the super types doc
comment it is not adding anything useful and can be removed.

Also do some minor comment cleanup where feasible:
- Introduce blank lines following the first sentence to follow effective
  dart guidelines.
- Change non-doc comments to use two slashes.
- Where comments were improved after being pasted, bring the improvement
  to the original comment.
- Move comments where there was no comment on the super type but the
  subtype comment clearly applied.

Change-Id: I61b5eca79f692641ce96c5c9d26fa3731c8e230e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97008
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-03-19 18:43:07 +00:00
Johnni Winther 9c9ab11450 Reland "Handle ir constants in field analysis and impact tests"
Include initial handling of unevaluated constants from environment.

Change-Id: I288801b42a9e25e440baa3eac9ce88263acea0a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97241
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2019-03-18 17:57:55 +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
Aske Simon Christensen e62391a162 Revert "Handle ir constants in field analysis and impact tests"
This reverts commit 0cd89e5bd1.

Reason for revert: Conflicts with move of constant evaluator.

Original change's description:
> Handle ir constants in field analysis and impact tests
> 
> Include initial handling of unevaluated constants from environment.
> 
> Change-Id: Ibd330a14dfabad1dee95b64ce7015939412374d3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97112
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

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

Change-Id: Ie01c7dda6152abbf852cd40a00597f019db49e66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97116
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-18 13:01:11 +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