V8 Project
vm-state.h
Go to the documentation of this file.
1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_VM_STATE_H_
6 #define V8_VM_STATE_H_
7 
8 #include "src/allocation.h"
9 #include "src/isolate.h"
10 
11 namespace v8 {
12 namespace internal {
13 
14 template <StateTag Tag>
15 class VMState BASE_EMBEDDED {
16  public:
17  explicit inline VMState(Isolate* isolate);
18  inline ~VMState();
19 
20  private:
21  Isolate* isolate_;
23 };
24 
25 
26 class ExternalCallbackScope BASE_EMBEDDED {
27  public:
28  inline ExternalCallbackScope(Isolate* isolate, Address callback);
30  Address callback() { return callback_; }
31  Address* callback_address() { return &callback_; }
32  ExternalCallbackScope* previous() { return previous_scope_; }
34 
35  private:
36  Isolate* isolate_;
38  ExternalCallbackScope* previous_scope_;
39 #ifdef USE_SIMULATOR
40  Address scope_address_;
41 #endif
42 };
43 
44 } } // namespace v8::internal
45 
46 
47 #endif // V8_VM_STATE_H_
#define BASE_EMBEDDED
Definition: allocation.h:45
ExternalCallbackScope(Isolate *isolate, Address callback)
VMState(Isolate *isolate)
Address * callback_address()
Definition: vm-state.h:31
ExternalCallbackScope * previous()
Definition: vm-state.h:32
ExternalCallbackScope * previous_scope_
Definition: vm-state.h:38
byte * Address
Definition: globals.h:101
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20