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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 // Predicates for context types. IsNativeContext is also defined on Object | 523 // Predicates for context types. IsNativeContext is also defined on Object |
524 // because we frequently have to know if arbitrary objects are natives | 524 // because we frequently have to know if arbitrary objects are natives |
525 // contexts. | 525 // contexts. |
526 inline bool IsNativeContext(); | 526 inline bool IsNativeContext(); |
527 inline bool IsFunctionContext(); | 527 inline bool IsFunctionContext(); |
528 inline bool IsCatchContext(); | 528 inline bool IsCatchContext(); |
529 inline bool IsWithContext(); | 529 inline bool IsWithContext(); |
530 inline bool IsDebugEvaluateContext(); | 530 inline bool IsDebugEvaluateContext(); |
531 inline bool IsBlockContext(); | 531 inline bool IsBlockContext(); |
532 inline bool IsModuleContext(); | 532 inline bool IsModuleContext(); |
| 533 inline bool IsEvalContext(); |
533 inline bool IsScriptContext(); | 534 inline bool IsScriptContext(); |
534 | 535 |
535 inline bool HasSameSecurityTokenAs(Context* that); | 536 inline bool HasSameSecurityTokenAs(Context* that); |
536 | 537 |
537 // A native context holds a list of all functions with optimized code. | 538 // A native context holds a list of all functions with optimized code. |
538 void AddOptimizedFunction(JSFunction* function); | 539 void AddOptimizedFunction(JSFunction* function); |
539 void RemoveOptimizedFunction(JSFunction* function); | 540 void RemoveOptimizedFunction(JSFunction* function); |
540 void SetOptimizedFunctionsListHead(Object* head); | 541 void SetOptimizedFunctionsListHead(Object* head); |
541 Object* OptimizedFunctionsListHead(); | 542 Object* OptimizedFunctionsListHead(); |
542 | 543 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 643 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
643 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 644 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
644 }; | 645 }; |
645 | 646 |
646 typedef Context::Field ContextField; | 647 typedef Context::Field ContextField; |
647 | 648 |
648 } // namespace internal | 649 } // namespace internal |
649 } // namespace v8 | 650 } // namespace v8 |
650 | 651 |
651 #endif // V8_CONTEXTS_H_ | 652 #endif // V8_CONTEXTS_H_ |
OLD | NEW |