The original revision is in patchset 1.
Three bugs are fixed:
1. Fix SIMARM_X64 build: no need to generate trampolines for AOT or simulated JIT.
2. Hot-reload: Fix hot-reload: don't invalidate Code for force-optimized functions.
3. Windows: Provide shadow space to runtime routines.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-mac-debug-simarm_x64-try,vm-kernel-precomp-mac-release-simarm_x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-release-ia32-try,vm-kernel-win-release-x64-try
Change-Id: I326009cfacb51a84e9de4ddf9ff2d6d415460f91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113829
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
There are minor fixes for dartkb and windows.
The original revision is in patchset 1.
Change-Id: I9ab6e5fdb33fb4e84ea520c283fe94323616a8ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103129
Commit-Queue: Samir Jindel <sjindel@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
This helper class can be used for building IL in SSA form. It was
previously used to build intrinsic IL, but it can also be used to
build IL for tests.
This move required introducing a constant that describes offset
of the last parameter from SP value on entry (kLastParamFrom
This CL also changes the meaning of ParameterInstr(index, SPREG) to be
[SP + index + kLastParamSlotFromEntrySp], where previously it was
something like [SP + (index - 1) + kLastParamSlotFromEntrySp].
Change-Id: Ib75ecb3a94f9cde74d6f91028d3cbea8f5e4bc42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98336
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This is the final CL which adds a new --use-bare-instructions flag to
the VM.
If this flag is set during AOT compilation, we will:
* Build one global object pool (abbr: GOP) which all code objects
share. This gop will be stored in the object store. The PP register
is populated in the enter dart stub and it is restored when
returning from native calls.
* Gets rid of the CODE_REG/PP slots from the dart frames. Instead the
compiled code uses the global object pool, which is always in PP.
* Starts emitting pc-relative calls for calls between two dart
functions or when invoking a stub.
Limitation: We only emit pc-relative calls between two code objects
in the same isolate (this is because the image writer is writing
instruction objects for vm-isolate/main-isolate seperately)
* We do compile-time relocation of those static calls after the
precompiler has finished its work, but before writing the snapshot.
This patches all the instruction objects with pc-relative calls to
have the right .text distance.
* We emit a sorted list of code objects in ObjectStore::reverse_code_table,
which will be used by the AOT runtime to go back from PC to Code
objects (where all metadata, e.g. stack maps, catch entry moves, pc
descriptors are available).
Issue https://github.com/dart-lang/sdk/issues/33274
Change-Id: I6c5dd2b1571e3a889b27e804a24c2986c71e03b6
Reviewed-on: https://dart-review.googlesource.com/c/85769
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
We've been getting away with skipping this slot because
- ObjectPools are allocated into old space and never move, and
- the ObjectPools are also reachable from the PC marker in the caller's frame.
However, ObjectPools will become movable during compacting GCs.
Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Ied3a1588365fe5362ad7f1d2d446a7a59df6ced6
Reviewed-on: https://dart-review.googlesource.com/10680
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER
This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/2450713004 .
Instead of calling code object directly, call indirectly and
pass the code object in a register. The object pool is then loaded from
the code object. This is another preparation step for making generated code
relocatable.
All non-ia32 platforms:
No entry patching.
ARM:
PC marker (now code object) moves to the same place as on x64 (below saved PP, above saved FP).
R9 is now used as PP, R10 as CODE_REG.
BUG=
R=koda@google.com, rmacnak@google.com
Committed: 1d343e5a7b
Review URL: https://codereview.chromium.org//1192103004 .
Instead of calling code object directly, call indirectly and
pass the code object in a register. The object pool is then loaded from
the code object. This is another preparation step for making generated code
relocatable.
All non-ia32 platforms:
No entry patching.
ARM:
PC marker (now code object) moves to the same place as on x64 (below saved PP, above saved FP).
R9 is now used as PP, R10 as CODE_REG.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1192103004 .
This change makes CTX available by not caching the current
context while in Dart code. Instead the current context
is held in a local variable (:saved_current_context_var) and
is passed as argument in CTX at calls.
This also simplifies a lot of code in the debugger: As a result,
Isolate::top_context is not needed anymore since the current context
can always be extracted from a Dart frame.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//678763004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41422 260f80e4-7a28-3924-810f-c04153c831b5
1. Build script tools/build.py now actually builds X64 target when x64
is passed as an architecture:
- GYP files set 'msvs_configuration_platform': 'x64' for Win_x64
configuration;
- NSS related files are fixed to have correct set of defines for ia32
and x64 builds and include right files. A os_windows.c file added to
work-around inability to have different sets of source files per
configuration. Originally this was controlled through target_arch GYP
define and required regeneration of the solution.
- build.py passes Win32 or x64 platform to devenv as part of build
configuration argument;
2. Dart VM now supports Win64 ABI. ABI description is moved into a
separate class CallingConventions in constants_x64.h.
BUG=http://dartbug.com/7792R=iposva@google.com, ricow@google.com, srdjan@google.com
Review URL: https://codereview.chromium.org//317773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37078 260f80e4-7a28-3924-810f-c04153c831b5
The stack frame iteration during GC was missing one slot in stub frames that
did not save the pool pointer.
- This change makes all stub frames uniform, i.e they always save/restore the pool pointer. This ensures that we will traverse all slots on the stack.
- A new constant called kFirstObjectSlotFromFp has been added which is used as the slot to start stack traversal.
(The ARM and MIPs changes will be in a different CL)
R=iposva@google.com, regis@google.com, zra@google.com
Review URL: https://codereview.chromium.org//63093003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30088 260f80e4-7a28-3924-810f-c04153c831b5