Commit Graph

11 Commits

Author SHA1 Message Date
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
Erik Corry c8ad75d44a [VM] Make classes movable in sliding compactor
Store class sizes off heap so we can determine the size
of their instances even while the classes are moving.

R=rmacnak@google.com

Change-Id: I7b935114f76eb8b6aaa57d65e5b7cc0070afa75f
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/52104
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-26 09:38:25 +00:00
Erik Corry 79942bf18f [VM] Unify filter methods in assemblers
R=kustermann@google.com

Inspired by https://chromereviews.googleplex.com/593797014/
(Vipunen StoreField write-barrier improvements)
Next step is to move part of the write barrier to the end
of the function.
Bug:
Change-Id: I4d49625c9cf5b3488e4633084790f4a018021866
Reviewed-on: https://dart-review.googlesource.com/31100
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-03-14 07:38:45 +00:00
Erik Corry 8d58c13ca2 [VM] Use new Write barrier filters.
R=vegorov@google.com

Bug:
Change-Id: Icec38f730157448b47f5bf5a43dc582e4064e98e
Reviewed-on: https://dart-review.googlesource.com/30861
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2017-12-21 09:59:03 +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 f3be82bb34 [VM] Make x86 and x64 assemblers less repetitive
This also means that an orthogonal selection of the core ALU instructions
are available so future programmers don't have to add instructions
to the assembler as needed, which tends to slow down progress.

R=vegorov@google.com

Bug:
Change-Id: I5fea72c70ea7ffbae8efad85aef4ecc96c235cb6
Reviewed-on: https://dart-review.googlesource.com/21140
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-16 14:18:41 +00:00
Erik Corry d0abf73d12 [VM] Add bt immediate instruction for IA32, X64
R=vegorov@google.com

Bug:
Change-Id: I89640ac207877c7b564b6e9713ee72895ca02054
Reviewed-on: https://dart-review.googlesource.com/17443
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2017-10-31 17:06:55 +00:00
Ryan Macnak 7ddc885b5c IA32: Visit the object reference used in optimized static calls.
Such a call site starts with a reference to a stub in the VM isolate, so the pointer was not recordered, but after it first runs it will be patched to a code object in the current isolate, which may move during compaction.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: I3bf8fd1cf8884cbba9956254cad70f46e8b8cc00
Reviewed-on: https://dart-review.googlesource.com/12701
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2017-10-11 23:29:56 +00:00
Ryan Macnak 98edf8d2e5 [vm] Apply the large object threshold to inline allocation paths.
Previously allocations of Arrays/TypedData from generated code would try to allocate objects of any size into new-space. These allocation sites would only end up allocating into old-space if new-space didn't have enough free space and the allocation takes the slow path into the runtime. This means the allocation space from generated code was unstable. This change makes the allocation policy consistent between generated code and C++: objects larger than kNewAllocatableSize are always allocated into old-space.

This change regresses the microbenchmarks Streams.callbacks and Streams.controller (-44% and -33% on x64) because they allocate large, short-lived arrays.

Change-Id: I81c65af305b45b6fd40ec81d4a4ddc015bfc039c
Reviewed-on: https://dart-review.googlesource.com/4300
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-09-21 17:46:06 +00:00
Alexander Markov 0af232924c [VM, Compiler] Add initial implementation of check null instruction
This CL introduces new IL instruction, CheckNullInstr, for testing
if an object is null. This instruction will be used to ensure
correctness when AOT relies on strong mode types, which are nullable
by default (unless proven otherwise).

Code generation of CheckNullInstr is implemented without major code
duplication between different CPUs using common macro-assembler
pseudo-instructions implemented by all platforms.

Also, code generation of GenericCheckBoundInstr is refactored in
the similar way.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I35e9b556302fe7db98ce5167b3601f08ddbee642
Reviewed-on: https://dart-review.googlesource.com/4540
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-12 19:25:43 +00:00
Vyacheslav Egorov 8a179fb953 [VM, Compiler] Move compiler to a separate folder.
New folder structure (nested under vm/):

- compiler/
-   jit/         - JIT specific code
-   aot/         - AOT specific code
-   backend/     - all middle-end and back-end code (IL, flow graph)
-   assembler/   - assemblers and disassemblers
-   frontend/    - front ends (AST -> IL, Kernel -> IL)

compiler/README.md would be the documentation root for the compiler
pipeline

Bug: https://github.com/dart-lang/sdk/issues/30575
Change-Id: I2dfd9688793bff737f7632ddc77fca766875ce36
Reviewed-on: https://dart-review.googlesource.com/2940
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-09-04 15:15:18 +00:00