Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2021 // once ResourceConstraints becomes an argument to the Isolate constructor. | 2021 // once ResourceConstraints becomes an argument to the Isolate constructor. |
| 2022 if (max_available_threads_ < 1) { | 2022 if (max_available_threads_ < 1) { |
| 2023 // Choose the default between 1 and 4. | 2023 // Choose the default between 1 and 4. |
| 2024 max_available_threads_ = | 2024 max_available_threads_ = |
| 2025 Max(Min(base::SysInfo::NumberOfProcessors(), 4), 1); | 2025 Max(Min(base::SysInfo::NumberOfProcessors(), 4), 1); |
| 2026 } | 2026 } |
| 2027 | 2027 |
| 2028 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { | 2028 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { |
| 2029 PrintF("Concurrent recompilation has been disabled for tracing.\n"); | 2029 PrintF("Concurrent recompilation has been disabled for tracing.\n"); |
| 2030 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { | 2030 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { |
| 2031 optimizing_compiler_thread_ = new OptimizingCompilerThread(this); | 2031 optimizing_compiler_thread_ = new OptimizingCompilerThread(this); |
|
Yang
2015/03/02 07:43:42
Consider renaming OptimizingCompilerThread into so
| |
| 2032 optimizing_compiler_thread_->Start(); | |
| 2033 } | 2032 } |
| 2034 | 2033 |
| 2035 // Initialize runtime profiler before deserialization, because collections may | 2034 // Initialize runtime profiler before deserialization, because collections may |
| 2036 // occur, clearing/updating ICs. | 2035 // occur, clearing/updating ICs. |
| 2037 runtime_profiler_ = new RuntimeProfiler(this); | 2036 runtime_profiler_ = new RuntimeProfiler(this); |
| 2038 | 2037 |
| 2039 // If we are deserializing, read the state into the now-empty heap. | 2038 // If we are deserializing, read the state into the now-empty heap. |
| 2040 if (!create_heap_objects) { | 2039 if (!create_heap_objects) { |
| 2041 des->Deserialize(this); | 2040 des->Deserialize(this); |
| 2042 } | 2041 } |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2551 if (prev_ && prev_->Intercept(flag)) return true; | 2550 if (prev_ && prev_->Intercept(flag)) return true; |
| 2552 // Then check whether this scope intercepts. | 2551 // Then check whether this scope intercepts. |
| 2553 if ((flag & intercept_mask_)) { | 2552 if ((flag & intercept_mask_)) { |
| 2554 intercepted_flags_ |= flag; | 2553 intercepted_flags_ |= flag; |
| 2555 return true; | 2554 return true; |
| 2556 } | 2555 } |
| 2557 return false; | 2556 return false; |
| 2558 } | 2557 } |
| 2559 | 2558 |
| 2560 } } // namespace v8::internal | 2559 } } // namespace v8::internal |
| OLD | NEW |