Go to file
Benedikt Meurer 683cf6f43b [cleanup] Remove obsolete "one byte data hint" for strings.
In the early days of Chrome when we used WebKit there was no support for
ASCII strings on the C++ side, so we put a hint onto these two-byte
strings that said "string only contains one byte data", such that
internally in V8 when these were involved in string operations, we could
instead create the *cheaper* one byte strings.

Nowadays Blink properly supports one-byte string representations and
this additional hint only comes with overhead, since we check it in
quite a few places (i.e. on the hot path for string concatenation), plus
we end up consuming more memory due to the additional string maps.
Removing the hint also frees one bit in the InstanceType zoo for
strings.

This alone improves performance on the `bench-dom-serialize.js` test case
by around **3%**.

Tbr: mstarzinger@chromium.org
Bug: v8:6622, v8:8834, v8:8939
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Change-Id: I0753f2859cee7b5a37b6f0da64d8ec39fcb044ff
Doc: https://bit.ly/fast-string-concatenation-in-javascript
Reviewed-on: https://chromium-review.googlesource.com/c/1498478
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60006}
2019-03-04 14:04:02 +00:00
benchmarks
build_overrides
custom_deps
docs
gni [inspector] Fix js_protocol.pdl build dependency 2019-02-26 23:56:17 +00:00
include [cleanup] Remove obsolete "one byte data hint" for strings. 2019-03-04 14:04:02 +00:00
infra [build] Switch off goma on gcc trybots 2019-03-01 13:34:05 +00:00
samples
src [cleanup] Remove obsolete "one byte data hint" for strings. 2019-03-04 14:04:02 +00:00
test [cleanup] Remove obsolete "one byte data hint" for strings. 2019-03-04 14:04:02 +00:00
testing Remove dummy files created for rolling googletest. 2018-03-27 05:55:56 +00:00
third_party [DevTools] Roll of inspector protocol ... 2019-03-01 02:10:29 +00:00
tools [cleanup] Remove obsolete "one byte data hint" for strings. 2019-03-04 14:04:02 +00:00
.clang-format
.clang-tidy
.editorconfig
.git-blame-ignore-revs [build] Add DEPS formatting to hyper-blame 2017-10-09 14:08:45 +00:00
.gitattributes
.gitignore Add .ccls-cache to .gitignore 2019-02-26 10:32:45 +00:00
.gn
.vpython
.ycm_extra_conf.py
AUTHORS [coverage] Extend SourceRangeAstVisitor for throw statements 2019-02-28 10:45:29 +00:00
BUILD.gn [Torque] Move some TypedArray builtins to Torque 2019-03-01 12:46:25 +00:00
ChangeLog
CODE_OF_CONDUCT.md Explicitly state that the Chromium Code of Conduct also applies to V8 2016-03-02 09:51:24 +00:00
codereview.settings
DEPS Update V8 DEPS. 2019-03-04 03:33:49 +00:00
LICENSE
LICENSE.fdlibm Add LICENSE.fdlibm for all the fdlibm imported sources. 2016-06-09 07:17:03 +00:00
LICENSE.strongtalk
LICENSE.v8
LICENSE.valgrind
OWNERS
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
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.