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

Unified Diff: src/runtime/runtime-function.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 | « src/ppc/lithium-codegen-ppc.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-function.cc
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
index c849bbfd1e54aba5d85c0a9390fa67572f611a6d..4213efb94dd917758495e357c4bd87b2b9219111 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -337,33 +337,22 @@
frame->GetFunctions(&functions);
if (functions.length() > 1) {
int inlined_jsframe_index = functions.length() - 1;
- TranslatedState translated_values(frame);
- translated_values.Prepare(false, frame->fp());
-
- int argument_count = 0;
- TranslatedFrame* translated_frame =
- translated_values.GetArgumentsInfoFromJSFrameIndex(
- inlined_jsframe_index, &argument_count);
- TranslatedFrame::iterator iter = translated_frame->begin();
-
- // Skip the receiver.
- iter++;
- argument_count--;
-
- *total_argc = prefix_argc + argument_count;
+ JSFunction* inlined_function = functions[inlined_jsframe_index];
+ SlotRefValueBuilder slot_refs(
+ frame, inlined_jsframe_index,
+ inlined_function->shared()->internal_formal_parameter_count());
+
+ int args_count = slot_refs.args_length();
+
+ *total_argc = prefix_argc + args_count;
SmartArrayPointer<Handle<Object> > param_data(
NewArray<Handle<Object> >(*total_argc));
- bool should_deoptimize = false;
- for (int i = 0; i < argument_count; i++) {
- should_deoptimize = should_deoptimize || iter->IsMaterializedObject();
- Handle<Object> value = iter->GetValue();
- param_data[prefix_argc + i] = value;
- iter++;
+ slot_refs.Prepare(isolate);
+ for (int i = 0; i < args_count; i++) {
+ Handle<Object> val = slot_refs.GetNext(isolate, 0);
+ param_data[prefix_argc + i] = val;
}
-
- if (should_deoptimize) {
- translated_values.StoreMaterializedValuesAndDeopt();
- }
+ slot_refs.Finish(isolate);
return param_data;
} else {
« no previous file with comments | « src/ppc/lithium-codegen-ppc.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698