OLD | NEW |
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_CONTEXTS_H_ | 5 #ifndef V8_CONTEXTS_H_ |
6 #define V8_CONTEXTS_H_ | 6 #define V8_CONTEXTS_H_ |
7 | 7 |
8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 | 10 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \ | 178 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \ |
179 native_object_notifier_perform_change) \ | 179 native_object_notifier_perform_change) \ |
180 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \ | 180 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \ |
181 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ | 181 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ |
182 V(STRONG_GENERATOR_FUNCTION_MAP_INDEX, Map, strong_generator_function_map) \ | 182 V(STRONG_GENERATOR_FUNCTION_MAP_INDEX, Map, strong_generator_function_map) \ |
183 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ | 183 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ |
184 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ | 184 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ |
185 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \ | 185 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \ |
186 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) \ | 186 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) \ |
187 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ | 187 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ |
188 V(SCRIPT_CONTEXT_TABLE_INDEX, ScriptContextTable, script_context_table) | 188 V(SCRIPT_CONTEXT_TABLE_INDEX, ScriptContextTable, script_context_table) \ |
| 189 V(BUILTIN_EXPORTS_OBJECT_INDEX, Object, builtin_exports_object) |
189 | 190 |
190 | 191 |
191 // A table of all script contexts. Every loaded top-level script with top-level | 192 // A table of all script contexts. Every loaded top-level script with top-level |
192 // lexical declarations contributes its ScriptContext into this table. | 193 // lexical declarations contributes its ScriptContext into this table. |
193 // | 194 // |
194 // The table is a fixed array, its first slot is the current used count and | 195 // The table is a fixed array, its first slot is the current used count and |
195 // the subsequent slots 1..used contain ScriptContexts. | 196 // the subsequent slots 1..used contain ScriptContexts. |
196 class ScriptContextTable : public FixedArray { | 197 class ScriptContextTable : public FixedArray { |
197 public: | 198 public: |
198 // Conversions. | 199 // Conversions. |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 STRICT_GENERATOR_FUNCTION_MAP_INDEX, | 416 STRICT_GENERATOR_FUNCTION_MAP_INDEX, |
416 STRONG_GENERATOR_FUNCTION_MAP_INDEX, | 417 STRONG_GENERATOR_FUNCTION_MAP_INDEX, |
417 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, | 418 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, |
418 ITERATOR_RESULT_MAP_INDEX, | 419 ITERATOR_RESULT_MAP_INDEX, |
419 MAP_ITERATOR_MAP_INDEX, | 420 MAP_ITERATOR_MAP_INDEX, |
420 SET_ITERATOR_MAP_INDEX, | 421 SET_ITERATOR_MAP_INDEX, |
421 ARRAY_VALUES_ITERATOR_INDEX, | 422 ARRAY_VALUES_ITERATOR_INDEX, |
422 SCRIPT_CONTEXT_TABLE_INDEX, | 423 SCRIPT_CONTEXT_TABLE_INDEX, |
423 MAP_CACHE_INDEX, | 424 MAP_CACHE_INDEX, |
424 TO_LENGTH_FUN_INDEX, | 425 TO_LENGTH_FUN_INDEX, |
| 426 BUILTIN_EXPORTS_OBJECT_INDEX, |
425 | 427 |
426 // Properties from here are treated as weak references by the full GC. | 428 // Properties from here are treated as weak references by the full GC. |
427 // Scavenge treats them as strong references. | 429 // Scavenge treats them as strong references. |
428 OPTIMIZED_FUNCTIONS_LIST, // Weak. | 430 OPTIMIZED_FUNCTIONS_LIST, // Weak. |
429 OPTIMIZED_CODE_LIST, // Weak. | 431 OPTIMIZED_CODE_LIST, // Weak. |
430 DEOPTIMIZED_CODE_LIST, // Weak. | 432 DEOPTIMIZED_CODE_LIST, // Weak. |
431 NEXT_CONTEXT_LINK, // Weak. | 433 NEXT_CONTEXT_LINK, // Weak. |
432 | 434 |
433 // Total number of slots. | 435 // Total number of slots. |
434 NATIVE_CONTEXT_SLOTS, | 436 NATIVE_CONTEXT_SLOTS, |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 624 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); |
623 #endif | 625 #endif |
624 | 626 |
625 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 627 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
626 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 628 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
627 }; | 629 }; |
628 | 630 |
629 } } // namespace v8::internal | 631 } } // namespace v8::internal |
630 | 632 |
631 #endif // V8_CONTEXTS_H_ | 633 #endif // V8_CONTEXTS_H_ |
OLD | NEW |