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 17250006: Move static flag modifications to V8::InitializeOncePerProcessImpl(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/v8.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 stub.InitializeInterfaceDescriptor( 2252 stub.InitializeInterfaceDescriptor(
2253 this, code_stub_interface_descriptor(CodeStub::FastCloneShallowArray)); 2253 this, code_stub_interface_descriptor(CodeStub::FastCloneShallowArray));
2254 CompareNilICStub::InitializeForIsolate(this); 2254 CompareNilICStub::InitializeForIsolate(this);
2255 ToBooleanStub::InitializeForIsolate(this); 2255 ToBooleanStub::InitializeForIsolate(this);
2256 ArrayConstructorStubBase::InstallDescriptors(this); 2256 ArrayConstructorStubBase::InstallDescriptors(this);
2257 InternalArrayConstructorStubBase::InstallDescriptors(this); 2257 InternalArrayConstructorStubBase::InstallDescriptors(this);
2258 } 2258 }
2259 2259
2260 if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Start(); 2260 if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Start();
2261 2261
2262 if (FLAG_parallel_marking && FLAG_marking_threads == 0) {
2263 FLAG_marking_threads = SystemThreadManager::
2264 NumberOfParallelSystemThreads(
2265 SystemThreadManager::PARALLEL_MARKING);
2266 }
2267 if (FLAG_marking_threads > 0) { 2262 if (FLAG_marking_threads > 0) {
2268 marking_thread_ = new MarkingThread*[FLAG_marking_threads]; 2263 marking_thread_ = new MarkingThread*[FLAG_marking_threads];
2269 for (int i = 0; i < FLAG_marking_threads; i++) { 2264 for (int i = 0; i < FLAG_marking_threads; i++) {
2270 marking_thread_[i] = new MarkingThread(this); 2265 marking_thread_[i] = new MarkingThread(this);
2271 marking_thread_[i]->Start(); 2266 marking_thread_[i]->Start();
2272 } 2267 }
2273 } else {
2274 FLAG_parallel_marking = false;
2275 } 2268 }
2276 2269
2277 if (FLAG_sweeper_threads == 0) {
2278 if (FLAG_concurrent_sweeping) {
2279 FLAG_sweeper_threads = SystemThreadManager::
2280 NumberOfParallelSystemThreads(
2281 SystemThreadManager::CONCURRENT_SWEEPING);
2282 } else if (FLAG_parallel_sweeping) {
2283 FLAG_sweeper_threads = SystemThreadManager::
2284 NumberOfParallelSystemThreads(
2285 SystemThreadManager::PARALLEL_SWEEPING);
2286 }
2287 }
2288 if (FLAG_sweeper_threads > 0) { 2270 if (FLAG_sweeper_threads > 0) {
2289 sweeper_thread_ = new SweeperThread*[FLAG_sweeper_threads]; 2271 sweeper_thread_ = new SweeperThread*[FLAG_sweeper_threads];
2290 for (int i = 0; i < FLAG_sweeper_threads; i++) { 2272 for (int i = 0; i < FLAG_sweeper_threads; i++) {
2291 sweeper_thread_[i] = new SweeperThread(this); 2273 sweeper_thread_[i] = new SweeperThread(this);
2292 sweeper_thread_[i]->Start(); 2274 sweeper_thread_[i]->Start();
2293 } 2275 }
2294 } else {
2295 FLAG_concurrent_sweeping = false;
2296 FLAG_parallel_sweeping = false;
2297 }
2298 if (FLAG_parallel_recompilation &&
2299 SystemThreadManager::NumberOfParallelSystemThreads(
2300 SystemThreadManager::PARALLEL_RECOMPILATION) == 0) {
2301 FLAG_parallel_recompilation = false;
2302 } 2276 }
2303 return true; 2277 return true;
2304 } 2278 }
2305 2279
2306 2280
2307 // Initialized lazily to allow early 2281 // Initialized lazily to allow early
2308 // v8::V8::SetAddHistogramSampleFunction calls. 2282 // v8::V8::SetAddHistogramSampleFunction calls.
2309 StatsTable* Isolate::stats_table() { 2283 StatsTable* Isolate::stats_table() {
2310 if (stats_table_ == NULL) { 2284 if (stats_table_ == NULL) {
2311 stats_table_ = new StatsTable; 2285 stats_table_ = new StatsTable;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 2445
2472 #ifdef DEBUG 2446 #ifdef DEBUG
2473 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2447 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2474 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2448 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2475 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2449 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2476 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2450 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2477 #undef ISOLATE_FIELD_OFFSET 2451 #undef ISOLATE_FIELD_OFFSET
2478 #endif 2452 #endif
2479 2453
2480 } } // namespace v8::internal 2454 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698