| 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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 String* catch_name(); | 412 String* catch_name(); |
| 413 | 413 |
| 414 inline JSModule* module(); | 414 inline JSModule* module(); |
| 415 inline void set_module(JSModule* module); | 415 inline void set_module(JSModule* module); |
| 416 | 416 |
| 417 // Get the context where var declarations will be hoisted to, which | 417 // Get the context where var declarations will be hoisted to, which |
| 418 // may be the context itself. | 418 // may be the context itself. |
| 419 Context* declaration_context(); | 419 Context* declaration_context(); |
| 420 bool is_declaration_context(); | 420 bool is_declaration_context(); |
| 421 | 421 |
| 422 inline GlobalObject* global_object(); | 422 inline JSGlobalObject* global_object(); |
| 423 inline void set_global_object(GlobalObject* object); | 423 inline void set_global_object(JSGlobalObject* object); |
| 424 | 424 |
| 425 // Returns a JSGlobalProxy object or null. | 425 // Returns a JSGlobalProxy object or null. |
| 426 JSObject* global_proxy(); | 426 JSObject* global_proxy(); |
| 427 void set_global_proxy(JSObject* global); | 427 void set_global_proxy(JSObject* global); |
| 428 | 428 |
| 429 // Get the script context by traversing the context chain. | 429 // Get the script context by traversing the context chain. |
| 430 Context* script_context(); | 430 Context* script_context(); |
| 431 | 431 |
| 432 // Compute the native context by traversing the context chain. | 432 // Compute the native context by traversing the context chain. |
| 433 Context* native_context(); | 433 Context* native_context(); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 #endif | 550 #endif |
| 551 | 551 |
| 552 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 552 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
| 553 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 553 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
| 554 }; | 554 }; |
| 555 | 555 |
| 556 } // namespace internal | 556 } // namespace internal |
| 557 } // namespace v8 | 557 } // namespace v8 |
| 558 | 558 |
| 559 #endif // V8_CONTEXTS_H_ | 559 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |