Commit graph

13525 commits

Author SHA1 Message Date
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
Alexander Markov 1ca17b6d03 [vm/kernel] Recognize desugared mixin applications in dart:mirrors
Kernel mixin transformation desugars mixin applications into normal
classes. Mixed-in type is pulled into interfaces list.
However, dart:mirrors needs to know the original mixed-in type of
a mixin application.

This change solves this problem by propagating a 'isTransformedMixinApplication'
attribute of a class through kernel AST, kernel binary and VM objects
into dart:mirrors implementation.

Fixes: https://github.com/dart-lang/sdk/issues/33240
Change-Id: I98ca69294e1ad445402a5ca91d90c30447aabcb2
Reviewed-on: https://dart-review.googlesource.com/56721
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-05-29 18:12:26 +00:00
Zach Anderson 736ddd9b0e [Observatory] Refactor observatory build to prepare for Fuchsia prebuilt
This splits create_archive.py into two steps. One that creates the .tar
and one that creates the .cc for the .tar. This way on Fuchsia, the
second step will take the prebuilt instead of building it.

Change-Id: I7f407f9e70db3135884eeeb61aa5aec3091f1fcc
Reviewed-on: https://dart-review.googlesource.com/56291
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-29 16:35:34 +00:00
Lasse R.H. Nielsen 6bc7288e70 Fix fused UTF-8/JSON decoding.
The VM version's parser did not allow a leading BOM, and it failed to parse a top-level integer.

Added test to check this.

Fixes #33251

Bug: http://dartbug.com/33251
Change-Id: I51e429082f0e9baac81e20f73b0885922b40b0b8
Reviewed-on: https://dart-review.googlesource.com/56860
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-05-29 12:34:25 +00:00
Alexander Thomas 2a3d1dc9ed [vm] Prepare status for app_jitk builders (#33126)
Change-Id: Iec5347b5f091b9fd6ff3c24047b011527f8b08ee
Reviewed-on: https://dart-review.googlesource.com/56802
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-29 11:43:25 +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
Régis Crelier 4d271519a1 [VM Bigint] Fix arm64 intrinsic for _estimateQuotientDigit (loop missing jump back).
Add regression test.
Fix arm64 disassembler (was printing "unknow" instructions).
Make decoding stricter in arm64 simulator.
This fix addresses https://github.com/a14n/dart-rational/issues/19

Change-Id: I1b2ccb4bd560b588d0c4860c904cc398fba9014f
Reviewed-on: https://dart-review.googlesource.com/56740
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-05-26 01:19:03 +00:00
Adam Barth 57d256377c [fuchsia] Update for port API change
zx_port_wait and zx_port_queue no longer take an unused count parameter.

Change-Id: I62f03871282d076638c51527603473252821d316
Reviewed-on: https://dart-review.googlesource.com/56705
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Adam Barth <abarth@google.com>
2018-05-25 19:43:15 +00:00
Paul Berry c09e0121f7 Observatory strong mode fixes: add explicit downcasts to button onClick callbacks.
Since the downcast is explicit (using "as") the type will be checked
even in unchecked mode, so technically there is a slight risk of
breakage.  But since the callback is so near the creation of the
ButtonElement, I'm not concerned.  Also, I'm not concerned about the
performance penalty of the explicit downcast because the cost is only
paid once per user click.

Change-Id: I64fbb442985f6ba6f745f665b36a3321498025e4
Reviewed-on: https://dart-review.googlesource.com/56704
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:38:13 +00:00
Paul Berry a5bf688622 Observatory strong mode fix: Avoid a String/Uri type mismatch.
Change-Id: Ie4871b7467bd00e594f7df397909690461fe358a
Reviewed-on: https://dart-review.googlesource.com/56702
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:30:18 +00:00
Paul Berry 1b0c2f4507 Observatory strong mode fix: Add VM.target getter.
This allows code to access a VM object's target without having to
downcast it to a more specific type.

Change-Id: I42f329e205c2da0137be2440f0d3088a7137bc55
Reviewed-on: https://dart-review.googlesource.com/56703
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:30:08 +00:00
Paul Berry 210d175cc0 Observatory strong mode fix: Fix a callback parameter type using an explicit downcast.
For brevity we explicitly downcast the parameter type (using "as")
rather than implicitly downcasting it (by assigning to a fresh
variable).  Since this is test code, I'm not concerned about the
performance penalty of the explicit downcast.

Change-Id: I2bf1556ec11db124978c6631df8fcdd5adbc298d
Reviewed-on: https://dart-review.googlesource.com/56701
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:22:13 +00:00
Paul Berry 08d0dcb4b0 Observatory strong mode fixes: specify some list literal types.
In some cases we need to specify a type because the inferred type
would be too specific.  For example, in the code:

    final content = [new SampleBufferControlElement(...)];
    ...
    content.addAll([new BRElement(), ...]);

Strong mode would infer a type of `List<SampleBufferControlElement>`
for `content`, making it impossible to add other kinds of HTML
elements to the list later.  So we have to specify explicitly that the
list element type is meant to be `HTMLElement`.

In other cases we need to specify a type because the inferred type is
too general.  For example, in the code:

    Future<List<String>> complete(...) {
      var result = [];
      ...add values of type String to `result`...
      return new Future.value(result);
    }

Strong mode would infer a type of `List<dynamic>` for `result`, making
it impossible to enclose in a `Future<List<String>>`.  So we have to
specify explicitly that the list element type is meant to be `String`.

Change-Id: I1b1c884529de2775898dfff800d250cd10629811
Reviewed-on: https://dart-review.googlesource.com/56700
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:22:03 +00:00
Paul Berry 462e350a6a Observatory strong mode fixes: Change types of InstanceMock/Instance members.
The types now correspond in the two classes, so we avoid invalid
override errors.

Change-Id: Iceeb324e6adf7573ae39d7250184f7eb58656498
Reviewed-on: https://dart-review.googlesource.com/56021
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:02:03 +00:00
Paul Berry 2d527801b2 Observatory strong mode fixes: fix several type annotations.
Change-Id: I647480f1f03be1d182afe98f6aa22c43a937aba3
Reviewed-on: https://dart-review.googlesource.com/56028
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-25 12:42:11 +00:00
Paul Berry 0125a5a235 Observatory strong mode fixes: Fix callback parameter types using implicit casts.
Change-Id: I0ee40677e13f82ca94238b98dcb50188063f9260
Reviewed-on: https://dart-review.googlesource.com/56026
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 12:32:01 +00:00
Paul Berry c85b2fc7be Observatory strong mode fixes: Fix an int/double type mismatch
Change-Id: I78cfc41dc328a40ba7650a492235d51663132130
Reviewed-on: https://dart-review.googlesource.com/56027
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 12:17:21 +00:00
Paul Berry 3fb22040cb Observatory strong mode fixes: make iteration types more specific.
Change-Id: I8031625bd676aadb0bf20e3b2642f0b7e84af747
Reviewed-on: https://dart-review.googlesource.com/56025
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 12:15:41 +00:00
Paul Berry 2165d2d797 Observatory strong mode fixes: safe uses of dynamic and covariant.
This CL makes the following changes, which should be safe since they
don't affect Dart 1.0 semantics:

- Explicitly declare the types of certain variables as `dynamic` to
  avoid strong mode inferring a type that leads to errors.

- Explicitly cast certain expressions to `dynamic` to allow access to
  members that are dynamically known to be present.

- Add `covariant` annotation to method parameters that are a subtype
  of the corresponding parameter in the base class.

Change-Id: Ibefe4d9591f70ea954373ca4d521bc54179cca9b
Reviewed-on: https://dart-review.googlesource.com/55900
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-25 11:54:20 +00:00
Paul Berry 7b3c3991ea Observatory strong mode fixes: add implicit downcasts.
Change-Id: I17d10ec4c69f9d3fa1cda3ec11df3e96749ade29
Reviewed-on: https://dart-review.googlesource.com/56022
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 05:20:25 +00:00
Paul Berry d17859ca11 Observatory strong mode fixes: make callback parameter types more general.
This CL addresses a code pattern where a method expects its parameter
to have a certain type, but that method is torn off and passed as a
callback to another method expecting its parameter type to be more
general.  For example:

    void f(int i) { ... }
    void g(void callback(Object o)) { ... }
    void h() {
      g(f); // Error: () -> int is not a subtype of () -> Object
    }

This is a strong mode error because the type system cannot guarantee
that the value pased to f will be an int.  The solution is to broaden
the type of the callback parameter so that it matches the type
expected for the callback.  In most cases, we insert an implicit
downcast (by reassigning the parameter to a local variable with the
expected type), which in Dart 2.0 semantics will result in a runtime
check (similar to what happens in Dart 1.0 checked mode).

Since the downcasts are implicit, the Dart 1.0 semantics are
unchanged, so this should be a safe change.

Change-Id: I9583ea194343b89b39305c9796cfad299a47943f
Reviewed-on: https://dart-review.googlesource.com/55907
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-24 23:07:55 +00:00
asiva 922f9697a0 [VM] Fix for issue 32901 - Isolate.resolvePackageUri has inconsistent behavior when called from a script launched via relative path.
Change-Id: I6ea0868936ff972def1f66c94509f7afed7c4c87
Reviewed-on: https://dart-review.googlesource.com/56622
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-05-24 22:08:40 +00:00
Ryan Macnak ec19ebd684 [vm] Fix feature detection of DBC32 versus DBC64 in snapshots with code.
At a minimium, the image portion of the snapshot is sensitive to word size.

Change-Id: I1056a726c7b773f3ef65608f3244aaa01a366ec4
Reviewed-on: https://dart-review.googlesource.com/56023
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-24 21:26:45 +00:00
Ryan Macnak de545b4079 Revert "[mirrors] Add IsolateMirror.loadUri."
This reverts commit ad4cfa0260.

Reason for revert: Assertion failures on DBC

Original change's description:
> [mirrors] Add IsolateMirror.loadUri.
> 
> This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.
> 
> Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
> Reviewed-on: https://dart-review.googlesource.com/45363
> Reviewed-by: Zach Anderson <zra@google.com>

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

Change-Id: I80669188b9f40b3b527e8e268ade0d0d514a8753
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-24 20:03:40 +00:00
Ben Konyi 1be13871bb [ VM ] Addressed additional comments from CL 56461.
Change-Id: I396a4e1038ccc7ae4f504d817ee6790aeb8d2003
Reviewed-on: https://dart-review.googlesource.com/56620
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-24 20:01:51 +00:00
Ryan Macnak ad4cfa0260 [mirrors] Add IsolateMirror.loadUri.
This allows a programmer to dynamically load code into an isolate. The closest existing API is Isolate.spawnUri, but communication with the dynamically loaded code in that case is limited to asynchronous message passing of JSON-like objects.

Change-Id: Icb23e9dacfb0035622c119f11d4e0f892ba2ccd1
Reviewed-on: https://dart-review.googlesource.com/45363
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-24 17:07:15 +00:00
Vyacheslav Egorov 7c43cfad9f [vm] Mark superclasses of interfaces implemented.
Previously we would only mark immediate superinterfaces
as implemented which is not enough.

Bug: b/80154489
Change-Id: I0751d4326b1ac8930b7fdfb35e0c3fdd5d0b71dd
Reviewed-on: https://dart-review.googlesource.com/56485
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-05-24 16:35:13 +00:00
Ben Konyi 2f7874ab99 [ VM ] Updated include path for typed_data_utils.h which was causing Flutter build to fail.
Change-Id: Id70533ec5237579719cfc061fab93bd659c20b1f
Reviewed-on: https://dart-review.googlesource.com/56560
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-24 16:15:03 +00:00
Samir Jindel 6fc0c1fa4f [vm/kernel] Only create zone handles when necessary (e.g. in IR instructions, LocalVariable).
Summary:

When evaluating constants for direct inspection (and not for injection into the
FG), we store many intermediate values in ZoneHandles. This leaks memory, since
the only need for ZoneHandles is preserving constants which are referenced by
the FG.

Test Plan:

Existing coverage is sufficient since no functionality is changed.

Change-Id: I33951eab762a4ad626f07ebf11118247c5a9ad3e
Reviewed-on: https://dart-review.googlesource.com/56345
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-24 13:14:29 +00:00
Samir Jindel 02bcbc12fa [vm/kernel] Fix partial instantiation implementation in StreamingConstantEvaluator.
# Summary

As part of commit 772c9bb5f, we changed the representation of partially
instantiated closures to facilitate partial instantiation of local functions.
The compile-time constant evaluator was not updated -- this revision implements
that update.

Fixes task 33211.

# Test Plan

Updated `partial_tearoff_instantiation_test.dart` to test the case which caused
incorrect behavior in task 33211.

Change-Id: I7bbd4fb83a5aea86ffc85c1d9952f1202f098d6b
Reviewed-on: https://dart-review.googlesource.com/56346
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-24 12:20:42 +00:00
Martin Kustermann b84f18e392 [VM] Mark seemingly consistently failing test on windows
Issue https://github.com/dart-lang/sdk/issues/33224

Change-Id: If9437c7791efd23dd98ad41cf3cf16173046cdaf
Reviewed-on: https://dart-review.googlesource.com/56501
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-24 09:17:27 +00:00
Ben Konyi c541cda216 [ VM ] Fixed issue where error code was being clobbered by call to Dart_TypedDataReleaseData on Windows, resulting in OSError returning a 0 error instead of the true error code.
Bug: 2
Change-Id: I33e9319f57de73d9435936ddf853968834fb5a16
Reviewed-on: https://dart-review.googlesource.com/56461
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-24 02:07:39 +00:00
Ben Konyi 3ab7cf0590 Revert "[dart:io] Revert recent non-utf8 path handling"
This reverts commit 42bcdcd332.

Change-Id: I11fb7db2aac3b7dc15cb35a22fea38b31069cbc0
Reviewed-on: https://dart-review.googlesource.com/55502
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-23 21:01:44 +00:00
Ben Konyi e35ed9c749 [ VM / Build ] Added '--no-include-kernel-service' to build.py. By default, the kernel service is now included in all build modes, including product mode. Providing '--no-include-kernel-service' will build the specified configuration without the kernel service.
Change-Id: I682cd7c2895a9bcb215948615f2bdc627abe8d08
Reviewed-on: https://dart-review.googlesource.com/56286
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-05-23 20:35:53 +00:00
Alexander Markov 4fb0c60938 [vm/kernel] Set active class when evaluating Dart annotations
Without active class, kernel reader is not able to finalize types
and fails to parse type literals.

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

Change-Id: Iefe7f33a371f3d4f892f21f8ea0060d70887186c
Reviewed-on: https://dart-review.googlesource.com/56242
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-05-23 16:17:55 +00:00
Martin Kustermann e0144d51bb [VM] Add UNREACHABLE() to AOT constant evaluator in the VM
Since commit 775eeece we use a kernel2kernel constant evaluator for
AOT compilations. We can now start to ensure we never hit the constant
evaluator in the VM anymore.

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

Change-Id: If0e3b5c89fba64a7f93af606e7146e52c45b38df
Reviewed-on: https://dart-review.googlesource.com/56340
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-05-23 16:01:45 +00:00