OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/precompiler.h" | 5 #include "vm/precompiler.h" |
6 | 6 |
7 #include "vm/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/branch_optimizer.h" | 10 #include "vm/branch_optimizer.h" |
(...skipping 2652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2663 return error.raw(); | 2663 return error.raw(); |
2664 } | 2664 } |
2665 UNREACHABLE(); | 2665 UNREACHABLE(); |
2666 return Error::null(); | 2666 return Error::null(); |
2667 } | 2667 } |
2668 | 2668 |
2669 | 2669 |
2670 RawError* Precompiler::CompileFunction(Thread* thread, | 2670 RawError* Precompiler::CompileFunction(Thread* thread, |
2671 const Function& function) { | 2671 const Function& function) { |
2672 VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId); | 2672 VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId); |
2673 TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "Function", function); | 2673 TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "CompileFunction", function); |
2674 | 2674 |
2675 CompilationPipeline* pipeline = | 2675 CompilationPipeline* pipeline = |
2676 CompilationPipeline::New(thread->zone(), function); | 2676 CompilationPipeline::New(thread->zone(), function); |
2677 | 2677 |
2678 ASSERT(FLAG_precompiled_mode); | 2678 ASSERT(FLAG_precompiled_mode); |
2679 const bool optimized = function.IsOptimizable(); // False for natives. | 2679 const bool optimized = function.IsOptimizable(); // False for natives. |
2680 return PrecompileFunctionHelper(pipeline, function, optimized); | 2680 return PrecompileFunctionHelper(pipeline, function, optimized); |
2681 } | 2681 } |
2682 | 2682 |
2683 #endif // DART_PRECOMPILER | 2683 #endif // DART_PRECOMPILER |
2684 | 2684 |
2685 } // namespace dart | 2685 } // namespace dart |
OLD | NEW |