https://bugs.webkit.org/show_bug.cgi?id=54839
authorbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Feb 2011 05:18:40 +0000 (05:18 +0000)
committerbarraclough@apple.com <barraclough@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Feb 2011 05:18:40 +0000 (05:18 +0000)
commit9788fe2f6915aab0c991977fad6732597ce47bab
treef1788a92f4893a35f22a4d966a9cb7f0811c0192
parent82562ca4671c54f75e049d8962897e06728f377e
https://bugs.webkit.org/show_bug.cgi?id=54839
Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction.

Reviewed by Oliver Hunt.

Historically, Native functions used to be represented by PrototypeFunctions, however
since introducing call optimizations to the JIT this has used JSFunctions for host
calls too. At the point this change was made, the interpreter continued to use
PrototypeFunctions, however since fallback from the JIT to interpreter was introduced
the interpreter has had to be able to run using host functions represented using
JSFunctions - leading to an unnecessary and redundant divergence in behaviour between
interpreter only builds, and situations where the JIT has fallen back to interpreting.

NativeFunctionWrapper only existed to select between PrototypeFunction and JSFunction
for wrappers for host functions, and as such can also be removed.

GlobalEvalFunction is a redundant wrapper that happens to be derived from
PrototypeFunction. It existed to hold a reference to the global object - but since all
functions how derive from JSObjectWithGlobalObject, this no longer requires an
additional class to provide this functionality.

Source/JavaScriptCore:

* JavaScriptCore.JSVALUE32_64only.exp:
* JavaScriptCore.JSVALUE64only.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
    Removed symbols / references to files.

* runtime/GlobalEvalFunction.cpp: Removed.
* runtime/GlobalEvalFunction.h: Removed.
* runtime/NativeFunctionWrapper.h: Removed.
* runtime/PrototypeFunction.cpp: Removed.
* runtime/PrototypeFunction.h: Removed.
    Removed.

* runtime/Executable.cpp:
(JSC::NativeExecutable::~NativeExecutable):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
(JSC::NativeExecutable::NativeExecutable):
(JSC::JSFunction::nativeFunction):
* runtime/JSFunction.cpp:
(JSC::callHostFunctionAsConstructor):
(JSC::JSFunction::JSFunction):
(JSC::JSFunction::getCallData):
* runtime/JSFunction.h:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::getHostFunction):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::getCTIStub):
    Added interpreter-friendly constructors for NativeExecutables.

* bytecompiler/BytecodeGenerator.cpp:
* interpreter/Interpreter.cpp:
* jit/JITStubs.cpp:
* jsc.cpp:
* runtime/ArrayConstructor.cpp:
* runtime/BooleanPrototype.cpp:
* runtime/BooleanPrototype.h:
* runtime/CallData.h:
* runtime/DateConstructor.cpp:
* runtime/DateConstructor.h:
* runtime/ErrorPrototype.cpp:
* runtime/ErrorPrototype.h:
* runtime/FunctionPrototype.cpp:
* runtime/FunctionPrototype.h:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSGlobalObjectFunctions.cpp:
* runtime/Lookup.cpp:
* runtime/NumberPrototype.cpp:
* runtime/NumberPrototype.h:
* runtime/ObjectConstructor.cpp:
* runtime/ObjectConstructor.h:
* runtime/ObjectPrototype.cpp:
* runtime/ObjectPrototype.h:
* runtime/RegExpPrototype.cpp:
* runtime/RegExpPrototype.h:
* runtime/SmallStrings.h:
* runtime/StringConstructor.cpp:
* runtime/StringConstructor.h:
    Removed use of redundant classes.

Source/WebCore:

* bindings/js/JSDOMBinding.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSHistoryCustom.cpp:
* bindings/js/JSLocationCustom.cpp:
    Removed use of redundant classes.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
56 files changed:
Source/JavaScriptCore/Android.mk
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.am
Source/JavaScriptCore/JavaScriptCore.JSVALUE32_64only.exp
Source/JavaScriptCore/JavaScriptCore.JSVALUE64only.exp
Source/JavaScriptCore/JavaScriptCore.gypi
Source/JavaScriptCore/JavaScriptCore.pro
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/jit/JITStubs.cpp
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/ArrayConstructor.cpp
Source/JavaScriptCore/runtime/BooleanPrototype.cpp
Source/JavaScriptCore/runtime/BooleanPrototype.h
Source/JavaScriptCore/runtime/CallData.h
Source/JavaScriptCore/runtime/DateConstructor.cpp
Source/JavaScriptCore/runtime/DateConstructor.h
Source/JavaScriptCore/runtime/ErrorPrototype.cpp
Source/JavaScriptCore/runtime/ErrorPrototype.h
Source/JavaScriptCore/runtime/Executable.cpp
Source/JavaScriptCore/runtime/Executable.h
Source/JavaScriptCore/runtime/FunctionPrototype.cpp
Source/JavaScriptCore/runtime/FunctionPrototype.h
Source/JavaScriptCore/runtime/GlobalEvalFunction.cpp [deleted file]
Source/JavaScriptCore/runtime/GlobalEvalFunction.h [deleted file]
Source/JavaScriptCore/runtime/JSFunction.cpp
Source/JavaScriptCore/runtime/JSFunction.h
Source/JavaScriptCore/runtime/JSGlobalData.cpp
Source/JavaScriptCore/runtime/JSGlobalData.h
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
Source/JavaScriptCore/runtime/Lookup.cpp
Source/JavaScriptCore/runtime/NativeFunctionWrapper.h [deleted file]
Source/JavaScriptCore/runtime/NumberPrototype.cpp
Source/JavaScriptCore/runtime/NumberPrototype.h
Source/JavaScriptCore/runtime/ObjectConstructor.cpp
Source/JavaScriptCore/runtime/ObjectConstructor.h
Source/JavaScriptCore/runtime/ObjectPrototype.cpp
Source/JavaScriptCore/runtime/ObjectPrototype.h
Source/JavaScriptCore/runtime/PrototypeFunction.cpp [deleted file]
Source/JavaScriptCore/runtime/PrototypeFunction.h [deleted file]
Source/JavaScriptCore/runtime/RegExpPrototype.cpp
Source/JavaScriptCore/runtime/RegExpPrototype.h
Source/JavaScriptCore/runtime/SmallStrings.h
Source/JavaScriptCore/runtime/StringConstructor.cpp
Source/JavaScriptCore/runtime/StringConstructor.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMBinding.cpp
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSHistoryCustom.cpp
Source/WebCore/bindings/js/JSLocationCustom.cpp