OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 | 8 |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 DECLARE_FLAG(bool, huge_method_cutoff_in_code_size); | 73 DECLARE_FLAG(bool, huge_method_cutoff_in_code_size); |
74 DECLARE_FLAG(bool, load_deferred_eagerly); | 74 DECLARE_FLAG(bool, load_deferred_eagerly); |
75 DECLARE_FLAG(bool, trace_failed_optimization_attempts); | 75 DECLARE_FLAG(bool, trace_failed_optimization_attempts); |
76 DECLARE_FLAG(bool, trace_inlining_intervals); | 76 DECLARE_FLAG(bool, trace_inlining_intervals); |
77 DECLARE_FLAG(bool, trace_irregexp); | 77 DECLARE_FLAG(bool, trace_irregexp); |
78 | 78 |
79 | 79 |
80 bool Compiler::always_optimize_ = false; | 80 bool Compiler::always_optimize_ = false; |
81 bool Compiler::allow_recompilation_ = true; | 81 bool Compiler::allow_recompilation_ = true; |
82 | 82 |
83 #ifndef DART_PRECOMPILED | 83 #ifndef DART_PRECOMPILED_RUNTIME |
84 | 84 |
85 // TODO(zerny): Factor out unoptimizing/optimizing pipelines and remove | 85 // TODO(zerny): Factor out unoptimizing/optimizing pipelines and remove |
86 // separate helpers functions & `optimizing` args. | 86 // separate helpers functions & `optimizing` args. |
87 class CompilationPipeline : public ZoneAllocated { | 87 class CompilationPipeline : public ZoneAllocated { |
88 public: | 88 public: |
89 static CompilationPipeline* New(Zone* zone, const Function& function); | 89 static CompilationPipeline* New(Zone* zone, const Function& function); |
90 | 90 |
91 virtual void ParseFunction(ParsedFunction* parsed_function) = 0; | 91 virtual void ParseFunction(ParsedFunction* parsed_function) = 0; |
92 virtual FlowGraph* BuildFlowGraph( | 92 virtual FlowGraph* BuildFlowGraph( |
93 Zone* zone, | 93 Zone* zone, |
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1935 isolate->set_background_compiler(task); | 1935 isolate->set_background_compiler(task); |
1936 start_task = true; | 1936 start_task = true; |
1937 } | 1937 } |
1938 } | 1938 } |
1939 if (start_task) { | 1939 if (start_task) { |
1940 Dart::thread_pool()->Run(isolate->background_compiler()); | 1940 Dart::thread_pool()->Run(isolate->background_compiler()); |
1941 } | 1941 } |
1942 } | 1942 } |
1943 | 1943 |
1944 | 1944 |
1945 #else // DART_PRECOMPILED | 1945 #else // DART_PRECOMPILED_RUNTIME |
1946 | 1946 |
1947 | 1947 |
1948 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { | 1948 DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { |
1949 UNREACHABLE(); | 1949 UNREACHABLE(); |
1950 } | 1950 } |
1951 | 1951 |
1952 | 1952 |
1953 bool Compiler::IsBackgroundCompilation() { | 1953 bool Compiler::IsBackgroundCompilation() { |
1954 UNREACHABLE(); | 1954 UNREACHABLE(); |
1955 return false; | 1955 return false; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2040 | 2040 |
2041 void BackgroundCompiler::Stop(BackgroundCompiler* task) { | 2041 void BackgroundCompiler::Stop(BackgroundCompiler* task) { |
2042 UNREACHABLE(); | 2042 UNREACHABLE(); |
2043 } | 2043 } |
2044 | 2044 |
2045 | 2045 |
2046 void BackgroundCompiler::EnsureInit(Thread* thread) { | 2046 void BackgroundCompiler::EnsureInit(Thread* thread) { |
2047 UNREACHABLE(); | 2047 UNREACHABLE(); |
2048 } | 2048 } |
2049 | 2049 |
2050 #endif // DART_PRECOMPILED | 2050 #endif // DART_PRECOMPILED_RUNTIME |
2051 | 2051 |
2052 } // namespace dart | 2052 } // namespace dart |
OLD | NEW |