| Index: src/accessors.cc
|
| diff --git a/src/accessors.cc b/src/accessors.cc
|
| index ec6c3ab2cc847fb636e5a9fbaf5c573d81530f74..4527001fc11c3d254f820fe1799f505f582d4ccb 100644
|
| --- a/src/accessors.cc
|
| +++ b/src/accessors.cc
|
| @@ -1116,37 +1116,21 @@
|
| int inlined_frame_index) {
|
| Isolate* isolate = inlined_function->GetIsolate();
|
| Factory* factory = isolate->factory();
|
| -
|
| - TranslatedState translated_values(frame);
|
| - translated_values.Prepare(false, frame->fp());
|
| -
|
| - int argument_count = 0;
|
| - TranslatedFrame* translated_frame =
|
| - translated_values.GetArgumentsInfoFromJSFrameIndex(inlined_frame_index,
|
| - &argument_count);
|
| - TranslatedFrame::iterator iter = translated_frame->begin();
|
| -
|
| - // Skip the receiver.
|
| - iter++;
|
| - argument_count--;
|
| -
|
| + SlotRefValueBuilder slot_refs(
|
| + frame, inlined_frame_index,
|
| + inlined_function->shared()->internal_formal_parameter_count());
|
| +
|
| + int args_count = slot_refs.args_length();
|
| Handle<JSObject> arguments =
|
| - factory->NewArgumentsObject(inlined_function, argument_count);
|
| - Handle<FixedArray> array = factory->NewFixedArray(argument_count);
|
| - bool should_deoptimize = false;
|
| - for (int i = 0; i < argument_count; ++i) {
|
| - // If we materialize any object, we should deopt because we might alias
|
| - // an object that was eliminated by escape analysis.
|
| - should_deoptimize = should_deoptimize || iter->IsMaterializedObject();
|
| - Handle<Object> value = iter->GetValue();
|
| + factory->NewArgumentsObject(inlined_function, args_count);
|
| + Handle<FixedArray> array = factory->NewFixedArray(args_count);
|
| + slot_refs.Prepare(isolate);
|
| + for (int i = 0; i < args_count; ++i) {
|
| + Handle<Object> value = slot_refs.GetNext(isolate, 0);
|
| array->set(i, *value);
|
| - iter++;
|
| - }
|
| + }
|
| + slot_refs.Finish(isolate);
|
| arguments->set_elements(*array);
|
| -
|
| - if (should_deoptimize) {
|
| - translated_values.StoreMaterializedValuesAndDeopt();
|
| - }
|
|
|
| // Return the freshly allocated arguments object.
|
| return arguments;
|
|
|