52ef2a1c27
Expressions of the form a_0 + a_1 + a_2 + a_3 + ... + a_n seem to be reasonably common for cases such as building templates. However, parsing these expressions results in a n-deep expression tree: ... / + / \ + a_2 / \ a_0 a_1 Traversing this tree during compilation can cause a stack overflow when n is large. Instead, for left-associate operations such as add, we now build up an n-ary node in the parse tree, of the form n-ary + / | \ / | ... \ a_0 a_1 a_n The bytecode compiler can now iterate through the child expressions rather than recursing. This patch only supports arithmetic operations -- subsequent patches will enable the same optimization for logical tests and comma expressions. Bug: v8:6964 Bug: chromium:724961 Bug: chromium:731861 Bug: chromium:752081 Bug: chromium:771653 Bug: chromium:777302 Change-Id: Ie97e4ce42506fe62a7bc4ffbdaa90a9f698352cb Reviewed-on: https://chromium-review.googlesource.com/733120 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#48920} |
||
---|---|---|
benchmarks | ||
build_overrides | ||
docs | ||
gni | ||
gypfiles | ||
include | ||
infra | ||
samples | ||
src | ||
test | ||
testing | ||
third_party | ||
tools | ||
.clang-format | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitignore | ||
.gn | ||
.vpython | ||
.ycm_extra_conf.py | ||
AUTHORS | ||
BUILD.gn | ||
ChangeLog | ||
CODE_OF_CONDUCT.md | ||
codereview.settings | ||
DEPS | ||
LICENSE | ||
LICENSE.fdlibm | ||
LICENSE.strongtalk | ||
LICENSE.v8 | ||
LICENSE.valgrind | ||
Makefile | ||
Makefile.android | ||
OWNERS | ||
PRESUBMIT.py | ||
README.md | ||
snapshot_toolchain.gni | ||
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://github.com/v8/v8/wiki
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 on the V8 wiki.