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/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 if (setjmp(*jump.Set()) == 0) { | 961 if (setjmp(*jump.Set()) == 0) { |
962 ParsedFunction* parsed_function = | 962 ParsedFunction* parsed_function = |
963 Parser::ParseStaticFieldInitializer(field); | 963 Parser::ParseStaticFieldInitializer(field); |
964 | 964 |
965 parsed_function->AllocateVariables(); | 965 parsed_function->AllocateVariables(); |
966 // Non-optimized code generator. | 966 // Non-optimized code generator. |
967 CompileParsedFunctionHelper(parsed_function, false, Isolate::kNoDeoptId); | 967 CompileParsedFunctionHelper(parsed_function, false, Isolate::kNoDeoptId); |
968 | 968 |
969 // Invoke the function to evaluate the expression. | 969 // Invoke the function to evaluate the expression. |
970 const Function& initializer = parsed_function->function(); | 970 const Function& initializer = parsed_function->function(); |
971 const Object& result = Object::Handle( | 971 const Object& result = PassiveObject::Handle( |
972 DartEntry::InvokeFunction(initializer, Object::empty_array())); | 972 DartEntry::InvokeFunction(initializer, Object::empty_array())); |
973 return result.raw(); | 973 return result.raw(); |
974 } else { | 974 } else { |
975 const Error& error = | 975 const Error& error = |
976 Error::Handle(isolate, isolate->object_store()->sticky_error()); | 976 Error::Handle(isolate, isolate->object_store()->sticky_error()); |
977 isolate->object_store()->clear_sticky_error(); | 977 isolate->object_store()->clear_sticky_error(); |
978 return error.raw(); | 978 return error.raw(); |
979 } | 979 } |
980 UNREACHABLE(); | 980 UNREACHABLE(); |
981 return Object::null(); | 981 return Object::null(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 ParsedFunction* parsed_function = new ParsedFunction(isolate, func); | 1019 ParsedFunction* parsed_function = new ParsedFunction(isolate, func); |
1020 parsed_function->SetNodeSequence(fragment); | 1020 parsed_function->SetNodeSequence(fragment); |
1021 parsed_function->set_default_parameter_values(Object::null_array()); | 1021 parsed_function->set_default_parameter_values(Object::null_array()); |
1022 parsed_function->EnsureExpressionTemp(); | 1022 parsed_function->EnsureExpressionTemp(); |
1023 fragment->scope()->AddVariable(parsed_function->expression_temp_var()); | 1023 fragment->scope()->AddVariable(parsed_function->expression_temp_var()); |
1024 parsed_function->AllocateVariables(); | 1024 parsed_function->AllocateVariables(); |
1025 | 1025 |
1026 // Non-optimized code generator. | 1026 // Non-optimized code generator. |
1027 CompileParsedFunctionHelper(parsed_function, false, Isolate::kNoDeoptId); | 1027 CompileParsedFunctionHelper(parsed_function, false, Isolate::kNoDeoptId); |
1028 | 1028 |
1029 const Object& result = Object::Handle( | 1029 const Object& result = PassiveObject::Handle( |
1030 DartEntry::InvokeFunction(func, Object::empty_array())); | 1030 DartEntry::InvokeFunction(func, Object::empty_array())); |
1031 return result.raw(); | 1031 return result.raw(); |
1032 } else { | 1032 } else { |
1033 const Object& result = | 1033 const Object& result = |
1034 Object::Handle(isolate->object_store()->sticky_error()); | 1034 PassiveObject::Handle(isolate->object_store()->sticky_error()); |
1035 isolate->object_store()->clear_sticky_error(); | 1035 isolate->object_store()->clear_sticky_error(); |
1036 return result.raw(); | 1036 return result.raw(); |
1037 } | 1037 } |
1038 UNREACHABLE(); | 1038 UNREACHABLE(); |
1039 return Object::null(); | 1039 return Object::null(); |
1040 } | 1040 } |
1041 | 1041 |
1042 } // namespace dart | 1042 } // namespace dart |
OLD | NEW |