Index: src/runtime/runtime-array.cc |
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc |
index f310309fafead51913250b0755daeb95194e60e2..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,19 +1142,7 @@ |
DCHECK(!site->SitePointsToLiteral()); |
} |
- return ArrayConstructorCommon(isolate, constructor, constructor, site, |
- caller_args); |
-} |
- |
- |
-RUNTIME_FUNCTION(Runtime_ArrayConstructorWithSubclassing) { |
- HandleScope scope(isolate); |
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, constructor, args.length() - 2); |
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, original_constructor, |
- 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); |
} |
@@ -1187,7 +1161,7 @@ |
DCHECK(arg_count == caller_args->length()); |
} |
#endif |
- return ArrayConstructorCommon(isolate, constructor, constructor, |
+ return ArrayConstructorCommon(isolate, constructor, |
Handle<AllocationSite>::null(), caller_args); |
} |