| Index: src/runtime/runtime-array.cc
|
| diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
|
| index 988e158950356e0817b2728904242febba79a564..6d8a11e2407530ab9b52a5371d8218c3088e65a8 100644
|
| --- a/src/runtime/runtime-array.cc
|
| +++ b/src/runtime/runtime-array.cc
|
| @@ -1038,7 +1038,6 @@
|
|
|
| static Object* ArrayConstructorCommon(Isolate* isolate,
|
| Handle<JSFunction> constructor,
|
| - Handle<JSFunction> original_constructor,
|
| Handle<AllocationSite> site,
|
| Arguments* caller_args) {
|
| Factory* factory = isolate->factory();
|
| @@ -1110,19 +1109,6 @@
|
| // We must mark the allocationsite as un-inlinable.
|
| site->SetDoNotInlineCall();
|
| }
|
| -
|
| - // Set up the prototoype using original function.
|
| - // TODO(dslomov): instead of setting the __proto__,
|
| - // use and cache the correct map.
|
| - if (*original_constructor != *constructor) {
|
| - if (original_constructor->has_instance_prototype()) {
|
| - Handle<Object> prototype =
|
| - handle(original_constructor->instance_prototype(), isolate);
|
| - RETURN_FAILURE_ON_EXCEPTION(
|
| - isolate, JSObject::SetPrototype(array, prototype, false));
|
| - }
|
| - }
|
| -
|
| return *array;
|
| }
|
|
|
| @@ -1156,23 +1142,7 @@
|
| DCHECK(!site->SitePointsToLiteral());
|
| }
|
|
|
| - return ArrayConstructorCommon(isolate, constructor, constructor, site,
|
| - caller_args);
|
| -}
|
| -
|
| -
|
| -RUNTIME_FUNCTION(Runtime_ArrayConstructorWithSubclassing) {
|
| - HandleScope scope(isolate);
|
| - DCHECK(args.length() >= 2);
|
| - int args_length = args.length();
|
| - CHECK(args[args_length - 2]->IsJSFunction());
|
| - CHECK(args[args_length - 1]->IsJSFunction());
|
| - Handle<JSFunction> constructor(JSFunction::cast(args[args_length - 2]));
|
| - Handle<JSFunction> original_constructor(
|
| - JSFunction::cast(args[args_length - 1]));
|
| - Arguments caller_args(args_length - 2, args.arguments());
|
| - return ArrayConstructorCommon(isolate, constructor, original_constructor,
|
| - Handle<AllocationSite>::null(), &caller_args);
|
| + return ArrayConstructorCommon(isolate, constructor, site, caller_args);
|
| }
|
|
|
|
|
| @@ -1191,7 +1161,7 @@
|
| DCHECK(arg_count == caller_args->length());
|
| }
|
| #endif
|
| - return ArrayConstructorCommon(isolate, constructor, constructor,
|
| + return ArrayConstructorCommon(isolate, constructor,
|
| Handle<AllocationSite>::null(), caller_args);
|
| }
|
|
|
|
|