Commit f56fb72f authored by jochen's avatar jochen Committed by Commit bot

Special case the "empty string" root so it doesn't constantly jump around

BUG=none
R=hpayer@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1075133002

Cr-Commit-Position: refs/heads/master@{#27736}
parent 8d4bae91
......@@ -6723,7 +6723,7 @@ class Internals {
static const int kNullValueRootIndex = 7;
static const int kTrueValueRootIndex = 8;
static const int kFalseValueRootIndex = 9;
static const int kEmptyStringRootIndex = 156;
static const int kEmptyStringRootIndex = 10;
// The external allocation limit should be below 256 MB on all architectures
// to avoid that resource-constrained embedders run low on memory.
......
......@@ -2510,6 +2510,7 @@ const Heap::StringTypeTable Heap::string_type_table[] = {
const Heap::ConstantStringTable Heap::constant_string_table[] = {
{"", kempty_stringRootIndex},
#define CONSTANT_STRING_ELEMENT(name, contents) \
{ contents, k##name##RootIndex } \
,
......
......@@ -37,6 +37,7 @@ namespace internal {
V(Oddball, null_value, NullValue) \
V(Oddball, true_value, TrueValue) \
V(Oddball, false_value, FalseValue) \
V(String, empty_string, empty_string) \
V(Oddball, uninitialized_value, UninitializedValue) \
V(Map, cell_map, CellMap) \
V(Map, global_property_cell_map, GlobalPropertyCellMap) \
......@@ -214,7 +215,6 @@ namespace internal {
V(constructor_string, "constructor") \
V(dot_result_string, ".result") \
V(eval_string, "eval") \
V(empty_string, "") \
V(function_string, "function") \
V(Function_string, "Function") \
V(length_string, "length") \
......@@ -370,6 +370,7 @@ namespace internal {
V(JSMessageObjectMap) \
V(ForeignMap) \
V(NeanderMap) \
V(empty_string) \
PRIVATE_SYMBOL_LIST(V)
// Forward declarations.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment