• Peter Marshall's avatar
    [runtime] Use JSBuiltinsConstructStub for InternalArray · 1d597f03
    Peter Marshall authored
    Part of ongoing work to remove the construct_stub field of the SFI.
    
    Generate_InternalArrayConstructor was actually incorrect for packed
    internal arrays, where it would instead create a regular internal array
    because it loaded the constructor function from the context every time.
    
    Ultimately InternalArray should be removed, or the constructor ported
    to CSA in the meantime. But for now, it is off the critical path for
    the construct_stub removal.
    
    Also fix a bug: Runtime_NewArray expects a type_info parameter, which
    should be in rbx (on x64). Because we now go through
    JSBuiltinsConstructStubHelper first, rbx is loaded with a value that
    doesn't look like a heap object, which causes a crash in NewArray.
    Fix that by first loading undefined explicitly (which is what the
    ArrayConstructor builtin does already).
    
    Bug: v8:7503
    Change-Id: Ic92fa8864b0af2d32200eb0176ba55ccff03b114
    Reviewed-on: https://chromium-review.googlesource.com/970823
    Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52072}
    1d597f03
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...