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 21 matching lines...) Expand all Loading... |
32 #include "vm/object.h" | 32 #include "vm/object.h" |
33 #include "vm/object_store.h" | 33 #include "vm/object_store.h" |
34 #include "vm/os.h" | 34 #include "vm/os.h" |
35 #include "vm/parser.h" | 35 #include "vm/parser.h" |
36 #include "vm/redundancy_elimination.h" | 36 #include "vm/redundancy_elimination.h" |
37 #include "vm/regexp_assembler.h" | 37 #include "vm/regexp_assembler.h" |
38 #include "vm/regexp_parser.h" | 38 #include "vm/regexp_parser.h" |
39 #include "vm/resolver.h" | 39 #include "vm/resolver.h" |
40 #include "vm/symbols.h" | 40 #include "vm/symbols.h" |
41 #include "vm/tags.h" | 41 #include "vm/tags.h" |
| 42 #include "vm/timeline.h" |
42 #include "vm/timer.h" | 43 #include "vm/timer.h" |
43 | 44 |
44 namespace dart { | 45 namespace dart { |
45 | 46 |
46 | 47 |
47 #define T (thread()) | 48 #define T (thread()) |
48 #define I (isolate()) | 49 #define I (isolate()) |
49 #define Z (zone()) | 50 #define Z (zone()) |
50 | 51 |
51 | 52 |
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1974 // to install code. | 1975 // to install code. |
1975 bool PrecompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { | 1976 bool PrecompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { |
1976 ASSERT(FLAG_precompiled_mode); | 1977 ASSERT(FLAG_precompiled_mode); |
1977 const Function& function = parsed_function()->function(); | 1978 const Function& function = parsed_function()->function(); |
1978 if (optimized() && !function.IsOptimizable()) { | 1979 if (optimized() && !function.IsOptimizable()) { |
1979 return false; | 1980 return false; |
1980 } | 1981 } |
1981 bool is_compiled = false; | 1982 bool is_compiled = false; |
1982 Zone* const zone = thread()->zone(); | 1983 Zone* const zone = thread()->zone(); |
1983 #ifndef PRODUCT | 1984 #ifndef PRODUCT |
1984 TimelineStream* compiler_timeline = isolate()->GetCompilerStream(); | 1985 TimelineStream* compiler_timeline = Timeline::GetCompilerStream(); |
1985 #endif // !PRODUCT | 1986 #endif // !PRODUCT |
1986 CSTAT_TIMER_SCOPE(thread(), codegen_timer); | 1987 CSTAT_TIMER_SCOPE(thread(), codegen_timer); |
1987 HANDLESCOPE(thread()); | 1988 HANDLESCOPE(thread()); |
1988 | 1989 |
1989 // We may reattempt compilation if the function needs to be assembled using | 1990 // We may reattempt compilation if the function needs to be assembled using |
1990 // far branches on ARM and MIPS. In the else branch of the setjmp call, | 1991 // far branches on ARM and MIPS. In the else branch of the setjmp call, |
1991 // done is set to false, and use_far_branches is set to true if there is a | 1992 // done is set to false, and use_far_branches is set to true if there is a |
1992 // longjmp from the ARM or MIPS assemblers. In all other paths through this | 1993 // longjmp from the ARM or MIPS assemblers. In all other paths through this |
1993 // while loop, done is set to true. use_far_branches is always false on ia32 | 1994 // while loop, done is set to true. use_far_branches is always false on ia32 |
1994 // and x64. | 1995 // and x64. |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2596 CompilationPipeline::New(thread->zone(), function); | 2597 CompilationPipeline::New(thread->zone(), function); |
2597 | 2598 |
2598 ASSERT(FLAG_precompiled_mode); | 2599 ASSERT(FLAG_precompiled_mode); |
2599 const bool optimized = function.IsOptimizable(); // False for natives. | 2600 const bool optimized = function.IsOptimizable(); // False for natives. |
2600 return PrecompileFunctionHelper(pipeline, function, optimized); | 2601 return PrecompileFunctionHelper(pipeline, function, optimized); |
2601 } | 2602 } |
2602 | 2603 |
2603 #endif // DART_PRECOMPILER | 2604 #endif // DART_PRECOMPILER |
2604 | 2605 |
2605 } // namespace dart | 2606 } // namespace dart |
OLD | NEW |