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) |
| 8 |
7 #include "src/v8.h" | 9 #include "src/v8.h" |
8 | 10 |
9 #include "src/ast.h" | 11 #include "src/ast.h" |
10 #include "src/base/platform/platform.h" | 12 #include "src/base/platform/platform.h" |
11 #include "src/base/sys-info.h" | 13 #include "src/base/sys-info.h" |
12 #include "src/base/utils/random-number-generator.h" | 14 #include "src/base/utils/random-number-generator.h" |
13 #include "src/basic-block-profiler.h" | 15 #include "src/basic-block-profiler.h" |
14 #include "src/bootstrapper.h" | 16 #include "src/bootstrapper.h" |
15 #include "src/codegen.h" | 17 #include "src/codegen.h" |
16 #include "src/compilation-cache.h" | 18 #include "src/compilation-cache.h" |
(...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1924 Max(Min(base::SysInfo::NumberOfProcessors(), 4), 1); | 1926 Max(Min(base::SysInfo::NumberOfProcessors(), 4), 1); |
1925 } | 1927 } |
1926 | 1928 |
1927 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { | 1929 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { |
1928 PrintF("Concurrent recompilation has been disabled for tracing.\n"); | 1930 PrintF("Concurrent recompilation has been disabled for tracing.\n"); |
1929 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { | 1931 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { |
1930 optimizing_compiler_thread_ = new OptimizingCompilerThread(this); | 1932 optimizing_compiler_thread_ = new OptimizingCompilerThread(this); |
1931 optimizing_compiler_thread_->Start(); | 1933 optimizing_compiler_thread_->Start(); |
1932 } | 1934 } |
1933 | 1935 |
| 1936 if (FLAG_trace_turbo) { |
| 1937 // Erase the file. |
| 1938 std::ofstream turbo_cfg_stream("turbo.cfg", |
| 1939 std::fstream::out | std::fstream::trunc); |
| 1940 } |
| 1941 |
1934 // If we are deserializing, read the state into the now-empty heap. | 1942 // If we are deserializing, read the state into the now-empty heap. |
1935 if (!create_heap_objects) { | 1943 if (!create_heap_objects) { |
1936 des->Deserialize(this); | 1944 des->Deserialize(this); |
1937 } | 1945 } |
1938 stub_cache_->Initialize(); | 1946 stub_cache_->Initialize(); |
1939 | 1947 |
1940 // Finish initialization of ThreadLocal after deserialization is done. | 1948 // Finish initialization of ThreadLocal after deserialization is done. |
1941 clear_pending_exception(); | 1949 clear_pending_exception(); |
1942 clear_pending_message(); | 1950 clear_pending_message(); |
1943 clear_scheduled_exception(); | 1951 clear_scheduled_exception(); |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2381 if (prev_ && prev_->Intercept(flag)) return true; | 2389 if (prev_ && prev_->Intercept(flag)) return true; |
2382 // Then check whether this scope intercepts. | 2390 // Then check whether this scope intercepts. |
2383 if ((flag & intercept_mask_)) { | 2391 if ((flag & intercept_mask_)) { |
2384 intercepted_flags_ |= flag; | 2392 intercepted_flags_ |= flag; |
2385 return true; | 2393 return true; |
2386 } | 2394 } |
2387 return false; | 2395 return false; |
2388 } | 2396 } |
2389 | 2397 |
2390 } } // namespace v8::internal | 2398 } } // namespace v8::internal |
OLD | NEW |