Commit Graph

2004 Commits

Author SHA1 Message Date
Aske Simon Christensen dee64581ad [fasta] Option for controlling message debugging stack traces
Change-Id: Ib15be633f19e37d9d2c243f88ae36f4f589eacd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120663
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-10-08 12:40:12 +00:00
Dmitry Stefantsov caaa78d8c6 [cfe] Use legacy types explicitly in internal subtype testing
Change-Id: I416d543d02093b900e36c464bce11e53cb3251f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120662
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-10-08 11:21:20 +00:00
Jens Johansen 41c11716b0 [kernel] Make round-trip script work; improve fastas compare dill tool
Change-Id: I194987772349f6c673263662346a28560ecb168a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120645
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-08 09:55:37 +00:00
Johnni Winther 9276d50fdc [cfe] Remove Severity.errorLegacyWarning
Change-Id: I1cc7a34af307b9edee4c92e43e8607a450cf471d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120585
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-10-08 09:16:47 +00:00
Paul Berry 55466fd3cc Flow analysis: Remove AssignedVariables.capturedAnywhere.
This was intended to capture the set of variables captured anywhere in
a given function, but it doesn't actually work that way, because we
use a single AssignedVariables instance for the entire file.  But
that's no problem; we can just track variables captured within the
function using AssignedVariables.capturedInNode().

Change-Id: I2c39f40029203f275cf9b3284c6077de089b91fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120501
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-07 13:45:59 +00:00
Johnni Winther 8413a0db0d [cfe] Add *BuilderImpl
In preparation for creating a clean implementable interface for various
builder classes. This is in turn a precursor for deprecating
Builder.target

Change-Id: I83910e84da149775f46c0be4b10f7694fadd0a7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119843
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-10-04 12:24:45 +00:00
Johnni Winther 967673c005 [cfe] Introduce ClassMember
Use interface ClassMember instead of Builder in ClassHierarchyBuilder.
This avoids the coupling between DelayedMember and Builder and is a
precursor to removing Builder.target.

Change-Id: Ie2067512051618a60fcb94b5aae7e7f3d8c02b15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119644
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-10-03 09:49:01 +00:00
Jens Johansen 396608e35d [CFE] Update parser test framework to work with extensions
Change-Id: I7e3fa005470a66e33da12ee71235020fb53e8767
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119840
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-03 08:29:51 +00:00
Dmitry Stefantsov bdf6b9505e [cfe] Ask for subtype checking mode explicitly
The interpretation of the subtype check result depends on the mode.  In partial
NNBD mode all type errors that wouldn't be errors in non-NNBD programs should
become warnings.  In full NNBD mode all such errors are errors.  This CL adds
the mode explicitly to the interface of the subtype check as a parameter.

Bug: http://dartbug.com/38673
Change-Id: I14bcdd260618530cfdd8189c01abba7469a16679
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119545
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-10-02 11:30:29 +00:00
Dmitry Stefantsov be43bce0b6 [cfe] Make interface of subtype checks aware of nullabilities.
Change-Id: Id4dbd2c903a36df511f7d638d24dc63f8a9344c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119541
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-02 11:30:29 +00:00
Jens Johansen 0242dea803 [CFE] Amend parser test framework to include intertwined output
Add expect file that includes both listener trace and actual parser trace.

Change-Id: I7fe1a13429b80ac4ce315f8b9248ab984644fd14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119331
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-01 06:53:02 +00:00
Ryan Macnak 14983a2941 [vm/bytecode] Add timeline events for major compilation phases.
Change-Id: Ie2a1f8a5979bb58133535b7698c5137d4ab2b046
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118648
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-30 16:36:09 +00:00
Dmitry Stefantsov b361639a74 [cfe] Account for nullability in type substitution on TypeBuilders
Closes #37689.

Bug: http://dartbug.com/37689
Change-Id: Ifac30bede3dbec9008e31e5fc81014cc69069afc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119145
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-30 12:52:29 +00:00
Dmitry Stefantsov 7d75eb1fd9 [cfe] Account for nullability in type substitution on DartTypes
Bug: http://dartbug.com/37689
Change-Id: I5c37f0e13da956285300288cffc58263e67ac302
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119140
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-30 12:52:29 +00:00
Johnni Winther dd028547ce [cfe] Support patching of extension methods
Change-Id: I453e17e63f97a0ca2477371541c6a9602bee2404
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119322
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-09-30 09:51:31 +00:00
Aske Simon Christensen 8f24bd2901 [cfe] Remove or reformulate some bad tips and messages.
Change-Id: I5f37da30370fb48a4417e2b0c990d9fc1c9713a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118990
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-30 09:02:41 +00:00
Konstantin Shcheglov da75135c7d Revert "Revert "Issue 37608. Use instantiated FunctionType for tear-off(s).""
This reverts commit b31e71e990.

https://github.com/dart-lang/sdk/issues/38546 was fixed.
https://github.com/dart-lang/source_gen/pull/430 fixed source_gen.
source_gen rolled into google3.
So, I think it is safe to re-apply this change.

Change-Id: Ia40830b733fce2ba4473a847df1af3c30cf139a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119182
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-28 14:24:45 +00:00
Paul Berry e4d8ad5866 Flow analysis: remove add method.
It is no longer necessary to explicitly "add" variables that are
subject to flow analysis.  Unrecognized variables are now treated
simply as uninitialized.  This simplifies analyzer error recovery by
ensuring that an attempt to use a variable before its declaration
doesn't lead to a crash.

Change-Id: I11e8afc3ffb93c864db4638a224ff782d11f5a6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-28 01:55:45 +00:00
Paul Berry 34899a8a56 Flow analysis: remove TypeOperations.isLocalVariable.
The last use of it was removed in c73df64c94.

Change-Id: Iececde3309246bfb6f6106e6e6d62ac2b08f9376
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119163
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-27 22:09:01 +00:00
Kallen Tu 327bc451f8 Added variance support in listeners to ast.
Pass variance data to field in TypeParameter through the listeners.
ast_to_text will print variances for classes and mixins if specified.

Avoids serialization/deserialization (impl in future CL).

Change-Id: I298537604823710f0d30001f4cb5f1e81530959f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118464
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-26 18:11:10 +00:00
Brian Wilkerson 3c18db7d9e update analyzer error message generator to generate hasPublishedDocs
Change-Id: I87fae43033876c84448e785417bd5a72efe52ef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118180
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-26 17:11:02 +00:00
Johnni Winther ee7aae43c0 [cfe] Handle explicit extension index access
+ avoid implicit extension for [] or []= when the other is defined on
the receiver.

Change-Id: I99c76a66bfb4f72c396097b2f347aad9f0a42f33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118940
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-26 10:36:51 +00:00
Jens Johansen acfda5d837 [CFE] Parser test framework
Change-Id: I1f27b380a2e6f8ea34d8ce66de6d581a1da8bf96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118572
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-26 08:40:08 +00:00
Paul Berry 6c81690c3a Flow analysis: add tests of things that shouldn't be promoted.
Change-Id: I1c172091c8aa12023ba94f528e1e1b7abb9f9e1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118203
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-25 19:04:28 +00:00
Konstantin Shcheglov b31e71e990 Revert "Issue 37608. Use instantiated FunctionType for tear-off(s)."
This reverts commit acac9ab11b.

Reason for revert: breaks source_gen, see https://github.com/dart-lang/sdk/issues/38546

Original change's description:
> Issue 37608. Use instantiated FunctionType for tear-off(s).
> 
> I was working of switching runtimeTypeMatch() to purely
> typeSystem.isSubtypeOf(), without working around dartbug.com/35993
> and dartbug.com/33441, but bots were failing. I think that was because
> of this issue with incorrect tear-off types. We have to fix it before
> switching to less generous TypeSystem.
> 
> R=​brianwilkerson@google.com, paulberry@google.com
> 
> Bug: https://github.com/dart-lang/sdk/issues/37608
> Change-Id: I1f5dfc5e86553a352d72e772e791978772fe8fa4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118379
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com

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

Bug: https://github.com/dart-lang/sdk/issues/37608
Change-Id: Icb6bf93f9b39d3af1d13e9b103afea5364b9169a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118646
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-25 18:06:16 +00:00
Kallen Tu c3bbd6a247 Added parser recovery for multiple variance modifiers.
New error message for multiple variances and will handle recovery from
more than one variance modifier before a parameter.

Change-Id: I63ed8a7f04dd664e20d72b632b40f723aa43020f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118621
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-25 17:12:06 +00:00
Dmitry Stefantsov 463894f986 [cfe] Remove NullabilityBuilder.legacy
TL;DR: Use cases of 'legacy' constructor are covered by the 'omitted'
constructor.

The initial idea behind the removed constructor was to use it on all
types in opted-out libraries, as if the programmer had a way to specify
which type is legacy.  That didn't prevent from building the 'omitted'
NullabilityBuilder into 'legacy' nullability sometimes.  In some cases
we still had to use the 'omitted' constructor because we didn't have the
access to the library object yet, and then, then the
NullabilityBuilder.build method is invoked, and the library object is
passed to it, we build 'legacy' nullability.

Change-Id: I975fa93e23ee55e93db5f3e642a97ad6901b06c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118568
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-25 13:28:28 +00:00
Dmitry Stefantsov 12f6cbb7b1 [cfe] Thread nullability modifiers for TypeParameterTypes from source
Closes #38218, #38221.

Bug: http://dartbug.com/38218
Change-Id: I4689b0b192b71790c8fc5ffba6ccb807f289f771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118580
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-25 08:15:47 +00:00
Dmitry Stefantsov adbfe7ce05 [cfe] Update the rules for TypeParameterType.nullability
Closes #38220.

Bug: http://dartbug.com/38220
Change-Id: If200e1173bd36997715003cc87c35a8e17f4e115
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118561
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-25 08:15:47 +00:00
Kallen Tu 89220fd812 Variance Parsing and Syntax Support
With the experiment flag on, will properly parse the `in`/`out`/`inout`
keywords. Without it, will issue an error regarding the flag. First CL
for parsing, syntax support, no AST work yet.

Keywords only parse correctly for classes and mixins.
See test `variance_disabled_syntax_test.dart`.


Change-Id: I37d765804fa0752512abf52fa44456a173087ef0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117929
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-09-24 17:21:39 +00:00
Jens Johansen 98d94e7efc [CFE] Reproduction of crash etc in error messages wrt formal parameters
Reproduction of dartbug.com/38523

Bug: 38523
Change-Id: Iffc30a622685c0c8d7a0daf0b84c910072c8146f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118446
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-24 11:43:28 +00:00
Jens Johansen 1b03bc34c8 [CFE] Cleanup incremental_load_from_dill_test yamls
Change-Id: I30012b08499e5c5a7babb74cb43706031fb3f4cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118445
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-24 10:50:18 +00:00
Jens Johansen fdda2729c3 [CFE] Fix crash when mixin application has mixin application super from dill
Fixes https://github.com/flutter/flutter/issues/40966.

Change-Id: Idf3febc50b5c8d637e9f3f43e8bd3e6b8bdee2fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118444
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-24 10:47:18 +00:00
Johnni Winther 175fc6edff [cfe] Use original name in extension method errors.
Previously the errors were reported using the synthesized name, like
`Extension|method` instead of `method`.

+ Report errors on invalid uses of explicit extension application as
an expression or lvalue.

Change-Id: I6d85430be4ab3966ee94131b37aa365265c07eac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118383
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther bf76e4b49c [cfe] Handle complex extension setters
Change-Id: Ic5753c70a13fed819df7aa6900a8191f9bed4195
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118042
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther 18e4f6ba8d [cfe] Handle conflicting extension and extension member names
Change-Id: Ib0c7ffce985b31dfcdacaca599ff31f3d05a25a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117730
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Johnni Winther 25166af3ea [cfe] Remove SyntheticExpressionJudgment
Change-Id: I2891d772d99d1fd8a5ba42e393d900f3c1618a5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117700
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-24 07:55:45 +00:00
Konstantin Shcheglov acac9ab11b Issue 37608. Use instantiated FunctionType for tear-off(s).
I was working of switching runtimeTypeMatch() to purely
typeSystem.isSubtypeOf(), without working around dartbug.com/35993
and dartbug.com/33441, but bots were failing. I think that was because
of this issue with incorrect tear-off types. We have to fix it before
switching to less generous TypeSystem.

R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/37608
Change-Id: I1f5dfc5e86553a352d72e772e791978772fe8fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118379
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-23 20:22:07 +00:00
Dmitry Stefantsov 8d487b4fdc [kernel] Recover TypeParameter.variance while deserializing
Change-Id: I46d78dc5e98c5e3707d448eccfd6bdabb1c25ddb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/91827
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-09-23 15:17:38 +00:00
Dmitry Stefantsov 4d9db7b22f [fasta] Account for variance of type parameters in instantiate-to-bound
Change-Id: I7a0aa3810129fa6a6a8cff5f961c19157154cd37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/85101
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-09-23 15:17:38 +00:00
Dmitry Stefantsov 9505a1b87f [fasta] Add variance field to type parameters
Change-Id: I0c3eda4057b52853c063a682ff15fb17a595db3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/85082
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-09-23 15:17:38 +00:00
Jens Johansen 99713209c4 [CFE] Fix issue with cached calculations and recording dependencies
Before this CL we would miss some dependencies when recording
dependencies because we cache certain calculations that upon calculation
can mark things as needed.

Change-Id: If9ff872021b0fb77cbcc787112bb91f3ade71243
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118281
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-20 11:21:14 +00:00
Johnni Winther 54c2dd737f [cfe] Refactor handling of index and index-set
Change-Id: I28336e1e01ba2f2f98d77c941b740242207bbc86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116780
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther c7a083ee5a [cfe] Refactor handling of ++/--
Change-Id: Ib63b095ba52b92653c3253286d0ecc1d18a469ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116760
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther 40d75d733b [cfe] Refactor if-null and null-aware property access
Change-Id: I19a50b7d56b63c96f24daf8aaf975e0748e29cf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116340
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Dmitry Stefantsov 515a597710 [cfe] Remove Class.rawType
Bug: http://dartbug.com/38224
Change-Id: If0af5487b1d43125738575ee3e0fcd747db54fa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117546
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-19 10:42:10 +00:00
Paul Berry 4d9792668c Flow anaylsis: fix definite assignment tracking for for-each loop vars
Change-Id: Ia0dfd94070e28832c5ffc6fb892626d9036042a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-18 19:21:39 +00:00
Kallen Tu b699852e6d Add 'out'/'inout' keywords for variance.
Under the `variance` flag, `out` and `inout` will be treated as keywords.

Change-Id: I73ba6871a9f0d410a7b3818833a1f50a5f75fba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117203
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-09-18 18:35:59 +00:00
Samir Jindel 205b90f0de Take 3 for '[vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).'
Fixes the changes to assembly snapshot writer in SIMARM_X64 mode. This unfortunately can't be tested until the ELF loader is available.

Take 2 is in patchset 1.

Change-Id: Ib8b067dd4f09dcba3b142705e9cb4dfbf4e3eb53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117726
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-18 14:56:27 +00:00
Aske Simon Christensen 7799f424f4 [CFE] Encapsulate int operations in separate classes for VM and JS
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>
2019-09-16 13:10:59 +00:00