• 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...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.isolate Loading commit data...
d8_default.isolate Loading commit data...
default.isolate Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.isolate Loading commit data...