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 103243005: Captured arguments object materialization (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Skip uninteresting frame types when building SlotRefs Created 6 years, 11 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 | « include/v8.h ('k') | src/deoptimizer.h » ('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 ba84c9a430cdb837e72947b021166d68f59164a4..cd4156468b0e754c76b5143e234a976d9c5863c3 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -706,21 +706,22 @@ static MaybeObject* ConstructArgumentsObjectForInlinedFunction(
int inlined_frame_index) {
Isolate* isolate = inlined_function->GetIsolate();
Factory* factory = isolate->factory();
- Vector<SlotRef> args_slots =
- SlotRef::ComputeSlotMappingForArguments(
- frame,
- inlined_frame_index,
- inlined_function->shared()->formal_parameter_count());
- int args_count = args_slots.length();
+ SlotRefValueBuilder slot_refs(
+ frame,
+ inlined_frame_index,
+ inlined_function->shared()->formal_parameter_count());
+
+ int args_count = slot_refs.args_length();
Handle<JSObject> arguments =
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 = args_slots[i].GetValue(isolate);
+ Handle<Object> value = slot_refs.GetNext(isolate, 0);
array->set(i, *value);
}
+ slot_refs.Finish(isolate);
arguments->set_elements(*array);
- args_slots.Dispose();
// Return the freshly allocated arguments object.
return *arguments;
« no previous file with comments | « include/v8.h ('k') | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698