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

Unified Diff: src/runtime/runtime-classes.cc

Issue 1328363002: [turbofan] Make %Arguments composable with inlining. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation on GCC. Created 5 years, 3 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/runtime/runtime.h ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index a66fe393be279b64ff17b8a9becc06e8d0aad02a..6678cdd6f5ed8b535c1515769234512670dae76c 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -527,23 +527,23 @@ RUNTIME_FUNCTION(Runtime_DefaultConstructorCallSuper) {
isolate, super_constructor,
Runtime::GetPrototype(isolate, actual_constructor));
- // Find the frame that holds the actual arguments passed to the function.
- it.AdvanceToArgumentsFrame();
- JavaScriptFrame* frame = it.frame();
+ // Determine the actual arguments passed to the function.
+ int argument_count = 0;
+ base::SmartArrayPointer<Handle<Object>> arguments =
+ Runtime::GetCallerArguments(isolate, 0, &argument_count);
// Prepare the array containing all passed arguments.
- int argument_count = frame->GetArgumentsLength();
Handle<FixedArray> elements =
isolate->factory()->NewUninitializedFixedArray(argument_count);
for (int i = 0; i < argument_count; ++i) {
- elements->set(i, frame->GetParameter(i));
+ elements->set(i, *arguments[i]);
}
- Handle<JSArray> arguments = isolate->factory()->NewJSArrayWithElements(
+ Handle<JSArray> array = isolate->factory()->NewJSArrayWithElements(
elements, FAST_ELEMENTS, argument_count);
// Call %reflect_construct(<super>, <args>, <new.target>) now.
Handle<JSFunction> reflect = isolate->reflect_construct();
- Handle<Object> argv[] = {super_constructor, arguments, original_constructor};
+ Handle<Object> argv[] = {super_constructor, array, original_constructor};
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, result,
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698