| Index: runtime/vm/flow_graph_builder.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_builder.cc (revision 11659)
|
| +++ runtime/vm/flow_graph_builder.cc (working copy)
|
| @@ -1322,6 +1322,16 @@
|
| }
|
|
|
|
|
| +void EffectGraphVisitor::VisitArgumentDefinitionTestNode(
|
| + ArgumentDefinitionTestNode* node) {
|
| + Computation* load = BuildLoadLocal(node->saved_arguments_descriptor());
|
| + Value* arguments_descriptor = Bind(load);
|
| + ArgumentDefinitionTestComp* arg_def_test =
|
| + new ArgumentDefinitionTestComp(node, arguments_descriptor);
|
| + ReturnComputation(arg_def_test);
|
| +}
|
| +
|
| +
|
| void EffectGraphVisitor::VisitArrayNode(ArrayNode* node) {
|
| InlineBailout("EffectGraphVisitor::VisitArrayNode");
|
| // Translate the array elements and collect their values.
|
| @@ -1354,6 +1364,7 @@
|
| // The context scope may have already been set by the non-optimizing
|
| // compiler. If it was not, set it here.
|
| if (function.context_scope() == ContextScope::null()) {
|
| + // TODO(regis): Why are we not doing this in the parser?
|
| const ContextScope& context_scope = ContextScope::ZoneHandle(
|
| node->scope()->PreserveOuterScope(owner()->context_level()));
|
| ASSERT(!function.HasCode());
|
| @@ -2233,9 +2244,14 @@
|
| if (node == owner()->parsed_function().node_sequence()) {
|
| ASSERT(scope->context_level() == 1);
|
| const Function& function = owner()->parsed_function().function();
|
| - const int num_params = function.NumberOfParameters();
|
| + int num_params = function.NumberOfParameters();
|
| int param_frame_index = (num_params == function.num_fixed_parameters()) ?
|
| (1 + num_params) : ParsedFunction::kFirstLocalSlotIndex;
|
| + // Handle the saved arguments descriptor as an additional parameter.
|
| + if (owner()->parsed_function().GetSavedArgumentsDescriptorVar() != NULL) {
|
| + ASSERT(param_frame_index == ParsedFunction::kFirstLocalSlotIndex);
|
| + num_params++;
|
| + }
|
| for (int pos = 0; pos < num_params; param_frame_index--, pos++) {
|
| const LocalVariable& parameter = *scope->VariableAt(pos);
|
| ASSERT(parameter.owner() == scope);
|
|
|