| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, | 406 SLOPPY_GENERATOR_FUNCTION_MAP_INDEX, |
| 407 STRICT_GENERATOR_FUNCTION_MAP_INDEX, | 407 STRICT_GENERATOR_FUNCTION_MAP_INDEX, |
| 408 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, | 408 GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, |
| 409 ITERATOR_RESULT_MAP_INDEX, | 409 ITERATOR_RESULT_MAP_INDEX, |
| 410 MAP_ITERATOR_MAP_INDEX, | 410 MAP_ITERATOR_MAP_INDEX, |
| 411 SET_ITERATOR_MAP_INDEX, | 411 SET_ITERATOR_MAP_INDEX, |
| 412 ITERATOR_SYMBOL_INDEX, | 412 ITERATOR_SYMBOL_INDEX, |
| 413 UNSCOPABLES_SYMBOL_INDEX, | 413 UNSCOPABLES_SYMBOL_INDEX, |
| 414 ARRAY_VALUES_ITERATOR_INDEX, | 414 ARRAY_VALUES_ITERATOR_INDEX, |
| 415 GLOBAL_CONTEXT_TABLE_INDEX, | 415 GLOBAL_CONTEXT_TABLE_INDEX, |
| 416 MAP_CACHE_INDEX, |
| 416 | 417 |
| 417 // Properties from here are treated as weak references by the full GC. | 418 // Properties from here are treated as weak references by the full GC. |
| 418 // Scavenge treats them as strong references. | 419 // Scavenge treats them as strong references. |
| 419 OPTIMIZED_FUNCTIONS_LIST, // Weak. | 420 OPTIMIZED_FUNCTIONS_LIST, // Weak. |
| 420 OPTIMIZED_CODE_LIST, // Weak. | 421 OPTIMIZED_CODE_LIST, // Weak. |
| 421 DEOPTIMIZED_CODE_LIST, // Weak. | 422 DEOPTIMIZED_CODE_LIST, // Weak. |
| 422 MAP_CACHE_INDEX, // Weak. | |
| 423 NEXT_CONTEXT_LINK, // Weak. | 423 NEXT_CONTEXT_LINK, // Weak. |
| 424 | 424 |
| 425 // Total number of slots. | 425 // Total number of slots. |
| 426 NATIVE_CONTEXT_SLOTS, | 426 NATIVE_CONTEXT_SLOTS, |
| 427 FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST | 427 FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST |
| 428 }; | 428 }; |
| 429 | 429 |
| 430 // Direct slot access. | 430 // Direct slot access. |
| 431 JSFunction* closure() { return JSFunction::cast(get(CLOSURE_INDEX)); } | 431 JSFunction* closure() { return JSFunction::cast(get(CLOSURE_INDEX)); } |
| 432 void set_closure(JSFunction* closure) { set(CLOSURE_INDEX, closure); } | 432 void set_closure(JSFunction* closure) { set(CLOSURE_INDEX, closure); } |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); | 605 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); |
| 606 #endif | 606 #endif |
| 607 | 607 |
| 608 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 608 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
| 609 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 609 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
| 610 }; | 610 }; |
| 611 | 611 |
| 612 } } // namespace v8::internal | 612 } } // namespace v8::internal |
| 613 | 613 |
| 614 #endif // V8_CONTEXTS_H_ | 614 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |