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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 // Predicates for context types. IsNativeContext is also defined on Object | 551 // Predicates for context types. IsNativeContext is also defined on Object |
552 // because we frequently have to know if arbitrary objects are natives | 552 // because we frequently have to know if arbitrary objects are natives |
553 // contexts. | 553 // contexts. |
554 inline bool IsNativeContext(); | 554 inline bool IsNativeContext(); |
555 inline bool IsFunctionContext(); | 555 inline bool IsFunctionContext(); |
556 inline bool IsCatchContext(); | 556 inline bool IsCatchContext(); |
557 inline bool IsWithContext(); | 557 inline bool IsWithContext(); |
558 inline bool IsDebugEvaluateContext(); | 558 inline bool IsDebugEvaluateContext(); |
559 inline bool IsBlockContext(); | 559 inline bool IsBlockContext(); |
560 inline bool IsModuleContext(); | 560 inline bool IsModuleContext(); |
| 561 inline bool IsEvalContext(); |
561 inline bool IsScriptContext(); | 562 inline bool IsScriptContext(); |
562 | 563 |
563 inline bool HasSameSecurityTokenAs(Context* that); | 564 inline bool HasSameSecurityTokenAs(Context* that); |
564 | 565 |
565 // Removes a specific optimized code object from the optimized code map. | 566 // Removes a specific optimized code object from the optimized code map. |
566 // In case of non-OSR the code reference is cleared from the cache entry but | 567 // In case of non-OSR the code reference is cleared from the cache entry but |
567 // the entry itself is left in the map in order to proceed sharing literals. | 568 // the entry itself is left in the map in order to proceed sharing literals. |
568 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); | 569 void EvictFromOptimizedCodeMap(Code* optimized_code, const char* reason); |
569 | 570 |
570 // Clear optimized code map. | 571 // Clear optimized code map. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 694 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
694 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 695 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
695 }; | 696 }; |
696 | 697 |
697 typedef Context::Field ContextField; | 698 typedef Context::Field ContextField; |
698 | 699 |
699 } // namespace internal | 700 } // namespace internal |
700 } // namespace v8 | 701 } // namespace v8 |
701 | 702 |
702 #endif // V8_CONTEXTS_H_ | 703 #endif // V8_CONTEXTS_H_ |
OLD | NEW |