Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/isolate.h

Issue 2469002: - Add a pointer to Bootstrapper from Isolate.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/bootstrapper.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 15 matching lines...) Expand all
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 "heap.h" 31 #include "heap.h"
32 32
33 namespace v8 { 33 namespace v8 {
34 namespace internal { 34 namespace internal {
35 35
36 class Bootstrapper;
36 class Deserializer; 37 class Deserializer;
37 class StubCache; 38 class StubCache;
38 39
39 class Isolate { 40 class Isolate {
40 public: 41 public:
41 // Returns the single global isolate. 42 // Returns the single global isolate.
42 static Isolate* Current() { 43 static Isolate* Current() {
43 ASSERT(global_isolate != NULL); 44 ASSERT(global_isolate != NULL);
44 return global_isolate; 45 return global_isolate;
45 } 46 }
46 47
47 // Creates a new isolate (perhaps using a deserializer). Returns null 48 // Creates a new isolate (perhaps using a deserializer). Returns null
48 // on failure. 49 // on failure.
49 static Isolate* Create(Deserializer* des); 50 static Isolate* Create(Deserializer* des);
50 51
51 // Initialize process-wide state. 52 // Initialize process-wide state.
52 static void InitOnce(); 53 static void InitOnce();
53 54
54 ~Isolate(); 55 ~Isolate();
55 56
56 // Accessors. 57 // Accessors.
58 Bootstrapper* bootstrapper() { return bootstrapper_; }
57 Heap* heap() { return &heap_; } 59 Heap* heap() { return &heap_; }
58 StubCache* stub_cache() { return stub_cache_; } 60 StubCache* stub_cache() { return stub_cache_; }
59 61
60 private: 62 private:
61 Isolate(); 63 Isolate();
62 64
63 static Isolate* global_isolate; 65 static Isolate* global_isolate;
64 66
65 bool Init(Deserializer* des); 67 bool Init(Deserializer* des);
66 68
69 Bootstrapper* bootstrapper_;
67 Heap heap_; 70 Heap heap_;
68 StubCache* stub_cache_; 71 StubCache* stub_cache_;
69 72
70 DISALLOW_COPY_AND_ASSIGN(Isolate); 73 DISALLOW_COPY_AND_ASSIGN(Isolate);
71 }; 74 };
72 75
73 // Temporary macros for accessing fields off the global isolate. 76 // Temporary macros for accessing fields off the global isolate.
74 #define HEAP (v8::internal::Isolate::Current()->heap()) 77 #define HEAP (v8::internal::Isolate::Current()->heap())
75 78
76 79
77 } } // namespace v8::internal 80 } } // namespace v8::internal
78 81
79 #endif // V8_ISOLATE_H_ 82 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698