Stephen Adams
a57a97703a
[dart2js] Make repeated 'usedAsVariable' tests faster
...
This helps SsaInstructionSimplifier time when a method
references a parameter many times.
Change-Id: I6eda0f88690adb9b5fc7427b3bd40ecdc48be88d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128372
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-12-13 22:34:52 +00:00
Stephen Adams
11a910323c
[dart2js] new-rti: Put sourceInformation on more nodes
...
Change-Id: I493c8f10d19ec1f1adc92a5d6ba12b3c4685ebf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128341
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-12-13 18:07:19 +00:00
Stephen Adams
bf0d1ce497
[dart2js] avoid empty statement in single-unit output
...
Change-Id: Iadb72a098d357b84a71affd6ccbc1c8d020cab0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128361
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-12-13 18:07:02 +00:00
Johnni Winther
818ec6db92
[cfe] Implement nnbd-top-merge
...
+ and use nnbd-top-merge and legacy erasure in hierarchy computation
Change-Id: I4bf06ce8d3c68a9926865ebf84b24b4029828d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128065
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-12-13 17:19:59 +00:00
Sigmund Cherem
52e0bcce0b
(dart2js): escape names when creating tearoff closures
...
The CFE recently changed the name of the top-level deferred load library method
from `__loadLibrary` to `_#loadLibrary` (see #39682 )
We were properly escaping this name when generating the method itself, but we
didn't properly escape the name when creating tearoff closures derived from it.
This is why the issue was not detected earlier.
Change-Id: Ic1487a10f521a86a3466608b1825a2b632a191be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128260
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2019-12-12 20:37:01 +00:00
Mayank Patke
c108ded0ea
[dart2js] Remove bad assert from runtime_types_new.
...
The RTI need computation is primarily focused on classes (as opposed to
types), so it's a poor choice for asserting that a type variable is
needed _in a type term_.
Change-Id: I593105cc092529ef6ac2dfc87f6d8d99ccd4ffb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128007
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2019-12-11 19:49:28 +00:00
Mayank Patke
18b2d24887
Revert "[dart2js] Mark native classes as needed if they have new-rti is-tests or"
...
This reverts commit bcd18e67dc .
Reason for revert: Deoptimizes native classes.
Original change's description:
> [dart2js] Mark native classes as needed if they have new-rti is-tests or
> named type variables.
>
> Change-Id: I12af7f8595d6580cac4bc98cad5cd7795f6a71ab
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127964
> Commit-Queue: Mayank Patke <fishythefish@google.com >
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
TBR=sra@google.com ,sigmund@google.com ,fishythefish@google.com
Change-Id: Ia65ea6c32aef5f979d39ef83ab0af68ee503f510
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128011
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2019-12-11 01:36:55 +00:00
Mayank Patke
bcd18e67dc
[dart2js] Mark native classes as needed if they have new-rti is-tests or
...
named type variables.
Change-Id: I12af7f8595d6580cac4bc98cad5cd7795f6a71ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127964
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-12-11 00:04:08 +00:00
Stephen Adams
ac3b45708f
[dart2js] Ensure native lookup always initialized
...
The initialization is needed if there are no native classes but there
are JS-interop calls.
Change-Id: I7a66f75087be0200dfcc4ea60aa9b629c446616b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127801
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
2019-12-10 23:56:56 +00:00
Stephen Adams
2a1fadb66c
[dart2js] types_propagation - handle HAsCheckSimple
...
Change-Id: I4bd01b5a06b407fee2418e43c2196746afbe5a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127741
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-12-09 22:07:32 +00:00
Mayank Patke
4c442cd73a
[dart2js] Remove treatAsDynamic.
...
Change-Id: I361de27bcd61b18e0bf1ea07516e71a84a1c3807
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126604
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-12-06 21:30:24 +00:00
Johnni Winther
97c2ca5ff1
[cfe] Use valid static types and file offsets in collections transformation
...
Closes #39566
Change-Id: I589d0dd568b3ea939bb1238b1c61fca6867e737e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127320
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-06 10:58:20 +00:00
Kallen Tu
e11cf75bd9
[dart2js] Propagate kernel variance to emit annotations in RTI table.
...
Change-Id: I4612c50828f5d85115e15838e2cc2117446b07ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127201
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2019-12-06 01:26:58 +00:00
Dmitry Stefantsov
47a9ebea76
[cfe] Make API of as-instance-of and legacy LUB/GLB library-specific
...
Change-Id: I1991c66e654ef537243d9f25f17070acbfa13af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126380
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-12-05 13:32:28 +00:00
Kallen Tu
53bbe6c88c
[dart2js] Added variance support for static subtype checking.
...
Change-Id: I0731884aad68e3dd7f84658d75e946ca5db62bbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127063
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2019-12-04 20:54:16 +00:00
Sigmund Cherem
b050a59d3b
(dart2js) merge inferrer-engine interface and implementation
...
Change-Id: I2aec92ac55a84e518f419802f012a512abc79c2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126614
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2019-12-03 01:40:20 +00:00
Sigmund Cherem
1103d9fdb5
(dart2js): seal-in members used only within the inferrer_engine class
...
This is to prepare for the next step were I plan to merge the implementation and
interface as one class.
Change-Id: I4fadf7e50db2fa9c996647686174d6b874f1b141
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126613
Reviewed-by: Stephen Adams <sra@google.com >
2019-12-03 01:40:20 +00:00
Sigmund Cherem
aa56cd39a3
(dart2js): rename 'assignments' to 'inputs' in global analysis
...
This makes the direction of the assignemnt more clear, and matches the naming we
use in SSA.
Change-Id: I50cb0b06d1b1f26f70c1ba2dd71bd505440a298b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126612
Reviewed-by: Stephen Adams <sra@google.com >
2019-12-03 01:40:20 +00:00
Johnni Winther
1454a67e09
[cfe] Don't use multiple null-aware guards in opt-out
...
Change-Id: I15bd991577ffcc309569ee4a5512dfb29c7874ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126732
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-12-02 12:19:27 +00:00
Kallen Tu
73fdf19b56
[dart2js] Add variance table to RTI and updated subtyping wrt variance.
...
Change-Id: Iac4c28d295e883997acdc2e6c7084739e60be9fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126403
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
2019-11-27 18:45:25 +00:00
Johnni Winther
2b56db6e5d
[dart2js,ddc] Enable late lowering in dart2js and ddc
...
Change-Id: I77d99bade4bf0e094f04f222743c5fec19495851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126101
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-11-25 13:59:25 +00:00
Mayank Patke
eb6d7f51e2
[dart2js] Add DartTypes for T*, T?, and Never.
...
Type relations to be implemented in a later CL.
Also discovered some visitors were missing support for FutureOr.
Fixes: https://github.com/dart-lang/sdk/issues/38821
Change-Id: Iee494cfa2eff3b320a3fd1a2e7ffbf3f969b40e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125880
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-11-21 09:58:14 +00:00
Mayank Patke
539b0093e1
[dart2js] Remove unnecessary DartType predicates and replace with
...
is-tests.
Change-Id: I520d0893793e291d009e31ff32980194278bb0b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125923
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2019-11-21 08:58:54 +00:00
Sam Rawlins
db166e423e
Fix unused elements when setter used
...
Fixes #35677
Change-Id: I2daf8b4e2cc8e1a11ed0dde730d4126154b60910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125620
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-11-19 17:44:19 +00:00
Dmitry Stefantsov
d9d5fbc109
[cfe] Create TypeParameterTypes with default nullabilities
...
Change-Id: I85be937240ba5cc39840e78f374902c1e36521a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124327
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2019-11-19 11:22:43 +00:00
Stephen Adams
ed6dd5b79b
[dart2js] Address new UNUSED_ELEMENT warnings
...
Change-Id: I391b32a5d0753215773b1849c3a953258d3c435e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125490
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-11-16 20:59:52 +00:00
Johnni Winther
4b5589e0cb
Reland "[cfe] Use StaticTypeContext for getStaticType" and more"
...
This relands commits
"[cfe] Use StaticTypeContext for getStaticType"
45033c6ad9
"[cfe] Move caching of thisType to CoreTypes"
fab25cbe0c
"[vm/bytecode] Notify static type context when entering/leaving library"
c9f88ae253
Change-Id: I407d6b0e3b3df503cedc9fcb2c834d835cf083f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125343
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-11-16 05:50:58 +00:00
Johnni Winther
45996ee170
[cfe] Add late field lowering for static/top-level fields
...
Change-Id: I16625257251b0badbcdfc1c9504899421db8b83f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124681
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2019-11-15 13:29:45 +00:00
Sam Rawlins
f9175f2099
Remove undetected unused field in ClosedEntityWriter
...
This will be detected with https://dart-review.googlesource.com/c/sdk/+/124521
Change-Id: I69fd54d34ec5dec2461546e779e000162cd644ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125020
Auto-Submit: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-11-15 01:17:45 +00:00
Johnni Winther
ef5fb7d3f4
Revert "[cfe] Use StaticTypeContext for getStaticType" and more
...
This reverts commits
"[cfe] Use StaticTypeContext for getStaticType"
45033c6ad9
"[cfe] Move caching of thisType to CoreTypes"
fab25cbe0c
"[vm/bytecode] Notify static type context when entering/leaving library"
c9f88ae253
Change-Id: I6171f6a74b97f2f4a77a36c242330fc2db94c82f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125341
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Aart Bik <ajcbik@google.com >
Auto-Submit: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Aart Bik <ajcbik@google.com >
2019-11-14 22:51:43 +00:00
Dmitry Stefantsov
fab25cbe0c
[cfe] Move caching of thisType to CoreTypes
...
Closes #38225 .
Bug: http://dartbug.com/38225
Change-Id: I0274bc390ca2d098896f578ea7ddf65527d82027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124325
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-11-14 16:01:26 +00:00
Johnni Winther
45033c6ad9
[cfe] Use StaticTypeContext for getStaticType
...
Change Expression.getStaticType to take a StaticTypeContext instead
of a TypeEnvironment.
The StaticTypeContext provides access to the TypeEnvironment and the
current 'this type' as well as determining the nullability state of the
enclosing library.
This change is needed to support nnbd types for getStaticType and also
serves as a step towards supporting caching during static type
computations to avoid repeated computations of the same (complex)
expressions.
Change-Id: Ied974dff7f6f7c3c8f262aa80c8dea5c674662f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124683
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-11-14 09:09:26 +00:00
Stephen Adams
6f11d998d0
[dart2js] Allocate minified type$ names in more stable manner
...
Change-Id: I0657f1b74f9b5afed02ab72e07eddb479e6b5cc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125013
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-11-13 23:56:10 +00:00
Stephen Adams
64e65a7dab
[dart2js] new-rti: Use local in setting up type$
...
Saves 0.05% on CM. Should be slightly faster too - fewer tokens to
parse.
Change-Id: I9ce674525817e215e868a616729a465a60b8ef20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124468
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-11-09 02:11:28 +00:00
Mayank Patke
8f1be54906
[dart2js] New RTI: Improve normalization of is-tests.
...
Change-Id: I48e5a19af931dd2f76cceea6b5a9abb513d5fd39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124463
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2019-11-09 02:06:09 +00:00
Stephen Adams
b334ea8320
[dart2js] new-rti: experiment - fault in '$is' test
...
Change-Id: Ie6d17e3439fb67fe79e9dec4dc7cb5437d1f6915
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121766
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-11-08 06:00:06 +00:00
Mayank Patke
9cf7d7f1f4
[dart2js] New RTI: Improve handling of top types during is-test
...
specialization.
This change also adds plumbing so that we can access the kernel logic
for instantiation-to-bounds. This allows us to emit the `instanceof`
is-test specialization when all type arguments are at bounds.
Change-Id: I73cdcaeb1984d31761ddb9a5765e5bd0f29d06ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124206
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2019-11-07 21:57:17 +00:00
Dmitry Stefantsov
b4554c1215
[cfe] Make nullability a required parameter for types
...
Change-Id: Id787291294cafb15cf4ecad4a9db9da4c6066638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124135
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Auto-Submit: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-11-07 13:24:47 +00:00
Mayank Patke
e9c57d2e04
[dart2js] New RTI: Lower is-checks to instanceof in-place where
...
possible.
Also lower `is JSArray<top>` to `Array.isArray`.
Change-Id: I4c07a590202fa8144e196c69a805550412d738bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124141
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2019-11-05 22:44:03 +00:00
Stephen Adams
1b947a51cc
[dart2js] new-rti: Copy environment input type before refinement removal
...
This allows specializations of H.instanceType(x) to be generated in a few
more places where there is a refinement to remove null.
Clean up some unused fields.
Change-Id: I05c19878bd60e771b04ea747082574882d1def4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124166
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-11-05 20:30:13 +00:00
Sigmund Cherem
e65d95e8c8
(dart2js) add indirect dynamic calls to global inference and use it to model operator==
...
On most apps, `==` is a very common invocation that adds lots of edges to
our global inference graph. It appears that for the most part we don't
learn much from it and that we save a considerable amount of space and
time durning global inference if we model them differently.
The amount of space varies a lot by application. Some large internal apps
show about 200K edges removed, other large apps show an incredibly large number
(1.3 M edges!)
Change-Id: I5168978f922c4d74adfae2de7fe69d56ff85ade0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123980
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2019-11-05 18:17:13 +00:00
Mayank Patke
91c38d00c0
[dart2js] New RTI: Improve lowering of simple is-tests.
...
Change-Id: Iabf72ad2cf57102155f98e6347e54e318d78c258
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123690
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2019-11-04 23:50:15 +00:00
Stephen Adams
cc98941bdd
[dart2js] new-rti: defer infrequent types in lazy initializers
...
This reduces start-up code size and time.
Change-Id: I15a5feb4fdb02b9a5a981f77e793f950e45ef145
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123620
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-10-31 20:50:18 +00:00
Mayank Patke
bb71c3eecc
[dart2js] Ensure type check metadata is generated for types
...
that otherwise only appear in substitutions.
Change-Id: I187975ef7c65b841c54de115da2b3084d3f1a00e
Fixes: https://github.com/dart-lang/sdk/issues/32004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123550
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2019-10-31 10:59:43 +00:00
Mayank Patke
67db877264
[dart2js] Replace const constructors with factories on singleton DartTypes.
...
Change-Id: Ic396bca77523e0f907f91a378bbe328544e2fa1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123467
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2019-10-29 22:40:26 +00:00
Mayank Patke
e2891ad8e3
[dart2js] New RTI: Support reification of erased types.
...
Change-Id: I351c8ab96c12f9acffefa26556897d195b3e7c17
Bug: https://github.com/dart-lang/sdk/issues/38949
Fixes: https://github.com/dart-lang/sdk/issues/38949
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122026
Reviewed-by: Stephen Adams <sra@google.com >
2019-10-29 22:40:26 +00:00
Stephen Adams
edf9d09526
[dart2js] new-rti: wrap type$ initialization
...
The named function allows the 'phase' of initialization to be named
in the profile.
Change-Id: Idccbfc547f09de5a4185c7aa830e738fa97320e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123101
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-10-29 20:58:46 +00:00
Stephen Adams
ea16e39e2f
[dart2js] new-rti: defer selection of is-test specializations
...
Create Rti objects with an initial 'is' method that replaces the
'is' method with a specialization. This moves the specialization of
the 'is' method until the Rti is used in a test, which should slightly
reduce the Rti creation cost, and permit more ambitions specializations.
Also add specialization of checks for top types.
Change-Id: I4218a73f2916ddba23991d11db350ee4b36be354
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121860
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
2019-10-29 00:01:04 +00:00
Dmitry Stefantsov
9910fa8454
[cfe] Implement the first part of NNBD-aware isSubtypeOf
...
This CL is a squashing of the following smaller CLs:
* https://dart-review.googlesource.com/c/sdk/+/120669/
* https://dart-review.googlesource.com/c/sdk/+/120670/
* https://dart-review.googlesource.com/c/sdk/+/121331/
* https://dart-review.googlesource.com/c/sdk/+/121381/
* https://dart-review.googlesource.com/c/sdk/+/121383/
* https://dart-review.googlesource.com/c/sdk/+/121620/
* https://dart-review.googlesource.com/c/sdk/+/121707/
* https://dart-review.googlesource.com/c/sdk/+/122144/
* https://dart-review.googlesource.com/c/sdk/+/122360/
* https://dart-review.googlesource.com/c/sdk/+/122381/
* https://dart-review.googlesource.com/c/sdk/+/122783/
* https://dart-review.googlesource.com/c/sdk/+/122787/
Change-Id: I9d850f531f0fce07055ff9b5cd39abb605752005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122868
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2019-10-25 16:37:39 +00:00
Anna Gringauze
17ed3cb5b3
[dart2js] Fix URI leak when using deferred load
...
Passed library name instead of URI to "checkDeferredLoad" in the
generated JS. The URI was only used to report errors on library load at
runtime - the user should be able to to find the URI in the dart import
statemement instead.
Closes https://github.com/dart-lang/sdk/issues/37623
Notes:
- The URI is also stored in the deferred library's source map. If finding
this information on load failure is too inconvenient, we might consider
storing the URI in the main source map as well, and making sure that the
URI is loaded from the source map on load failure at runtime, for better
error reporting for users who have access to the source maps.
- Not sure how much work is needed for this to be done, so leaving this
until the need arises.
Change-Id: I90caa560e7c57c61e810b9ca4cfc648cddba5905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122200
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Anna Gringauze <annagrin@google.com >
2019-10-22 22:47:37 +00:00