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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 parsed_function->SetNodeSequence(fragment); | 618 parsed_function->SetNodeSequence(fragment); |
619 parsed_function->set_default_parameter_values(Array::ZoneHandle()); | 619 parsed_function->set_default_parameter_values(Array::ZoneHandle()); |
620 parsed_function->set_expression_temp_var( | 620 parsed_function->set_expression_temp_var( |
621 ParsedFunction::CreateExpressionTempVar(0)); | 621 ParsedFunction::CreateExpressionTempVar(0)); |
622 fragment->scope()->AddVariable(parsed_function->expression_temp_var()); | 622 fragment->scope()->AddVariable(parsed_function->expression_temp_var()); |
623 parsed_function->AllocateVariables(); | 623 parsed_function->AllocateVariables(); |
624 | 624 |
625 // Non-optimized code generator. | 625 // Non-optimized code generator. |
626 CompileParsedFunctionHelper(*parsed_function, false); | 626 CompileParsedFunctionHelper(*parsed_function, false); |
627 | 627 |
628 const Array& args = Array::Handle(Object::empty_array()); | 628 const Object& result = Object::Handle( |
629 const Object& result = Object::Handle(DartEntry::InvokeStatic(func, args)); | 629 DartEntry::InvokeStatic(func, Object::empty_array())); |
630 isolate->set_long_jump_base(base); | 630 isolate->set_long_jump_base(base); |
631 return result.raw(); | 631 return result.raw(); |
632 } else { | 632 } else { |
633 const Object& result = | 633 const Object& result = |
634 Object::Handle(isolate->object_store()->sticky_error()); | 634 Object::Handle(isolate->object_store()->sticky_error()); |
635 isolate->object_store()->clear_sticky_error(); | 635 isolate->object_store()->clear_sticky_error(); |
636 isolate->set_long_jump_base(base); | 636 isolate->set_long_jump_base(base); |
637 return result.raw(); | 637 return result.raw(); |
638 } | 638 } |
639 UNREACHABLE(); | 639 UNREACHABLE(); |
640 return Object::null(); | 640 return Object::null(); |
641 } | 641 } |
642 | 642 |
643 } // namespace dart | 643 } // namespace dart |
OLD | NEW |