| 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 | 1107 |
| 1108 RawError* Compiler::CompileFunction(Thread* thread, | 1108 RawError* Compiler::CompileFunction(Thread* thread, |
| 1109 const Function& function) { | 1109 const Function& function) { |
| 1110 Isolate* isolate = thread->isolate(); | 1110 Isolate* isolate = thread->isolate(); |
| 1111 VMTagScope tagScope(isolate, VMTag::kCompileUnoptimizedTagId); | 1111 VMTagScope tagScope(isolate, VMTag::kCompileUnoptimizedTagId); |
| 1112 TIMELINE_FUNCTION_COMPILATION_DURATION(isolate, "Function", function); | 1112 TIMELINE_FUNCTION_COMPILATION_DURATION(isolate, "Function", function); |
| 1113 | 1113 |
| 1114 if (!isolate->compilation_allowed()) { | 1114 if (!isolate->compilation_allowed()) { |
| 1115 FATAL2("Precompilation missed function %s (%s)\n", | 1115 FATAL3("Precompilation missed function %s (%" Pd ", %s)\n", |
| 1116 function.ToQualifiedCString(), | 1116 function.ToLibNamePrefixedQualifiedCString(), |
| 1117 function.token_pos(), |
| 1117 Function::KindToCString(function.kind())); | 1118 Function::KindToCString(function.kind())); |
| 1118 } | 1119 } |
| 1119 | 1120 |
| 1120 CompilationPipeline* pipeline = | 1121 CompilationPipeline* pipeline = |
| 1121 CompilationPipeline::New(thread->zone(), function); | 1122 CompilationPipeline::New(thread->zone(), function); |
| 1122 | 1123 |
| 1123 const bool optimized = | 1124 const bool optimized = |
| 1124 Compiler::always_optimize() && function.IsOptimizable(); | 1125 Compiler::always_optimize() && function.IsOptimizable(); |
| 1125 | 1126 |
| 1126 return CompileFunctionHelper(pipeline, function, optimized, | 1127 return CompileFunctionHelper(pipeline, function, optimized, |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1413 const Object& result = | 1414 const Object& result = |
| 1414 PassiveObject::Handle(isolate->object_store()->sticky_error()); | 1415 PassiveObject::Handle(isolate->object_store()->sticky_error()); |
| 1415 isolate->object_store()->clear_sticky_error(); | 1416 isolate->object_store()->clear_sticky_error(); |
| 1416 return result.raw(); | 1417 return result.raw(); |
| 1417 } | 1418 } |
| 1418 UNREACHABLE(); | 1419 UNREACHABLE(); |
| 1419 return Object::null(); | 1420 return Object::null(); |
| 1420 } | 1421 } |
| 1421 | 1422 |
| 1422 } // namespace dart | 1423 } // namespace dart |
| OLD | NEW |