| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 DECLARE_FLAG(bool, huge_method_cutoff_in_code_size); | 108 DECLARE_FLAG(bool, huge_method_cutoff_in_code_size); |
| 109 DECLARE_FLAG(bool, trace_failed_optimization_attempts); | 109 DECLARE_FLAG(bool, trace_failed_optimization_attempts); |
| 110 DECLARE_FLAG(bool, trace_irregexp); | 110 DECLARE_FLAG(bool, trace_irregexp); |
| 111 | 111 |
| 112 | 112 |
| 113 #ifndef DART_PRECOMPILED_RUNTIME | 113 #ifndef DART_PRECOMPILED_RUNTIME |
| 114 | 114 |
| 115 | 115 |
| 116 bool UseKernelFrontEndFor(ParsedFunction* parsed_function) { | 116 bool UseKernelFrontEndFor(ParsedFunction* parsed_function) { |
| 117 const Function& function = parsed_function->function(); | 117 const Function& function = parsed_function->function(); |
| 118 // TODO(regis): Kernel Front End needs to allocate a local to hold type args. |
| 118 return (function.kernel_offset() > 0) || | 119 return (function.kernel_offset() > 0) || |
| 119 (function.kind() == RawFunction::kNoSuchMethodDispatcher) || | 120 (!FLAG_reify_generic_functions && |
| 120 (function.kind() == RawFunction::kInvokeFieldDispatcher); | 121 ((function.kind() == RawFunction::kNoSuchMethodDispatcher) || |
| 122 (function.kind() == RawFunction::kInvokeFieldDispatcher))); |
| 121 } | 123 } |
| 122 | 124 |
| 123 | 125 |
| 124 void DartCompilationPipeline::ParseFunction(ParsedFunction* parsed_function) { | 126 void DartCompilationPipeline::ParseFunction(ParsedFunction* parsed_function) { |
| 125 if (!UseKernelFrontEndFor(parsed_function)) { | 127 if (!UseKernelFrontEndFor(parsed_function)) { |
| 126 Parser::ParseFunction(parsed_function); | 128 Parser::ParseFunction(parsed_function); |
| 127 parsed_function->AllocateVariables(); | 129 parsed_function->AllocateVariables(); |
| 128 } | 130 } |
| 129 } | 131 } |
| 130 | 132 |
| (...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2332 | 2334 |
| 2333 | 2335 |
| 2334 bool BackgroundCompiler::IsDisabled() { | 2336 bool BackgroundCompiler::IsDisabled() { |
| 2335 UNREACHABLE(); | 2337 UNREACHABLE(); |
| 2336 return true; | 2338 return true; |
| 2337 } | 2339 } |
| 2338 | 2340 |
| 2339 #endif // DART_PRECOMPILED_RUNTIME | 2341 #endif // DART_PRECOMPILED_RUNTIME |
| 2340 | 2342 |
| 2341 } // namespace dart | 2343 } // namespace dart |
| OLD | NEW |