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

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

Issue 919643008: Remove --experimental-classes flag and related dead code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/scopes.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 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
« no previous file with comments | « src/runtime/runtime.h ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698