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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 bool is_declaration_context(); | 417 bool is_declaration_context(); |
418 | 418 |
419 // Get the next closure's context on the context chain. | 419 // Get the next closure's context on the context chain. |
420 Context* closure_context(); | 420 Context* closure_context(); |
421 | 421 |
422 // Returns a JSGlobalProxy object or null. | 422 // Returns a JSGlobalProxy object or null. |
423 JSObject* global_proxy(); | 423 JSObject* global_proxy(); |
424 void set_global_proxy(JSObject* global); | 424 void set_global_proxy(JSObject* global); |
425 | 425 |
426 // Get the JSGlobalObject object. | 426 // Get the JSGlobalObject object. |
427 JSGlobalObject* global_object(); | 427 V8_EXPORT_PRIVATE JSGlobalObject* global_object(); |
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. | 432 // Compute the native context. |
433 inline Context* native_context(); | 433 inline Context* native_context(); |
434 inline void set_native_context(Context* context); | 434 inline void set_native_context(Context* context); |
435 | 435 |
436 // Predicates for context types. IsNativeContext is also defined on Object | 436 // Predicates for context types. IsNativeContext is also defined on Object |
437 // because we frequently have to know if arbitrary objects are natives | 437 // because we frequently have to know if arbitrary objects are natives |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 #endif | 552 #endif |
553 | 553 |
554 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 554 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
555 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 555 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
556 }; | 556 }; |
557 | 557 |
558 } // namespace internal | 558 } // namespace internal |
559 } // namespace v8 | 559 } // namespace v8 |
560 | 560 |
561 #endif // V8_CONTEXTS_H_ | 561 #endif // V8_CONTEXTS_H_ |
OLD | NEW |