JS wrappers should have strongly typed impl() functions.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2013 20:01:26 +0000 (20:01 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2013 20:01:26 +0000 (20:01 +0000)
<https://webkit.org/b/121919>

Reviewed by Geoffrey Garen.

Generate strongly typed JSFoo::impl() functions for all wrappers,
not just those marked with JSGenerateToNativeObject.

Removed 8.8 million static_casts that are no longer needed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156419 268f45cc-cd09-0410-ab3c-d52691b4dbfc

45 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp
Source/WebCore/bindings/js/JSAudioTrackCustom.cpp
Source/WebCore/bindings/js/JSAudioTrackListCustom.cpp
Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp
Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp
Source/WebCore/bindings/js/JSDeviceMotionEventCustom.cpp
Source/WebCore/bindings/js/JSDeviceOrientationEventCustom.cpp
Source/WebCore/bindings/js/JSDocumentCustom.cpp
Source/WebCore/bindings/js/JSEventTargetCustom.cpp
Source/WebCore/bindings/js/JSHTMLAllCollectionCustom.cpp
Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
Source/WebCore/bindings/js/JSHTMLDocumentCustom.cpp
Source/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp
Source/WebCore/bindings/js/JSHTMLInputElementCustom.cpp
Source/WebCore/bindings/js/JSHTMLLinkElementCustom.cpp
Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp
Source/WebCore/bindings/js/JSHTMLTemplateElementCustom.cpp
Source/WebCore/bindings/js/JSHistoryCustom.cpp
Source/WebCore/bindings/js/JSMessageEventCustom.cpp
Source/WebCore/bindings/js/JSNodeCustom.cpp
Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp
Source/WebCore/bindings/js/JSPannerNodeCustom.cpp
Source/WebCore/bindings/js/JSPopStateEventCustom.cpp
Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp
Source/WebCore/bindings/js/JSTextTrackCustom.cpp
Source/WebCore/bindings/js/JSTextTrackListCustom.cpp
Source/WebCore/bindings/js/JSTrackEventCustom.cpp
Source/WebCore/bindings/js/JSVideoTrackCustom.cpp
Source/WebCore/bindings/js/JSVideoTrackListCustom.cpp
Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp

index 7ee1e63..82360e9 100644 (file)
@@ -1,3 +1,15 @@
+2013-09-25  Andreas Kling  <akling@apple.com>
+
+        JS wrappers should have strongly typed impl() functions.
+        <https://webkit.org/b/121919>
+
+        Reviewed by Geoffrey Garen.
+
+        Generate strongly typed JSFoo::impl() functions for all wrappers,
+        not just those marked with JSGenerateToNativeObject.
+
+        Removed 8.8 million static_casts that are no longer needed.
+
 2013-09-24  Roger Fong  <roger_fong@apple.com>
 
         [Windows] Overpanning occurs even when what is being panned isn't the main document.
index f648bd7..4e3daab 100644 (file)
@@ -40,7 +40,7 @@ namespace WebCore {
 
 void JSAudioBufferSourceNode::setBuffer(ExecState* exec, JSValue value)
 {
-    AudioBufferSourceNode* imp = static_cast<AudioBufferSourceNode*>(impl());
+    AudioBufferSourceNode* imp = impl();
     AudioBuffer* buffer = toAudioBuffer(value);
     if (!buffer) {
         exec->vm().throwException(exec, createTypeError(exec, "Value is not of type AudioBuffer"));
index e71805a..f70bdbb 100644 (file)
@@ -43,7 +43,7 @@ void JSAudioTrack::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT(jsAudioTrack->structure()->typeInfo().overridesVisitChildren());
     Base::visitChildren(jsAudioTrack, visitor);
 
-    AudioTrack* audioTrack = static_cast<AudioTrack*>(jsAudioTrack->impl());
+    AudioTrack* audioTrack = jsAudioTrack->impl();
     visitor.addOpaqueRoot(root(audioTrack));
 }
 
index 0daaa4c..976ff4a 100644 (file)
@@ -43,7 +43,7 @@ void JSAudioTrackList::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT(jsAudioTrackList->structure()->typeInfo().overridesVisitChildren());
     Base::visitChildren(jsAudioTrackList, visitor);
 
-    AudioTrackList* audioTrackList = static_cast<AudioTrackList*>(jsAudioTrackList->impl());
+    AudioTrackList* audioTrackList = jsAudioTrackList->impl();
     visitor.addOpaqueRoot(root(audioTrackList->element()));
     audioTrackList->visitJSEventListeners(visitor);
 }
index 64008e9..7eb7646 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 
 void JSBiquadFilterNode::setType(ExecState* exec, JSValue value)
 {
-    BiquadFilterNode* imp = static_cast<BiquadFilterNode*>(impl());
+    BiquadFilterNode* imp = impl();
 
 #if ENABLE(LEGACY_WEB_AUDIO)
     if (value.isNumber()) {
index eb8e7f1..cd9dcba 100644 (file)
@@ -61,13 +61,12 @@ static CanvasStyle toHTMLCanvasStyle(ExecState*, JSValue value)
 
 JSValue JSCanvasRenderingContext2D::strokeStyle(ExecState* exec) const
 {
-    CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
-    return toJS(exec, globalObject(), context->strokeStyle());        
+    return toJS(exec, globalObject(), impl()->strokeStyle());
 }
 
 void JSCanvasRenderingContext2D::setStrokeStyle(ExecState* exec, JSValue value)
 {
-    CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
+    CanvasRenderingContext2D* context = impl();
     if (value.isString()) {
         context->setStrokeColor(asString(value)->value(exec));
         return;
@@ -77,13 +76,12 @@ void JSCanvasRenderingContext2D::setStrokeStyle(ExecState* exec, JSValue value)
 
 JSValue JSCanvasRenderingContext2D::fillStyle(ExecState* exec) const
 {
-    CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
-    return toJS(exec, globalObject(), context->fillStyle());
+    return toJS(exec, globalObject(), impl()->fillStyle());
 }
 
 void JSCanvasRenderingContext2D::setFillStyle(ExecState* exec, JSValue value)
 {
-    CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
+    CanvasRenderingContext2D* context = impl();
     if (value.isString()) {
         context->setFillColor(asString(value)->value(exec));
         return;
@@ -93,7 +91,7 @@ void JSCanvasRenderingContext2D::setFillStyle(ExecState* exec, JSValue value)
 
 JSValue JSCanvasRenderingContext2D::webkitLineDash(ExecState* exec) const
 {
-    CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
+    CanvasRenderingContext2D* context = impl();
     const Vector<float>& dash = context->getLineDash();
 
     MarkedArgumentBuffer list;
@@ -118,8 +116,7 @@ void JSCanvasRenderingContext2D::setWebkitLineDash(ExecState* exec, JSValue valu
         dash.append(elem);
     }
 
-    CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(impl());
-    context->setWebkitLineDash(dash);
+    impl()->setWebkitLineDash(dash);
 }
 
 } // namespace WebCore
index 106d1a9..bd82f78 100644 (file)
@@ -43,7 +43,7 @@ namespace WebCore {
 
 static HTMLFormElement* toHTMLFormElement(JSC::JSValue value)
 {
-    return value.inherits(JSHTMLFormElement::info()) ? toHTMLFormElement(jsCast<JSHTMLFormElement*>(asObject(value))->impl()) : 0;
+    return value.inherits(JSHTMLFormElement::info()) ? jsCast<JSHTMLFormElement*>(asObject(value))->impl() : 0;
 }
 
 EncodedJSValue JSC_HOST_CALL JSDOMFormDataConstructor::constructJSDOMFormData(ExecState* exec)
index 71eddba..09f3572 100644 (file)
@@ -133,7 +133,7 @@ static JSObject* createRotationRateObject(const DeviceMotionData::RotationRate*
 
 JSValue JSDeviceMotionEvent::acceleration(ExecState* exec) const
 {
-    DeviceMotionEvent* imp = static_cast<DeviceMotionEvent*>(impl());
+    DeviceMotionEvent* imp = impl();
     if (!imp->deviceMotionData()->acceleration())
         return jsNull();
     return createAccelerationObject(imp->deviceMotionData()->acceleration(), exec);
@@ -141,7 +141,7 @@ JSValue JSDeviceMotionEvent::acceleration(ExecState* exec) const
 
 JSValue JSDeviceMotionEvent::accelerationIncludingGravity(ExecState* exec) const
 {
-    DeviceMotionEvent* imp = static_cast<DeviceMotionEvent*>(impl());
+    DeviceMotionEvent* imp = impl();
     if (!imp->deviceMotionData()->accelerationIncludingGravity())
         return jsNull();
     return createAccelerationObject(imp->deviceMotionData()->accelerationIncludingGravity(), exec);
@@ -149,7 +149,7 @@ JSValue JSDeviceMotionEvent::accelerationIncludingGravity(ExecState* exec) const
 
 JSValue JSDeviceMotionEvent::rotationRate(ExecState* exec) const
 {
-    DeviceMotionEvent* imp = static_cast<DeviceMotionEvent*>(impl());
+    DeviceMotionEvent* imp = impl();
     if (!imp->deviceMotionData()->rotationRate())
         return jsNull();
     return createRotationRateObject(imp->deviceMotionData()->rotationRate(), exec);
@@ -157,7 +157,7 @@ JSValue JSDeviceMotionEvent::rotationRate(ExecState* exec) const
 
 JSValue JSDeviceMotionEvent::interval(ExecState*) const
 {
-    DeviceMotionEvent* imp = static_cast<DeviceMotionEvent*>(impl());
+    DeviceMotionEvent* imp = impl();
     if (!imp->deviceMotionData()->canProvideInterval())
         return jsNull();
     return jsNumber(imp->deviceMotionData()->interval());
@@ -186,7 +186,7 @@ JSValue JSDeviceMotionEvent::initDeviceMotionEvent(ExecState* exec)
     bool intervalProvided = !exec->argument(6).isUndefinedOrNull();
     double interval = exec->argument(6).toNumber(exec);
     RefPtr<DeviceMotionData> deviceMotionData = DeviceMotionData::create(acceleration, accelerationIncludingGravity, rotationRate, intervalProvided, interval);
-    DeviceMotionEvent* imp = static_cast<DeviceMotionEvent*>(impl());
+    DeviceMotionEvent* imp = impl();
     imp->initDeviceMotionEvent(type, bubbles, cancelable, deviceMotionData.get());
     return jsUndefined();
 }
index 1f070fe..a1678c3 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 
 JSValue JSDeviceOrientationEvent::alpha(ExecState*) const
 {
-    DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
+    DeviceOrientationEvent* imp = impl();
     if (!imp->orientation()->canProvideAlpha())
         return jsNull();
     return jsNumber(imp->orientation()->alpha());
@@ -46,7 +46,7 @@ JSValue JSDeviceOrientationEvent::alpha(ExecState*) const
 
 JSValue JSDeviceOrientationEvent::beta(ExecState*) const
 {
-    DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
+    DeviceOrientationEvent* imp = impl();
     if (!imp->orientation()->canProvideBeta())
         return jsNull();
     return jsNumber(imp->orientation()->beta());
@@ -54,7 +54,7 @@ JSValue JSDeviceOrientationEvent::beta(ExecState*) const
 
 JSValue JSDeviceOrientationEvent::gamma(ExecState*) const
 {
-    DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
+    DeviceOrientationEvent* imp = impl();
     if (!imp->orientation()->canProvideGamma())
         return jsNull();
     return jsNumber(imp->orientation()->gamma());
@@ -62,7 +62,7 @@ JSValue JSDeviceOrientationEvent::gamma(ExecState*) const
 
 JSValue JSDeviceOrientationEvent::absolute(ExecState*) const
 {
-    DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
+    DeviceOrientationEvent* imp = impl();
     if (!imp->orientation()->canProvideAbsolute())
         return jsNull();
     return jsBoolean(imp->orientation()->absolute());
@@ -84,7 +84,7 @@ JSValue JSDeviceOrientationEvent::initDeviceOrientationEvent(ExecState* exec)
     bool absoluteProvided = !exec->argument(6).isUndefinedOrNull();
     bool absolute = exec->argument(6).toBoolean(exec);
     RefPtr<DeviceOrientationData> orientation = DeviceOrientationData::create(alphaProvided, alpha, betaProvided, beta, gammaProvided, gamma, absoluteProvided, absolute);
-    DeviceOrientationEvent* imp = static_cast<DeviceOrientationEvent*>(impl());
+    DeviceOrientationEvent* imp = impl();
     imp->initDeviceOrientationEvent(type, bubbles, cancelable, orientation.get());
     return jsUndefined();
 }
index b5e799c..dce9665 100644 (file)
@@ -51,7 +51,7 @@ namespace WebCore {
 
 JSValue JSDocument::location(ExecState* exec) const
 {
-    Frame* frame = static_cast<Document*>(impl())->frame();
+    Frame* frame = impl()->frame();
     if (!frame)
         return jsNull();
 
@@ -66,7 +66,7 @@ JSValue JSDocument::location(ExecState* exec) const
 
 void JSDocument::setLocation(ExecState* exec, JSValue value)
 {
-    Frame* frame = static_cast<Document*>(impl())->frame();
+    Frame* frame = impl()->frame();
     if (!frame)
         return;
 
index fc913d0..e3df91a 100644 (file)
@@ -56,7 +56,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* targ
 
 #define TRY_TO_UNWRAP_WITH_INTERFACE(interfaceName) \
     if (value.inherits(JS##interfaceName::info()))                      \
-        return static_cast<interfaceName*>(jsCast<JS##interfaceName*>(asObject(value))->impl());
+        return jsCast<JS##interfaceName*>(asObject(value))->impl();
 
 EventTarget* toEventTarget(JSC::JSValue value)
 {
index 3151cff..84b379d 100644 (file)
@@ -63,7 +63,7 @@ static EncodedJSValue JSC_HOST_CALL callHTMLAllCollection(ExecState* exec)
 
     // Do not use thisObj here. It can be the JSHTMLDocument, in the document.forms(i) case.
     JSHTMLAllCollection* jsCollection = jsCast<JSHTMLAllCollection*>(exec->callee());
-    HTMLAllCollection* collection = static_cast<HTMLAllCollection*>(jsCollection->impl());
+    HTMLAllCollection* collection = jsCollection->impl();
 
     // Also, do we need the TypeError test here ?
 
index 59631d6..d8e108f 100644 (file)
@@ -68,7 +68,7 @@ static void get3DContextAttributes(ExecState* exec, RefPtr<CanvasContextAttribut
 
 JSValue JSHTMLCanvasElement::getContext(ExecState* exec)
 {
-    HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(impl());
+    HTMLCanvasElement* canvas = impl();
     const String& contextId = exec->argument(0).toString(exec)->value(exec);
     
     RefPtr<CanvasContextAttributes> attrs;
@@ -101,7 +101,7 @@ JSValue JSHTMLCanvasElement::getContext(ExecState* exec)
 
 JSValue JSHTMLCanvasElement::probablySupportsContext(ExecState* exec)
 {
-    HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(impl());
+    HTMLCanvasElement* canvas = impl();
     if (!exec->argumentCount())
         return jsBoolean(false);
     const String& contextId = exec->uncheckedArgument(0).toString(exec)->value(exec);
@@ -122,7 +122,7 @@ JSValue JSHTMLCanvasElement::probablySupportsContext(ExecState* exec)
 
 JSValue JSHTMLCanvasElement::toDataURL(ExecState* exec)
 {
-    HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(impl());
+    HTMLCanvasElement* canvas = impl();
     ExceptionCode ec = 0;
 
     const String& type = valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0));
index 9314823..98608a2 100644 (file)
@@ -60,7 +60,7 @@ bool JSHTMLDocument::canGetItemsForName(ExecState*, HTMLDocument* document, Prop
 JSValue JSHTMLDocument::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
 {
     JSHTMLDocument* thisObj = jsCast<JSHTMLDocument*>(asObject(slotBase));
-    HTMLDocument* document = toHTMLDocument(thisObj->impl());
+    HTMLDocument* document = thisObj->impl();
 
     AtomicStringImpl* atomicPropertyName = findAtomicString(propertyName);
     if (!atomicPropertyName || !document->hasDocumentNamedItem(atomicPropertyName))
@@ -90,7 +90,7 @@ JSValue JSHTMLDocument::all(ExecState* exec) const
     if (v)
         return v;
 
-    return toJS(exec, globalObject(), toHTMLDocument(impl())->all());
+    return toJS(exec, globalObject(), impl()->all());
 }
 
 void JSHTMLDocument::setAll(ExecState* exec, JSValue value)
@@ -105,7 +105,7 @@ JSValue JSHTMLDocument::open(ExecState* exec)
 {
     // For compatibility with other browsers, pass open calls with more than 2 parameters to the window.
     if (exec->argumentCount() > 2) {
-        Frame* frame = toHTMLDocument(impl())->frame();
+        Frame* frame = impl()->frame();
         if (frame) {
             JSDOMWindowShell* wrapper = toJSDOMWindowShell(frame, currentWorld(exec));
             if (wrapper) {
@@ -125,7 +125,7 @@ JSValue JSHTMLDocument::open(ExecState* exec)
     Document* activeDocument = asJSDOMWindow(exec->lexicalGlobalObject())->impl()->document();
 
     // In the case of two parameters or fewer, do a normal document open.
-    toHTMLDocument(impl())->open(activeDocument);
+    impl()->open(activeDocument);
     return this;
 }
 
@@ -158,13 +158,13 @@ static inline void documentWrite(ExecState* exec, HTMLDocument* document, Newlin
 
 JSValue JSHTMLDocument::write(ExecState* exec)
 {
-    documentWrite(exec, toHTMLDocument(impl()), DoNotAddNewline);
+    documentWrite(exec, impl(), DoNotAddNewline);
     return jsUndefined();
 }
 
 JSValue JSHTMLDocument::writeln(ExecState* exec)
 {
-    documentWrite(exec, toHTMLDocument(impl()), DoAddNewline);
+    documentWrite(exec, impl(), DoAddNewline);
     return jsUndefined();
 }
 
index 7f00ebc..a12c71b 100644 (file)
@@ -53,7 +53,7 @@ static inline bool allowSettingJavascriptURL(ExecState* exec, HTMLFrameElement*
 
 void JSHTMLFrameElement::setLocation(ExecState* exec, JSValue value)
 {
-    HTMLFrameElement* imp = static_cast<HTMLFrameElement*>(impl());
+    HTMLFrameElement* imp = impl();
     String locationValue = valueToStringWithNullCheck(exec, value);
 
     if (!allowSettingJavascriptURL(exec, imp, locationValue))
index 1f3c5a6..2ff6e86 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
 
 JSValue JSHTMLInputElement::selectionStart(ExecState* exec) const
 {
-    HTMLInputElement* input = toHTMLInputElement(impl());
+    HTMLInputElement* input = impl();
     if (!input->canHaveSelection())
         return throwTypeError(exec);
 
@@ -44,7 +44,7 @@ JSValue JSHTMLInputElement::selectionStart(ExecState* exec) const
 
 void JSHTMLInputElement::setSelectionStart(ExecState* exec, JSValue value)
 {
-    HTMLInputElement* input = toHTMLInputElement(impl());
+    HTMLInputElement* input = impl();
     if (!input->canHaveSelection())
         throwTypeError(exec);
 
@@ -53,7 +53,7 @@ void JSHTMLInputElement::setSelectionStart(ExecState* exec, JSValue value)
 
 JSValue JSHTMLInputElement::selectionEnd(ExecState* exec) const
 {
-    HTMLInputElement* input = toHTMLInputElement(impl());
+    HTMLInputElement* input = impl();
     if (!input->canHaveSelection())
         return throwTypeError(exec);
 
@@ -62,7 +62,7 @@ JSValue JSHTMLInputElement::selectionEnd(ExecState* exec) const
 
 void JSHTMLInputElement::setSelectionEnd(ExecState* exec, JSValue value)
 {
-    HTMLInputElement* input = toHTMLInputElement(impl());
+    HTMLInputElement* input = impl();
     if (!input->canHaveSelection())
         throwTypeError(exec);
 
@@ -71,7 +71,7 @@ void JSHTMLInputElement::setSelectionEnd(ExecState* exec, JSValue value)
 
 JSValue JSHTMLInputElement::selectionDirection(ExecState* exec) const
 {
-    HTMLInputElement* input = toHTMLInputElement(impl());
+    HTMLInputElement* input = impl();
     if (!input->canHaveSelection())
         return throwTypeError(exec);
 
@@ -80,7 +80,7 @@ JSValue JSHTMLInputElement::selectionDirection(ExecState* exec) const
 
 void JSHTMLInputElement::setSelectionDirection(ExecState* exec, JSValue value)
 {
-    HTMLInputElement* input = toHTMLInputElement(impl());
+    HTMLInputElement* input = impl();
     if (!input->canHaveSelection()) {
         throwTypeError(exec);
         return;
@@ -91,7 +91,7 @@ void JSHTMLInputElement::setSelectionDirection(ExecState* exec, JSValue value)
 
 JSValue JSHTMLInputElement::setSelectionRange(ExecState* exec)
 {
-    HTMLInputElement* input = toHTMLInputElement(impl());
+    HTMLInputElement* input = impl();
     if (!input->canHaveSelection())
         return throwTypeError(exec);
 
index bbd55a9..5558693 100644 (file)
@@ -38,15 +38,12 @@ namespace WebCore {
 
 JSValue JSHTMLLinkElement::sizes(ExecState* exec) const
 {
-    HTMLLinkElement* output = static_cast<HTMLLinkElement*>(impl());
-    JSValue result = toJS(exec, globalObject(), WTF::getPtr(output->sizes()));
-    return result;
+    return toJS(exec, globalObject(), impl()->sizes());
 }
 
 void JSHTMLLinkElement::setSizes(ExecState* exec, JSValue value)
 {
-    HTMLLinkElement* output = static_cast<HTMLLinkElement*>(impl());
-    output->setSizes(valueToStringWithNullCheck(exec, value));
+    impl()->setSizes(valueToStringWithNullCheck(exec, value));
 }
 
 } // namespace WebCore
index 47b338d..bee2f91 100644 (file)
@@ -39,7 +39,7 @@ namespace WebCore {
 
 void JSHTMLOptionsCollection::setLength(ExecState* exec, JSValue value)
 {
-    HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl());
+    HTMLOptionsCollection* imp = impl();
     ExceptionCode ec = 0;
     unsigned newLength = 0;
     double lengthValue = value.toNumber(exec);
@@ -58,14 +58,14 @@ void JSHTMLOptionsCollection::setLength(ExecState* exec, JSValue value)
 
 void JSHTMLOptionsCollection::indexSetter(ExecState* exec, unsigned index, JSValue value)
 {
-    HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl());
+    HTMLOptionsCollection* imp = impl();
     HTMLSelectElement* base = toHTMLSelectElement(imp->ownerNode());
     selectIndexSetter(base, exec, index, value);
 }
 
 JSValue JSHTMLOptionsCollection::add(ExecState* exec)
 {
-    HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl());
+    HTMLOptionsCollection* imp = impl();
     HTMLOptionElement* option = toHTMLOptionElement(exec->argument(0));
     ExceptionCode ec = 0;
     if (exec->argumentCount() < 2)
@@ -82,7 +82,7 @@ JSValue JSHTMLOptionsCollection::add(ExecState* exec)
 
 JSValue JSHTMLOptionsCollection::remove(ExecState* exec)
 {
-    HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl());
+    HTMLOptionsCollection* imp = impl();
     JSHTMLSelectElement* base = jsCast<JSHTMLSelectElement*>(asObject(toJS(exec, globalObject(), imp->ownerNode())));
     return base->remove(exec);
 }
index 13ea8f3..a4928b1 100644 (file)
@@ -34,7 +34,7 @@ using namespace HTMLNames;
 
 JSValue JSHTMLSelectElement::remove(ExecState* exec)
 {
-    HTMLSelectElement& select = *toHTMLSelectElement(impl());
+    HTMLSelectElement& select = *impl();
 
     // The remove function can take either an option object or the index of an option.
     if (HTMLOptionElement* option = toHTMLOptionElement(exec->argument(0)))
@@ -62,7 +62,7 @@ void selectIndexSetter(HTMLSelectElement* select, JSC::ExecState* exec, unsigned
 
 void JSHTMLSelectElement::indexSetter(JSC::ExecState* exec, unsigned index, JSC::JSValue value)
 {
-    selectIndexSetter(toHTMLSelectElement(impl()), exec, index, value);
+    selectIndexSetter(impl(), exec, index, value);
 }
 
 }
index ccb4cf1..63d9098 100644 (file)
@@ -47,7 +47,7 @@ JSValue JSHTMLTemplateElement::content(ExecState* exec) const
 {
     JSLockHolder lock(exec);
 
-    HTMLTemplateElement* imp = static_cast<HTMLTemplateElement*>(impl());
+    HTMLTemplateElement* imp = impl();
     DocumentFragment* content = imp->content();
 
     JSObject* wrapper = getCachedWrapper(currentWorld(exec), content);
index 0a1114d..ec47bf4 100644 (file)
@@ -131,7 +131,7 @@ void JSHistory::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyN
 
 JSValue JSHistory::state(ExecState *exec) const
 {
-    History* history = static_cast<History*>(impl());
+    History* history = impl();
 
     JSValue cachedValue = m_state.get();
     if (!cachedValue.isEmpty() && !history->stateChanged())
index 9809dd0..1f027eb 100644 (file)
@@ -49,7 +49,7 @@ JSValue JSMessageEvent::data(ExecState* exec) const
     if (JSValue cachedValue = m_data.get())
         return cachedValue;
 
-    MessageEvent* event = static_cast<MessageEvent*>(impl());
+    MessageEvent* event = impl();
     JSValue result;
     switch (event->dataType()) {
     case MessageEvent::DataTypeScriptValue: {
@@ -63,7 +63,7 @@ JSValue JSMessageEvent::data(ExecState* exec) const
 
     case MessageEvent::DataTypeSerializedScriptValue:
         if (RefPtr<SerializedScriptValue> serializedValue = event->dataAsSerializedScriptValue()) {
-            MessagePortArray ports = static_cast<MessageEvent*>(impl())->ports();
+            MessagePortArray ports = impl()->ports();
             result = serializedValue->deserialize(exec, globalObject(), &ports, NonThrowing);
         }
         else
@@ -109,7 +109,7 @@ static JSC::JSValue handleInitMessageEvent(JSMessageEvent* jsEvent, JSC::ExecSta
     if (exec->hadException())
         return jsUndefined();
 
-    MessageEvent* event = static_cast<MessageEvent*>(jsEvent->impl());
+    MessageEvent* event = jsEvent->impl();
     event->initMessageEvent(typeArg, canBubbleArg, cancelableArg, dataArg, originArg, lastEventIdArg, sourceArg, messagePorts.release());
     jsEvent->m_data.set(exec->vm(), jsEvent, dataArg.jsValue());
     return jsUndefined();
index f3bafa0..5ece25b 100644 (file)
@@ -141,9 +141,8 @@ void JSNodeOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
 
 JSValue JSNode::insertBefore(ExecState* exec)
 {
-    Node* imp = static_cast<Node*>(impl());
     ExceptionCode ec = 0;
-    bool ok = imp->insertBefore(toNode(exec->argument(0)), toNode(exec->argument(1)), ec, AttachLazily);
+    bool ok = impl()->insertBefore(toNode(exec->argument(0)), toNode(exec->argument(1)), ec, AttachLazily);
     setDOMException(exec, ec);
     if (ok)
         return exec->argument(0);
@@ -152,9 +151,8 @@ JSValue JSNode::insertBefore(ExecState* exec)
 
 JSValue JSNode::replaceChild(ExecState* exec)
 {
-    Node* imp = static_cast<Node*>(impl());
     ExceptionCode ec = 0;
-    bool ok = imp->replaceChild(toNode(exec->argument(0)), toNode(exec->argument(1)), ec, AttachLazily);
+    bool ok = impl()->replaceChild(toNode(exec->argument(0)), toNode(exec->argument(1)), ec, AttachLazily);
     setDOMException(exec, ec);
     if (ok)
         return exec->argument(1);
@@ -163,9 +161,8 @@ JSValue JSNode::replaceChild(ExecState* exec)
 
 JSValue JSNode::removeChild(ExecState* exec)
 {
-    Node* imp = static_cast<Node*>(impl());
     ExceptionCode ec = 0;
-    bool ok = imp->removeChild(toNode(exec->argument(0)), ec);
+    bool ok = impl()->removeChild(toNode(exec->argument(0)), ec);
     setDOMException(exec, ec);
     if (ok)
         return exec->argument(0);
@@ -174,9 +171,8 @@ JSValue JSNode::removeChild(ExecState* exec)
 
 JSValue JSNode::appendChild(ExecState* exec)
 {
-    Node* imp = static_cast<Node*>(impl());
     ExceptionCode ec = 0;
-    bool ok = imp->appendChild(toNode(exec->argument(0)), ec, AttachLazily);
+    bool ok = impl()->appendChild(toNode(exec->argument(0)), ec, AttachLazily);
     setDOMException(exec, ec);
     if (ok)
         return exec->argument(0);
index 716ff5d..4727566 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 
 void JSOscillatorNode::setType(ExecState* exec, JSValue value)
 {
-    OscillatorNode* imp = static_cast<OscillatorNode*>(impl());
+    OscillatorNode* imp = impl();
 
 #if ENABLE(LEGACY_WEB_AUDIO)
     if (value.isNumber()) {
index a3e5ad0..eb216d2 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 
 void JSPannerNode::setPanningModel(ExecState* exec, JSValue value)
 {
-    PannerNode* imp = static_cast<PannerNode*>(impl());
+    PannerNode* imp = impl();
 
 #if ENABLE(LEGACY_WEB_AUDIO)
     if (value.isNumber()) {
@@ -62,7 +62,7 @@ void JSPannerNode::setPanningModel(ExecState* exec, JSValue value)
 
 void JSPannerNode::setDistanceModel(ExecState* exec, JSValue value)
 {
-    PannerNode* imp = static_cast<PannerNode*>(impl());
+    PannerNode* imp = impl();
 
 #if ENABLE(LEGACY_WEB_AUDIO)
     if (value.isNumber()) {
index 60871c2..5946ba3 100644 (file)
@@ -51,7 +51,7 @@ JSValue JSPopStateEvent::state(ExecState* exec) const
     if (!cachedValue.isEmpty())
         return cachedValue;
 
-    PopStateEvent* event = static_cast<PopStateEvent*>(impl());
+    PopStateEvent* event = impl();
 
     if (!event->state().hasNoValue())
         return cacheState(exec, const_cast<JSPopStateEvent*>(this), event->state().jsValue());
index feb34d9..473eb52 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 bool JSTextTrackCueOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
 {
     JSTextTrackCue* jsTextTrackCue = jsCast<JSTextTrackCue*>(handle.get().asCell());
-    TextTrackCue* textTrackCue = static_cast<TextTrackCue*>(jsTextTrackCue->impl());
+    TextTrackCue* textTrackCue = jsTextTrackCue->impl();
 
     // If the cue is firing event listeners, its wrapper is reachable because
     // the wrapper is responsible for marking those event listeners.
@@ -65,7 +65,7 @@ void JSTextTrackCue::visitChildren(JSCell* cell, SlotVisitor& visitor)
     Base::visitChildren(jsTextTrackCue, visitor);
     
     // Mark the cue's track root if it has one.
-    TextTrackCue* textTrackCue = static_cast<TextTrackCue*>(jsTextTrackCue->impl());
+    TextTrackCue* textTrackCue = jsTextTrackCue->impl();
     if (TextTrack* textTrack = textTrackCue->track())
         visitor.addOpaqueRoot(root(textTrack));
     
index 1a962e7..7c5172a 100644 (file)
@@ -42,7 +42,7 @@ void JSTextTrack::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT(jsTextTrack->structure()->typeInfo().overridesVisitChildren());
     Base::visitChildren(jsTextTrack, visitor);
 
-    TextTrack* textTrack = static_cast<TextTrack*>(jsTextTrack->impl());
+    TextTrack* textTrack = jsTextTrack->impl();
     visitor.addOpaqueRoot(root(textTrack));
 
     textTrack->visitJSEventListeners(visitor);
index eab19a7..6c5ce8b 100644 (file)
@@ -43,7 +43,7 @@ void JSTextTrackList::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT(jsTextTrackList->structure()->typeInfo().overridesVisitChildren());
     Base::visitChildren(jsTextTrackList, visitor);
     
-    TextTrackList* textTrackList = static_cast<TextTrackList*>(jsTextTrackList->impl());
+    TextTrackList* textTrackList = jsTextTrackList->impl();
     visitor.addOpaqueRoot(root(textTrackList->element()));
     textTrackList->visitJSEventListeners(visitor);
 }
index e0c36a0..f827313 100644 (file)
@@ -38,7 +38,7 @@ namespace WebCore {
 
 JSValue JSTrackEvent::track(ExecState* exec) const
 {
-    TrackBase* track = static_cast<TrackEvent*>(impl())->track();
+    TrackBase* track = impl()->track();
     if (!track)
         return jsNull();
 
index eed843e..77cc341 100644 (file)
@@ -43,7 +43,7 @@ void JSVideoTrack::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT(jsVideoTrack->structure()->typeInfo().overridesVisitChildren());
     Base::visitChildren(jsVideoTrack, visitor);
 
-    VideoTrack* videoTrack = static_cast<VideoTrack*>(jsVideoTrack->impl());
+    VideoTrack* videoTrack = jsVideoTrack->impl();
     visitor.addOpaqueRoot(root(videoTrack));
 }
 
index e96a185..fb9ab47 100644 (file)
@@ -43,7 +43,7 @@ void JSVideoTrackList::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT(jsVideoTrackList->structure()->typeInfo().overridesVisitChildren());
     Base::visitChildren(jsVideoTrackList, visitor);
 
-    VideoTrackList* videoTrackList = static_cast<VideoTrackList*>(jsVideoTrackList->impl());
+    VideoTrackList* videoTrackList = jsVideoTrackList->impl();
     visitor.addOpaqueRoot(root(videoTrackList->element()));
     videoTrackList->visitJSEventListeners(visitor);
 }
index 052c00a..9506844 100644 (file)
@@ -155,7 +155,7 @@ static JSValue getObjectParameter(JSWebGLRenderingContext* obj, ExecState* exec,
         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(obj->impl());
+    WebGLRenderingContext* context = obj->impl();
     unsigned target = exec->uncheckedArgument(0).toInt32(exec);
     if (exec->hadException())
         return jsUndefined();
@@ -245,7 +245,7 @@ JSValue JSWebGLRenderingContext::getAttachedShaders(ExecState* exec)
     if (exec->argumentCount() < 1)
         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    WebGLRenderingContext* context = impl();
     WebGLProgram* program = toWebGLProgram(exec->uncheckedArgument(0));
     if (!program && !exec->uncheckedArgument(0).isUndefinedOrNull())
         return throwTypeError(exec);
@@ -268,7 +268,7 @@ JSValue JSWebGLRenderingContext::getExtension(ExecState* exec)
     if (exec->argumentCount() < 1)
         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
 
-    WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    WebGLRenderingContext* context = impl();
     const String name = exec->uncheckedArgument(0).toString(exec)->value(exec);
     if (exec->hadException())
         return jsUndefined();
@@ -287,7 +287,7 @@ JSValue JSWebGLRenderingContext::getFramebufferAttachmentParameter(ExecState* ex
         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    WebGLRenderingContext* context = impl();
     unsigned target = exec->uncheckedArgument(0).toInt32(exec);
     if (exec->hadException())
         return jsUndefined();
@@ -311,7 +311,7 @@ JSValue JSWebGLRenderingContext::getParameter(ExecState* exec)
         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    WebGLRenderingContext* context = impl();
     unsigned pname = exec->uncheckedArgument(0).toInt32(exec);
     if (exec->hadException())
         return jsUndefined();
@@ -329,7 +329,7 @@ JSValue JSWebGLRenderingContext::getProgramParameter(ExecState* exec)
         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    WebGLRenderingContext* context = impl();
     WebGLProgram* program = toWebGLProgram(exec->uncheckedArgument(0));
     if (!program && !exec->uncheckedArgument(0).isUndefinedOrNull())
         return throwTypeError(exec);
@@ -355,7 +355,7 @@ JSValue JSWebGLRenderingContext::getShaderParameter(ExecState* exec)
         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    WebGLRenderingContext* context = impl();
     if (!exec->uncheckedArgument(0).isUndefinedOrNull() && !exec->uncheckedArgument(0).inherits(JSWebGLShader::info()))
         return throwTypeError(exec);
     WebGLShader* shader = toWebGLShader(exec->uncheckedArgument(0));
@@ -372,7 +372,7 @@ JSValue JSWebGLRenderingContext::getShaderParameter(ExecState* exec)
 
 JSValue JSWebGLRenderingContext::getSupportedExtensions(ExecState* exec)
 {
-    WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    WebGLRenderingContext* context = impl();
     if (context->isContextLost())
         return jsNull();
     Vector<String> value = context->getSupportedExtensions();
@@ -393,7 +393,7 @@ JSValue JSWebGLRenderingContext::getUniform(ExecState* exec)
         return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
 
     ExceptionCode ec = 0;
-    WebGLRenderingContext* context = static_cast<WebGLRenderingContext*>(impl());
+    WebGLRenderingContext* context = impl();
     WebGLProgram* program = toWebGLProgram(exec->uncheckedArgument(0));
     if (!program && !exec->uncheckedArgument(0).isUndefinedOrNull())
         return throwTypeError(exec);
@@ -664,77 +664,77 @@ static JSC::JSValue dataFunctionMatrix(DataFunctionMatrixToCall f, JSC::ExecStat
 
 JSC::JSValue JSWebGLRenderingContext::uniform1fv(JSC::ExecState* exec)
 {
-    return dataFunctionf(f_uniform1v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionf(f_uniform1v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniform1iv(JSC::ExecState* exec)
 {
-    return dataFunctioni(f_uniform1v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctioni(f_uniform1v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniform2fv(JSC::ExecState* exec)
 {
-    return dataFunctionf(f_uniform2v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionf(f_uniform2v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniform2iv(JSC::ExecState* exec)
 {
-    return dataFunctioni(f_uniform2v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctioni(f_uniform2v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniform3fv(JSC::ExecState* exec)
 {
-    return dataFunctionf(f_uniform3v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionf(f_uniform3v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniform3iv(JSC::ExecState* exec)
 {
-    return dataFunctioni(f_uniform3v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctioni(f_uniform3v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniform4fv(JSC::ExecState* exec)
 {
-    return dataFunctionf(f_uniform4v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionf(f_uniform4v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniform4iv(JSC::ExecState* exec)
 {
-    return dataFunctioni(f_uniform4v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctioni(f_uniform4v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniformMatrix2fv(JSC::ExecState* exec)
 {
-    return dataFunctionMatrix(f_uniformMatrix2fv, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionMatrix(f_uniformMatrix2fv, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniformMatrix3fv(JSC::ExecState* exec)
 {
-    return dataFunctionMatrix(f_uniformMatrix3fv, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionMatrix(f_uniformMatrix3fv, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::uniformMatrix4fv(JSC::ExecState* exec)
 {
-    return dataFunctionMatrix(f_uniformMatrix4fv, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionMatrix(f_uniformMatrix4fv, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::vertexAttrib1fv(JSC::ExecState* exec)
 {
-    return dataFunctionf(f_vertexAttrib1v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionf(f_vertexAttrib1v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::vertexAttrib2fv(JSC::ExecState* exec)
 {
-    return dataFunctionf(f_vertexAttrib2v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionf(f_vertexAttrib2v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::vertexAttrib3fv(JSC::ExecState* exec)
 {
-    return dataFunctionf(f_vertexAttrib3v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionf(f_vertexAttrib3v, exec, impl());
 }
 
 JSC::JSValue JSWebGLRenderingContext::vertexAttrib4fv(JSC::ExecState* exec)
 {
-    return dataFunctionf(f_vertexAttrib4v, exec, static_cast<WebGLRenderingContext*>(impl()));
+    return dataFunctionf(f_vertexAttrib4v, exec, impl());
 }
 
 } // namespace WebCore
index 8e83e4a..e3554d9 100644 (file)
@@ -391,7 +391,7 @@ sub GenerateGetOwnPropertySlotBody
         if ($indexedGetterFunction->signature->type eq "DOMString") {
             push(@getOwnPropertySlotImpl, "    if (index != PropertyName::NotAnIndex) {\n");
         } else {
-            push(@getOwnPropertySlotImpl, "    if (index != PropertyName::NotAnIndex && index < static_cast<$interfaceName*>(thisObject->impl())->length()) {\n");
+            push(@getOwnPropertySlotImpl, "    if (index != PropertyName::NotAnIndex && index < thisObject->impl()->length()) {\n");
         }
         # Assume that if there's a setter, the index will be writable
         if ($interface->extendedAttributes->{"CustomIndexedSetter"}) {
@@ -409,7 +409,7 @@ sub GenerateGetOwnPropertySlotBody
     }
 
     if ($namedGetterFunction || $interface->extendedAttributes->{"CustomNamedGetter"}) {
-        push(@getOwnPropertySlotImpl, "    if (canGetItemsForName(exec, static_cast<$interfaceName*>(thisObject->impl()), propertyName)) {\n");
+        push(@getOwnPropertySlotImpl, "    if (canGetItemsForName(exec, thisObject->impl(), propertyName)) {\n");
         push(@getOwnPropertySlotImpl, "        slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter);\n");
         push(@getOwnPropertySlotImpl, "        return true;\n");
         push(@getOwnPropertySlotImpl, "    }\n");
@@ -863,7 +863,7 @@ sub GenerateHeader
         push(@headerContent, "    }\n\n");
         push(@headerContent, "private:\n");
         push(@headerContent, "    $implType* m_impl;\n");
-    } elsif ($interface->extendedAttributes->{"JSGenerateToNativeObject"}) {
+    } else {
         push(@headerContent, "    $interfaceName* impl() const\n");
         push(@headerContent, "    {\n");
         push(@headerContent, "        return static_cast<$interfaceName*>(Base::impl());\n");
@@ -1820,7 +1820,7 @@ sub GenerateImplementation
                 if ($indexedGetterFunction->signature->type eq "DOMString") {
                     push(@implContent, "    if (index <= MAX_ARRAY_INDEX) {\n");
                 } else {
-                    push(@implContent, "    if (index < static_cast<$interfaceName*>(thisObject->impl())->length()) {\n");
+                    push(@implContent, "    if (index < thisObject->impl()->length()) {\n");
                 }
                 # Assume that if there's a setter, the index will be writable
                 if ($interface->extendedAttributes->{"CustomIndexedSetter"}) {
@@ -1839,7 +1839,7 @@ sub GenerateImplementation
 
             if ($namedGetterFunction || $interface->extendedAttributes->{"CustomNamedGetter"}) {
                 &$propertyNameGeneration();
-                push(@implContent, "    if (canGetItemsForName(exec, static_cast<$interfaceName*>(thisObject->impl()), propertyName)) {\n");
+                push(@implContent, "    if (canGetItemsForName(exec, thisObject->impl(), propertyName)) {\n");
                 push(@implContent, "        slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter);\n");
                 push(@implContent, "        return true;\n");
                 push(@implContent, "    }\n");
@@ -1912,12 +1912,12 @@ sub GenerateImplementation
                     push(@implContent, "    return castedThis->$implGetterFunctionName(exec);\n");
                 } elsif ($attribute->signature->extendedAttributes->{"CheckSecurityForNode"}) {
                     $implIncludes{"JSDOMBinding.h"} = 1;
-                    push(@implContent, "    $interfaceName* impl = static_cast<$interfaceName*>(castedThis->impl());\n");
+                    push(@implContent, "    $interfaceName* impl = castedThis->impl();\n");
                     push(@implContent, "    return shouldAllowAccessToNode(exec, impl->" . $attribute->signature->name . "()) ? " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl->$implGetterFunctionName()", "castedThis") . " : jsNull();\n");
                 } elsif ($type eq "EventListener") {
                     $implIncludes{"EventListener.h"} = 1;
                     push(@implContent, "    UNUSED_PARAM(exec);\n");
-                    push(@implContent, "    $interfaceName* impl = static_cast<$interfaceName*>(castedThis->impl());\n");
+                    push(@implContent, "    $interfaceName* impl = castedThis->impl();\n");
                     push(@implContent, "    if (EventListener* listener = impl->$implGetterFunctionName()) {\n");
                     push(@implContent, "        if (const JSEventListener* jsListener = JSEventListener::cast(listener)) {\n");
                     if ($interfaceName eq "Document" || $codeGenerator->InheritsInterface($interface, "WorkerGlobalScope")) {
@@ -1982,7 +1982,7 @@ sub GenerateImplementation
 
                         unshift(@arguments, @callWithArgs);
                         my $jsType = NativeToJSValue($attribute->signature, 0, $interfaceName, "${functionName}(" . join(", ", @arguments) . ")", "castedThis");
-                        push(@implContent, "    $interfaceName* impl = static_cast<$interfaceName*>(castedThis->impl());\n") if !$attribute->isStatic;
+                        push(@implContent, "    $interfaceName* impl = castedThis->impl();\n") if !$attribute->isStatic;
                         if ($codeGenerator->IsSVGAnimatedType($type)) {
                             push(@implContent, "    RefPtr<$type> obj = $jsType;\n");
                             push(@implContent, "    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());\n");
@@ -2014,7 +2014,7 @@ sub GenerateImplementation
                         push(@implContent, "    $svgPropertyOrListPropertyType impl(*castedThis->impl());\n");
                         push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl.$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
                     } else {
-                        push(@implContent, "    $interfaceName* impl = static_cast<$interfaceName*>(castedThis->impl());\n");
+                        push(@implContent, "    $interfaceName* impl = castedThis->impl();\n");
                         push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $interfaceName, "impl->$implGetterFunctionName(" . join(", ", @arguments) . ")", "castedThis") . ";\n");
                     }
 
@@ -2151,7 +2151,7 @@ sub GenerateImplementation
                                 if ($windowEventListener) {
                                     push(@implContent, "    JSDOMGlobalObject* globalObject = castedThis->globalObject();\n");
                                 }
-                                push(@implContent, "    $interfaceName* impl = static_cast<$interfaceName*>(castedThis->impl());\n");
+                                push(@implContent, "    $interfaceName* impl = castedThis->impl();\n");
                                 if ((($interfaceName eq "DOMWindow") or ($interfaceName eq "WorkerGlobalScope")) and $name eq "onerror") {
                                     $implIncludes{"JSErrorHandler.h"} = 1;
                                     push(@implContent, "    impl->set$implSetterFunctionName(createJSErrorHandler(exec, value, thisObject));\n");
@@ -2180,7 +2180,7 @@ sub GenerateImplementation
                             } else {
                                 if (!$attribute->isStatic) {
                                     push(@implContent, "    $className* castedThis = jsCast<$className*>(thisObject);\n");
-                                    push(@implContent, "    $implType* impl = static_cast<$implType*>(castedThis->impl());\n");
+                                    push(@implContent, "    $implType* impl = castedThis->impl();\n");
                                 }
                                 push(@implContent, "    ExceptionCode ec = 0;\n") if $setterRaisesException;
 
@@ -2305,7 +2305,7 @@ sub GenerateImplementation
         push(@implContent, "{\n");
         push(@implContent, "    ${className}* thisObject = jsCast<${className}*>(object);\n");
         push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
-        push(@implContent, "    for (unsigned i = 0; i < static_cast<${interfaceName}*>(thisObject->impl())->length(); ++i)\n");
+        push(@implContent, "    for (unsigned i = 0; i < thisObject->impl()->length(); ++i)\n");
         push(@implContent, "        propertyNames.add(Identifier::from(exec, i));\n");
         push(@implContent, "     Base::getOwnPropertyNames(thisObject, exec, propertyNames, mode);\n");
         push(@implContent, "}\n\n");
@@ -2398,7 +2398,7 @@ sub GenerateImplementation
                 if ($isCustom) {
                     push(@implContent, "    return JSValue::encode(castedThis->" . $functionImplementationName . "(exec));\n");
                 } else {
-                    push(@implContent, "    $implType* impl = static_cast<$implType*>(castedThis->impl());\n");
+                    push(@implContent, "    $implType* impl = castedThis->impl();\n");
                     if ($svgPropertyType) {
                         push(@implContent, "    if (impl->isReadOnly()) {\n");
                         push(@implContent, "        setDOMException(exec, NO_MODIFICATION_ALLOWED_ERR);\n");
@@ -2504,7 +2504,7 @@ sub GenerateImplementation
             $implIncludes{"KURL.h"} = 1;
             push(@implContent, "    return jsStringOrUndefined(exec, thisObj->impl()->item(index));\n");
         } else {
-            push(@implContent, "    return toJS(exec, thisObj->globalObject(), static_cast<$interfaceName*>(thisObj->impl())->item(index));\n");
+            push(@implContent, "    return toJS(exec, thisObj->globalObject(), thisObj->impl()->item(index));\n");
         }
         push(@implContent, "}\n\n");
         if ($interfaceName =~ /^HTML\w*Collection$/ or $interfaceName eq "RadioNodeList") {
@@ -2517,7 +2517,7 @@ sub GenerateImplementation
         push(@implContent, "\nJSValue ${className}::getByIndex(ExecState*, unsigned index)\n");
         push(@implContent, "{\n");
         push(@implContent, "    ASSERT_GC_OBJECT_INHERITS(this, info());\n");
-        push(@implContent, "    double result = static_cast<$interfaceName*>(impl())->item(index);\n");
+        push(@implContent, "    double result = impl()->item(index);\n");
         # jsNumber conversion doesn't suppress signalling NaNs, so enforce that here.
         push(@implContent, "    if (std::isnan(result))\n");
         push(@implContent, "        return jsNaN();\n");
@@ -2538,7 +2538,7 @@ sub GenerateImplementation
             push(@implContent, "JSValue ${className}::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)\n");
             push(@implContent, "{\n");
             push(@implContent, "    ${className}* thisObj = jsCast<$className*>(asObject(slotBase));\n");
-            push(@implContent, "    return toJS(exec, thisObj->globalObject(), static_cast<$interfaceName*>(thisObj->impl())->namedItem(propertyNameToAtomicString(propertyName)));\n");
+            push(@implContent, "    return toJS(exec, thisObj->globalObject(), thisObj->impl()->namedItem(propertyNameToAtomicString(propertyName)));\n");
             push(@implContent, "}\n\n");
         }
     }
index e41bab7..bf1ae7a 100644 (file)
@@ -137,7 +137,7 @@ JSValue jsTestActiveDOMObjectExcitingAttr(ExecState* exec, JSValue slotBase, Pro
     if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
         return jsUndefined();
     UNUSED_PARAM(exec);
-    TestActiveDOMObject* impl = static_cast<TestActiveDOMObject*>(castedThis->impl());
+    TestActiveDOMObject* impl = castedThis->impl();
     JSValue result = jsNumber(impl->excitingAttr());
     return result;
 }
@@ -165,7 +165,7 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunct
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
     if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
         return JSValue::encode(jsUndefined());
-    TestActiveDOMObject* impl = static_cast<TestActiveDOMObject*>(castedThis->impl());
+    TestActiveDOMObject* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Node* nextChild(toNode(exec->argument(0)));
@@ -182,7 +182,7 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionPostMessage(E
         return throwVMTypeError(exec);
     JSTestActiveDOMObject* castedThis = jsCast<JSTestActiveDOMObject*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
-    TestActiveDOMObject* impl = static_cast<TestActiveDOMObject*>(castedThis->impl());
+    TestActiveDOMObject* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& message(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
index 91d1eff..f814464 100644 (file)
@@ -125,7 +125,7 @@ bool JSTestCustomNamedGetter::getOwnPropertySlot(JSObject* object, ExecState* ex
 {
     JSTestCustomNamedGetter* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
-    if (canGetItemsForName(exec, static_cast<TestCustomNamedGetter*>(thisObject->impl()), propertyName)) {
+    if (canGetItemsForName(exec, thisObject->impl(), propertyName)) {
         slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter);
         return true;
     }
@@ -137,7 +137,7 @@ bool JSTestCustomNamedGetter::getOwnPropertySlotByIndex(JSObject* object, ExecSt
     JSTestCustomNamedGetter* thisObject = jsCast<JSTestCustomNamedGetter*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     PropertyName propertyName = Identifier::from(exec, index);
-    if (canGetItemsForName(exec, static_cast<TestCustomNamedGetter*>(thisObject->impl()), propertyName)) {
+    if (canGetItemsForName(exec, thisObject->impl(), propertyName)) {
         slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter);
         return true;
     }
@@ -162,7 +162,7 @@ EncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunc
         return throwVMTypeError(exec);
     JSTestCustomNamedGetter* castedThis = jsCast<JSTestCustomNamedGetter*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestCustomNamedGetter::info());
-    TestCustomNamedGetter* impl = static_cast<TestCustomNamedGetter*>(castedThis->impl());
+    TestCustomNamedGetter* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& str(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
index d42dc1e..87615ea 100644 (file)
@@ -171,7 +171,7 @@ JSValue jsTestEventConstructorAttr1(ExecState* exec, JSValue slotBase, PropertyN
 {
     JSTestEventConstructor* castedThis = jsCast<JSTestEventConstructor*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestEventConstructor* impl = static_cast<TestEventConstructor*>(castedThis->impl());
+    TestEventConstructor* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->attr1());
     return result;
 }
@@ -181,7 +181,7 @@ JSValue jsTestEventConstructorAttr2(ExecState* exec, JSValue slotBase, PropertyN
 {
     JSTestEventConstructor* castedThis = jsCast<JSTestEventConstructor*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestEventConstructor* impl = static_cast<TestEventConstructor*>(castedThis->impl());
+    TestEventConstructor* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->attr2());
     return result;
 }
index cae3a47..4c13bd8 100644 (file)
@@ -140,12 +140,12 @@ bool JSTestEventTarget::getOwnPropertySlot(JSObject* object, ExecState* exec, Pr
         return true;
     }
     unsigned index = propertyName.asIndex();
-    if (index != PropertyName::NotAnIndex && index < static_cast<TestEventTarget*>(thisObject->impl())->length()) {
+    if (index != PropertyName::NotAnIndex && index < thisObject->impl()->length()) {
         unsigned attributes = DontDelete | ReadOnly;
         slot.setCustomIndex(thisObject, attributes, index, indexGetter);
         return true;
     }
-    if (canGetItemsForName(exec, static_cast<TestEventTarget*>(thisObject->impl()), propertyName)) {
+    if (canGetItemsForName(exec, thisObject->impl(), propertyName)) {
         slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter);
         return true;
     }
@@ -156,13 +156,13 @@ bool JSTestEventTarget::getOwnPropertySlotByIndex(JSObject* object, ExecState* e
 {
     JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
-    if (index < static_cast<TestEventTarget*>(thisObject->impl())->length()) {
+    if (index < thisObject->impl()->length()) {
         unsigned attributes = DontDelete | ReadOnly;
         slot.setCustomIndex(thisObject, attributes, index, thisObject->indexGetter);
         return true;
     }
     PropertyName propertyName = Identifier::from(exec, index);
-    if (canGetItemsForName(exec, static_cast<TestEventTarget*>(thisObject->impl()), propertyName)) {
+    if (canGetItemsForName(exec, thisObject->impl(), propertyName)) {
         slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter);
         return true;
     }
@@ -179,7 +179,7 @@ void JSTestEventTarget::getOwnPropertyNames(JSObject* object, ExecState* exec, P
 {
     JSTestEventTarget* thisObject = jsCast<JSTestEventTarget*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
-    for (unsigned i = 0; i < static_cast<TestEventTarget*>(thisObject->impl())->length(); ++i)
+    for (unsigned i = 0; i < thisObject->impl()->length(); ++i)
         propertyNames.add(Identifier::from(exec, i));
      Base::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
 }
@@ -196,7 +196,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionItem(ExecState* e
         return throwVMTypeError(exec);
     JSTestEventTarget* castedThis = jsCast<JSTestEventTarget*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
-    TestEventTarget* impl = static_cast<TestEventTarget*>(castedThis->impl());
+    TestEventTarget* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int index(toUInt32(exec, exec->argument(0), NormalConversion));
@@ -218,7 +218,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionAddEventListener(
         return throwVMTypeError(exec);
     JSTestEventTarget* castedThis = jsCast<JSTestEventTarget*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
-    TestEventTarget* impl = static_cast<TestEventTarget*>(castedThis->impl());
+    TestEventTarget* impl = castedThis->impl();
     JSValue listener = exec->argument(1);
     if (!listener.isObject())
         return JSValue::encode(jsUndefined());
@@ -233,7 +233,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionRemoveEventListen
         return throwVMTypeError(exec);
     JSTestEventTarget* castedThis = jsCast<JSTestEventTarget*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
-    TestEventTarget* impl = static_cast<TestEventTarget*>(castedThis->impl());
+    TestEventTarget* impl = castedThis->impl();
     JSValue listener = exec->argument(1);
     if (!listener.isObject())
         return JSValue::encode(jsUndefined());
@@ -248,7 +248,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionDispatchEvent(Exe
         return throwVMTypeError(exec);
     JSTestEventTarget* castedThis = jsCast<JSTestEventTarget*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestEventTarget::info());
-    TestEventTarget* impl = static_cast<TestEventTarget*>(castedThis->impl());
+    TestEventTarget* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -276,7 +276,7 @@ JSValue JSTestEventTarget::indexGetter(ExecState* exec, JSValue slotBase, unsign
 {
     JSTestEventTarget* thisObj = jsCast<JSTestEventTarget*>(asObject(slotBase));
     ASSERT_GC_OBJECT_INHERITS(thisObj, info());
-    return toJS(exec, thisObj->globalObject(), static_cast<TestEventTarget*>(thisObj->impl())->item(index));
+    return toJS(exec, thisObj->globalObject(), thisObj->impl()->item(index));
 }
 
 static inline bool isObservable(JSTestEventTarget* jsTestEventTarget)
index 3f845dd..526880f 100644 (file)
@@ -124,7 +124,7 @@ JSValue jsTestExceptionName(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestException* castedThis = jsCast<JSTestException*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestException* impl = static_cast<TestException*>(castedThis->impl());
+    TestException* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->name());
     return result;
 }
index d8b95b4..6fe4c7a 100644 (file)
@@ -298,7 +298,7 @@ JSValue jsTestInterfaceImplementsStr1(ExecState* exec, JSValue slotBase, Propert
 {
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->implementsStr1());
     return result;
 }
@@ -310,7 +310,7 @@ JSValue jsTestInterfaceImplementsStr2(ExecState* exec, JSValue slotBase, Propert
 {
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->implementsStr2());
     return result;
 }
@@ -331,7 +331,7 @@ JSValue jsTestInterfaceImplementsNode(ExecState* exec, JSValue slotBase, Propert
 {
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->implementsNode()));
     return result;
 }
@@ -365,7 +365,7 @@ JSValue jsTestInterfaceSupplementalStr1(ExecState* exec, JSValue slotBase, Prope
 {
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, TestSupplemental::supplementalStr1(impl));
     return result;
 }
@@ -377,7 +377,7 @@ JSValue jsTestInterfaceSupplementalStr2(ExecState* exec, JSValue slotBase, Prope
 {
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, TestSupplemental::supplementalStr2(impl));
     return result;
 }
@@ -398,7 +398,7 @@ JSValue jsTestInterfaceSupplementalNode(ExecState* exec, JSValue slotBase, Prope
 {
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalNode(impl)));
     return result;
 }
@@ -448,7 +448,7 @@ void setJSTestInterfaceImplementsStr2(ExecState* exec, JSObject* thisObject, JSV
 {
     UNUSED_PARAM(exec);
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (exec->hadException())
         return;
@@ -471,7 +471,7 @@ void setJSTestInterfaceImplementsNode(ExecState* exec, JSObject* thisObject, JSV
 {
     UNUSED_PARAM(exec);
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     Node* nativeValue(toNode(value));
     if (exec->hadException())
         return;
@@ -497,7 +497,7 @@ void setJSTestInterfaceSupplementalStr2(ExecState* exec, JSObject* thisObject, J
 {
     UNUSED_PARAM(exec);
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (exec->hadException())
         return;
@@ -520,7 +520,7 @@ void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* thisObject, J
 {
     UNUSED_PARAM(exec);
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject);
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     Node* nativeValue(toNode(value));
     if (exec->hadException())
         return;
@@ -542,7 +542,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod1(E
         return throwVMTypeError(exec);
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     impl->implementsMethod1();
     return JSValue::encode(jsUndefined());
 }
@@ -557,7 +557,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod2(E
         return throwVMTypeError(exec);
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     if (exec->argumentCount() < 2)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -608,7 +608,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1
         return throwVMTypeError(exec);
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     TestSupplemental::supplementalMethod1(impl);
     return JSValue::encode(jsUndefined());
 }
@@ -623,7 +623,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod2
         return throwVMTypeError(exec);
     JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
-    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
+    TestInterface* impl = castedThis->impl();
     if (exec->argumentCount() < 2)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
index cfc801a..ef567e0 100644 (file)
@@ -146,7 +146,7 @@ EncodedJSValue JSC_HOST_CALL jsTestMediaQueryListListenerPrototypeFunctionMethod
         return throwVMTypeError(exec);
     JSTestMediaQueryListListener* castedThis = jsCast<JSTestMediaQueryListListener*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestMediaQueryListListener::info());
-    TestMediaQueryListListener* impl = static_cast<TestMediaQueryListListener*>(castedThis->impl());
+    TestMediaQueryListListener* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     if (!exec->argument(0).isFunction())
index 79c24b1..b50e137 100644 (file)
@@ -50,6 +50,10 @@ public:
     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
     static void visitChildren(JSCell*, JSC::SlotVisitor&);
 
+    TestNode* impl() const
+    {
+        return static_cast<TestNode*>(Base::impl());
+    }
 protected:
     JSTestNode(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestNode>);
     void finishCreation(JSC::VM&);
index 5ccef93..b588c58 100644 (file)
@@ -390,7 +390,7 @@ JSValue jsTestObjReadOnlyLongAttr(ExecState* exec, JSValue slotBase, PropertyNam
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->readOnlyLongAttr());
     return result;
 }
@@ -400,7 +400,7 @@ JSValue jsTestObjReadOnlyStringAttr(ExecState* exec, JSValue slotBase, PropertyN
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->readOnlyStringAttr());
     return result;
 }
@@ -410,7 +410,7 @@ JSValue jsTestObjReadOnlyTestObjAttr(ExecState* exec, JSValue slotBase, Property
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->readOnlyTestObjAttr()));
     return result;
 }
@@ -457,7 +457,7 @@ JSValue jsTestObjEnumAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->enumAttr());
     return result;
 }
@@ -467,7 +467,7 @@ JSValue jsTestObjByteAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->byteAttr());
     return result;
 }
@@ -477,7 +477,7 @@ JSValue jsTestObjOctetAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->octetAttr());
     return result;
 }
@@ -487,7 +487,7 @@ JSValue jsTestObjShortAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->shortAttr());
     return result;
 }
@@ -497,7 +497,7 @@ JSValue jsTestObjUnsignedShortAttr(ExecState* exec, JSValue slotBase, PropertyNa
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->unsignedShortAttr());
     return result;
 }
@@ -507,7 +507,7 @@ JSValue jsTestObjLongAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->longAttr());
     return result;
 }
@@ -517,7 +517,7 @@ JSValue jsTestObjLongLongAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->longLongAttr());
     return result;
 }
@@ -527,7 +527,7 @@ JSValue jsTestObjUnsignedLongLongAttr(ExecState* exec, JSValue slotBase, Propert
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->unsignedLongLongAttr());
     return result;
 }
@@ -537,7 +537,7 @@ JSValue jsTestObjStringAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->stringAttr());
     return result;
 }
@@ -547,7 +547,7 @@ JSValue jsTestObjTestObjAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->testObjAttr()));
     return result;
 }
@@ -557,7 +557,7 @@ JSValue jsTestObjXMLObjAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->xmlObjAttr()));
     return result;
 }
@@ -567,7 +567,7 @@ JSValue jsTestObjCreate(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsBoolean(impl->isCreate());
     return result;
 }
@@ -577,7 +577,7 @@ JSValue jsTestObjReflectedStringAttr(ExecState* exec, JSValue slotBase, Property
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->fastGetAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
     return result;
 }
@@ -587,7 +587,7 @@ JSValue jsTestObjReflectedIntegralAttr(ExecState* exec, JSValue slotBase, Proper
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
     return result;
 }
@@ -597,7 +597,7 @@ JSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSValue slotBase
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(std::max(0, impl->getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
     return result;
 }
@@ -607,7 +607,7 @@ JSValue jsTestObjReflectedBooleanAttr(ExecState* exec, JSValue slotBase, Propert
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsBoolean(impl->fastHasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
     return result;
 }
@@ -617,7 +617,7 @@ JSValue jsTestObjReflectedURLAttr(ExecState* exec, JSValue slotBase, PropertyNam
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
     return result;
 }
@@ -627,7 +627,7 @@ JSValue jsTestObjReflectedStringAttr(ExecState* exec, JSValue slotBase, Property
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->fastGetAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
     return result;
 }
@@ -637,7 +637,7 @@ JSValue jsTestObjReflectedCustomIntegralAttr(ExecState* exec, JSValue slotBase,
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr));
     return result;
 }
@@ -647,7 +647,7 @@ JSValue jsTestObjReflectedCustomBooleanAttr(ExecState* exec, JSValue slotBase, P
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsBoolean(impl->fastHasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr));
     return result;
 }
@@ -657,7 +657,7 @@ JSValue jsTestObjReflectedCustomURLAttr(ExecState* exec, JSValue slotBase, Prope
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
     return result;
 }
@@ -667,7 +667,7 @@ JSValue jsTestObjTypedArrayAttr(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->typedArrayAttr()));
     return result;
 }
@@ -677,7 +677,7 @@ JSValue jsTestObjAttrWithGetterException(ExecState* exec, JSValue slotBase, Prop
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     ExceptionCode ec = 0;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSC::JSValue result = jsNumber(impl->attrWithGetterException(ec));
     setDOMException(exec, ec);
     return result;
@@ -688,7 +688,7 @@ JSValue jsTestObjAttrWithSetterException(ExecState* exec, JSValue slotBase, Prop
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->attrWithSetterException());
     return result;
 }
@@ -698,7 +698,7 @@ JSValue jsTestObjStringAttrWithGetterException(ExecState* exec, JSValue slotBase
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     ExceptionCode ec = 0;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSC::JSValue result = jsStringWithCache(exec, impl->stringAttrWithGetterException(ec));
     setDOMException(exec, ec);
     return result;
@@ -709,7 +709,7 @@ JSValue jsTestObjStringAttrWithSetterException(ExecState* exec, JSValue slotBase
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->stringAttrWithSetterException());
     return result;
 }
@@ -725,7 +725,7 @@ JSValue jsTestObjCustomAttr(ExecState* exec, JSValue slotBase, PropertyName)
 JSValue jsTestObjWithScriptStateAttribute(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->withScriptStateAttribute(exec));
     return result;
 }
@@ -737,7 +737,7 @@ JSValue jsTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSValue sl
     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return jsUndefined();
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAttribute(scriptContext)));
     return result;
 }
@@ -747,7 +747,7 @@ JSValue jsTestObjWithScriptStateAttributeRaises(ExecState* exec, JSValue slotBas
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     ExceptionCode ec = 0;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptStateAttributeRaises(exec, ec)));
     setDOMException(exec, ec);
     return result;
@@ -761,7 +761,7 @@ JSValue jsTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSVa
     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return jsUndefined();
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAttributeRaises(scriptContext, ec)));
     setDOMException(exec, ec);
     return result;
@@ -774,7 +774,7 @@ JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* ex
     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return jsUndefined();
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateAttribute(exec, scriptContext)));
     return result;
 }
@@ -787,7 +787,7 @@ JSValue jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecSta
     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return jsUndefined();
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateAttributeRaises(exec, scriptContext, ec)));
     setDOMException(exec, ec);
     return result;
@@ -800,7 +800,7 @@ JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(Exe
     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return jsUndefined();
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptExecutionContextAndScriptStateWithSpacesAttribute(exec, scriptContext)));
     return result;
 }
@@ -809,7 +809,7 @@ JSValue jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(Exe
 JSValue jsTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptArgumentsAndCallStackAttribute()));
     return result;
 }
@@ -820,7 +820,7 @@ JSValue jsTestObjConditionalAttr1(ExecState* exec, JSValue slotBase, PropertyNam
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->conditionalAttr1());
     return result;
 }
@@ -832,7 +832,7 @@ JSValue jsTestObjConditionalAttr2(ExecState* exec, JSValue slotBase, PropertyNam
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->conditionalAttr2());
     return result;
 }
@@ -844,7 +844,7 @@ JSValue jsTestObjConditionalAttr3(ExecState* exec, JSValue slotBase, PropertyNam
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->conditionalAttr3());
     return result;
 }
@@ -884,7 +884,7 @@ JSValue jsTestObjCachedAttribute1(ExecState* exec, JSValue slotBase, PropertyNam
     UNUSED_PARAM(exec);
     if (JSValue cachedValue = castedThis->m_cachedAttribute1.get())
         return cachedValue;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = (impl->cachedAttribute1().hasNoValue() ? jsNull() : impl->cachedAttribute1().jsValue());
     castedThis->m_cachedAttribute1.set(exec->vm(), castedThis, result);
     return result;
@@ -897,7 +897,7 @@ JSValue jsTestObjCachedAttribute2(ExecState* exec, JSValue slotBase, PropertyNam
     UNUSED_PARAM(exec);
     if (JSValue cachedValue = castedThis->m_cachedAttribute2.get())
         return cachedValue;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = (impl->cachedAttribute2().hasNoValue() ? jsNull() : impl->cachedAttribute2().jsValue());
     castedThis->m_cachedAttribute2.set(exec->vm(), castedThis, result);
     return result;
@@ -908,7 +908,7 @@ JSValue jsTestObjAnyAttribute(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = (impl->anyAttribute().hasNoValue() ? jsNull() : impl->anyAttribute().jsValue());
     return result;
 }
@@ -917,7 +917,7 @@ JSValue jsTestObjAnyAttribute(ExecState* exec, JSValue slotBase, PropertyName)
 JSValue jsTestObjContentDocument(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     return shouldAllowAccessToNode(exec, impl->contentDocument()) ? toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->contentDocument())) : jsNull();
 }
 
@@ -926,7 +926,7 @@ JSValue jsTestObjMutablePoint(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGStaticPropertyTearOff<TestObj, SVGPoint>::create(impl, impl->mutablePoint(), &TestObj::updateMutablePoint)));
     return result;
 }
@@ -936,7 +936,7 @@ JSValue jsTestObjImmutablePoint(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl->immutablePoint())));
     return result;
 }
@@ -946,7 +946,7 @@ JSValue jsTestObjStrawberry(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->blueberry());
     return result;
 }
@@ -956,7 +956,7 @@ JSValue jsTestObjStrictFloat(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->strictFloat());
     return result;
 }
@@ -966,7 +966,7 @@ JSValue jsTestObjDescription(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->description());
     return result;
 }
@@ -976,7 +976,7 @@ JSValue jsTestObjId(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->id());
     return result;
 }
@@ -986,7 +986,7 @@ JSValue jsTestObjHash(ExecState* exec, JSValue slotBase, PropertyName)
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->hash());
     return result;
 }
@@ -996,7 +996,7 @@ JSValue jsTestObjReplaceableAttribute(ExecState* exec, JSValue slotBase, Propert
 {
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->replaceableAttribute());
     return result;
 }
@@ -1007,7 +1007,7 @@ JSValue jsTestObjNullableDoubleAttribute(ExecState* exec, JSValue slotBase, Prop
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     bool isNull = false;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->nullableDoubleAttribute(isNull));
     if (isNull)
         return jsNull();
@@ -1020,7 +1020,7 @@ JSValue jsTestObjNullableLongAttribute(ExecState* exec, JSValue slotBase, Proper
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     bool isNull = false;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->nullableLongAttribute(isNull));
     if (isNull)
         return jsNull();
@@ -1033,7 +1033,7 @@ JSValue jsTestObjNullableBooleanAttribute(ExecState* exec, JSValue slotBase, Pro
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     bool isNull = false;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsBoolean(impl->nullableBooleanAttribute(isNull));
     if (isNull)
         return jsNull();
@@ -1046,7 +1046,7 @@ JSValue jsTestObjNullableStringAttribute(ExecState* exec, JSValue slotBase, Prop
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     bool isNull = false;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->nullableStringAttribute(isNull));
     if (isNull)
         return jsNull();
@@ -1059,7 +1059,7 @@ JSValue jsTestObjNullableLongSettableAttribute(ExecState* exec, JSValue slotBase
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     UNUSED_PARAM(exec);
     bool isNull = false;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue result = jsNumber(impl->nullableLongSettableAttribute(isNull));
     if (isNull)
         return jsNull();
@@ -1072,7 +1072,7 @@ JSValue jsTestObjNullableStringValue(ExecState* exec, JSValue slotBase, Property
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(slotBase));
     ExceptionCode ec = 0;
     bool isNull = false;
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSC::JSValue result = jsNumber(impl->nullableStringValue(isNull, ec));
     if (isNull)
         return jsNull();
@@ -1116,7 +1116,7 @@ void setJSTestObjEnumAttr(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     const String nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (exec->hadException())
         return;
@@ -1130,7 +1130,7 @@ void setJSTestObjByteAttr(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int8_t nativeValue(toInt8(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1142,7 +1142,7 @@ void setJSTestObjOctetAttr(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     uint8_t nativeValue(toUInt8(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1154,7 +1154,7 @@ void setJSTestObjShortAttr(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     short nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1166,7 +1166,7 @@ void setJSTestObjUnsignedShortAttr(ExecState* exec, JSObject* thisObject, JSValu
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     unsigned short nativeValue(toUInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1178,7 +1178,7 @@ void setJSTestObjLongAttr(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1190,7 +1190,7 @@ void setJSTestObjLongLongAttr(ExecState* exec, JSObject* thisObject, JSValue val
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     long long nativeValue(toInt64(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1202,7 +1202,7 @@ void setJSTestObjUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject, JSV
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1214,7 +1214,7 @@ void setJSTestObjStringAttr(ExecState* exec, JSObject* thisObject, JSValue value
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (exec->hadException())
         return;
@@ -1226,7 +1226,7 @@ void setJSTestObjTestObjAttr(ExecState* exec, JSObject* thisObject, JSValue valu
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     TestObj* nativeValue(toTestObj(value));
     if (exec->hadException())
         return;
@@ -1238,7 +1238,7 @@ void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* thisObject, JSValue value
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     TestObj* nativeValue(toTestObj(value));
     if (exec->hadException())
         return;
@@ -1250,7 +1250,7 @@ void setJSTestObjCreate(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     bool nativeValue(value.toBoolean(exec));
     if (exec->hadException())
         return;
@@ -1262,7 +1262,7 @@ void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSVa
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     const String& nativeValue(valueToStringWithNullCheck(exec, value));
     if (exec->hadException())
         return;
@@ -1274,7 +1274,7 @@ void setJSTestObjReflectedIntegralAttr(ExecState* exec, JSObject* thisObject, JS
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1286,7 +1286,7 @@ void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* thisOb
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     unsigned nativeValue(toUInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1298,7 +1298,7 @@ void setJSTestObjReflectedBooleanAttr(ExecState* exec, JSObject* thisObject, JSV
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     bool nativeValue(value.toBoolean(exec));
     if (exec->hadException())
         return;
@@ -1310,7 +1310,7 @@ void setJSTestObjReflectedURLAttr(ExecState* exec, JSObject* thisObject, JSValue
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     const String& nativeValue(valueToStringWithNullCheck(exec, value));
     if (exec->hadException())
         return;
@@ -1322,7 +1322,7 @@ void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSVa
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     const String& nativeValue(valueToStringWithNullCheck(exec, value));
     if (exec->hadException())
         return;
@@ -1334,7 +1334,7 @@ void setJSTestObjReflectedCustomIntegralAttr(ExecState* exec, JSObject* thisObje
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1346,7 +1346,7 @@ void setJSTestObjReflectedCustomBooleanAttr(ExecState* exec, JSObject* thisObjec
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     bool nativeValue(value.toBoolean(exec));
     if (exec->hadException())
         return;
@@ -1358,7 +1358,7 @@ void setJSTestObjReflectedCustomURLAttr(ExecState* exec, JSObject* thisObject, J
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     const String& nativeValue(valueToStringWithNullCheck(exec, value));
     if (exec->hadException())
         return;
@@ -1370,7 +1370,7 @@ void setJSTestObjTypedArrayAttr(ExecState* exec, JSObject* thisObject, JSValue v
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     RefPtr<Float32Array> nativeValue(toFloat32Array(value));
     if (exec->hadException())
         return;
@@ -1382,7 +1382,7 @@ void setJSTestObjAttrWithGetterException(ExecState* exec, JSObject* thisObject,
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1394,7 +1394,7 @@ void setJSTestObjAttrWithSetterException(ExecState* exec, JSObject* thisObject,
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ExceptionCode ec = 0;
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
@@ -1408,7 +1408,7 @@ void setJSTestObjStringAttrWithGetterException(ExecState* exec, JSObject* thisOb
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (exec->hadException())
         return;
@@ -1420,7 +1420,7 @@ void setJSTestObjStringAttrWithSetterException(ExecState* exec, JSObject* thisOb
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ExceptionCode ec = 0;
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (exec->hadException())
@@ -1441,7 +1441,7 @@ void setJSTestObjWithScriptStateAttribute(ExecState* exec, JSObject* thisObject,
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1453,7 +1453,7 @@ void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject*
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     TestObj* nativeValue(toTestObj(value));
     if (exec->hadException())
         return;
@@ -1468,7 +1468,7 @@ void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* thisO
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     TestObj* nativeValue(toTestObj(value));
     if (exec->hadException())
         return;
@@ -1480,7 +1480,7 @@ void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSOb
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     TestObj* nativeValue(toTestObj(value));
     if (exec->hadException())
         return;
@@ -1495,7 +1495,7 @@ void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* ex
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     TestObj* nativeValue(toTestObj(value));
     if (exec->hadException())
         return;
@@ -1510,7 +1510,7 @@ void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecSta
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     TestObj* nativeValue(toTestObj(value));
     if (exec->hadException())
         return;
@@ -1525,7 +1525,7 @@ void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(Exe
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     TestObj* nativeValue(toTestObj(value));
     if (exec->hadException())
         return;
@@ -1540,7 +1540,7 @@ void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObj
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     TestObj* nativeValue(toTestObj(value));
     if (exec->hadException())
         return;
@@ -1553,7 +1553,7 @@ void setJSTestObjConditionalAttr1(ExecState* exec, JSObject* thisObject, JSValue
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1567,7 +1567,7 @@ void setJSTestObjConditionalAttr2(ExecState* exec, JSObject* thisObject, JSValue
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1581,7 +1581,7 @@ void setJSTestObjConditionalAttr3(ExecState* exec, JSObject* thisObject, JSValue
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1624,7 +1624,7 @@ void setJSTestObjAnyAttribute(ExecState* exec, JSObject* thisObject, JSValue val
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ScriptValue nativeValue(exec->vm(), value);
     if (exec->hadException())
         return;
@@ -1636,7 +1636,7 @@ void setJSTestObjMutablePoint(ExecState* exec, JSObject* thisObject, JSValue val
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
     if (exec->hadException())
         return;
@@ -1648,7 +1648,7 @@ void setJSTestObjImmutablePoint(ExecState* exec, JSObject* thisObject, JSValue v
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
     if (exec->hadException())
         return;
@@ -1660,7 +1660,7 @@ void setJSTestObjStrawberry(ExecState* exec, JSObject* thisObject, JSValue value
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1672,7 +1672,7 @@ void setJSTestObjStrictFloat(ExecState* exec, JSObject* thisObject, JSValue valu
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     float nativeValue(value.toFloat(exec));
     if (exec->hadException())
         return;
@@ -1684,7 +1684,7 @@ void setJSTestObjId(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1704,7 +1704,7 @@ void setJSTestObjNullableLongSettableAttribute(ExecState* exec, JSObject* thisOb
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1716,7 +1716,7 @@ void setJSTestObjNullableStringValue(ExecState* exec, JSObject* thisObject, JSVa
 {
     UNUSED_PARAM(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(thisObject);
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -1736,7 +1736,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethod(ExecState* exe
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     impl->voidMethod();
     return JSValue::encode(jsUndefined());
 }
@@ -1748,7 +1748,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecSt
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 3)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -1771,7 +1771,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethod(ExecState* exe
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     JSC::JSValue result = jsNumber(impl->byteMethod());
     return JSValue::encode(result);
@@ -1784,7 +1784,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(ExecSt
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 3)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int8_t byteArg(toInt8(exec, exec->argument(0), NormalConversion));
@@ -1808,7 +1808,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethod(ExecState* ex
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     JSC::JSValue result = jsNumber(impl->octetMethod());
     return JSValue::encode(result);
@@ -1821,7 +1821,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(ExecS
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 3)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     uint8_t octetArg(toUInt8(exec, exec->argument(0), NormalConversion));
@@ -1845,7 +1845,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethod(ExecState* exe
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     JSC::JSValue result = jsNumber(impl->longMethod());
     return JSValue::encode(result);
@@ -1858,7 +1858,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(ExecSt
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 3)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -1882,7 +1882,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(ExecState* exec
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->objMethod()));
     return JSValue::encode(result);
@@ -1895,7 +1895,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecSta
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 3)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -1919,7 +1919,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(Exe
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<RefPtr<ScriptProfile> > sequenceArg((toRefPtrNativeArray<ScriptProfile, JSScriptProfile>(exec, exec->argument(0), &toScriptProfile)));
@@ -1936,7 +1936,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(E
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -1954,7 +1954,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(ExecSta
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String enumArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -1973,7 +1973,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgs
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 2)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -1996,7 +1996,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     RefPtr<SerializedScriptValue> serializedArg(SerializedScriptValue::create(exec, exec->argument(0), 0, 0));
@@ -2013,7 +2013,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState*
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Dictionary oo(exec, exec->argument(0));
@@ -2033,7 +2033,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithException(ExecS
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ExceptionCode ec = 0;
     impl->methodWithException(ec);
     setDOMException(exec, ec);
@@ -2067,7 +2067,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAddEventListener(ExecStat
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue listener = exec->argument(1);
     if (!listener.isObject())
         return JSValue::encode(jsUndefined());
@@ -2082,7 +2082,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionRemoveEventListener(ExecS
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     JSValue listener = exec->argument(1);
     if (!listener.isObject())
         return JSValue::encode(jsUndefined());
@@ -2097,7 +2097,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoid(ExecS
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     impl->withScriptStateVoid(exec);
     return JSValue::encode(jsUndefined());
 }
@@ -2109,7 +2109,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObj(ExecSt
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptStateObj(exec)));
     if (exec->hadException())
@@ -2124,7 +2124,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateVoidExcept
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ExceptionCode ec = 0;
     impl->withScriptStateVoidException(exec, ec);
     setDOMException(exec, ec);
@@ -2138,7 +2138,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptStateObjExcepti
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ExceptionCode ec = 0;
 
     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl->withScriptStateObjException(exec, ec)));
@@ -2155,7 +2155,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
@@ -2170,7 +2170,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
@@ -2185,7 +2185,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ExceptionCode ec = 0;
     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
@@ -2205,7 +2205,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionContex
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
     if (!scriptContext)
         return JSValue::encode(jsUndefined());
@@ -2223,7 +2223,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptArgumentsAndCal
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     RefPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 0));
     impl->withScriptArgumentsAndCallStack(scriptArguments.release());
     return JSValue::encode(jsUndefined());
@@ -2236,7 +2236,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(Exe
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     size_t argsCount = exec->argumentCount();
     if (argsCount <= 0) {
@@ -2258,7 +2258,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int nonOpt(toInt32(exec, exec->argument(0), NormalConversion));
@@ -2285,7 +2285,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int nonOpt(toInt32(exec, exec->argument(0), NormalConversion));
@@ -2320,7 +2320,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     size_t argsCount = exec->argumentCount();
     if (argsCount <= 0) {
@@ -2342,7 +2342,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringI
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     const String& str(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
     if (exec->hadException())
         return JSValue::encode(jsUndefined());
@@ -2357,7 +2357,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringI
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     const String& str(argumentOrNull(exec, 0).isEmpty() ? String() : argumentOrNull(exec, 0).toString(exec)->value(exec));
     if (exec->hadException())
         return JSValue::encode(jsUndefined());
@@ -2372,7 +2372,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(Exe
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     if (!exec->argument(0).isFunction())
@@ -2389,7 +2389,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgA
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 2)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int nonCallback(toInt32(exec, exec->argument(0), NormalConversion));
@@ -2409,7 +2409,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOpti
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     RefPtr<TestCallback> callback;
     if (!exec->argument(0).isUndefinedOrNull()) {
         if (!exec->uncheckedArgument(0).isFunction())
@@ -2451,7 +2451,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod1(ExecSt
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     JSC::JSValue result = jsStringWithCache(exec, impl->conditionalMethod1());
     return JSValue::encode(result);
@@ -2467,7 +2467,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod2(ExecSt
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     impl->conditionalMethod2();
     return JSValue::encode(jsUndefined());
 }
@@ -2482,7 +2482,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConditionalMethod3(ExecSt
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     impl->conditionalMethod3();
     return JSValue::encode(jsUndefined());
 }
@@ -2496,7 +2496,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 2)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestObj* objArg(toTestObj(exec->argument(0)));
@@ -2516,7 +2516,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestObj* objArg(toTestObj(exec->argument(0)));
@@ -2543,7 +2543,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -2560,7 +2560,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     int longArg(toInt32(exec, exec->argument(0), NormalConversion));
@@ -2577,7 +2577,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod5(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     if (!exec->argument(0).isFunction())
@@ -2594,7 +2594,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod6(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     RefPtr<DOMStringList> listArg(toDOMStringList(exec, exec->argument(0)));
@@ -2611,7 +2611,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod7(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<String> arrayArg(toNativeArray<String>(exec, exec->argument(0)));
@@ -2628,7 +2628,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod8(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestObj* objArg(toTestObj(exec->argument(0)));
@@ -2645,7 +2645,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod9(
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<String> arrayArg(toNativeArray<String>(exec, exec->argument(0)));
@@ -2662,7 +2662,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod10
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<unsigned> arrayArg(toNativeArray<unsigned>(exec, exec->argument(0)));
@@ -2679,7 +2679,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod11
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -2800,7 +2800,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(Exec
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 2)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     unsigned short objArgsShort = 0;
@@ -2830,7 +2830,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSeq
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<unsigned> unsignedLongSequence(toNativeArray<unsigned>(exec, exec->argument(0)));
@@ -2847,7 +2847,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(ExecS
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -2867,7 +2867,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(Exe
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -2887,7 +2887,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(ExecState*
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     ExceptionCode ec = 0;
     if (!shouldAllowAccessToNode(exec, impl->getSVGDocument(ec)))
         return JSValue::encode(jsNull());
@@ -2904,7 +2904,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(ExecState* exec)
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestNode* value(toTestNode(exec->argument(0)));
@@ -2921,7 +2921,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* exec)
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestNode* value(toTestNode(exec->argument(0)));
@@ -2938,7 +2938,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* exec)
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestNode* value(toTestNode(exec->argument(0)));
@@ -2955,7 +2955,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(ExecState* exec)
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     TestNode* value(toTestNode(exec->argument(0)));
@@ -2972,7 +2972,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(Exec
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl->mutablePointFunction())));
     return JSValue::encode(result);
@@ -2985,7 +2985,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionImmutablePointFunction(Ex
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
 
     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl->immutablePointFunction())));
     return JSValue::encode(result);
@@ -2998,7 +2998,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOrange(ExecState* exec)
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     impl->banana();
     return JSValue::encode(jsUndefined());
 }
@@ -3010,7 +3010,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunction(ExecState*
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 3)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -3036,7 +3036,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithSequenc
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 2)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -3061,7 +3061,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithArray(E
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 2)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -3086,7 +3086,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicStringMethod(Exec
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     const String& head(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
@@ -3106,7 +3106,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicDoubleMethod(Exec
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     double head(exec->argument(0).toNumber(exec));
@@ -3126,7 +3126,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(ExecSt
         return throwVMTypeError(exec);
     JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
+    TestObj* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Node* head(toNode(exec->argument(0)));
index 8c02850..c1eb306 100644 (file)
@@ -133,7 +133,7 @@ JSValue jsTestSerializedScriptValueInterfaceValue(ExecState* exec, JSValue slotB
 {
     JSTestSerializedScriptValueInterface* castedThis = jsCast<JSTestSerializedScriptValueInterface*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestSerializedScriptValueInterface* impl = static_cast<TestSerializedScriptValueInterface*>(castedThis->impl());
+    TestSerializedScriptValueInterface* impl = castedThis->impl();
     JSValue result = impl->value() ? impl->value()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     return result;
 }
@@ -143,7 +143,7 @@ JSValue jsTestSerializedScriptValueInterfaceReadonlyValue(ExecState* exec, JSVal
 {
     JSTestSerializedScriptValueInterface* castedThis = jsCast<JSTestSerializedScriptValueInterface*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestSerializedScriptValueInterface* impl = static_cast<TestSerializedScriptValueInterface*>(castedThis->impl());
+    TestSerializedScriptValueInterface* impl = castedThis->impl();
     JSValue result = impl->readonlyValue() ? impl->readonlyValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     return result;
 }
@@ -155,7 +155,7 @@ JSValue jsTestSerializedScriptValueInterfaceCachedValue(ExecState* exec, JSValue
     UNUSED_PARAM(exec);
     if (JSValue cachedValue = castedThis->m_cachedValue.get())
         return cachedValue;
-    TestSerializedScriptValueInterface* impl = static_cast<TestSerializedScriptValueInterface*>(castedThis->impl());
+    TestSerializedScriptValueInterface* impl = castedThis->impl();
     JSValue result = impl->cachedValue() ? impl->cachedValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     castedThis->m_cachedValue.set(exec->vm(), castedThis, result);
     return result;
@@ -166,7 +166,7 @@ JSValue jsTestSerializedScriptValueInterfacePorts(ExecState* exec, JSValue slotB
 {
     JSTestSerializedScriptValueInterface* castedThis = jsCast<JSTestSerializedScriptValueInterface*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestSerializedScriptValueInterface* impl = static_cast<TestSerializedScriptValueInterface*>(castedThis->impl());
+    TestSerializedScriptValueInterface* impl = castedThis->impl();
     JSValue result = jsArray(exec, castedThis->globalObject(), impl->ports());
     return result;
 }
@@ -178,7 +178,7 @@ JSValue jsTestSerializedScriptValueInterfaceCachedReadonlyValue(ExecState* exec,
     UNUSED_PARAM(exec);
     if (JSValue cachedValue = castedThis->m_cachedReadonlyValue.get())
         return cachedValue;
-    TestSerializedScriptValueInterface* impl = static_cast<TestSerializedScriptValueInterface*>(castedThis->impl());
+    TestSerializedScriptValueInterface* impl = castedThis->impl();
     JSValue result = impl->cachedReadonlyValue() ? impl->cachedReadonlyValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     castedThis->m_cachedReadonlyValue.set(exec->vm(), castedThis, result);
     return result;
@@ -202,7 +202,7 @@ void setJSTestSerializedScriptValueInterfaceValue(ExecState* exec, JSObject* thi
 {
     UNUSED_PARAM(exec);
     JSTestSerializedScriptValueInterface* castedThis = jsCast<JSTestSerializedScriptValueInterface*>(thisObject);
-    TestSerializedScriptValueInterface* impl = static_cast<TestSerializedScriptValueInterface*>(castedThis->impl());
+    TestSerializedScriptValueInterface* impl = castedThis->impl();
     RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
     if (exec->hadException())
         return;
@@ -214,7 +214,7 @@ void setJSTestSerializedScriptValueInterfaceCachedValue(ExecState* exec, JSObjec
 {
     UNUSED_PARAM(exec);
     JSTestSerializedScriptValueInterface* castedThis = jsCast<JSTestSerializedScriptValueInterface*>(thisObject);
-    TestSerializedScriptValueInterface* impl = static_cast<TestSerializedScriptValueInterface*>(castedThis->impl());
+    TestSerializedScriptValueInterface* impl = castedThis->impl();
     RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
     if (exec->hadException())
         return;
index 80e87fd..0552358 100644 (file)
@@ -180,7 +180,7 @@ JSValue jsTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSValue slotBase, Pr
 {
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     JSValue result = jsNumber(impl->unsignedLongLongAttr());
     return result;
 }
@@ -190,7 +190,7 @@ JSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSValue sl
 {
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     JSValue result = impl->immutableSerializedScriptValue() ? impl->immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
     return result;
 }
@@ -207,7 +207,7 @@ JSValue jsTestTypedefsAttrWithGetterException(ExecState* exec, JSValue slotBase,
 {
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
     ExceptionCode ec = 0;
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     JSC::JSValue result = jsNumber(impl->attrWithGetterException(ec));
     setDOMException(exec, ec);
     return result;
@@ -218,7 +218,7 @@ JSValue jsTestTypedefsAttrWithSetterException(ExecState* exec, JSValue slotBase,
 {
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     JSValue result = jsNumber(impl->attrWithSetterException());
     return result;
 }
@@ -228,7 +228,7 @@ JSValue jsTestTypedefsStringAttrWithGetterException(ExecState* exec, JSValue slo
 {
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
     ExceptionCode ec = 0;
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     JSC::JSValue result = jsStringWithCache(exec, impl->stringAttrWithGetterException(ec));
     setDOMException(exec, ec);
     return result;
@@ -239,7 +239,7 @@ JSValue jsTestTypedefsStringAttrWithSetterException(ExecState* exec, JSValue slo
 {
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(slotBase));
     UNUSED_PARAM(exec);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     JSValue result = jsStringWithCache(exec, impl->stringAttrWithSetterException());
     return result;
 }
@@ -262,7 +262,7 @@ void setJSTestTypedefsUnsignedLongLongAttr(ExecState* exec, JSObject* thisObject
 {
     UNUSED_PARAM(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     unsigned long long nativeValue(toUInt64(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -274,7 +274,7 @@ void setJSTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject*
 {
     UNUSED_PARAM(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     RefPtr<SerializedScriptValue> nativeValue(SerializedScriptValue::create(exec, value, 0, 0));
     if (exec->hadException())
         return;
@@ -286,7 +286,7 @@ void setJSTestTypedefsAttrWithGetterException(ExecState* exec, JSObject* thisObj
 {
     UNUSED_PARAM(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
         return;
@@ -298,7 +298,7 @@ void setJSTestTypedefsAttrWithSetterException(ExecState* exec, JSObject* thisObj
 {
     UNUSED_PARAM(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     ExceptionCode ec = 0;
     int nativeValue(toInt32(exec, value, NormalConversion));
     if (exec->hadException())
@@ -312,7 +312,7 @@ void setJSTestTypedefsStringAttrWithGetterException(ExecState* exec, JSObject* t
 {
     UNUSED_PARAM(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (exec->hadException())
         return;
@@ -324,7 +324,7 @@ void setJSTestTypedefsStringAttrWithSetterException(ExecState* exec, JSObject* t
 {
     UNUSED_PARAM(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(thisObject);
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     ExceptionCode ec = 0;
     const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
     if (exec->hadException())
@@ -346,7 +346,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(ExecState* exec
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
 
     size_t argsCount = exec->argumentCount();
     if (argsCount <= 0) {
@@ -368,7 +368,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(ExecState*
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     if (exec->argumentCount() < 3)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     float width(exec->argument(0).toFloat(exec));
@@ -409,7 +409,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceAr
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<RefPtr<SerializedScriptValue>> sequenceArg((toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(exec, exec->argument(0), &toSerializedScriptValue)));
@@ -427,7 +427,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableArrayArg(Exe
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<String> arrayArg(toNativeArray<String>(exec, exec->argument(0)));
@@ -444,7 +444,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(ExecSt
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     unsigned long long arg1 = 0;
@@ -481,7 +481,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFuncti
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
 
     JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl->immutablePointFunction())));
     return JSValue::encode(result);
@@ -494,7 +494,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction(
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -514,7 +514,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     ExceptionCode ec = 0;
@@ -534,7 +534,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThat
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createNotEnoughArgumentsError(exec));
     Vector<RefPtr<TestEventTarget> > sequenceArg((toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(exec, exec->argument(0), &toTestEventTarget)));
@@ -552,7 +552,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(
         return throwVMTypeError(exec);
     JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(asObject(thisValue));
     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
-    TestTypedefs* impl = static_cast<TestTypedefs*>(castedThis->impl());
+    TestTypedefs* impl = castedThis->impl();
     ExceptionCode ec = 0;
     impl->methodWithException(ec);
     setDOMException(exec, ec);