Commit graph

8961 commits

Author SHA1 Message Date
Zachary Anderson d9eb629ffa [infra] Use Clang for ia32 and arm64. Use the dl'd sysroots by default.
This CL switches the ia32 and arm64 builds to use clang by default.
The arm build can't be switched at least until we roll clang to
pick up the fix for https://reviews.llvm.org/D34691.

This CL also changes to use the sysroots from wheezy (and jessie
for arm64) by default so that we can be building/testing locally with
the same setup as we are shipping in the SDK.

Change-Id: I09a1907ee7f78c3f4bb8d56ffdbbd6107ed054d9
Reviewed-on: https://dart-review.googlesource.com/25160
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-02 06:19:33 +00:00
Paul Berry 7d65fec76e Reland "Route all messages through Loader."
This is the same as https://dart-review.googlesource.com/24481, but
with additional status file fixes.

Change-Id: Ic076c4dbf9c07e0fdf316298ca1ee1b6ce25002b
Reviewed-on: https://dart-review.googlesource.com/25508
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-01 22:47:06 +00:00
Ryan Macnak d016d1992c Make OOB messages and the profiler thread easier to identify.
Change-Id: I4ac537b5677a1d258bec050dda62e312f8caa28a
Reviewed-on: https://dart-review.googlesource.com/24721
Reviewed-by: Zach Anderson <zra@google.com>
2017-12-01 22:30:15 +00:00
Ryan Macnak bdb34a2f47 Remove dead libdart_dependency_helper.cc.
(Dead since removal of GYP build).

Change-Id: I683fa0744c19d3ddaf5255c5c02ee50c4682e1ca
Reviewed-on: https://dart-review.googlesource.com/25501
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-01 20:40:33 +00:00
Ryan Macnak a646f51a5b Revert "Route all messages through Loader."
This reverts commit 8e4b0bda23.

Reason for revert: Failures on most kernel bots

Original change's description:
> Route all messages through Loader.
> 
> This ensures that all messages are passed to instrumentation.
> 
> Issues addressed in this CL:
> 
> * When I added addCompileTimeError, I forgot to remove addError.
> 
> * All messages now all arrive in a single location (Loader). SourceLoader adds instrumentation by overriding recordMessage.
> 
> * As I changed the type inferrer to use addCompileTimeError, I broke DDC. This is because the front_end API (generateKernelInternal in kernel_generator_impl.dart) returns null if there are any errors reported via addCompileTimeError (and this didn't happen with addError, that shouldn't have been there anyways).
> 
> * Due to the previous problem, I changed generateKernelInternal to ignore errors, but then I started getting missing compile-time errors. This turned out to be due to the the silent parameter used during outline- and diet-parsing.
> 
> * I've removed all the "silent" parameters. This didn't work reliably and have been confusing Brian, Dan, and me several times when making parser changes. Instead we detect duplicated messages and avoid reporting them more than once.
> 
> * Types in error messages got names that where using a global object (globalDebuggingNames in pkg/kernel/lib/text/ast_to_text.dart). This meant that the #lib prefix would vary depending on how many tests were run which affected the serialized error message in pkg/front_end/testcases/invalid_assignment.dart.strong.expect.
> 
> Change-Id: I3d89372d6593a6e7e50cce733f61eedb881e15ed
> Reviewed-on: https://dart-review.googlesource.com/24481
> Commit-Queue: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>
> Reviewed-by: Kevin Millikin <kmillikin@google.com>

TBR=paulberry@google.com,ahe@google.com,kmillikin@google.com

Change-Id: I9f7b345a8ff040fc7aa73c5cb605190e47fd284b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/25660
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-01 20:37:45 +00:00
Régis Crelier 08b2294713 [kernel] In strong mode, change covariant parameter types to Object in the
implicit closure of a method compiled by kernel (fixes #31305).

Change-Id: Iabeee2e382bf07ff78645054e453e0bd1afd02ab
Reviewed-on: https://dart-review.googlesource.com/24362
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-12-01 18:00:16 +00:00
Samir Jindel 48a927acb2 Revert "[kernel] Introduce assert initializers."
Reverting due to several test failures.

This reverts commit 67adfe741b.

Bug:
Change-Id: Idd1aa15d47df68f2938285468dfa3d5043d8dae2
Reviewed-on: https://dart-review.googlesource.com/25520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-01 17:46:05 +00:00
Samir Jindel f5fc335a4c [kernel] Check bounds of type arguments in strong mode.
Change-Id: I2cb230db322cc26fb62e932b40882200de38c3d4
Reviewed-on: https://dart-review.googlesource.com/24180
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-01 14:55:56 +00:00
Samir Jindel 67adfe741b [kernel] Introduce assert initializers.
Assert initializers in Dart may be compiled directly to this form of initializer,
rather than through local initializers as is done now.

Bug:
Change-Id: Ia149ea3d1df5d1dc18be5636801604ffaf7ca7d8
Reviewed-on: https://dart-review.googlesource.com/14760
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 14:04:06 +00:00
Peter von der Ahé 8e4b0bda23 Route all messages through Loader.
This ensures that all messages are passed to instrumentation.

Issues addressed in this CL:

* When I added addCompileTimeError, I forgot to remove addError.

* All messages now all arrive in a single location (Loader). SourceLoader adds instrumentation by overriding recordMessage.

* As I changed the type inferrer to use addCompileTimeError, I broke DDC. This is because the front_end API (generateKernelInternal in kernel_generator_impl.dart) returns null if there are any errors reported via addCompileTimeError (and this didn't happen with addError, that shouldn't have been there anyways).

* Due to the previous problem, I changed generateKernelInternal to ignore errors, but then I started getting missing compile-time errors. This turned out to be due to the the silent parameter used during outline- and diet-parsing.

* I've removed all the "silent" parameters. This didn't work reliably and have been confusing Brian, Dan, and me several times when making parser changes. Instead we detect duplicated messages and avoid reporting them more than once.

* Types in error messages got names that where using a global object (globalDebuggingNames in pkg/kernel/lib/text/ast_to_text.dart). This meant that the #lib prefix would vary depending on how many tests were run which affected the serialized error message in pkg/front_end/testcases/invalid_assignment.dart.strong.expect.

Change-Id: I3d89372d6593a6e7e50cce733f61eedb881e15ed
Reviewed-on: https://dart-review.googlesource.com/24481
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 11:38:26 +00:00
Siva Chandra 702e4aecb8 Keep the line starts delta encoded in the VM heap as well - take 2
This reverts commit adf04d0ac6.

The original change used macros from stdint.h and it failed build on
the linux sdk bot:
https://uberchromegw.corp.google.com/i/client.dart/builders/dart-sdk-linux-be/builds/17348

In the newer version, constants from runtime/platform/globals.h are used
instead of the macros from stdint.h. Constants for int8 have been added as
they were not present already.

Change-Id: Ia4f27613fa5dca2cd6dbfeb37715ea70a85cec95
Reviewed-on: https://dart-review.googlesource.com/25083
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Chandra <sivachandra@google.com>
2017-12-01 05:16:48 +00:00
Martin Kustermann 3347b700df [VM] Add support for skipping a prologue range of blocks (for inlining heuristics)
Issue https://github.com/dart-lang/sdk/issues/31495

Change-Id: I876f4e064cfd21f5c3e99b531ff69776eba99635
Reviewed-on: https://dart-review.googlesource.com/25060
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-01 00:03:56 +00:00
Ryan Macnak 9174a627f5 [vm, gc] Ensure BackgroundCompiler can't be deleted during a safepoint.
Previously, the background compiler was deleted by the thread pool, which could have raced ahead of the mutator clearing its reference. Now it is deleted by the mutator.

Change-Id: Id353a96022f699131ee60fe31156cd0404dfd285
Reviewed-on: https://dart-review.googlesource.com/24342
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-30 22:59:51 +00:00
Ryan Macnak 104336699d Make the compactor invokable from Observatory's heap map page.
Add GCReason to timeline events.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Ie4514ca3fb0fa6197a895e54618dfcba1dfe3a8d
Reviewed-on: https://dart-review.googlesource.com/25120
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-30 22:55:56 +00:00
Martin Kustermann 3c0422e6a6 [VM] Make our NativeCallInstr work similar to all other call instructions
This CL makes NativeCallInstr instructions use PushArgument()s when
calling instead of directly using a pointer to the caller-provided
arguments (for functions without optional parameters) or relying on copy
arguments prologue (for functions with optional parameters).

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

Change-Id: I36d4bf1b7dd10f48c7e40b0cafe37f8698aacb71
Reviewed-on: https://dart-review.googlesource.com/24961
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-30 16:48:24 +00:00
Samir Jindel 50887f3ffa [kernel] Generic tearoffs in VM's Kernel FE.
Bug: #31482
Change-Id: Ice2f19983ac42aba22f6b4cdebf34dbae3cdf1ca
Reviewed-on: https://dart-review.googlesource.com/24960
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-11-30 14:56:29 +00:00
Martin Kustermann ada5985e04 [VM] Move removal of unnecessary CheckStackOverflowInstr in leaf functions
Issue https://github.com/dart-lang/sdk/issues/31495

Change-Id: I0c07cdae00152fc6e2dce10e48b8ba99356e2751
Reviewed-on: https://dart-review.googlesource.com/24780
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-30 14:31:55 +00:00
Martin Kustermann 23e607adf3 [VM] Refactor kernel::FlowGraphBuilder into a re-usable BaseFlowGraphBuilder
Issue https://github.com/dart-lang/sdk/issues/31495

Change-Id: I1d85abddb71af91219e0368f0c4d614f40fabe70
Reviewed-on: https://dart-review.googlesource.com/24823
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-30 11:41:34 +00:00
Jens Johansen b65d63e8b8 [kernel] Add position to catch
Bug:
Change-Id: Ie4a931ab55e923a3ed2bbf247535bc151c766272
Reviewed-on: https://dart-review.googlesource.com/23671
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-11-30 09:50:01 +00:00
Alexander Thomas adf04d0ac6 Revert "Keep the line starts delta encoded in the VM heap as well."
This reverts commit cd4e5ee866.

Reason for revert: This broke the 32bit Linux SDK build. 

Original change's description:
> Keep the line starts delta encoded in the VM heap as well.
> 
> The line starts in the kernel binary are delta encoded. By decoding and
> storing them as int32 values, we are unneccesarily bloating the VM heap.
> This change keeps the line starts delta encoded in the VM heap as well.
> This brings down the core snapshot size by 275KB (but will of course
> affect the debug performance.)
> 
> Bug:
> Change-Id: I77769efe7339484096d04c37180367adf96e51f4
> Reviewed-on: https://dart-review.googlesource.com/22304
> Commit-Queue: Siva Chandra <sivachandra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=sivachandra@google.com,asiva@google.com

Change-Id: I6e78bd510de7033d8583c089c00b5b261fdf69c1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/24800
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2017-11-30 09:32:29 +00:00
Siva Chandra cd4e5ee866 Keep the line starts delta encoded in the VM heap as well.
The line starts in the kernel binary are delta encoded. By decoding and
storing them as int32 values, we are unneccesarily bloating the VM heap.
This change keeps the line starts delta encoded in the VM heap as well.
This brings down the core snapshot size by 275KB (but will of course
affect the debug performance.)

Bug:
Change-Id: I77769efe7339484096d04c37180367adf96e51f4
Reviewed-on: https://dart-review.googlesource.com/22304
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-30 08:00:52 +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
Samir Jindel be07555207 Revert "Revert "[kernel] Implementation of fine-grained strong mode argument type-checks, phase 2""
This fixes some incorrect asserts that were breaking the debug bots.
The original revision is available in Patchset 1.

This reverts commit 26735519cb.

Bug:
Change-Id: Ifa599b7bff752dec4c505e10fd6db206e1abd977
Reviewed-on: https://dart-review.googlesource.com/23820
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2017-11-27 18:25:31 +00:00
Erik Corry 374f31bf9c [VM] Remove assert that causes --disassemble-stubs to fail
R=mkustermann@google.com

Using the --disassemble-stubs option on Debug builds of IA32
has been broken for some time (months). This lets it run.
Manually verified that it is correctly printing "this stub"
now.
Bug:
Change-Id: Ieedc17a7141c0c4d8dc1c002882ffd92fdce251d
Reviewed-on: https://dart-review.googlesource.com/23801
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2017-11-27 15:38:11 +00:00
Vyacheslav Egorov 26735519cb Revert "[kernel] Implementation of fine-grained strong mode argument type-checks, phase 2"
This reverts commit f13f772bb2.

Reason for revert: dartk(p)-strong debug mode is completely broken
because we convert int values non-representable as Smi to Smi, which
triggers that assert. The code that does tagging checks that
Untag(Tag(x)) == x, however for our purposes this identity does not
need to hold because we only care about lower bits and ignore the sign.

Reverting to restore green-ness of DEBUG builds.

TBR=sjindel@google.com

Bug:
Change-Id: Id436cbe000d6dec8db3469070ed531327cc82d89
Reviewed-on: https://dart-review.googlesource.com/23661
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-26 10:21:01 +00:00
Samir Jindel f13f772bb2 [kernel] Implementation of fine-grained strong mode argument type-checks, phase 2
This revision continues the implementation of:
https://docs.google.com/document/d/1KK8b6kzr0pQev5YNftSZhN3M6I8HcvOJwJ6U-cW4nfw/edit?ts=5a05b3e9#heading=h.7j21arix8p2

* Add argument checking bits for named arguments in the arguments descriptor.
* Add argument checking bits for type arguments.
* Calculate argument checking bits for setters.
* Add dispatch category to PropertySet and DirectPropertySet.

Bug:
Change-Id: Ieb0a4a99c401f53a72de473fda7bab61581f9996
Reviewed-on: https://dart-review.googlesource.com/22700
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-24 18:23:57 +00:00
Erik Corry 3b3406fea0 [VM] Fix golden disassembler output on IA32
R=johnniwinther@google.com

Bug:
Change-Id: If8fe92a2811dc114b5e0dce208ef82bd47408086
Reviewed-on: https://dart-review.googlesource.com/23540
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-24 11:40:59 +00:00
Erik Corry 1d9ff70a08 [VM] Pick more compact instruction encodings on x64
Several tricks here:
* When zeroing registers we can use xorl instead of xorq because the 'l'
  variant will zero the top bits.
* test and 'and' instructions with immediate arguments can use 8-bit and 32 bit
  variants more heavily.
* mov reg, immediate can use more compact encodings when sign-extension is not
  needed.

Performance is better than +1% when measured on Dart2JS.

R=vegorov@google.com

Intel optimization manual says: "Assembly/Compiler Coding Rule 64. (H impact, M
generality) Use the 32-bit versions of instructions in 64-bit mode to reduce
code size unless the 64-bit version is necessary to access 64-bit data or
additional registers."
Bug:
Change-Id: I2a989315c45f8d8ebab719653fbfa2b18ebb77c9
Reviewed-on: https://dart-review.googlesource.com/23400
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-24 10:53:17 +00:00
Ryan Macnak d366f9619a [vm] Toward deterministic builds.
- Remove random build-id.
 - Replace build time in embedded version string with commit time.
 - Remove timestamps from Observatory tarball.
 - Zero-initialize skipped bytes in snapshot streams.
 - Fix uninitialized fields in PatchClass, Script and Library.
 - Disable (under flag) random identity hashes and concurrent GC.

Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I3e95de679c8372841cd27ca60df78d9b00ffbfe1
Reviewed-on: https://dart-review.googlesource.com/22901
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-23 00:07:56 +00:00
Zachary Anderson f97e11f624 [Fuchsia] Safestack fix for exceptions
The safestack stack pointer is cached when invoking Dart code, and
manually restored when jumping over C++ frames for Dart exceptions
in Exceptions::JumpToFrame().

fixes #31356

Change-Id: I71c2e86d1d4f24571dd618a5db06fd1277339ebc
Reviewed-on: https://dart-review.googlesource.com/23141
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-22 19:27:54 +00:00
Ryan Macnak e4d01aa323 [vm, gc] Remove the evacuating compactor.
This was a temporary measure to verify the VM could handle moving old-space objects before we had the sliding compactor.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: I4ffec413918481c0af4828d126930455f620935d
Reviewed-on: https://dart-review.googlesource.com/22663
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>
2017-11-22 18:12:02 +00:00
Erik Corry 5253b7ed24 [VM] Fix ARM64 test to clear register before use
R=vegorov@google.com

Bug:
Change-Id: Ia223f98fa6e87f915b519738d47677837c911309
Reviewed-on: https://dart-review.googlesource.com/23100
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2017-11-22 16:03:44 +00:00
Erik Corry 70e5deacb5 [VM] Disable disassembly tests that differ on Windows
R=kustermann@google.com

Bug:
Change-Id: I925538c28aaefd144d7bc94a554a64ff4ead9ad8
Reviewed-on: https://dart-review.googlesource.com/23021
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-11-22 13:15:28 +00:00
Martin Kustermann 4f21462e49 [VM] Add assertion in precompiler to ensure root library is available
Change-Id: I465149f19f321df1cf0ffd687525aed06310b5d4
Reviewed-on: https://dart-review.googlesource.com/23002
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2017-11-22 13:12:37 +00:00
Erik Corry d300b08e35 [VM] Use X64 disassembler for IA32 and X64 (reland)
R=vegorov@google.com

This removes the IA32 disassembler and uses the X64 disassembler for
both variants.  Instructions that were in the IA32 assembler, but not
supported by the X64 disassembler have been added.  It also adds some
regression tests for a lot of the disassembler output.
Bug:
Change-Id: I243abbb04c3a77810ce96ca74f7f42a5a1aea0cf
Reviewed-on: https://dart-review.googlesource.com/22982
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2017-11-22 12:04:18 +00:00
Erik Corry 80992a5a09 Revert "[VM] Use X64 disassembler for IA32 and X64"
This reverts commit 9e42f006d9.
due to test failures on non-Linux platforms.

R=karlklose@google.com

Bug:
Change-Id: I5dc40da75d8d89fca8fce98a69a39d767493af1b
Reviewed-on: https://dart-review.googlesource.com/22921
Reviewed-by: Karl Klose <karlklose@google.com>
2017-11-22 09:11:12 +00:00
Erik Corry 9e42f006d9 [VM] Use X64 disassembler for IA32 and X64
R=vegorov@google.com

Bug:
Change-Id: I19b1f58e16ea35dc81b941c54e6e57b97cad3d74
Reviewed-on: https://dart-review.googlesource.com/22020
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-22 08:01:07 +00:00
Ryan Macnak 0f46e9c38f [vm] Forward weak table entries in bulk.
First sliding compaction in dart2js hello (without marking):
15409 us -> 13922 us (-9.7%) N=5

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: I07c0215e4e92e00a777fa38276a59352d83e4a3b
Reviewed-on: https://dart-review.googlesource.com/18516
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-11-22 01:37:37 +00:00
Ryan Macnak 5b9558228d Reapply "[vm, arm64] Add assembler support for tbz and use it for BranchIfSmi."
Skip addition of far branch support to the test harness.

Change-Id: Idec3a644e0dc4165bfaa8daa948f1aee172c1eea
Reviewed-on: https://dart-review.googlesource.com/22740
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-21 23:38:05 +00:00
Ryan Macnak 9bdc803d11 [vm, arm64] Don't access beyond CSP in assembler tests.
Change-Id: I10adfd4aaaef170c74747a1dceb7dfb17bddb9b5
Reviewed-on: https://dart-review.googlesource.com/22662
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-21 22:08:19 +00:00
Ryan Macnak 09f63eef5a [vm] Don't collect thread CPU time for timeline events on iOS.
This clock appears unreliable for durations shorter than ~10ms, which I suspect is the scheduling quantum.

Also remove unnecessary port allocation on macOS.

Bug: https://github.com/flutter/flutter/issues/13111
Change-Id: I9a61fdc076c0766c4519519b4ad6426f2aa556ae
Reviewed-on: https://dart-review.googlesource.com/22282
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-11-21 17:13:39 +00:00
Samir Jindel a991c17dc9 [kernel] Implementation of fine-grained strong mode argument type-checks, phase 1
The revision begins the implementation of:
https://docs.google.com/document/d/1KK8b6kzr0pQev5YNftSZhN3M6I8HcvOJwJ6U-cW4nfw/edit?ts=5a05b3e9#heading=h.7j21arix8p2

* The ArgumentsDescriptor is updated to hold a bitvector for positional arguments.
* The kernel flowgraph builder is updated to calculate the appropriate bits from
  the interface target and pass them through the ArgumentsDescriptor
  for regular MethodInvocations.

Bug:
Change-Id: I1cd9f43f697df1dd4f36103bbdfc0ba000125c02
Reviewed-on: https://dart-review.googlesource.com/21541
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-21 15:35:48 +00:00
Ryan Macnak 420f287695 [vm] Don't write usage_counter in core snapshots.
This behavior isn't useful since AppJIT snapshots.

Update non-pointer field initizations to be in declaration order.

./out/ReleaseX64/run_vm_tests StandaloneSnapshotSize
266553 -> 264163 (-0.89%)

Change-Id: Id5d85f73e22042be0c7a51420a6c1a9ad1cc0839
Reviewed-on: https://dart-review.googlesource.com/19880
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-20 19:04:06 +00:00
Ryan Macnak f77cf1c60e [vm] Verify canonical objects before taking a snapshot or shutting down.
Don't verify recursive types.

Bug: https://github.com/dart-lang/sdk/issues/31376
Bug: https://github.com/dart-lang/sdk/issues/27003
Change-Id: I783bcc45d55c78141dccb1b479c1d15234a9b363
Reviewed-on: https://dart-review.googlesource.com/21221
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-20 18:54:56 +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
Siva Annamalai 1c282f6482 Fix a set of tests that exercised the library Dart API functions in kernel mode.
Change-Id: Id7ac9166615d2b7de3604da555d9fc61563586af
Reviewed-on: https://dart-review.googlesource.com/20340
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Chandra <sivachandra@google.com>
2017-11-17 18:09:03 +00:00
Alexander Markov 58ffdbf5fc [VM] Move kernel service to pkg/vm, populate pkg/vm with necessary files
* kernel-service.dart is moved to pkg/vm/bin and renamed to
  kernel_service.dart

* LICENSE, pubspec.yaml and analysis_options.yaml added to pkg/vm.

* Kernel isolate name is corrected to be independent of URI passed
  in --dfe VM option.

Change-Id: I5b7b860297314e240e557af80913e7ac3e6324ad
Reviewed-on: https://dart-review.googlesource.com/21260
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-11-17 17:45:03 +00:00
Alexander Markov 328aa2e1ea [VM] Fix identical() for mint arguments on arm64
Closes https://github.com/dart-lang/sdk/issues/31395

Change-Id: I275a391392245e16ca40b98c3327e39b19106e89
Reviewed-on: https://dart-review.googlesource.com/21567
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-17 16:00:43 +00:00
Martin Kustermann 38518a98de [VM] Remove recently introduced assertion which doesn't always hold
The "main" method can also be a getter, which this assertion doesn't
take into account.  The assertion was just recently introduced in a
large CL and is not really necessary.

Revert "[gardening] Mark Language/Libraries_and_Scripts/Scripts/top_level_main_t05 crashing on debug dartk[p]"

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

Change-Id: I0fd45cfa5b885bb1942dcafe33afb922b7a75d40
Reviewed-on: https://dart-review.googlesource.com/21442
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-16 16:05:41 +00:00