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