Commit Graph

4835 Commits

Author SHA1 Message Date
Dmitry Stefantsov cdbb2a74a1 Reland [fasta] Invoke constructors of mixin applications in super invocations
Reland of https://dart-review.googlesource.com/c/sdk/+/86200.

TBR=aam@google.com

Change-Id: Id3137cf5c7f87492db5bf3aabb505ac04529fa2c
Reviewed-on: https://dart-review.googlesource.com/c/87079
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-12-14 11:21:58 +00:00
Johnni Winther ec1dfa8716 Add @pragma('dart2js:disableFinal')
Change-Id: I9b3f878803f946d08979144028d08b1a4dc4612f
Reviewed-on: https://dart-review.googlesource.com/c/86924
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-13 09:35:13 +00:00
Sigmund Cherem 811cea75db Remove lingering references to async-async
Change-Id: Id8613a567c8397e745217480535d9415fbb6e025
Reviewed-on: https://dart-review.googlesource.com/c/87164
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-12-13 08:38:10 +00:00
Sigmund Cherem ff0eaca1b0 remove package-root from -v -h
We soon should warn when the flag is used, since it's not supported anymore.

Closes https://github.com/dart-lang/sdk/issues/35393

Change-Id: Ie08fa97d8ca0d8066cfc7d442648c018690dd43f
Reviewed-on: https://dart-review.googlesource.com/c/87165
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-12-13 06:21:38 +00:00
Alexander Aprelev 4ed049d782 Revert "[fasta] Invoke constructors of mixin applications in super invocations"
This reverts commit 7d1ebf260a as it
breaks vm-kernel-precomp-obfuscate-linux-release-x64, kernel-precomp
bots.

Change-Id: Icf7ba0fc2c3781c34b1c4327655f958c809d99fe
Reviewed-on: https://dart-review.googlesource.com/c/87120
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-12-12 18:32:53 +00:00
Kevin Millikin a8493e1b50 Flip the default value of the Kernel syncAsync flag
In Kernel's TargetFlags, this flag still defaulted to false.  Flip the
default to true and update all client code in the SDK.  The
expectation is that many of the places that now pass false explicitly
really just want the default, but that will be verified separately and
then the flag will be removed.

Change-Id: I2a38eb53f280f21f59bb1d2e88c42516f827fd39
Reviewed-on: https://dart-review.googlesource.com/c/85448
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-12 14:23:54 +00:00
Dmitry Stefantsov 7d1ebf260a [fasta] Invoke constructors of mixin applications in super invocations
Change-Id: I24859587e1ba0e63a8219a60e1218c1ce5c83f24
Reviewed-on: https://dart-review.googlesource.com/c/86200
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-12-12 14:09:28 +00:00
Stephen Adams 54a47243e5 Fix for 35356 - and/or/xor
Change-Id: Ia7c7422fa4864b2a5873e241e0a21529b67c2322
Reviewed-on: https://dart-review.googlesource.com/c/86824
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-12-11 01:14:57 +00:00
Johnni Winther 1e4b123e54 Delete DartType.isMalformed
Change-Id: I5715c7d4caf0d1821f1487adef0ae74784d6c35b
Reviewed-on: https://dart-review.googlesource.com/c/86701
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-10 09:39:21 +00:00
Johnni Winther be532c0fc5 Use AbstractBool in AbstractValueDomain and add TrivialAbstractValueDomain
Change-Id: I01c8ca95d48b89c47748e91ba7e4709c3e6f2e78
Reviewed-on: https://dart-review.googlesource.com/c/86700
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-10 09:39:21 +00:00
Johnni Winther b5d2400d82 Always include members of Null in subtype access.
Change-Id: I8e7fa2d418b9dd948b17b385b6d8e8e266582239
Reviewed-on: https://dart-review.googlesource.com/c/86566
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-12-07 21:20:52 +00:00
Johnni Winther c987c9e5a7 Propagate cached static types to inference and ssa
+ use it to skip unnecessary casts.

Change-Id: Ib503a6fb74907f7e6367c8ee44548268e03045cf
Reviewed-on: https://dart-review.googlesource.com/c/86560
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-07 19:57:05 +00:00
Johnni Winther 7d78f7caf9 Handle FutureOr in runtimeType analysis.
Closes #35341

Change-Id: I2c6daba8d72fa6236739f191af989c548b694348
Reviewed-on: https://dart-review.googlesource.com/c/86561
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-07 18:13:28 +00:00
Johnni Winther 3cb3fd2b20 Move types/* to inferrer/*
Change-Id: Iff27cf92c6e0fec2c304dfbc0d2e4cb8901403cc
Reviewed-on: https://dart-review.googlesource.com/c/86567
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-07 18:06:35 +00:00
Sigmund Cherem 85a30f8595 Measure time spent emitting source-maps
Change-Id: If82833d5c86e1a3eb79297abb8194d4b3951e3ab
Reviewed-on: https://dart-review.googlesource.com/c/86463
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-12-07 05:15:56 +00:00
Sigmund Cherem 2a39f63c2a Record deferred accesses in kernel world impacts and use it for splitting only
under a flag.

This reapplies commit 70e1517d98, but adds a flag
to gradually migrate users before enabling it by default.

Patchset 1 matches the old CL

Change-Id: Iaf7ee3dec8d4aa658f0b4334549b507e5a610a68
Reviewed-on: https://dart-review.googlesource.com/c/86444
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-12-06 23:20:38 +00:00
Stephen Adams 6d33d033db Cache prototype references while installing aliases
A.Foo.prototype.method1Alias = A.Foo.prototype.method1
  A.Foo.prototype.method2Alias = A.Foo.prototype.method2
  ...
-->
  (function aliases() {
    var _ = A.Foo.prototype
    _.method1Alias = _.method1
    _.method2Alias = _.method2
    ...
  })()



Change-Id: Ia0c2844b0a3bba6eefe7cff63085a9e307cfb2ae
Reviewed-on: https://dart-review.googlesource.com/c/86320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-12-06 20:15:10 +00:00
Stephen Adams e173775a58 Tiny bit shorter $is/$as prefix
Change-Id: I3a94325c297aa3e5c53415444ad366ae74a5a8da
Reviewed-on: https://dart-review.googlesource.com/c/86303
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-12-06 17:33:38 +00:00
Sigmund Cherem adf595dc62 Revert "Record deferred accesses in kernel world impacts and use it for splitting."
This reverts commit 70e1517d98.

Reason for revert: saw unexpected regression on acx-gallery as well. I'd like to look in more detail and reland if it is justified.

Original change's description:
> Record deferred accesses in kernel world impacts and use it for splitting.
> 
> On large apps this cuts down the time spent in the deferred loading algorithm by
> two thirds. To address issue #35311, this CL keeps things sound and may load in
> the main unit more code.
> 
> On some large apps, it appears the effect of this change is not that measurable,
> and we even see an improvement. I'm still validating the data, but I believe
> this is in part because there was a different bug
> in the previous algorithm: constructors were never deferred
> because we were looking for the constructor-name, usually '', instead of the
> enclosing class name.
> 
> My current data is that, the main unit of some large app shows:
>   old algorithm:        13,213,191
>   sound algorithm:      13,150,145
>   unsound algorithm*:   13,147,282
>   fixed old algorithm:  13,146,509
> 
> * ignoring return type of closures
> 
> 
> Change-Id: I7d3e525393ef38979b26051b4d354fc1001560af
> Reviewed-on: https://dart-review.googlesource.com/c/85725
> Commit-Queue: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

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

Change-Id: I6992279bebcc99578f94087a17d6c327b32a0876
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/86246
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-12-05 19:16:32 +00:00
Sigmund Cherem 70e1517d98 Record deferred accesses in kernel world impacts and use it for splitting.
On large apps this cuts down the time spent in the deferred loading algorithm by
two thirds. To address issue #35311, this CL keeps things sound and may load in
the main unit more code.

On some large apps, it appears the effect of this change is not that measurable,
and we even see an improvement. I'm still validating the data, but I believe
this is in part because there was a different bug
in the previous algorithm: constructors were never deferred
because we were looking for the constructor-name, usually '', instead of the
enclosing class name.

My current data is that, the main unit of some large app shows:
  old algorithm:        13,213,191
  sound algorithm:      13,150,145
  unsound algorithm*:   13,147,282
  fixed old algorithm:  13,146,509

* ignoring return type of closures


Change-Id: I7d3e525393ef38979b26051b4d354fc1001560af
Reviewed-on: https://dart-review.googlesource.com/c/85725
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-12-05 17:40:27 +00:00
Stephen Adams 5a8ec41982 [dart2js] UnionTypeMask.disjointMasks should be a List
Change-Id: Ia7c7c9150b7c0eca4fe2a0f3e4537a69e7469cde
Reviewed-on: https://dart-review.googlesource.com/c/86107
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-12-05 17:25:47 +00:00
Johnni Winther c18225d98c Implement guarded type promotion in dart2js
Change-Id: Ic284990c73ff5cb4b201ed4bbcc57ec0d7b0b66f
Reviewed-on: https://dart-review.googlesource.com/c/85923
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-05 11:52:26 +00:00
Johnni Winther f3d088e2d7 Use VariableScope.parent instead of VariableScope.block
Change-Id: I5cf15ae9562f365d0dad8b4f47b7e8da74908198
Reviewed-on: https://dart-review.googlesource.com/c/85706
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-05 09:40:51 +00:00
Sigmund Cherem 01da85ce7c Add flag to emit kernel immediately after invoking the CFE
This will be used initially to create the 3-way split in the compiler. Later
this will:
- include our transformation for super mixin calls
- remove the need to emit the .dill after global analysis
- eventually get replaced by a modular step that only builds a portion of the
.dill file.

Change-Id: Iebf2bd6d023716f04dc542ae9b2a85919159c4c0
Reviewed-on: https://dart-review.googlesource.com/c/85840
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-12-04 16:55:57 +00:00
Johnni Winther 0a2ed86935 Infer general flow through && and ||
Closes #34993

Change-Id: Ifb849e4525ba9e5518932b8fba2ae556fb49acb3
Reviewed-on: https://dart-review.googlesource.com/c/85502
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-30 08:32:11 +00:00
Kevin Moore 17a7f513c3 Fix up pubspec for pkg:compiler
Removed unused dependencies
Correctly reference repo packages via dependency_overrides
Fix pubspecs for pkg: js_ast, js_runtime, sdk_library_metadata

Change-Id: I2077814f733c299dca7afe3f5ab4b380c2c886e4
Reviewed-on: https://dart-review.googlesource.com/c/85660
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-29 23:33:39 +00:00
Kevin Moore 440f190a34 Cleanup CompilerTask
make a number of fields private

Change-Id: Ib44aa3459e5d286004de7cb08e07039dc115894a
Reviewed-on: https://dart-review.googlesource.com/c/85645
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-11-29 22:43:09 +00:00
Sigmund Cherem d9c6bc0316 Improvements to verbose timing data printing.
- format is padded and includes  %
- measure explicitly subtasks of deferred load
- use shorter names for other tasks


Sample output on swarm:

Info: Timings:
    kernel loader:                                 1.407s (17.1%)
    Front end:                                     0.736s  (8.9%)
    Front end > closures:                          0.102s  (1.2%)
    Front end > worldImpact:                       0.586s  (7.1%)
    Type inference:                                1.143s (13.9%)
    Deferred Loading:                              0.002s  (0.0%)
    Deferred Loading > prepare:                    0.002s  (0.0%)
    Enqueue:                                       0.455s  (5.5%)
    self:                                          0.914s (11.1%)
   *self > impl.run:                               0.034s  (0.4%)
    self > run:                                    0.206s  (2.5%)
    self > compileFromKernel:                      0.012s  (0.1%)
    self > computeClosedWorld:                     0.364s  (4.4%)
    self > processQueue:                           0.033s  (0.4%)
    self > emptyQueue:                             0.040s  (0.5%)
    self > applyImpact:                            0.146s  (1.8%)
    self > work.run:                               0.076s  (0.9%)
    SSA builder:                                   1.002s (12.2%)
    SSA optimizer:                                 1.302s (15.8%)
    SSA optimizer > SsaInstructionSimplifier:      0.421s  (5.1%)
    SSA optimizer > SsaTypeconversionInserter:     0.036s  (0.4%)
    SSA optimizer > SsaRedundantPhiEliminator:     0.012s  (0.1%)
    SSA optimizer > SsaDeadPhiEliminator:          0.010s  (0.1%)
    SSA optimizer > SsaTypePropagator:             0.261s  (3.2%)
    SSA optimizer > SsaCheckInserter:              0.030s  (0.4%)
    SSA optimizer > SsaDeadCodeEliminator:         0.067s  (0.8%)
    SSA optimizer > SsaGlobalValueNumberer:        0.071s  (0.9%)
    SSA optimizer > SsaCodeMotion:                 0.024s  (0.3%)
    SSA optimizer > SsaLoadElimination:            0.083s  (1.0%)
    SSA optimizer > SSA value range builder:       0.099s  (1.2%)
    SSA optimizer > SsaSimplifyInterceptors:       0.048s  (0.6%)
    SSA code generator:                            0.623s  (7.6%)
    Code emitter:                                  0.586s  (7.1%)
    Diagnostic handler:                            0.001s  (0.0%)
Change-Id: I4af3ff04954b28ee12354bc79eae517169a3b96e
Reviewed-on: https://dart-review.googlesource.com/c/85550
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-11-29 18:09:20 +00:00
Johnni Winther b52182ee14 Add LocalState to KernelTypeGraphBuilder
Move LocalsHandler.seenBreakOrContinue/seenReturnOrThrow/_tryBlock to LocalState
Move KernelTypeGraphBuilder._locals and KernelTypeGraphBuilder._fieldScope from visitor to LocalState

Change-Id: I712558ab3d18c6196fb5b96a4f8084d44848b83b
Reviewed-on: https://dart-review.googlesource.com/c/85444
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-29 07:33:18 +00:00
Kevin Moore be5d0cca5c Remove sha1 impl from dart2js
pkg:crypto has a fine implementation
Change-Id: Ibefd6c294259c58cd4eb3ac8f5718a078894a39b
Reviewed-on: https://dart-review.googlesource.com/c/85415
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-29 04:28:02 +00:00
Sigmund Cherem e9e70f0922 Reduce dependency on library spec from dart2js
Change-Id: I0d55b380f135d2e45a0dd112336bd87085e38c76
Reviewed-on: https://dart-review.googlesource.com/c/85471
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-11-28 17:12:11 +00:00
Johnni Winther b505f0830a Split LocalsHandler.mergeDiamondFlow into mergeFlow and mergeDiamondFlow.
Change-Id: Ic3e512a2abc67bf3c79c4c2f36f5e0b5e298c4aa
Reviewed-on: https://dart-review.googlesource.com/c/85285
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-27 14:07:01 +00:00
Johnni Winther 56dec98f0b Make LocalsHandler.locals and LocalsHandler.tryBlock private
Change-Id: I5a43ce1d38da666e2707481d59e29b57f8703bd5
Reviewed-on: https://dart-review.googlesource.com/c/85280
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-27 14:07:01 +00:00
Johnni Winther 418f2583bb Remove FieldInitializerScope from LocalsHandler
Change-Id: I14636228a2bc51f863f73be21913a9cc26b42257
Reviewed-on: https://dart-review.googlesource.com/c/85261
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2018-11-27 14:07:01 +00:00
Johnni Winther 406d0b3e9c Remove unused code from LocalsHandler
+ add test for issue 34993

Change-Id: Icd73c865e80ac9dca0e126c6b7e2c6c5320aef94
Reviewed-on: https://dart-review.googlesource.com/c/85240
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-27 14:07:01 +00:00
Johnni Winther 82f9884289 Support exact class and this expression relations in StrongModeConstraint
Change-Id: I32e6e5b6f55d4ef4240b6ba87eb26dfc2a699130
Reviewed-on: https://dart-review.googlesource.com/c/85166
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-27 13:50:04 +00:00
Johnni Winther 9cfab12d36 Reorganize imports to decouple dart2js_target.dart from dart2js
Change-Id: Ie958dbbf75f5cac20074b2a64a4eefb9de636116
Reviewed-on: https://dart-review.googlesource.com/c/85290
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-27 09:15:34 +00:00
Johnni Winther bb4e2388b8 Use BasicInfo.resetIds
Change-Id: I69770f2d4f2e24b25cbeff644747ef605e14d4b9
Reviewed-on: https://dart-review.googlesource.com/c/85167
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-23 08:51:52 +00:00
Sigmund Cherem 02f6395606 Cleanup library-loader: rename as kernel producer, remove some dependencies
Once we remove the frontend strategy object, we might want to remove some additional dependencies on KernelResult

Change-Id: I27ef1fbb12e671748b59a87d2dd249100501e02a
Reviewed-on: https://dart-review.googlesource.com/c/85060
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-21 17:59:18 +00:00
Johnni Winther 0fded45406 Handle serialization with --dump-info
Change-Id: I626eb8c7dca0b4e92f2aca79429f6e7336215840
Reviewed-on: https://dart-review.googlesource.com/c/84846
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-21 09:40:02 +00:00
Johnni Winther e62951fd3d Use assigned variables data to infer static types for effectively final locals.
Change-Id: I3687d28628b0476c6a848f135bbda97e594449c2
Reviewed-on: https://dart-review.googlesource.com/c/84629
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-21 09:16:21 +00:00
Sigmund Cherem 59e17553f9 Upgrade call-instrumentation logic.
This:
 - exposes the feature as an experiment flag
 - cleans up the code to prevent issues with strong-mode checks
 - provides only a single implementation, but lets users use a hook to tailor the feature to their needs.
Change-Id: I3bf277b76b7503235c35bfbf83356c953405ff6f
Reviewed-on: https://dart-review.googlesource.com/c/84880
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-11-20 20:10:01 +00:00
Johnni Winther 3bf6a550ea Add static type tests
Change-Id: I4282a1261ad4f4f4641750bd5ca492e5a943b6f0
Reviewed-on: https://dart-review.googlesource.com/c/84628
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-20 14:02:39 +00:00
Johnni Winther d544a5d3b6 Compute variable allocation data during closure scope visitor.
Change-Id: I71814a30ac469cbcfea5bf6804f6762c2e039c64
Reviewed-on: https://dart-review.googlesource.com/c/84625
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-20 14:02:39 +00:00
Johnni Winther 601587b305 Make CapturedScopeBuilder child visits explicit
This prepares for computing additional information during traversal.

Change-Id: I90f5eb70dbfe5b41e1bf430ee142eb67ac4f052c
Reviewed-on: https://dart-review.googlesource.com/c/84623
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-20 14:02:39 +00:00
Johnni Winther b943fa897c Move closure scope classes to ir/
Change-Id: Ib14696e9ab8572e30343e0880c1d028cfc26b377
Reviewed-on: https://dart-review.googlesource.com/c/84621
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-20 14:02:39 +00:00
Stephen Adams 8422bf1a80 dart2js experiment: force parens around part file function
Apparently V8 will keep the parse tree and this might reduce startup latency in evaluating the deferred parts.

Change-Id: If8662c7efcc855a9e87779baeeb460108283e681
Reviewed-on: https://dart-review.googlesource.com/c/84882
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-11-20 02:56:21 +00:00
Stephen Adams bdf8b0bc79 [dart2js] Remove some clumbsy negations in generated JavaScript
This mostly fires on the expansions of

  a?.b = x;
  a?.f();

since these expansions to conditional, e.g.

  a==null ? null : (a.b = x)

have null in the then-branch which is unused in the statement context.

Change-Id: I2a9ab6e3c46e025eedb2040e0a083c29ff7c058e
Reviewed-on: https://dart-review.googlesource.com/c/84436
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-11-16 17:39:54 +00:00
Johnni Winther 2776108a8f Remove LocalsHandler._capturedAndBoxed
Change-Id: I1f91a59d1e64dedad61dec77dd74aa6cd8e360dd
Reviewed-on: https://dart-review.googlesource.com/c/84524
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-16 07:58:56 +00:00
Johnni Winther 4ae585ce86 Remove redundant fields from LocalsHandler
Change-Id: I6ba0db5996e0a6e1b9799cba01a1c5b6f9d81a42
Reviewed-on: https://dart-review.googlesource.com/c/84427
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-15 09:30:24 +00:00