| 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 // Predicates for context types. IsNativeContext is also defined on Object | 530 // Predicates for context types. IsNativeContext is also defined on Object |
| 531 // because we frequently have to know if arbitrary objects are natives | 531 // because we frequently have to know if arbitrary objects are natives |
| 532 // contexts. | 532 // contexts. |
| 533 inline bool IsNativeContext(); | 533 inline bool IsNativeContext(); |
| 534 inline bool IsFunctionContext(); | 534 inline bool IsFunctionContext(); |
| 535 inline bool IsCatchContext(); | 535 inline bool IsCatchContext(); |
| 536 inline bool IsWithContext(); | 536 inline bool IsWithContext(); |
| 537 inline bool IsDebugEvaluateContext(); | 537 inline bool IsDebugEvaluateContext(); |
| 538 inline bool IsBlockContext(); | 538 inline bool IsBlockContext(); |
| 539 inline bool IsModuleContext(); | 539 inline bool IsModuleContext(); |
| 540 inline bool IsEvalContext(); |
| 540 inline bool IsScriptContext(); | 541 inline bool IsScriptContext(); |
| 541 | 542 |
| 542 inline bool HasSameSecurityTokenAs(Context* that); | 543 inline bool HasSameSecurityTokenAs(Context* that); |
| 543 | 544 |
| 544 // A native context holds a list of all functions with optimized code. | 545 // A native context holds a list of all functions with optimized code. |
| 545 void AddOptimizedFunction(JSFunction* function); | 546 void AddOptimizedFunction(JSFunction* function); |
| 546 void RemoveOptimizedFunction(JSFunction* function); | 547 void RemoveOptimizedFunction(JSFunction* function); |
| 547 void SetOptimizedFunctionsListHead(Object* head); | 548 void SetOptimizedFunctionsListHead(Object* head); |
| 548 Object* OptimizedFunctionsListHead(); | 549 Object* OptimizedFunctionsListHead(); |
| 549 | 550 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 650 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
| 650 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 651 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
| 651 }; | 652 }; |
| 652 | 653 |
| 653 typedef Context::Field ContextField; | 654 typedef Context::Field ContextField; |
| 654 | 655 |
| 655 } // namespace internal | 656 } // namespace internal |
| 656 } // namespace v8 | 657 } // namespace v8 |
| 657 | 658 |
| 658 #endif // V8_CONTEXTS_H_ | 659 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |