| 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 // The function needs to be associated with a named Class: the interface | 508 // The function needs to be associated with a named Class: the interface |
| 509 // Function fits the bill. | 509 // Function fits the bill. |
| 510 const char* kEvalConst = "eval_const"; | 510 const char* kEvalConst = "eval_const"; |
| 511 const Function& func = Function::Handle(Function::New( | 511 const Function& func = Function::Handle(Function::New( |
| 512 String::Handle(Symbols::New(kEvalConst)), | 512 String::Handle(Symbols::New(kEvalConst)), |
| 513 RawFunction::kConstImplicitGetter, | 513 RawFunction::kConstImplicitGetter, |
| 514 true, // static function. | 514 true, // static function. |
| 515 false, // not const function. | 515 false, // not const function. |
| 516 false, // not abstract | 516 false, // not abstract |
| 517 false, // not external. | 517 false, // not external. |
| 518 Class::Handle(Type::Handle(Type::FunctionInterface()).type_class()), | 518 Class::Handle(Type::Handle(Type::Function()).type_class()), |
| 519 fragment->token_pos())); | 519 fragment->token_pos())); |
| 520 | 520 |
| 521 func.set_result_type(Type::Handle(Type::DynamicType())); | 521 func.set_result_type(Type::Handle(Type::DynamicType())); |
| 522 func.set_num_fixed_parameters(0); | 522 func.set_num_fixed_parameters(0); |
| 523 func.set_num_optional_parameters(0); | 523 func.set_num_optional_parameters(0); |
| 524 // Manually generated AST, do not recompile. | 524 // Manually generated AST, do not recompile. |
| 525 func.set_is_optimizable(false); | 525 func.set_is_optimizable(false); |
| 526 | 526 |
| 527 // We compile the function here, even though InvokeStatic() below | 527 // We compile the function here, even though InvokeStatic() below |
| 528 // would compile func automatically. We are checking fewer invariants | 528 // would compile func automatically. We are checking fewer invariants |
| (...skipping 22 matching lines...) Expand all Loading... |
| 551 result = isolate->object_store()->sticky_error(); | 551 result = isolate->object_store()->sticky_error(); |
| 552 isolate->object_store()->clear_sticky_error(); | 552 isolate->object_store()->clear_sticky_error(); |
| 553 isolate->set_long_jump_base(base); | 553 isolate->set_long_jump_base(base); |
| 554 return result.raw(); | 554 return result.raw(); |
| 555 } | 555 } |
| 556 UNREACHABLE(); | 556 UNREACHABLE(); |
| 557 return Object::null(); | 557 return Object::null(); |
| 558 } | 558 } |
| 559 | 559 |
| 560 } // namespace dart | 560 } // namespace dart |
| OLD | NEW |