OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #ifndef V8_VM_STATE_H_ | 28 #ifndef V8_VM_STATE_H_ |
29 #define V8_VM_STATE_H_ | 29 #define V8_VM_STATE_H_ |
30 | 30 |
31 #include "allocation.h" | 31 #include "allocation.h" |
32 #include "isolate.h" | 32 #include "isolate.h" |
33 | 33 |
34 namespace v8 { | 34 namespace v8 { |
35 namespace internal { | 35 namespace internal { |
36 | 36 |
| 37 template <StateTag Tag> |
37 class VMState BASE_EMBEDDED { | 38 class VMState BASE_EMBEDDED { |
38 public: | 39 public: |
39 inline VMState(Isolate* isolate, StateTag tag); | 40 explicit inline VMState(Isolate* isolate); |
40 inline ~VMState(); | 41 inline ~VMState(); |
41 | 42 |
42 private: | 43 private: |
43 Isolate* isolate_; | 44 Isolate* isolate_; |
44 StateTag previous_tag_; | 45 StateTag previous_tag_; |
45 }; | 46 }; |
46 | 47 |
47 | 48 |
48 class ExternalCallbackScope BASE_EMBEDDED { | 49 class ExternalCallbackScope BASE_EMBEDDED { |
49 public: | 50 public: |
50 inline ExternalCallbackScope(Isolate* isolate, Address callback); | 51 inline ExternalCallbackScope(Isolate* isolate, Address callback); |
51 inline ~ExternalCallbackScope(); | 52 inline ~ExternalCallbackScope(); |
52 private: | 53 private: |
53 Isolate* isolate_; | 54 Isolate* isolate_; |
54 Address previous_callback_; | 55 Address previous_callback_; |
55 }; | 56 }; |
56 | 57 |
57 } } // namespace v8::internal | 58 } } // namespace v8::internal |
58 | 59 |
59 | 60 |
60 #endif // V8_VM_STATE_H_ | 61 #endif // V8_VM_STATE_H_ |
OLD | NEW |