Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: src/accessors.cc

Issue 1210413005: Revert of Unify reading of deoptimization information. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698