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