| 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 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 RawFunction::kConstImplicitGetter, | 540 RawFunction::kConstImplicitGetter, |
| 541 true, // static function. | 541 true, // static function. |
| 542 false, // not const function. | 542 false, // not const function. |
| 543 false, // not abstract | 543 false, // not abstract |
| 544 false, // not external. | 544 false, // not external. |
| 545 Class::Handle(Type::Handle(Type::Function()).type_class()), | 545 Class::Handle(Type::Handle(Type::Function()).type_class()), |
| 546 fragment->token_pos())); | 546 fragment->token_pos())); |
| 547 | 547 |
| 548 func.set_result_type(Type::Handle(Type::DynamicType())); | 548 func.set_result_type(Type::Handle(Type::DynamicType())); |
| 549 func.set_num_fixed_parameters(0); | 549 func.set_num_fixed_parameters(0); |
| 550 func.set_num_optional_positional_parameters(0); | 550 func.SetNumOptionalParameters(0, 0); |
| 551 func.set_num_optional_named_parameters(0); | |
| 552 // Manually generated AST, do not recompile. | 551 // Manually generated AST, do not recompile. |
| 553 func.set_is_optimizable(false); | 552 func.set_is_optimizable(false); |
| 554 | 553 |
| 555 // We compile the function here, even though InvokeStatic() below | 554 // We compile the function here, even though InvokeStatic() below |
| 556 // would compile func automatically. We are checking fewer invariants | 555 // would compile func automatically. We are checking fewer invariants |
| 557 // here. | 556 // here. |
| 558 ParsedFunction parsed_function(func); | 557 ParsedFunction parsed_function(func); |
| 559 parsed_function.SetNodeSequence(fragment); | 558 parsed_function.SetNodeSequence(fragment); |
| 560 parsed_function.set_default_parameter_values(Array::Handle()); | 559 parsed_function.set_default_parameter_values(Array::Handle()); |
| 561 parsed_function.set_expression_temp_var( | 560 parsed_function.set_expression_temp_var( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 579 result = isolate->object_store()->sticky_error(); | 578 result = isolate->object_store()->sticky_error(); |
| 580 isolate->object_store()->clear_sticky_error(); | 579 isolate->object_store()->clear_sticky_error(); |
| 581 isolate->set_long_jump_base(base); | 580 isolate->set_long_jump_base(base); |
| 582 return result.raw(); | 581 return result.raw(); |
| 583 } | 582 } |
| 584 UNREACHABLE(); | 583 UNREACHABLE(); |
| 585 return Object::null(); | 584 return Object::null(); |
| 586 } | 585 } |
| 587 | 586 |
| 588 } // namespace dart | 587 } // namespace dart |
| OLD | NEW |