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

Side by Side Diff: src/isolate.h

Issue 2463002: - Add a pointer to StubCache 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 | « no previous file | 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 16 matching lines...) Expand all
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 Deserializer; 36 class Deserializer;
37 class StubCache;
37 38
38 class Isolate { 39 class Isolate {
39 public: 40 public:
40 // Returns the single global isolate. 41 // Returns the single global isolate.
41 static Isolate* Current() { 42 static Isolate* Current() {
42 ASSERT(global_isolate != NULL); 43 ASSERT(global_isolate != NULL);
43 return global_isolate; 44 return global_isolate;
44 } 45 }
45 46
46 // Creates a new isolate (perhaps using a deserializer). Returns null 47 // Creates a new isolate (perhaps using a deserializer). Returns null
47 // on failure. 48 // on failure.
48 static Isolate* Create(Deserializer* des); 49 static Isolate* Create(Deserializer* des);
49 50
50 // Initialize process-wide state. 51 // Initialize process-wide state.
51 static void InitOnce(); 52 static void InitOnce();
52 53
53 ~Isolate(); 54 ~Isolate();
54 55
55 // Accessors. 56 // Accessors.
56 Heap* heap() { return &heap_; } 57 Heap* heap() { return &heap_; }
58 StubCache* stub_cache() { return stub_cache_; }
57 59
58 private: 60 private:
59 Isolate(); 61 Isolate();
60 62
61 static Isolate* global_isolate; 63 static Isolate* global_isolate;
62 64
63 bool Init(Deserializer* des); 65 bool Init(Deserializer* des);
64 66
65 Heap heap_; 67 Heap heap_;
68 StubCache* stub_cache_;
66 69
67 DISALLOW_COPY_AND_ASSIGN(Isolate); 70 DISALLOW_COPY_AND_ASSIGN(Isolate);
68 }; 71 };
69 72
70 // Temporary macros for accessing fields off the global isolate. 73 // Temporary macros for accessing fields off the global isolate.
71 #define HEAP (v8::internal::Isolate::Current()->heap()) 74 #define HEAP (v8::internal::Isolate::Current()->heap())
72 75
73 76
74 } } // namespace v8::internal 77 } } // namespace v8::internal
75 78
76 #endif // V8_ISOLATE_H_ 79 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « no previous file | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698