Commit Graph

2345 Commits

Author SHA1 Message Date
Vyacheslav Egorov 1796437cce [vm/kernel] Support synchronously completing futures
Slightly alter async/await transformation in such a way that
:await_jump_var/:await_ctx_var are set before _awaitHelper(...) is invoked -
just like in the AST transformer used by the legacy pipeline. This guarantees
that recursive invocations will continue from the right "jump" point (instead of
continuing from the current jump point).

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

Change-Id: I8899669ceefe3f2edba6531897834b2c275efada
Reviewed-on: https://dart-review.googlesource.com/40520
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-02-12 15:01:18 +00:00
Erik Corry 362e7c7883 [VM] Consolidate architecture-specific Label classes
R=vegorov@google.com

Change-Id: I3f3342282ac21b06e675b21981168f2a6750b6bd
Reviewed-on: https://dart-review.googlesource.com/39524
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-08 23:47:12 +00:00
Alexander Markov 1a1c7693d2 [VM/compiler] Fix range analysis for 64-bit fixed-size integers
This CL corrects handling of overflows in range analysis to
account for wrap-around (which happens with new integer semantics).

* If there is an overflow while doing computations in range
  analysis, the resulting range is approximated as full int64 range.

* For symbolic range boundaries 'symbol + offset', offset is checked
  to stay within [kMinInt64 - kSmiMin, kMaxInt64 - kSmiMax] in order
  to guarantee that overflow doesn't occur.

Issue: https://github.com/dart-lang/sdk/issues/31920
Change-Id: I2c16adbe3597e9b718ed2f6ce7210426fcc9e6a6
Reviewed-on: https://dart-review.googlesource.com/39423
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-08 21:49:42 +00:00
Alexander Markov 1bebd7aa1d [VM] Support inlining of _TypedList._setInt64 on x64
Issue: https://github.com/dart-lang/sdk/issues/32080
Change-Id: I692d1873acc4c9816ccc6929f51e0ed699f585da
Reviewed-on: https://dart-review.googlesource.com/40103
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-02-08 20:47:41 +00:00
Aske Simon Christensen da3bbd7d0f Fix crash when referring to type variables on local functions.
Closes https://github.com/dart-lang/sdk/issues/32012

Change-Id: I5d7861e1cc34a98972c1feb766702bbca58b325c
Reviewed-on: https://dart-review.googlesource.com/39160
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-02-07 13:49:32 +00:00
Jens Johansen a053e3bd98 [precompiler] Don't eagerly initialize static const fields
This decreases the compilation time when compiling flutter apps.

Bug: 32024
Change-Id: I615ae9c3923a6dc18437ccfb16ced5e4321fcb92
Reviewed-on: https://dart-review.googlesource.com/39580
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-02-07 10:39:39 +00:00
Régis Crelier 9a36711149 [Kernel] Insert argument type check in implicit setters (fixes #32065).
Update status file.

Change-Id: I4c7e1b5352ba40e1f571bd3e8eb6f8d7623a1e80
Reviewed-on: https://dart-review.googlesource.com/39422
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-02-07 01:35:24 +00:00
Ryan Macnak 2cbcb175cc [vm, arm64] Fix encoding of Should-Be-One bits in ldxr, stxr, umulh, smulh.
The Pixel is pickier about this than the other CPUs we've encountered so far.

Change-Id: I253e9e97d110112816fc9052a2e9c497cff0c01c
Reviewed-on: https://dart-review.googlesource.com/39360
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-02-06 22:13:33 +00:00
Erik Corry 619656b9c8 [VM] Fix far branches on ARM64 and add tests
R=rmacnak@google.com

Change-Id: I089d12bced44576a8a19e29bad94b1256f320f5f
Reviewed-on: https://dart-review.googlesource.com/38720
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-02-06 08:21:32 +00:00
Erik Corry ea91bc9888 [VM] ARM64: Fix assert hit with tbz branches in huge functions
R=vegorov@google.com

Change-Id: I584af6d68302dc7b2a47ed4f9846f56f0c942ddd
Reviewed-on: https://dart-review.googlesource.com/38640
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-05 19:06:03 +00:00
Vyacheslav Egorov 1911c23cf9 [vm/compiler] Use Isolate::use_field_guards instead of FLAG_use_field_guards.
These two values are not necessarily in sync: FLAG_use_field_guards can be set to
false while kernel-service is running from an app-jit snapshot with field
guards.

This caused major flakiness on kernel opt-counter-threshold bot.

This was a bug introduced by refactoring in d6eb8c6c27.

Change-Id: Icba874d319c1e96df90cae2d81e0bce3e752808b
Reviewed-on: https://dart-review.googlesource.com/38620
Reviewed-by: Erik Corry <erikcorry@google.com>
2018-02-05 17:40:53 +00:00
Ryan Macnak 90e513600a [vm] Add option to gen_snapshot for generating the VM portion of an AOT snapshot by itself.
Adjust gen_snapshot to not attempt to load or import the '::' (root) library.

Change-Id: Id0e9c63726c6f65fc7929f0e9e60f440f0990f45
Reviewed-on: https://dart-review.googlesource.com/38180
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-02-03 00:09:36 +00:00
Vyacheslav Egorov 71ccc5349e [vm/kernel/il] Use correct context level when constructing scope of a tear-off.
This fixes dartk/dartkp failures introduced by d117760ba6.

Change-Id: I1a8ec9ff5b047c5c8b16238c3d401c8cb434ff4e
Reviewed-on: https://dart-review.googlesource.com/38280
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-02 16:56:17 +00:00
Benjamin Lerman b3afc206db [vm/kernel] Fix for loop to prevent unreachable-code warning.
Change-Id: I22e5defd2012312b7823c1535421261edd79edff
Reviewed-on: https://dart-review.googlesource.com/38221
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-02 14:13:14 +00:00
Vyacheslav Egorov d117760ba6 [vm/kernel/aot] Skip unnecessary type checks on parameters of instance methods.
This relands 75a9579ea0.

The approach works as follows:

Step 1: Kernel transform. Under the closed world assumption compute the
set of selectors dispatched dynamically, then mark all procedures that don't
match any of those selectors as 'not-dispatched-dynamically'.

Step 2: VM backend. When building IR for a function if this function was
marked as not-dispatched-dynamically then omit type checks for any parameter
that is not marked as generic-covariant-impl, as such arguments are guaranteed
to be checked on the caller side (by front-end).


+------------------------+------------+----------+-----------+--------------+
|       benchmark        |  baseline  |  current |  with opt |  improved by |
+------------------------+------------+----------+-----------+--------------+
| stock_layout_iteration |  2366.3786 |   2724.3 |   2562.75 |  -5.93%      |
| stock_build_iteration  |     3824.3 |   4914.8 |      4681 |  -4.76%      |
+------------------------+------------+----------+-----------+--------------+

* Flutter gallery Instructions size is reduced by 11% (8748720 bytes to 7846368 bytes).
Baseline is at 6196496 bytes.


Alternatively to annotating individual procedures, I considered annotating Program node
with a set of dynamically dispatched selectors. Decoding and passing this information
around proved to be quite cumbersome in the "streaming" world, so I opted for a simpler
approach where all individual procedures are annotated.

Bug: https://github.com/dart-lang/sdk/issues/3179
Change-Id: I2f32a609e3872c74d5ae7bbd97555453aaedf15f
Reviewed-on: https://dart-review.googlesource.com/38125
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-02-02 11:43:55 +00:00
Vyacheslav Egorov 7078f6be58 Revert "[vm/kernel/aot] Skip unnecessary type checks on parameters of instance methods."
This reverts commit 75a9579ea0.

Reason for revert: function_subtype_bound_closure7_test fails in darkp

Original change's description:
> [vm/kernel/aot] Skip unnecessary type checks on parameters of instance methods.
> 
> The approach works as follows:
> 
> Step 1: Kernel transform. Under the closed world assumption compute the
> set of selectors dispatched dynamically, then mark all procedures that don't
> match any of those selectors as 'not-dispatched-dynamically'.
> 
> Step 2: VM backend. When building IR for a function if this function was
> marked as not-dispatched-dynamically then omit type checks for any parameter
> that is not marked as generic-covariant-impl, as such arguments are guaranteed
> to be checked on the caller side (by front-end).
> 
> # Performance Impact
> 
> +------------------------+------------+----------+-----------+--------------+
> |       benchmark        |  baseline  |  current |  with opt |  improved by |
> +------------------------+------------+----------+-----------+--------------+
> | stock_layout_iteration |  2366.3786 |   2724.3 |   2562.75 |  -5.93%      |
> | stock_build_iteration  |     3824.3 |   4914.8 |      4681 |  -4.76%      |
> +------------------------+------------+----------+-----------+--------------+
> 
> * Flutter gallery Instructions size is reduced by 11% (8748720 bytes to 7846368 bytes).
> Baseline is at 6196496 bytes.
> 
> # Alternative Implementations
> 
> Alternatively to annotating individual procedures, I considered annotating Program node
> with a set of dynamically dispatched selectors. Decoding and passing this information
> around proved to be quite cumbersome in the "streaming" world, so I opted for a simpler
> approach where all individual procedures are annotated.
> 
> Change-Id: I363db6d5dd1138fe25917646313c16d0b213c3b4
> Reviewed-on: https://dart-review.googlesource.com/37822
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>

TBR=vegorov@google.com,alexmarkov@google.com,sjindel@google.com

Change-Id: I0fd6bf3e6edfc3e605da2b996f9a0da6c409d01c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/37802
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-02-01 20:41:19 +00:00
Vyacheslav Egorov 75a9579ea0 [vm/kernel/aot] Skip unnecessary type checks on parameters of instance methods.
The approach works as follows:

Step 1: Kernel transform. Under the closed world assumption compute the
set of selectors dispatched dynamically, then mark all procedures that don't
match any of those selectors as 'not-dispatched-dynamically'.

Step 2: VM backend. When building IR for a function if this function was
marked as not-dispatched-dynamically then omit type checks for any parameter
that is not marked as generic-covariant-impl, as such arguments are guaranteed
to be checked on the caller side (by front-end).

# Performance Impact

+------------------------+------------+----------+-----------+--------------+
|       benchmark        |  baseline  |  current |  with opt |  improved by |
+------------------------+------------+----------+-----------+--------------+
| stock_layout_iteration |  2366.3786 |   2724.3 |   2562.75 |  -5.93%      |
| stock_build_iteration  |     3824.3 |   4914.8 |      4681 |  -4.76%      |
+------------------------+------------+----------+-----------+--------------+

* Flutter gallery Instructions size is reduced by 11% (8748720 bytes to 7846368 bytes).
Baseline is at 6196496 bytes.

# Alternative Implementations

Alternatively to annotating individual procedures, I considered annotating Program node
with a set of dynamically dispatched selectors. Decoding and passing this information
around proved to be quite cumbersome in the "streaming" world, so I opted for a simpler
approach where all individual procedures are annotated.

Change-Id: I363db6d5dd1138fe25917646313c16d0b213c3b4
Reviewed-on: https://dart-review.googlesource.com/37822
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-02-01 18:07:38 +00:00
Martin Kustermann cf8a6063f8 [VM] Improve AssertAssignable/InstanceOf by having a fast case for non-generic, instantiated types
When the type to test against is instantiated and has no type arguments
there is a high probability that we receive instances of that class or
subclasses at runtime.

This CL therefore extends the fast-path of AssertAssignable/InstanceOf
by checking whether the instance class id is within the cid ranges that
directly/indirectly implement/extend the type to test against.

Currently we have an almost depth-first preorder numbering of class ids
in AOT, but there are exceptions.  So each class can have a number of
cid-ranges as subclasses / classes which implement it's interface.

This seems to improve performance of dart-aot-v2
  * flutter stock build by 15+%
  * DeltaBlueClosures by 10+%

and reduces code size on
  * flutter gallery by -3%

Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: I07dd91589cc3fcd8c5952bdba339e2e2a459e08e
Reviewed-on: https://dart-review.googlesource.com/35620
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-25 07:13:42 +00:00
Martin Kustermann 0a652c9ca9 Revert "[VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables"
This reverts commit 12759870a4.

Reason for revert: Broke many bots.

Original change's description:
> [VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables
> 
> This fixes an issue when a program got loaded via dill, a function
> with a try-catch got optimized and the exception/stacktrace variables
> got captured.
> 
> Change-Id: Ia6b62f2a0986c78b90afe7fae25025ca4e5b09db
> Reviewed-on: https://dart-review.googlesource.com/35182
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,kustermann@google.com

Change-Id: I2ec7b4bea401e6d5665f6e789eb8e241b99db7b3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/36200
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-01-21 20:46:49 +00:00
Martin Kustermann 12759870a4 [VM] Use IR for code in [CatchEntryInstr]s to populate captured exception/stacktrace variables
This fixes an issue when a program got loaded via dill, a function
with a try-catch got optimized and the exception/stacktrace variables
got captured.

Change-Id: Ia6b62f2a0986c78b90afe7fae25025ca4e5b09db
Reviewed-on: https://dart-review.googlesource.com/35182
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-21 16:12:58 +00:00
Alexander Markov e90b2d8461 [VM, AOT] Support double/int mixed operations on x64
This CL extends support of mixed operations in strong-mode AOT
from double/smi to double/int (if underlying code generator supports
conversions from int64 to double).

* MintToDouble instruction is renamed to Int64ToDouble.

* Code generation of Int64ToDouble is implemented on x64.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I3142302e80c2785be71d7a8baff42d40f0b5b1b8
Reviewed-on: https://dart-review.googlesource.com/35382
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-19 17:03:25 +00:00
Alexander Markov e3de763163 [vm/kernel] Use types inferred by type flow analysis for results of calls
* Type flow analysis writes inferred types (which include
  non-nullability and concrete classes) for the results of calls.

* VM uses new metadata to compute CompileTypes.

Issue: https://github.com/dart-lang/sdk/issues/30480

Change-Id: Ib0b7446af071f9cca5d8f1edd2d1d5f83b5714ba
Reviewed-on: https://dart-review.googlesource.com/33140
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-18 21:19:14 +00:00
Zachary Anderson 9c40a7e662 Reland: [dart:cli] Adds waitFor(Future)
This is a reland of https://dart-review.googlesource.com/#/c/sdk/+/28920/
with the following changes:
- It creates a new library dart:cli
- waitFor(Future) goes in dart:cli instead of dart:io
- Removes a flaky test, and adds a missing precompiler entrypoint
- Adds waitFor(Future)
- Improves doc comments

fixes #31102

Change-Id: I04d2c46fd0afac049dd4fd1353905dc20da18f90
Reviewed-on: https://dart-review.googlesource.com/29449
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Natalie Weizenbaum <nweiz@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-18 16:38:54 +00:00
Jens Johansen 188cee8b1c [kernel] Rename SyntheticDefault to Synthetic
Change-Id: Ibfa23fcde73e3482c1001bb885de86a408c66e5c
Reviewed-on: https://dart-review.googlesource.com/35580
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-01-18 11:09:35 +00:00
Erik Corry 72355d515b [VM] IA32: Make register allocation around boxing clearer
R=vegorov@google.com

Bug:
Change-Id: I96f01a61272a886294aadc877dc130f0bb011693
Reviewed-on: https://dart-review.googlesource.com/33942
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-17 16:38:08 +00:00
Martin Kustermann ce6852ece3 [VM] Optimize hand-written assembly for the implementation [AssertAssignableInstr]
Use a register calling-convention between "inlined code" and the stub. Also
avoid unnecessary push/pop/load-from-stack instructions.

Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: I0c07f0bb7ee524b9f5bd6d989b0203f3a53a3625
Reviewed-on: https://dart-review.googlesource.com/34641
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>
2018-01-17 15:35:47 +00:00
Ryan Macnak e6ebdccc2f [vm, armv6] Fix pool pointer offset used for large immediates.
Bug: https://github.com/dart-lang/sdk/issues/31857
Change-Id: I1d9fe0ee3234bc331a764cfc699efa820257a45c
Reviewed-on: https://dart-review.googlesource.com/34508
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-01-16 21:15:13 +00:00
Samir Jindel 42a639973d [kernel] Support for partial tearoff type application operator in the VM, take 3.
The original change is available in patchset 1.
The changes since then are just status file updates.

Change-Id: I0c45c4b09a187bdd60c6a38bf23f6b7a0cf80c97
Reviewed-on: https://dart-review.googlesource.com/34400
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-15 11:24:11 +00:00
Régis Crelier 0c2793b3db [VM runtime] Implement support for _extractTypeArguments in the VM (fixes #31805).
Update status files.

This cl includes implementing these two features on all platforms:
1) Support calling generic functions via DartEntry::InvokeFunction().
2) Support native generic functions. These are currently allowed, but type
   arguments are ignored, and therefore not accessible from the C++ side.

Change-Id: Id39e8ca46c2ba1ba3d46946c16712a8572ff64ea
Reviewed-on: https://dart-review.googlesource.com/34023
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-12 21:32:20 +00:00
Martin Kustermann 84e7bef26d Reland "[VM] Allow the inlining code to inline implicit getters even if a StaticCallInstr is used"
This also changes the implementation of Function::LookupImplicitGetterSetterField to **not** use
token positions for finding the right field, but rather the name.

Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: I418c89a1426c33b2bfa8adc00534511657af51f1
Reviewed-on: https://dart-review.googlesource.com/34141
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-12 17:18:29 +00:00
Martin Kustermann fd16b58955 [VM] Allow intrinsification of implicit field getters in checked/strong mode
Since implicit field getters have the receiver as the only argument
(on which don't have to perform any type checks), we can allow
intrinsification of implicit getters even in checked/strong mode.

Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: If08c6ee33818ab513a9dbf1457fede0eeb8c4404
Reviewed-on: https://dart-review.googlesource.com/34142
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-01-12 16:50:09 +00:00
Martin Kustermann 4cfa5f6ed1 [VM] Fix dart-aot-v2 on ARM: Do not try to use BinaryInt64Instr if it can deoptimize
Change-Id: Ibca8c588a26b031a37f61aa318a8c8c415e68c19
Reviewed-on: https://dart-review.googlesource.com/34381
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-12 13:36:37 +00:00
Jens Johansen b28efdc66b [kernel] Allow VM to skip kInstantiation from dill file
A new Expression was added in bc2560069a
but C++ wasn't updated to handle it.
The crash reported in 31868 is caused by trying to skip past such an
expression, which is now possible.
Actually using that expression is still unhandled though, although thats
a separate issue.

Fixes #31868.

Bug: 31868
Change-Id: Ife0aadb97cee398ee1925fb52f91127225253768
Reviewed-on: https://dart-review.googlesource.com/34361
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-01-12 11:50:55 +00:00
Jens Johansen 68c054d27f Revert "[kernel] Unrevert "Support for the partial tearoff type application operator in VM.""
This reverts commit 784ee768d8.

Reason for revert: Turns many kernel bots red.

Original change's description:
> [kernel] Unrevert "Support for the partial tearoff type application operator in VM."
> 
> The original revision is available in the first patchset.
> 
> Change-Id: I579b4b85a19ac17088eed050680a46df7ffc5c0a
> Reviewed-on: https://dart-review.googlesource.com/34102
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,sjindel@google.com

Change-Id: I7262f9b578bf9991f1e79aacb88c446950c79bc7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/34340
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-01-12 08:44:05 +00:00
Samir Jindel 784ee768d8 [kernel] Unrevert "Support for the partial tearoff type application operator in VM."
The original revision is available in the first patchset.

Change-Id: I579b4b85a19ac17088eed050680a46df7ffc5c0a
Reviewed-on: https://dart-review.googlesource.com/34102
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-11 21:37:38 +00:00
Alexander Markov eb9da14a7b [vm] Correct printing of bools when printing precompiler entry points
Change-Id: I80e6fdfc13d2ccf3dccf4c24d92c90b66868a81f
Reviewed-on: https://dart-review.googlesource.com/34026
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-01-11 16:00:08 +00:00
Samir Jindel 96381b76bc [kernel] Introduce 'forwardingStubInterfaceTarget' field for Procedures.
First step in fixing issue #31519.

Change-Id: I8df86954993ae5edd59ad2edc57179725880c1d9
Reviewed-on: https://dart-review.googlesource.com/34143
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-01-11 15:31:48 +00:00
Samir Jindel b74af78ddd [kernel] Avoid unnecessary argument type-checks on static methods in strong mode.
Change-Id: I224c292cf843b6903d695048d023c7365ba9cf53
Reviewed-on: https://dart-review.googlesource.com/33360
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-11 12:44:18 +00:00
Martin Kustermann caaddd7161 Revert "[VM] Allow the inlining code to inline implicit getters even if a StaticCallInstr is used"
This reverts commit 195bd1b36c.

Reason for revert: Crashes in release-precomp.

Change-Id: Iee7206fee27c2434a4e5355ca6101e9595ad102d
Reviewed-on: https://dart-review.googlesource.com/34060
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-10 23:19:46 +00:00
Martin Kustermann 7050b79755 [VM] Use ZoneHandle instead of normal Handle when used by IR instructions
Change-Id: Ib41fa91dff0de54f96c39d98320e722c3bad0441
Reviewed-on: https://dart-review.googlesource.com/34040
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-10 23:08:13 +00:00
Martin Kustermann 195bd1b36c [VM] Allow the inlining code to inline implicit getters even if a StaticCallInstr is used
We have devirtualization logic which turns [InstanceCallInst]s to
[StaticCallInstr]s (which are subject to different optimizations).

This makes the inlining decisions done in dart-aot-v2 a little
bit closer to dart-aot.

Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: If7961ad8f05ac2544f04044d05541a86a8074984
Reviewed-on: https://dart-review.googlesource.com/34000
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-01-10 22:11:49 +00:00
Martin Kustermann 7ab210e308 [VM] Allow EqualityCompare/RelationalOp/BinaryInt64OpInstr to take constants as inputs
Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: I3a64fc9e6a038ae28e3a98149b0494ebe254fd73
Reviewed-on: https://dart-review.googlesource.com/33780
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-10 19:29:28 +00:00
Martin Kustermann 0ea33d4283 Revert "[kernel] Support for the partial type application operator in the VM."
This reverts commit 4f265395e0.

Reason for revert: A lot of failing precompilation builders.

Original change's description:
> [kernel] Support for the partial type application operator in the VM.
> 
> Change-Id: Ieaf5d936676a6e755dab69d70105dcce0bcbfdb6
> Reviewed-on: https://dart-review.googlesource.com/32540
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,sjindel@google.com,regis@google.com

Change-Id: Iac6a9fe7fb7467cab3818da99043d310d1981c67
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/33940
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-01-10 17:05:39 +00:00
Martin Kustermann c06dd2e6a0 [VM] Implement UnboxInt64Instr::Canonicalize()
This allows us to convert UnboxInt64Instr's to UnboxedConstantIntrs if
the input is a constant.

Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: Ieefd28503059302817baa6f1a463a6e6a9a61398
Reviewed-on: https://dart-review.googlesource.com/33462
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-10 16:26:58 +00:00
Samir Jindel 4f265395e0 [kernel] Support for the partial type application operator in the VM.
Change-Id: Ieaf5d936676a6e755dab69d70105dcce0bcbfdb6
Reviewed-on: https://dart-review.googlesource.com/32540
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-10 13:57:28 +00:00
Samir Jindel 28a0706e91 [kernel] Implement correct semantics of forwarding stubs in VM
This revision has been factored out of Revision 29300.

Change-Id: Idf579f0e5ffeea5764e2a9654c6812d69f6977c7
Reviewed-on: https://dart-review.googlesource.com/31921
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-01-10 07:39:31 +00:00
Ryan Macnak 340995ec5d Remove unused Dart_SaveJITFeedback.
Change-Id: I6b4ce6b8f18ff2788b22873044572b2a81b7b7ef
Reviewed-on: https://dart-review.googlesource.com/30624
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-10 01:29:39 +00:00
Samir Jindel b264dc6fc3 Fix implementation of StoreIndexedUnsafe instruction on ARM64.
Change-Id: I95780486bd092f297407fd96cc89f82eba6f2b84
Reviewed-on: https://dart-review.googlesource.com/33420
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-01-09 14:22:18 +00:00
Martin Kustermann 0fb2d0bfed Finish the kernel2kernel "constants" transformation by fixing a whole bunch of issues
Change-Id: I24e2ff06db1a7555f5091d0c27060ed79d6787ee
Reviewed-on: https://dart-review.googlesource.com/31980
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-08 19:56:24 +00:00
Martin Kustermann 5b56dfb77a [VM] Make Object::RawCast() allow "null" objects - similar to Object::^=
Change-Id: I9a05f0c6d36ed3a59d2742c0c84398dd6acba31a
Reviewed-on: https://dart-review.googlesource.com/32280
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-05 11:58:13 +00:00