Commit Graph

13561 Commits

Author SHA1 Message Date
Alexander Aprelev 8bfbce33f1 Mark cc/Profiler_CodeTicks as failing on Windows, dartk x64 config
Change-Id: I44ab656634500cdd1dc43f2710c964e87dbffd4e
Reviewed-on: https://dart-review.googlesource.com/58520
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-05 17:32:54 +00:00
Aart Bik b7493b663e [vm/inliner] Inline small int convertors.
Rationale:
Always inline int convertors that don't do
much more than testing and anding.
For example, force inline
  v26 <- StaticCall:66( _toUint8@6027147<0> v4 T{Type: class 'int'?}) T{Type: class 'int'?}
to
  v47 <- Constant(#255)
  ..
  CheckSmi:10(v4 T{Type: class 'int'?})
  v45 <- BinarySmiOp:10(&, v4 T{_Smi}, v47 T{_Smi}) T{_Smi}

https://github.com/dart-lang/sdk/issues/33205

Change-Id: I595d9a64365e16ae244480b5e27f8be23c43d164
Reviewed-on: https://dart-review.googlesource.com/58061
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-05 16:54:19 +00:00
Paul Berry 60631b0944 Remove unnecessary casts from observatory.
Change-Id: I2ad59645471b41ce0c8530665b9dc2bcd3e56e7d
Reviewed-on: https://dart-review.googlesource.com/58321
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-05 15:55:00 +00:00
Alexander Aprelev e0ca1514a2 Mark test as failing.
Post a5e41681e5, the method Instance::Evaluate is now redundant in dart2 mode. Instead Instance::EvaluateCompiledExpression should be used.

The https://dart-review.googlesource.com/c/sdk/+/58440 should fix the test.

Change-Id: I18ee49174f51b46a87a56324be054ebc832a04df
Reviewed-on: https://dart-review.googlesource.com/58441
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-05 06:25:10 +00:00
Alexander Aprelev a5e41681e5 Add support for expression compilation via service.
If there is registered expression compiler, VM debugger uses it to compile expressions. Otherwise, it will fallback to use kernel service compiler.
This is needed to support Flutter use case where compiler is running on developer's host machine, not on the device where VM is running.

Bug: dartbug.com/31981
Change-Id: I8bdfc8ab45a57c306169abe189f1e24e1b0bcf40
Reviewed-on: https://dart-review.googlesource.com/57520
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-05 04:16:39 +00:00
Ryan Macnak ade0e93090 [vm] Normalize external string finalizers.
- Remove a level of indirection when accessing code units.
 - Require a finalizer when constructing an external string.

Change-Id: I3f65246bf0ac50ffad900e2c338623a7684a9d3d
Reviewed-on: https://dart-review.googlesource.com/54300
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-06-04 23:44:39 +00:00
Paul Berry 648f62a170 Rename Function to ServiceFunction, since creating a class called Function is deprecated.
Change-Id: Ia052b1663252a8786f94577626e631a66d69dff5
Reviewed-on: https://dart-review.googlesource.com/58280
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-04 22:02:29 +00:00
Zach Anderson 9847c06e76 [observatory] Top-level observatory_archive rule copies to root_out_dir
Change-Id: I165d5391f8ae36ec4201d25907c90a526d8b8c6b
Reviewed-on: https://dart-review.googlesource.com/58360
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-04 21:35:39 +00:00
Ryan Macnak 53f7bb175e Revert "Make --sync-async the default for the VM."
This reverts commit 1ddf553eb6.

Reason for revert: Failing service tests

Original change's description:
> Make --sync-async the default for the VM.
> 
> Change-Id: Ic6d7bbc27835ea7b197cccf05724adb99e95dd51
> Reviewed-on: https://dart-review.googlesource.com/57580
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

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

Change-Id: I062cb40badf0d1cf1808bee152fdd4074b00179d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/58380
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-04 21:04:20 +00:00
Alexander Markov c3b5939965 [vm] Remove --limit-ints-to-64-bits option and old _Bigint class
Closes https://github.com/dart-lang/sdk/issues/33306

Change-Id: I7088d8b7143edbe24f5cefe4be037ad2006e0625
Reviewed-on: https://dart-review.googlesource.com/58101
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-04 20:10:40 +00:00
Zach Anderson b0f622a143 [vm] Fix GC assert
Saw this assert hit on the bots, so switching back to max with 0.

Change-Id: Idafcd55d99dd441131dd3ac9aeb57ec102f28569
Reviewed-on: https://dart-review.googlesource.com/58323
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-04 19:07:39 +00:00
Alexander Markov 5bfe8d454e [vm/kernel] Set active class when evaluating Dart annotations, take 2
In https://github.com/dart-lang/sdk/commit/4fb0c6093879f7383ad597b04b3c89f3384dec19
active class was set in StreamingDartTypeTranslator, but it turns out
this is not enough. This CL sets active class in StreamingFlowGraphBuilder;
all dependent helper objects should pick it automatically.

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

Change-Id: If16afff35de32cbdba23f6260dac0e0fd7e9786a
Reviewed-on: https://dart-review.googlesource.com/57524
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-06-04 19:05:33 +00:00
Régis Crelier 57dc25c6f6 [VM interpreter] Initial version of stack walking of interpreted frames.
Various improvements and bug fixes.

Change-Id: Ice0ce0ba8db8c9f78b9fad89f951218c90c831b7
Reviewed-on: https://dart-review.googlesource.com/57443
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-06-04 18:37:30 +00:00
Florian Loitsch 1ddf553eb6 Make --sync-async the default for the VM.
Change-Id: Ic6d7bbc27835ea7b197cccf05724adb99e95dd51
Reviewed-on: https://dart-review.googlesource.com/57580
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-06-04 18:05:20 +00:00
Paul Berry a518d3c6dc Use int.tryParse rather than deprecated onError parameter of int.parse.
Change-Id: I20943a59e367fa6bd328604063b4a736ec300c0e
Reviewed-on: https://dart-review.googlesource.com/58260
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-04 17:49:39 +00:00
Ryan Macnak 2b5de60888 [vm] Improve --verbose-gc.
- Track mark-compact as a GC type instead of a GC reason.
 - Track external allocation as a GC reason.

Change-Id: Id79bf6a582109e3ebb97954822aefeffe68959e2
Reviewed-on: https://dart-review.googlesource.com/58002
Reviewed-by: Zach Anderson <zra@google.com>
2018-06-04 17:33:03 +00:00
Zach Anderson 0bec11a4f2 [vm] Control growth of external allocations
Previously, GC would only be triggered by external allocations on
reaching a limit indicated by a flag. This limit was too large
and not set thoughtfully by anyone.

This CL triggers GC when external allocations in old gen grow
larger than some limit based on results of previous GC, similar
to how Dart heap growth triggers GC. GC is triggered for new gen
when external allocations reach 4x the current new gen
capacity.

FL-61

Change-Id: I1d4da467bc2aab64058f25296aefdd73eebc38e6
Reviewed-on: https://dart-review.googlesource.com/58100
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-04 17:24:18 +00:00
Martin Kustermann 35b17f3730 [VM] Consistently use ValidationPolicy in frame iteration APIs
Previously there were places in the code where an API accepted a
`bool validate_frames` and call sites passed an enum value (which
implicitly got converted to a bool).

By changing the APIs to require an enum, the compiler will tell us if a
caller doesn't pass one.

Change-Id: I29fcd0b018e6cdd7e00b5bb03e83b9636d1345d4
Reviewed-on: https://dart-review.googlesource.com/57823
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-06-04 14:46:26 +00:00
Alexander Thomas a9257d05fb [vm] Prepare status files for dartk reload/rollback builders (#33126)
Change-Id: I954debb9f258eb94de227f6772ff08b53daba322
Reviewed-on: https://dart-review.googlesource.com/57623
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-06-04 11:30:21 +00:00
Ryan Macnak 5f9fcd0bbc [vm, x64] Remove embedded address from the implementation of math.min/max.
Embedded addresses are not safe for AppAOT and AppJIT snapshots.

Change-Id: Id36adb2e430bfc92c409ec96db15f2ad2151b2cb
Reviewed-on: https://dart-review.googlesource.com/58060
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-02 00:05:35 +00:00
Ryan Macnak 025cee6f1f Skip tests of snapshot determinism on Windows.
Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I53cf4a99c547d3ada9f51bc32889b593a9579bf7
Reviewed-on: https://dart-review.googlesource.com/58080
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-01 23:25:19 +00:00
Paul Berry 6ba8c711fa Observatory strong mode fix: expand the class hierarchy for debug events.
This CL adds base classes for breakpoint events (which support a
`breakpoint` getter) and async suspension events (which support an
`atAsyncSuspension` getter).  Previously these getters were accessed
through dynamic dispatch.

Change-Id: I9bc450a8988483cd0662b1dfe31b4adaf0936ff9
Reviewed-on: https://dart-review.googlesource.com/57380
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-01 22:43:29 +00:00
Vyacheslav Egorov 99a5f149ac [vm] Enable type stubs based type checks in JIT mode for some types.
Relanding 4be50d6fa1 with fixes to DBC
and location summaries: AssertAssignable must save FPU registers.

For now we are limiting this to type checks against type parameter types.


In Dart 1 mode Dart2JS compiles itself in 28s when running from source
and in 23s when running from ideal app-jit snapshot (trained on the
same workload).

Before this change in Dart 2 mode numbers were 51s and 57s respectively.

After this change in Dart 2 mode numbers are 38s and 32s. Meaning
that regression is reduced by 50%.

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

Change-Id: Ifb55f86453bfdf36a2e03bcd7f3197cfde257103
Reviewed-on: https://dart-review.googlesource.com/57980
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-06-01 20:58:33 +00:00
Zach Anderson 90c4215af4 [vm] Adds full GC check on all external allocations
related #33314

Change-Id: I3f715f5c3580c9f865a4579b732ba56c39c69012
Reviewed-on: https://dart-review.googlesource.com/58001
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-01 20:42:49 +00:00
Paul Berry bef7cd354f Observatory strong mode fix: Use .nodes= instead of .children= to accommodate text nodes.
This is necessary because HtmlElement.children= requires its parameter
type to be a List<Element>, and text nodes are not elements.

Change-Id: I99c91fe060c16f02d737d904f6869b3dad19c196
Reviewed-on: https://dart-review.googlesource.com/57005
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-01 20:39:34 +00:00
Paul Berry 72aae537a2 Observatory strong mode fix: clean up port mocking.
Change-Id: If2077620c0243838587d8d689a74f37c54b19c08
Reviewed-on: https://dart-review.googlesource.com/57360
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-01 20:34:43 +00:00
Alexander Markov c8860b4ca2 Remove all uses of --limit-ints-to-64-bits VM option
VM option --limit-ints-to-64-bits was enabled by default a while ago,
and now we're preparing to remove it from Dart VM.

This CL removes all uses of this option in preparation for this cleanup.

Issue: https://github.com/dart-lang/sdk/issues/33306
Change-Id: I8f33cf4ca8ce7ef9a171a982346e43dd8cb722a9
Reviewed-on: https://dart-review.googlesource.com/57960
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-06-01 19:32:24 +00:00
Martin Kustermann 0629e3afa5 [VM] Fix vm/cc/DartAPI_TypeGetParameterizedTypes test
This test was looking up "int", "List" ... in a generated test library
instead of the "dart:core" library.

It seems like the old lookup has succeded because the C++ parser adds all
imports to the library object and the lookup mechanism uses the library scope,
which most likely falls back to the import scope.

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

Change-Id: I37ea756fe53fe5dcbd8efe24053591816d5fc4af
Reviewed-on: https://dart-review.googlesource.com/57821
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-06-01 17:48:14 +00:00
asiva e9a60098bb [VM] Use UserVisibleName for types in error messages reported to users to make the error more clear. This fixes the case in issue 33303.
Bug: 33303
Change-Id: Idd31eadea3d2caca1cc9416b3286d39102bc2108
Reviewed-on: https://dart-review.googlesource.com/57880
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-06-01 16:41:44 +00:00
Vyacheslav Egorov 0aadba1189 Revert "[vm] Enable type stubs based type checks in JIT mode for some types."
This reverts commit 4be50d6fa1.

Reason for revert: Failures on SIMDBC64 and Analyzer bots.

Original change's description:
> [vm] Enable type stubs based type checks in JIT mode for some types.
> 
> For now we are limiting this to type checks against type parameter types.
> 
> # Performance improvements
> 
> In Dart 1 mode Dart2JS compiles itself in 28s when running from source
> and in 23s when running from ideal app-jit snapshot (trained on the
> same workload).
> 
> Before this change in Dart 2 mode numbers were 51s and 57s respectively.
> 
> After this change in Dart 2 mode numbers are 38s and 32s. Meaning
> that regression is reduced by 50%.
> 
> Issue https://github.com/dart-lang/sdk/issues/31798
> Issue https://github.com/dart-lang/sdk/issues/33257
> 
> Change-Id: I34bf5385a5cc3c7702dc281c6dfa89da85d3dde1
> Reviewed-on: https://dart-review.googlesource.com/57601
> Reviewed-by: Régis Crelier <regis@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>

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

Change-Id: I85a30c962b0cd556310e19193f5993ab76ecf2e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/57840
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-06-01 11:23:08 +00:00
Vyacheslav Egorov 4be50d6fa1 [vm] Enable type stubs based type checks in JIT mode for some types.
For now we are limiting this to type checks against type parameter types.

# Performance improvements

In Dart 1 mode Dart2JS compiles itself in 28s when running from source
and in 23s when running from ideal app-jit snapshot (trained on the
same workload).

Before this change in Dart 2 mode numbers were 51s and 57s respectively.

After this change in Dart 2 mode numbers are 38s and 32s. Meaning
that regression is reduced by 50%.

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

Change-Id: I34bf5385a5cc3c7702dc281c6dfa89da85d3dde1
Reviewed-on: https://dart-review.googlesource.com/57601
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-06-01 10:50:09 +00:00
Ryan Macnak c984e63f61 Skip tests of snapshot determinism in checked mode.
Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: Ie762ed4be07d6b67cfc35fbcf5a6ba11bfb96d76
Reviewed-on: https://dart-review.googlesource.com/57713
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-31 22:40:05 +00:00
Aart Bik a0c4ac14c1 Omit redundant bounds check for Dart2 on typed setters/getters.
Rationale:
Some native typed setters/getters in the typed_data library
are only called from clients that perform explicit bounds checks
first. Under strongly typed Dart2, there is no need to repeat
these tests. Avoids overhead, and reduces the polymorphicness
of these calls (preparing more inlining later).

https://github.com/dart-lang/sdk/issues/33205

Tests:
./tools/test.py --mode release --arch x64 -r vm
tools/test.py -m release -r vm -c dartk --strong standalone_2/typed_data_test
Change-Id: I81771a4f4b41a21e344f2d50745bbc30480b2a6c
Reviewed-on: https://dart-review.googlesource.com/57460
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-31 21:34:16 +00:00
Samir Jindel 9a02f5bf4d [vm/kernel] Fix bugs with expression evaluation in debug mode.
Fixes #33170: We had an assert that type variables are not bounded by "dynamic".
This assert was previously valid because the FE replaces "extends dynamic" with
"extends Object". However, it's not necessary in any way, and it's difficult to
access the Object type from outside the FE when synthesizing type parameters for
expression compilation.

Fixes #33171: The synthetic class generated during serialization to hold the
synthetic method may need to extend core library classes if the expression's
scope was within a core library class. In this case, the class finalizer needs
to avoid applying the restrictions on class extension to the synthetic class.

To facilitate this, we now use a single class name for all synthetic classes,
rather than copying the original class name. The name of the synthetic class has
no function at all, since the synthetic method is reparented to the original
class before execution.

Fixes #33239: The arguments descriptor passed to InvokeFunction for expression
functions which capture generic type parameters was using the wrong argument
count.

Fixes #33270: Use LookupClassAllowPrivate instead of LookupClass when resolving
the expression's scope in the VM.

Test Plan:

#33170: python tools/test.py -m debug -c dartk --strong service/evaluate_function_type_parameters_test
#33171: python tools/test.py -m debug -c dartk --strong service/eval_test
#33239: Updated "evaluate_function_type_parameters_test.dart".
#33270: Updated "eval_test.dart".

Change-Id: I376926bddd2224ec2322b43685d6c13831f1a8e7
Reviewed-on: https://dart-review.googlesource.com/56060
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-31 18:46:07 +00:00
Samir Jindel 41c5da8919 [vm] Fix non-reproducibility of VM builds.
We recently removed two kind bits from `Function` to free up space for other
bits. This left two bits in `RawFunction::kind_tag_` unused and no longer
deterministically initialized. This caused `Function` objects saved in the
snapshot within the `.rodata` section of the `dart` binary to be serialized with
a non-deterministic kind tag. We now zero-initialize the kind tag.

# Test Plan

I built the `runtime` target (which includes `dart`) 10 times locally and
received the same SHA256 hash for `dart` each time.

Change-Id: Ib0de4b4b040e26a92a1ba3364460bcec0f665789
Reviewed-on: https://dart-review.googlesource.com/57624
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-31 18:36:46 +00:00
Ryan Macnak eb82559db2 Reapply "[vm] Add tests for determinism of script and AppJIT snapshots."
- Fix assembler->Stop("My address is not deterministic").
 - Skip tests on -cdartk + simulators as DFE is too slow.

Bug: https://github.com/dart-lang/sdk/issues/31427
Bug: https://github.com/dart-lang/sdk/issues/33264
Change-Id: Id79a8b8c8fc4b3842fcd1d3827d6d4551890b794
Reviewed-on: https://dart-review.googlesource.com/57483
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-31 17:18:42 +00:00
Paul Berry 9e3842d624 Observatory strong mode fix: fix type errors with onDisconnect.
The method ObservatoryApplication._switchVM calls newVM.onDisconnect
and requires the resulting future to be completed with a String.  In
normal operation, this is satisfied and we just need to change a few
static types to enforce it.  But when FakeVM was in use, the future
was completed with `this`.  Since ObservatoryApplication._switchVM is
the only call site that cares what the future is completed with, it
makes sense to just change all the types to Future<String> and modify
FakeVM accordingly.

Change-Id: Id94d27ac6a42f31ab19ccc9ad8dd270ecf4042b4
Reviewed-on: https://dart-review.googlesource.com/57400
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-30 20:50:24 +00:00
asiva 3027302af6 [VM] Fix for issue 33277 (skip HasAttemptedReload check for kernel
isolate too).

Bug: 33277
Change-Id: I14c1a1b4e0fd07be6520fd8f77b9c6abddb5a5d0
Reviewed-on: https://dart-review.googlesource.com/57441
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-05-30 20:14:45 +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
Paul Berry bfeb80a0c9 Observatory strong mode fixes: fix some int/double mismatches.
Change-Id: I22db86e2ecd579c165536a1178ff9eba6963735a
Reviewed-on: https://dart-review.googlesource.com/57381
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-30 18:10:21 +00:00
Paul Berry 7fc88c494b Observatory strong mode fix: add required calls to .toList().
Change-Id: Ie3e3d4c52c64d9fe1c4ab000315b3a959f6f336a
Reviewed-on: https://dart-review.googlesource.com/57382
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-30 18:08:43 +00:00
Ankur Mittal f50873d345 [fuchsia] Renaming component FIDL to fuchsia.sys.
Bug: https://fuchsia.atlassian.net/browse/CP-39
Change-Id: Id66157f592a005d555d6f406e56a75a8cf6aeb48
Reviewed-on: https://dart-review.googlesource.com/57160
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-30 14:48:59 +00:00
Vyacheslav Egorov 3b86f823d0 [vm/corelib] Remove GrowableArrayMarker hack.
GrowableArrayMarker was a class that implemented int and was used to
enable implementation of default List factory constructor in pure Dart:

  factory List([int length = GROWABLE_ARRAY_MARKER]) {
    return identical(length, GROWABLE_ARRAY_MARKER) ? new _GrowableList<E>(0)
                                                    : new _List<E>(length);
  }

Its existence complicated all kinds of things in the VM and it is finally
time to remove it.

Instead we build List factory body directly in IL.

This CL also provides inlining rule for `new List(n)` case.

Change-Id: I870751658a4ac17fce649c9ac70395ff88a5436c
Reviewed-on: https://dart-review.googlesource.com/57262
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-30 13:44:43 +00:00
Vyacheslav Egorov 03cb46a229 [vm/perf] Fix JITDUMP integration.
* Use 3-arg variant of open() to fix compilation on GCC and also to ensure
that created file is readable/writable by all users.
* Avoid changing protection on code pages emitted into VM isolate heap: this
allows to profile stubs.

Change-Id: I2b621596405ad78f54a63cfebde7a1af9fa15911
Reviewed-on: https://dart-review.googlesource.com/57263
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-05-30 13:28:13 +00:00
Ryan Macnak aa8e2ee178 Revert "[vm] Add tests for determinism of script and AppJIT snapshots."
This reverts commit aac0478fad.

Reason for revert: Some configurations are still not deterministic

Original change's description:
> [vm] Add tests for determinism of script and AppJIT snapshots.
> 
> Fix non-determinism in unused bits of RawFunction::kind_tag_.
> 
> Leave some build-time-disabled debugging aids for tracking down which parts of snapshots are non-deterministic.
> 
> Bug: https://github.com/dart-lang/sdk/issues/31427
> Bug: https://github.com/dart-lang/sdk/issues/33264
> Change-Id: I4e373a8886c0abd7c03b8f3b980e308bee2ef324
> Reviewed-on: https://dart-review.googlesource.com/56720
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

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

Change-Id: I6c658c070f8df57625484449aafdf3f682841341
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31427, https://github.com/dart-lang/sdk/issues/33264
Reviewed-on: https://dart-review.googlesource.com/57200
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-30 00:53:08 +00:00
Ryan Macnak aac0478fad [vm] Add tests for determinism of script and AppJIT snapshots.
Fix non-determinism in unused bits of RawFunction::kind_tag_.

Leave some build-time-disabled debugging aids for tracking down which parts of snapshots are non-deterministic.

Bug: https://github.com/dart-lang/sdk/issues/31427
Bug: https://github.com/dart-lang/sdk/issues/33264
Change-Id: I4e373a8886c0abd7c03b8f3b980e308bee2ef324
Reviewed-on: https://dart-review.googlesource.com/56720
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-29 22:59:37 +00:00
Ryan Macnak c30af41b96 Reapply "[mirrors] Add IsolateMirror.loadUri."
- Forward only kImportTag requests to DFE. This restores the current handling of a kScriptTag request when loading the kernel isolate in the simulators.
 - Mark dynamic_load_test as failing in the reload stress tests (reload fails to preserve library identity).

Change-Id: Ibe6f0a3505b99736a38d566abf3b2151505d7a7e
Reviewed-on: https://dart-review.googlesource.com/56706
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-29 22:01:01 +00:00
Paul Berry a40993a6af Observatory strong mode fix: Fix incorrect types in DebuggerStackElement.
Change-Id: Ib882fa965b3ce9af377e89cc3666cbde04d2d657
Reviewed-on: https://dart-review.googlesource.com/57004
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-29 21:42:06 +00:00
Paul Berry 0fdfc9aa3b Observatory strong mode fix: Add a needed implements clause.
Add a clause indicating that FunctionCallTreeNode (in
lib/src/sample_profile/sample_profile.dart) implements
M.FunctionCallTreeNode.  This allows the two types for `root`
inherited by FunctionCallTree to be consistent with each other: the
type inherited from CallTree<FunctionCallTreeNode> is
FunctionCallTreeNode whereas the type inherited from
M.FunctionCallTree is M.FunctionCallTreeNode.

Change-Id: I0b48c57f84681a7d40afadfb59c72501cfe38577
Reviewed-on: https://dart-review.googlesource.com/57002
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-29 21:12:29 +00:00
Paul Berry 209029ab8e Observatory strong mode fix: Pass through a type parameter in the implements clause for GuardedMock.
Change-Id: Ia28bcff6594b82bf8a45ddf79510d3bd73903d1e
Reviewed-on: https://dart-review.googlesource.com/57003
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-29 21:12:06 +00:00