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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 V(NATIVE_OBJECT_OBSERVE_INDEX, JSFunction, native_object_observe) \ | 174 V(NATIVE_OBJECT_OBSERVE_INDEX, JSFunction, native_object_observe) \ |
175 V(NATIVE_OBJECT_GET_NOTIFIER_INDEX, JSFunction, native_object_get_notifier) \ | 175 V(NATIVE_OBJECT_GET_NOTIFIER_INDEX, JSFunction, native_object_get_notifier) \ |
176 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \ | 176 V(NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, JSFunction, \ |
177 native_object_notifier_perform_change) \ | 177 native_object_notifier_perform_change) \ |
178 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \ | 178 V(SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, Map, sloppy_generator_function_map) \ |
179 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ | 179 V(STRICT_GENERATOR_FUNCTION_MAP_INDEX, Map, strict_generator_function_map) \ |
180 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ | 180 V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ |
181 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ | 181 V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \ |
182 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \ | 182 V(MAP_ITERATOR_MAP_INDEX, Map, map_iterator_map) \ |
183 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) \ | 183 V(SET_ITERATOR_MAP_INDEX, Map, set_iterator_map) \ |
184 V(ITERATOR_SYMBOL_INDEX, Symbol, iterator_symbol) \ | |
185 V(UNSCOPABLES_SYMBOL_INDEX, Symbol, unscopables_symbol) \ | |
186 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ | 184 V(ARRAY_VALUES_ITERATOR_INDEX, JSFunction, array_values_iterator) \ |
187 V(SCRIPT_CONTEXT_TABLE_INDEX, ScriptContextTable, script_context_table) | 185 V(SCRIPT_CONTEXT_TABLE_INDEX, ScriptContextTable, script_context_table) |
188 | 186 |
189 | 187 |
190 // A table of all script contexts. Every loaded top-level script with top-level | 188 // A table of all script contexts. Every loaded top-level script with top-level |
191 // lexical declarations contributes its ScriptContext into this table. | 189 // lexical declarations contributes its ScriptContext into this table. |
192 // | 190 // |
193 // The table is a fixed array, its first slot is the current used count and | 191 // The table is a fixed array, its first slot is the current used count and |
194 // the subsequent slots 1..used contain ScriptContexts. | 192 // the subsequent slots 1..used contain ScriptContexts. |
195 class ScriptContextTable : public FixedArray { | 193 class ScriptContextTable : public FixedArray { |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 OBSERVERS_END_SPLICE_INDEX, | 406 OBSERVERS_END_SPLICE_INDEX, |
409 NATIVE_OBJECT_OBSERVE_INDEX, | 407 NATIVE_OBJECT_OBSERVE_INDEX, |
410 NATIVE_OBJECT_GET_NOTIFIER_INDEX, | 408 NATIVE_OBJECT_GET_NOTIFIER_INDEX, |
411 NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, | 409 NATIVE_OBJECT_NOTIFIER_PERFORM_CHANGE, |
412 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, | 410 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, |
413 STRICT_GENERATOR_FUNCTION_MAP_INDEX, | 411 STRICT_GENERATOR_FUNCTION_MAP_INDEX, |
414 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, | 412 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, |
415 ITERATOR_RESULT_MAP_INDEX, | 413 ITERATOR_RESULT_MAP_INDEX, |
416 MAP_ITERATOR_MAP_INDEX, | 414 MAP_ITERATOR_MAP_INDEX, |
417 SET_ITERATOR_MAP_INDEX, | 415 SET_ITERATOR_MAP_INDEX, |
418 ITERATOR_SYMBOL_INDEX, | |
419 UNSCOPABLES_SYMBOL_INDEX, | |
420 ARRAY_VALUES_ITERATOR_INDEX, | 416 ARRAY_VALUES_ITERATOR_INDEX, |
421 SCRIPT_CONTEXT_TABLE_INDEX, | 417 SCRIPT_CONTEXT_TABLE_INDEX, |
422 MAP_CACHE_INDEX, | 418 MAP_CACHE_INDEX, |
423 | 419 |
424 // Properties from here are treated as weak references by the full GC. | 420 // Properties from here are treated as weak references by the full GC. |
425 // Scavenge treats them as strong references. | 421 // Scavenge treats them as strong references. |
426 OPTIMIZED_FUNCTIONS_LIST, // Weak. | 422 OPTIMIZED_FUNCTIONS_LIST, // Weak. |
427 OPTIMIZED_CODE_LIST, // Weak. | 423 OPTIMIZED_CODE_LIST, // Weak. |
428 DEOPTIMIZED_CODE_LIST, // Weak. | 424 DEOPTIMIZED_CODE_LIST, // Weak. |
429 NEXT_CONTEXT_LINK, // Weak. | 425 NEXT_CONTEXT_LINK, // Weak. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 607 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); |
612 #endif | 608 #endif |
613 | 609 |
614 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 610 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
615 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 611 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
616 }; | 612 }; |
617 | 613 |
618 } } // namespace v8::internal | 614 } } // namespace v8::internal |
619 | 615 |
620 #endif // V8_CONTEXTS_H_ | 616 #endif // V8_CONTEXTS_H_ |
OLD | NEW |