76a2ab06a1
There are two aspects to the non-JSObject parts of JSArrayRef: - JSArrayRef::length. Relevant only in two spots, 1. when reading (immutable) array boilerplates and 2. for GetOwnCowElement. - JSArrayRef::GetOwnCowElement. May read into a copy-on-write backing store. Relies on the invariant that cow backing stores are immutable. This CL renames the length accessor to length_unsafe to make the danger explicit at callsites. For GetOwnCowElement the refactor is slightly larger, since we now need to read into the backing store while keeping full control of object reads (e.g. JSArray::length and JSArray::elements_kind). We make all reads explicit at the call site by requiring that elements, elements kind, and length are passed in as arguments to GetOwnCowElement. Inside GetOwnCowElement, consistency between these is *not* guaranteed due to concurrency. At runtime, consistency *is* guaranteed through the reference-equality check on the elements seen during compilation. The actual elements read is implemented in ConcurrentLookupIterator::GetOwnCowElement. Bug: v8:7790 Change-Id: I9aa169ce4f2b1e2bfe1e9232007669eb7654a995 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2695403 Commit-Queue: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#72834} |
||
---|---|---|
.github | ||
build_overrides | ||
custom_deps | ||
docs | ||
gni | ||
include | ||
infra | ||
samples | ||
src | ||
test | ||
testing | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.flake8 | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gn | ||
.vpython | ||
.ycm_extra_conf.py | ||
AUTHORS | ||
BUILD.gn | ||
CODE_OF_CONDUCT.md | ||
codereview.settings | ||
COMMON_OWNERS | ||
DEPS | ||
DIR_METADATA | ||
ENG_REVIEW_OWNERS | ||
INFRA_OWNERS | ||
INTL_OWNERS | ||
LICENSE | ||
LICENSE.fdlibm | ||
LICENSE.strongtalk | ||
LICENSE.v8 | ||
MIPS_OWNERS | ||
OWNERS | ||
PPC_OWNERS | ||
PRESUBMIT.py | ||
README.md | ||
RISCV_OWNERS | ||
S390_OWNERS | ||
WATCHLISTS |
V8 JavaScript Engine
V8 is Google's open source JavaScript engine.
V8 implements ECMAScript as specified in ECMA-262.
V8 is written in C++ and is used in Google Chrome, the open source browser from Google.
V8 can run standalone, or can be embedded into any C++ application.
V8 Project page: https://v8.dev/docs
Getting the Code
Checkout depot tools, and run
fetch v8
This will checkout V8 into the directory v8
and fetch all of its dependencies.
To stay up to date, run
git pull origin
gclient sync
For fetching all branches, add the following into your remote
configuration in .git/config
:
fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
fetch = +refs/tags/*:refs/tags/*
Contributing
Please follow the instructions mentioned at v8.dev/docs/contribute.