| 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 | 542 |
| 543 RawError* Compiler::CompileParsedFunction( | 543 RawError* Compiler::CompileParsedFunction( |
| 544 const ParsedFunction& parsed_function) { | 544 const ParsedFunction& parsed_function) { |
| 545 Isolate* isolate = Isolate::Current(); | 545 Isolate* isolate = Isolate::Current(); |
| 546 LongJump* base = isolate->long_jump_base(); | 546 LongJump* base = isolate->long_jump_base(); |
| 547 LongJump jump; | 547 LongJump jump; |
| 548 isolate->set_long_jump_base(&jump); | 548 isolate->set_long_jump_base(&jump); |
| 549 if (setjmp(*jump.Set()) == 0) { | 549 if (setjmp(*jump.Set()) == 0) { |
| 550 // Non-optimized code generator. | 550 // Non-optimized code generator. |
| 551 CompileParsedFunctionHelper(parsed_function, false); | 551 CompileParsedFunctionHelper(parsed_function, false); |
| 552 if (FLAG_disassemble) { |
| 553 DisassembleCode(parsed_function.function(), false); |
| 554 } |
| 552 isolate->set_long_jump_base(base); | 555 isolate->set_long_jump_base(base); |
| 553 return Error::null(); | 556 return Error::null(); |
| 554 } else { | 557 } else { |
| 555 Error& error = Error::Handle(); | 558 Error& error = Error::Handle(); |
| 556 // We got an error during compilation. | 559 // We got an error during compilation. |
| 557 error = isolate->object_store()->sticky_error(); | 560 error = isolate->object_store()->sticky_error(); |
| 558 isolate->object_store()->clear_sticky_error(); | 561 isolate->object_store()->clear_sticky_error(); |
| 559 isolate->set_long_jump_base(base); | 562 isolate->set_long_jump_base(base); |
| 560 return error.raw(); | 563 return error.raw(); |
| 561 } | 564 } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 Object::Handle(isolate->object_store()->sticky_error()); | 650 Object::Handle(isolate->object_store()->sticky_error()); |
| 648 isolate->object_store()->clear_sticky_error(); | 651 isolate->object_store()->clear_sticky_error(); |
| 649 isolate->set_long_jump_base(base); | 652 isolate->set_long_jump_base(base); |
| 650 return result.raw(); | 653 return result.raw(); |
| 651 } | 654 } |
| 652 UNREACHABLE(); | 655 UNREACHABLE(); |
| 653 return Object::null(); | 656 return Object::null(); |
| 654 } | 657 } |
| 655 | 658 |
| 656 } // namespace dart | 659 } // namespace dart |
| OLD | NEW |