| 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/code_generator.h" | 10 #include "vm/code_generator.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 TimerScope timer(FLAG_compiler_stats, | 254 TimerScope timer(FLAG_compiler_stats, |
| 255 &CompilerStats::graphcompiler_timer, | 255 &CompilerStats::graphcompiler_timer, |
| 256 isolate); | 256 isolate); |
| 257 graph_compiler.CompileGraph(); | 257 graph_compiler.CompileGraph(); |
| 258 } | 258 } |
| 259 { | 259 { |
| 260 TimerScope timer(FLAG_compiler_stats, | 260 TimerScope timer(FLAG_compiler_stats, |
| 261 &CompilerStats::codefinalizer_timer, | 261 &CompilerStats::codefinalizer_timer, |
| 262 isolate); | 262 isolate); |
| 263 const Function& function = parsed_function.function(); | 263 const Function& function = parsed_function.function(); |
| 264 const Code& code = Code::Handle(Code::FinalizeCode(function, &assembler)); | 264 const Code& code = Code::Handle( |
| 265 Code::FinalizeCode(function, &assembler, optimized)); |
| 265 code.set_is_optimized(optimized); | 266 code.set_is_optimized(optimized); |
| 266 graph_compiler.FinalizePcDescriptors(code); | 267 graph_compiler.FinalizePcDescriptors(code); |
| 267 graph_compiler.FinalizeDeoptInfo(code); | 268 graph_compiler.FinalizeDeoptInfo(code); |
| 268 graph_compiler.FinalizeStackmaps(code); | 269 graph_compiler.FinalizeStackmaps(code); |
| 269 graph_compiler.FinalizeVarDescriptors(code); | 270 graph_compiler.FinalizeVarDescriptors(code); |
| 270 graph_compiler.FinalizeExceptionHandlers(code); | 271 graph_compiler.FinalizeExceptionHandlers(code); |
| 271 graph_compiler.FinalizeComments(code); | 272 graph_compiler.FinalizeComments(code); |
| 272 if (optimized) { | 273 if (optimized) { |
| 273 function.SetCode(code); | 274 function.SetCode(code); |
| 274 CodePatcher::PatchEntry(Code::Handle(function.unoptimized_code())); | 275 CodePatcher::PatchEntry(Code::Handle(function.unoptimized_code())); |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 result = isolate->object_store()->sticky_error(); | 592 result = isolate->object_store()->sticky_error(); |
| 592 isolate->object_store()->clear_sticky_error(); | 593 isolate->object_store()->clear_sticky_error(); |
| 593 isolate->set_long_jump_base(base); | 594 isolate->set_long_jump_base(base); |
| 594 return result.raw(); | 595 return result.raw(); |
| 595 } | 596 } |
| 596 UNREACHABLE(); | 597 UNREACHABLE(); |
| 597 return Object::null(); | 598 return Object::null(); |
| 598 } | 599 } |
| 599 | 600 |
| 600 } // namespace dart | 601 } // namespace dart |
| OLD | NEW |