+UnlinkedFunctionExecutable* BuiltinExecutables::createDefaultConstructor(ConstructorKind constructorKind, const Identifier& name)
+{
+ static NeverDestroyed<const String> baseConstructorCode(ASCIILiteral("(function () { })"));
+ static NeverDestroyed<const String> derivedConstructorCode(ASCIILiteral("(function () { super(...arguments); })"));
+
+ switch (constructorKind) {
+ case ConstructorKind::None:
+ break;
+ case ConstructorKind::Base:
+ return createExecutableInternal(makeSource(baseConstructorCode), name, constructorKind);
+ case ConstructorKind::Derived:
+ return createExecutableInternal(makeSource(derivedConstructorCode), name, constructorKind);
+ }
+ ASSERT_NOT_REACHED();
+ return nullptr;
+}
+
+UnlinkedFunctionExecutable* BuiltinExecutables::createExecutableInternal(const SourceCode& source, const Identifier& name, ConstructorKind constructorKind)