| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 true, // static function. | 513 true, // static function. |
| 514 false, // not const function. | 514 false, // not const function. |
| 515 false, // not abstract | 515 false, // not abstract |
| 516 false, // not external. | 516 false, // not external. |
| 517 Class::Handle(Type::Handle(Type::FunctionInterface()).type_class()), | 517 Class::Handle(Type::Handle(Type::FunctionInterface()).type_class()), |
| 518 fragment->token_pos())); | 518 fragment->token_pos())); |
| 519 | 519 |
| 520 func.set_result_type(Type::Handle(Type::DynamicType())); | 520 func.set_result_type(Type::Handle(Type::DynamicType())); |
| 521 func.set_num_fixed_parameters(0); | 521 func.set_num_fixed_parameters(0); |
| 522 func.set_num_optional_parameters(0); | 522 func.set_num_optional_parameters(0); |
| 523 // Manually generated AST, do not recompile. |
| 524 func.set_is_optimizable(false); |
| 523 | 525 |
| 524 // We compile the function here, even though InvokeStatic() below | 526 // We compile the function here, even though InvokeStatic() below |
| 525 // would compile func automatically. We are checking fewer invariants | 527 // would compile func automatically. We are checking fewer invariants |
| 526 // here. | 528 // here. |
| 527 ParsedFunction parsed_function(func); | 529 ParsedFunction parsed_function(func); |
| 528 parsed_function.SetNodeSequence(fragment); | 530 parsed_function.SetNodeSequence(fragment); |
| 529 parsed_function.set_default_parameter_values(Array::Handle()); | 531 parsed_function.set_default_parameter_values(Array::Handle()); |
| 530 parsed_function.set_expression_temp_var( | 532 parsed_function.set_expression_temp_var( |
| 531 ParsedFunction::CreateExpressionTempVar(0)); | 533 ParsedFunction::CreateExpressionTempVar(0)); |
| 532 fragment->scope()->AddVariable(parsed_function.expression_temp_var()); | 534 fragment->scope()->AddVariable(parsed_function.expression_temp_var()); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 548 result = isolate->object_store()->sticky_error(); | 550 result = isolate->object_store()->sticky_error(); |
| 549 isolate->object_store()->clear_sticky_error(); | 551 isolate->object_store()->clear_sticky_error(); |
| 550 isolate->set_long_jump_base(base); | 552 isolate->set_long_jump_base(base); |
| 551 return result.raw(); | 553 return result.raw(); |
| 552 } | 554 } |
| 553 UNREACHABLE(); | 555 UNREACHABLE(); |
| 554 return Object::null(); | 556 return Object::null(); |
| 555 } | 557 } |
| 556 | 558 |
| 557 } // namespace dart | 559 } // namespace dart |
| OLD | NEW |