| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 inline bool IsFunctionContext(); | 416 inline bool IsFunctionContext(); |
| 417 inline bool IsCatchContext(); | 417 inline bool IsCatchContext(); |
| 418 inline bool IsWithContext(); | 418 inline bool IsWithContext(); |
| 419 inline bool IsDebugEvaluateContext(); | 419 inline bool IsDebugEvaluateContext(); |
| 420 inline bool IsBlockContext(); | 420 inline bool IsBlockContext(); |
| 421 inline bool IsModuleContext(); | 421 inline bool IsModuleContext(); |
| 422 inline bool IsScriptContext(); | 422 inline bool IsScriptContext(); |
| 423 | 423 |
| 424 inline bool HasSameSecurityTokenAs(Context* that); | 424 inline bool HasSameSecurityTokenAs(Context* that); |
| 425 | 425 |
| 426 // Initializes global variable bindings in given script context. | |
| 427 void InitializeGlobalSlots(); | |
| 428 | |
| 429 // A native context holds a list of all functions with optimized code. | 426 // A native context holds a list of all functions with optimized code. |
| 430 void AddOptimizedFunction(JSFunction* function); | 427 void AddOptimizedFunction(JSFunction* function); |
| 431 void RemoveOptimizedFunction(JSFunction* function); | 428 void RemoveOptimizedFunction(JSFunction* function); |
| 432 void SetOptimizedFunctionsListHead(Object* head); | 429 void SetOptimizedFunctionsListHead(Object* head); |
| 433 Object* OptimizedFunctionsListHead(); | 430 Object* OptimizedFunctionsListHead(); |
| 434 | 431 |
| 435 // The native context also stores a list of all optimized code and a | 432 // The native context also stores a list of all optimized code and a |
| 436 // list of all deoptimized code, which are needed by the deoptimizer. | 433 // list of all deoptimized code, which are needed by the deoptimizer. |
| 437 void AddOptimizedCode(Code* code); | 434 void AddOptimizedCode(Code* code); |
| 438 void SetOptimizedCodeListHead(Object* head); | 435 void SetOptimizedCodeListHead(Object* head); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 #endif | 527 #endif |
| 531 | 528 |
| 532 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); | 529 STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize); |
| 533 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); | 530 STATIC_ASSERT(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); |
| 534 }; | 531 }; |
| 535 | 532 |
| 536 } // namespace internal | 533 } // namespace internal |
| 537 } // namespace v8 | 534 } // namespace v8 |
| 538 | 535 |
| 539 #endif // V8_CONTEXTS_H_ | 536 #endif // V8_CONTEXTS_H_ |
| OLD | NEW |