| Index: src/runtime/runtime-classes.cc
|
| diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
|
| index 92df7fe0645d1e4e43017fe68c2ea8e109c0a4a1..317d34b8f5b0b4828a49b0034eb226255e1c68ad 100644
|
| --- a/src/runtime/runtime-classes.cc
|
| +++ b/src/runtime/runtime-classes.cc
|
| @@ -253,6 +253,36 @@ RUNTIME_FUNCTION(Runtime_DefineClassMethod) {
|
| }
|
|
|
|
|
| +RUNTIME_FUNCTION(Runtime_FinalizeClassDefinition) {
|
| + HandleScope scope(isolate);
|
| + DCHECK(args.length() == 2);
|
| + CONVERT_ARG_HANDLE_CHECKED(JSObject, constructor, 0);
|
| + CONVERT_ARG_HANDLE_CHECKED(JSObject, prototype, 1);
|
| +
|
| + JSObject::MigrateSlowToFast(prototype, 0, "RuntimeToFastProperties");
|
| + JSObject::MigrateSlowToFast(constructor, 0, "RuntimeToFastProperties");
|
| +
|
| + return *constructor;
|
| +}
|
| +
|
| +
|
| +RUNTIME_FUNCTION(Runtime_FinalizeClassDefinitionStrong) {
|
| + HandleScope scope(isolate);
|
| + DCHECK(args.length() == 2);
|
| + CONVERT_ARG_HANDLE_CHECKED(JSObject, constructor, 0);
|
| + CONVERT_ARG_HANDLE_CHECKED(JSObject, prototype, 1);
|
| +
|
| + JSObject::MigrateSlowToFast(prototype, 0, "RuntimeToFastProperties");
|
| + JSObject::MigrateSlowToFast(constructor, 0, "RuntimeToFastProperties");
|
| +
|
| + RETURN_FAILURE_ON_EXCEPTION(isolate, JSObject::Freeze(prototype));
|
| + Handle<Object> result;
|
| + ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
|
| + JSObject::Freeze(constructor));
|
| + return *result;
|
| +}
|
| +
|
| +
|
| RUNTIME_FUNCTION(Runtime_ClassGetSourceCode) {
|
| HandleScope shs(isolate);
|
| DCHECK(args.length() == 1);
|
|
|