| 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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 false, // not external | 1157 false, // not external |
| 1158 false, // not native | 1158 false, // not native |
| 1159 Class::Handle(Type::Handle(Type::Function()).type_class()), | 1159 Class::Handle(Type::Handle(Type::Function()).type_class()), |
| 1160 fragment->token_pos())); | 1160 fragment->token_pos())); |
| 1161 | 1161 |
| 1162 func.set_result_type(Type::Handle(Type::DynamicType())); | 1162 func.set_result_type(Type::Handle(Type::DynamicType())); |
| 1163 func.set_num_fixed_parameters(0); | 1163 func.set_num_fixed_parameters(0); |
| 1164 func.SetNumOptionalParameters(0, true); | 1164 func.SetNumOptionalParameters(0, true); |
| 1165 // Manually generated AST, do not recompile. | 1165 // Manually generated AST, do not recompile. |
| 1166 func.SetIsOptimizable(false); | 1166 func.SetIsOptimizable(false); |
| 1167 func.set_is_debuggable(false); |
| 1167 | 1168 |
| 1168 // We compile the function here, even though InvokeFunction() below | 1169 // We compile the function here, even though InvokeFunction() below |
| 1169 // would compile func automatically. We are checking fewer invariants | 1170 // would compile func automatically. We are checking fewer invariants |
| 1170 // here. | 1171 // here. |
| 1171 ParsedFunction* parsed_function = new ParsedFunction(isolate, func); | 1172 ParsedFunction* parsed_function = new ParsedFunction(isolate, func); |
| 1172 parsed_function->SetNodeSequence(fragment); | 1173 parsed_function->SetNodeSequence(fragment); |
| 1173 parsed_function->set_default_parameter_values(Object::null_array()); | 1174 parsed_function->set_default_parameter_values(Object::null_array()); |
| 1174 fragment->scope()->AddVariable(parsed_function->EnsureExpressionTemp()); | 1175 fragment->scope()->AddVariable(parsed_function->EnsureExpressionTemp()); |
| 1175 fragment->scope()->AddVariable( | 1176 fragment->scope()->AddVariable( |
| 1176 parsed_function->current_context_var()); | 1177 parsed_function->current_context_var()); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1190 const Object& result = | 1191 const Object& result = |
| 1191 PassiveObject::Handle(isolate->object_store()->sticky_error()); | 1192 PassiveObject::Handle(isolate->object_store()->sticky_error()); |
| 1192 isolate->object_store()->clear_sticky_error(); | 1193 isolate->object_store()->clear_sticky_error(); |
| 1193 return result.raw(); | 1194 return result.raw(); |
| 1194 } | 1195 } |
| 1195 UNREACHABLE(); | 1196 UNREACHABLE(); |
| 1196 return Object::null(); | 1197 return Object::null(); |
| 1197 } | 1198 } |
| 1198 | 1199 |
| 1199 } // namespace dart | 1200 } // namespace dart |
| OLD | NEW |