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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 V(promise_status_symbol) \ 343 V(promise_status_symbol) \
344 V(promise_value_symbol) \ 344 V(promise_value_symbol) \
345 V(sealed_symbol) \ 345 V(sealed_symbol) \
346 V(stack_trace_symbol) \ 346 V(stack_trace_symbol) \
347 V(string_iterator_iterated_string_symbol) \ 347 V(string_iterator_iterated_string_symbol) \
348 V(string_iterator_next_index_symbol) \ 348 V(string_iterator_next_index_symbol) \
349 V(uninitialized_symbol) 349 V(uninitialized_symbol)
350 350
351 #define PUBLIC_SYMBOL_LIST(V) \ 351 #define PUBLIC_SYMBOL_LIST(V) \
352 V(has_instance_symbol, Symbol.hasInstance) \ 352 V(has_instance_symbol, Symbol.hasInstance) \
353 V(is_concat_spreadable_symbol, Symbol.isConcatSpreadable) \
354 V(is_regexp_symbol, Symbol.isRegExp) \ 353 V(is_regexp_symbol, Symbol.isRegExp) \
355 V(iterator_symbol, Symbol.iterator) \ 354 V(iterator_symbol, Symbol.iterator) \
356 V(to_primitive_symbol, Symbol.toPrimitive) \ 355 V(to_primitive_symbol, Symbol.toPrimitive) \
357 V(to_string_tag_symbol, Symbol.toStringTag) \ 356 V(to_string_tag_symbol, Symbol.toStringTag) \
358 V(unscopables_symbol, Symbol.unscopables) 357 V(unscopables_symbol, Symbol.unscopables)
359 358
359 // Well-Known Symbols are "Public" symbols, which have a bit set which causes
360 // them to produce an undefined value when a load results in a failed access
361 // check. Because this behaviour is not specified properly as of yet, it only
362 // applies to a subset of spec-defined Well-Known Symbols.
363 #define WELL_KNOWN_SYMBOL_LIST(V) \
364 V(is_concat_spreadable_symbol, Symbol.isConcatSpreadable)
365
360 // Heap roots that are known to be immortal immovable, for which we can safely 366 // Heap roots that are known to be immortal immovable, for which we can safely
361 // skip write barriers. This list is not complete and has omissions. 367 // skip write barriers. This list is not complete and has omissions.
362 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \ 368 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \
363 V(ByteArrayMap) \ 369 V(ByteArrayMap) \
364 V(BytecodeArrayMap) \ 370 V(BytecodeArrayMap) \
365 V(FreeSpaceMap) \ 371 V(FreeSpaceMap) \
366 V(OnePointerFillerMap) \ 372 V(OnePointerFillerMap) \
367 V(TwoPointerFillerMap) \ 373 V(TwoPointerFillerMap) \
368 V(UndefinedValue) \ 374 V(UndefinedValue) \
369 V(TheHoleValue) \ 375 V(TheHoleValue) \
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex, 567 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex,
562 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION) 568 INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION)
563 #undef STRING_DECLARATION 569 #undef STRING_DECLARATION
564 570
565 #define SYMBOL_INDEX_DECLARATION(name) k##name##RootIndex, 571 #define SYMBOL_INDEX_DECLARATION(name) k##name##RootIndex,
566 PRIVATE_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION) 572 PRIVATE_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
567 #undef SYMBOL_INDEX_DECLARATION 573 #undef SYMBOL_INDEX_DECLARATION
568 574
569 #define SYMBOL_INDEX_DECLARATION(name, description) k##name##RootIndex, 575 #define SYMBOL_INDEX_DECLARATION(name, description) k##name##RootIndex,
570 PUBLIC_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION) 576 PUBLIC_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
577 WELL_KNOWN_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
571 #undef SYMBOL_INDEX_DECLARATION 578 #undef SYMBOL_INDEX_DECLARATION
572 579
573 // Utility type maps 580 // Utility type maps
574 #define DECLARE_STRUCT_MAP(NAME, Name, name) k##Name##MapRootIndex, 581 #define DECLARE_STRUCT_MAP(NAME, Name, name) k##Name##MapRootIndex,
575 STRUCT_LIST(DECLARE_STRUCT_MAP) 582 STRUCT_LIST(DECLARE_STRUCT_MAP)
576 #undef DECLARE_STRUCT_MAP 583 #undef DECLARE_STRUCT_MAP
577 kStringTableRootIndex, 584 kStringTableRootIndex,
578 585
579 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex, 586 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
580 SMI_ROOT_LIST(ROOT_INDEX_DECLARATION) 587 SMI_ROOT_LIST(ROOT_INDEX_DECLARATION)
581 #undef ROOT_INDEX_DECLARATION 588 #undef ROOT_INDEX_DECLARATION
582 kRootListLength, 589 kRootListLength,
583 kStrongRootListLength = kStringTableRootIndex, 590 kStrongRootListLength = kStringTableRootIndex,
584 kSmiRootsStart = kStringTableRootIndex + 1 591 kSmiRootsStart = kStringTableRootIndex + 1
585 }; 592 };
586 593
587 // Indicates whether live bytes adjustment is triggered 594 // Indicates whether live bytes adjustment is triggered
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 #define STRING_ACCESSOR(name, str) inline String* name(); 1128 #define STRING_ACCESSOR(name, str) inline String* name();
1122 INTERNALIZED_STRING_LIST(STRING_ACCESSOR) 1129 INTERNALIZED_STRING_LIST(STRING_ACCESSOR)
1123 #undef STRING_ACCESSOR 1130 #undef STRING_ACCESSOR
1124 1131
1125 #define SYMBOL_ACCESSOR(name) inline Symbol* name(); 1132 #define SYMBOL_ACCESSOR(name) inline Symbol* name();
1126 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR) 1133 PRIVATE_SYMBOL_LIST(SYMBOL_ACCESSOR)
1127 #undef SYMBOL_ACCESSOR 1134 #undef SYMBOL_ACCESSOR
1128 1135
1129 #define SYMBOL_ACCESSOR(name, description) inline Symbol* name(); 1136 #define SYMBOL_ACCESSOR(name, description) inline Symbol* name();
1130 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR) 1137 PUBLIC_SYMBOL_LIST(SYMBOL_ACCESSOR)
1138 WELL_KNOWN_SYMBOL_LIST(SYMBOL_ACCESSOR)
1131 #undef SYMBOL_ACCESSOR 1139 #undef SYMBOL_ACCESSOR
1132 1140
1133 Object* root(RootListIndex index) { return roots_[index]; } 1141 Object* root(RootListIndex index) { return roots_[index]; }
1134 Handle<Object> root_handle(RootListIndex index) { 1142 Handle<Object> root_handle(RootListIndex index) {
1135 return Handle<Object>(&roots_[index]); 1143 return Handle<Object>(&roots_[index]);
1136 } 1144 }
1137 1145
1138 // Generated code can embed this address to get access to the roots. 1146 // Generated code can embed this address to get access to the roots.
1139 Object** roots_array_start() { return roots_; } 1147 Object** roots_array_start() { return roots_; }
1140 1148
(...skipping 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
2720 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2728 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2721 2729
2722 private: 2730 private:
2723 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2731 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2724 }; 2732 };
2725 #endif // DEBUG 2733 #endif // DEBUG
2726 } // namespace internal 2734 } // namespace internal
2727 } // namespace v8 2735 } // namespace v8
2728 2736
2729 #endif // V8_HEAP_HEAP_H_ 2737 #endif // V8_HEAP_HEAP_H_
OLDNEW
« 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