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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 Context* declaration_context(); | 420 Context* declaration_context(); |
421 bool is_declaration_context(); | 421 bool is_declaration_context(); |
422 | 422 |
423 inline GlobalObject* global_object(); | 423 inline GlobalObject* global_object(); |
424 inline void set_global_object(GlobalObject* object); | 424 inline void set_global_object(GlobalObject* object); |
425 | 425 |
426 // Returns a JSGlobalProxy object or null. | 426 // Returns a JSGlobalProxy object or null. |
427 JSObject* global_proxy(); | 427 JSObject* global_proxy(); |
428 void set_global_proxy(JSObject* global); | 428 void set_global_proxy(JSObject* global); |
429 | 429 |
430 // The builtins object. | |
431 JSBuiltinsObject* builtins(); | |
432 | |
433 // Get the script context by traversing the context chain. | 430 // Get the script context by traversing the context chain. |
434 Context* script_context(); | 431 Context* script_context(); |
435 | 432 |
436 // Compute the native context by traversing the context chain. | 433 // Compute the native context by traversing the context chain. |
437 Context* native_context(); | 434 Context* native_context(); |
438 | 435 |
439 // Predicates for context types. IsNativeContext is also defined on Object | 436 // Predicates for context types. IsNativeContext is also defined on Object |
440 // because we frequently have to know if arbitrary objects are natives | 437 // because we frequently have to know if arbitrary objects are natives |
441 // contexts. | 438 // contexts. |
442 inline bool IsNativeContext(); | 439 inline bool IsNativeContext(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 #endif | 551 #endif |
555 | 552 |
556 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 553 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
557 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 554 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
558 }; | 555 }; |
559 | 556 |
560 } // namespace internal | 557 } // namespace internal |
561 } // namespace v8 | 558 } // namespace v8 |
562 | 559 |
563 #endif // V8_CONTEXTS_H_ | 560 #endif // V8_CONTEXTS_H_ |
OLD | NEW |