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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
443 String* catch_name(); | 443 String* catch_name(); |
444 | 444 |
445 inline JSModule* module(); | 445 inline JSModule* module(); |
446 inline void set_module(JSModule* module); | 446 inline void set_module(JSModule* module); |
447 | 447 |
448 // Get the context where var declarations will be hoisted to, which | 448 // Get the context where var declarations will be hoisted to, which |
449 // may be the context itself. | 449 // may be the context itself. |
450 Context* declaration_context(); | 450 Context* declaration_context(); |
451 bool is_declaration_context(); | 451 bool is_declaration_context(); |
452 | 452 |
453 // Get the next local context on the context chain. | |
454 Context* local_context(); | |
rossberg
2016/01/29 19:46:25
Nit: Scope has an analogous method called ClosureS
Yang
2016/02/01 06:28:45
Done.
| |
455 | |
453 // Returns a JSGlobalProxy object or null. | 456 // Returns a JSGlobalProxy object or null. |
454 JSObject* global_proxy(); | 457 JSObject* global_proxy(); |
455 void set_global_proxy(JSObject* global); | 458 void set_global_proxy(JSObject* global); |
456 | 459 |
457 // Get the JSGlobalObject object. | 460 // Get the JSGlobalObject object. |
458 JSGlobalObject* global_object(); | 461 JSGlobalObject* global_object(); |
459 | 462 |
460 // Get the script context by traversing the context chain. | 463 // Get the script context by traversing the context chain. |
461 Context* script_context(); | 464 Context* script_context(); |
462 | 465 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
586 #endif | 589 #endif |
587 | 590 |
588 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 591 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
589 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 592 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
590 }; | 593 }; |
591 | 594 |
592 } // namespace internal | 595 } // namespace internal |
593 } // namespace v8 | 596 } // namespace v8 |
594 | 597 |
595 #endif // V8_CONTEXTS_H_ | 598 #endif // V8_CONTEXTS_H_ |
OLD | NEW |