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

Side by Side Diff: src/isolate.cc

Issue 2867013: [Isolates] CompilationCache was moved to Isolate. (Closed) Base URL: git@github.com:v8isolate/v8isolates.git
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
« no previous file with comments | « src/isolate.h ('k') | src/jsregexp.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 2006-2010 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 12 matching lines...) Expand all
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 #include <stdlib.h> 28 #include <stdlib.h>
29 29
30 #include "v8.h" 30 #include "v8.h"
31 31
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "compilation-cache.h"
33 #include "debug.h" 34 #include "debug.h"
34 #include "heap-profiler.h" 35 #include "heap-profiler.h"
35 #include "isolate.h" 36 #include "isolate.h"
36 #include "log.h" 37 #include "log.h"
37 #include "serialize.h" 38 #include "serialize.h"
38 #include "scanner.h" 39 #include "scanner.h"
39 #include "scopeinfo.h" 40 #include "scopeinfo.h"
40 #include "simulator.h" 41 #include "simulator.h"
41 #include "stub-cache.h" 42 #include "stub-cache.h"
42 #include "oprofile-agent.h" 43 #include "oprofile-agent.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 Thread::SetThreadLocal(global_isolate_key_, NULL); 103 Thread::SetThreadLocal(global_isolate_key_, NULL);
103 #endif 104 #endif
104 return NULL; 105 return NULL;
105 } 106 }
106 } 107 }
107 108
108 109
109 Isolate::Isolate() 110 Isolate::Isolate()
110 : state_(UNINITIALIZED), 111 : state_(UNINITIALIZED),
111 bootstrapper_(NULL), 112 bootstrapper_(NULL),
113 compilation_cache_(new CompilationCache()),
112 cpu_features_(NULL), 114 cpu_features_(NULL),
113 break_access_(OS::CreateMutex()), 115 break_access_(OS::CreateMutex()),
114 stub_cache_(NULL), 116 stub_cache_(NULL),
115 transcendental_cache_(new TranscendentalCache()), 117 transcendental_cache_(new TranscendentalCache()),
116 keyed_lookup_cache_(new KeyedLookupCache()), 118 keyed_lookup_cache_(new KeyedLookupCache()),
117 context_slot_cache_(new ContextSlotCache()), 119 context_slot_cache_(new ContextSlotCache()),
118 descriptor_lookup_cache_(new DescriptorLookupCache()), 120 descriptor_lookup_cache_(new DescriptorLookupCache()),
119 handle_scope_implementer_(NULL), 121 handle_scope_implementer_(NULL),
120 scanner_character_classes_(new ScannerCharacterClasses()) { 122 scanner_character_classes_(new ScannerCharacterClasses()) {
121 heap_.isolate_ = this; 123 heap_.isolate_ = this;
(...skipping 23 matching lines...) Expand all
145 context_slot_cache_ = NULL; 147 context_slot_cache_ = NULL;
146 delete keyed_lookup_cache_; 148 delete keyed_lookup_cache_;
147 keyed_lookup_cache_ = NULL; 149 keyed_lookup_cache_ = NULL;
148 150
149 delete transcendental_cache_; 151 delete transcendental_cache_;
150 transcendental_cache_ = NULL; 152 transcendental_cache_ = NULL;
151 delete stub_cache_; 153 delete stub_cache_;
152 stub_cache_ = NULL; 154 stub_cache_ = NULL;
153 delete cpu_features_; 155 delete cpu_features_;
154 cpu_features_ = NULL; 156 cpu_features_ = NULL;
157 delete compilation_cache_;
158 compilation_cache_ = NULL;
155 delete bootstrapper_; 159 delete bootstrapper_;
156 bootstrapper_ = NULL; 160 bootstrapper_ = NULL;
157 161
158 if (state_ == INITIALIZED) --number_of_isolates_; 162 if (state_ == INITIALIZED) --number_of_isolates_;
159 } 163 }
160 164
161 165
162 bool Isolate::PreInit() { 166 bool Isolate::PreInit() {
163 if (state_ != UNINITIALIZED) return true; 167 if (state_ != UNINITIALIZED) return true;
164 ASSERT(global_isolate_ == this); 168 ASSERT(global_isolate_ == this);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 LOG(LogCodeObjects()); 266 LOG(LogCodeObjects());
263 LOG(LogCompiledFunctions()); 267 LOG(LogCompiledFunctions());
264 } 268 }
265 269
266 state_ = INITIALIZED; 270 state_ = INITIALIZED;
267 return true; 271 return true;
268 } 272 }
269 273
270 274
271 } } // namespace v8::internal 275 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698