| 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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 return Object::null(); | 1190 return Object::null(); |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 | 1193 |
| 1194 RawObject* Precompiler::ExecuteOnce(SequenceNode* fragment) { | 1194 RawObject* Precompiler::ExecuteOnce(SequenceNode* fragment) { |
| 1195 LongJumpScope jump; | 1195 LongJumpScope jump; |
| 1196 if (setjmp(*jump.Set()) == 0) { | 1196 if (setjmp(*jump.Set()) == 0) { |
| 1197 Thread* const thread = Thread::Current(); | 1197 Thread* const thread = Thread::Current(); |
| 1198 if (FLAG_support_ast_printer && FLAG_trace_compiler) { | 1198 if (FLAG_support_ast_printer && FLAG_trace_compiler) { |
| 1199 THR_Print("compiling expression: "); | 1199 THR_Print("compiling expression: "); |
| 1200 AstPrinter::PrintNode(fragment); | 1200 AstPrinter ast_printer; |
| 1201 ast_printer.PrintNode(fragment); |
| 1201 } | 1202 } |
| 1202 | 1203 |
| 1203 // Create a dummy function object for the code generator. | 1204 // Create a dummy function object for the code generator. |
| 1204 // The function needs to be associated with a named Class: the interface | 1205 // The function needs to be associated with a named Class: the interface |
| 1205 // Function fits the bill. | 1206 // Function fits the bill. |
| 1206 const char* kEvalConst = "eval_const"; | 1207 const char* kEvalConst = "eval_const"; |
| 1207 const Function& func = Function::ZoneHandle(Function::New( | 1208 const Function& func = Function::ZoneHandle(Function::New( |
| 1208 String::Handle(Symbols::New(thread, kEvalConst)), | 1209 String::Handle(Symbols::New(thread, kEvalConst)), |
| 1209 RawFunction::kRegularFunction, | 1210 RawFunction::kRegularFunction, |
| 1210 true, // static function | 1211 true, // static function |
| (...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3314 | 3315 |
| 3315 ASSERT(FLAG_precompiled_mode); | 3316 ASSERT(FLAG_precompiled_mode); |
| 3316 const bool optimized = function.IsOptimizable(); // False for natives. | 3317 const bool optimized = function.IsOptimizable(); // False for natives. |
| 3317 DartPrecompilationPipeline pipeline(zone, field_type_map); | 3318 DartPrecompilationPipeline pipeline(zone, field_type_map); |
| 3318 return PrecompileFunctionHelper(&pipeline, function, optimized); | 3319 return PrecompileFunctionHelper(&pipeline, function, optimized); |
| 3319 } | 3320 } |
| 3320 | 3321 |
| 3321 #endif // DART_PRECOMPILER | 3322 #endif // DART_PRECOMPILER |
| 3322 | 3323 |
| 3323 } // namespace dart | 3324 } // namespace dart |
| OLD | NEW |