- if (constructType == ConstructTypeHost)
- return constructData.native.function(exec, asObject(object), args);
- ASSERT(constructType == ConstructTypeJS);
- // FIXME: Can this be done more efficiently using the constructData?
- return asFunction(object)->construct(exec, args);
+ ASSERT(constructType == ConstructTypeJS || constructType == ConstructTypeHost);
+ return exec->interpreter()->executeConstruct(exec, asObject(constructorObject), constructType, constructData, args);