Index: src/runtime/runtime-classes.cc |
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc |
index df428f43aea083194eae084f7e24cc5e67efc124..266f4d9cd7f9ee47dc6965d2ab2f59d7c9252b67 100644 |
--- a/src/runtime/runtime-classes.cc |
+++ b/src/runtime/runtime-classes.cc |
@@ -116,11 +116,9 @@ RUNTIME_FUNCTION(Runtime_DefineClass) { |
: isolate->factory()->empty_string(); |
constructor->shared()->set_name(*name_string); |
- if (FLAG_experimental_classes) { |
- if (!super_class->IsTheHole()) { |
- Handle<Code> stub(isolate->builtins()->JSConstructStubForDerived()); |
- constructor->shared()->set_construct_stub(*stub); |
- } |
+ if (!super_class->IsTheHole()) { |
+ Handle<Code> stub(isolate->builtins()->JSConstructStubForDerived()); |
+ constructor->shared()->set_construct_stub(*stub); |
} |
JSFunction::SetPrototype(constructor, prototype); |
@@ -431,54 +429,5 @@ RUNTIME_FUNCTION(RuntimeReference_DefaultConstructorCallSuper) { |
UNREACHABLE(); |
return nullptr; |
} |
- |
- |
-// TODO(dslomov): deprecated, will remove when experimenal classes is default. |
-RUNTIME_FUNCTION(Runtime_DefaultConstructorSuperCall) { |
- CHECK(!FLAG_experimental_classes); |
- HandleScope scope(isolate); |
- DCHECK(args.length() == 0); |
- |
- // Compute the frame holding the arguments. |
- JavaScriptFrameIterator it(isolate); |
- it.AdvanceToArgumentsFrame(); |
- JavaScriptFrame* frame = it.frame(); |
- |
- Handle<JSFunction> function(frame->function(), isolate); |
- Handle<Object> receiver(frame->receiver(), isolate); |
- |
- Handle<Object> proto_function; |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, proto_function, |
- Runtime::GetPrototype(isolate, function)); |
- |
- // Get the actual number of provided arguments. |
- const int argc = frame->ComputeParametersCount(); |
- |
- // Loose upper bound to allow fuzzing. We'll most likely run out of |
- // stack space before hitting this limit. |
- static int kMaxArgc = 1000000; |
- RUNTIME_ASSERT(argc >= 0 && argc <= kMaxArgc); |
- |
- // If there are too many arguments, allocate argv via malloc. |
- const int argv_small_size = 10; |
- Handle<Object> argv_small_buffer[argv_small_size]; |
- SmartArrayPointer<Handle<Object> > argv_large_buffer; |
- Handle<Object>* argv = argv_small_buffer; |
- if (argc > argv_small_size) { |
- argv = new Handle<Object>[argc]; |
- if (argv == NULL) return isolate->StackOverflow(); |
- argv_large_buffer = SmartArrayPointer<Handle<Object> >(argv); |
- } |
- |
- for (int i = 0; i < argc; ++i) { |
- argv[i] = handle(frame->GetParameter(i), isolate); |
- } |
- |
- Handle<Object> result; |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
- isolate, result, |
- Execution::Call(isolate, proto_function, receiver, argc, argv, false)); |
- return *result; |
-} |
} |
} // namespace v8::internal |