| Index: src/heap/heap.h
|
| diff --git a/src/heap/heap.h b/src/heap/heap.h
|
| index 8fd4b844972ef90d2e8d44ad34f390451d0a5944..c9c921fa99e948ee0227a2852c805adc20403b76 100644
|
| --- a/src/heap/heap.h
|
| +++ b/src/heap/heap.h
|
| @@ -300,6 +300,15 @@ namespace internal {
|
| V(class_start_position_symbol) \
|
| V(class_end_position_symbol)
|
|
|
| +#define PUBLIC_SYMBOL_LIST(V) \
|
| + V(has_instance_symbol, symbolHasInstance, Symbol.hasInstance) \
|
| + V(is_concat_spreadable_symbol, symbolIsConcatSpreadable, \
|
| + Symbol.isConcatSpreadable) \
|
| + V(is_regexp_symbol, symbolIsRegExp, Symbol.isRegExp) \
|
| + V(iterator_symbol, symbolIterator, Symbol.iterator) \
|
| + V(to_string_tag_symbol, symbolToStringTag, Symbol.toStringTag) \
|
| + V(unscopables_symbol, symbolUnscopables, Symbol.unscopables)
|
| +
|
| // Heap roots that are known to be immortal immovable, for which we can safely
|
| // skip write barriers. This list is not complete and has omissions.
|
| #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \
|
| @@ -810,6 +819,11 @@ class Heap {
|
| PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR)
|
| #undef SYMBOL_ACCESSOR
|
|
|
| +#define SYMBOL_ACCESSOR(name, varname, description) \
|
| + Symbol* name() { return Symbol::cast(roots_[k##name##RootIndex]); }
|
| + PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR)
|
| +#undef SYMBOL_ACCESSOR
|
| +
|
| // The hidden_string is special because it is the empty string, but does
|
| // not match the empty string.
|
| String* hidden_string() { return hidden_string_; }
|
| @@ -1107,6 +1121,10 @@ class Heap {
|
| PRIVATE_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
|
| #undef SYMBOL_INDEX_DECLARATION
|
|
|
| +#define SYMBOL_INDEX_DECLARATION(name, varname, description) k##name##RootIndex,
|
| + PUBLIC_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
|
| +#undef SYMBOL_INDEX_DECLARATION
|
| +
|
| // Utility type maps
|
| #define DECLARE_STRUCT_MAP(NAME, Name, name) k##Name##MapRootIndex,
|
| STRUCT_LIST(DECLARE_STRUCT_MAP)
|
|
|