• jgruber's avatar
    [builtins] Add builtins constants list to roots · ad74be52
    jgruber authored
    This is a step towards off-heap (and eventually isolate-independent)
    builtins.
    
    Off-heap code cannot use the standard CallStub/CallRuntime mechanisms,
    since they directly embed the callee code object pointer within the
    caller.  There are two main issues with that: 1. the callee may be
    moved by GC, and 2. the pc-relative addressing we currently use breaks
    (i.e. ends up pointing to a random spot on the heap) when moving the
    caller off-heap.
    
    This CL addresses that by introducing a constants list stored on the
    roots array.  Instead of embedding code targets, we now have the option
    of loading them from constants list. The code sequence is:
    
    REX.W movq rax,[r13+0x4a0]  // Load the constants cache.
    REX.W movq rdx,[rax+0xf]    // From there, load the code target.
    ...
    REX.W addq rdx,0x5f         // Add instruction_start.
    call rdx
    
    There's no visible performance impact on the web tooling benchmark.
    
    This list will later be extended to also contain other constants such
    as Strings.
    
    Bug: v8:6666
    Change-Id: Ifcf67d1f682804ba0b6d3d0383216e16575b6bf5
    Reviewed-on: https://chromium-review.googlesource.com/923729
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#51434}
    ad74be52
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...