JavaScriptCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jun 2008 00:40:47 +0000 (00:40 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jun 2008 00:40:47 +0000 (00:40 +0000)
2008-06-03  Darin Adler  <darin@apple.com>

        Reviewed by Geoff.

        - https://bugs.webkit.org/show_bug.cgi?id=19269
          speed up SunSpider by eliminating the toObject call for most get/put/delete

        Makes standalone SunSpider 1.025x as fast as before.

        The getOwnPropertySlot virtual function now takes care of the toObject call
        for get. Similarly, the put function (and later deleteProperty) does the
        same for those operations. To do this, the virtual functions were moved from
        the JSObject class to the JSCell class. Also, since the caller no longer knows
        the identity of the "original object", which is used by JavaScript-function
        based getters, changed the PropertySlot class so the original object is
        already stored in the slot when getOwnPropertySlot is called, if the caller
        intends to call getValue.

        This affected the old interpreter code enough that the easiest thing for me
        was to just delete it. While I am not certain the mysterious slowdown is not
        still occurring, the net change is definitely a significant speedup.

        * JavaScriptCore.exp: Updated.

        * VM/Machine.cpp: Moved the UNLIKELY macro into AlwaysInline.h.
        (KJS::resolve): Set up the originalObject in the PropertySlot before
        calling getPropertySlot. Also removed the originalObject argument from
        getValue.
        (KJS::resolve_skip): Ditto.
        (KJS::resolveBaseAndProperty): Ditto.
        (KJS::resolveBaseAndFunc): Ditto.
        (KJS::Machine::privateExecute): Removed the toObject calls from the get and
        put functions where possible, instead calling directly with JSValue and letting
        the JSValue and JSCell calls handle toObject. Same for toThisObject.

        * kjs/ExecState.h: Removed OldInterpreterExecState.

        * API/JSBase.cpp: Updated includes.

        * kjs/LocalStorageEntry.h: Removed contents. Later we can remove the file too.

        * kjs/array_instance.cpp:
        (KJS::ArrayInstance::lengthGetter): Removed originalObject argumet.
        (KJS::ArrayInstance::inlineGetOwnPropertySlot): Don't pass a base value to
        setValueSlot. Also use UNLIKELY around the "getting elements past the end of
        the array" code path; less common than successfully getting an element.

        * kjs/array_object.cpp:
        (KJS::getProperty): Initialize the PropertySlot with the original object.
        Don't pass the original object to the get function.
        (KJS::arrayProtoFuncFilter): Ditto.
        (KJS::arrayProtoFuncMap): Ditto.
        (KJS::arrayProtoFuncEvery): Ditto.
        (KJS::arrayProtoFuncForEach): Ditto.
        (KJS::arrayProtoFuncSome): Ditto.

        * kjs/function_object.cpp:
        (KJS::FunctionObjectImp::construct): Removed an obsolete comment.

        * kjs/grammar.y: Eliminated support for some of the node types that were
        used to optimize executing from the syntax tree.

        * kjs/internal.cpp:
        (KJS::StringImp::toThisObject): Added. Same as toObject.
        (KJS::NumberImp::toThisObject): Ditto.
        (KJS::GetterSetterImp::getOwnPropertySlot): Added. Not reached.
        (KJS::GetterSetterImp::put): Ditto.
        (KJS::GetterSetterImp::toThisObject): Ditto.

        * kjs/internal.h: Added toThisObject to NumberImp for speed.

        * kjs/lexer.cpp:
        (KJS::Lexer::shift): Changed shift to just do a single character, to unroll
        the loop and especially to make the one character case faster.
        (KJS::Lexer::setCode): Call shift multiple times instead of passing a number.
        (KJS::Lexer::lex): Ditto.
        (KJS::Lexer::matchPunctuator): Ditto. Also removed unneeded elses after returns.
        (KJS::Lexer::scanRegExp): Ditto.
        * kjs/lexer.h: Removed the count argument from shift.

        * kjs/math_object.cpp:
        (KJS::mathProtoFuncPow): Call jsNaN instead of jsNumber(NaN).

        * kjs/nodes.cpp: Removed some of the things needed only for the pre-SquirrelFish
        execution model.
        (KJS::ForNode::emitCode): Handle cases where some expressions are missing by
        not emitting any code at all. The old way was to emit code for "true", but
        this is an unnecessary remnant of the old way of doing things.

        * kjs/nodes.h: Removed some of the things needed only for the pre-SquirrelFish
        execution model.

        * kjs/object.cpp:
        (KJS::JSObject::fillGetterPropertySlot): Changed to only pass in the getter
        function. The old code passed in a base, but it was never used when
        actually getting the property; the toThisObject call was pointless. Also
        changed to not pass a base for setUndefined.

        * kjs/object.h: Added the new JSCell operations to GetterSetterImp.
        Never called.
        (KJS::JSObject::get): Initialize the object in the PropertySlot and don't
        pass it in getValue.
        (KJS::JSObject::getOwnPropertySlotForWrite): Removed the base argument
        in calls to setValueSlot.
        (KJS::JSObject::getOwnPropertySlot): Ditto.
        (KJS::JSValue::get): Added. Here because it calls through to JSObject.
        A version of JSObject::get that also handles the other types of JSValue
        by creating the appropriate wrapper. Saves the virtual call to toObject.
        (KJS::JSValue::put): Ditto.
        (KJS::JSValue::deleteProperty): Ditto.

        * kjs/property_slot.cpp:
        (KJS::PropertySlot::undefinedGetter): Removed the originalObject argument.
        (KJS::PropertySlot::ungettableGetter): Ditto.
        (KJS::PropertySlot::functionGetter): Ditto. Use the value in the base
        as the "this" object, which will be set to the original object by the new
        PropertySlot initialization code. Also call toThisObject. The old code did
        not do this, but needed to so we can properly handle the activation object
        like the other similar code paths.

        * kjs/property_slot.h:
        (KJS::PropertySlot::PropertySlot): Added a constructor that takes a base
        object. In debug builds, set the base to 0 if you don't pass one.
        (KJS::PropertySlot::getValue): Don't take or pass the originalObject.
        (KJS::PropertySlot::setValueSlot): Don't take a base object, and clear the
        base object in debug builds.
        (KJS::PropertySlot::setGetterSlot): Ditto.
        (KJS::PropertySlot::setUndefined): Ditto.
        (KJS::PropertySlot::setUngettable): Ditto.
        (KJS::PropertySlot::slotBase): Assert that a base object is present.
        This will fire if someone actually calls the get function without having
        passed in a base object and the getter needs it.
        (KJS::PropertySlot::setBase): Added. Used by the code that implements
        toObject so it can supply the original object after the fact.
        (KJS::PropertySlot::clearBase): Added. Clears the base, but is debug-only
        code because it's an error to fetch the base if you don't have a guarantee
        it was set.

        * API/JSCallbackObject.h:
        * API/JSCallbackObjectFunctions.h:
        (KJS::JSCallbackObject::cachedValueGetter):
        (KJS::JSCallbackObject::staticValueGetter):
        (KJS::JSCallbackObject::staticFunctionGetter):
        (KJS::JSCallbackObject::callbackGetter):
        * kjs/JSActivation.cpp:
        (KJS::JSActivation::getOwnPropertySlot):
        (KJS::JSActivation::argumentsGetter):
        * kjs/JSActivation.h:
        * kjs/JSVariableObject.h:
        (KJS::JSVariableObject::symbolTableGet):
        * kjs/array_instance.h:
        * kjs/function.cpp:
        (KJS::FunctionImp::argumentsGetter):
        (KJS::FunctionImp::callerGetter):
        (KJS::FunctionImp::lengthGetter):
        (KJS::Arguments::mappedIndexGetter):
        * kjs/function.h:
        * kjs/lookup.h:
        (KJS::staticFunctionGetter):
        (KJS::staticValueGetter):
        * kjs/string_object.cpp:
        (KJS::StringInstance::lengthGetter):
        (KJS::StringInstance::indexGetter):
        (KJS::stringInstanceNumericPropertyGetter):
        * kjs/string_object.h:
        Removed originalObject arguments from getters. Don't pass base values to
        the various PropertySlot functions that no longer take them.

        * kjs/value.cpp:
        (KJS::JSCell::getOwnPropertySlot): Added. Calls toObject and then sets the slot.
        This function has to always return true, because the caller can't walk the prototype
        chain. Because of that, we do a getPropertySlot, not getOwnPropertySlot, which works
        for the caller. This is private, only called by getOwnPropertySlotInternal.
        (KJS::JSCell::put): Added. Calls toObject and then put.
        (KJS::JSCell::toThisObject): Added. Calls toObject.

        * kjs/value.h: Added get, put, and toThisObject to both JSValue
        and JSCell. These take care of the toObject operation without an additional virtual
        function call, and so make the common "already an object" case faster.

        * wtf/AlwaysInline.h: Moved the UNLIKELY macro here for now. Maybe we can find a
        better place later, or rename this header.

JavaScriptGlue:

2008-06-03  Darin Adler  <darin@apple.com>

        - update for JavaScriptCore changes for https://bugs.webkit.org/show_bug.cgi?id=19269
          speed up SunSpider by eliminating the toObject call for most get/put/delete

        * UserObjectImp.cpp:
        (UserObjectImp::userObjectGetter): Removed originalObject argument.
        * UserObjectImp.h: Ditto.

WebCore:

2008-06-03  Justin Garcia  <justin.garcia@apple.com>

        Reviewed by John.

        <rdar://problem/5763082> GMail: Hang when removing indent from nested list
        <rdar://problem/5775449> In Gmail and GoogleDocs, a hang occurs when I attempt to apply a list style to a large selection of text
        <rdar://problem/5937624> 9D32: Hang in Safari. Using 100% of processor

        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::modifyRange): doApply() may operate on and remove
        the last paragraph of the selection from the document if it's in the same list
        item as startOfCurrentParagraph.  Return early to avoid an infinite loop and
        because there is no more work to be done.  Added a FIXME (<rdar://problem/5983974>)
        about the incorrect endingSelection()s.

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

71 files changed:
JavaScriptCore/API/JSCallbackObject.h
JavaScriptCore/API/JSCallbackObjectFunctions.h
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/VM/Machine.cpp
JavaScriptCore/kjs/ExecState.h
JavaScriptCore/kjs/JSActivation.cpp
JavaScriptCore/kjs/JSActivation.h
JavaScriptCore/kjs/JSVariableObject.h
JavaScriptCore/kjs/array_instance.cpp
JavaScriptCore/kjs/array_instance.h
JavaScriptCore/kjs/array_object.cpp
JavaScriptCore/kjs/function.cpp
JavaScriptCore/kjs/function.h
JavaScriptCore/kjs/grammar.y
JavaScriptCore/kjs/internal.cpp
JavaScriptCore/kjs/internal.h
JavaScriptCore/kjs/lookup.h
JavaScriptCore/kjs/math_object.cpp
JavaScriptCore/kjs/nodes.cpp
JavaScriptCore/kjs/nodes.h
JavaScriptCore/kjs/object.cpp
JavaScriptCore/kjs/object.h
JavaScriptCore/kjs/property_slot.cpp
JavaScriptCore/kjs/property_slot.h
JavaScriptCore/kjs/string_object.cpp
JavaScriptCore/kjs/string_object.h
JavaScriptCore/kjs/value.cpp
JavaScriptCore/kjs/value.h
JavaScriptCore/wtf/AlwaysInline.h
JavaScriptGlue/ChangeLog
JavaScriptGlue/UserObjectImp.cpp
JavaScriptGlue/UserObjectImp.h
WebCore/ChangeLog
WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
WebCore/bindings/js/JSCanvasPixelArrayCustom.cpp
WebCore/bindings/js/JSDOMWindowBase.cpp
WebCore/bindings/js/JSDOMWindowBase.h
WebCore/bindings/js/JSDOMWindowCustom.h
WebCore/bindings/js/JSHTMLAppletElementCustom.cpp
WebCore/bindings/js/JSHTMLCollectionCustom.cpp
WebCore/bindings/js/JSHTMLDocumentCustom.cpp
WebCore/bindings/js/JSHTMLEmbedElementCustom.cpp
WebCore/bindings/js/JSHTMLFormElementCustom.cpp
WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp
WebCore/bindings/js/JSHTMLObjectElementCustom.cpp
WebCore/bindings/js/JSHistoryCustom.cpp
WebCore/bindings/js/JSLocationCustom.cpp
WebCore/bindings/js/JSMimeTypeArrayCustom.cpp
WebCore/bindings/js/JSNamedNodeMapCustom.cpp
WebCore/bindings/js/JSNamedNodesCollection.cpp
WebCore/bindings/js/JSNamedNodesCollection.h
WebCore/bindings/js/JSNodeListCustom.cpp
WebCore/bindings/js/JSPluginArrayCustom.cpp
WebCore/bindings/js/JSPluginCustom.cpp
WebCore/bindings/js/JSQuarantinedObjectWrapper.cpp
WebCore/bindings/js/JSQuarantinedObjectWrapper.h
WebCore/bindings/js/JSStorageCustom.cpp
WebCore/bindings/js/JSStyleSheetListCustom.cpp
WebCore/bindings/js/kjs_binding.cpp
WebCore/bindings/js/kjs_binding.h
WebCore/bindings/js/kjs_html.cpp
WebCore/bindings/js/kjs_html.h
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bridge/objc/objc_runtime.mm
WebCore/bridge/runtime_array.cpp
WebCore/bridge/runtime_array.h
WebCore/bridge/runtime_method.cpp
WebCore/bridge/runtime_method.h
WebCore/bridge/runtime_object.cpp
WebCore/bridge/runtime_object.h

index 6d7caccf240212c61e0a54fb11e855fe9cf6e269..726403d347f1e768bba91802e39192f9af1dd2a2 100644 (file)
@@ -78,10 +78,10 @@ public:
 private:
     void init(ExecState*);
     
-    static JSValue* cachedValueGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
-    static JSValue* staticValueGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot& slot);
-    static JSValue* staticFunctionGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot& slot);
-    static JSValue* callbackGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
+    static JSValue* cachedValueGetter(ExecState*, const Identifier&, const PropertySlot&);
+    static JSValue* staticValueGetter(ExecState*, const Identifier&, const PropertySlot&);
+    static JSValue* staticFunctionGetter(ExecState*, const Identifier&, const PropertySlot&);
+    static JSValue* callbackGetter(ExecState*, const Identifier&, const PropertySlot&);
     
     void* m_privateData;
     JSClassRef m_class;
index b4871dc98db990ba380c4945c4e28ccc17417f20..edd2e0edfee8f640035770a7ce6c8c3287a83902 100644 (file)
@@ -427,7 +427,7 @@ bool JSCallbackObject<Base>::inherits(JSClassRef c) const
 }
 
 template <class Base>
-JSValue* JSCallbackObject<Base>::cachedValueGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot& slot)
+JSValue* JSCallbackObject<Base>::cachedValueGetter(ExecState*, const Identifier&, const PropertySlot& slot)
 {
     JSValue* v = slot.slotBase();
     ASSERT(v);
@@ -435,7 +435,7 @@ JSValue* JSCallbackObject<Base>::cachedValueGetter(ExecState*, JSObject*, const
 }
 
 template <class Base>
-JSValue* JSCallbackObject<Base>::staticValueGetter(ExecState* exec, JSObject*, const Identifier& propertyName, const PropertySlot& slot)
+JSValue* JSCallbackObject<Base>::staticValueGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
 {
     ASSERT(slot.slotBase()->inherits(&JSCallbackObject::info));
     JSCallbackObject* thisObj = static_cast<JSCallbackObject*>(slot.slotBase());
@@ -456,15 +456,15 @@ JSValue* JSCallbackObject<Base>::staticValueGetter(ExecState* exec, JSObject*, c
 }
 
 template <class Base>
-JSValue* JSCallbackObject<Base>::staticFunctionGetter(ExecState* exec, JSObject*, const Identifier& propertyName, const PropertySlot& slot)
+JSValue* JSCallbackObject<Base>::staticFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
 {
     ASSERT(slot.slotBase()->inherits(&JSCallbackObject::info));
     JSCallbackObject* thisObj = static_cast<JSCallbackObject*>(slot.slotBase());
     
     // Check for cached or override property.
-    PropertySlot slot2;
+    PropertySlot slot2(thisObj);
     if (thisObj->Base::getOwnPropertySlot(exec, propertyName, slot2))
-        return slot2.getValue(exec, thisObj, propertyName);
+        return slot2.getValue(exec, propertyName);
     
     for (JSClassRef jsClass = thisObj->m_class; jsClass; jsClass = jsClass->parentClass) {
         if (OpaqueJSClass::StaticFunctionsTable* staticFunctions = jsClass->staticFunctions) {
@@ -482,7 +482,7 @@ JSValue* JSCallbackObject<Base>::staticFunctionGetter(ExecState* exec, JSObject*
 }
 
 template <class Base>
-JSValue* JSCallbackObject<Base>::callbackGetter(ExecState* exec, JSObject*, const Identifier& propertyName, const PropertySlot& slot)
+JSValue* JSCallbackObject<Base>::callbackGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
 {
     ASSERT(slot.slotBase()->inherits(&JSCallbackObject::info));
     JSCallbackObject* thisObj = static_cast<JSCallbackObject*>(slot.slotBase());
index 4ac61a4ec12cb9e9add235f6ebbe9608ddb07742..d1668fef40dd16f291688c55aa0a3ac490a101a1 100644 (file)
@@ -1,3 +1,186 @@
+2008-06-03  Darin Adler  <darin@apple.com>
+
+        Reviewed by Geoff.
+
+        - https://bugs.webkit.org/show_bug.cgi?id=19269
+          speed up SunSpider by eliminating the toObject call for most get/put/delete
+
+        Makes standalone SunSpider 1.025x as fast as before.
+
+        The getOwnPropertySlot virtual function now takes care of the toObject call
+        for get. Similarly, the put function (and later deleteProperty) does the
+        same for those operations. To do this, the virtual functions were moved from
+        the JSObject class to the JSCell class. Also, since the caller no longer knows
+        the identity of the "original object", which is used by JavaScript-function
+        based getters, changed the PropertySlot class so the original object is
+        already stored in the slot when getOwnPropertySlot is called, if the caller
+        intends to call getValue.
+
+        This affected the old interpreter code enough that the easiest thing for me
+        was to just delete it. While I am not certain the mysterious slowdown is not
+        still occurring, the net change is definitely a significant speedup.
+
+        * JavaScriptCore.exp: Updated.
+
+        * VM/Machine.cpp: Moved the UNLIKELY macro into AlwaysInline.h.
+        (KJS::resolve): Set up the originalObject in the PropertySlot before
+        calling getPropertySlot. Also removed the originalObject argument from
+        getValue.
+        (KJS::resolve_skip): Ditto.
+        (KJS::resolveBaseAndProperty): Ditto.
+        (KJS::resolveBaseAndFunc): Ditto.
+        (KJS::Machine::privateExecute): Removed the toObject calls from the get and
+        put functions where possible, instead calling directly with JSValue and letting
+        the JSValue and JSCell calls handle toObject. Same for toThisObject.
+
+        * kjs/ExecState.h: Removed OldInterpreterExecState.
+
+        * API/JSBase.cpp: Updated includes.
+
+        * kjs/LocalStorageEntry.h: Removed contents. Later we can remove the file too.
+
+        * kjs/array_instance.cpp:
+        (KJS::ArrayInstance::lengthGetter): Removed originalObject argumet.
+        (KJS::ArrayInstance::inlineGetOwnPropertySlot): Don't pass a base value to
+        setValueSlot. Also use UNLIKELY around the "getting elements past the end of
+        the array" code path; less common than successfully getting an element.
+
+        * kjs/array_object.cpp:
+        (KJS::getProperty): Initialize the PropertySlot with the original object.
+        Don't pass the original object to the get function.
+        (KJS::arrayProtoFuncFilter): Ditto.
+        (KJS::arrayProtoFuncMap): Ditto.
+        (KJS::arrayProtoFuncEvery): Ditto.
+        (KJS::arrayProtoFuncForEach): Ditto.
+        (KJS::arrayProtoFuncSome): Ditto.
+
+        * kjs/function_object.cpp:
+        (KJS::FunctionObjectImp::construct): Removed an obsolete comment.
+
+        * kjs/grammar.y: Eliminated support for some of the node types that were
+        used to optimize executing from the syntax tree.
+
+        * kjs/internal.cpp:
+        (KJS::StringImp::toThisObject): Added. Same as toObject.
+        (KJS::NumberImp::toThisObject): Ditto.
+        (KJS::GetterSetterImp::getOwnPropertySlot): Added. Not reached.
+        (KJS::GetterSetterImp::put): Ditto.
+        (KJS::GetterSetterImp::toThisObject): Ditto.
+
+        * kjs/internal.h: Added toThisObject to NumberImp for speed.
+
+        * kjs/lexer.cpp:
+        (KJS::Lexer::shift): Changed shift to just do a single character, to unroll
+        the loop and especially to make the one character case faster.
+        (KJS::Lexer::setCode): Call shift multiple times instead of passing a number.
+        (KJS::Lexer::lex): Ditto.
+        (KJS::Lexer::matchPunctuator): Ditto. Also removed unneeded elses after returns.
+        (KJS::Lexer::scanRegExp): Ditto.
+        * kjs/lexer.h: Removed the count argument from shift.
+
+        * kjs/math_object.cpp:
+        (KJS::mathProtoFuncPow): Call jsNaN instead of jsNumber(NaN).
+
+        * kjs/nodes.cpp: Removed some of the things needed only for the pre-SquirrelFish
+        execution model.
+        (KJS::ForNode::emitCode): Handle cases where some expressions are missing by
+        not emitting any code at all. The old way was to emit code for "true", but
+        this is an unnecessary remnant of the old way of doing things.
+
+        * kjs/nodes.h: Removed some of the things needed only for the pre-SquirrelFish
+        execution model.
+
+        * kjs/object.cpp:
+        (KJS::JSObject::fillGetterPropertySlot): Changed to only pass in the getter
+        function. The old code passed in a base, but it was never used when
+        actually getting the property; the toThisObject call was pointless. Also
+        changed to not pass a base for setUndefined.
+
+        * kjs/object.h: Added the new JSCell operations to GetterSetterImp.
+        Never called.
+        (KJS::JSObject::get): Initialize the object in the PropertySlot and don't
+        pass it in getValue.
+        (KJS::JSObject::getOwnPropertySlotForWrite): Removed the base argument
+        in calls to setValueSlot.
+        (KJS::JSObject::getOwnPropertySlot): Ditto.
+        (KJS::JSValue::get): Added. Here because it calls through to JSObject.
+        A version of JSObject::get that also handles the other types of JSValue
+        by creating the appropriate wrapper. Saves the virtual call to toObject.
+        (KJS::JSValue::put): Ditto.
+        (KJS::JSValue::deleteProperty): Ditto.
+
+        * kjs/property_slot.cpp:
+        (KJS::PropertySlot::undefinedGetter): Removed the originalObject argument.
+        (KJS::PropertySlot::ungettableGetter): Ditto.
+        (KJS::PropertySlot::functionGetter): Ditto. Use the value in the base
+        as the "this" object, which will be set to the original object by the new
+        PropertySlot initialization code. Also call toThisObject. The old code did
+        not do this, but needed to so we can properly handle the activation object
+        like the other similar code paths.
+
+        * kjs/property_slot.h:
+        (KJS::PropertySlot::PropertySlot): Added a constructor that takes a base
+        object. In debug builds, set the base to 0 if you don't pass one.
+        (KJS::PropertySlot::getValue): Don't take or pass the originalObject.
+        (KJS::PropertySlot::setValueSlot): Don't take a base object, and clear the
+        base object in debug builds.
+        (KJS::PropertySlot::setGetterSlot): Ditto.
+        (KJS::PropertySlot::setUndefined): Ditto.
+        (KJS::PropertySlot::setUngettable): Ditto.
+        (KJS::PropertySlot::slotBase): Assert that a base object is present.
+        This will fire if someone actually calls the get function without having
+        passed in a base object and the getter needs it.
+        (KJS::PropertySlot::setBase): Added. Used by the code that implements
+        toObject so it can supply the original object after the fact.
+        (KJS::PropertySlot::clearBase): Added. Clears the base, but is debug-only
+        code because it's an error to fetch the base if you don't have a guarantee
+        it was set.
+
+        * API/JSCallbackObject.h:
+        * API/JSCallbackObjectFunctions.h:
+        (KJS::JSCallbackObject::cachedValueGetter):
+        (KJS::JSCallbackObject::staticValueGetter):
+        (KJS::JSCallbackObject::staticFunctionGetter):
+        (KJS::JSCallbackObject::callbackGetter):
+        * kjs/JSActivation.cpp:
+        (KJS::JSActivation::getOwnPropertySlot):
+        (KJS::JSActivation::argumentsGetter):
+        * kjs/JSActivation.h:
+        * kjs/JSVariableObject.h:
+        (KJS::JSVariableObject::symbolTableGet):
+        * kjs/array_instance.h:
+        * kjs/function.cpp:
+        (KJS::FunctionImp::argumentsGetter):
+        (KJS::FunctionImp::callerGetter):
+        (KJS::FunctionImp::lengthGetter):
+        (KJS::Arguments::mappedIndexGetter):
+        * kjs/function.h:
+        * kjs/lookup.h:
+        (KJS::staticFunctionGetter):
+        (KJS::staticValueGetter):
+        * kjs/string_object.cpp:
+        (KJS::StringInstance::lengthGetter):
+        (KJS::StringInstance::indexGetter):
+        (KJS::stringInstanceNumericPropertyGetter):
+        * kjs/string_object.h:
+        Removed originalObject arguments from getters. Don't pass base values to
+        the various PropertySlot functions that no longer take them.
+
+        * kjs/value.cpp:
+        (KJS::JSCell::getOwnPropertySlot): Added. Calls toObject and then sets the slot.
+        This function has to always return true, because the caller can't walk the prototype
+        chain. Because of that, we do a getPropertySlot, not getOwnPropertySlot, which works
+        for the caller. This is private, only called by getOwnPropertySlotInternal.
+        (KJS::JSCell::put): Added. Calls toObject and then put.
+        (KJS::JSCell::toThisObject): Added. Calls toObject.
+
+        * kjs/value.h: Added get, put, and toThisObject to both JSValue
+        and JSCell. These take care of the toObject operation without an additional virtual
+        function call, and so make the common "already an object" case faster.
+
+        * wtf/AlwaysInline.h: Moved the UNLIKELY macro here for now. Maybe we can find a
+        better place later, or rename this header.
+
 2008-06-03  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Tim.
index ca243b637beeff227b578276e4deb863d1b7b8b6..bd4c0b24dabf882d37011d0a77e675c1537c88d0 100644 (file)
@@ -108,7 +108,7 @@ __ZN3KJS11PropertyMap3putERKNS_10IdentifierEPNS_7JSValueEjb
 __ZN3KJS11PropertyMap5clearEv
 __ZN3KJS11PropertyMapD1Ev
 __ZN3KJS12DateInstance4infoE
-__ZN3KJS12PropertySlot15undefinedGetterEPNS_9ExecStateEPNS_8JSObjectERKNS_10IdentifierERKS0_
+__ZN3KJS12PropertySlot15undefinedGetterEPNS_9ExecStateERKNS_10IdentifierERKS0_
 __ZN3KJS12RegisterFile14addGlobalSlotsEm
 __ZN3KJS13ArrayInstance4infoE
 __ZN3KJS13CodeGenerator21setDumpsGeneratedCodeEb
@@ -151,6 +151,10 @@ __ZN3KJS4List15expandAndAppendEPNS_7JSValueE
 __ZN3KJS4List7markSetEv
 __ZN3KJS6JSCell11getCallDataERNS_8CallDataE
 __ZN3KJS6JSCell16getConstructDataERNS_13ConstructDataE
+__ZN3KJS6JSCell18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
+__ZN3KJS6JSCell18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
+__ZN3KJS6JSCell3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE
+__ZN3KJS6JSCell3putEPNS_9ExecStateEjPNS_7JSValueE
 __ZN3KJS6JSCell9getObjectEv
 __ZN3KJS6JSCellnwEm
 __ZN3KJS6JSLock12DropAllLocksC1Ev
@@ -261,6 +265,7 @@ __ZNK3KJS17DebuggerCallFrame8evaluateERKNS_7UStringERPNS_7JSValueE
 __ZNK3KJS19InternalFunctionImp21implementsHasInstanceEv
 __ZNK3KJS4List8getSliceEiRS0_
 __ZNK3KJS4Node8toStringEv
+__ZNK3KJS6JSCell12toThisObjectEPNS_9ExecStateE
 __ZNK3KJS6JSCell17getTruncatedInt32ERi
 __ZNK3KJS6JSCell18getTruncatedUInt32ERj
 __ZNK3KJS6JSCell9getNumberERd
index ff4cf1bab5e84a0b958517f7f740753d294d8494..2d1b6904df4e7e74fdf7b12875a11f0c00e96ef7 100644 (file)
 #include "operations.h"
 #include "regexp_object.h"
 
-#if COMPILER(GCC)
-#define UNLIKELY(x) \
-  __builtin_expect ((x), 0)
-#else
-#define UNLIKELY(x) x
-#endif
-
 namespace KJS {
 
 #if HAVE(COMPUTED_GOTO)
@@ -209,12 +202,12 @@ static bool NEVER_INLINE resolve(ExecState* exec, Instruction* vPC, Register* r,
     ScopeChainIterator end = scopeChain->end();
     ASSERT(iter != end);
 
-    PropertySlot slot;
     Identifier& ident = codeBlock->identifiers[property];
     do {
         JSObject* o = *iter;
+        PropertySlot slot(o);
         if (o->getPropertySlot(exec, ident, slot)) {
-            JSValue* result = slot.getValue(exec, o, ident);
+            JSValue* result = slot.getValue(exec, ident);
             exceptionValue = exec->exception();
             if (exceptionValue)
                 return false;
@@ -239,12 +232,12 @@ static bool NEVER_INLINE resolve_skip(ExecState* exec, Instruction* vPC, Registe
         ++iter;
         ASSERT(iter != end);
     }
-    PropertySlot slot;
     Identifier& ident = codeBlock->identifiers[property];
     do {
         JSObject* o = *iter;
+        PropertySlot slot(o);
         if (o->getPropertySlot(exec, ident, slot)) {
-            JSValue* result = slot.getValue(exec, o, ident);
+            JSValue* result = slot.getValue(exec, ident);
             exceptionValue = exec->exception();
             if (exceptionValue)
                 return false;
@@ -294,13 +287,13 @@ static bool NEVER_INLINE resolveBaseAndProperty(ExecState* exec, Instruction* vP
     
     ASSERT(iter != end);
     
-    PropertySlot slot;
     Identifier& ident = codeBlock->identifiers[property];
     JSObject* base;
     do {
         base = *iter;
+        PropertySlot slot(base);
         if (base->getPropertySlot(exec, ident, slot)) {
-            JSValue* result = slot.getValue(exec, base, ident);  
+            JSValue* result = slot.getValue(exec, ident);
             exceptionValue = exec->exception();
             if (exceptionValue)
                 return false;
@@ -328,11 +321,11 @@ static bool NEVER_INLINE resolveBaseAndFunc(ExecState* exec, Instruction* vPC, R
     
     ASSERT(iter != end);
     
-    PropertySlot slot;
     Identifier& ident = codeBlock->identifiers[property];
     JSObject* base;
     do {
         base = *iter;
+        PropertySlot slot(base);
         if (base->getPropertySlot(exec, ident, slot)) {            
             // ECMA 11.2.3 says that if we hit an activation the this value should be null.
             // However, section 10.2.3 says that in the case where the value provided
@@ -342,7 +335,7 @@ static bool NEVER_INLINE resolveBaseAndFunc(ExecState* exec, Instruction* vPC, R
             // that in host objects you always get a valid object for this.
             // We also handle wrapper substitution for the global object at the same time.
             JSObject* thisObj = base->toThisObject(exec);
-            JSValue* result = slot.getValue(exec, base, ident);
+            JSValue* result = slot.getValue(exec, ident);
             exceptionValue = exec->exception();
             if (exceptionValue)
                 return false;
@@ -1684,10 +1677,9 @@ JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFi
 #ifndef NDEBUG
         int registerOffset = r - (*registerBase);
 #endif
-        JSObject* baseObj = r[base].u.jsValue->toObject(exec);
 
         Identifier& ident = codeBlock->identifiers[property];
-        JSValue *result = baseObj->get(exec, ident);
+        JSValue *result = r[base].u.jsValue->get(exec, ident);
         ASSERT(registerOffset == (r - (*registerBase)));
         VM_CHECK_EXCEPTION();
         r[dst].u.jsValue = result;
@@ -1709,11 +1701,9 @@ JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFi
 #ifndef NDEBUG
         int registerOffset = r - (*registerBase);
 #endif
-
-        JSObject* baseObj = r[base].u.jsValue->toObject(exec);
         
         Identifier& ident = codeBlock->identifiers[property];
-        baseObj->put(exec, ident, r[value].u.jsValue);
+        r[base].u.jsValue->put(exec, ident, r[value].u.jsValue);
         ASSERT(registerOffset == (r - (*registerBase)));
         
         VM_CHECK_EXCEPTION();
@@ -1753,14 +1743,16 @@ JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFi
         int base = (++vPC)->u.operand;
         int property = (++vPC)->u.operand;
 
-        JSObject* baseObj = r[base].u.jsValue->toObject(exec); // may throw
+        JSValue* baseValue = r[base].u.jsValue;
         
         JSValue* subscript = r[property].u.jsValue;
         JSValue* result;
         uint32_t i;
         if (subscript->getUInt32(i))
-            result = baseObj->get(exec, i);
+            result = baseValue->get(exec, i);
         else {
+            JSObject* baseObj = baseValue->toObject(exec); // may throw
+        
             Identifier property;
             if (subscript->isObject()) {
                 VM_CHECK_EXCEPTION(); // If toObject threw, we must not call toString, which may execute arbitrary code
@@ -1792,14 +1784,16 @@ JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFi
         int property = (++vPC)->u.operand;
         int value = (++vPC)->u.operand;
 
-        JSObject* baseObj = r[base].u.jsValue->toObject(exec);
+        JSValue* baseValue = r[base].u.jsValue;
         
         JSValue* subscript = r[property].u.jsValue;
 
         uint32_t i;
         if (subscript->getUInt32(i))
-            baseObj->put(exec, i, r[value].u.jsValue);
+            baseValue->put(exec, i, r[value].u.jsValue);
         else {
+            JSObject* baseObj = baseValue->toObject(exec);
+
             Identifier property;
             if (subscript->isObject()) {
                 VM_CHECK_EXCEPTION(); // If toObject threw, we must not call toString, which may execute arbitrary code
@@ -1989,7 +1983,7 @@ JSValue* Machine::privateExecute(ExecutionFlag flag, ExecState* exec, RegisterFi
         // this instruction as a normal function call, supplying the proper 'this'
         // value.
         vPC -= 5;
-        r[thisVal].u.jsValue = baseVal->toObject(exec)->toThisObject(exec);
+        r[thisVal].u.jsValue = baseVal->toThisObject(exec);
 
 #if HAVE(COMPUTED_GOTO)
         // Hack around gcc performance quirk by performing an indirect goto
index f034437f91003158325ae8666350a332febe775d..defd433fbbd5d26d2c7df095fcb384079c6a44d0 100644 (file)
@@ -104,8 +104,8 @@ namespace KJS  {
         static const HashTable* stringTable(ExecState* exec) { return exec->m_perThreadData->stringTable; }
 
     private:
-        // Default constructor required for OldInterpreterExecState with gcc 3.
-        ExecState() {};
+        // Default constructor required for gcc 3.
+        ExecState() { }
 
         ExecState(ExecState*, Machine*, RegisterFile*, ScopeChainNode*, int callFrameOffset);
 
@@ -126,109 +126,7 @@ namespace KJS  {
         int m_callFrameOffset; // A negative offset indicates a non-function scope.
     };
 
-    // This code is now defunct:
-
     enum CodeType { GlobalCode, EvalCode, FunctionCode };
-    class OldInterpreterExecState : public ExecState {
-    public:
-        void pushSwitch() { m_switchDepth++; }
-        void popSwitch() { m_switchDepth--; }
-        bool inSwitch() const { return (m_switchDepth > 0); }
-
-        // These are only valid right after calling execute().
-        ComplType completionType() const { return m_completionType; }
-        const Identifier& breakOrContinueTarget() const
-        {
-            ASSERT(m_completionType == Break || m_completionType == Continue);
-            return *m_breakOrContinueTarget;
-        }
-
-        // Only for use in the implementation of execute().
-        void setCompletionType(ComplType type)
-        {
-            ASSERT(type != Break);
-            ASSERT(type != Continue);
-            m_completionType = type;
-        }
-        JSValue* setNormalCompletion()
-        {
-            ASSERT(!hadException());
-            m_completionType = Normal;
-            return 0;
-        }
-        JSValue* setNormalCompletion(JSValue* value)
-        {
-            ASSERT(!hadException());
-            m_completionType = Normal;
-            return value;
-        }
-        JSValue* setBreakCompletion(const Identifier* target)
-        {
-            ASSERT(!hadException());
-            m_completionType = Break;
-            m_breakOrContinueTarget = target;
-            return 0;
-        }
-        JSValue* setContinueCompletion(const Identifier* target)
-        {
-            ASSERT(!hadException());
-            m_completionType = Continue;
-            m_breakOrContinueTarget = target;
-            return 0;
-        }
-        JSValue* setReturnValueCompletion(JSValue* returnValue)
-        {
-            ASSERT(!hadException());
-            ASSERT(returnValue);
-            m_completionType = ReturnValue;
-            return returnValue;
-        }
-        JSValue* setThrowCompletion(JSValue* exception)
-        {
-            ASSERT(!hadException());
-            ASSERT(exception);
-            m_completionType = Throw;
-            return exception;
-        }
-        JSValue* setInterruptedCompletion()
-        {
-            ASSERT(!hadException());
-            m_completionType = Interrupted;
-            return 0;
-        }
-        CodeType codeType() { return m_codeType; }
-        void pushIteration() { m_iterationDepth++; }
-        void popIteration() { m_iterationDepth--; }
-        bool inIteration() const { return (m_iterationDepth > 0); }
-        LabelStack& seenLabels() { return m_labelStack; }
-        void pushScope(JSObject* s) { m_scopeChain.push(s); }
-        void popScope() { m_scopeChain.pop(); }
-        JSVariableObject* variableObject() const { ASSERT_NOT_REACHED(); return m_variableObject; }
-        void setVariableObject(JSVariableObject* v) { m_variableObject = v; }
-        ExecState* callingExecState() { return m_callingExec; }
-        ScopeNode* scopeNode() { return m_scopeNode; }
-        const List* arguments() const { return m_arguments; }
-        FunctionImp* function() const { return m_function; }
-        LocalStorage& localStorage() { ASSERT_NOT_REACHED(); return *(LocalStorage*)0; }
-        void setLocalStorage(LocalStorage*) { ASSERT_NOT_REACHED(); }
-        ScopeChain& scopeChain() { return m_scopeChain; }
-        JSObject* thisValue() const { return m_thisValue; }
-        
-        ComplType m_completionType;
-        const Identifier* m_breakOrContinueTarget;
-        int m_switchDepth;
-        CodeType m_codeType;
-        int m_iterationDepth;
-        LabelStack m_labelStack;
-        ScopeChainNode m_inlineScopeChainNode;
-        ScopeChain m_scopeChain;
-        JSVariableObject* m_variableObject;
-        ScopeNode* m_scopeNode;
-        const List* m_arguments;
-        FunctionImp* m_function;
-        ExecState* m_callingExec;
-        JSObject* m_thisValue;
-    };
 
 } // namespace KJS
 
index ab30b25d49fee378ece80db566d41792f80202ba..e4b18fc02448614418d5a4d9821cc12aac973231 100644 (file)
@@ -74,7 +74,7 @@ bool JSActivation::getOwnPropertySlot(ExecState* exec, const Identifier& propert
         return true;
 
     if (JSValue** location = getDirectLocation(propertyName)) {
-        slot.setValueSlot(this, location);
+        slot.setValueSlot(location);
         return true;
     }
 
@@ -160,7 +160,7 @@ bool JSActivation::isDynamicScope() const
     return d()->functionBody->usesEval();
 }
 
-JSValue* JSActivation::argumentsGetter(ExecState* exec, JSObject*, const Identifier&, const PropertySlot& slot)
+JSValue* JSActivation::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
 {
     JSActivation* thisObj = static_cast<JSActivation*>(slot.slotBase());
     if (!thisObj->d()->argumentsObject)
index a6a269d71f741a23d9f459f8493057fc476a267c..9b7bff3a320a97984528ae207901094b8565f346 100644 (file)
@@ -76,7 +76,7 @@ namespace KJS {
             JSObject* argumentsObject;
         };
         
-        static JSValue* argumentsGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
+        static JSValue* argumentsGetter(ExecState*, const Identifier&, const PropertySlot&);
         NEVER_INLINE PropertySlot::GetValueFunc getArgumentsGetter();
         NEVER_INLINE JSObject* createArgumentsObject(ExecState*);
 
index af873c4946dee5d069421c25041e4ce315ef898e..778ec4a6d1942972cb9bed8e9db4598d43113742 100644 (file)
@@ -100,7 +100,7 @@ namespace KJS {
     {
         SymbolTableEntry entry = symbolTable().inlineGet(propertyName.ustring().rep());
         if (!entry.isEmpty()) {
-            slot.setValueSlot(this, &valueAt(entry.getIndex()));
+            slot.setValueSlot(&valueAt(entry.getIndex()));
             return true;
         }
         return false;
@@ -110,7 +110,7 @@ namespace KJS {
     {
         SymbolTableEntry entry = symbolTable().inlineGet(propertyName.ustring().rep());
         if (!entry.isEmpty()) {
-            slot.setValueSlot(this, &valueAt(entry.getIndex()));
+            slot.setValueSlot(&valueAt(entry.getIndex()));
             slotIsWriteable = !entry.isReadOnly();
             return true;
         }
index eab22cdc195f471a6253c5527d4527606bbf58ab..0d47ed0c95c792639caef0720c5ad344c175d495 100644 (file)
@@ -130,7 +130,7 @@ JSValue* ArrayInstance::getItem(unsigned i) const
     return value ? value : jsUndefined();
 }
 
-JSValue* ArrayInstance::lengthGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot& slot)
+JSValue* ArrayInstance::lengthGetter(ExecState*, const Identifier&, const PropertySlot& slot)
 {
     return jsNumber(static_cast<ArrayInstance*>(slot.slotBase())->m_length);
 }
@@ -139,7 +139,7 @@ ALWAYS_INLINE bool ArrayInstance::inlineGetOwnPropertySlot(ExecState* exec, unsi
 {
     ArrayStorage* storage = m_storage;
 
-    if (i >= m_length) {
+    if (UNLIKELY(i >= m_length)) {
         if (i > maxArrayIndex)
             return getOwnPropertySlot(exec, Identifier::from(i), slot);
         return false;
@@ -148,14 +148,14 @@ ALWAYS_INLINE bool ArrayInstance::inlineGetOwnPropertySlot(ExecState* exec, unsi
     if (i < m_vectorLength) {
         JSValue*& valueSlot = storage->m_vector[i];
         if (valueSlot) {
-            slot.setValueSlot(this, &valueSlot);
+            slot.setValueSlot(&valueSlot);
             return true;
         }
     } else if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
         if (i >= sparseArrayCutoff) {
             SparseArrayValueMap::iterator it = map->find(i);
             if (it != map->end()) {
-                slot.setValueSlot(this, &it->second);
+                slot.setValueSlot(&it->second);
                 return true;
             }
         }
index fbf043aa3271e8573bd098eb33a224a47d944ab3..6dc134c51306031f77820757fa0f8dedc3aa0941 100644 (file)
@@ -58,7 +58,7 @@ namespace KJS {
     void setLazyCreationData(void*);
 
   private:
-    static JSValue* lengthGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
+    static JSValue* lengthGetter(ExecState*, const Identifier&, const PropertySlot&);
     bool inlineGetOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&);
 
     void setLength(unsigned);
index 670d6955b2c941b6da2cec15c7df5404ee400d4e..e34ee2e896669220c5bf976737b45f3a33698eb9 100644 (file)
@@ -82,10 +82,10 @@ bool ArrayPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& prope
 // Helper function
 static JSValue* getProperty(ExecState* exec, JSObject* obj, unsigned index)
 {
-    PropertySlot slot;
+    PropertySlot slot(obj);
     if (!obj->getPropertySlot(exec, index, slot))
         return 0;
-    return slot.getValue(exec, obj, index);
+    return slot.getValue(exec, index);
 }
 
 JSValue* arrayProtoFuncToString(ExecState* exec, JSObject* thisObj, const List&)
@@ -513,12 +513,12 @@ JSValue* arrayProtoFuncFilter(ExecState* exec, JSObject* thisObj, const List& ar
     unsigned filterIndex = 0;
     unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
     for (unsigned k = 0; k < length && !exec->hadException(); ++k) {
-        PropertySlot slot;
+        PropertySlot slot(thisObj);
 
         if (!thisObj->getPropertySlot(exec, k, slot))
             continue;
 
-        JSValue* v = slot.getValue(exec, thisObj, k);
+        JSValue* v = slot.getValue(exec, k);
 
         List eachArguments;
 
@@ -549,11 +549,11 @@ JSValue* arrayProtoFuncMap(ExecState* exec, JSObject* thisObj, const List& args)
     JSObject* resultArray = static_cast<JSObject*>(exec->lexicalGlobalObject()->arrayConstructor()->construct(exec, mapArgs));
 
     for (unsigned k = 0; k < length && !exec->hadException(); ++k) {
-        PropertySlot slot;
+        PropertySlot slot(thisObj);
         if (!thisObj->getPropertySlot(exec, k, slot))
             continue;
 
-        JSValue* v = slot.getValue(exec, thisObj, k);
+        JSValue* v = slot.getValue(exec, k);
 
         List eachArguments;
 
@@ -586,14 +586,14 @@ JSValue* arrayProtoFuncEvery(ExecState* exec, JSObject* thisObj, const List& arg
 
     unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
     for (unsigned k = 0; k < length && !exec->hadException(); ++k) {
-        PropertySlot slot;
+        PropertySlot slot(thisObj);
 
         if (!thisObj->getPropertySlot(exec, k, slot))
             continue;
 
         List eachArguments;
 
-        eachArguments.append(slot.getValue(exec, thisObj, k));
+        eachArguments.append(slot.getValue(exec, k));
         eachArguments.append(jsNumber(k));
         eachArguments.append(thisObj);
 
@@ -619,12 +619,12 @@ JSValue* arrayProtoFuncForEach(ExecState* exec, JSObject* thisObj, const List& a
 
     unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
     for (unsigned k = 0; k < length && !exec->hadException(); ++k) {
-        PropertySlot slot;
+        PropertySlot slot(thisObj);
         if (!thisObj->getPropertySlot(exec, k, slot))
             continue;
 
         List eachArguments;
-        eachArguments.append(slot.getValue(exec, thisObj, k));
+        eachArguments.append(slot.getValue(exec, k));
         eachArguments.append(jsNumber(k));
         eachArguments.append(thisObj);
 
@@ -646,12 +646,12 @@ JSValue* arrayProtoFuncSome(ExecState* exec, JSObject* thisObj, const List& args
 
     unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec);
     for (unsigned k = 0; k < length && !exec->hadException(); ++k) {
-        PropertySlot slot;
+        PropertySlot slot(thisObj);
         if (!thisObj->getPropertySlot(exec, k, slot))
             continue;
 
         List eachArguments;
-        eachArguments.append(slot.getValue(exec, thisObj, k));
+        eachArguments.append(slot.getValue(exec, k));
         eachArguments.append(jsNumber(k));
         eachArguments.append(thisObj);
 
index e28336dc99ff7f9cc1c43df7aa504b3f66e64fb9..940621e15933f1fc39a0f0e5809b05f99fadbe3b 100644 (file)
@@ -99,21 +99,21 @@ JSValue* FunctionImp::callAsFunction(ExecState* exec, JSObject* thisObj, const L
     }
 }
 
-JSValue* FunctionImp::argumentsGetter(ExecState* exec, JSObject*, const Identifier&, const PropertySlot& slot)
+JSValue* FunctionImp::argumentsGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
 {
     FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase());
     ASSERT(exec->machine());
     return exec->machine()->retrieveArguments(exec, thisObj);
 }
 
-JSValue* FunctionImp::callerGetter(ExecState* exec, JSObject*, const Identifier&, const PropertySlot& slot)
+JSValue* FunctionImp::callerGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
 {
     FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase());
     ASSERT(exec->machine());
     return exec->machine()->retrieveCaller(exec, thisObj);
 }
 
-JSValue* FunctionImp::lengthGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot& slot)
+JSValue* FunctionImp::lengthGetter(ExecState*, const Identifier&, const PropertySlot& slot)
 {
     FunctionImp* thisObj = static_cast<FunctionImp*>(slot.slotBase());
     return jsNumber(thisObj->body->parameters().size());
@@ -302,7 +302,7 @@ void Arguments::mark()
     _activationObject->mark();
 }
 
-JSValue* Arguments::mappedIndexGetter(ExecState* exec, JSObject*, const Identifier& propertyName, const PropertySlot& slot)
+JSValue* Arguments::mappedIndexGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
 {
   Arguments* thisObj = static_cast<Arguments*>(slot.slotBase());
   return thisObj->_activationObject->get(exec, thisObj->indexToNameMap[propertyName]);
index 15dd059b61ed760f2794cc4c7d9476591c570002..be2d9f63a16a70cb14efd66afefcb590caf07885 100644 (file)
@@ -86,9 +86,9 @@ namespace KJS {
   private:
     ScopeChain _scope;
 
-    static JSValue* argumentsGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
-    static JSValue* callerGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
-    static JSValue* lengthGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&);
+    static JSValue* argumentsGetter(ExecState*, const Identifier&, const PropertySlot&);
+    static JSValue* callerGetter(ExecState*, const Identifier&, const PropertySlot&);
+    static JSValue* lengthGetter(ExecState*, const Identifier&, const PropertySlot&);
   };
 
   class IndexToNameMap {
@@ -115,7 +115,7 @@ namespace KJS {
     virtual const ClassInfo* classInfo() const { return &info; }
     static const ClassInfo info;
   private:
-    static JSValue* mappedIndexGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot& slot);
+    static JSValue* mappedIndexGetter(ExecState*, const Identifier&, const PropertySlot& slot);
 
     JSActivation* _activationObject;
     mutable IndexToNameMap indexToNameMap;
index 55f4836983a8b5ecfaef1addcb0ee03c657fce54..c144cec894b719088142f23e5ee2dba470fb1315 100644 (file)
@@ -1094,34 +1094,11 @@ SourceElement:
 
 static AddNode* makeAddNode(ExpressionNode* left, ExpressionNode* right)
 {
-    JSType t1 = left->expectedReturnType();
-    JSType t2 = right->expectedReturnType();
-
-    if (t1 == NumberType && t2 == NumberType)
-        return new AddNumbersNode(left, right);
-    if (t1 == StringType && t2 == StringType)
-        return new AddStringsNode(left, right);
-    if (t1 == StringType)
-        return new AddStringLeftNode(left, right);
-    if (t2 == StringType)
-        return new AddStringRightNode(left, right);
     return new AddNode(left, right);
 }
 
 static LessNode* makeLessNode(ExpressionNode* left, ExpressionNode* right)
 {
-    JSType t1 = left->expectedReturnType();
-    JSType t2 = right->expectedReturnType();
-    
-    if (t1 == StringType && t2 == StringType)
-        return new LessStringsNode(left, right);
-
-    // There are certainly more efficient ways to do this type check if necessary
-    if (t1 == NumberType || t1 == BooleanType || t1 == UndefinedType || t1 == NullType ||
-        t2 == NumberType || t2 == BooleanType || t2 == UndefinedType || t2 == NullType)
-        return new LessNumbersNode(left, right);
-
-    // Neither is certain to be a number, nor were both certain to be strings, so we use the default (slow) implementation.
     return new LessNode(left, right);
 }
 
index fe23e260bf20bc26ac06f50f4ac9495799d8c58a..4773f8f8478295fd2ca6a6b95861f02e49cb83ed 100644 (file)
@@ -83,6 +83,11 @@ JSObject* StringImp::toObject(ExecState *exec) const
     return new StringInstance(exec->lexicalGlobalObject()->stringPrototype(), const_cast<StringImp*>(this));
 }
 
+JSObject* StringImp::toThisObject(ExecState* exec) const
+{
+    return new StringInstance(exec->lexicalGlobalObject()->stringPrototype(), const_cast<StringImp*>(this));
+}
+
 // ------------------------------ NumberImp ------------------------------------
 
 JSType NumberImp::type() const
@@ -126,6 +131,13 @@ JSObject *NumberImp::toObject(ExecState *exec) const
   return static_cast<JSObject *>(exec->lexicalGlobalObject()->numberConstructor()->construct(exec,args));
 }
 
+JSObject* NumberImp::toThisObject(ExecState* exec) const
+{
+    List args;
+    args.append(const_cast<NumberImp*>(this));
+    return static_cast<JSObject*>(exec->lexicalGlobalObject()->numberConstructor()->construct(exec, args));
+}
+
 bool NumberImp::getUInt32(uint32_t& uint32) const
 {
     uint32 = static_cast<uint32_t>(val);
@@ -197,6 +209,34 @@ JSObject *GetterSetterImp::toObject(ExecState *exec) const
     return jsNull()->toObject(exec);
 }
 
+bool GetterSetterImp::getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&)
+{
+    ASSERT_NOT_REACHED();
+    return false;
+}
+
+bool GetterSetterImp::getOwnPropertySlot(ExecState*, unsigned, PropertySlot&)
+{
+    ASSERT_NOT_REACHED();
+    return false;
+}
+
+void GetterSetterImp::put(ExecState*, const Identifier&, JSValue*)
+{
+    ASSERT_NOT_REACHED();
+}
+
+void GetterSetterImp::put(ExecState*, unsigned, JSValue*)
+{
+    ASSERT_NOT_REACHED();
+}
+
+JSObject* GetterSetterImp::toThisObject(ExecState*) const
+{
+    ASSERT_NOT_REACHED();
+    return 0;
+}
+
 // ------------------------------ LabelStack -----------------------------------
 
 bool LabelStack::push(const Identifier &id)
index b41f10e0b9ebd72abf1f02ff02da923b90e53e59..2c681fb61a6f2e92725e3a8eff95c5d293fc000d 100644 (file)
@@ -59,7 +59,8 @@ namespace KJS {
     virtual double toNumber(ExecState *exec) const;
     virtual JSObject *toObject(ExecState *exec) const;
     virtual UString toString(ExecState*) const;
-    
+    virtual JSObject* toThisObject(ExecState*) const;
+
     UString val;
   };
 
index d6fa8579ca1ab003cc105e4b40cd4e785294fd41..5b0ef13e1053c2f3c07e434218081cb86aa498df 100644 (file)
@@ -83,7 +83,7 @@ namespace KJS {
    * @internal
    * Helper for getStaticFunctionSlot and getStaticPropertySlot
    */
-  inline JSValue* staticFunctionGetter(ExecState* exec, JSObject*, const Identifier& propertyName, const PropertySlot& slot)
+  inline JSValue* staticFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
   {
       // Look for cached value in dynamic map of properties (in JSObject)
       JSObject* thisObj = slot.slotBase();
@@ -102,7 +102,7 @@ namespace KJS {
    * Helper for getStaticValueSlot and getStaticPropertySlot
    */
   template <class ThisImp>
-  inline JSValue* staticValueGetter(ExecState* exec, JSObject*, const Identifier&, const PropertySlot& slot)
+  inline JSValue* staticValueGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
   {
       ThisImp* thisObj = static_cast<ThisImp*>(slot.slotBase());
       const HashEntry* entry = slot.staticEntry();
index 21fa92c5b3ea493e29d62d6556b05dc8f0ddc932..eb7fcda238b82ffe45917b70d3c1dc3b65431d78 100644 (file)
@@ -200,9 +200,9 @@ JSValue* mathProtoFuncPow(ExecState* exec, JSObject*, const List& args)
     double arg2 = args[1]->toNumber(exec);
 
     if (isnan(arg2))
-        return jsNumber(NaN);
+        return jsNaN();
     if (isinf(arg2) && fabs(arg) == 1)
-        return jsNumber(NaN);
+        return jsNaN();
     return jsNumber(pow(arg, arg2));
 }
 
index d05b41e21f158587799e8fde7a5afe58ef4a92b3..fd80460cab806dc241a9f5344b64ff9fb9325c0c 100644 (file)
 
 namespace KJS {
 
-class FunctionBodyNodeWithDebuggerHooks : public FunctionBodyNode {
-public:
-    FunctionBodyNodeWithDebuggerHooks(SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;
-    virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
-};
-
-#if COMPILER(GCC)
-#define UNLIKELY(x) \
-  __builtin_expect ((x), 0)
-#else
-#define UNLIKELY(x) x
-#endif
-    
 #define KJS_CHECKEXCEPTION \
 if (UNLIKELY(exec->hadException())) \
     return rethrowException(exec);
@@ -86,26 +73,6 @@ if (UNLIKELY(exec->hadException())) { \
     return; \
 }
 
-#if !ASSERT_DISABLED
-static inline bool canSkipLookup(OldInterpreterExecState* exec, const Identifier& ident)
-{
-    // Static lookup in EvalCode is impossible because variables aren't DontDelete.
-    // Static lookup in GlobalCode may be possible, but we haven't implemented support for it yet.
-    if (exec->codeType() != FunctionCode)
-        return false;
-
-    // Static lookup is impossible when something dynamic has been added to the front of the scope chain.
-    if (exec->variableObject() != exec->scopeChain().top())
-        return false;
-
-    // Static lookup is impossible if the symbol isn't statically declared.
-    if (!exec->variableObject()->symbolTable().contains(ident.ustring().rep()))
-        return false;
-
-    return true;
-}
-#endif
-
 static inline bool isConstant(const LocalStorage& localStorage, size_t index)
 {
     ASSERT(index < localStorage.size());
@@ -235,34 +202,6 @@ Node::Node(JSType expectedReturn)
     m_line = lexer().lineNo();
 }
 
-double ExpressionNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* value = evaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return value->toNumber(exec);
-}
-
-bool ExpressionNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* value = evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return value->toBoolean(exec);
-}
-
-int32_t ExpressionNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    JSValue* value = evaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return value->toInt32(exec);
-}
-
-uint32_t ExpressionNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    JSValue* value = evaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return value->toUInt32(exec);
-}
-
 static void substitute(UString& string, const UString& substring) KJS_FAST_CALL;
 static void substitute(UString& string, const UString& substring)
 {
@@ -288,105 +227,6 @@ static inline const UString currentSourceURL(ExecState*)
     return UString();
 }
 
-JSValue* Node::setErrorCompletion(OldInterpreterExecState* exec, ErrorType e, const char* msg)
-{
-    return exec->setThrowCompletion(Error::create(exec, e, msg, lineNo(), currentSourceId(exec), currentSourceURL(exec)));
-}
-
-JSValue* Node::setErrorCompletion(OldInterpreterExecState* exec, ErrorType e, const char* msg, const Identifier& ident)
-{
-    UString message = msg;
-    substitute(message, ident.ustring());
-    return exec->setThrowCompletion(Error::create(exec, e, message, lineNo(), currentSourceId(exec), currentSourceURL(exec)));
-}
-
-JSValue* Node::throwError(OldInterpreterExecState* exec, ErrorType e, const char* msg)
-{
-    return KJS::throwError(exec, e, msg, lineNo(), currentSourceId(exec), currentSourceURL(exec));
-}
-
-JSValue* Node::throwError(OldInterpreterExecState* exec, ErrorType e, const char* msg, const char* string)
-{
-    UString message = msg;
-    substitute(message, string);
-    return KJS::throwError(exec, e, message, lineNo(), currentSourceId(exec), currentSourceURL(exec));
-}
-
-JSValue* Node::throwError(OldInterpreterExecState* exec, ErrorType e, const char* msg, JSValue* v, Node* expr)
-{
-    UString message = msg;
-    substitute(message, v->toString(exec));
-    substitute(message, expr->toString());
-    return KJS::throwError(exec, e, message, lineNo(), currentSourceId(exec), currentSourceURL(exec));
-}
-
-JSValue* Node::throwError(OldInterpreterExecState* exec, ErrorType e, const char* msg, const Identifier& label)
-{
-    UString message = msg;
-    substitute(message, label.ustring());
-    return KJS::throwError(exec, e, message, lineNo(), currentSourceId(exec), currentSourceURL(exec));
-}
-
-JSValue* Node::throwError(OldInterpreterExecState* exec, ErrorType e, const char* msg, JSValue* v, Node* e1, Node* e2)
-{
-    UString message = msg;
-    substitute(message, v->toString(exec));
-    substitute(message, e1->toString());
-    substitute(message, e2->toString());
-    return KJS::throwError(exec, e, message, lineNo(), currentSourceId(exec), currentSourceURL(exec));
-}
-
-JSValue* Node::throwError(OldInterpreterExecState* exec, ErrorType e, const char* msg, JSValue* v, Node* expr, const Identifier& label)
-{
-    UString message = msg;
-    substitute(message, v->toString(exec));
-    substitute(message, expr->toString());
-    substitute(message, label.ustring());
-    return KJS::throwError(exec, e, message, lineNo(), currentSourceId(exec), currentSourceURL(exec));
-}
-
-JSValue* Node::throwError(OldInterpreterExecState* exec, ErrorType e, const char* msg, JSValue* v, const Identifier& label)
-{
-    UString message = msg;
-    substitute(message, v->toString(exec));
-    substitute(message, label.ustring());
-    return KJS::throwError(exec, e, message, lineNo(), currentSourceId(exec), currentSourceURL(exec));
-}
-
-JSValue* Node::throwUndefinedVariableError(OldInterpreterExecState* exec, const Identifier& ident)
-{
-    return throwError(exec, ReferenceError, "Can't find variable: %s", ident);
-}
-
-void Node::handleException(OldInterpreterExecState* exec)
-{
-    handleException(exec, exec->exception());
-}
-
-void Node::handleException(OldInterpreterExecState* exec, JSValue* exceptionValue)
-{
-    if (exceptionValue->isObject()) {
-        JSObject* exception = static_cast<JSObject*>(exceptionValue);
-        if (!exception->hasProperty(exec, "line") && !exception->hasProperty(exec, "sourceURL")) {
-            exception->put(exec, "line", jsNumber(m_line));
-            exception->put(exec, "sourceURL", jsString(currentSourceURL(exec)));
-        }
-    }
-#if 0
-    Debugger* dbg = exec->dynamicGlobalObject()->debugger();
-    if (dbg && !dbg->hasHandledException(exec, exceptionValue))
-        dbg->exception(exec, currentSourceId(exec), m_line, exceptionValue);
-#endif
-}
-
-NEVER_INLINE JSValue* Node::rethrowException(OldInterpreterExecState* exec)
-{
-    JSValue* exception = exec->exception();
-    exec->clearException();
-    handleException(exec, exception);
-    return exec->setThrowCompletion(exception);
-}
-
 RegisterID* Node::emitThrowError(CodeGenerator& generator, ErrorType e, const char* msg)
 {
     RegisterID* exception = generator.emitNewError(generator.newTemporary(), e, jsString(msg));
@@ -435,21 +275,11 @@ BreakpointCheckStatement::BreakpointCheckStatement(PassRefPtr<StatementNode> sta
     ASSERT(m_statement);
 }
 
-JSValue* BreakpointCheckStatement::execute(OldInterpreterExecState* exec)
-{
-    return m_statement->execute(exec);
-}
-
 void BreakpointCheckStatement::streamTo(SourceStream& stream) const
 {
     m_statement->streamTo(stream);
 }
 
-void BreakpointCheckStatement::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_statement.get());
-}
-
 // ------------------------------ NullNode -------------------------------------
 
 RegisterID* NullNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -457,11 +287,6 @@ RegisterID* NullNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.emitLoad(generator.finalDestination(dst), jsNull());
 }
 
-JSValue* NullNode::evaluate(OldInterpreterExecState* )
-{
-    return jsNull();
-}
-
 // ------------------------------ FalseNode ----------------------------------
 
 RegisterID* FalseNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -469,11 +294,6 @@ RegisterID* FalseNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.emitLoad(generator.finalDestination(dst), false);
 }
 
-JSValue* FalseNode::evaluate(OldInterpreterExecState*)
-{
-    return jsBoolean(false);
-}
-
 // ------------------------------ TrueNode ----------------------------------
 
 RegisterID* TrueNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -481,11 +301,6 @@ RegisterID* TrueNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.emitLoad(generator.finalDestination(dst), true);
 }
 
-JSValue* TrueNode::evaluate(OldInterpreterExecState*)
-{
-    return jsBoolean(true);
-}
-
 // ------------------------------ NumberNode -----------------------------------
 
 RegisterID* NumberNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -493,53 +308,6 @@ RegisterID* NumberNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.emitLoad(generator.finalDestination(dst), m_double);
 }
 
-JSValue* NumberNode::evaluate(OldInterpreterExecState*)
-{
-    // Number nodes are only created when the number can't fit in a JSImmediate, so no need to check again.
-    return jsNumberCell(m_double);
-}
-
-double NumberNode::evaluateToNumber(OldInterpreterExecState*)
-{
-    return m_double;
-}
-
-bool NumberNode::evaluateToBoolean(OldInterpreterExecState*)
-{
-    return m_double < 0.0 || m_double > 0.0; // false for NaN as well as 0
-}
-
-int32_t NumberNode::evaluateToInt32(OldInterpreterExecState*)
-{
-    return JSValue::toInt32(m_double);
-}
-
-uint32_t NumberNode::evaluateToUInt32(OldInterpreterExecState*)
-{
-    return JSValue::toUInt32(m_double);
-}
-
-// ------------------------------ ImmediateNumberNode -----------------------------------
-
-JSValue* ImmediateNumberNode::evaluate(OldInterpreterExecState*)
-{
-    return m_value;
-}
-
-int32_t ImmediateNumberNode::evaluateToInt32(OldInterpreterExecState*)
-{
-    return JSImmediate::getTruncatedInt32(m_value);
-}
-
-uint32_t ImmediateNumberNode::evaluateToUInt32(OldInterpreterExecState*)
-{
-    uint32_t i;
-    if (JSImmediate::getTruncatedUInt32(m_value, i))
-        return i;
-    bool ok;
-    return JSValue::toUInt32SlowCase(m_double, ok);
-}
-
 // ------------------------------ StringNode -----------------------------------
 
 RegisterID* StringNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -548,21 +316,6 @@ RegisterID* StringNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.emitLoad(generator.finalDestination(dst), jsOwnedString(m_value));
 }
 
-JSValue* StringNode::evaluate(OldInterpreterExecState*)
-{
-    return jsOwnedString(m_value);
-}
-
-double StringNode::evaluateToNumber(OldInterpreterExecState*)
-{
-    return m_value.toDouble();
-}
-
-bool StringNode::evaluateToBoolean(OldInterpreterExecState*)
-{
-    return !m_value.isEmpty();
-}
-
 // ------------------------------ RegExpNode -----------------------------------
 
 RegisterID* RegExpNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -572,12 +325,6 @@ RegisterID* RegExpNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.emitNewRegExp(generator.finalDestination(dst), m_regExp.get());
 }
 
-JSValue* RegExpNode::evaluate(OldInterpreterExecState*)
-{
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
 // ------------------------------ ThisNode -------------------------------------
 
 RegisterID* ThisNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -585,12 +332,6 @@ RegisterID* ThisNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.moveToDestinationIfNeeded(dst, generator.thisRegister());
 }
 
-// ECMA 11.1.1
-JSValue* ThisNode::evaluate(OldInterpreterExecState* exec)
-{
-    return exec->thisValue();
-}
-
 // ------------------------------ ResolveNode ----------------------------------
 
 RegisterID* ResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -601,3357 +342,624 @@ RegisterID* ResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.emitResolve(generator.finalDestination(dst), m_ident);
 }
 
-// ECMA 11.1.2 & 10.1.4
-JSValue* ResolveNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    // Check for missed optimization opportunity.
-    ASSERT(!canSkipLookup(exec, m_ident));
-
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // we must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    do {
-        JSObject* o = *iter;
+// ------------------------------ ArrayNode ------------------------------------
 
-        if (o->getPropertySlot(exec, m_ident, slot))
-            return slot.getValue(exec, o, m_ident);
 
-        ++iter;
-    } while (iter != end);
+RegisterID* ArrayNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+{
+    RefPtr<RegisterID> newArray = generator.emitNewArray(generator.tempDestination(dst));
+    unsigned length = 0;
 
-    return throwUndefinedVariableError(exec, m_ident);
-}
+    RegisterID* value;
+    for (ElementNode* n = m_element.get(); n; n = n->m_next.get()) {
+        value = generator.emitNode(n->m_node.get());
+        length += n->m_elision;
+        generator.emitPutByIndex(newArray.get(), length++, value);
+    }
 
-JSValue* ResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
+    value = generator.emitLoad(generator.newTemporary(), jsNumber(m_elision + length));
+    generator.emitPutById(newArray.get(), generator.propertyNames().length, value);
 
-double ResolveNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toNumber(exec);
+    return generator.moveToDestinationIfNeeded(dst, newArray.get());
 }
 
-bool ResolveNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return v->toBoolean(exec);
-}
+// ------------------------------ ObjectLiteralNode ----------------------------
 
-int32_t ResolveNode::evaluateToInt32(OldInterpreterExecState* exec)
+RegisterID* ObjectLiteralNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toInt32(exec);
+    if (m_list)
+        return generator.emitNode(dst, m_list.get());
+    else
+        return generator.emitNewObject(generator.finalDestination(dst));
 }
 
-uint32_t ResolveNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toUInt32(exec);
-}
+// ------------------------------ PropertyListNode -----------------------------
 
-static size_t getSymbolTableEntry(OldInterpreterExecState* exec, const Identifier& ident, const SymbolTable& symbolTable, size_t& stackDepth) 
+RegisterID* PropertyListNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    int index = symbolTable.get(ident.ustring().rep()).getIndex();
-    if (index != missingSymbolMarker()) {
-        stackDepth = 0;
-        return index;
-    }
+    RefPtr<RegisterID> newObj = generator.tempDestination(dst);
     
-    if (ident == exec->propertyNames().arguments) {
-        stackDepth = 0;
-        return missingSymbolMarker();
-    }
+    generator.emitNewObject(newObj.get());
     
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-    size_t depth = 0;
-    for (; iter != end; ++iter, ++depth) {
-        JSObject* currentScope = *iter;
-        if (!currentScope->isVariableObject()) 
-            break;
-        JSVariableObject* currentVariableObject = static_cast<JSVariableObject*>(currentScope);
-        index = currentVariableObject->symbolTable().get(ident.ustring().rep()).getIndex();
-        if (index != missingSymbolMarker()) {
-            stackDepth = depth;
-            return index;
+    for (PropertyListNode* p = this; p; p = p->m_next.get()) {
+        RegisterID* value = generator.emitNode(p->m_node->m_assign.get());
+        
+        switch (p->m_node->m_type) {
+            case PropertyNode::Constant: {
+                generator.emitPutById(newObj.get(), p->m_node->name(), value);
+                break;
+            }
+            case PropertyNode::Getter: {
+                generator.emitPutGetter(newObj.get(), p->m_node->name(), value);
+                break;
+            }
+            case PropertyNode::Setter: {
+                generator.emitPutSetter(newObj.get(), p->m_node->name(), value);
+                break;
+            }
+            default:
+                ASSERT_NOT_REACHED();
         }
-        if (currentVariableObject->isDynamicScope())
-            break;
     }
-    stackDepth = depth;
-    return missingSymbolMarker();
+    
+    return generator.moveToDestinationIfNeeded(dst, newObj.get());
 }
 
-void ResolveNode::optimizeVariableAccess(OldInterpreterExecState* exec, const SymbolTable& symbolTable, const LocalStorage&, NodeStack&)
-{
-    size_t depth = 0;
-    int index = getSymbolTableEntry(exec, m_ident, symbolTable, depth);
-    if (index != missingSymbolMarker()) {
-        if (!depth)
-            new (this) LocalVarAccessNode(index);
-        else
-            new (this) ScopedVarAccessNode(index, depth);
-        return;
-    }
+// ------------------------------ BracketAccessorNode --------------------------------
 
-    if (!depth)
-        return;
+RegisterID* BracketAccessorNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+{
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RegisterID* property = generator.emitNode(m_subscript.get());
 
-    new (this) NonLocalVarAccessNode(depth);
+    return generator.emitGetByVal(generator.finalDestination(dst), base.get(), property);
 }
 
-JSValue* LocalVarAccessNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    return exec->localStorage()[m_index].value;
-}
+// ------------------------------ DotAccessorNode --------------------------------
 
-JSValue* LocalVarAccessNode::evaluate(OldInterpreterExecState* exec)
+RegisterID* DotAccessorNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluate(exec);
+    RegisterID* base = generator.emitNode(m_base.get());
+    return generator.emitGetById(generator.finalDestination(dst), base, m_ident);
 }
 
-double LocalVarAccessNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec)->toNumber(exec);
-}
+// ------------------------------ ArgumentListNode -----------------------------
 
-bool LocalVarAccessNode::evaluateToBoolean(OldInterpreterExecState* exec)
+RegisterID* ArgumentListNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluate(exec)->toBoolean(exec);
+    ASSERT(m_expr);
+    return generator.emitNode(dst, m_expr.get());
 }
 
-int32_t LocalVarAccessNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec)->toInt32(exec);
-}
+// ------------------------------ NewExprNode ----------------------------------
 
-uint32_t LocalVarAccessNode::evaluateToUInt32(OldInterpreterExecState* exec)
+RegisterID* NewExprNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluate(exec)->toUInt32(exec);
+    RefPtr<RegisterID> r0 = generator.emitNode(m_expr.get());
+    return generator.emitConstruct(generator.finalDestination(dst), r0.get(), m_args.get());
 }
 
-static inline JSValue* getNonLocalSymbol(OldInterpreterExecState* exec, size_t, size_t scopeDepth)
+RegisterID* EvalFunctionCallNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    for (size_t i = 0; i < scopeDepth; ++iter, ++i)
-        ASSERT(iter != chain.end());
-#ifndef NDEBUG
-    JSObject* scope = *iter;
-#endif
-    ASSERT(scope->isVariableObject());
-    ASSERT_NOT_REACHED();
-    return 0;
+    RefPtr<RegisterID> base = generator.tempDestination(dst);
+    RegisterID* func = generator.newTemporary();
+    generator.emitResolveWithBase(base.get(), func, CommonIdentifiers::shared()->eval);
+    return generator.emitCallEval(generator.finalDestination(dst, base.get()), func, base.get(), m_args.get());
 }
 
-JSValue* ScopedVarAccessNode::inlineEvaluate(OldInterpreterExecState* exec)
+RegisterID* FunctionCallValueNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return getNonLocalSymbol(exec, m_index, m_scopeDepth);
+    RefPtr<RegisterID> func = generator.emitNode(m_expr.get());
+    return generator.emitCall(generator.finalDestination(dst), func.get(), 0, m_args.get());
 }
 
-JSValue* ScopedVarAccessNode::evaluate(OldInterpreterExecState* exec)
+RegisterID* FunctionCallResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluate(exec);
-}
+    if (RegisterID* local = generator.registerForLocal(m_ident))
+        return generator.emitCall(generator.finalDestination(dst), local, 0, m_args.get());
 
-double ScopedVarAccessNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec)->toNumber(exec);
-}
+    int index = 0;
+    size_t depth = 0;
+    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
+        RegisterID* func = generator.emitGetScopedVar(generator.newTemporary(), depth, index);
+        return generator.emitCall(generator.finalDestination(dst), func, 0, m_args.get());
+    }
 
-bool ScopedVarAccessNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec)->toBoolean(exec);
+    RefPtr<RegisterID> base = generator.tempDestination(dst);
+    RegisterID* func = generator.newTemporary();
+    generator.emitResolveFunction(base.get(), func, m_ident);
+    return generator.emitCall(generator.finalDestination(dst, base.get()), func, base.get(), m_args.get());
 }
 
-int32_t ScopedVarAccessNode::evaluateToInt32(OldInterpreterExecState* exec)
+RegisterID* FunctionCallBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluate(exec)->toInt32(exec);
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RegisterID* property = generator.emitNode(m_subscript.get());
+    RegisterID* function = generator.emitGetByVal(generator.newTemporary(), base.get(), property);
+    return generator.emitCall(generator.finalDestination(dst, base.get()), function, base.get(), m_args.get());
 }
 
-uint32_t ScopedVarAccessNode::evaluateToUInt32(OldInterpreterExecState* exec)
+RegisterID* FunctionCallDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluate(exec)->toUInt32(exec);
-}
-
-JSValue* NonLocalVarAccessNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    // Check for missed optimization opportunity.
-    ASSERT(!canSkipLookup(exec, m_ident));
-    
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-    for (size_t i = 0; i < m_scopeDepth; ++i, ++iter)
-        ASSERT(iter != end);
-
-    // we must always have something in the scope chain
-    ASSERT(iter != end);
-    
-    PropertySlot slot;
-    do {
-        JSObject* o = *iter;
-        
-        if (o->getPropertySlot(exec, m_ident, slot))
-            return slot.getValue(exec, o, m_ident);
-        
-        ++iter;
-    } while (iter != end);
-    
-    return throwUndefinedVariableError(exec, m_ident);
-}
-
-JSValue* NonLocalVarAccessNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
-
-double NonLocalVarAccessNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec)->toNumber(exec);
-}
-
-bool NonLocalVarAccessNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec)->toBoolean(exec);
-}
-
-int32_t NonLocalVarAccessNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec)->toInt32(exec);
-}
-
-uint32_t NonLocalVarAccessNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec)->toUInt32(exec);
-}
-
-// ------------------------------ ElementNode ----------------------------------
-
-void ElementNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_next)
-        nodeStack.append(m_next.get());
-    ASSERT(m_node);
-    nodeStack.append(m_node.get());
-}
-
-// ECMA 11.1.4
-JSValue* ElementNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSObject* array = exec->lexicalGlobalObject()->arrayConstructor()->construct(exec, exec->emptyList());
-    int length = 0;
-    for (ElementNode* n = this; n; n = n->m_next.get()) {
-        JSValue* val = n->m_node->evaluate(exec);
-        KJS_CHECKEXCEPTIONVALUE
-        length += n->m_elision;
-        array->put(exec, length++, val);
-    }
-    return array;
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RegisterID* function = generator.emitGetById(generator.newTemporary(), base.get(), m_ident);
+    return generator.emitCall(generator.finalDestination(dst, base.get()), function, base.get(), m_args.get());
 }
 
-// ------------------------------ ArrayNode ------------------------------------
-
+// ------------------------------ PostfixResolveNode ----------------------------------
 
-RegisterID* ArrayNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+RegisterID* PostIncResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    RefPtr<RegisterID> newArray = generator.emitNewArray(generator.tempDestination(dst));
-    unsigned length = 0;
-
-    RegisterID* value;
-    for (ElementNode* n = m_element.get(); n; n = n->m_next.get()) {
-        value = generator.emitNode(n->m_node.get());
-        length += n->m_elision;
-        generator.emitPutByIndex(newArray.get(), length++, value);
+    // FIXME: I think we can detect the absense of dependent expressions here, 
+    // and emit a PreInc instead of a PostInc. A post-pass to eliminate dead
+    // code would work, too.
+    if (RegisterID* local = generator.registerForLocal(m_ident)) {
+        if (generator.isLocalConstant(m_ident))
+            return generator.emitToJSNumber(generator.finalDestination(dst), local);
+        
+        return generator.emitPostInc(generator.finalDestination(dst), local);
     }
 
-    value = generator.emitLoad(generator.newTemporary(), jsNumber(m_elision + length));
-    generator.emitPutById(newArray.get(), generator.propertyNames().length, value);
-
-    return generator.moveToDestinationIfNeeded(dst, newArray.get());
-}
-
-void ArrayNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_element)
-        nodeStack.append(m_element.get());
-}
-
-// ECMA 11.1.4
-JSValue* ArrayNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSObject* array;
-    int length;
-
-    if (m_element) {
-        array = static_cast<JSObject*>(m_element->evaluate(exec));
-        KJS_CHECKEXCEPTIONVALUE
-        length = m_optional ? array->get(exec, exec->propertyNames().length)->toInt32(exec) : 0;
-    } else {
-        JSValue* newArr = exec->lexicalGlobalObject()->arrayConstructor()->construct(exec, exec->emptyList());
-        array = static_cast<JSObject*>(newArr);
-        length = 0;
+    int index = 0;
+    size_t depth = 0;
+    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
+        RefPtr<RegisterID> value = generator.emitGetScopedVar(generator.newTemporary(), depth, index);
+        RegisterID* oldValue = generator.emitPostInc(generator.finalDestination(dst), value.get());
+        generator.emitPutScopedVar(depth, index, value.get());
+        return oldValue;
     }
 
-    if (m_optional)
-        array->put(exec, exec->propertyNames().length, jsNumber(m_elision + length));
-
-    return array;
-}
-
-// ------------------------------ ObjectLiteralNode ----------------------------
-
-RegisterID* ObjectLiteralNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    if (m_list)
-        return generator.emitNode(dst, m_list.get());
-    else
-        return generator.emitNewObject(generator.finalDestination(dst));
-}
-
-void ObjectLiteralNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_list)
-        nodeStack.append(m_list.get());
-}
-
-// ECMA 11.1.5
-JSValue* ObjectLiteralNode::evaluate(OldInterpreterExecState* exec)
-{
-    if (m_list)
-        return m_list->evaluate(exec);
-
-    return exec->lexicalGlobalObject()->objectConstructor()->construct(exec, exec->emptyList());
+    RefPtr<RegisterID> value = generator.newTemporary();
+    RefPtr<RegisterID> base = generator.emitResolveWithBase(generator.newTemporary(), value.get(), m_ident);
+    RegisterID* oldValue = generator.emitPostInc(generator.finalDestination(dst), value.get());
+    generator.emitPutById(base.get(), m_ident, value.get());
+    return oldValue;
 }
 
-// ------------------------------ PropertyListNode -----------------------------
-
-RegisterID* PropertyListNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+RegisterID* PostDecResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    RefPtr<RegisterID> newObj = generator.tempDestination(dst);
-    
-    generator.emitNewObject(newObj.get());
-    
-    for (PropertyListNode* p = this; p; p = p->m_next.get()) {
-        RegisterID* value = generator.emitNode(p->m_node->m_assign.get());
+    // FIXME: I think we can detect the absense of dependent expressions here, 
+    // and emit a PreDec instead of a PostDec. A post-pass to eliminate dead
+    // code would work, too.
+    if (RegisterID* local = generator.registerForLocal(m_ident)) {
+        if (generator.isLocalConstant(m_ident))
+            return generator.emitToJSNumber(generator.finalDestination(dst), local);
         
-        switch (p->m_node->m_type) {
-            case PropertyNode::Constant: {
-                generator.emitPutById(newObj.get(), p->m_node->name(), value);
-                break;
-            }
-            case PropertyNode::Getter: {
-                generator.emitPutGetter(newObj.get(), p->m_node->name(), value);
-                break;
-            }
-            case PropertyNode::Setter: {
-                generator.emitPutSetter(newObj.get(), p->m_node->name(), value);
-                break;
-            }
-            default:
-                ASSERT_NOT_REACHED();
-        }
+        return generator.emitPostDec(generator.finalDestination(dst), local);
     }
-    
-    return generator.moveToDestinationIfNeeded(dst, newObj.get());
-}
 
-void PropertyListNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_next)
-        nodeStack.append(m_next.get());
-    nodeStack.append(m_node.get());
-}
-
-// ECMA 11.1.5
-JSValue* PropertyListNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSObject* obj = exec->lexicalGlobalObject()->objectConstructor()->construct(exec, exec->emptyList());
-
-    for (PropertyListNode* p = this; p; p = p->m_next.get()) {
-        JSValue* v = p->m_node->m_assign->evaluate(exec);
-        KJS_CHECKEXCEPTIONVALUE
-
-        switch (p->m_node->m_type) {
-            case PropertyNode::Getter:
-                ASSERT(v->isObject());
-                obj->defineGetter(exec, p->m_node->name(), static_cast<JSObject* >(v));
-                break;
-            case PropertyNode::Setter:
-                ASSERT(v->isObject());
-                obj->defineSetter(exec, p->m_node->name(), static_cast<JSObject* >(v));
-                break;
-            case PropertyNode::Constant:
-                obj->put(exec, p->m_node->name(), v);
-                break;
-        }
+    int index = 0;
+    size_t depth = 0;
+    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
+        RefPtr<RegisterID> value = generator.emitGetScopedVar(generator.newTemporary(), depth, index);
+        RegisterID* oldValue = generator.emitPostDec(generator.finalDestination(dst), value.get());
+        generator.emitPutScopedVar(depth, index, value.get());
+        return oldValue;
     }
 
-    return obj;
-}
-
-// ------------------------------ PropertyNode -----------------------------
-
-void PropertyNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_assign.get());
-}
-
-// ECMA 11.1.5
-JSValue* PropertyNode::evaluate(OldInterpreterExecState*)
-{
-    ASSERT(false);
-    return jsNull();
+    RefPtr<RegisterID> value = generator.newTemporary();
+    RefPtr<RegisterID> base = generator.emitResolveWithBase(generator.newTemporary(), value.get(), m_ident);
+    RegisterID* oldValue = generator.emitPostDec(generator.finalDestination(dst), value.get());
+    generator.emitPutById(base.get(), m_ident, value.get());
+    return oldValue;
 }
 
-// ------------------------------ BracketAccessorNode --------------------------------
+// ------------------------------ PostfixBracketNode ----------------------------------
 
-RegisterID* BracketAccessorNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+RegisterID* PostIncBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
     RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RegisterID* property = generator.emitNode(m_subscript.get());
-
-    return generator.emitGetByVal(generator.finalDestination(dst), base.get(), property);
-}
-
-void BracketAccessorNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_subscript.get());
-    nodeStack.append(m_base.get());
-}
-
-// ECMA 11.2.1a
-JSValue* BracketAccessorNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* v2 = m_subscript->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSObject* o = v1->toObject(exec);
-    uint32_t i;
-    if (v2->getUInt32(i))
-        return o->get(exec, i);
-    return o->get(exec, Identifier(v2->toString(exec)));
-}
-
-JSValue* BracketAccessorNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
-
-double BracketAccessorNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toNumber(exec);
-}
-
-bool BracketAccessorNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return v->toBoolean(exec);
-}
-
-int32_t BracketAccessorNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toInt32(exec);
-}
-
-uint32_t BracketAccessorNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toUInt32(exec);
-}
-
-// ------------------------------ DotAccessorNode --------------------------------
-
-RegisterID* DotAccessorNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RegisterID* base = generator.emitNode(m_base.get());
-    return generator.emitGetById(generator.finalDestination(dst), base, m_ident);
-}
-
-void DotAccessorNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_base.get());
+    RefPtr<RegisterID> property = generator.emitNode(m_subscript.get());
+    RefPtr<RegisterID> value = generator.emitGetByVal(generator.newTemporary(), base.get(), property.get());
+    RegisterID* oldValue = generator.emitPostInc(generator.finalDestination(dst), value.get());
+    generator.emitPutByVal(base.get(), property.get(), value.get());
+    return oldValue;
 }
 
-// ECMA 11.2.1b
-JSValue* DotAccessorNode::inlineEvaluate(OldInterpreterExecState* exec)
+RegisterID* PostDecBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    JSValue* v = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    return v->toObject(exec)->get(exec, m_ident);
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RefPtr<RegisterID> property = generator.emitNode(m_subscript.get());
+    RefPtr<RegisterID> value = generator.emitGetByVal(generator.newTemporary(), base.get(), property.get());
+    RegisterID* oldValue = generator.emitPostDec(generator.finalDestination(dst), value.get());
+    generator.emitPutByVal(base.get(), property.get(), value.get());
+    return oldValue;
 }
 
-JSValue* DotAccessorNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
+// ------------------------------ PostfixDotNode ----------------------------------
 
-double DotAccessorNode::evaluateToNumber(OldInterpreterExecState* exec)
+RegisterID* PostIncDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toNumber(exec);
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RefPtr<RegisterID> value = generator.emitGetById(generator.newTemporary(), base.get(), m_ident);
+    RegisterID* oldValue = generator.emitPostInc(generator.finalDestination(dst), value.get());
+    generator.emitPutById(base.get(), m_ident, value.get());
+    return oldValue;
 }
 
-bool DotAccessorNode::evaluateToBoolean(OldInterpreterExecState* exec)
+RegisterID* PostDecDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return v->toBoolean(exec);
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RefPtr<RegisterID> value = generator.emitGetById(generator.newTemporary(), base.get(), m_ident);
+    RegisterID* oldValue = generator.emitPostDec(generator.finalDestination(dst), value.get());
+    generator.emitPutById(base.get(), m_ident, value.get());
+    return oldValue;
 }
 
-int32_t DotAccessorNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toInt32(exec);
-}
+// ------------------------------ PostfixErrorNode -----------------------------------
 
-uint32_t DotAccessorNode::evaluateToUInt32(OldInterpreterExecState* exec)
+RegisterID* PostfixErrorNode::emitCode(CodeGenerator& generator, RegisterID*)
 {
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toUInt32(exec);
+    return emitThrowError(generator, ReferenceError, m_operator == OpPlusPlus ? "Postfix ++ operator applied to value that is not a reference." : "Postfix -- operator applied to value that is not a reference.");
 }
 
-// ------------------------------ ArgumentListNode -----------------------------
-
-RegisterID* ArgumentListNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    ASSERT(m_expr);
-    return generator.emitNode(dst, m_expr.get());
-}
+// ------------------------------ DeleteResolveNode -----------------------------------
 
-void ArgumentListNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
+RegisterID* DeleteResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    if (m_next)
-        nodeStack.append(m_next.get());
-    ASSERT(m_expr);
-    nodeStack.append(m_expr.get());
-}
+    if (generator.registerForLocal(m_ident))
+        return generator.emitLoad(generator.finalDestination(dst), false);
 
-// ECMA 11.2.4
-void ArgumentListNode::evaluateList(OldInterpreterExecState* exec, List& list)
-{
-    for (ArgumentListNode* n = this; n; n = n->m_next.get()) {
-        JSValue* v = n->m_expr->evaluate(exec);
-        KJS_CHECKEXCEPTIONVOID
-        list.append(v);
-    }
+    RegisterID* base = generator.emitResolveBase(generator.tempDestination(dst), m_ident);
+    return generator.emitDeleteById(generator.finalDestination(dst, base), base, m_ident);
 }
 
-// ------------------------------ ArgumentsNode --------------------------------
-
-void ArgumentsNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_listNode)
-        nodeStack.append(m_listNode.get());
-}
-
-// ------------------------------ NewExprNode ----------------------------------
-
-RegisterID* NewExprNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> r0 = generator.emitNode(m_expr.get());
-    return generator.emitConstruct(generator.finalDestination(dst), r0.get(), m_args.get());
-}
-
-void NewExprNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_args)
-        nodeStack.append(m_args.get());
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 11.2.2
-
-JSValue* NewExprNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v = m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    List argList;
-    if (m_args) {
-        m_args->evaluateList(exec, argList);
-        KJS_CHECKEXCEPTIONVALUE
-    }
-
-    if (!v->isObject())
-        return throwError(exec, TypeError, "Value %s (result of expression %s) is not an object. Cannot be used with new.", v, m_expr.get());
-
-    ConstructData constructData;
-    if (v->getConstructData(constructData) == ConstructTypeNone)
-        return throwError(exec, TypeError, "Value %s (result of expression %s) is not a constructor. Cannot be used with new.", v, m_expr.get());
-
-    return static_cast<JSObject*>(v)->construct(exec, argList);
-}
-
-JSValue* NewExprNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
-
-double NewExprNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toNumber(exec);
-}
-
-bool NewExprNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return v->toBoolean(exec);
-}
-
-int32_t NewExprNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toInt32(exec);
-}
-
-uint32_t NewExprNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toUInt32(exec);
-}
-
-template <ExpressionNode::CallerType callerType, bool scopeDepthIsZero> 
-inline JSValue* ExpressionNode::resolveAndCall(OldInterpreterExecState* exec, const Identifier& ident, ArgumentsNode* args, size_t scopeDepth)
-{
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    if (!scopeDepthIsZero) {
-        for (size_t i = 0; i < scopeDepth; ++iter, ++i)
-            ASSERT(iter != chain.end());
-    }
-    
-    // we must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    JSObject* base;
-    do {
-        base = *iter;
-        if (base->getPropertySlot(exec, ident, slot)) {
-            JSValue* v = slot.getValue(exec, base, ident);
-            KJS_CHECKEXCEPTIONVALUE
-
-            if (!v->isObject())
-                return throwError(exec, TypeError, "Value %s (result of expression %s) is not object.", v, ident);
-
-            JSObject* func = static_cast<JSObject*>(v);
-
-            if (!func->implementsCall())
-                return throwError(exec, TypeError, "Object %s (result of expression %s) does not allow calls.", v, ident);
-
-            List argList;
-            args->evaluateList(exec, argList);
-            KJS_CHECKEXCEPTIONVALUE
-
-            if (callerType == EvalOperator) {
-                if (base == exec->lexicalGlobalObject() && func == exec->lexicalGlobalObject()->evalFunction()) {
-                    ASSERT_NOT_REACHED();
-                }
-            }
-
-            JSObject* thisObj = base->toThisObject(exec);
-            return func->callAsFunction(exec, thisObj, argList);
-        }
-        ++iter;
-    } while (iter != end);
-
-    return throwUndefinedVariableError(exec, ident);
-}
-
-RegisterID* EvalFunctionCallNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.tempDestination(dst);
-    RegisterID* func = generator.newTemporary();
-    generator.emitResolveWithBase(base.get(), func, CommonIdentifiers::shared()->eval);
-    return generator.emitCallEval(generator.finalDestination(dst, base.get()), func, base.get(), m_args.get());
-}
-
-void EvalFunctionCallNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_args.get());
-}
-
-JSValue* EvalFunctionCallNode::evaluate(OldInterpreterExecState* exec)
-{
-    return resolveAndCall<EvalOperator, true>(exec, exec->propertyNames().eval, m_args.get());
-}
-
-RegisterID* FunctionCallValueNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> func = generator.emitNode(m_expr.get());
-    return generator.emitCall(generator.finalDestination(dst), func.get(), 0, m_args.get());
-}
-
-void FunctionCallValueNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_args.get());
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 11.2.3
-JSValue* FunctionCallValueNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v = m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    if (!v->isObject()) {
-        return throwError(exec, TypeError, "Value %s (result of expression %s) is not object.", v, m_expr.get());
-    }
-
-    JSObject* func = static_cast<JSObject*>(v);
-
-    if (!func->implementsCall()) {
-        return throwError(exec, TypeError, "Object %s (result of expression %s) does not allow calls.", v, m_expr.get());
-    }
-
-    List argList;
-    m_args->evaluateList(exec, argList);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* thisObj = exec->globalThisValue();
-    return func->callAsFunction(exec, thisObj, argList);
-}
-
-RegisterID* FunctionCallResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    if (RegisterID* local = generator.registerForLocal(m_ident))
-        return generator.emitCall(generator.finalDestination(dst), local, 0, m_args.get());
-
-    int index = 0;
-    size_t depth = 0;
-    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
-        RegisterID* func = generator.emitGetScopedVar(generator.newTemporary(), depth, index);
-        return generator.emitCall(generator.finalDestination(dst), func, 0, m_args.get());
-    }
-
-    RefPtr<RegisterID> base = generator.tempDestination(dst);
-    RegisterID* func = generator.newTemporary();
-    generator.emitResolveFunction(base.get(), func, m_ident);
-    return generator.emitCall(generator.finalDestination(dst, base.get()), func, base.get(), m_args.get());
-}
-
-void FunctionCallResolveNode::optimizeVariableAccess(OldInterpreterExecState* exec, const SymbolTable& symbolTable, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_args.get());
-
-    size_t depth = 0;
-    int index = getSymbolTableEntry(exec, m_ident, symbolTable, depth);
-    if (index != missingSymbolMarker()) {
-        if (!depth)
-            new (this) LocalVarFunctionCallNode(index);
-        else
-            new (this) ScopedVarFunctionCallNode(index, depth);
-        return;
-    }
-    
-    if (!depth)
-        return;
-    
-    new (this) NonLocalVarFunctionCallNode(depth);
-}
-
-// ECMA 11.2.3
-JSValue* FunctionCallResolveNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    // Check for missed optimization opportunity.
-    ASSERT(!canSkipLookup(exec, m_ident));
-
-    return resolveAndCall<FunctionCall, true>(exec, m_ident, m_args.get());
-}
-
-JSValue* FunctionCallResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
-
-double FunctionCallResolveNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toNumber(exec);
-}
-
-bool FunctionCallResolveNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return v->toBoolean(exec);
-}
-
-int32_t FunctionCallResolveNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toInt32(exec);
-}
-
-uint32_t FunctionCallResolveNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toUInt32(exec);
-}
-
-JSValue* LocalVarFunctionCallNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-
-    JSValue* v = exec->localStorage()[m_index].value;
-
-    if (!v->isObject())
-        return throwError(exec, TypeError, "Value %s (result of expression %s) is not object.", v, m_ident);
-
-    JSObject* func = static_cast<JSObject*>(v);
-    if (!func->implementsCall())
-        return throwError(exec, TypeError, "Object %s (result of expression %s) does not allow calls.", v, m_ident);
-
-    List argList;
-    m_args->evaluateList(exec, argList);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* thisObj = exec->globalThisValue();
-    return func->callAsFunction(exec, thisObj, argList);
-}
-
-JSValue* LocalVarFunctionCallNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
-
-double LocalVarFunctionCallNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toNumber(exec);
-}
-
-bool LocalVarFunctionCallNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return v->toBoolean(exec);
-}
-
-int32_t LocalVarFunctionCallNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toInt32(exec);
-}
-
-uint32_t LocalVarFunctionCallNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toUInt32(exec);
-}
-
-JSValue* ScopedVarFunctionCallNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    
-    JSValue* v = getNonLocalSymbol(exec, m_index, m_scopeDepth);
-    
-    if (!v->isObject())
-        return throwError(exec, TypeError, "Value %s (result of expression %s) is not object.", v, m_ident);
-    
-    JSObject* func = static_cast<JSObject*>(v);
-    if (!func->implementsCall())
-        return throwError(exec, TypeError, "Object %s (result of expression %s) does not allow calls.", v, m_ident);
-    
-    List argList;
-    m_args->evaluateList(exec, argList);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* thisObj = exec->globalThisValue();
-    return func->callAsFunction(exec, thisObj, argList);
-}
-
-JSValue* ScopedVarFunctionCallNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
-
-double ScopedVarFunctionCallNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toNumber(exec);
-}
-
-bool ScopedVarFunctionCallNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return v->toBoolean(exec);
-}
-
-int32_t ScopedVarFunctionCallNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toInt32(exec);
-}
-
-uint32_t ScopedVarFunctionCallNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toUInt32(exec);
-}
-
-JSValue* NonLocalVarFunctionCallNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    // Check for missed optimization opportunity.
-    ASSERT(!canSkipLookup(exec, m_ident));
-    
-    return resolveAndCall<FunctionCall, false>(exec, m_ident, m_args.get(), m_scopeDepth);
-}
-
-JSValue* NonLocalVarFunctionCallNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
-
-double NonLocalVarFunctionCallNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toNumber(exec);
-}
-
-bool NonLocalVarFunctionCallNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return v->toBoolean(exec);
-}
-
-int32_t NonLocalVarFunctionCallNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toInt32(exec);
-}
-
-uint32_t NonLocalVarFunctionCallNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toUInt32(exec);
-}
-
-RegisterID* FunctionCallBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RegisterID* property = generator.emitNode(m_subscript.get());
-    RegisterID* function = generator.emitGetByVal(generator.newTemporary(), base.get(), property);
-    return generator.emitCall(generator.finalDestination(dst, base.get()), function, base.get(), m_args.get());
-}
-
-void FunctionCallBracketNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_args.get());
-    nodeStack.append(m_subscript.get());
-    nodeStack.append(m_base.get());
-}
-
-// ECMA 11.2.3
-JSValue* FunctionCallBracketNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseVal = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* subscriptVal = m_subscript->evaluate(exec);
-
-    JSObject* baseObj = baseVal->toObject(exec);
-    uint32_t i;
-    PropertySlot slot;
-
-    JSValue* funcVal;
-    if (subscriptVal->getUInt32(i)) {
-        if (baseObj->getPropertySlot(exec, i, slot))
-            funcVal = slot.getValue(exec, baseObj, i);
-        else
-            funcVal = jsUndefined();
-    } else {
-        Identifier ident(subscriptVal->toString(exec));
-        if (baseObj->getPropertySlot(exec, ident, slot))
-            funcVal = baseObj->get(exec, ident);
-        else
-            funcVal = jsUndefined();
-    }
-
-    KJS_CHECKEXCEPTIONVALUE
-
-    if (!funcVal->isObject())
-        return throwError(exec, TypeError, "Value %s (result of expression %s[%s]) is not object.", funcVal, m_base.get(), m_subscript.get());
-
-    JSObject* func = static_cast<JSObject*>(funcVal);
-
-    if (!func->implementsCall())
-        return throwError(exec, TypeError, "Object %s (result of expression %s[%s]) does not allow calls.", funcVal, m_base.get(), m_subscript.get());
-
-    List argList;
-    m_args->evaluateList(exec, argList);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* thisObj = baseObj;
-    ASSERT(thisObj);
-    ASSERT(thisObj->isObject());
-    ASSERT(!thisObj->isActivationObject());
-
-    // No need to call toThisObject() on the thisObj as it is known not to be the GlobalObject or ActivationObject
-    return func->callAsFunction(exec, thisObj, argList);
-}
-
-static const char* dotExprNotAnObjectString() KJS_FAST_CALL;
-static const char* dotExprNotAnObjectString()
-{
-    return "Value %s (result of expression %s.%s) is not object.";
-}
-
-static const char* dotExprDoesNotAllowCallsString() KJS_FAST_CALL;
-static const char* dotExprDoesNotAllowCallsString()
-{
-    return "Object %s (result of expression %s.%s) does not allow calls.";
-}
-
-RegisterID* FunctionCallDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RegisterID* function = generator.emitGetById(generator.newTemporary(), base.get(), m_ident);
-    return generator.emitCall(generator.finalDestination(dst, base.get()), function, base.get(), m_args.get());
-}
-
-void FunctionCallDotNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_args.get());
-    nodeStack.append(m_base.get());
-}
-
-// ECMA 11.2.3
-JSValue* FunctionCallDotNode::inlineEvaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseVal = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* baseObj = baseVal->toObject(exec);
-    PropertySlot slot;
-    JSValue* funcVal = baseObj->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, baseObj, m_ident) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-
-    if (!funcVal->isObject())
-        return throwError(exec, TypeError, dotExprNotAnObjectString(), funcVal, m_base.get(), m_ident);
-
-    JSObject* func = static_cast<JSObject*>(funcVal);
-
-    if (!func->implementsCall())
-        return throwError(exec, TypeError, dotExprDoesNotAllowCallsString(), funcVal, m_base.get(), m_ident);
-
-    List argList;
-    m_args->evaluateList(exec, argList);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* thisObj = baseObj;
-    ASSERT(thisObj);
-    ASSERT(thisObj->isObject());
-    ASSERT(!thisObj->isActivationObject());
-
-    // No need to call toThisObject() on the thisObj as it is known not to be the GlobalObject or ActivationObject
-    return func->callAsFunction(exec, thisObj, argList);
-}
-
-JSValue* FunctionCallDotNode::evaluate(OldInterpreterExecState* exec)
-{
-    return inlineEvaluate(exec);
-}
-
-double FunctionCallDotNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toNumber(exec);
-}
-
-bool FunctionCallDotNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return v->toBoolean(exec);
-}
-
-int32_t FunctionCallDotNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toInt32(exec);
-}
-
-uint32_t FunctionCallDotNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    JSValue* v = inlineEvaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return v->toUInt32(exec);
-}
-
-// ECMA 11.3
-
-// ------------------------------ PostfixResolveNode ----------------------------------
-
-RegisterID* PostIncResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    // FIXME: I think we can detect the absense of dependent expressions here, 
-    // and emit a PreInc instead of a PostInc. A post-pass to eliminate dead
-    // code would work, too.
-    if (RegisterID* local = generator.registerForLocal(m_ident)) {
-        if (generator.isLocalConstant(m_ident))
-            return generator.emitToJSNumber(generator.finalDestination(dst), local);
-        
-        return generator.emitPostInc(generator.finalDestination(dst), local);
-    }
-
-    int index = 0;
-    size_t depth = 0;
-    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
-        RefPtr<RegisterID> value = generator.emitGetScopedVar(generator.newTemporary(), depth, index);
-        RegisterID* oldValue = generator.emitPostInc(generator.finalDestination(dst), value.get());
-        generator.emitPutScopedVar(depth, index, value.get());
-        return oldValue;
-    }
-
-    RefPtr<RegisterID> value = generator.newTemporary();
-    RefPtr<RegisterID> base = generator.emitResolveWithBase(generator.newTemporary(), value.get(), m_ident);
-    RegisterID* oldValue = generator.emitPostInc(generator.finalDestination(dst), value.get());
-    generator.emitPutById(base.get(), m_ident, value.get());
-    return oldValue;
-}
-
-// Increment
-void PostIncResolveNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable& symbolTable, const LocalStorage& localStorage, NodeStack&)
-{
-    int index = symbolTable.get(m_ident.ustring().rep()).getIndex();
-    if (index != missingSymbolMarker()) {
-        if (isConstant(localStorage, index))
-            new (this) PostIncConstNode(index);
-        else
-            new (this) PostIncLocalVarNode(index);
-    }
-}
-
-JSValue* PostIncResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    // Check for missed optimization opportunity.
-    ASSERT(!canSkipLookup(exec, m_ident));
-
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // we must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    do {
-        if ((*iter)->getPropertySlot(exec, m_ident, slot)) {
-            // If m_ident is 'arguments', the base->getPropertySlot() may cause 
-            // base (which must be an ActivationImp in such this case) to be torn
-            // off from the activation stack, in which case we need to get it again
-            // from the ScopeChainIterator.
-            
-            JSObject* base = *iter;
-            JSValue* v = slot.getValue(exec, base, m_ident)->toJSNumber(exec);
-            base->put(exec, m_ident, jsNumber(v->toNumber(exec) + 1));
-            return v;
-        }
-
-        ++iter;
-    } while (iter != end);
-
-    return throwUndefinedVariableError(exec, m_ident);
-}
-
-void PostIncResolveNode::optimizeForUnnecessaryResult()
-{
-    new (this) PreIncResolveNode(PlacementNewAdopt);
-}
-
-JSValue* PostIncLocalVarNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-
-    JSValue** slot = &exec->localStorage()[m_index].value;
-    JSValue* v = (*slot)->toJSNumber(exec);
-    *slot = jsNumber(v->toNumber(exec) + 1);
-    return v;
-}
-
-void PostIncLocalVarNode::optimizeForUnnecessaryResult()
-{
-    new (this) PreIncLocalVarNode(m_index);
-}
-
-// Decrement
-RegisterID* PostDecResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    // FIXME: I think we can detect the absense of dependent expressions here, 
-    // and emit a PreDec instead of a PostDec. A post-pass to eliminate dead
-    // code would work, too.
-    if (RegisterID* local = generator.registerForLocal(m_ident)) {
-        if (generator.isLocalConstant(m_ident))
-            return generator.emitToJSNumber(generator.finalDestination(dst), local);
-        
-        return generator.emitPostDec(generator.finalDestination(dst), local);
-    }
-
-    int index = 0;
-    size_t depth = 0;
-    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
-        RefPtr<RegisterID> value = generator.emitGetScopedVar(generator.newTemporary(), depth, index);
-        RegisterID* oldValue = generator.emitPostDec(generator.finalDestination(dst), value.get());
-        generator.emitPutScopedVar(depth, index, value.get());
-        return oldValue;
-    }
-
-    RefPtr<RegisterID> value = generator.newTemporary();
-    RefPtr<RegisterID> base = generator.emitResolveWithBase(generator.newTemporary(), value.get(), m_ident);
-    RegisterID* oldValue = generator.emitPostDec(generator.finalDestination(dst), value.get());
-    generator.emitPutById(base.get(), m_ident, value.get());
-    return oldValue;
-}
-
-void PostDecResolveNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable& symbolTable, const LocalStorage& localStorage, NodeStack&)
-{
-    int index = symbolTable.get(m_ident.ustring().rep()).getIndex();
-    if (index != missingSymbolMarker()) {
-        if (isConstant(localStorage, index))
-            new (this) PostDecConstNode(index);
-        else
-            new (this) PostDecLocalVarNode(index);
-    }
-}
-
-JSValue* PostDecResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    // Check for missed optimization opportunity.
-    ASSERT(!canSkipLookup(exec, m_ident));
-
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // we must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    do {
-        if ((*iter)->getPropertySlot(exec, m_ident, slot)) {
-            // See the comment in PostIncResolveNode::evaluate().
-
-            JSObject* base = *iter;
-            JSValue* v = slot.getValue(exec, base, m_ident)->toJSNumber(exec);
-            base->put(exec, m_ident, jsNumber(v->toNumber(exec) - 1));
-            return v;
-        }
-
-        ++iter;
-    } while (iter != end);
-
-    return throwUndefinedVariableError(exec, m_ident);
-}
-
-void PostDecResolveNode::optimizeForUnnecessaryResult()
-{
-    new (this) PreDecResolveNode(PlacementNewAdopt);
-}
-
-JSValue* PostDecLocalVarNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-
-    JSValue** slot = &exec->localStorage()[m_index].value;
-    JSValue* v = (*slot)->toJSNumber(exec);
-    *slot = jsNumber(v->toNumber(exec) - 1);
-    return v;
-}
-
-double PostDecLocalVarNode::inlineEvaluateToNumber(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-
-    JSValue** slot = &exec->localStorage()[m_index].value;
-    double n = (*slot)->toNumber(exec);
-    *slot = jsNumber(n - 1);
-    return n;
-}
-
-double PostDecLocalVarNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToNumber(exec);
-}
-
-bool PostDecLocalVarNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    double result = inlineEvaluateToNumber(exec);
-    return  result > 0.0 || 0.0 > result; // NaN produces false as well
-}
-
-int32_t PostDecLocalVarNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toInt32(inlineEvaluateToNumber(exec));
-}
-
-uint32_t PostDecLocalVarNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toUInt32(inlineEvaluateToNumber(exec));
-}
-
-void PostDecLocalVarNode::optimizeForUnnecessaryResult()
-{
-    new (this) PreDecLocalVarNode(m_index);
-}
-
-// ------------------------------ PostfixBracketNode ----------------------------------
-
-void PostfixBracketNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_subscript.get());
-    nodeStack.append(m_base.get());
-}
-
-RegisterID* PostIncBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RefPtr<RegisterID> property = generator.emitNode(m_subscript.get());
-    RefPtr<RegisterID> value = generator.emitGetByVal(generator.newTemporary(), base.get(), property.get());
-    RegisterID* oldValue = generator.emitPostInc(generator.finalDestination(dst), value.get());
-    generator.emitPutByVal(base.get(), property.get(), value.get());
-    return oldValue;
-}
-
-JSValue* PostIncBracketNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* subscript = m_subscript->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* base = baseValue->toObject(exec);
-
-    uint32_t propertyIndex;
-    if (subscript->getUInt32(propertyIndex)) {
-        PropertySlot slot;
-        JSValue* v = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, base, propertyIndex) : jsUndefined();
-        KJS_CHECKEXCEPTIONVALUE
-
-        JSValue* v2 = v->toJSNumber(exec);
-        base->put(exec, propertyIndex, jsNumber(v2->toNumber(exec) + 1));
-
-        return v2;
-    }
-
-    Identifier propertyName(subscript->toString(exec));
-    PropertySlot slot;
-    JSValue* v = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, base, propertyName) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* v2 = v->toJSNumber(exec);
-    base->put(exec, propertyName, jsNumber(v2->toNumber(exec) + 1));
-    return v2;
-}
-
-RegisterID* PostDecBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RefPtr<RegisterID> property = generator.emitNode(m_subscript.get());
-    RefPtr<RegisterID> value = generator.emitGetByVal(generator.newTemporary(), base.get(), property.get());
-    RegisterID* oldValue = generator.emitPostDec(generator.finalDestination(dst), value.get());
-    generator.emitPutByVal(base.get(), property.get(), value.get());
-    return oldValue;
-}
-
-JSValue* PostDecBracketNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* subscript = m_subscript->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* base = baseValue->toObject(exec);
-
-    uint32_t propertyIndex;
-    if (subscript->getUInt32(propertyIndex)) {
-        PropertySlot slot;
-        JSValue* v = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, base, propertyIndex) : jsUndefined();
-        KJS_CHECKEXCEPTIONVALUE
-
-        JSValue* v2 = v->toJSNumber(exec);
-        base->put(exec, propertyIndex, jsNumber(v2->toNumber(exec) - 1));
-        return v2;
-    }
-
-    Identifier propertyName(subscript->toString(exec));
-    PropertySlot slot;
-    JSValue* v = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, base, propertyName) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* v2 = v->toJSNumber(exec);
-    base->put(exec, propertyName, jsNumber(v2->toNumber(exec) - 1));
-    return v2;
-}
-
-// ------------------------------ PostfixDotNode ----------------------------------
-
-void PostfixDotNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_base.get());
-}
-
-RegisterID* PostIncDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RefPtr<RegisterID> value = generator.emitGetById(generator.newTemporary(), base.get(), m_ident);
-    RegisterID* oldValue = generator.emitPostInc(generator.finalDestination(dst), value.get());
-    generator.emitPutById(base.get(), m_ident, value.get());
-    return oldValue;
-}
-
-JSValue* PostIncDotNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSObject* base = baseValue->toObject(exec);
-
-    PropertySlot slot;
-    JSValue* v = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, base, m_ident) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* v2 = v->toJSNumber(exec);
-    base->put(exec, m_ident, jsNumber(v2->toNumber(exec) + 1));
-    return v2;
-}
-
-RegisterID* PostDecDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RefPtr<RegisterID> value = generator.emitGetById(generator.newTemporary(), base.get(), m_ident);
-    RegisterID* oldValue = generator.emitPostDec(generator.finalDestination(dst), value.get());
-    generator.emitPutById(base.get(), m_ident, value.get());
-    return oldValue;
-}
-
-JSValue* PostDecDotNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSObject* base = baseValue->toObject(exec);
-
-    PropertySlot slot;
-    JSValue* v = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, base, m_ident) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* v2 = v->toJSNumber(exec);
-    base->put(exec, m_ident, jsNumber(v2->toNumber(exec) - 1));
-    return v2;
-}
-
-// ------------------------------ PostfixErrorNode -----------------------------------
-
-RegisterID* PostfixErrorNode::emitCode(CodeGenerator& generator, RegisterID*)
-{
-    return emitThrowError(generator, ReferenceError, m_operator == OpPlusPlus ? "Postfix ++ operator applied to value that is not a reference." : "Postfix -- operator applied to value that is not a reference.");
-}
-
-JSValue* PostfixErrorNode::evaluate(OldInterpreterExecState* exec)
-{
-    throwError(exec, ReferenceError, "Postfix %s operator applied to value that is not a reference.",
-               m_operator == OpPlusPlus ? "++" : "--");
-    handleException(exec);
-    return jsUndefined();
-}
-
-// ------------------------------ DeleteResolveNode -----------------------------------
-
-RegisterID* DeleteResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    if (generator.registerForLocal(m_ident))
-        return generator.emitLoad(generator.finalDestination(dst), false);
-
-    RegisterID* base = generator.emitResolveBase(generator.tempDestination(dst), m_ident);
-    return generator.emitDeleteById(generator.finalDestination(dst, base), base, m_ident);
-}
-
-void DeleteResolveNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable& symbolTable, const LocalStorage&, NodeStack&)
-{
-    int index = symbolTable.get(m_ident.ustring().rep()).getIndex();
-    if (index != missingSymbolMarker())
-        new (this) LocalVarDeleteNode();
-}
-
-// ECMA 11.4.1
-
-JSValue* DeleteResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    // Check for missed optimization opportunity.
-    ASSERT(!canSkipLookup(exec, m_ident));
-
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // We must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    JSObject* base;
-    do {
-        base = *iter;
-        if (base->getPropertySlot(exec, m_ident, slot))
-            return jsBoolean(base->deleteProperty(exec, m_ident));
-
-        ++iter;
-    } while (iter != end);
-
-    return jsBoolean(true);
-}
-
-JSValue* LocalVarDeleteNode::evaluate(OldInterpreterExecState*)
-{
-    return jsBoolean(false);
-}
-
-// ------------------------------ DeleteBracketNode -----------------------------------
-
-RegisterID* DeleteBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> r0 = generator.emitNode(m_base.get());
-    RefPtr<RegisterID> r1 = generator.emitNode(m_subscript.get());
-    return generator.emitDeleteByVal(generator.finalDestination(dst), r0.get(), r1.get());
-}
-
-void DeleteBracketNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_subscript.get());
-    nodeStack.append(m_base.get());
-}
-
-JSValue* DeleteBracketNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* subscript = m_subscript->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* base = baseValue->toObject(exec);
-
-    uint32_t propertyIndex;
-    if (subscript->getUInt32(propertyIndex))
-        return jsBoolean(base->deleteProperty(exec, propertyIndex));
-
-    Identifier propertyName(subscript->toString(exec));
-    return jsBoolean(base->deleteProperty(exec, propertyName));
-}
-
-// ------------------------------ DeleteDotNode -----------------------------------
-
-RegisterID* DeleteDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RegisterID* r0 = generator.emitNode(m_base.get());
-    return generator.emitDeleteById(generator.finalDestination(dst), r0, m_ident);
-}
-
-void DeleteDotNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_base.get());
-}
-
-JSValue* DeleteDotNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    JSObject* base = baseValue->toObject(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    return jsBoolean(base->deleteProperty(exec, m_ident));
-}
-
-// ------------------------------ DeleteValueNode -----------------------------------
-
-RegisterID* DeleteValueNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    generator.emitNode(m_expr.get());
-
-    // delete on a non-location expression ignores the value and returns true
-    return generator.emitLoad(generator.finalDestination(dst), true);
-}
-
-void DeleteValueNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr.get());
-}
-
-JSValue* DeleteValueNode::evaluate(OldInterpreterExecState* exec)
-{
-    m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    // delete on a non-location expression ignores the value and returns true
-    return jsBoolean(true);
-}
-
-// ------------------------------ VoidNode -------------------------------------
-
-RegisterID* VoidNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> r0 = generator.emitNode(m_expr.get());
-    return generator.emitLoad(generator.finalDestination(dst, r0.get()), jsUndefined());
-}
-
-void VoidNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 11.4.2
-JSValue* VoidNode::evaluate(OldInterpreterExecState* exec)
-{
-    m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    return jsUndefined();
-}
-
-// ECMA 11.4.3
-
-// ------------------------------ TypeOfValueNode -----------------------------------
-
-void TypeOfValueNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr.get());
-}
-
-static JSValue* typeStringForValue(JSValue* v) KJS_FAST_CALL;
-static JSValue* typeStringForValue(JSValue* v)
-{
-    switch (v->type()) {
-        case UndefinedType:
-            return jsString("undefined");
-        case NullType:
-            return jsString("object");
-        case BooleanType:
-            return jsString("boolean");
-        case NumberType:
-            return jsString("number");
-        case StringType:
-            return jsString("string");
-        default:
-            if (v->isObject()) {
-                // Return "undefined" for objects that should be treated
-                // as null when doing comparisons.
-                if (static_cast<JSObject*>(v)->masqueradeAsUndefined())
-                    return jsString("undefined");
-                else if (static_cast<JSObject*>(v)->implementsCall())
-                    return jsString("function");
-            }
-
-            return jsString("object");
-    }
-}
-
-void TypeOfResolveNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable& symbolTable, const LocalStorage&, NodeStack&)
-{
-    int index = symbolTable.get(m_ident.ustring().rep()).getIndex();
-    if (index != missingSymbolMarker())
-        new (this) LocalVarTypeOfNode(index);
-}
-
-JSValue* LocalVarTypeOfNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-
-    return typeStringForValue(exec->localStorage()[m_index].value);
-}
-
-RegisterID* TypeOfResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    if (RegisterID* local = generator.registerForLocal(m_ident))
-        return generator.emitTypeOf(generator.finalDestination(dst), local);
-
-    RefPtr<RegisterID> scratch = generator.emitResolveBase(generator.tempDestination(dst), m_ident);
-    generator.emitGetById(scratch.get(), scratch.get(), m_ident);
-    return generator.emitTypeOf(generator.finalDestination(dst, scratch.get()), scratch.get());
-}
-
-JSValue* TypeOfResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // We must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    JSObject* base;
-    do {
-        base = *iter;
-        if (base->getPropertySlot(exec, m_ident, slot)) {
-            JSValue* v = slot.getValue(exec, base, m_ident);
-            return typeStringForValue(v);
-        }
-
-        ++iter;
-    } while (iter != end);
-
-    return jsString("undefined");
-}
-
-// ------------------------------ TypeOfValueNode -----------------------------------
-
-RegisterID* TypeOfValueNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src = generator.emitNode(m_expr.get());
-    return generator.emitTypeOf(generator.finalDestination(dst), src.get());
-}
-
-JSValue* TypeOfValueNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v = m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    return typeStringForValue(v);
-}
-
-// ECMA 11.4.4 and 11.4.5
-
-// ------------------------------ PrefixResolveNode ----------------------------------
-
-RegisterID* PreIncResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    if (RegisterID* local = generator.registerForLocal(m_ident)) {
-        if (generator.isLocalConstant(m_ident)) {
-            RefPtr<RegisterID> r0 = generator.emitLoad(generator.finalDestination(dst), 1.0);
-            return generator.emitAdd(r0.get(), local, r0.get());
-        }
-        
-        generator.emitPreInc(local);
-        return generator.moveToDestinationIfNeeded(dst, local);
-    }
-
-    int index = 0;
-    size_t depth = 0;
-    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
-        RefPtr<RegisterID> propDst = generator.emitGetScopedVar(generator.tempDestination(dst), depth, index);
-        generator.emitPreInc(propDst.get());
-        generator.emitPutScopedVar(depth, index, propDst.get());
-        return generator.moveToDestinationIfNeeded(dst, propDst.get());;
-    }
-
-    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
-    RefPtr<RegisterID> base = generator.emitResolveWithBase(generator.newTemporary(), propDst.get(), m_ident);
-    generator.emitPreInc(propDst.get());
-    generator.emitPutById(base.get(), m_ident, propDst.get());
-    return generator.moveToDestinationIfNeeded(dst, propDst.get());
-}
-
-void PreIncResolveNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable& symbolTable, const LocalStorage& localStorage, NodeStack&)
-{
-    int index = symbolTable.get(m_ident.ustring().rep()).getIndex();
-    if (index != missingSymbolMarker()) {
-        if (isConstant(localStorage, index))
-            new (this) PreIncConstNode(index);
-        else
-            new (this) PreIncLocalVarNode(index);
-    }
-}
-
-JSValue* PreIncLocalVarNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    JSValue** slot = &exec->localStorage()[m_index].value;
-
-    double n = (*slot)->toNumber(exec);
-    JSValue* n2 = jsNumber(n + 1);
-    *slot = n2;
-    return n2;
-}
-
-JSValue* PreIncResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // we must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    do {
-        if ((*iter)->getPropertySlot(exec, m_ident, slot)) {
-            // See the comment in PostIncResolveNode::evaluate().
-
-            JSObject* base = *iter;
-            JSValue* v = slot.getValue(exec, base, m_ident);
-
-            double n = v->toNumber(exec);
-            JSValue* n2 = jsNumber(n + 1);
-            base->put(exec, m_ident, n2);
-
-            return n2;
-        }
-
-        ++iter;
-    } while (iter != end);
-
-    return throwUndefinedVariableError(exec, m_ident);
-}
-
-RegisterID* PreDecResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    if (RegisterID* local = generator.registerForLocal(m_ident)) {
-        if (generator.isLocalConstant(m_ident)) {
-            RefPtr<RegisterID> r0 = generator.emitLoad(generator.finalDestination(dst), -1.0);
-            return generator.emitAdd(r0.get(), local, r0.get());
-        }
-        
-        generator.emitPreDec(local);
-        return generator.moveToDestinationIfNeeded(dst, local);
-    }
-
-    int index = 0;
-    size_t depth = 0;
-    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
-        RefPtr<RegisterID> propDst = generator.emitGetScopedVar(generator.tempDestination(dst), depth, index);
-        generator.emitPreDec(propDst.get());
-        generator.emitPutScopedVar(depth, index, propDst.get());
-        return generator.moveToDestinationIfNeeded(dst, propDst.get());;
-    }
-
-    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
-    RefPtr<RegisterID> base = generator.emitResolveWithBase(generator.newTemporary(), propDst.get(), m_ident);
-    generator.emitPreDec(propDst.get());
-    generator.emitPutById(base.get(), m_ident, propDst.get());
-    return generator.moveToDestinationIfNeeded(dst, propDst.get());
-}
-
-void PreDecResolveNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable& symbolTable, const LocalStorage& localStorage, NodeStack&)
-{
-    int index = symbolTable.get(m_ident.ustring().rep()).getIndex();
-    if (index != missingSymbolMarker()) {
-        if (isConstant(localStorage, index))
-            new (this) PreDecConstNode(index);
-        else
-            new (this) PreDecLocalVarNode(index);
-    }
-}
-
-JSValue* PreDecLocalVarNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    JSValue** slot = &exec->localStorage()[m_index].value;
-
-    double n = (*slot)->toNumber(exec);
-    JSValue* n2 = jsNumber(n - 1);
-    *slot = n2;
-    return n2;
-}
-
-JSValue* PreDecResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // we must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    do {
-        if ((*iter)->getPropertySlot(exec, m_ident, slot)) {
-            // See the comment in PostIncResolveNode::evaluate().
-
-            JSObject* base = *iter;
-            JSValue* v = slot.getValue(exec, base, m_ident);
-
-            double n = v->toNumber(exec);
-            JSValue* n2 = jsNumber(n - 1);
-            base->put(exec, m_ident, n2);
-
-            return n2;
-        }
-
-        ++iter;
-    } while (iter != end);
-
-    return throwUndefinedVariableError(exec, m_ident);
-}
-
-// ------------------------------ PreIncConstNode ----------------------------------
-
-JSValue* PreIncConstNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    return jsNumber(exec->localStorage()[m_index].value->toNumber(exec) + 1);
-}
-
-// ------------------------------ PreDecConstNode ----------------------------------
-
-JSValue* PreDecConstNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    return jsNumber(exec->localStorage()[m_index].value->toNumber(exec) - 1);
-}
-
-// ------------------------------ PostIncConstNode ----------------------------------
-
-JSValue* PostIncConstNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    return jsNumber(exec->localStorage()[m_index].value->toNumber(exec));
-}
-
-// ------------------------------ PostDecConstNode ----------------------------------
-
-JSValue* PostDecConstNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    return jsNumber(exec->localStorage()[m_index].value->toNumber(exec));
-}
-
-// ------------------------------ PrefixBracketNode ----------------------------------
-
-void PrefixBracketNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_subscript.get());
-    nodeStack.append(m_base.get());
-}
-
-RegisterID* PreIncBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RefPtr<RegisterID> property = generator.emitNode(m_subscript.get());
-    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
-    RegisterID* value = generator.emitGetByVal(propDst.get(), base.get(), property.get());
-    generator.emitPreInc(value);
-    generator.emitPutByVal(base.get(), property.get(), value);
-    return generator.moveToDestinationIfNeeded(dst, propDst.get());
-}
-
-JSValue* PreIncBracketNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* subscript = m_subscript->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* base = baseValue->toObject(exec);
-
-    uint32_t propertyIndex;
-    if (subscript->getUInt32(propertyIndex)) {
-        PropertySlot slot;
-        JSValue* v = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, base, propertyIndex) : jsUndefined();
-        KJS_CHECKEXCEPTIONVALUE
-
-        JSValue* n2 = jsNumber(v->toNumber(exec) + 1);
-        base->put(exec, propertyIndex, n2);
-
-        return n2;
-    }
-
-    Identifier propertyName(subscript->toString(exec));
-    PropertySlot slot;
-    JSValue* v = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, base, propertyName) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* n2 = jsNumber(v->toNumber(exec) + 1);
-    base->put(exec, propertyName, n2);
-
-    return n2;
-}
-
-RegisterID* PreDecBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RefPtr<RegisterID> property = generator.emitNode(m_subscript.get());
-    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
-    RegisterID* value = generator.emitGetByVal(propDst.get(), base.get(), property.get());
-    generator.emitPreDec(value);
-    generator.emitPutByVal(base.get(), property.get(), value);
-    return generator.moveToDestinationIfNeeded(dst, propDst.get());
-}
-
-JSValue* PreDecBracketNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* subscript = m_subscript->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* base = baseValue->toObject(exec);
-
-    uint32_t propertyIndex;
-    if (subscript->getUInt32(propertyIndex)) {
-        PropertySlot slot;
-        JSValue* v = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, base, propertyIndex) : jsUndefined();
-        KJS_CHECKEXCEPTIONVALUE
-
-        JSValue* n2 = jsNumber(v->toNumber(exec) - 1);
-        base->put(exec, propertyIndex, n2);
-
-        return n2;
-    }
-
-    Identifier propertyName(subscript->toString(exec));
-    PropertySlot slot;
-    JSValue* v = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, base, propertyName) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* n2 = jsNumber(v->toNumber(exec) - 1);
-    base->put(exec, propertyName, n2);
-
-    return n2;
-}
-
-// ------------------------------ PrefixDotNode ----------------------------------
-
-void PrefixDotNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_base.get());
-}
-
-RegisterID* PreIncDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
-    RegisterID* value = generator.emitGetById(propDst.get(), base.get(), m_ident);
-    generator.emitPreInc(value);
-    generator.emitPutById(base.get(), m_ident, value);
-    return generator.moveToDestinationIfNeeded(dst, propDst.get());
-}
-
-JSValue* PreIncDotNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSObject* base = baseValue->toObject(exec);
-
-    PropertySlot slot;
-    JSValue* v = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, base, m_ident) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-
-    double n = v->toNumber(exec);
-    JSValue* n2 = jsNumber(n + 1);
-    base->put(exec, m_ident, n2);
-
-    return n2;
-}
-
-RegisterID* PreDecDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
-    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
-    RegisterID* value = generator.emitGetById(propDst.get(), base.get(), m_ident);
-    generator.emitPreDec(value);
-    generator.emitPutById(base.get(), m_ident, value);
-    return generator.moveToDestinationIfNeeded(dst, propDst.get());
-}
-
-JSValue* PreDecDotNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSObject* base = baseValue->toObject(exec);
-
-    PropertySlot slot;
-    JSValue* v = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, base, m_ident) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-
-    double n = v->toNumber(exec);
-    JSValue* n2 = jsNumber(n - 1);
-    base->put(exec, m_ident, n2);
-
-    return n2;
-}
-
-// ------------------------------ PrefixErrorNode -----------------------------------
-
-RegisterID* PrefixErrorNode::emitCode(CodeGenerator& generator, RegisterID*)
-{
-    return emitThrowError(generator, ReferenceError, m_operator == OpPlusPlus ? "Prefix ++ operator applied to value that is not a reference." : "Prefix -- operator applied to value that is not a reference.");
-}
-
-JSValue* PrefixErrorNode::evaluate(OldInterpreterExecState* exec)
-{
-    throwError(exec, ReferenceError, "Prefix %s operator applied to value that is not a reference.",
-               m_operator == OpPlusPlus ? "++" : "--");
-    handleException(exec);
-    return jsUndefined();
-}
-
-// ------------------------------ UnaryPlusNode --------------------------------
-
-RegisterID* UnaryPlusNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RegisterID* src = generator.emitNode(m_expr.get());
-    return generator.emitToJSNumber(generator.finalDestination(dst), src);
-}
-
-void UnaryPlusNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 11.4.6
-JSValue* UnaryPlusNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v = m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    return v->toJSNumber(exec);
-}
-
-bool UnaryPlusNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return m_expr->evaluateToBoolean(exec);
-}
-
-double UnaryPlusNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return m_expr->evaluateToNumber(exec);
-}
-
-int32_t UnaryPlusNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return m_expr->evaluateToInt32(exec);
-}
-
-uint32_t UnaryPlusNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return m_expr->evaluateToInt32(exec);
-}
-
-// ------------------------------ NegateNode -----------------------------------
-
-RegisterID* NegateNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RegisterID* src = generator.emitNode(m_expr.get());
-    return generator.emitNegate(generator.finalDestination(dst), src);
-}
-
-void NegateNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 11.4.7
-JSValue* NegateNode::evaluate(OldInterpreterExecState* exec)
-{
-    // No need to check exception, caller will do so right after evaluate()
-    return jsNumber(-m_expr->evaluateToNumber(exec));
-}
-
-double NegateNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    // No need to check exception, caller will do so right after evaluateToNumber()
-    return -m_expr->evaluateToNumber(exec);
-}
-
-// ------------------------------ BitwiseNotNode -------------------------------
-
-RegisterID* BitwiseNotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RegisterID* src = generator.emitNode(m_expr.get());
-    return generator.emitBitNot(generator.finalDestination(dst), src);
-}
-
-void BitwiseNotNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 11.4.8
-int32_t BitwiseNotNode::inlineEvaluateToInt32(OldInterpreterExecState* exec)
-{
-    return ~m_expr->evaluateToInt32(exec);
-}
-
-JSValue* BitwiseNotNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsNumber(inlineEvaluateToInt32(exec));
-}
-
-double BitwiseNotNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-bool BitwiseNotNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-int32_t BitwiseNotNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-uint32_t BitwiseNotNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-// ------------------------------ LogicalNotNode -------------------------------
-
-RegisterID* LogicalNotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RegisterID* src = generator.emitNode(m_expr.get());
-    return generator.emitNot(generator.finalDestination(dst), src);
-}
-
-void LogicalNotNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 11.4.9
-JSValue* LogicalNotNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsBoolean(!m_expr->evaluateToBoolean(exec));
-}
-
-bool LogicalNotNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return !m_expr->evaluateToBoolean(exec);
-}
-
-// ------------------------------ Multiplicative Nodes -----------------------------------
-
-RegisterID* MultNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src1 = generator.emitNode(m_term1.get());
-    RegisterID* src2 = generator.emitNode(m_term2.get());
-    return generator.emitMul(generator.finalDestination(dst, src1.get()), src1.get(), src2);
-}
-
-void MultNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_term1.get());
-    nodeStack.append(m_term2.get());
-}
-
-// ECMA 11.5.1
-double MultNode::inlineEvaluateToNumber(OldInterpreterExecState* exec)
-{
-    double n1 = m_term1->evaluateToNumber(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    double n2 = m_term2->evaluateToNumber(exec);
-    return n1 * n2;
-}
-
-JSValue* MultNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsNumber(inlineEvaluateToNumber(exec));
-}
-
-double MultNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToNumber(exec);
-}
-
-bool MultNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    double result = inlineEvaluateToNumber(exec);
-    return  result > 0.0 || 0.0 > result; // NaN produces false as well
-}
-
-int32_t MultNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toInt32(inlineEvaluateToNumber(exec));
-}
-
-uint32_t MultNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toUInt32(inlineEvaluateToNumber(exec));
-}
-
-RegisterID* DivNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> dividend = generator.emitNode(m_term1.get());
-    RegisterID* divisor = generator.emitNode(m_term2.get());
-    return generator.emitDiv(generator.finalDestination(dst, dividend.get()), dividend.get(), divisor);
-}
-
-void DivNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_term1.get());
-    nodeStack.append(m_term2.get());
-}
-
-// ECMA 11.5.2
-double DivNode::inlineEvaluateToNumber(OldInterpreterExecState* exec)
-{
-    double n1 = m_term1->evaluateToNumber(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    double n2 = m_term2->evaluateToNumber(exec);
-    return n1 / n2;
-}
-
-JSValue* DivNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsNumber(inlineEvaluateToNumber(exec));
-}
-
-double DivNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToNumber(exec);
-}
-
-int32_t DivNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toInt32(inlineEvaluateToNumber(exec));
-}
-
-uint32_t DivNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toUInt32(inlineEvaluateToNumber(exec));
-}
-
-RegisterID* ModNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> dividend = generator.emitNode(m_term1.get());
-    RegisterID* divisor = generator.emitNode(m_term2.get());
-    return generator.emitMod(generator.finalDestination(dst, dividend.get()), dividend.get(), divisor);
-}
-
-void ModNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_term1.get());
-    nodeStack.append(m_term2.get());
-}
-
-// ECMA 11.5.3
-double ModNode::inlineEvaluateToNumber(OldInterpreterExecState* exec)
-{
-    double n1 = m_term1->evaluateToNumber(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    double n2 = m_term2->evaluateToNumber(exec);
-    return fmod(n1, n2);
-}
-
-JSValue* ModNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsNumber(inlineEvaluateToNumber(exec));
-}
-
-double ModNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToNumber(exec);
-}
-
-bool ModNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    double result = inlineEvaluateToNumber(exec);
-    return  result > 0.0 || 0.0 > result; // NaN produces false as well
-}
-
-int32_t ModNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toInt32(inlineEvaluateToNumber(exec));
-}
-
-uint32_t ModNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toUInt32(inlineEvaluateToNumber(exec));
-}
-
-// ------------------------------ Additive Nodes --------------------------------------
-
-static double throwOutOfMemoryErrorToNumber(OldInterpreterExecState* exec)
-{
-    JSObject* error = Error::create(exec, GeneralError, "Out of memory");
-    exec->setException(error);
-    return 0.0;
-}
-
-// ECMA 11.6
-static JSValue* addSlowCase(OldInterpreterExecState* exec, JSValue* v1, JSValue* v2)
-{
-    // exception for the Date exception in defaultValue()
-    JSValue* p1 = v1->toPrimitive(exec, UnspecifiedType);
-    JSValue* p2 = v2->toPrimitive(exec, UnspecifiedType);
-
-    if (p1->isString() || p2->isString()) {
-        UString value = p1->toString(exec) + p2->toString(exec);
-        if (value.isNull())
-            return throwOutOfMemoryError(exec);
-        return jsString(value);
-    }
-
-    return jsNumber(p1->toNumber(exec) + p2->toNumber(exec));
-}
-
-static double addSlowCaseToNumber(OldInterpreterExecState* exec, JSValue* v1, JSValue* v2)
-{
-    // exception for the Date exception in defaultValue()
-    JSValue* p1 = v1->toPrimitive(exec, UnspecifiedType);
-    JSValue* p2 = v2->toPrimitive(exec, UnspecifiedType);
-
-    if (p1->isString() || p2->isString()) {
-        UString value = p1->toString(exec) + p2->toString(exec);
-        if (value.isNull())
-            return throwOutOfMemoryErrorToNumber(exec);
-        return value.toDouble();
-    }
-
-    return p1->toNumber(exec) + p2->toNumber(exec);
-}
-
-// Fast-path choices here are based on frequency data from SunSpider:
-//    <times> Add case: <t1> <t2>
-//    ---------------------------
-//    5627160 Add case: 1 1
-//    247427  Add case: 5 5
-//    20901   Add case: 5 6
-//    13978   Add case: 5 1
-//    4000    Add case: 1 5
-//    1       Add case: 3 5
-
-static inline JSValue* add(OldInterpreterExecState* exec, JSValue* v1, JSValue* v2)
-{
-    JSType t1 = v1->type();
-    JSType t2 = v2->type();
-    const unsigned bothTypes = (t1 << 3) | t2;
-
-    if (bothTypes == ((NumberType << 3) | NumberType))
-        return jsNumber(v1->toNumber(exec) + v2->toNumber(exec));
-    if (bothTypes == ((StringType << 3) | StringType)) {
-        UString value = static_cast<StringImp*>(v1)->value() + static_cast<StringImp*>(v2)->value();
-        if (value.isNull())
-            return throwOutOfMemoryError(exec);
-        return jsString(value);
-    }
-
-    // All other cases are pretty uncommon
-    return addSlowCase(exec, v1, v2);
-}
-
-static inline double addToNumber(OldInterpreterExecState* exec, JSValue* v1, JSValue* v2)
-{
-    JSType t1 = v1->type();
-    JSType t2 = v2->type();
-    const unsigned bothTypes = (t1 << 3) | t2;
-
-    if (bothTypes == ((NumberType << 3) | NumberType))
-        return v1->toNumber(exec) + v2->toNumber(exec);
-    if (bothTypes == ((StringType << 3) | StringType)) {
-        UString value = static_cast<StringImp*>(v1)->value() + static_cast<StringImp*>(v2)->value();
-        if (value.isNull())
-            return throwOutOfMemoryErrorToNumber(exec);
-        return value.toDouble();
-    }
-
-    // All other cases are pretty uncommon
-    return addSlowCaseToNumber(exec, v1, v2);
-}
-
-RegisterID* AddNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src1 = generator.emitNode(m_term1.get());
-    RegisterID* src2 = generator.emitNode(m_term2.get());
-    return generator.emitAdd(generator.finalDestination(dst, src1.get()), src1.get(), src2);
-}
-
-void AddNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_term1.get());
-    nodeStack.append(m_term2.get());
-}
-
-// ECMA 11.6.1
-JSValue* AddNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_term1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* v2 = m_term2->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    return add(exec, v1, v2);
-}
-
-double AddNode::inlineEvaluateToNumber(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_term1->evaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-
-    JSValue* v2 = m_term2->evaluate(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-
-    return addToNumber(exec, v1, v2);
-}
-
-double AddNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToNumber(exec);
-}
-
-int32_t AddNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toInt32(inlineEvaluateToNumber(exec));
-}
-
-uint32_t AddNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toUInt32(inlineEvaluateToNumber(exec));
-}
-
-double AddNumbersNode::inlineEvaluateToNumber(OldInterpreterExecState* exec)
-{
-    double n1 = m_term1->evaluateToNumber(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    double n2 = m_term2->evaluateToNumber(exec);
-    return n1 + n2;
-}
-
-JSValue* AddNumbersNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsNumber(inlineEvaluateToNumber(exec));
-}
-
-double AddNumbersNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToNumber(exec);
-}
-
-int32_t AddNumbersNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toInt32(inlineEvaluateToNumber(exec));
-}
-
-uint32_t AddNumbersNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toUInt32(inlineEvaluateToNumber(exec));
-}
-
-JSValue* AddStringsNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_term1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* v2 = m_term2->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    return jsString(static_cast<StringImp*>(v1)->value() + static_cast<StringImp*>(v2)->value());
-}
-
-JSValue* AddStringLeftNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_term1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* v2 = m_term2->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* p2 = v2->toPrimitive(exec, UnspecifiedType);
-    return jsString(static_cast<StringImp*>(v1)->value() + p2->toString(exec));
-}
-
-JSValue* AddStringRightNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_term1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* v2 = m_term2->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSValue* p1 = v1->toPrimitive(exec, UnspecifiedType);
-    return jsString(p1->toString(exec) + static_cast<StringImp*>(v2)->value());
-}
-
-RegisterID* SubNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src1 = generator.emitNode(m_term1.get());
-    RegisterID* src2 = generator.emitNode(m_term2.get());
-    return generator.emitSub(generator.finalDestination(dst, src1.get()), src1.get(), src2);
-}
-
-void SubNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_term1.get());
-    nodeStack.append(m_term2.get());
-}
-
-// ECMA 11.6.2
-double SubNode::inlineEvaluateToNumber(OldInterpreterExecState* exec)
-{
-    double n1 = m_term1->evaluateToNumber(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    double n2 = m_term2->evaluateToNumber(exec);
-    return n1 - n2;
-}
-
-JSValue* SubNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsNumber(inlineEvaluateToNumber(exec));
-}
-
-double SubNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToNumber(exec);
-}
-
-int32_t SubNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toInt32(inlineEvaluateToNumber(exec));
-}
-
-uint32_t SubNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return JSValue::toUInt32(inlineEvaluateToNumber(exec));
-}
-
-// ------------------------------ Shift Nodes ------------------------------------
-
-RegisterID* LeftShiftNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> val = generator.emitNode(m_term1.get());
-    RegisterID* shift = generator.emitNode(m_term2.get());
-    return generator.emitLeftShift(generator.finalDestination(dst, val.get()), val.get(), shift);
-}
-
-void LeftShiftNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_term1.get());
-    nodeStack.append(m_term2.get());
-}
-
-// ECMA 11.7.1
-int32_t LeftShiftNode::inlineEvaluateToInt32(OldInterpreterExecState* exec)
-{
-    int i1 = m_term1->evaluateToInt32(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    unsigned int i2 = m_term2->evaluateToUInt32(exec) & 0x1f;
-    return (i1 << i2);
-}
-
-JSValue* LeftShiftNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsNumber(inlineEvaluateToInt32(exec));
-}
-
-double LeftShiftNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-int32_t LeftShiftNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-uint32_t LeftShiftNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-RegisterID* RightShiftNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> val = generator.emitNode(m_term1.get());
-    RegisterID* shift = generator.emitNode(m_term2.get());
-    return generator.emitRightShift(generator.finalDestination(dst, val.get()), val.get(), shift);
-}
-
-void RightShiftNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_term1.get());
-    nodeStack.append(m_term2.get());
-}
-
-// ECMA 11.7.2
-int32_t RightShiftNode::inlineEvaluateToInt32(OldInterpreterExecState* exec)
-{
-    int i1 = m_term1->evaluateToInt32(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    unsigned int i2 = m_term2->evaluateToUInt32(exec) & 0x1f;
-    return (i1 >> i2);
-}
-
-JSValue* RightShiftNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsNumber(inlineEvaluateToInt32(exec));
-}
-
-double RightShiftNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-int32_t RightShiftNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-uint32_t RightShiftNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
-
-RegisterID* UnsignedRightShiftNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> val = generator.emitNode(m_term1.get());
-    RegisterID* shift = generator.emitNode(m_term2.get());
-    return generator.emitUnsignedRightShift(generator.finalDestination(dst, val.get()), val.get(), shift);
-}
-
-void UnsignedRightShiftNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_term1.get());
-    nodeStack.append(m_term2.get());
-}
-
-// ECMA 11.7.3
-uint32_t UnsignedRightShiftNode::inlineEvaluateToUInt32(OldInterpreterExecState* exec)
-{
-    unsigned int i1 = m_term1->evaluateToUInt32(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    unsigned int i2 = m_term2->evaluateToUInt32(exec) & 0x1f;
-    return (i1 >> i2);
-}
-
-JSValue* UnsignedRightShiftNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsNumber(inlineEvaluateToUInt32(exec));
-}
-
-double UnsignedRightShiftNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToUInt32(exec);
-}
-
-int32_t UnsignedRightShiftNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToUInt32(exec);
-}
-
-uint32_t UnsignedRightShiftNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToUInt32(exec);
-}
-
-// ------------------------------ Relational Nodes -------------------------------
-
-static inline bool lessThan(OldInterpreterExecState* exec, JSValue* v1, JSValue* v2)
-{
-    double n1;
-    double n2;
-    JSValue* p1;
-    JSValue* p2;
-    bool wasNotString1 = v1->getPrimitiveNumber(exec, n1, p1);
-    bool wasNotString2 = v2->getPrimitiveNumber(exec, n2, p2);
-
-    if (wasNotString1 | wasNotString2)
-        return n1 < n2;
-
-    return static_cast<const StringImp*>(p1)->value() < static_cast<const StringImp*>(p2)->value();
-}
-
-static inline bool lessThanEq(OldInterpreterExecState* exec, JSValue* v1, JSValue* v2)
-{
-    double n1;
-    double n2;
-    JSValue* p1;
-    JSValue* p2;
-    bool wasNotString1 = v1->getPrimitiveNumber(exec, n1, p1);
-    bool wasNotString2 = v2->getPrimitiveNumber(exec, n2, p2);
-
-    if (wasNotString1 | wasNotString2)
-        return n1 <= n2;
-
-    return !(static_cast<const StringImp*>(p2)->value() < static_cast<const StringImp*>(p1)->value());
-}
-
-RegisterID* LessNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
-    RegisterID* src2 = generator.emitNode(m_expr2.get());
-    return generator.emitLess(generator.finalDestination(dst, src1.get()), src1.get(), src2);
-}
-
-void LessNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
-
-// ECMA 11.8.1
-bool LessNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return lessThan(exec, v1, v2);
-}
-
-JSValue* LessNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsBoolean(inlineEvaluateToBoolean(exec));
-}
-
-bool LessNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToBoolean(exec);
-}
-
-bool LessNumbersNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
-{
-    double n1 = m_expr1->evaluateToNumber(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    double n2 = m_expr2->evaluateToNumber(exec);
-    return n1 < n2;
-}
-
-JSValue* LessNumbersNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsBoolean(inlineEvaluateToBoolean(exec));
-}
-
-bool LessNumbersNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToBoolean(exec);
-}
-
-bool LessStringsNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* v2 = m_expr2->evaluate(exec);
-    return static_cast<StringImp*>(v1)->value() < static_cast<StringImp*>(v2)->value();
-}
-
-JSValue* LessStringsNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsBoolean(inlineEvaluateToBoolean(exec));
-}
-
-bool LessStringsNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToBoolean(exec);
-}
-
-RegisterID* GreaterNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src1 = generator.emitNode(m_expr2.get());
-    RegisterID* src2 = generator.emitNode(m_expr1.get());
-    return generator.emitLess(generator.finalDestination(dst, src1.get()), src1.get(), src2);
-}
-
-void GreaterNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
-
-// ECMA 11.8.2
-bool GreaterNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return lessThan(exec, v2, v1);
-}
-
-JSValue* GreaterNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsBoolean(inlineEvaluateToBoolean(exec));
-}
-
-bool GreaterNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToBoolean(exec);
-}
-
-RegisterID* LessEqNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
-    RegisterID* src2 = generator.emitNode(m_expr2.get());
-    return generator.emitLessEq(generator.finalDestination(dst, src1.get()), src1.get(), src2);
-}
-
-void LessEqNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
-
-// ECMA 11.8.3
-bool LessEqNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return lessThanEq(exec, v1, v2);
-}
-
-JSValue* LessEqNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsBoolean(inlineEvaluateToBoolean(exec));
-}
-
-bool LessEqNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToBoolean(exec);
-}
-
-RegisterID* GreaterEqNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src1 = generator.emitNode(m_expr2.get());
-    RegisterID* src2 = generator.emitNode(m_expr1.get());
-    return generator.emitLessEq(generator.finalDestination(dst, src1.get()), src1.get(), src2);
-}
-
-void GreaterEqNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
-
-// ECMA 11.8.4
-bool GreaterEqNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return lessThanEq(exec, v2, v1);
-}
-
-JSValue* GreaterEqNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsBoolean(inlineEvaluateToBoolean(exec));
-}
-
-bool GreaterEqNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToBoolean(exec);
-}
-
-RegisterID* InstanceOfNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> value = generator.emitNode(m_expr1.get());
-    RegisterID* base = generator.emitNode(m_expr2.get());
-    return generator.emitInstanceOf(generator.finalDestination(dst, value.get()), value.get(), base);
-}
-
-void InstanceOfNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
-
-// ECMA 11.8.6
-JSValue* InstanceOfNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    if (!v2->isObject())
-        return throwError(exec, TypeError, "Value %s (result of expression %s) is not an object. Cannot be used with instanceof operator.", v2, m_expr2.get());
-
-    JSObject* o2 = static_cast<JSObject*>(v2);
-
-    // According to the spec, only some types of objects "implement" the [[HasInstance]] property.
-    // But we are supposed to throw an exception where the object does not "have" the [[HasInstance]]
-    // property. It seems that all objects have the property, but not all implement it, so in this
-    // case we return false (consistent with Mozilla).
-    if (!o2->implementsHasInstance())
-        return jsBoolean(false);
-
-    return jsBoolean(o2->hasInstance(exec, v1));
-}
-
-bool InstanceOfNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-
-    if (!v2->isObject()) {
-        throwError(exec, TypeError, "Value %s (result of expression %s) is not an object. Cannot be used with 'instanceof' operator.", v2, m_expr2.get());
-        return false;
-    }
-
-    JSObject* o2 = static_cast<JSObject*>(v2);
-
-    // According to the spec, only some types of objects "implement" the [[HasInstance]] property.
-    // But we are supposed to throw an exception where the object does not "have" the [[HasInstance]]
-    // property. It seems that all objects have the property, but not all implement it, so in this
-    // case we return false (consistent with Mozilla).
-    if (!o2->implementsHasInstance())
-        return false;
-
-    return o2->hasInstance(exec, v1);
-}
-
-RegisterID* InNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> property = generator.emitNode(m_expr1.get());
-    RegisterID* base = generator.emitNode(m_expr2.get());
-    return generator.emitIn(generator.finalDestination(dst, property.get()), property.get(), base);
-}
-
-void InNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
+// ------------------------------ DeleteBracketNode -----------------------------------
 
-// ECMA 11.8.7
-JSValue* InNode::evaluate(OldInterpreterExecState* exec)
+RegisterID* DeleteBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
+    RefPtr<RegisterID> r0 = generator.emitNode(m_base.get());
+    RefPtr<RegisterID> r1 = generator.emitNode(m_subscript.get());
+    return generator.emitDeleteByVal(generator.finalDestination(dst), r0.get(), r1.get());
+}
 
-    if (!v2->isObject())
-        return throwError(exec, TypeError, "Value %s (result of expression %s) is not an object. Cannot be used with 'in' operator.", v2, m_expr2.get());
+// ------------------------------ DeleteDotNode -----------------------------------
 
-    return jsBoolean(static_cast<JSObject*>(v2)->hasProperty(exec, Identifier(v1->toString(exec))));
+RegisterID* DeleteDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+{
+    RegisterID* r0 = generator.emitNode(m_base.get());
+    return generator.emitDeleteById(generator.finalDestination(dst), r0, m_ident);
 }
 
-bool InNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
+// ------------------------------ DeleteValueNode -----------------------------------
 
-    if (!v2->isObject()) {
-        throwError(exec, TypeError, "Value %s (result of expression %s) is not an object. Cannot be used with 'in' operator.", v2, m_expr2.get());
-        return false;
-    }
+RegisterID* DeleteValueNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+{
+    generator.emitNode(m_expr.get());
 
-    return static_cast<JSObject*>(v2)->hasProperty(exec, Identifier(v1->toString(exec)));
+    // delete on a non-location expression ignores the value and returns true
+    return generator.emitLoad(generator.finalDestination(dst), true);
 }
 
-// ------------------------------ Equality Nodes ------------------------------------
+// ------------------------------ VoidNode -------------------------------------
 
-RegisterID* EqualNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+RegisterID* VoidNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
-    RegisterID* src2 = generator.emitNode(m_expr2.get());
-    return generator.emitEqual(generator.finalDestination(dst, src1.get()), src1.get(), src2);
+    RefPtr<RegisterID> r0 = generator.emitNode(m_expr.get());
+    return generator.emitLoad(generator.finalDestination(dst, r0.get()), jsUndefined());
 }
 
-void EqualNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
+// ------------------------------ TypeOfValueNode -----------------------------------
 
-// ECMA 11.9.1
-bool EqualNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
+RegisterID* TypeOfResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
+    if (RegisterID* local = generator.registerForLocal(m_ident))
+        return generator.emitTypeOf(generator.finalDestination(dst), local);
 
-    return equal(exec, v1, v2);
+    RefPtr<RegisterID> scratch = generator.emitResolveBase(generator.tempDestination(dst), m_ident);
+    generator.emitGetById(scratch.get(), scratch.get(), m_ident);
+    return generator.emitTypeOf(generator.finalDestination(dst, scratch.get()), scratch.get());
 }
 
-JSValue* EqualNode::evaluate(OldInterpreterExecState* exec)
-{
-    return jsBoolean(inlineEvaluateToBoolean(exec));
-}
+// ------------------------------ TypeOfValueNode -----------------------------------
 
-bool EqualNode::evaluateToBoolean(OldInterpreterExecState* exec)
+RegisterID* TypeOfValueNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToBoolean(exec);
+    RefPtr<RegisterID> src = generator.emitNode(m_expr.get());
+    return generator.emitTypeOf(generator.finalDestination(dst), src.get());
 }
 
-RegisterID* NotEqualNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
-    RegisterID* src2 = generator.emitNode(m_expr2.get());
-    return generator.emitNotEqual(generator.finalDestination(dst, src1.get()), src1.get(), src2);
-}
+// ------------------------------ PrefixResolveNode ----------------------------------
 
-void NotEqualNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
+RegisterID* PreIncResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
+    if (RegisterID* local = generator.registerForLocal(m_ident)) {
+        if (generator.isLocalConstant(m_ident)) {
+            RefPtr<RegisterID> r0 = generator.emitLoad(generator.finalDestination(dst), 1.0);
+            return generator.emitAdd(r0.get(), local, r0.get());
+        }
+        
+        generator.emitPreInc(local);
+        return generator.moveToDestinationIfNeeded(dst, local);
+    }
 
-// ECMA 11.9.2
-bool NotEqualNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
+    int index = 0;
+    size_t depth = 0;
+    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
+        RefPtr<RegisterID> propDst = generator.emitGetScopedVar(generator.tempDestination(dst), depth, index);
+        generator.emitPreInc(propDst.get());
+        generator.emitPutScopedVar(depth, index, propDst.get());
+        return generator.moveToDestinationIfNeeded(dst, propDst.get());;
+    }
 
-    return !equal(exec,v1, v2);
+    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
+    RefPtr<RegisterID> base = generator.emitResolveWithBase(generator.newTemporary(), propDst.get(), m_ident);
+    generator.emitPreInc(propDst.get());
+    generator.emitPutById(base.get(), m_ident, propDst.get());
+    return generator.moveToDestinationIfNeeded(dst, propDst.get());
 }
 
-JSValue* NotEqualNode::evaluate(OldInterpreterExecState* exec)
+RegisterID* PreDecResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return jsBoolean(inlineEvaluateToBoolean(exec));
-}
+    if (RegisterID* local = generator.registerForLocal(m_ident)) {
+        if (generator.isLocalConstant(m_ident)) {
+            RefPtr<RegisterID> r0 = generator.emitLoad(generator.finalDestination(dst), -1.0);
+            return generator.emitAdd(r0.get(), local, r0.get());
+        }
+        
+        generator.emitPreDec(local);
+        return generator.moveToDestinationIfNeeded(dst, local);
+    }
 
-bool NotEqualNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToBoolean(exec);
-}
+    int index = 0;
+    size_t depth = 0;
+    if (generator.findScopedProperty(m_ident, index, depth) && index != missingSymbolMarker()) {
+        RefPtr<RegisterID> propDst = generator.emitGetScopedVar(generator.tempDestination(dst), depth, index);
+        generator.emitPreDec(propDst.get());
+        generator.emitPutScopedVar(depth, index, propDst.get());
+        return generator.moveToDestinationIfNeeded(dst, propDst.get());;
+    }
 
-RegisterID* StrictEqualNode::emitCode(CodeGenerator& generator, RegisterID* dst)
-{
-    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
-    RegisterID* src2 = generator.emitNode(m_expr2.get());
-    return generator.emitStrictEqual(generator.finalDestination(dst, src1.get()), src1.get(), src2);
+    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
+    RefPtr<RegisterID> base = generator.emitResolveWithBase(generator.newTemporary(), propDst.get(), m_ident);
+    generator.emitPreDec(propDst.get());
+    generator.emitPutById(base.get(), m_ident, propDst.get());
+    return generator.moveToDestinationIfNeeded(dst, propDst.get());
 }
 
-void StrictEqualNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
+// ------------------------------ PrefixBracketNode ----------------------------------
+
+RegisterID* PreIncBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RefPtr<RegisterID> property = generator.emitNode(m_subscript.get());
+    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
+    RegisterID* value = generator.emitGetByVal(propDst.get(), base.get(), property.get());
+    generator.emitPreInc(value);
+    generator.emitPutByVal(base.get(), property.get(), value);
+    return generator.moveToDestinationIfNeeded(dst, propDst.get());
 }
 
-// ECMA 11.9.4
-bool StrictEqualNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
+RegisterID* PreDecBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-
-    return strictEqual(v1, v2);
+    
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RefPtr<RegisterID> property = generator.emitNode(m_subscript.get());
+    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
+    RegisterID* value = generator.emitGetByVal(propDst.get(), base.get(), property.get());
+    generator.emitPreDec(value);
+    generator.emitPutByVal(base.get(), property.get(), value);
+    return generator.moveToDestinationIfNeeded(dst, propDst.get());
 }
 
-JSValue* StrictEqualNode::evaluate(OldInterpreterExecState* exec)
+// ------------------------------ PrefixDotNode ----------------------------------
+
+RegisterID* PreIncDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return jsBoolean(inlineEvaluateToBoolean(exec));
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
+    RegisterID* value = generator.emitGetById(propDst.get(), base.get(), m_ident);
+    generator.emitPreInc(value);
+    generator.emitPutById(base.get(), m_ident, value);
+    return generator.moveToDestinationIfNeeded(dst, propDst.get());
 }
 
-bool StrictEqualNode::evaluateToBoolean(OldInterpreterExecState* exec)
+RegisterID* PreDecDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToBoolean(exec);
+    RefPtr<RegisterID> base = generator.emitNode(m_base.get());
+    RefPtr<RegisterID> propDst = generator.tempDestination(dst);
+    RegisterID* value = generator.emitGetById(propDst.get(), base.get(), m_ident);
+    generator.emitPreDec(value);
+    generator.emitPutById(base.get(), m_ident, value);
+    return generator.moveToDestinationIfNeeded(dst, propDst.get());
 }
 
-RegisterID* NotStrictEqualNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+// ------------------------------ PrefixErrorNode -----------------------------------
+
+RegisterID* PrefixErrorNode::emitCode(CodeGenerator& generator, RegisterID*)
 {
-    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
-    RegisterID* src2 = generator.emitNode(m_expr2.get());
-    return generator.emitNotStrictEqual(generator.finalDestination(dst, src1.get()), src1.get(), src2);
+    return emitThrowError(generator, ReferenceError, m_operator == OpPlusPlus ? "Prefix ++ operator applied to value that is not a reference." : "Prefix -- operator applied to value that is not a reference.");
 }
 
-void NotStrictEqualNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
+// ------------------------------ UnaryPlusNode --------------------------------
+
+RegisterID* UnaryPlusNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
+    RegisterID* src = generator.emitNode(m_expr.get());
+    return generator.emitToJSNumber(generator.finalDestination(dst), src);
 }
 
-// ECMA 11.9.5
-bool NotStrictEqualNode::inlineEvaluateToBoolean(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
+// ------------------------------ NegateNode -----------------------------------
 
-    return !strictEqual(v1, v2);
+RegisterID* NegateNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+{
+    RegisterID* src = generator.emitNode(m_expr.get());
+    return generator.emitNegate(generator.finalDestination(dst), src);
 }
 
-JSValue* NotStrictEqualNode::evaluate(OldInterpreterExecState* exec)
+// ------------------------------ BitwiseNotNode -------------------------------
+
+RegisterID* BitwiseNotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return jsBoolean(inlineEvaluateToBoolean(exec));
+    RegisterID* src = generator.emitNode(m_expr.get());
+    return generator.emitBitNot(generator.finalDestination(dst), src);
 }
 
-bool NotStrictEqualNode::evaluateToBoolean(OldInterpreterExecState* exec)
+// ------------------------------ LogicalNotNode -------------------------------
+
+RegisterID* LogicalNotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToBoolean(exec);
+    RegisterID* src = generator.emitNode(m_expr.get());
+    return generator.emitNot(generator.finalDestination(dst), src);
 }
 
-// ------------------------------ Bit Operation Nodes ----------------------------------
+// ------------------------------ Multiplicative Nodes -----------------------------------
 
-RegisterID* BitAndNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+RegisterID* MultNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
-    RegisterID* src2 = generator.emitNode(m_expr2.get());
-    return generator.emitBitAnd(generator.finalDestination(dst, src1.get()), src1.get(), src2);
+    RefPtr<RegisterID> src1 = generator.emitNode(m_term1.get());
+    RegisterID* src2 = generator.emitNode(m_term2.get());
+    return generator.emitMul(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-void BitAndNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
+RegisterID* DivNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
+    RefPtr<RegisterID> dividend = generator.emitNode(m_term1.get());
+    RegisterID* divisor = generator.emitNode(m_term2.get());
+    return generator.emitDiv(generator.finalDestination(dst, dividend.get()), dividend.get(), divisor);
 }
 
-// ECMA 11.10
-JSValue* BitAndNode::evaluate(OldInterpreterExecState* exec)
+RegisterID* ModNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    return jsNumberFromAnd(exec, v1, v2);
+    RefPtr<RegisterID> dividend = generator.emitNode(m_term1.get());
+    RegisterID* divisor = generator.emitNode(m_term2.get());
+    return generator.emitMod(generator.finalDestination(dst, dividend.get()), dividend.get(), divisor);
 }
 
-int32_t BitAndNode::inlineEvaluateToInt32(OldInterpreterExecState* exec)
+// ------------------------------ Additive Nodes --------------------------------------
+
+RegisterID* AddNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    int32_t i1 = m_expr1->evaluateToInt32(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    int32_t i2 = m_expr2->evaluateToInt32(exec);
-    return (i1 & i2);
+    RefPtr<RegisterID> src1 = generator.emitNode(m_term1.get());
+    RegisterID* src2 = generator.emitNode(m_term2.get());
+    return generator.emitAdd(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-double BitAndNode::evaluateToNumber(OldInterpreterExecState* exec)
+RegisterID* SubNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> src1 = generator.emitNode(m_term1.get());
+    RegisterID* src2 = generator.emitNode(m_term2.get());
+    return generator.emitSub(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-bool BitAndNode::evaluateToBoolean(OldInterpreterExecState* exec)
+// ------------------------------ Shift Nodes ------------------------------------
+
+RegisterID* LeftShiftNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> val = generator.emitNode(m_term1.get());
+    RegisterID* shift = generator.emitNode(m_term2.get());
+    return generator.emitLeftShift(generator.finalDestination(dst, val.get()), val.get(), shift);
 }
 
-int32_t BitAndNode::evaluateToInt32(OldInterpreterExecState* exec)
+RegisterID* RightShiftNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> val = generator.emitNode(m_term1.get());
+    RegisterID* shift = generator.emitNode(m_term2.get());
+    return generator.emitRightShift(generator.finalDestination(dst, val.get()), val.get(), shift);
 }
 
-uint32_t BitAndNode::evaluateToUInt32(OldInterpreterExecState* exec)
+RegisterID* UnsignedRightShiftNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> val = generator.emitNode(m_term1.get());
+    RegisterID* shift = generator.emitNode(m_term2.get());
+    return generator.emitUnsignedRightShift(generator.finalDestination(dst, val.get()), val.get(), shift);
 }
 
-RegisterID* BitXOrNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+// ------------------------------ Relational Nodes -------------------------------
+
+RegisterID* LessNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
     RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
     RegisterID* src2 = generator.emitNode(m_expr2.get());
-    return generator.emitBitXOr(generator.finalDestination(dst, src1.get()), src1.get(), src2);
-}
-
-void BitXOrNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
+    return generator.emitLess(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-int32_t BitXOrNode::inlineEvaluateToInt32(OldInterpreterExecState* exec)
+RegisterID* GreaterNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    int i1 = m_expr1->evaluateToInt32(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    int i2 = m_expr2->evaluateToInt32(exec);
-    return (i1 ^ i2);
+    RefPtr<RegisterID> src1 = generator.emitNode(m_expr2.get());
+    RegisterID* src2 = generator.emitNode(m_expr1.get());
+    return generator.emitLess(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-JSValue* BitXOrNode::evaluate(OldInterpreterExecState* exec)
+RegisterID* LessEqNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return jsNumber(inlineEvaluateToInt32(exec));
+    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
+    RegisterID* src2 = generator.emitNode(m_expr2.get());
+    return generator.emitLessEq(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-double BitXOrNode::evaluateToNumber(OldInterpreterExecState* exec)
+RegisterID* GreaterEqNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> src1 = generator.emitNode(m_expr2.get());
+    RegisterID* src2 = generator.emitNode(m_expr1.get());
+    return generator.emitLessEq(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-bool BitXOrNode::evaluateToBoolean(OldInterpreterExecState* exec)
+RegisterID* InstanceOfNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> value = generator.emitNode(m_expr1.get());
+    RegisterID* base = generator.emitNode(m_expr2.get());
+    return generator.emitInstanceOf(generator.finalDestination(dst, value.get()), value.get(), base);
 }
 
-int32_t BitXOrNode::evaluateToInt32(OldInterpreterExecState* exec)
+RegisterID* InNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> property = generator.emitNode(m_expr1.get());
+    RegisterID* base = generator.emitNode(m_expr2.get());
+    return generator.emitIn(generator.finalDestination(dst, property.get()), property.get(), base);
 }
 
-uint32_t BitXOrNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
+// ------------------------------ Equality Nodes ------------------------------------
 
-RegisterID* BitOrNode::emitCode(CodeGenerator& generator, RegisterID* dst)
+RegisterID* EqualNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
     RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
     RegisterID* src2 = generator.emitNode(m_expr2.get());
-    return generator.emitBitOr(generator.finalDestination(dst, src1.get()), src1.get(), src2);
+    return generator.emitEqual(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-void BitOrNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
+RegisterID* NotEqualNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
+    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
+    RegisterID* src2 = generator.emitNode(m_expr2.get());
+    return generator.emitNotEqual(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-int32_t BitOrNode::inlineEvaluateToInt32(OldInterpreterExecState* exec)
+RegisterID* StrictEqualNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    int i1 = m_expr1->evaluateToInt32(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    int i2 = m_expr2->evaluateToInt32(exec);
-    return (i1 | i2);
+    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
+    RegisterID* src2 = generator.emitNode(m_expr2.get());
+    return generator.emitStrictEqual(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-JSValue* BitOrNode::evaluate(OldInterpreterExecState* exec)
+RegisterID* NotStrictEqualNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return jsNumber(inlineEvaluateToInt32(exec));
+    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
+    RegisterID* src2 = generator.emitNode(m_expr2.get());
+    return generator.emitNotStrictEqual(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-double BitOrNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    return inlineEvaluateToInt32(exec);
-}
+// ------------------------------ Bit Operation Nodes ----------------------------------
 
-bool BitOrNode::evaluateToBoolean(OldInterpreterExecState* exec)
+RegisterID* BitAndNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
+    RegisterID* src2 = generator.emitNode(m_expr2.get());
+    return generator.emitBitAnd(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-int32_t BitOrNode::evaluateToInt32(OldInterpreterExecState* exec)
+RegisterID* BitXOrNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
+    RegisterID* src2 = generator.emitNode(m_expr2.get());
+    return generator.emitBitXOr(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
-uint32_t BitOrNode::evaluateToUInt32(OldInterpreterExecState* exec)
+RegisterID* BitOrNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    return inlineEvaluateToInt32(exec);
+    RefPtr<RegisterID> src1 = generator.emitNode(m_expr1.get());
+    RegisterID* src2 = generator.emitNode(m_expr2.get());
+    return generator.emitBitOr(generator.finalDestination(dst, src1.get()), src1.get(), src2);
 }
 
 // ------------------------------ Binary Logical Nodes ----------------------------
@@ -3969,33 +977,6 @@ RegisterID* LogicalAndNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.moveToDestinationIfNeeded(dst, temp.get());
 }
 
-void LogicalAndNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
-
-// ECMA 11.11
-JSValue* LogicalAndNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    bool b1 = v1->toBoolean(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    if (!b1)
-        return v1;
-    JSValue* v2 = m_expr2->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    return v2;
-}
-
-bool LogicalAndNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    bool b = m_expr1->evaluateToBoolean(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return b && m_expr2->evaluateToBoolean(exec);
-}
-
 RegisterID* LogicalOrNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
     RefPtr<RegisterID> temp = generator.tempDestination(dst);
@@ -4009,28 +990,6 @@ RegisterID* LogicalOrNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.moveToDestinationIfNeeded(dst, temp.get());
 }
 
-void LogicalOrNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
-
-JSValue* LogicalOrNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v1 = m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    if (v1->toBoolean(exec))
-        return v1;
-    return m_expr2->evaluate(exec);
-}
-
-bool LogicalOrNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    bool b = m_expr1->evaluateToBoolean(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return b || m_expr2->evaluateToBoolean(exec);
-}
-
 // ------------------------------ ConditionalNode ------------------------------
 
 RegisterID* ConditionalNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -4053,115 +1012,6 @@ RegisterID* ConditionalNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return newDst.get();
 }
 
-void ConditionalNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-    nodeStack.append(m_logical.get());
-}
-
-// ECMA 11.12
-JSValue* ConditionalNode::evaluate(OldInterpreterExecState* exec)
-{
-    bool b = m_logical->evaluateToBoolean(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    return b ? m_expr1->evaluate(exec) : m_expr2->evaluate(exec);
-}
-
-bool ConditionalNode::evaluateToBoolean(OldInterpreterExecState* exec)
-{
-    bool b = m_logical->evaluateToBoolean(exec);
-    KJS_CHECKEXCEPTIONBOOLEAN
-    return b ? m_expr1->evaluateToBoolean(exec) : m_expr2->evaluateToBoolean(exec);
-}
-
-double ConditionalNode::evaluateToNumber(OldInterpreterExecState* exec)
-{
-    bool b = m_logical->evaluateToBoolean(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return b ? m_expr1->evaluateToNumber(exec) : m_expr2->evaluateToNumber(exec);
-}
-
-int32_t ConditionalNode::evaluateToInt32(OldInterpreterExecState* exec)
-{
-    bool b = m_logical->evaluateToBoolean(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return b ? m_expr1->evaluateToInt32(exec) : m_expr2->evaluateToInt32(exec);
-}
-
-uint32_t ConditionalNode::evaluateToUInt32(OldInterpreterExecState* exec)
-{
-    bool b = m_logical->evaluateToBoolean(exec);
-    KJS_CHECKEXCEPTIONNUMBER
-    return b ? m_expr1->evaluateToUInt32(exec) : m_expr2->evaluateToUInt32(exec);
-}
-
-// ECMA 11.13
-
-static ALWAYS_INLINE JSValue* valueForReadModifyAssignment(OldInterpreterExecState* exec, JSValue* current, ExpressionNode* right, Operator oper) KJS_FAST_CALL;
-static ALWAYS_INLINE JSValue* valueForReadModifyAssignment(OldInterpreterExecState* exec, JSValue* current, ExpressionNode* right, Operator oper)
-{
-    JSValue* v;
-    int i1;
-    int i2;
-    unsigned int ui;
-    switch (oper) {
-        case OpMultEq:
-            v = jsNumber(current->toNumber(exec) * right->evaluateToNumber(exec));
-            break;
-        case OpDivEq:
-            v = jsNumber(current->toNumber(exec) / right->evaluateToNumber(exec));
-            break;
-        case OpPlusEq:
-            v = add(exec, current, right->evaluate(exec));
-            break;
-        case OpMinusEq:
-            v = jsNumber(current->toNumber(exec) - right->evaluateToNumber(exec));
-            break;
-        case OpLShift:
-            i1 = current->toInt32(exec);
-            i2 = right->evaluateToInt32(exec);
-            v = jsNumber(i1 << i2);
-            break;
-        case OpRShift:
-            i1 = current->toInt32(exec);
-            i2 = right->evaluateToInt32(exec);
-            v = jsNumber(i1 >> i2);
-            break;
-        case OpURShift:
-            ui = current->toUInt32(exec);
-            i2 = right->evaluateToInt32(exec);
-            v = jsNumber(ui >> i2);
-            break;
-        case OpAndEq:
-            i1 = current->toInt32(exec);
-            i2 = right->evaluateToInt32(exec);
-            v = jsNumber(i1 & i2);
-            break;
-        case OpXOrEq:
-            i1 = current->toInt32(exec);
-            i2 = right->evaluateToInt32(exec);
-            v = jsNumber(i1 ^ i2);
-            break;
-        case OpOrEq:
-            i1 = current->toInt32(exec);
-            i2 = right->evaluateToInt32(exec);
-            v = jsNumber(i1 | i2);
-            break;
-        case OpModEq: {
-            double d1 = current->toNumber(exec);
-            double d2 = right->evaluateToNumber(exec);
-            v = jsNumber(fmod(d1, d2));
-        }
-            break;
-        default:
-            ASSERT_NOT_REACHED();
-            v = jsUndefined();
-    }
-
-    return v;
-}
-
 // ------------------------------ ReadModifyResolveNode -----------------------------------
 
 // FIXME: should this be moved to be a method on CodeGenerator?
@@ -4236,18 +1086,6 @@ RegisterID* ReadModifyResolveNode::emitCode(CodeGenerator& generator, RegisterID
     return generator.emitPutById(base.get(), m_ident, result);
 }
 
-void ReadModifyResolveNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable& symbolTable, const LocalStorage& localStorage, NodeStack& nodeStack)
-{
-    nodeStack.append(m_right.get());
-    int index = symbolTable.get(m_ident.ustring().rep()).getIndex();
-    if (index != missingSymbolMarker()) {
-        if (isConstant(localStorage, index))
-            new (this) ReadModifyConstNode(index);
-        else
-            new (this) ReadModifyLocalVarNode(index);
-    }
-}
-
 // ------------------------------ AssignResolveNode -----------------------------------
 
 RegisterID* AssignResolveNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -4273,146 +1111,7 @@ RegisterID* AssignResolveNode::emitCode(CodeGenerator& generator, RegisterID* ds
     return generator.emitPutById(base.get(), m_ident, value);
 }
 
-void AssignResolveNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable& symbolTable, const LocalStorage& localStorage, NodeStack& nodeStack)
-{
-    nodeStack.append(m_right.get());
-    int index = symbolTable.get(m_ident.ustring().rep()).getIndex();
-    if (index != missingSymbolMarker()) {
-        if (isConstant(localStorage, index))
-            new (this) AssignConstNode;
-        else
-            new (this) AssignLocalVarNode(index);
-    }
-}
-
-// ------------------------------ ReadModifyLocalVarNode -----------------------------------
-
-JSValue* ReadModifyLocalVarNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-
-    ASSERT(m_operator != OpEqual);
-    JSValue* v = valueForReadModifyAssignment(exec, exec->localStorage()[m_index].value, m_right.get(), m_operator);
-
-    KJS_CHECKEXCEPTIONVALUE
-    
-    // We can't store a pointer into localStorage() and use it throughout the function
-    // body, because valueForReadModifyAssignment() might cause an ActivationImp tear-off,
-    // changing the value of localStorage().
-    
-    exec->localStorage()[m_index].value = v;
-    return v;
-}
-
-// ------------------------------ AssignLocalVarNode -----------------------------------
-
-JSValue* AssignLocalVarNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    JSValue* v = m_right->evaluate(exec);
-
-    KJS_CHECKEXCEPTIONVALUE
-
-    exec->localStorage()[m_index].value = v;
-
-    return v;
-}
-
-// ------------------------------ ReadModifyConstNode -----------------------------------
-
-JSValue* ReadModifyConstNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject() == exec->scopeChain().top());
-    JSValue* left = exec->localStorage()[m_index].value;
-    ASSERT(m_operator != OpEqual);
-    JSValue* result = valueForReadModifyAssignment(exec, left, m_right.get(), m_operator);
-    KJS_CHECKEXCEPTIONVALUE
-    return result;
-}
-
-// ------------------------------ AssignConstNode -----------------------------------
-
-JSValue* AssignConstNode::evaluate(OldInterpreterExecState* exec)
-{
-    return m_right->evaluate(exec);
-}
-
-JSValue* ReadModifyResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // We must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    JSObject* base;
-    do {
-        base = *iter;
-        if (base->getPropertySlot(exec, m_ident, slot)) {
-            // See the comment in PostIncResolveNode::evaluate().
-
-            base = *iter;
-            goto found;
-        }
-
-        ++iter;
-    } while (iter != end);
-
-    ASSERT(m_operator != OpEqual);
-    return throwUndefinedVariableError(exec, m_ident);
-
-found:
-    JSValue* v;
-
-    ASSERT(m_operator != OpEqual);
-    JSValue* v1 = slot.getValue(exec, base, m_ident);
-    KJS_CHECKEXCEPTIONVALUE
-    v = valueForReadModifyAssignment(exec, v1, m_right.get(), m_operator);
-
-    KJS_CHECKEXCEPTIONVALUE
-    
-    // Since valueForReadModifyAssignment() might cause an ActivationImp tear-off,
-    // we need to get the base from the ScopeChainIterator again.
-    
-    (*iter)->put(exec, m_ident, v);
-    return v;
-}
-
-JSValue* AssignResolveNode::evaluate(OldInterpreterExecState* exec)
-{
-    const ScopeChain& chain = exec->scopeChain();
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // we must always have something in the scope chain
-    ASSERT(iter != end);
-
-    PropertySlot slot;
-    JSObject* base;
-    do {
-        base = *iter;
-        if (base->getPropertySlot(exec, m_ident, slot)) {
-            // See the comment in PostIncResolveNode::evaluate().
-
-            base = *iter;
-            goto found;
-        }
-
-        ++iter;
-    } while (iter != end);
-
-found:
-    JSValue* v = m_right->evaluate(exec);
-
-    KJS_CHECKEXCEPTIONVALUE
-
-    base->put(exec, m_ident, v);
-    return v;
-}
-
-// ------------------------------ ReadModifyDotNode -----------------------------------
+// ------------------------------ AssignDotNode -----------------------------------
 
 RegisterID* AssignDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
@@ -4423,25 +1122,7 @@ RegisterID* AssignDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.moveToDestinationIfNeeded(dst, result);
 }
 
-void AssignDotNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_right.get());
-    nodeStack.append(m_base.get());
-}
-
-JSValue* AssignDotNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSObject* base = baseValue->toObject(exec);
-
-    JSValue* v = m_right->evaluate(exec);
-
-    KJS_CHECKEXCEPTIONVALUE
-
-    base->put(exec, m_ident, v);
-    return v;
-}
+// ------------------------------ ReadModifyDotNode -----------------------------------
 
 RegisterID* ReadModifyDotNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
@@ -4452,32 +1133,6 @@ RegisterID* ReadModifyDotNode::emitCode(CodeGenerator& generator, RegisterID* ds
     return generator.emitPutById(base.get(), m_ident, updatedValue);
 }
 
-void ReadModifyDotNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_right.get());
-    nodeStack.append(m_base.get());
-}
-
-JSValue* ReadModifyDotNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSObject* base = baseValue->toObject(exec);
-
-    JSValue* v;
-
-    ASSERT(m_operator != OpEqual);
-    PropertySlot slot;
-    JSValue* v1 = base->getPropertySlot(exec, m_ident, slot) ? slot.getValue(exec, base, m_ident) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-    v = valueForReadModifyAssignment(exec, v1, m_right.get(), m_operator);
-
-    KJS_CHECKEXCEPTIONVALUE
-
-    base->put(exec, m_ident, v);
-    return v;
-}
-
 // ------------------------------ AssignErrorNode -----------------------------------
 
 RegisterID* AssignErrorNode::emitCode(CodeGenerator& generator, RegisterID*)
@@ -4485,13 +1140,6 @@ RegisterID* AssignErrorNode::emitCode(CodeGenerator& generator, RegisterID*)
     return emitThrowError(generator, ReferenceError, "Left side of assignment is not a reference.");
 }
 
-JSValue* AssignErrorNode::evaluate(OldInterpreterExecState* exec)
-{
-    throwError(exec, ReferenceError, "Left side of assignment is not a reference.");
-    handleException(exec);
-    return jsUndefined();
-}
-
 // ------------------------------ AssignBracketNode -----------------------------------
 
 RegisterID* AssignBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -4504,39 +1152,6 @@ RegisterID* AssignBracketNode::emitCode(CodeGenerator& generator, RegisterID* ds
     return generator.moveToDestinationIfNeeded(dst, result);
 }
 
-void AssignBracketNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_right.get());
-    nodeStack.append(m_subscript.get());
-    nodeStack.append(m_base.get());
-}
-
-JSValue* AssignBracketNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* subscript = m_subscript->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* base = baseValue->toObject(exec);
-
-    uint32_t propertyIndex;
-    if (subscript->getUInt32(propertyIndex)) {
-        JSValue* v = m_right->evaluate(exec);
-        KJS_CHECKEXCEPTIONVALUE
-
-        base->put(exec, propertyIndex, v);
-        return v;
-    }
-
-    Identifier propertyName(subscript->toString(exec));
-    JSValue* v = m_right->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    base->put(exec, propertyName, v);
-    return v;
-}
-
 RegisterID* ReadModifyBracketNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
     RefPtr<RegisterID> base = generator.emitNodeForLeftHandSide(m_base.get(), m_subscriptHasAssignments || m_rightHasAssignments);
@@ -4551,52 +1166,6 @@ RegisterID* ReadModifyBracketNode::emitCode(CodeGenerator& generator, RegisterID
     return updatedValue;
 }
 
-void ReadModifyBracketNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_right.get());
-    nodeStack.append(m_subscript.get());
-    nodeStack.append(m_base.get());
-}
-
-JSValue* ReadModifyBracketNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* baseValue = m_base->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    JSValue* subscript = m_subscript->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    JSObject* base = baseValue->toObject(exec);
-
-    uint32_t propertyIndex;
-    if (subscript->getUInt32(propertyIndex)) {
-        JSValue* v;
-        ASSERT(m_operator != OpEqual);
-        PropertySlot slot;
-        JSValue* v1 = base->getPropertySlot(exec, propertyIndex, slot) ? slot.getValue(exec, base, propertyIndex) : jsUndefined();
-        KJS_CHECKEXCEPTIONVALUE
-        v = valueForReadModifyAssignment(exec, v1, m_right.get(), m_operator);
-
-        KJS_CHECKEXCEPTIONVALUE
-
-        base->put(exec, propertyIndex, v);
-        return v;
-    }
-
-    Identifier propertyName(subscript->toString(exec));
-    JSValue* v;
-
-    ASSERT(m_operator != OpEqual);
-    PropertySlot slot;
-    JSValue* v1 = base->getPropertySlot(exec, propertyName, slot) ? slot.getValue(exec, base, propertyName) : jsUndefined();
-    KJS_CHECKEXCEPTIONVALUE
-    v = valueForReadModifyAssignment(exec, v1, m_right.get(), m_operator);
-
-    KJS_CHECKEXCEPTIONVALUE
-
-    base->put(exec, propertyName, v);
-    return v;
-}
-
 // ------------------------------ CommaNode ------------------------------------
 
 RegisterID* CommaNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -4605,20 +1174,6 @@ RegisterID* CommaNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.emitNode(dst, m_expr2.get());
 }
 
-void CommaNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
-
-// ECMA 11.14
-JSValue* CommaNode::evaluate(OldInterpreterExecState* exec)
-{
-    m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-    return m_expr2->evaluate(exec);
-}
-
 // ------------------------------ ConstDeclNode ----------------------------------
 
 ConstDeclNode::ConstDeclNode(const Identifier& ident, ExpressionNode* init)
@@ -4627,67 +1182,6 @@ ConstDeclNode::ConstDeclNode(const Identifier& ident, ExpressionNode* init)
 {
 }
 
-void ConstDeclNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_next)
-        nodeStack.append(m_next.get());
-    if (m_init)
-        nodeStack.append(m_init.get());
-}
-
-void ConstDeclNode::handleSlowCase(OldInterpreterExecState* exec, const ScopeChain& chain, JSValue* val)
-{
-    ScopeChainIterator iter = chain.begin();
-    ScopeChainIterator end = chain.end();
-
-    // We must always have something in the scope chain
-    ASSERT(iter != end);
-
-    JSObject* base;
-
-    do {
-        base = *iter;
-        if (base->isVariableObject())
-            break;
-        ++iter;
-    } while (iter != end);
-
-    ASSERT(base && base->isVariableObject());
-
-    static_cast<JSVariableObject*>(base)->putWithAttributes(exec, m_ident, val, ReadOnly);
-}
-
-// ECMA 12.2
-inline void ConstDeclNode::evaluateSingle(OldInterpreterExecState* exec)
-{
-    ASSERT(exec->variableObject()->hasOwnProperty(exec, m_ident) || exec->codeType() == EvalCode); // Guaranteed by processDeclarations.
-    const ScopeChain& chain = exec->scopeChain();
-    JSVariableObject* variableObject = exec->variableObject();
-
-    bool inGlobalScope = ++chain.begin() == chain.end();
-
-    if (m_init) {
-        if (inGlobalScope) {
-            JSValue* val = m_init->evaluate(exec);
-            unsigned attributes = ReadOnly;
-            if (exec->codeType() != EvalCode)
-                attributes |= DontDelete;
-            variableObject->putWithAttributes(exec, m_ident, val, attributes);
-        } else {
-            JSValue* val = m_init->evaluate(exec);
-            KJS_CHECKEXCEPTIONVOID
-
-            // if the variable object is the top of the scope chain, then that must
-            // be where this variable is declared, processVarDecls would have put
-            // it there. Don't search the scope chain, to optimize this very common case.
-            if (chain.top() != variableObject)
-                return handleSlowCase(exec, chain, val);
-
-            variableObject->putWithAttributes(exec, m_ident, val, ReadOnly);
-        }
-    }
-}
-
 RegisterID* ConstDeclNode::emitCodeSingle(CodeGenerator& generator)
 {
     if (RegisterID* local = generator.registerForLocalConstInit(m_ident)) {
@@ -4713,42 +1207,13 @@ RegisterID* ConstDeclNode::emitCode(CodeGenerator& generator, RegisterID*)
     return result;
 }
 
-JSValue* ConstDeclNode::evaluate(OldInterpreterExecState* exec)
-{
-    evaluateSingle(exec);
-
-    if (ConstDeclNode* n = m_next.get()) {
-        do {
-            n->evaluateSingle(exec);
-            KJS_CHECKEXCEPTIONVALUE
-            n = n->m_next.get();
-        } while (n);
-    }
-    return jsUndefined();
-}
-
 // ------------------------------ ConstStatementNode -----------------------------
 
-void ConstStatementNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    ASSERT(m_next);
-    nodeStack.append(m_next.get());
-}
-
 RegisterID* ConstStatementNode::emitCode(CodeGenerator& generator, RegisterID*)
 {
     return generator.emitNode(m_next.get());
 }
 
-// ECMA 12.2
-JSValue* ConstStatementNode::execute(OldInterpreterExecState* exec)
-{
-    m_next->evaluate(exec);
-    KJS_CHECKEXCEPTION
-
-    return exec->setNormalCompletion();
-}
-
 // ------------------------------ Helper functions for handling Vectors of StatementNode -------------------------------
 
 static inline RegisterID* statementListEmitCode(StatementVector& statements, CodeGenerator& generator, RegisterID* dst = 0)
@@ -4793,20 +1258,6 @@ static inline Node* statementListInitializeVariableAccessStack(StatementVector&
     return (*begin).get();
 }
 
-static inline JSValue* statementListExecute(StatementVector& statements, OldInterpreterExecState* exec)
-{
-    JSValue* value = 0;
-    size_t size = statements.size();
-    for (size_t i = 0; i != size; ++i) {
-        JSValue* statementValue = statements[i]->execute(exec);
-        if (statementValue)
-            value = statementValue;
-        if (exec->completionType() != Normal)
-            return value;
-    }
-    return exec->setNormalCompletion(value);
-}
-
 // ------------------------------ BlockNode ------------------------------------
 
 BlockNode::BlockNode(SourceElements* children)
@@ -4820,17 +1271,6 @@ RegisterID* BlockNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return statementListEmitCode(m_children, generator, dst);
 }
 
-void BlockNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    statementListPushFIFO(m_children, nodeStack);
-}
-
-// ECMA 12.1
-JSValue* BlockNode::execute(OldInterpreterExecState* exec)
-{
-    return statementListExecute(m_children, exec);
-}
-
 // ------------------------------ EmptyStatementNode ---------------------------
 
 RegisterID* EmptyStatementNode::emitCode(CodeGenerator&, RegisterID* dst)
@@ -4838,12 +1278,6 @@ RegisterID* EmptyStatementNode::emitCode(CodeGenerator&, RegisterID* dst)
     return dst;
 }
 
-// ECMA 12.3
-JSValue* EmptyStatementNode::execute(OldInterpreterExecState* exec)
-{
-    return exec->setNormalCompletion();
-}
-
 // ------------------------------ DebuggerStatementNode ---------------------------
 
 RegisterID* DebuggerStatementNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -4865,21 +1299,6 @@ RegisterID* ExprStatementNode::emitCode(CodeGenerator& generator, RegisterID* ds
     return generator.emitNode(dst, m_expr.get());
 }
 
-void ExprStatementNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    ASSERT(m_expr);
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 12.4
-JSValue* ExprStatementNode::execute(OldInterpreterExecState* exec)
-{
-    JSValue* value = m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTION
-
-    return exec->setNormalCompletion(value);
-}
-
 // ------------------------------ VarStatementNode ----------------------------
 
 RegisterID* VarStatementNode::emitCode(CodeGenerator& generator, RegisterID*)
@@ -4888,20 +1307,6 @@ RegisterID* VarStatementNode::emitCode(CodeGenerator& generator, RegisterID*)
     return generator.emitNode(m_expr.get());
 }
 
-void VarStatementNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    ASSERT(m_expr);
-    nodeStack.append(m_expr.get());
-}
-
-JSValue* VarStatementNode::execute(OldInterpreterExecState* exec)
-{
-    m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTION
-
-    return exec->setNormalCompletion();
-}
-
 // ------------------------------ IfNode ---------------------------------------
 
 RegisterID* IfNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -4918,23 +1323,6 @@ RegisterID* IfNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return 0;
 }
 
-void IfNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_ifBlock.get());
-    nodeStack.append(m_condition.get());
-}
-
-// ECMA 12.5
-JSValue* IfNode::execute(OldInterpreterExecState* exec)
-{
-    bool b = m_condition->evaluateToBoolean(exec);
-    KJS_CHECKEXCEPTION
-
-    if (b)
-        return m_ifBlock->execute(exec);
-    return exec->setNormalCompletion();
-}
-
 RegisterID* IfElseNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
     RefPtr<LabelID> beforeElse = generator.newLabel();
@@ -4955,23 +1343,6 @@ RegisterID* IfElseNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return 0;
 }
 
-void IfElseNode::optimizeVariableAccess(OldInterpreterExecState* exec, const SymbolTable& symbolTable, const LocalStorage& localStorage, NodeStack& nodeStack)
-{
-    nodeStack.append(m_elseBlock.get());
-    IfNode::optimizeVariableAccess(exec, symbolTable, localStorage, nodeStack);
-}
-
-// ECMA 12.5
-JSValue* IfElseNode::execute(OldInterpreterExecState* exec)
-{
-    bool b = m_condition->evaluateToBoolean(exec);
-    KJS_CHECKEXCEPTION
-
-    if (b)
-        return m_ifBlock->execute(exec);
-    return m_elseBlock->execute(exec);
-}
-
 // ------------------------------ DoWhileNode ----------------------------------
 
 RegisterID* DoWhileNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -4993,46 +1364,6 @@ RegisterID* DoWhileNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return result.get();
 }
 
-void DoWhileNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_statement.get());
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 12.6.1
-JSValue* DoWhileNode::execute(OldInterpreterExecState* exec)
-{
-    JSValue* value = 0;
-
-    while (1) {
-        exec->pushIteration();
-        JSValue* statementValue = m_statement->execute(exec);
-        exec->popIteration();
-
-        if (exec->dynamicGlobalObject()->timedOut())
-            return exec->setInterruptedCompletion();
-
-        if (statementValue)
-            value = statementValue;
-
-        if (exec->completionType() != Normal) {
-            if (exec->completionType() == Continue && m_labelStack.contains(exec->breakOrContinueTarget()))
-                goto continueDoWhileLoop;
-            if (exec->completionType() == Break && m_labelStack.contains(exec->breakOrContinueTarget()))
-                break;
-            return statementValue;
-        }
-
-    continueDoWhileLoop:
-        bool b = m_expr->evaluateToBoolean(exec);
-        KJS_CHECKEXCEPTION
-        if (!b)
-            break;
-    }
-
-    return exec->setNormalCompletion(value);
-}
-
 // ------------------------------ WhileNode ------------------------------------
 
 RegisterID* WhileNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -5058,50 +1389,12 @@ RegisterID* WhileNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return 0;
 }
 
-void WhileNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_statement.get());
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 12.6.2
-JSValue* WhileNode::execute(OldInterpreterExecState* exec)
-{
-    JSValue* value = 0;
-
-    while (1) {
-        bool b = m_expr->evaluateToBoolean(exec);
-        KJS_CHECKEXCEPTION
-        if (!b)
-            break;
-
-        exec->pushIteration();
-        JSValue* statementValue = m_statement->execute(exec);
-        exec->popIteration();
-
-        if (exec->dynamicGlobalObject()->timedOut())
-            return exec->setInterruptedCompletion();
-
-        if (statementValue)
-            value = statementValue;
-
-        if (exec->completionType() != Normal) {
-            if (exec->completionType() == Continue && m_labelStack.contains(exec->breakOrContinueTarget()))
-                continue;
-            if (exec->completionType() == Break && m_labelStack.contains(exec->breakOrContinueTarget()))
-                break;
-            return statementValue;
-        }
-    }
-
-    return exec->setNormalCompletion(value);
-}
-
 // ------------------------------ ForNode --------------------------------------
 
 RegisterID* ForNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
-    generator.emitNode(m_expr1.get());
+    if (m_expr1)
+        generator.emitNode(m_expr1.get());
     
     RefPtr<LabelID> topOfLoop = generator.newLabel();
     RefPtr<LabelID> beforeCondition = generator.newLabel();
@@ -5113,63 +1406,21 @@ RegisterID* ForNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     generator.pushJumpContext(&m_labelStack, continueTarget.get(), breakTarget.get(), true);
     RefPtr<RegisterID> result = generator.emitNode(dst, m_statement.get());
     generator.popJumpContext();
-    generator.emitLabel(continueTarget.get());  
-    generator.emitNode(m_expr3.get());
+    generator.emitLabel(continueTarget.get());
+    if (m_expr3)
+        generator.emitNode(m_expr3.get());
 
     generator.emitLabel(beforeCondition.get());
-    RegisterID* cond = generator.emitNode(m_expr2.get());
-    generator.emitJumpIfTrue(cond, topOfLoop.get());
+    if (m_expr2) {
+        RegisterID* cond = generator.emitNode(m_expr2.get());
+        generator.emitJumpIfTrue(cond, topOfLoop.get());
+    } else {
+        generator.emitJump(topOfLoop.get());
+    }
     generator.emitLabel(breakTarget.get());
     return result.get();
 }
 
-void ForNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_statement.get());
-    nodeStack.append(m_expr3.get());
-    nodeStack.append(m_expr2.get());
-    nodeStack.append(m_expr1.get());
-}
-
-// ECMA 12.6.3
-JSValue* ForNode::execute(OldInterpreterExecState* exec)
-{
-    JSValue* value = 0;
-
-    m_expr1->evaluate(exec);
-    KJS_CHECKEXCEPTION
-
-    while (1) {
-        bool b = m_expr2->evaluateToBoolean(exec);
-        KJS_CHECKEXCEPTION
-        if (!b)
-            break;
-
-        exec->pushIteration();
-        JSValue* statementValue = m_statement->execute(exec);
-        exec->popIteration();
-        if (statementValue)
-            value = statementValue;
-
-        if (exec->dynamicGlobalObject()->timedOut())
-            return exec->setInterruptedCompletion();
-
-        if (exec->completionType() != Normal) {
-            if (exec->completionType() == Continue && m_labelStack.contains(exec->breakOrContinueTarget()))
-                goto continueForLoop;
-            if (exec->completionType() == Break && m_labelStack.contains(exec->breakOrContinueTarget()))
-                break;
-            return statementValue;
-        }
-
-    continueForLoop:
-        m_expr3->evaluate(exec);
-        KJS_CHECKEXCEPTION
-    }
-
-    return exec->setNormalCompletion(value);
-}
-
 // ------------------------------ ForInNode ------------------------------------
 
 ForInNode::ForInNode(ExpressionNode* l, ExpressionNode* expr, StatementNode* statement)
@@ -5193,15 +1444,6 @@ ForInNode::ForInNode(const Identifier& ident, ExpressionNode* in, ExpressionNode
     // for( var foo = bar in baz )
 }
 
-void ForInNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_statement.get());
-    nodeStack.append(m_expr.get());
-    nodeStack.append(m_lexpr.get());
-    if (m_init)
-        nodeStack.append(m_init.get());
-}
-
 RegisterID* ForInNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
     RefPtr<LabelID> loopStart = generator.newLabel();
@@ -5251,103 +1493,6 @@ RegisterID* ForInNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return dst;
 }
 
-// ECMA 12.6.4
-JSValue* ForInNode::execute(OldInterpreterExecState* exec)
-{
-    JSValue* value = 0;
-
-    if (m_init) {
-        m_init->evaluate(exec);
-        KJS_CHECKEXCEPTION
-    }
-
-    JSValue* e = m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTION
-
-    // For Null and Undefined, we want to make sure not to go through
-    // the loop at all, because toObject will throw an exception.
-    if (e->isUndefinedOrNull())
-        return exec->setNormalCompletion();
-
-    JSObject* v = e->toObject(exec);
-    PropertyNameArray propertyNames;
-    v->getPropertyNames(exec, propertyNames);
-
-    PropertyNameArray::const_iterator end = propertyNames.end();
-    for (PropertyNameArray::const_iterator it = propertyNames.begin(); it != end; ++it) {
-        const Identifier& name = *it;
-        if (!v->hasProperty(exec, name))
-            continue;
-
-        JSValue* str = jsOwnedString(name.ustring());
-
-        if (m_lexpr->isResolveNode()) {
-            const Identifier& ident = static_cast<ResolveNode*>(m_lexpr.get())->identifier();
-
-            const ScopeChain& chain = exec->scopeChain();
-            ScopeChainIterator iter = chain.begin();
-            ScopeChainIterator end = chain.end();
-
-            // we must always have something in the scope chain
-            ASSERT(iter != end);
-
-            PropertySlot slot;
-            JSObject* o;
-            do {
-                o = *iter;
-                if (o->getPropertySlot(exec, ident, slot)) {
-                    o->put(exec, ident, str);
-                    break;
-                }
-                ++iter;
-            } while (iter != end);
-
-            if (iter == end)
-                o->put(exec, ident, str);
-        } else if (m_lexpr->isDotAccessorNode()) {
-            const Identifier& ident = static_cast<DotAccessorNode*>(m_lexpr.get())->identifier();
-            JSValue* v = static_cast<DotAccessorNode*>(m_lexpr.get())->base()->evaluate(exec);
-            KJS_CHECKEXCEPTION
-            JSObject* o = v->toObject(exec);
-
-            o->put(exec, ident, str);
-        } else {
-            ASSERT(m_lexpr->isBracketAccessorNode());
-            JSValue* v = static_cast<BracketAccessorNode*>(m_lexpr.get())->base()->evaluate(exec);
-            KJS_CHECKEXCEPTION
-            JSValue* v2 = static_cast<BracketAccessorNode*>(m_lexpr.get())->subscript()->evaluate(exec);
-            KJS_CHECKEXCEPTION
-            JSObject* o = v->toObject(exec);
-
-            uint32_t i;
-            if (v2->getUInt32(i))
-                o->put(exec, i, str);
-            o->put(exec, Identifier(v2->toString(exec)), str);
-        }
-
-        KJS_CHECKEXCEPTION
-
-        exec->pushIteration();
-        JSValue* statementValue = m_statement->execute(exec);
-        exec->popIteration();
-        if (statementValue)
-            value = statementValue;
-        
-        if (exec->dynamicGlobalObject()->timedOut())
-            return exec->setInterruptedCompletion();
-
-        if (exec->completionType() != Normal) {
-            if (exec->completionType() == Continue && m_labelStack.contains(exec->breakOrContinueTarget()))
-                continue;
-            if (exec->completionType() == Break && m_labelStack.contains(exec->breakOrContinueTarget()))
-                break;
-            return statementValue;
-        }
-    }
-
-    return exec->setNormalCompletion(value);
-}
-
 // ------------------------------ ContinueNode ---------------------------------
 
 // ECMA 12.7
@@ -5373,15 +1518,6 @@ RegisterID* ContinueNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return dst;
 }
 
-JSValue* ContinueNode::execute(OldInterpreterExecState* exec)
-{
-    if (m_ident.isEmpty() && !exec->inIteration())
-        return setErrorCompletion(exec, SyntaxError, "Invalid continue statement.");
-    if (!m_ident.isEmpty() && !exec->seenLabels().contains(m_ident))
-        return setErrorCompletion(exec, SyntaxError, "Label %s not found.", m_ident);
-    return exec->setContinueCompletion(&m_ident);
-}
-
 // ------------------------------ BreakNode ------------------------------------
 
 // ECMA 12.8
@@ -5406,15 +1542,6 @@ RegisterID* BreakNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return dst;
 }
 
-JSValue* BreakNode::execute(OldInterpreterExecState* exec)
-{
-    if (m_ident.isEmpty() && !exec->inIteration() && !exec->inSwitch())
-        return setErrorCompletion(exec, SyntaxError, "Invalid break statement.");
-    if (!m_ident.isEmpty() && !exec->seenLabels().contains(m_ident))
-        return setErrorCompletion(exec, SyntaxError, "Label %s not found.");
-    return exec->setBreakCompletion(&m_ident);
-}
-
 // ------------------------------ ReturnNode -----------------------------------
 
 RegisterID* ReturnNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -5432,28 +1559,6 @@ RegisterID* ReturnNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return generator.emitReturn(r0);
 }
 
-void ReturnNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_value)
-        nodeStack.append(m_value.get());
-}
-
-// ECMA 12.9
-JSValue* ReturnNode::execute(OldInterpreterExecState* exec)
-{
-    CodeType codeType = exec->codeType();
-    if (codeType != FunctionCode)
-        return setErrorCompletion(exec, SyntaxError, "Invalid return statement.");
-
-    if (!m_value)
-        return exec->setReturnValueCompletion(jsUndefined());
-
-    JSValue* v = m_value->evaluate(exec);
-    KJS_CHECKEXCEPTION
-
-    return exec->setReturnValueCompletion(v);
-}
-
 // ------------------------------ WithNode -------------------------------------
 
 RegisterID* WithNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -5465,52 +1570,6 @@ RegisterID* WithNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return result;
 }
 
-void WithNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    // Can't optimize within statement because "with" introduces a dynamic scope.
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 12.10
-JSValue* WithNode::execute(OldInterpreterExecState*)
-{
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
-// ------------------------------ CaseClauseNode -------------------------------
-
-void CaseClauseNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_expr)
-        nodeStack.append(m_expr.get());
-    statementListPushFIFO(m_children, nodeStack);
-}
-
-// ECMA 12.11
-JSValue* CaseClauseNode::evaluate(OldInterpreterExecState* exec)
-{
-    JSValue* v = m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTIONVALUE
-
-    return v;
-}
-
-// ECMA 12.11
-JSValue* CaseClauseNode::executeStatements(OldInterpreterExecState* exec)
-{
-    return statementListExecute(m_children, exec);
-}
-
-// ------------------------------ ClauseListNode -------------------------------
-
-void ClauseListNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_next)
-        nodeStack.append(m_next.get());
-    nodeStack.append(m_clause.get());
-}
-
 // ------------------------------ CaseBlockNode --------------------------------
 
 RegisterID* CaseBlockNode::emitCodeForBlock(CodeGenerator& generator, RegisterID* switchExpression, RegisterID* dst)
@@ -5561,74 +1620,6 @@ RegisterID* CaseBlockNode::emitCodeForBlock(CodeGenerator& generator, RegisterID
     return result;
 }
 
-void CaseBlockNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    if (m_list2)
-        nodeStack.append(m_list2.get());
-    if (m_defaultClause)
-        nodeStack.append(m_defaultClause.get());
-    if (m_list1)
-        nodeStack.append(m_list1.get());
-}
-
-// ECMA 12.11
-JSValue* CaseBlockNode::executeBlock(OldInterpreterExecState* exec, JSValue* input)
-{
-    ClauseListNode* a = m_list1.get();
-    while (a) {
-        CaseClauseNode* clause = a->getClause();
-        a = a->getNext();
-        JSValue* v = clause->evaluate(exec);
-        KJS_CHECKEXCEPTION
-        if (strictEqual(input, v)) {
-            JSValue* res = clause->executeStatements(exec);
-            if (exec->completionType() != Normal)
-                return res;
-            for (; a; a = a->getNext()) {
-                JSValue* res = a->getClause()->executeStatements(exec);
-                if (exec->completionType() != Normal)
-                    return res;
-            }
-            break;
-        }
-    }
-
-    ClauseListNode* b = m_list2.get();
-    while (b) {
-        CaseClauseNode* clause = b->getClause();
-        b = b->getNext();
-        JSValue* v = clause->evaluate(exec);
-        KJS_CHECKEXCEPTION
-        if (strictEqual(input, v)) {
-            JSValue* res = clause->executeStatements(exec);
-            if (exec->completionType() != Normal)
-                return res;
-            goto step18;
-        }
-    }
-
-    // default clause
-    if (m_defaultClause) {
-        JSValue* res = m_defaultClause->executeStatements(exec);
-        if (exec->completionType() != Normal)
-            return res;
-    }
-    b = m_list2.get();
-step18:
-    while (b) {
-        CaseClauseNode* clause = b->getClause();
-        JSValue* res = clause->executeStatements(exec);
-        if (exec->completionType() != Normal)
-            return res;
-        b = b->getNext();
-    }
-
-    // bail out on error
-    KJS_CHECKEXCEPTION
-
-    return exec->setNormalCompletion();
-}
-
 // ------------------------------ SwitchNode -----------------------------------
 
 RegisterID* SwitchNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -5645,28 +1636,8 @@ RegisterID* SwitchNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return r1;
 }
 
-void SwitchNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_block.get());
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 12.11
-JSValue* SwitchNode::execute(OldInterpreterExecState* exec)
-{
-    JSValue* v = m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTION
-
-    exec->pushSwitch();
-    JSValue* result = m_block->executeBlock(exec, v);
-    exec->popSwitch();
-
-    if (exec->completionType() == Break && m_labelStack.contains(exec->breakOrContinueTarget()))
-        exec->setCompletionType(Normal);
-    return result;
-}
-
 // ------------------------------ LabelNode ------------------------------------
+
 RegisterID* LabelNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 {
     if (generator.jumpContextForBreak(m_label))
@@ -5685,24 +1656,6 @@ RegisterID* LabelNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return r0;
 }
 
-void LabelNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_statement.get());
-}
-
-// ECMA 12.12
-JSValue* LabelNode::execute(OldInterpreterExecState* exec)
-{
-    if (!exec->seenLabels().push(m_label))
-        return setErrorCompletion(exec, SyntaxError, "Duplicated label %s found.", m_label);
-    JSValue* result = m_statement->execute(exec);
-    exec->seenLabels().pop();
-
-    if (exec->completionType() == Break && exec->breakOrContinueTarget() == m_label)
-        exec->setCompletionType(Normal);
-    return result;
-}
-
 // ------------------------------ ThrowNode ------------------------------------
 
 RegisterID* ThrowNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -5711,21 +1664,6 @@ RegisterID* ThrowNode::emitCode(CodeGenerator& generator, RegisterID* dst)
     return dst;
 }
 
-void ThrowNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    nodeStack.append(m_expr.get());
-}
-
-// ECMA 12.13
-JSValue* ThrowNode::execute(OldInterpreterExecState* exec)
-{
-    JSValue* v = m_expr->evaluate(exec);
-    KJS_CHECKEXCEPTION
-
-    handleException(exec, v);
-    return exec->setThrowCompletion(v);
-}
-
 // ------------------------------ TryNode --------------------------------------
 
 RegisterID* TryNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -5784,21 +1722,6 @@ RegisterID* TryNode::emitCode(CodeGenerator& generator, RegisterID* dst)
 }
 
 
-void TryNode::optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack& nodeStack)
-{
-    // Can't optimize within catchBlock because "catch" introduces a dynamic scope.
-    if (m_finallyBlock)
-        nodeStack.append(m_finallyBlock.get());
-    nodeStack.append(m_tryBlock.get());
-}
-
-// ECMA 12.14
-JSValue* TryNode::execute(OldInterpreterExecState*)
-{
-    ASSERT_NOT_REACHED();
-    return 0;
-}
-
 // ------------------------------ FunctionBodyNode -----------------------------
 
 ScopeNode::ScopeNode(SourceElements* children, VarStack* varStack, FunctionStack* funcStack, bool usesEval, bool needsClosure)
@@ -5941,157 +1864,6 @@ void ProgramNode::generateCode(ScopeChainNode* sc, bool canCreateGlobals)
     generator.generate();
 }
 
-void ProgramNode::initializeSymbolTable(OldInterpreterExecState* exec)
-{
-    // If a previous script defined a symbol with the same name as one of our
-    // symbols, to avoid breaking previously optimized nodes, we need to reuse
-    // the symbol's existing storage index. So, we can't be as efficient as
-    // FunctionBodyNode::initializeSymbolTable, which knows that no bindings
-    // have yet been made.
-
-    JSVariableObject* variableObject = exec->variableObject();
-    SymbolTable& symbolTable = variableObject->symbolTable();
-
-    size_t localStorageIndex = symbolTable.size();
-    size_t size;
-
-    // Order must match the order in processDeclarations.
-
-    size = m_functionStack.size();
-    m_functionIndexes.resize(size);
-    for (size_t i = 0; i < size; ++i) {
-        UString::Rep* rep = m_functionStack[i]->m_ident.ustring().rep();
-        pair<SymbolTable::iterator, bool> result = symbolTable.add(rep, localStorageIndex);
-        m_functionIndexes[i] = result.first->second.getIndex();
-        if (result.second)
-            ++localStorageIndex;
-    }
-
-    size = m_varStack.size();
-    m_varIndexes.resize(size);
-    for (size_t i = 0; i < size; ++i) {
-        const Identifier& ident = m_varStack[i].first;
-        if (variableObject->hasProperty(exec, ident)) {
-            m_varIndexes[i] = missingSymbolMarker(); // Signal not to initialize this declaration.
-            continue;
-        }
-
-        UString::Rep* rep = ident.ustring().rep();
-        pair<SymbolTable::iterator, bool> result = symbolTable.add(rep, localStorageIndex);
-        if (!result.second) {
-            m_varIndexes[i] = missingSymbolMarker(); // Signal not to initialize this declaration.
-            continue;
-        }
-
-        m_varIndexes[i] = result.first->second.getIndex();
-        ++localStorageIndex;
-    }
-}
-
-void ScopeNode::optimizeVariableAccess(OldInterpreterExecState* exec)
-{
-    NodeStack nodeStack;
-    Node* node = statementListInitializeVariableAccessStack(m_children, nodeStack);
-    if (!node)
-        return;
-
-    const SymbolTable& symbolTable = exec->variableObject()->symbolTable();
-    ASSERT_NOT_REACHED();
-    const LocalStorage localStorage;
-    while (true) {
-        node->optimizeVariableAccess(exec, symbolTable, localStorage, nodeStack);
-
-        size_t size = nodeStack.size();
-        if (!size)
-            break;
-        --size;
-        node = nodeStack[size];
-        nodeStack.shrink(size);
-    }
-}
-
-static void gccIsCrazy() KJS_FAST_CALL;
-static void gccIsCrazy()
-{
-}
-
-void ProgramNode::processDeclarations(OldInterpreterExecState* exec)
-{
-    // If you remove this call, some SunSpider tests, including
-    // bitops-nsieve-bits.js, will regress substantially on Mac, due to a ~40%
-    // increase in L2 cache misses. FIXME: <rdar://problem/5657439> WTF?
-    gccIsCrazy();
-
-    initializeSymbolTable(exec);
-
-    ASSERT_NOT_REACHED();
-    LocalStorage localStorage;
-
-    // We can't just resize localStorage here because that would temporarily
-    // leave uninitialized entries, which would crash GC during the mark phase.
-    localStorage.reserveCapacity(localStorage.size() + m_varStack.size() + m_functionStack.size());
-
-    int minAttributes = DontDelete;
-
-    // In order for our localStorage indexes to be correct, we must match the
-    // order of addition in initializeSymbolTable().
-
-    for (size_t i = 0, size = m_functionStack.size(); i < size; ++i) {
-        FuncDeclNode* node = m_functionStack[i].get();
-        LocalStorageEntry entry = LocalStorageEntry(node->makeFunction(exec, exec->scopeChain().node()), minAttributes);
-        size_t index = m_functionIndexes[i];
-
-        if (index == localStorage.size())
-            localStorage.uncheckedAppend(entry);
-        else {
-            ASSERT(index < localStorage.size());
-            localStorage[index] = entry;
-        }
-    }
-
-    for (size_t i = 0, size = m_varStack.size(); i < size; ++i) {
-        int index = m_varIndexes[i];
-        if (index == missingSymbolMarker())
-            continue;
-
-        int attributes = minAttributes;
-        if (m_varStack[i].second & DeclarationStacks::IsConstant)
-            attributes |= ReadOnly;
-        LocalStorageEntry entry = LocalStorageEntry(jsUndefined(), attributes);
-
-        ASSERT(static_cast<unsigned>(index) == localStorage.size());
-        localStorage.uncheckedAppend(entry);
-    }
-
-    optimizeVariableAccess(exec);
-}
-
-void EvalNode::processDeclarations(OldInterpreterExecState* exec)
-{
-    // We could optimize access to pre-existing symbols here, but SunSpider
-    // reports that to be a net loss.
-
-    size_t i;
-    size_t size;
-
-    JSVariableObject* variableObject = exec->variableObject();
-
-    for (i = 0, size = m_varStack.size(); i < size; ++i) {
-        Identifier& ident = m_varStack[i].first;
-        if (variableObject->hasProperty(exec, ident))
-            continue;
-        int attributes = 0;
-        if (m_varStack[i].second & DeclarationStacks::IsConstant)
-            attributes = ReadOnly;
-        variableObject->putWithAttributes(exec, ident, jsUndefined(), attributes);
-    }
-
-    for (i = 0, size = m_functionStack.size(); i < size; ++i) {
-        FuncDeclNode* funcDecl = m_functionStack[i].get();
-        variableObject->putWithAttributes(exec, funcDecl->m_ident, funcDecl->makeFunction(exec, exec->scopeChain().node()), 0);
-    }
-}
-
 UString FunctionBodyNode::paramString() const
 {
     UString s("");
@@ -6105,32 +1877,6 @@ UString FunctionBodyNode::paramString() const
     return s;
 }
 
-JSValue* ProgramNode::execute(OldInterpreterExecState* exec)
-{
-    processDeclarations(exec);
-    return ScopeNode::execute(exec);
-}
-
-JSValue* EvalNode::execute(OldInterpreterExecState* exec)
-{
-    processDeclarations(exec);
-    return ScopeNode::execute(exec);
-}
-
-// ------------------------------ FunctionBodyNodeWithDebuggerHooks ---------------------------------
-
-FunctionBodyNodeWithDebuggerHooks::FunctionBodyNodeWithDebuggerHooks(SourceElements* children, DeclarationStacks::VarStack* varStack, DeclarationStacks::FunctionStack* funcStack, bool usesEval, bool needsClosure)
-    : FunctionBodyNode(children, varStack, funcStack, usesEval, needsClosure)
-{
-}
-
-JSValue* FunctionBodyNodeWithDebuggerHooks::execute(OldInterpreterExecState* exec)
-{
-    JSValue* result = FunctionBodyNode::execute(exec);
-
-    return result;
-}
-
 // ------------------------------ FuncDeclNode ---------------------------------
 
 void FuncDeclNode::addParams()
@@ -6155,11 +1901,6 @@ RegisterID* FuncDeclNode::emitCode(CodeGenerator&, RegisterID* dst)
     return dst;
 }
 
-JSValue* FuncDeclNode::execute(OldInterpreterExecState* exec)
-{
-    return exec->setNormalCompletion();
-}
-
 // ------------------------------ FuncExprNode ---------------------------------
 
 RegisterID* FuncExprNode::emitCode(CodeGenerator& generator, RegisterID* dst)
@@ -6198,32 +1939,4 @@ void FuncExprNode::addParams()
         m_body->parameters().append(p->ident());
 }
 
-JSValue* FuncExprNode::evaluate(OldInterpreterExecState* exec)
-{
-    ASSERT_NOT_REACHED();
-
-    bool named = !m_ident.isNull();
-    JSObject* functionScopeObject = 0;
-
-    if (named) {
-        // named FunctionExpressions can recursively call themselves,
-        // but they won't register with the current scope chain and should
-        // be contained as single property in an anonymous object.
-        functionScopeObject = new JSObject;
-        exec->pushScope(functionScopeObject);
-    }
-
-    FunctionImp* func = new FunctionImp(exec, m_ident, m_body.get(), exec->scopeChain().node());
-    JSObject* proto = exec->lexicalGlobalObject()->objectConstructor()->construct(exec, exec->emptyList());
-    proto->putDirect(exec->propertyNames().constructor, func, DontEnum);
-    func->putDirect(exec->propertyNames().prototype, proto, DontDelete);
-
-    if (named) {
-        functionScopeObject->putDirect(m_ident, func, ReadOnly | (exec->codeType() == EvalCode ? 0 : DontDelete));
-        exec->popScope();
-    }
-
-    return func;
-}
-
 } // namespace KJS
index 3fa4e8f9973022a28ed37b6d01dc945d0b8b24b6..c9b84a648fa5c1ae3ed1ea5a011cbaf34a5e23c9 100644 (file)
@@ -183,36 +183,12 @@ namespace KJS {
         virtual Precedence precedence() const = 0;
         virtual bool needsParensIfLeftmost() const { return false; }
         
-        // Used for iterative, depth-first traversal of the node tree. Does not cross function call boundaries.
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL { }
-
     protected:
         Node(JSType) KJS_FAST_CALL; // used by ExpressionNode
 
-        // for use in execute()
-        JSValue* setErrorCompletion(OldInterpreterExecState*, ErrorType, const char* msg) KJS_FAST_CALL;
-        JSValue* setErrorCompletion(OldInterpreterExecState*, ErrorType, const char* msg, const Identifier&) KJS_FAST_CALL;
-
-        // for use in evaluate()
-        JSValue* throwError(OldInterpreterExecState*, ErrorType, const char* msg) KJS_FAST_CALL;
-        JSValue* throwError(OldInterpreterExecState*, ErrorType, const char* msg, const char*) KJS_FAST_CALL;
-        JSValue* throwError(OldInterpreterExecState*, ErrorType, const char* msg, JSValue*, Node*) KJS_FAST_CALL;
-        JSValue* throwError(OldInterpreterExecState*, ErrorType, const char* msg, const Identifier&) KJS_FAST_CALL;
-        JSValue* throwError(OldInterpreterExecState*, ErrorType, const char* msg, JSValue*, const Identifier&) KJS_FAST_CALL;
-        JSValue* throwError(OldInterpreterExecState*, ErrorType, const char* msg, JSValue*, Node*, Node*) KJS_FAST_CALL;
-        JSValue* throwError(OldInterpreterExecState*, ErrorType, const char* msg, JSValue*, Node*, const Identifier&) KJS_FAST_CALL;
-        
         RegisterID* emitThrowError(CodeGenerator&, ErrorType, const char* msg);
         RegisterID* emitThrowError(CodeGenerator&, ErrorType, const char* msg, const Identifier&);
 
-        JSValue* throwUndefinedVariableError(OldInterpreterExecState*, const Identifier&) KJS_FAST_CALL;
-
-        void handleException(OldInterpreterExecState*) KJS_FAST_CALL;
-        void handleException(OldInterpreterExecState*, JSValue*) KJS_FAST_CALL;
-
-        // for use in execute()
-        JSValue* rethrowException(OldInterpreterExecState*) KJS_FAST_CALL;
-
         int m_line : 28;
         unsigned m_expectedReturnType : 3; // JSType
     };
@@ -239,19 +215,8 @@ namespace KJS {
 
         JSType expectedReturnType() const KJS_FAST_CALL { return static_cast<JSType>(m_expectedReturnType); }
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL = 0;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-
-        // Used to optimize those nodes that do extra work when returning a result, even if the result has no semantic relevance
-        virtual void optimizeForUnnecessaryResult() { }
-
         // This needs to be in public in order to compile using GCC 3.x 
         typedef enum { EvalOperator, FunctionCall } CallerType;
-    protected:
-        template <CallerType, bool> inline JSValue* resolveAndCall(OldInterpreterExecState*, const Identifier&, ArgumentsNode*, size_t = 0);
     };
 
     class StatementNode : public Node {
@@ -261,8 +226,6 @@ namespace KJS {
         int firstLine() const KJS_FAST_CALL { return lineNo(); }
         int lastLine() const KJS_FAST_CALL { return m_lastLine; }
 
-        virtual JSValue* execute(OldInterpreterExecState *exec) KJS_FAST_CALL = 0;
-
         virtual void pushLabel(const Identifier& ident) KJS_FAST_CALL { m_labelStack.push(ident); }
         virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
         virtual bool isEmptyStatement() const KJS_FAST_CALL { return false; }
@@ -283,7 +246,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPrimary; }
     };
@@ -297,8 +259,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL { return false; }
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPrimary; }
     };
@@ -312,8 +272,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL { return true; }
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPrimary; }
     };
@@ -339,11 +297,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return signbit(m_double) ? PrecUnary : PrecPrimary; }
 
@@ -364,10 +317,6 @@ namespace KJS {
             ASSERT(v == JSImmediate::from(d));
         }
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-
         virtual void setValue(double d) KJS_FAST_CALL { m_double = d; m_value = JSImmediate::from(d); ASSERT(m_value); }
 
     private:
@@ -384,9 +333,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPrimary; }
 
@@ -403,7 +349,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPrimary; }
 
@@ -419,7 +364,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPrimary; }
     };
@@ -439,13 +383,7 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPrimary; }
 
@@ -454,73 +392,11 @@ namespace KJS {
         const Identifier& identifier() const KJS_FAST_CALL { return m_ident; }
 
     protected:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
         Identifier m_ident;
         int m_index; // Used by LocalVarAccessNode and ScopedVarAccessNode.
         size_t m_scopeDepth; // Used by ScopedVarAccessNode
     };
 
-    class LocalVarAccessNode : public ResolveNode {
-    public:
-        // Overwrites a ResolveNode in place.
-        LocalVarAccessNode(int i) KJS_FAST_CALL
-            : ResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-
-    private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-    };
-    
-    class ScopedVarAccessNode : public ResolveNode {
-    public:
-        // Overwrites a ResolveNode in place.
-        ScopedVarAccessNode(int i, size_t scopeDepth) KJS_FAST_CALL
-        : ResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-            m_scopeDepth = scopeDepth;
-        }
-        
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        
-    private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-    };
-    
-    class NonLocalVarAccessNode : public ResolveNode {
-    public:
-        // Overwrites a ResolveNode in place.
-        NonLocalVarAccessNode(size_t scopeDepth) KJS_FAST_CALL
-        : ResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(scopeDepth != 0);
-            m_scopeDepth = scopeDepth;
-        }
-        
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        
-    private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-    };
-
     class ElementNode : public Node {
     public:
         ElementNode(int elision, ExpressionNode* node) KJS_FAST_CALL
@@ -538,12 +414,9 @@ namespace KJS {
 
         virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
 
         PassRefPtr<ElementNode> releaseNext() KJS_FAST_CALL { return m_next.release(); }
 
-        JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-
     private:
         friend class ArrayNode;
         ListRefPtr<ElementNode> m_next;
@@ -575,8 +448,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPrimary; }
 
@@ -597,11 +468,9 @@ namespace KJS {
         {
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
 
-        JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         const Identifier& name() const { return m_name; }
 
     private:
@@ -625,11 +494,9 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
 
-        JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         PassRefPtr<PropertyListNode> releaseNext() KJS_FAST_CALL { return m_next.release(); }
 
     private:
@@ -650,8 +517,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPrimary; }
         virtual bool needsParensIfLeftmost() const { return true; }
@@ -670,12 +535,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecMember; }
 
@@ -685,8 +544,6 @@ namespace KJS {
         ExpressionNode* subscript() KJS_FAST_CALL { return m_subscript.get(); }
 
     private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_base;
         RefPtr<ExpressionNode> m_subscript;
     };
@@ -700,12 +557,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecMember; }
 
@@ -715,8 +566,6 @@ namespace KJS {
         const Identifier& identifier() const KJS_FAST_CALL { return m_ident; }
 
     private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_base;
         Identifier m_ident;
     };
@@ -735,11 +584,9 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
 
-        void evaluateList(OldInterpreterExecState*, List&) KJS_FAST_CALL;
         PassRefPtr<ArgumentListNode> releaseNext() KJS_FAST_CALL { return m_next.release(); }
 
         ListRefPtr<ArgumentListNode> m_next;
@@ -757,12 +604,9 @@ namespace KJS {
         {
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
 
-        void evaluateList(OldInterpreterExecState* exec, List& list) KJS_FAST_CALL { if (m_listNode) m_listNode->evaluateList(exec, list); }
-
         RefPtr<ArgumentListNode> m_listNode;
     };
 
@@ -781,18 +625,10 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecLeftHandSide; }
 
     private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr;
         RefPtr<ArgumentsNode> m_args;
     };
@@ -805,8 +641,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecCall; }
 
@@ -823,8 +657,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecCall; }
 
@@ -850,81 +682,16 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecCall; }
 
     protected:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-
         Identifier m_ident;
         RefPtr<ArgumentsNode> m_args;
         size_t m_index; // Used by LocalVarFunctionCallNode.
         size_t m_scopeDepth; // Used by ScopedVarFunctionCallNode and NonLocalVarFunctionCallNode
     };
     
-    class LocalVarFunctionCallNode : public FunctionCallResolveNode {
-    public:
-        LocalVarFunctionCallNode(int i) KJS_FAST_CALL
-            : FunctionCallResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-        
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        
-    private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-    };
-    
-    class ScopedVarFunctionCallNode : public FunctionCallResolveNode {
-    public:
-        ScopedVarFunctionCallNode(int i, size_t depth) KJS_FAST_CALL
-            : FunctionCallResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-            m_scopeDepth = depth;
-        }
-        
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        
-    private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-    };
-    
-    class NonLocalVarFunctionCallNode : public FunctionCallResolveNode {
-    public:
-        NonLocalVarFunctionCallNode(size_t depth) KJS_FAST_CALL
-            : FunctionCallResolveNode(PlacementNewAdopt)
-        {
-            m_scopeDepth = depth;
-        }
-        
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        
-    private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-    };
-
     class FunctionCallBracketNode : public ExpressionNode {
     public:
         FunctionCallBracketNode(ExpressionNode* base, ExpressionNode* subscript, ArgumentsNode* args) KJS_FAST_CALL
@@ -935,8 +702,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecCall; }
 
@@ -956,18 +721,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecCall; }
 
     private:
-        ALWAYS_INLINE JSValue* inlineEvaluate(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_base;
         Identifier m_ident;
         RefPtr<ArgumentsNode> m_args;
@@ -1005,36 +762,8 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPostfix; }
-        virtual void optimizeForUnnecessaryResult();
-    };
-
-    class PostIncLocalVarNode : public PostIncResolveNode {
-    public:
-        PostIncLocalVarNode(int i) KJS_FAST_CALL
-            : PostIncResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual void optimizeForUnnecessaryResult();
-    };
-
-    class PostIncConstNode : public PostIncResolveNode {
-    public:
-        PostIncConstNode(int i) KJS_FAST_CALL
-            : PostIncResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
     };
 
     class PostDecResolveNode : public PrePostResolveNode {
@@ -1051,43 +780,8 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPostfix; }
-        virtual void optimizeForUnnecessaryResult();
-    };
-
-    class PostDecLocalVarNode : public PostDecResolveNode {
-    public:
-        PostDecLocalVarNode(int i) KJS_FAST_CALL
-            : PostDecResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual void optimizeForUnnecessaryResult();
-
-    private:
-        ALWAYS_INLINE double inlineEvaluateToNumber(OldInterpreterExecState*);
-    };
-
-    class PostDecConstNode : public PostDecResolveNode {
-    public:
-        PostDecConstNode(int i) KJS_FAST_CALL
-            : PostDecResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
     };
 
     class PostfixBracketNode : public ExpressionNode {
@@ -1098,7 +792,6 @@ namespace KJS {
         {
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPostfix; }
 
     protected:
@@ -1115,7 +808,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
     };
 
@@ -1128,7 +820,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
     };
 
@@ -1140,7 +831,6 @@ namespace KJS {
         {
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPostfix; }
 
     protected:
@@ -1157,7 +847,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
     };
 
@@ -1170,7 +859,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
     };
 
@@ -1183,7 +871,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPostfix; }
 
@@ -1207,8 +894,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1216,16 +901,6 @@ namespace KJS {
         Identifier m_ident;
     };
 
-    class LocalVarDeleteNode : public DeleteResolveNode {
-    public:
-        LocalVarDeleteNode() KJS_FAST_CALL
-            : DeleteResolveNode(PlacementNewAdopt)
-        {
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
     class DeleteBracketNode : public ExpressionNode {
     public:
         DeleteBracketNode(ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL
@@ -1236,8 +911,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1256,8 +929,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1275,8 +946,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1293,8 +962,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1319,8 +986,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1331,19 +996,6 @@ namespace KJS {
         size_t m_index; // Used by LocalTypeOfNode.
     };
 
-    class LocalVarTypeOfNode : public TypeOfResolveNode {
-    public:
-        LocalVarTypeOfNode(int i) KJS_FAST_CALL
-            : TypeOfResolveNode(PlacementNewAdopt)
-        {
-            m_expectedReturnType = StringType;
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
     class TypeOfValueNode : public ExpressionNode {
     public:
         TypeOfValueNode(ExpressionNode* expr) KJS_FAST_CALL
@@ -1354,8 +1006,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1377,36 +1027,10 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
     };
 
-    class PreIncLocalVarNode : public PreIncResolveNode {
-    public:
-        PreIncLocalVarNode(int i) KJS_FAST_CALL
-            : PreIncResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
-    class PreIncConstNode : public PreIncResolveNode {
-    public:
-        PreIncConstNode(int i) KJS_FAST_CALL
-            : PreIncResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
     class PreDecResolveNode : public PrePostResolveNode {
     public:
         PreDecResolveNode(const Identifier& ident) KJS_FAST_CALL
@@ -1421,36 +1045,10 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
     };
 
-    class PreDecLocalVarNode : public PreDecResolveNode {
-    public:
-        PreDecLocalVarNode(int i) KJS_FAST_CALL
-            : PreDecResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
-    class PreDecConstNode : public PreDecResolveNode {
-    public:
-        PreDecConstNode(int i) KJS_FAST_CALL
-            : PreDecResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
     class PrefixBracketNode : public ExpressionNode {
     public:
         PrefixBracketNode(ExpressionNode* base, ExpressionNode* subscript) KJS_FAST_CALL
@@ -1459,7 +1057,6 @@ namespace KJS {
         {
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
     protected:
@@ -1476,7 +1073,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
     };
 
@@ -1489,7 +1085,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
     };
 
@@ -1501,7 +1096,6 @@ namespace KJS {
         {
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecPostfix; }
 
     protected:
@@ -1518,7 +1112,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
     };
 
@@ -1531,7 +1124,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
     };
 
@@ -1544,7 +1136,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1562,12 +1153,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1584,9 +1169,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1603,18 +1185,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
     private:
-        ALWAYS_INLINE int32_t inlineEvaluateToInt32(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr;
     };
 
@@ -1627,9 +1201,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecUnary; }
 
@@ -1647,18 +1218,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecMultiplicitave; }
 
     private:
-        ALWAYS_INLINE double inlineEvaluateToNumber(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_term1;
         RefPtr<ExpressionNode> m_term2;
     };
@@ -1673,17 +1236,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecMultiplicitave; }
 
     private:
-        ALWAYS_INLINE double inlineEvaluateToNumber(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_term1;
         RefPtr<ExpressionNode> m_term2;
     };
@@ -1698,18 +1254,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecMultiplicitave; }
 
     private:
-        ALWAYS_INLINE double inlineEvaluateToNumber(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_term1;
         RefPtr<ExpressionNode> m_term2;
     };
@@ -1723,11 +1271,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecAdditive; }
 
@@ -1741,55 +1284,6 @@ namespace KJS {
 
         RefPtr<ExpressionNode> m_term1;
         RefPtr<ExpressionNode> m_term2;
-
-    private:
-        ALWAYS_INLINE double inlineEvaluateToNumber(OldInterpreterExecState*);
-    };
-
-    class AddNumbersNode : public AddNode {
-    public:
-        AddNumbersNode(ExpressionNode* term1, ExpressionNode* term2) KJS_FAST_CALL
-            : AddNode(term1, term2, NumberType)
-        {
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-
-    private:
-        ALWAYS_INLINE double inlineEvaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
-    class AddStringLeftNode : public AddNode {
-    public:
-        AddStringLeftNode(ExpressionNode* term1, ExpressionNode* term2) KJS_FAST_CALL
-            : AddNode(term1, term2, StringType)
-        {
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
-    class AddStringRightNode : public AddNode {
-    public:
-        AddStringRightNode(ExpressionNode* term1, ExpressionNode* term2) KJS_FAST_CALL
-            : AddNode(term1, term2, StringType)
-        {
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
-    class AddStringsNode : public AddNode {
-    public:
-        AddStringsNode(ExpressionNode* term1, ExpressionNode* term2) KJS_FAST_CALL
-            : AddNode(term1, term2, StringType)
-        {
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
     };
 
     class SubNode : public ExpressionNode {
@@ -1802,17 +1296,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecAdditive; }
 
     private:
-        ALWAYS_INLINE double inlineEvaluateToNumber(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_term1;
         RefPtr<ExpressionNode> m_term2;
     };
@@ -1827,17 +1314,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecShift; }
 
     private:
-        ALWAYS_INLINE int32_t inlineEvaluateToInt32(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_term1;
         RefPtr<ExpressionNode> m_term2;
     };
@@ -1852,17 +1332,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecShift; }
 
     private:
-        ALWAYS_INLINE int32_t inlineEvaluateToInt32(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_term1;
         RefPtr<ExpressionNode> m_term2;
     };
@@ -1877,16 +1350,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecShift; }
-    private:
-        ALWAYS_INLINE uint32_t inlineEvaluateToUInt32(OldInterpreterExecState*);
 
+    private:
         RefPtr<ExpressionNode> m_term1;
         RefPtr<ExpressionNode> m_term2;
     };
@@ -1901,48 +1368,14 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecRelational; }
 
-    private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
     protected:
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
 
-    class LessNumbersNode : public LessNode {
-    public:
-        LessNumbersNode(ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL
-            : LessNode(expr1, expr2)
-        {
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-
-    private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-    };
-
-    class LessStringsNode : public LessNode {
-    public:
-        LessStringsNode(ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL
-            : LessNode(expr1, expr2)
-        {
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-
-    private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-    };
-
     class GreaterNode : public ExpressionNode {
     public:
         GreaterNode(ExpressionNode* expr1, ExpressionNode* expr2) KJS_FAST_CALL
@@ -1952,15 +1385,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecRelational; }
 
     private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -1974,15 +1402,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecRelational; }
 
     private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -1996,15 +1419,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecRelational; }
 
     private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2019,9 +1437,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecRelational; }
 
@@ -2040,9 +1455,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecRelational; }
 
@@ -2061,15 +1473,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecEquality; }
 
     private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2084,15 +1491,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecEquality; }
 
     private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2107,15 +1509,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecEquality; }
 
     private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2130,15 +1527,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecEquality; }
 
     private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2153,18 +1545,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecBitwiseAnd; }
 
     private:
-        ALWAYS_INLINE int32_t inlineEvaluateToInt32(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2179,18 +1563,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecBitwiseOr; }
 
     private:
-        ALWAYS_INLINE int32_t inlineEvaluateToInt32(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2205,18 +1581,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecBitwiseXor; }
 
     private:
-        ALWAYS_INLINE int32_t inlineEvaluateToInt32(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2234,15 +1602,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecLogicalAnd; }
 
     private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2257,15 +1620,10 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecLogicalOr; }
 
     private:
-        ALWAYS_INLINE bool inlineEvaluateToBoolean(OldInterpreterExecState*);
-
         RefPtr<ExpressionNode> m_expr1;
         RefPtr<ExpressionNode> m_expr2;
     };
@@ -2283,12 +1641,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual bool evaluateToBoolean(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual double evaluateToNumber(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual int32_t evaluateToInt32(OldInterpreterExecState*) KJS_FAST_CALL;
-        virtual uint32_t evaluateToUInt32(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecConditional; }
 
@@ -2318,8 +1670,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecAssignment; }
 
@@ -2331,30 +1681,6 @@ namespace KJS {
         bool m_rightHasAssignments : 1;
     };
 
-    class ReadModifyLocalVarNode : public ReadModifyResolveNode {
-    public:
-        ReadModifyLocalVarNode(int i) KJS_FAST_CALL
-            : ReadModifyResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
-    class ReadModifyConstNode : public ReadModifyResolveNode {
-    public:
-        ReadModifyConstNode(int i) KJS_FAST_CALL
-            : ReadModifyResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
     class AssignResolveNode : public ExpressionNode {
     public:
         AssignResolveNode(const Identifier& ident, ExpressionNode* right, bool rightHasAssignments) KJS_FAST_CALL
@@ -2373,8 +1699,6 @@ namespace KJS {
         
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecAssignment; }
 
@@ -2385,28 +1709,6 @@ namespace KJS {
         bool m_rightHasAssignments;
     };
 
-    class AssignLocalVarNode : public AssignResolveNode {
-    public:
-        AssignLocalVarNode(int i) KJS_FAST_CALL
-            : AssignResolveNode(PlacementNewAdopt)
-        {
-            ASSERT(i != missingSymbolMarker());
-            m_index = i;
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
-    class AssignConstNode : public AssignResolveNode {
-    public:
-        AssignConstNode() KJS_FAST_CALL
-            : AssignResolveNode(PlacementNewAdopt)
-        {
-        }
-
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-    };
-
     class ReadModifyBracketNode : public ExpressionNode {
     public:
         ReadModifyBracketNode(ExpressionNode* base, ExpressionNode* subscript, Operator oper, ExpressionNode* right, bool subscriptHasAssignments, bool rightHasAssignments) KJS_FAST_CALL
@@ -2421,8 +1723,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecAssignment; }
 
@@ -2448,8 +1748,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecAssignment; }
 
@@ -2472,8 +1770,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecAssignment; }
 
@@ -2497,8 +1793,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecAssignment; }
 
@@ -2520,7 +1814,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecAssignment; }
 
@@ -2536,12 +1829,9 @@ namespace KJS {
             : m_expr1(expr1)
             , m_expr2(expr2)
         {
-            m_expr1->optimizeForUnnecessaryResult();
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecExpression; }
 
@@ -2563,9 +1853,6 @@ namespace KJS {
     public:
         ConstDeclNode(const Identifier& ident, ExpressionNode* in) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual KJS::JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        void evaluateSingle(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
         PassRefPtr<ConstDeclNode> releaseNext() KJS_FAST_CALL { return m_next.release(); }
@@ -2576,8 +1863,6 @@ namespace KJS {
         
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
         virtual RegisterID* emitCodeSingle(CodeGenerator&) KJS_FAST_CALL;
-    private:
-        void handleSlowCase(OldInterpreterExecState*, const ScopeChain&, JSValue*) KJS_FAST_CALL NEVER_INLINE;
     };
 
     class ConstStatementNode : public StatementNode {
@@ -2587,11 +1872,10 @@ namespace KJS {
         {
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
+
     private:
         RefPtr<ConstDeclNode> m_next;
     };
@@ -2616,8 +1900,6 @@ namespace KJS {
         BlockNode(SourceElements* children) KJS_FAST_CALL;
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
         StatementVector& children() { return m_children; }
@@ -2634,7 +1916,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual bool isEmptyStatement() const KJS_FAST_CALL { return true; }
     };
@@ -2659,8 +1940,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2676,8 +1955,6 @@ namespace KJS {
         
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2693,8 +1970,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     protected:
@@ -2711,8 +1986,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2728,8 +2001,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2746,8 +2017,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2758,24 +2027,16 @@ namespace KJS {
     class ForNode : public StatementNode {
     public:
         ForNode(ExpressionNode* expr1, ExpressionNode* expr2, ExpressionNode* expr3, StatementNode* statement, bool expr1WasVarDecl) KJS_FAST_CALL
-            : m_expr1(expr1 ? expr1 : new PlaceholderTrueNode)
-            , m_expr2(expr2 ? expr2 : new PlaceholderTrueNode)
-            , m_expr3(expr3 ? expr3 : new PlaceholderTrueNode)
+            : m_expr1(expr1)
+            , m_expr2(expr2)
+            , m_expr3(expr3)
             , m_statement(statement)
             , m_expr1WasVarDecl(expr1 && expr1WasVarDecl)
         {
-            ASSERT(m_expr1);
-            ASSERT(m_expr2);
-            ASSERT(m_expr3);
             ASSERT(statement);
-
-            m_expr1->optimizeForUnnecessaryResult();
-            m_expr3->optimizeForUnnecessaryResult();
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2792,8 +2053,6 @@ namespace KJS {
         ForInNode(const Identifier&, ExpressionNode*, ExpressionNode*, StatementNode*) KJS_FAST_CALL;
         
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2817,7 +2076,6 @@ namespace KJS {
         }
         
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2836,7 +2094,6 @@ namespace KJS {
         }
         
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2851,8 +2108,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual bool isReturnNode() const KJS_FAST_CALL { return true; }
 
@@ -2869,8 +2124,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2887,8 +2140,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual void pushLabel(const Identifier& ident) KJS_FAST_CALL { m_statement->pushLabel(ident); }
 
@@ -2905,8 +2156,6 @@ namespace KJS {
         }
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -2923,8 +2172,6 @@ namespace KJS {
         {
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* dst = 0) KJS_FAST_CALL;
@@ -2977,8 +2224,6 @@ namespace KJS {
         FunctionStack& functionStack() { return m_functionStack; }
         
     protected:
-        void optimizeVariableAccess(OldInterpreterExecState*) KJS_FAST_CALL;
-
         VarStack m_varStack;
         FunctionStack m_functionStack;
 
@@ -2994,8 +2239,6 @@ namespace KJS {
         static ProgramNode* create(SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;
         virtual ~ProgramNode();
         
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
-
         ProgramCodeBlock& code(ScopeChainNode* scopeChain, bool canCreateGlobals) KJS_FAST_CALL
         {
             if (!m_code)
@@ -3009,9 +2252,6 @@ namespace KJS {
         void generateCode(ScopeChainNode*, bool) KJS_FAST_CALL;
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        void initializeSymbolTable(OldInterpreterExecState*) KJS_FAST_CALL;
-        ALWAYS_INLINE void processDeclarations(OldInterpreterExecState*) KJS_FAST_CALL;
-
         Vector<size_t> m_varIndexes; // Storage indexes belonging to the nodes in m_varStack. (Recorded to avoid double lookup.)
         Vector<size_t> m_functionIndexes; // Storage indexes belonging to the nodes in m_functionStack. (Recorded to avoid double lookup.)
 
@@ -3023,8 +2263,6 @@ namespace KJS {
         static EvalNode* create(SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;
         virtual ~EvalNode();
         
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
-
         EvalCodeBlock& code(ScopeChainNode* scopeChain) KJS_FAST_CALL
         {
             if (!m_code)
@@ -3035,7 +2273,6 @@ namespace KJS {
     private:
         EvalNode(SourceElements*, VarStack*, FunctionStack*, bool usesEval, bool needsClosure) KJS_FAST_CALL;
 
-        ALWAYS_INLINE void processDeclarations(OldInterpreterExecState*) KJS_FAST_CALL;
         void generateCode(ScopeChainNode*) KJS_FAST_CALL;
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
@@ -3098,7 +2335,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
         FunctionImp* makeFunction(ExecState*, ScopeChainNode*) KJS_FAST_CALL;
-        virtual JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { return PrecMember; }
         virtual bool needsParensIfLeftmost() const { return true; }
@@ -3128,7 +2364,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         FunctionImp* makeFunction(ExecState*, ScopeChainNode*) KJS_FAST_CALL;
 
@@ -3157,13 +2392,9 @@ namespace KJS {
                 children->releaseContentsIntoVector(m_children);
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
 
-        JSValue* evaluate(OldInterpreterExecState*) KJS_FAST_CALL;
-        JSValue* executeStatements(OldInterpreterExecState*) KJS_FAST_CALL;
-
         ExpressionNode* expr() const { return m_expr.get(); }
         StatementVector& children() { return m_children; }
 
@@ -3185,7 +2416,6 @@ namespace KJS {
             clauseList->m_next = this;
         }
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
         CaseClauseNode* getClause() const KJS_FAST_CALL { return m_clause.get(); }
         ClauseListNode* getNext() const KJS_FAST_CALL { return m_next.get(); }
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
@@ -3209,8 +2439,6 @@ namespace KJS {
 
         RegisterID* emitCodeForBlock(CodeGenerator&, RegisterID* input, RegisterID* dst = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        JSValue* executeBlock(OldInterpreterExecState*, JSValue *input) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
         virtual Precedence precedence() const { ASSERT_NOT_REACHED(); return PrecExpression; }
 
@@ -3230,8 +2458,6 @@ namespace KJS {
 
         virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
 
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
 
     private:
@@ -3243,9 +2469,7 @@ namespace KJS {
     public:
         BreakpointCheckStatement(PassRefPtr<StatementNode>) KJS_FAST_CALL;
 
-        virtual JSValue* execute(OldInterpreterExecState*) KJS_FAST_CALL;
         virtual void streamTo(SourceStream&) const KJS_FAST_CALL;
-        virtual void optimizeVariableAccess(OldInterpreterExecState*, const SymbolTable&, const LocalStorage&, NodeStack&) KJS_FAST_CALL;
 
     private:
         RefPtr<StatementNode> m_statement;
index cf714736eab84d0fc04a26e70e28e3cbc81ecdac..b90b7b4c8c82b9850e33a0f80cf2a74b2cd3ad35 100644 (file)
@@ -512,9 +512,9 @@ void JSObject::fillGetterPropertySlot(PropertySlot& slot, JSValue **location)
     GetterSetterImp *gs = static_cast<GetterSetterImp *>(*location);
     JSObject *getterFunc = gs->getGetter();
     if (getterFunc)
-        slot.setGetterSlot(this->toThisObject(0), getterFunc);
+        slot.setGetterSlot(getterFunc);
     else
-        slot.setUndefined(this);
+        slot.setUndefined();
 }
 
 // ------------------------------ Error ----------------------------------------
index b8bb9b9d85ee500f1b5452189d9057250839f2fd..267b5f80dbf4a60611976751f0464091d056f21d 100644 (file)
@@ -102,6 +102,13 @@ namespace KJS {
     void setSetter(JSObject *s) { setter = s; }
       
   private:
+    // Object operations, with the toObject operation included.
+    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
+    virtual bool getOwnPropertySlot(ExecState*, unsigned index, PropertySlot&);
+    virtual void put(ExecState*, const Identifier& propertyName, JSValue*);
+    virtual void put(ExecState*, unsigned propertyName, JSValue*);
+    virtual JSObject* toThisObject(ExecState*) const;
+
     JSObject *getter;
     JSObject *setter;  
   };
@@ -525,19 +532,19 @@ inline bool JSValue::isObject(const ClassInfo *c) const
 
 inline JSValue *JSObject::get(ExecState *exec, const Identifier &propertyName) const
 {
-  PropertySlot slot;
+  PropertySlot slot(const_cast<JSObject *>(this));
 
   if (const_cast<JSObject *>(this)->getPropertySlot(exec, propertyName, slot))
-    return slot.getValue(exec, const_cast<JSObject *>(this), propertyName);
+    return slot.getValue(exec, propertyName);
     
   return jsUndefined();
 }
 
 inline JSValue *JSObject::get(ExecState *exec, unsigned propertyName) const
 {
-  PropertySlot slot;
+  PropertySlot slot(const_cast<JSObject *>(this));
   if (const_cast<JSObject *>(this)->getPropertySlot(exec, propertyName, slot))
-    return slot.getValue(exec, const_cast<JSObject *>(this), propertyName);
+    return slot.getValue(exec, propertyName);
     
   return jsUndefined();
 }
@@ -587,13 +594,13 @@ ALWAYS_INLINE bool JSObject::getOwnPropertySlotForWrite(ExecState* exec, const I
             slotIsWriteable = false;
             fillGetterPropertySlot(slot, location);
         } else
-            slot.setValueSlot(this, location);
+            slot.setValueSlot(location);
         return true;
     }
 
     // non-standard Netscape extension
     if (propertyName == exec->propertyNames().underscoreProto) {
-        slot.setValueSlot(this, &_proto);
+        slot.setValueSlot(&_proto);
         slotIsWriteable = false;
         return true;
     }
@@ -610,13 +617,13 @@ ALWAYS_INLINE bool JSObject::getOwnPropertySlot(ExecState* exec, const Identifie
         if (_prop.hasGetterSetterProperties() && location[0]->type() == GetterSetterType)
             fillGetterPropertySlot(slot, location);
         else
-            slot.setValueSlot(this, location);
+            slot.setValueSlot(location);
         return true;
     }
 
     // non-standard Netscape extension
     if (propertyName == exec->propertyNames().underscoreProto) {
-        slot.setValueSlot(this, &_proto);
+        slot.setValueSlot(&_proto);
         return true;
     }
 
@@ -638,6 +645,76 @@ inline JSValue* JSObject::toPrimitive(ExecState* exec, JSType preferredType) con
     return defaultValue(exec, preferredType);
 }
 
+inline JSValue* JSValue::get(ExecState* exec, const Identifier& propertyName) const
+{
+    if (UNLIKELY(JSImmediate::isImmediate(this))) {
+        JSObject* object = JSImmediate::toObject(this, exec);
+        PropertySlot slot(object);
+        if (!object->getPropertySlot(exec, propertyName, slot))
+            return jsUndefined();
+        return slot.getValue(exec, propertyName);
+    }
+    JSCell* cell = static_cast<JSCell*>(const_cast<JSValue*>(this));
+    PropertySlot slot(cell);
+    while (true) {
+        if (cell->getOwnPropertySlot(exec, propertyName, slot))
+            return slot.getValue(exec, propertyName);
+        ASSERT(cell->isObject());
+        JSValue* proto = static_cast<JSObject*>(cell)->prototype();
+        if (!proto->isObject())
+            return jsUndefined();
+        cell = static_cast<JSCell*>(proto);
+    }
+}
+
+inline JSValue* JSValue::get(ExecState* exec, unsigned propertyName) const
+{
+    if (UNLIKELY(JSImmediate::isImmediate(this))) {
+        JSObject* object = JSImmediate::toObject(this, exec);
+        PropertySlot slot(object);
+        if (!object->getPropertySlot(exec, propertyName, slot))
+            return jsUndefined();
+        return slot.getValue(exec, propertyName);
+    }
+    JSCell* cell = const_cast<JSCell*>(asCell());
+    PropertySlot slot(cell);
+    while (true) {
+        if (cell->getOwnPropertySlot(exec, propertyName, slot))
+            return slot.getValue(exec, propertyName);
+        ASSERT(cell->isObject());
+        JSValue* proto = static_cast<JSObject*>(cell)->prototype();
+        if (!proto->isObject())
+            return jsUndefined();
+        cell = static_cast<JSCell*>(proto);
+    }
+}
+
+inline void JSValue::put(ExecState* exec, const Identifier& propertyName, JSValue* value)
+{
+    if (UNLIKELY(JSImmediate::isImmediate(this))) {
+        JSImmediate::toObject(this, exec)->put(exec, propertyName, value);
+        return;
+    }
+    asCell()->put(exec, propertyName, value);
+}
+
+inline void JSValue::put(ExecState* exec, unsigned propertyName, JSValue* value)
+{
+    if (UNLIKELY(JSImmediate::isImmediate(this))) {
+        JSImmediate::toObject(this, exec)->put(exec, propertyName, value);
+        return;
+    }
+    asCell()->put(exec, propertyName, value);
+}
+
+inline JSObject* PropertySlot::slotBase() const
+{
+    ASSERT(m_slotBase);
+    // It's be nice to assert that m_slotBase is an object here, but that's a bit
+    // too slow, even for debug builds.
+    return static_cast<JSObject*>(m_slotBase);
+}
+
 } // namespace
 
 #endif // KJS_OBJECT_H
index 11a9f310a1fe8e0ca314ed79eeb55c726875bb31..8e1fa5728d860b70bcb2d7ed7b6428ec9467a564 100644 (file)
@@ -1,7 +1,6 @@
 // -*- c-basic-offset: 4 -*-
 /*
- *  This file is part of the KDE libraries
- *  Copyright (C) 2005 Apple Computer, Inc.
+ *  Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
 
 namespace KJS {
 
-JSValue *PropertySlot::undefinedGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&)
+JSValue* PropertySlot::undefinedGetter(ExecState*, const Identifier&, const PropertySlot&)
 {
     return jsUndefined();
 }
 
-JSValue* PropertySlot::ungettableGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot&)
+JSValue* PropertySlot::ungettableGetter(ExecState*, const Identifier&, const PropertySlot&)
 {
     ASSERT_NOT_REACHED();
     return jsUndefined();
 }
 
-JSValue *PropertySlot::functionGetter(ExecState* exec, JSObject* originalObject, const Identifier&, const PropertySlot& slot)
+JSValue* PropertySlot::functionGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
 {
     CallData data;
     CallType callType = slot.m_data.getterFunc->getCallData(data);
     if (callType == CallTypeNative)
-        return slot.m_data.getterFunc->callAsFunction(exec, originalObject, exec->emptyList());
+        return slot.m_data.getterFunc->callAsFunction(exec, slot.slotBase(), exec->emptyList());
     ASSERT(callType == CallTypeJS);
     RegisterFileStack* stack = &exec->dynamicGlobalObject()->registerFileStack();
     stack->pushFunctionRegisterFile();
-    JSValue* result = slot.m_data.getterFunc->callAsFunction(exec, originalObject, exec->emptyList());
+    JSValue* result = slot.m_data.getterFunc->callAsFunction(exec, slot.slotBase(), exec->emptyList());
     stack->popFunctionRegisterFile();
     return result;    
 }
index 41ff67131f7e11084473f74bd19d616c080af556..1ba04e0edea4d578f4cc18871fd294589d3e2153 100644 (file)
@@ -1,6 +1,6 @@
 // -*- c-basic-offset: 4 -*-
 /*
- *  Copyright (C) 2005, 2007 Apple Inc. All rights reserved.