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 2718007: [Isolates] Moving TranscendentalCache to Isolate. (Closed)
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/runtime.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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return NULL; 84 return NULL;
85 } 85 }
86 } 86 }
87 87
88 88
89 Isolate::Isolate() 89 Isolate::Isolate()
90 : state_(UNINITIALIZED), 90 : state_(UNINITIALIZED),
91 bootstrapper_(NULL), 91 bootstrapper_(NULL),
92 break_access_(OS::CreateMutex()), 92 break_access_(OS::CreateMutex()),
93 stub_cache_(NULL), 93 stub_cache_(NULL),
94 transcendental_cache_(new TranscendentalCache()),
94 handle_scope_implementer_(NULL) { 95 handle_scope_implementer_(NULL) {
95 heap_.isolate_ = this; 96 heap_.isolate_ = this;
96 stack_guard_.isolate_ = this; 97 stack_guard_.isolate_ = this;
97 98
98 handle_scope_data_.Initialize(); 99 handle_scope_data_.Initialize();
99 100
100 #define ISOLATE_INIT_EXECUTE(type, name, initial_value) \ 101 #define ISOLATE_INIT_EXECUTE(type, name, initial_value) \
101 name##_ = (initial_value); 102 name##_ = (initial_value);
102 ISOLATE_INIT_LIST(ISOLATE_INIT_EXECUTE) 103 ISOLATE_INIT_LIST(ISOLATE_INIT_EXECUTE)
103 #undef ISOLATE_INIT_EXECUTE 104 #undef ISOLATE_INIT_EXECUTE
104 105
105 #define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length) \ 106 #define ISOLATE_INIT_ARRAY_EXECUTE(type, name, length) \
106 memset(name##_, 0, sizeof(type) * length); 107 memset(name##_, 0, sizeof(type) * length);
107 ISOLATE_INIT_ARRAY_LIST(ISOLATE_INIT_ARRAY_EXECUTE) 108 ISOLATE_INIT_ARRAY_LIST(ISOLATE_INIT_ARRAY_EXECUTE)
108 #undef ISOLATE_INIT_ARRAY_EXECUTE 109 #undef ISOLATE_INIT_ARRAY_EXECUTE
109 } 110 }
110 111
111 112
112 Isolate::~Isolate() { 113 Isolate::~Isolate() {
114 delete transcendental_cache_;
115 transcendental_cache_ = NULL;
113 delete stub_cache_; 116 delete stub_cache_;
114 stub_cache_ = NULL; 117 stub_cache_ = NULL;
115 delete bootstrapper_; 118 delete bootstrapper_;
116 bootstrapper_ = NULL; 119 bootstrapper_ = NULL;
117 120
118 if (state_ == INITIALIZED) --number_of_isolates_; 121 if (state_ == INITIALIZED) --number_of_isolates_;
119 } 122 }
120 123
121 124
122 bool Isolate::PreInit() { 125 bool Isolate::PreInit() {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 LOG(LogCodeObjects()); 219 LOG(LogCodeObjects());
217 LOG(LogCompiledFunctions()); 220 LOG(LogCompiledFunctions());
218 } 221 }
219 222
220 state_ = INITIALIZED; 223 state_ = INITIALIZED;
221 return true; 224 return true;
222 } 225 }
223 226
224 227
225 } } // namespace v8::internal 228 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698