| 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 | 1134 |
| 1135 const bool optimized = | 1135 const bool optimized = |
| 1136 Compiler::always_optimize() && function.IsOptimizable(); | 1136 Compiler::always_optimize() && function.IsOptimizable(); |
| 1137 | 1137 |
| 1138 return CompileFunctionHelper(pipeline, function, optimized, | 1138 return CompileFunctionHelper(pipeline, function, optimized, |
| 1139 Isolate::kNoDeoptId); | 1139 Isolate::kNoDeoptId); |
| 1140 } | 1140 } |
| 1141 | 1141 |
| 1142 | 1142 |
| 1143 RawError* Compiler::EnsureUnoptimizedCode(Thread* thread, | 1143 RawError* Compiler::EnsureUnoptimizedCode(Thread* thread, |
| 1144 const Function& function) { | 1144 const Function& function) { |
| 1145 if (function.unoptimized_code() != Object::null()) { | 1145 if (function.unoptimized_code() != Object::null()) { |
| 1146 return Error::null(); | 1146 return Error::null(); |
| 1147 } | 1147 } |
| 1148 Code& original_code = Code::ZoneHandle(thread->zone()); | 1148 Code& original_code = Code::ZoneHandle(thread->zone()); |
| 1149 if (function.HasCode()) { | 1149 if (function.HasCode()) { |
| 1150 original_code = function.CurrentCode(); | 1150 original_code = function.CurrentCode(); |
| 1151 } | 1151 } |
| 1152 CompilationPipeline* pipeline = | 1152 CompilationPipeline* pipeline = |
| 1153 CompilationPipeline::New(thread->zone(), function); | 1153 CompilationPipeline::New(thread->zone(), function); |
| 1154 const Error& error = Error::Handle( | 1154 const Error& error = Error::Handle( |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1426 const Object& result = | 1426 const Object& result = |
| 1427 PassiveObject::Handle(isolate->object_store()->sticky_error()); | 1427 PassiveObject::Handle(isolate->object_store()->sticky_error()); |
| 1428 isolate->object_store()->clear_sticky_error(); | 1428 isolate->object_store()->clear_sticky_error(); |
| 1429 return result.raw(); | 1429 return result.raw(); |
| 1430 } | 1430 } |
| 1431 UNREACHABLE(); | 1431 UNREACHABLE(); |
| 1432 return Object::null(); | 1432 return Object::null(); |
| 1433 } | 1433 } |
| 1434 | 1434 |
| 1435 } // namespace dart | 1435 } // namespace dart |
| OLD | NEW |