6a8b90c303
This CL builds upon https://crrev.com/c/3284887 (and partly reverts it). Class literals are a bit iffy when it comes to source position and debugging. Mainly the debugger assumes the following invariant: When we are paused inside a class scope, then we expect the class's BlockContext to be pushed already. On the other hand, when we are paused outside a class scope in a function, we don't expect to find the class's BlockContext. The problem is that there are cases where we can either pause "inside" or "outside" the class scope. E.g.: * `var x = class {};` will break on `class` which is inside the class scope, so we expect the BlockContext to be pushed * `new class x {};` will break on `new` which is outside the class scope, so we expect the BlockContext to not be pushed yet. The issue with the fix in https://crrev.com/c/3284887 is that it adjusted the break position for the bytecode of class literals to ALWAYS be after the BlockContext is pushed. This breaks the second example above. We need to tighten the fix a bit and only defer the break position if the "current source position" is inside the class's scope. This way we always guarantee that the BlockContext is pushed or not, depending if the source position that corresponds to the break position is inside or outside the class's scope. Note 1: The CL updates a lot of the bytecode expectations. This is because the class literals are often the first statement in the snippet so we don't need to defer the break position. Note 2: We add a mirrored debugger test to the inspector test so the fuzzer can have some more fun. Fixed: chromim:1350842 Change-Id: I9b5a409f77be80db674217a685a3fc9f8a0a71cf Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3827871 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/main@{#82473} |
||
---|---|---|
.github | ||
bazel | ||
build_overrides | ||
custom_deps | ||
docs | ||
gni | ||
include | ||
infra | ||
samples | ||
src | ||
test | ||
testing | ||
third_party | ||
tools | ||
.bazelrc | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.flake8 | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gn | ||
.mailmap | ||
.style.yapf | ||
.vpython | ||
.vpython3 | ||
.ycm_extra_conf.py | ||
AUTHORS | ||
BUILD.bazel | ||
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 | ||
LOONG_OWNERS | ||
MIPS_OWNERS | ||
OWNERS | ||
PPC_OWNERS | ||
PRESUBMIT.py | ||
README.md | ||
RISCV_OWNERS | ||
S390_OWNERS | ||
WATCHLISTS | ||
WORKSPACE |
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.