Commit Graph

1278 Commits

Author SHA1 Message Date
Martin Kustermann 0a8b236159 [VM] Make the encoding of variable descriptors use variable indices
This decouples the scope building from knowing about frame layout.

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

Change-Id: I9058b242fb24f859f54d6e3660a5972df86d39e6
Reviewed-on: https://dart-review.googlesource.com/59093
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-11 09:55:54 +00:00
Alexander Markov 17585c42fe Revert "[vm/kernel/aot] Exclude vmservice_io from "product" AOT snapshots."
This reverts commit 23fff58503.

Reason: failures on vm-kernel-precomp-linux-debug-x64-4-8-be,
precomp-linux-debug-x64-1-3-be, precomp-linux-product-x64-be bots.
Change-Id: I7bd67038aac3795c4b6ec9562c6fd4afead41a36
Reviewed-on: https://dart-review.googlesource.com/59242
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-06-08 00:51:53 +00:00
Samir Jindel 23fff58503 [vm/kernel/aot] Exclude vmservice_io from "product" AOT snapshots.
The `@pragma` annotation on `vmservice_io.main` is modified to only mark it as a
root on non-product builds. Since the annotation is evaluated in the constant
transformation, we need to thread a flag through `gen_kernel.dart` indicating
whether the Kernel produced should target a product precompiler.

# Test Plan

Tested locally on Flutter. Unfortunately it's not possible to test the scenario where
`vmservice_io` is not included, since we don't have any "product" bots. Soon the
flag will be introduced into Flutter, and we will have some coverage from there.

Change-Id: I39f12343038fa221aafe5a55241bff4b8d14ec19
Reviewed-on: https://dart-review.googlesource.com/57501
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-07 20:22:21 +00:00
Martin Kustermann a603635b85 [VM] Decouple frontend from frame layout
So far the frontend (parser, flow graph builder, ssa construction) were
aware of the actual frame layout.

This CL makes the indices we assign to [LocalVariable]s logical
indices, assigning:

  * M parameters the indices      1 ... M
  * N local variables the indices 0 -1 ... -(N-1)

The scope building, flow graph builder and ssa construction operate on
those logical indices.

When emitting actual code, the backend will translate those indices into
actual FP relative indices. This allows us to be more flexible in the
backend which frame layout we choose.

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

Change-Id: I9a504bf97821c257aafd2b3430df9f4c9da4b442
Reviewed-on: https://dart-review.googlesource.com/57321
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-07 11:35:58 +00:00
Samir Jindel 3d2b66074c Reland "[vm] Support definition of entry-points via @pragma('vm.extern') annotations.""
When the constant transformation is enabled on annotations, we need to fix handling
of @ExternalName annotations in the kernel_loader to ensure that we are setting
is_external = false on native methods.

The original revision is in patchset 1.

# Test Plan

The only regression was on benchmarks, Golem results are pending.

Change-Id: Ib80bb9f532299056e770a3b378cc5ad9ee451f57
Reviewed-on: https://dart-review.googlesource.com/56960
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-30 20:06:40 +00:00
Samir Jindel 58dc4e476d Revert "[vm] Support definition of entry-points via @pragma('vm.extern') annotations."
This reverts commit 3e50ea32b5.

Reason for revert: Severe performance regressions on many aot-v2 benchmarks.

Original change's description:
> [vm] Support definition of entry-points via @pragma('vm.extern') annotations.
> 
> The `@pragma` annotations are evaluated by the constants transformation and
> visible to TFA and the precompiler, which match on the "options" field of the
> annotation to determine whether to mark the class/procedure as a root.
> 
> This required enabling the transformation of annotation constants by default.
> 
> # Test Plan
> 
> The "vmservice_io.main" entry-point is removed from `main.cc` and annotated with
> `@pragma`. All precompiler tests will crash if "vmservice_io.main" is not
> available at runtime.
> 
> Debug/release precompiler bots are visible in "cl-linux" button.
> 
> Change-Id: I03c5d6ba7918672ed9905fcaee8dabe675a93a5d
> Reviewed-on: https://dart-review.googlesource.com/56660
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

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

Change-Id: I779c17d003659129a4b3fcf284423104948f60e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56820
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-28 19:23:16 +00:00
Samir Jindel 3e50ea32b5 [vm] Support definition of entry-points via @pragma('vm.extern') annotations.
The `@pragma` annotations are evaluated by the constants transformation and
visible to TFA and the precompiler, which match on the "options" field of the
annotation to determine whether to mark the class/procedure as a root.

This required enabling the transformation of annotation constants by default.

# Test Plan

The "vmservice_io.main" entry-point is removed from `main.cc` and annotated with
`@pragma`. All precompiler tests will crash if "vmservice_io.main" is not
available at runtime.

Debug/release precompiler bots are visible in "cl-linux" button.

Change-Id: I03c5d6ba7918672ed9905fcaee8dabe675a93a5d
Reviewed-on: https://dart-review.googlesource.com/56660
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-28 15:13:55 +00:00
asiva 02e47a9731 [VM] Fix for issue 32188 (cannot use pub with --preview-dart-2)
- Fix for 'unable to read .packages file' error when generating
  kernel file (script snapshot).
- Make sync-async an isolate specific flag and turn it off for
  the kernel isolate as it runs in Dart 1 mode
- Include 'reify-generic-functions' and 'sync-async' flags to the
  list of flags to check an app JIT snapshot against.

Change-Id: I2b16270f65705213660487f9c15fe0348fc84c8b
Reviewed-on: https://dart-review.googlesource.com/55589
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-18 18:12:08 +00:00
Martin Kustermann a6b6d6a608 [VM] Remove converted closure function code from the VM
This code is unused and has been bit-rotting for some time, so we'll
remove support for the kVector{Create,Copy,Get,Set}/kClosureCreation
kernel expressions.

Change-Id: Ie83d35b6d2cd533f3c08084631c5faf0c14ff122
Reviewed-on: https://dart-review.googlesource.com/53940
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-07 12:25:50 +00:00
Samir Jindel 83c5778345 [kernel/vm] Cleanup NSM forwarding.
Change-Id: Ia2077d2752fbeb45da7d1051cdab0c16d67377d0
Reviewed-on: https://dart-review.googlesource.com/48420
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-26 22:34:02 +00:00
Samir Jindel 95e9e890a9 [kernel/vm] Implement NSM-forwarding in the VM.
Change-Id: I43ce98235a7fdb43f99f433ef8dd10a6ed08fbbb
Reviewed-on: https://dart-review.googlesource.com/47621
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-22 19:14:04 +00:00
Ryan Macnak 558a931409 [vm] Move some string utils from runtime/vm to runtime/platform.
Change-Id: I552086445a7e07792f9da85afa5edf23b6c450d5
Reviewed-on: https://dart-review.googlesource.com/44402
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-01 02:07:46 +00:00
Florian Loitsch 3b8e4d41a7 Reapply "Run async functions immediately."
Which was reverted in commit 032be73dbe.
Originally commited in commit 67bac0bce6.
Original review URL: https://dart-review.googlesource.com/5263

Change-Id: Ic7333c29e502a3924dc6aade8ffa46fc8aa5b04a
Reviewed-on: https://dart-review.googlesource.com/38120
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-02-02 15:50:16 +00:00
Florian Loitsch 032be73dbe Revert "Run async functions immediately."
This reverts commit 67bac0bce6.

Reason for revert: broke the bot.

Original change's description:
> Run async functions immediately.
> 
> Migrated from https://codereview.chromium.org/2478703003/
> 
> Change-Id: I1d678c01ba5876490b12c676c500171328361d31
> Reviewed-on: https://dart-review.googlesource.com/5263
> Commit-Queue: Florian Loitsch <floitsch@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Vijay Menon <vsm@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

TBR=whesse@google.com,rnystrom@google.com,vegorov@google.com,kustermann@google.com,zra@google.com,floitsch@google.com,jmesserly@google.com,vsm@google.com,regis@google.com,sigmund@google.com

Change-Id: I20c948057423c3fa5aa8c72843f8f2a17e086ad5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/37981
Reviewed-by: Florian Loitsch <floitsch@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-02-01 15:01:21 +00:00
Florian Loitsch 67bac0bce6 Run async functions immediately.
Migrated from https://codereview.chromium.org/2478703003/

Change-Id: I1d678c01ba5876490b12c676c500171328361d31
Reviewed-on: https://dart-review.googlesource.com/5263
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-02-01 14:08:57 +00:00
Régis Crelier ed1d8bd475 [VM parser] Complete support for generalized void (fixes #30516).
'void' is now allowed as type annotation for locals, fields, and formal
parameters, in addition to being previously allowed as type argument.
Update status files.

Change-Id: I6459f56824dc0a695615d8dc87c9a8a1f9be29ef
Reviewed-on: https://dart-review.googlesource.com/37651
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-01-31 00:56:41 +00:00
Régis Crelier 811310f5bd [VM] Remove obsolete flag ignore_patch_signature_mismatch.
Change-Id: Ia21f868e4983e8d72050b5fe4e32d66ae2923318
Reviewed-on: https://dart-review.googlesource.com/36061
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-01-19 22:02:09 +00:00
Régis Crelier 0f08aababa [VM parser] Fix look-ahead parsing of void as type argument.
This is part of implementing generalized void, see #30516.
Add regression test.
Update status files.

Change-Id: I0b4730734238b4dc463ddd7835e30ea8a2bd4300
Bug:
Reviewed-on: https://dart-review.googlesource.com/34224
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-11 23:42:54 +00:00
Martin Kustermann cf1de7d46c [VM] Replace hand-written assembly prologues with IR
As part of the prologue changes we get rid of the empty context as well.

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

Change-Id: I707e23c631bcfbbad6c91c4963d0c10f7a0be625
Reviewed-on: https://dart-review.googlesource.com/25320
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-13 16:04:34 +00:00
Bob Nystrom 650c9dcc8e Support extractTypeArguments() in 1.0 mode on the VM and dart2js.
Without strong mode, a "good enough" implementation is to simply call
the generic method with "dynamic" for the type arguments, which is what
this does. That should be enough to unblock our internal users.

We also need to not report a compile error when
dart_internal/extract_type_arguments.dart imports the hidden
"dart:_internal" library.

This patch does both of those for the VM and dart2js (using its old
front end).

Note that the test still fails because the test is more particular than
most actual user code would be -- it validates that the instantiated
type arguments are *exactly* correct, and not that the returned object
is merely subtype compatible.

Bug:
Change-Id: I0343beace4991861b29712b3fd7067ec8dc8f8ba
Reviewed-on: https://dart-review.googlesource.com/28020
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-12 19:04:18 +00:00
Ryan Macnak 9b7b91ee66 Reapply "[vm] Tighten stack overflow check in the parser."
Use a smaller recursion limit that handles IA32 ASAN.

Bug: https://github.com/dart-lang/sdk/issues/31158
Change-Id: If2a5694722619d100be2e91f952210d92af4ec7c
Reviewed-on: https://dart-review.googlesource.com/24623
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-11-30 02:11:22 +00:00
Régis Crelier 87ff74f2d3 [VM] Fix parsing of 'covariant' followed by 'void' and look-ahead parsing of
type argument starting with 'void' (fixes #31279).
Add regression test.

Change-Id: I590e6ce0e7e915098cb24e91db9c1c8549606208
Reviewed-on: https://dart-review.googlesource.com/24624
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-11-29 22:32:35 +00:00
Régis Crelier f91f67a5be [VM] Emit type checks for incoming function arguments in strong mode.
Change-Id: Icd64913f0fc6ba54a0b8517bf05ae4babfae3bdc
Reviewed-on: https://dart-review.googlesource.com/19287
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-18 00:31:35 +00:00
Régis Crelier f568029b5f [VM] Make flag --strong isolate specific.
Change-Id: I3416e65eeec8b92af7f35dce20188b3934674cb7
Reviewed-on: https://dart-review.googlesource.com/20221
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-11-10 20:47:10 +00:00
Jens Johansen da75676729 Crash VM service test
For more information see dartbug.com/31331

Bug:
Change-Id: Ic0dee3fa04403dc7305eaf01ae3c932b334269e8
Reviewed-on: https://dart-review.googlesource.com/19600
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-11-10 07:59:14 +00:00
Régis Crelier f734e7ee38 [VM] Treat 'deferred' as a built-in identifier (fixes #31267 and #25732).
Reject built-in identifiers as prefix names (fixes #25733).
Update co19 status file.

Change-Id: I7fe5014d128bfdad442866e78196fb8dd2764dda
Reviewed-on: https://dart-review.googlesource.com/19860
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-11-09 23:29:52 +00:00
Régis Crelier 9b14a361a8 [VM] Address more TODOs related to generic functions.
Remove parsing support for 'super' that was meant to declare lower bounds of
function type parameters, since this feature did not make it into the spec.

Change-Id: I4087d0e108c5984437083a05a065fe785888d2f7
Reviewed-on: https://dart-review.googlesource.com/17360
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-10-31 17:55:26 +00:00
Ryan Macnak 2aac007bed [vm] Mark the synthetic use of completer.completeError in async functions.
Bug: https://github.com/dart-lang/sdk/issues/31222
Change-Id: I4b143ff88b59602f503c7a4d15690a468c577b48
Reviewed-on: https://dart-review.googlesource.com/16605
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-25 21:02:16 +00:00
Vyacheslav Egorov 2c97d724df [VM, JIT] Lower CloneContext into AllocateUninitializedContext.
CloneContext is implemented as a runtime call so it is considerably slower
than AllocateContext which leads to performance issues in loops that capture
iteration variables in for loops.

Lowering CloneContext into AllocateUninitializedContext and a sequence of
explicit load&store instructions both improves the performance by avoiding
the runtime call and also makes CloneContext semantics exposed to store-load
forwarding and allocation sinking.

PutIfAbsent benchmark from issue #31113 is improved by 5x, while 
ForInGeneratedLoop benchmark is improved by 8x.

Bug: https://github.com/dart-lang/sdk/issues/31113
Change-Id: I03fdede75f1a85fda92487aa8f9307ce06f23903
Reviewed-on: https://dart-review.googlesource.com/16280
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2017-10-25 11:09:29 +00:00
Régis Crelier 61251c2c4e [VM] Ensure that the constant right-hand side of operator ?? is canonicalized (fixes #31066).
Add regression test.

Change-Id: I48f33b91b75f372e14ed5aa9185e79e105307573
Reviewed-on: https://dart-review.googlesource.com/16330
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-24 23:50:09 +00:00
Ryan Macnak 107e92d11c Revert "[vm] Tighten stack overflow check in the parser."
This reverts commit eebbac4d78.

Reason for revert: Crash on ASAN bots

Original change's description:
> [vm] Tighten stack overflow check in the parser.
> 
> A recent change increased the accuracy of the stack limit used in the stack overflow check. This allowed the parser to complete some example programs that previously tripped the limit, but the flow graph builder or optimizer (depending on mode) then experienced the overflow. Rather than sprinkle checks throughout the compiler pipeline, we now flag an error in the parser based on the amount of nesting instead of amount of call stack used.
> 
> Bug: https://github.com/dart-lang/sdk/issues/31158
> Change-Id: I794e484d736e61499fe6812cf25185ce097bcdd8
> Reviewed-on: https://dart-review.googlesource.com/15651
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com

Change-Id: I232d929b24c54191d6688530c6f4c59dcccb5890
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31158
Reviewed-on: https://dart-review.googlesource.com/16400
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-24 23:08:09 +00:00
Ryan Macnak eebbac4d78 [vm] Tighten stack overflow check in the parser.
A recent change increased the accuracy of the stack limit used in the stack overflow check. This allowed the parser to complete some example programs that previously tripped the limit, but the flow graph builder or optimizer (depending on mode) then experienced the overflow. Rather than sprinkle checks throughout the compiler pipeline, we now flag an error in the parser based on the amount of nesting instead of amount of call stack used.

Bug: https://github.com/dart-lang/sdk/issues/31158
Change-Id: I794e484d736e61499fe6812cf25185ce097bcdd8
Reviewed-on: https://dart-review.googlesource.com/15651
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-24 21:38:46 +00:00
Samir Jindel 6b64aa8943 [kernel] Always disable reified generic functions in the Kernel FE.
Currently, we have some tests that run with reified generic functions ON and
some with it OFF. However, this causes inconsistencies when running the Kernel
FE from snapshot in the VM, since the VM requires that the flag be consistent
with the snapshot. Our solution is to turn the reified generic functions flag
into a per-isolate flag, which is always disabled in the Kernel FE's isolate.

Bug:
Change-Id: Ia91e9f0ff5fc059edf4bdbd79ef14abb288b4a49
Reviewed-on: https://dart-review.googlesource.com/16020
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-24 15:21:28 +00:00
Régis Crelier 89e43cdd41 [VM] Ensure that constant arguments to super initializer are canonicalized (fixes #31106).
Add regression test.

Change-Id: I6d4aa8148766ceab02bb7be071d55f0e0415bbbf
Reviewed-on: https://dart-review.googlesource.com/16081
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-10-24 00:37:58 +00:00
Vyacheslav Egorov 9cd7bc724d [VM, Kernel] Fix sync* implementation in checked mode
Change abefb7b432 introduced a typing issue
instead of fixing it: _SyncIterator<T>._current was actually used to return
either a value of type T (for yield) or value of type Iterable<T> (for yield*)
from the move callback.

This change refactors implementation of _SyncIterator in such a way that
_current is only used to return value for yield and a separate field
_yieldEachIterable is used to return Iterable<T> for yield*.

Change-Id: I3e3c832bbc8986d6976ddbb0856a1b5a127d845b
Reviewed-on: https://dart-review.googlesource.com/15542
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-20 18:15:28 +00:00
Régis Crelier 6504f342ab [VM] Remove obsolete flags.
--generic_method_syntax
--assert_initializer
--warn_super
--initializing_formal_access

Change-Id: Id2e9f15b1dfecb933df97fb954618ce122cb3e4b
Reviewed-on: https://dart-review.googlesource.com/15643
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-20 18:13:00 +00:00
Ryan Macnak b85a7fecd0 Reapply "[vm] Prefer stack bounds from the system thread library for overflow checks."
Mark some profiler tests on Windows as failing.

Bug: https://github.com/dart-lang/sdk/issues/31137
Change-Id: I46a5d4838443e5cfdac6043ea8dcfeb3d05d4823
Reviewed-on: https://dart-review.googlesource.com/14920
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-18 21:15:49 +00:00
Régis Crelier 269298fa8e [VM] Remove support for deprecated tear off syntax in the VM.
Change-Id: I2359bb18783cf21eab94001fe401f66c2ce680b7
Reviewed-on: https://dart-review.googlesource.com/14721
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-18 01:11:00 +00:00
Régis Crelier 390c80234a [VM generic functions] Properly instantiate generic signatures by providing the
number of free function type parameters.
Add test and mark status files.

Change-Id: I081de7674693c5ac2071a33948d25aadfc65f4ae
Reviewed-on: https://dart-review.googlesource.com/13901
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-16 21:57:05 +00:00
Régis Crelier fe22055f1c [VM] Capture instantiator when type parameter is referenced via string
interpolation in local function (fixes #31057).
Add regression test and mark status files.

Change-Id: I1258da09bd67f9c2ed9596b4ff93a1ad744cc505
Reviewed-on: https://dart-review.googlesource.com/13925
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2017-10-16 21:06:32 +00:00
Dmitry Stefantsov a227b168da Revert "Reapply "[vm] Prefer stack bounds from the system thread library for overflow checks.""
This reverts commit 5a022b9db6.

The reverted CL caused some redness on some vm and vm-precomp bots.

TBR=rmacnak@google.com
Change-Id: I9be670f3c3e341ec6d95082f288bc569834e38c7
Reviewed-on: https://dart-review.googlesource.com/13460
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2017-10-12 07:32:30 +00:00
Ryan Macnak 5a022b9db6 Reapply "[vm] Prefer stack bounds from the system thread library for overflow checks."
Fix accounting of guard pages to move the stack limit up instead of down.

Change-Id: I2f6577a12cf95707c186884f0bd3def03eac12ed
Reviewed-on: https://dart-review.googlesource.com/13381
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-10-12 02:17:11 +00:00
Ryan Macnak 6ecf6dd0a3 Revert "[vm] Prefer stack bounds from the system thread library for overflow checks."
This reverts commit af251ddfec.

Reason for revert: Crashes on Windows.

Original change's description:
> [vm] Prefer stack bounds from the system thread library for overflow checks.
> 
> Before this change, we would assume all stacks have the size the VM specifies for threads it creates, but this won't be accurate for the initial thread or threads created by the embedder.
> 
> Change-Id: I6605a88d6666a6f9d47fbe047d3fdd02aa22c80a
> Reviewed-on: https://dart-review.googlesource.com/10209
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com

Change-Id: I96eaccdc8edf6e3d319827a63d168534bad0518e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/13106
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-11 21:17:28 +00:00
Ryan Macnak af251ddfec [vm] Prefer stack bounds from the system thread library for overflow checks.
Before this change, we would assume all stacks have the size the VM specifies for threads it creates, but this won't be accurate for the initial thread or threads created by the embedder.

Change-Id: I6605a88d6666a6f9d47fbe047d3fdd02aa22c80a
Reviewed-on: https://dart-review.googlesource.com/10209
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-11 19:35:44 +00:00
Siva Chandra bf096c2bb4 Copy library specific kernel binary data to VM heap.
Before this change, each function and field had its own kernel data blob
in the VM heap. With this change, the entire kernel data of a library is
stored as one single blob in the VM heap. Functions and fields store an
offset which points to the kernel data, specific to them, in that single
blob.

The pointer to the kernel data for a library is saved in two places:
1. With the library objects themselves.
2. With all the patch classes of the library.
3. With the patch classes created during hot reload.

Change-Id: Ie03e738c4d20f16056a5ef04341b75506fda9c60
Bug:
Reviewed-on: https://dart-review.googlesource.com/6601
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2017-10-09 15:03:15 +00:00
Régis Crelier a6fc7321f8 Temporarily restore option --assert_initializer as a no-op (always on), because
it is still referenced from various scripts.

Change-Id: I852f952dfb2afb769de03bb8bbb180a1042dbf50
Reviewed-on: https://dart-review.googlesource.com/12123
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-06 20:11:28 +00:00
Régis Crelier 98a253186c [VM parser] Disallow implicit reference to 'this' in assertion initializer (fixes #29784).
Add regression test.
Adjust various status files.

Change-Id: I97bdf960260f0a13c2cfc6d95299d67a44c2238d
Reviewed-on: https://dart-review.googlesource.com/11247
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-10-06 18:40:14 +00:00
Siva Annamalai fa57f54572 Remove option --assert_initializer as it is the default now is a fully
supported feature in Dart language specifications.

Bug: 30976
Change-Id: I56bc36d6fbb4eff2fcbf215669843c524f1d3927
Reviewed-on: https://dart-review.googlesource.com/11240
Reviewed-by: Régis Crelier <regis@google.com>
2017-10-04 20:49:45 +00:00
Alexander Aprelev ce427ac14f Revert "Revert "Introduce StaticCallNode::kNoRebind and use that in implicit closures.""
This reverts commit ade37f931e.

This re-lands RebindRule change with fixes for the "-mdebug--hot-reload" test failures.

Original commit is reverted in patch set 1.
Fixes are in following patch sets.

Bug:
Change-Id: I49375af9b891323fe05c670d77cbf880964aae54
Reviewed-on: https://dart-review.googlesource.com/9361
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2017-09-28 19:43:32 +00:00
Dmitry Stefantsov ade37f931e Revert "Introduce StaticCallNode::kNoRebind and use that in implicit closures."
This reverts commit 97393fd961.

TBR=aam@google.com

Change-Id: I8fc5f644e994faa20aa8b5c54f8d6227a054e39d
Reviewed-on: https://dart-review.googlesource.com/9220
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2017-09-28 08:44:48 +00:00