| 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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 OS::Print("compiling expression: "); | 836 OS::Print("compiling expression: "); |
| 837 AstPrinter::PrintNode(fragment); | 837 AstPrinter::PrintNode(fragment); |
| 838 } | 838 } |
| 839 | 839 |
| 840 // Create a dummy function object for the code generator. | 840 // Create a dummy function object for the code generator. |
| 841 // The function needs to be associated with a named Class: the interface | 841 // The function needs to be associated with a named Class: the interface |
| 842 // Function fits the bill. | 842 // Function fits the bill. |
| 843 const char* kEvalConst = "eval_const"; | 843 const char* kEvalConst = "eval_const"; |
| 844 const Function& func = Function::ZoneHandle(Function::New( | 844 const Function& func = Function::ZoneHandle(Function::New( |
| 845 String::Handle(Symbols::New(kEvalConst)), | 845 String::Handle(Symbols::New(kEvalConst)), |
| 846 RawFunction::kConstImplicitGetter, | 846 RawFunction::kImplicitStaticFinalGetter, |
| 847 true, // static function. | 847 true, // static function. |
| 848 false, // not const function. | 848 false, // not const function. |
| 849 false, // not abstract | 849 false, // not abstract |
| 850 false, // not external. | 850 false, // not external. |
| 851 Class::Handle(Type::Handle(Type::Function()).type_class()), | 851 Class::Handle(Type::Handle(Type::Function()).type_class()), |
| 852 fragment->token_pos())); | 852 fragment->token_pos())); |
| 853 | 853 |
| 854 func.set_result_type(Type::Handle(Type::DynamicType())); | 854 func.set_result_type(Type::Handle(Type::DynamicType())); |
| 855 func.set_num_fixed_parameters(0); | 855 func.set_num_fixed_parameters(0); |
| 856 func.SetNumOptionalParameters(0, true); | 856 func.SetNumOptionalParameters(0, true); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 879 Object::Handle(isolate->object_store()->sticky_error()); | 879 Object::Handle(isolate->object_store()->sticky_error()); |
| 880 isolate->object_store()->clear_sticky_error(); | 880 isolate->object_store()->clear_sticky_error(); |
| 881 isolate->set_long_jump_base(base); | 881 isolate->set_long_jump_base(base); |
| 882 return result.raw(); | 882 return result.raw(); |
| 883 } | 883 } |
| 884 UNREACHABLE(); | 884 UNREACHABLE(); |
| 885 return Object::null(); | 885 return Object::null(); |
| 886 } | 886 } |
| 887 | 887 |
| 888 } // namespace dart | 888 } // namespace dart |
| OLD | NEW |