| 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 "v8.h" | 7 #include "v8.h" |
| 8 | 8 |
| 9 #include "ast.h" | 9 #include "ast.h" |
| 10 #include "bootstrapper.h" | 10 #include "bootstrapper.h" |
| (...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 set_event_logger(Logger::LogInternalEvents); | 1893 set_event_logger(Logger::LogInternalEvents); |
| 1894 } else { | 1894 } else { |
| 1895 set_event_logger(Logger::EmptyLogInternalEvents); | 1895 set_event_logger(Logger::EmptyLogInternalEvents); |
| 1896 } | 1896 } |
| 1897 | 1897 |
| 1898 // Set default value if not yet set. | 1898 // Set default value if not yet set. |
| 1899 // TODO(yangguo): move this to ResourceConstraints::ConfigureDefaults | 1899 // TODO(yangguo): move this to ResourceConstraints::ConfigureDefaults |
| 1900 // once ResourceConstraints becomes an argument to the Isolate constructor. | 1900 // once ResourceConstraints becomes an argument to the Isolate constructor. |
| 1901 if (max_available_threads_ < 1) { | 1901 if (max_available_threads_ < 1) { |
| 1902 // Choose the default between 1 and 4. | 1902 // Choose the default between 1 and 4. |
| 1903 max_available_threads_ = Max(Min(CPU::NumberOfProcessorsOnline(), 4), 1); | 1903 max_available_threads_ = Max(Min(OS::NumberOfProcessorsOnline(), 4), 1); |
| 1904 } | 1904 } |
| 1905 | 1905 |
| 1906 if (!FLAG_job_based_sweeping) { | 1906 if (!FLAG_job_based_sweeping) { |
| 1907 num_sweeper_threads_ = | 1907 num_sweeper_threads_ = |
| 1908 SweeperThread::NumberOfThreads(max_available_threads_); | 1908 SweeperThread::NumberOfThreads(max_available_threads_); |
| 1909 } | 1909 } |
| 1910 | 1910 |
| 1911 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { | 1911 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { |
| 1912 PrintF("Concurrent recompilation has been disabled for tracing.\n"); | 1912 PrintF("Concurrent recompilation has been disabled for tracing.\n"); |
| 1913 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { | 1913 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2308 Execution::Call(this, microtask, factory()->undefined_value(), | 2308 Execution::Call(this, microtask, factory()->undefined_value(), |
| 2309 0, NULL).Check(); | 2309 0, NULL).Check(); |
| 2310 } | 2310 } |
| 2311 } | 2311 } |
| 2312 | 2312 |
| 2313 handle_scope_implementer()->DecrementCallDepth(); | 2313 handle_scope_implementer()->DecrementCallDepth(); |
| 2314 } | 2314 } |
| 2315 | 2315 |
| 2316 | 2316 |
| 2317 } } // namespace v8::internal | 2317 } } // namespace v8::internal |
| OLD | NEW |