Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1177)

Unified Diff: src/heap/heap.h

Issue 1230793002: [es6] silence access-check failure for well-known symbol properties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ensure @@isConcatSpreadable is actually installed now that its in a separate list Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 715d9b22349031592e255950378c4ee5b5274a43..b4b5c21a50bd7994a9e7bbdd417f9cb88ffd075d 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -350,13 +350,19 @@ namespace internal {
#define PUBLIC_SYMBOL_LIST(V) \
V(has_instance_symbol, Symbol.hasInstance) \
- V(is_concat_spreadable_symbol, Symbol.isConcatSpreadable) \
V(is_regexp_symbol, Symbol.isRegExp) \
V(iterator_symbol, Symbol.iterator) \
V(to_primitive_symbol, Symbol.toPrimitive) \
V(to_string_tag_symbol, Symbol.toStringTag) \
V(unscopables_symbol, Symbol.unscopables)
+// Well-Known Symbols are "Public" symbols, which have a bit set which causes
+// them to produce an undefined value when a load results in a failed access
+// check. Because this behaviour is not specified properly as of yet, it only
+// applies to a subset of spec-defined Well-Known Symbols.
+#define WELL_KNOWN_SYMBOL_LIST(V) \
+ V(is_concat_spreadable_symbol, Symbol.isConcatSpreadable)
+
// 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) \
@@ -568,13 +574,14 @@ class Heap {
#define SYMBOL_INDEX_DECLARATION(name, description) k##name##RootIndex,
PUBLIC_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
+ WELL_KNOWN_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)
+ STRUCT_LIST(DECLARE_STRUCT_MAP)
#undef DECLARE_STRUCT_MAP
- kStringTableRootIndex,
+ kStringTableRootIndex,
#define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
SMI_ROOT_LIST(ROOT_INDEX_DECLARATION)
@@ -1128,6 +1135,7 @@ class Heap {
#define SYMBOL_ACCESSOR(name, description) inline Symbol* name();
PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR)
+ WELL_KNOWN_SYMBOL_LIST(SYMBOL_ACCESSOR)
#undef SYMBOL_ACCESSOR
Object* root(RootListIndex index) { return roots_[index]; }
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698