Go to file
Ross McIlroy ec9aef3d1e [Runtime] Ensure template objects are retained if bytecode is flushed.
Template objects should be cached after they are first created and reused on
subsiquent calls to tag functions. Currently these cached objects are stored
on the feedback vector, which has appropriate lifetime, however with bytecode
flushing the feedback vector could be cleared when the bytecode is flushed,
causing the template object to be dropped.

In order to retain the cached template objects in the face of bytecode flushing,
this CL adds a weakmap for each native context that is (weakly) keyed by
shared function info, and holds a linked list of cached template objects
associated with that shared function info, indexed by feedback vector slot id.
Misses will check this weakmap, and if no entry is found, a new template object
is created and added into this weakmap alongside the feedback vector.

BUG=v8:8799,v8:8799,v8:8395

Change-Id: Ia95d5cfc394ce58dc9fe6a1e49780f05299acc17
Reviewed-on: https://chromium-review.googlesource.com/c/1477746
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59818}
2019-02-25 11:20:06 +00:00
benchmarks [test] Ensure random generator in JSTests does not use float arithmetic 2018-12-17 10:05:08 +00:00
build_overrides
custom_deps [build] Add common directory for custom deps 2018-06-08 19:23:02 +00:00
docs
gni Reland^2 "[build] disable C++ optimization for mksnapshot code." 2019-02-15 14:44:29 +00:00
include [tracing] Fix races in TracingController implementation 2019-02-21 08:34:16 +00:00
infra [v8] define linux64 gc stress trybot in src side 2019-02-20 15:10:23 +00:00
samples Add a sample that uses the JS API to create wasm 2018-06-07 23:43:38 +00:00
src [Runtime] Ensure template objects are retained if bytecode is flushed. 2019-02-25 11:20:06 +00:00
test [Runtime] Ensure template objects are retained if bytecode is flushed. 2019-02-25 11:20:06 +00:00
testing Remove dummy files created for rolling googletest. 2018-03-27 05:55:56 +00:00
third_party [array] Eagerly copy elements into a FixedArray for sorting 2019-02-18 11:02:17 +00:00
tools Whitespace change to trigger bots 2019-02-22 11:36:52 +00:00
.clang-format
.clang-tidy [tool] Remove unfixed clang-tidy warnings to ease use. 2018-10-26 07:40:32 +00:00
.editorconfig
.git-blame-ignore-revs
.gitattributes .gitattributes: Mark minified emscripten js files as -diff 2018-09-19 16:27:10 +00:00
.gitignore Revert "[build] Port "Add patched eu-strip in third_party"" 2019-01-31 16:44:20 +00:00
.gn [test] Remove obsolete test262 archive extract 2018-03-28 13:52:15 +00:00
.vpython [tools] Correctly identify and report test crashes and infra failures 2018-10-30 15:05:40 +00:00
.ycm_extra_conf.py
AUTHORS Preparing v8 to use with python3 /tools 2019-02-19 09:12:07 +00:00
BUILD.gn [Runtime] Ensure template objects are retained if bytecode is flushed. 2019-02-25 11:20:06 +00:00
ChangeLog [release] Merge ChangeLog back to master 2018-12-07 15:41:59 +00:00
CODE_OF_CONDUCT.md
codereview.settings
DEPS Update V8 DEPS. 2019-02-24 03:48:03 +00:00
LICENSE Add antlr4 runtime library to support Torque 2018-04-10 10:01:01 +00:00
LICENSE.fdlibm
LICENSE.strongtalk
LICENSE.v8
LICENSE.valgrind
OWNERS Reduce wasm OWNERS to current team members 2018-10-15 14:47:49 +00:00
PRESUBMIT.py Revert "[torque] Temporarily disable torque format check to pass presubmit" 2019-02-20 14:07:17 +00:00
README.md
snapshot_toolchain.gni Reland "Add Windows ARM64 ABI support to V8" 2018-10-24 19:46:36 +00:00
WATCHLISTS Update WATCHLIST wrt yangguo 2018-11-23 08:29:12 +00:00

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.