| 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 10 matching lines...) Expand all Loading... |
| 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_ISOLATE_H_ | 28 #ifndef V8_ISOLATE_H_ |
| 29 #define V8_ISOLATE_H_ | 29 #define V8_ISOLATE_H_ |
| 30 | 30 |
| 31 #include "apiutils.h" |
| 31 #include "heap.h" | 32 #include "heap.h" |
| 32 | 33 |
| 33 namespace v8 { | 34 namespace v8 { |
| 34 namespace internal { | 35 namespace internal { |
| 35 | 36 |
| 36 class Bootstrapper; | 37 class Bootstrapper; |
| 37 class Deserializer; | 38 class Deserializer; |
| 38 class StubCache; | 39 class StubCache; |
| 39 | 40 |
| 40 class Isolate { | 41 class Isolate { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 51 | 52 |
| 52 // Initialize process-wide state. | 53 // Initialize process-wide state. |
| 53 static void InitOnce(); | 54 static void InitOnce(); |
| 54 | 55 |
| 55 ~Isolate(); | 56 ~Isolate(); |
| 56 | 57 |
| 57 // Accessors. | 58 // Accessors. |
| 58 Bootstrapper* bootstrapper() { return bootstrapper_; } | 59 Bootstrapper* bootstrapper() { return bootstrapper_; } |
| 59 Heap* heap() { return &heap_; } | 60 Heap* heap() { return &heap_; } |
| 60 StubCache* stub_cache() { return stub_cache_; } | 61 StubCache* stub_cache() { return stub_cache_; } |
| 61 | 62 v8::ImplementationUtilities::HandleScopeData* handle_scope_data() { |
| 63 return &handle_scope_data_; |
| 64 } |
| 65 |
| 62 private: | 66 private: |
| 63 Isolate(); | 67 Isolate(); |
| 64 | 68 |
| 65 static Isolate* global_isolate; | 69 static Isolate* global_isolate; |
| 66 | 70 |
| 67 bool Init(Deserializer* des); | 71 bool Init(Deserializer* des); |
| 68 | 72 |
| 69 Bootstrapper* bootstrapper_; | 73 Bootstrapper* bootstrapper_; |
| 70 Heap heap_; | 74 Heap heap_; |
| 71 StubCache* stub_cache_; | 75 StubCache* stub_cache_; |
| 76 v8::ImplementationUtilities::HandleScopeData handle_scope_data_; |
| 72 | 77 |
| 73 DISALLOW_COPY_AND_ASSIGN(Isolate); | 78 DISALLOW_COPY_AND_ASSIGN(Isolate); |
| 74 }; | 79 }; |
| 75 | 80 |
| 76 // Temporary macros for accessing fields off the global isolate. | 81 // Temporary macros for accessing fields off the global isolate. |
| 77 #define HEAP (v8::internal::Isolate::Current()->heap()) | 82 #define HEAP (v8::internal::Isolate::Current()->heap()) |
| 78 | 83 |
| 79 | 84 |
| 80 } } // namespace v8::internal | 85 } } // namespace v8::internal |
| 81 | 86 |
| 82 #endif // V8_ISOLATE_H_ | 87 #endif // V8_ISOLATE_H_ |
| OLD | NEW |