source: webkit/trunk/Source/JavaScriptCore/Android.mk@ 79177

Last change on this file since 79177 was 79177, checked in by [email protected], 14 years ago

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:

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.

File size: 6.5 KB
Line 
1##
2## Copyright 2009, The Android Open Source Project
3##
4## Redistribution and use in source and binary forms, with or without
5## modification, are permitted provided that the following conditions
6## are met:
7## * Redistributions of source code must retain the above copyright
8## notice, this list of conditions and the following disclaimer.
9## * Redistributions in binary form must reproduce the above copyright
10## notice, this list of conditions and the following disclaimer in the
11## documentation and/or other materials provided with the distribution.
12##
13## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
14## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24##
25
26LOCAL_SRC_FILES := \
27 API/JSValueRef.cpp \
28 API/JSCallbackObject.cpp \
29 API/OpaqueJSString.cpp \
30 \
31 bytecode/CodeBlock.cpp \
32 bytecode/JumpTable.cpp \
33 bytecode/Opcode.cpp \
34 bytecode/SamplingTool.cpp \
35 bytecode/StructureStubInfo.cpp \
36 \
37 bytecompiler/BytecodeGenerator.cpp \
38 bytecompiler/NodesCodegen.cpp \
39 \
40 debugger/Debugger.cpp \
41 debugger/DebuggerActivation.cpp \
42 debugger/DebuggerCallFrame.cpp \
43 \
44 interpreter/CallFrame.cpp \
45 interpreter/Interpreter.cpp \
46 interpreter/RegisterFile.cpp \
47 \
48 jit/ExecutableAllocator.cpp\
49 jit/ExecutableAllocatorFixedVMPool.cpp \
50 jit/ExecutableAllocatorPosix.cpp \
51 jit/JIT.cpp \
52 jit/JITArithmetic.cpp \
53 jit/JITCall.cpp \
54 jit/JITCall32_64.cpp \
55 jit/JITOpcodes.cpp \
56 jit/JITPropertyAccess.cpp \
57 jit/JITStubs.cpp \
58 \
59 parser/Lexer.cpp \
60 parser/Nodes.cpp \
61 parser/Parser.cpp \
62 parser/ParserArena.cpp \
63 \
64 profiler/Profile.cpp \
65 profiler/ProfileGenerator.cpp \
66 profiler/ProfileNode.cpp \
67 profiler/Profiler.cpp \
68 \
69 runtime/ArgList.cpp \
70 runtime/Arguments.cpp \
71 runtime/ArrayConstructor.cpp \
72 runtime/ArrayPrototype.cpp \
73 runtime/BooleanConstructor.cpp \
74 runtime/BooleanObject.cpp \
75 runtime/BooleanPrototype.cpp \
76 runtime/CallData.cpp \
77 runtime/MarkedBlock.cpp \
78 runtime/MarkedSpace.cpp \
79 runtime/Heap.cpp \
80 runtime/CommonIdentifiers.cpp \
81 runtime/Completion.cpp \
82 runtime/ConstructData.cpp \
83 runtime/DateConstructor.cpp \
84 runtime/DateConversion.cpp \
85 runtime/DateInstance.cpp \
86 runtime/DatePrototype.cpp \
87 runtime/Error.cpp \
88 runtime/ErrorConstructor.cpp \
89 runtime/ErrorInstance.cpp \
90 runtime/ErrorPrototype.cpp \
91 runtime/ExceptionHelpers.cpp \
92 runtime/Executable.cpp \
93 runtime/FunctionConstructor.cpp \
94 runtime/FunctionPrototype.cpp \
95 runtime/GCHandle.cpp \
96 runtime/GetterSetter.cpp \
97 runtime/Identifier.cpp \
98 runtime/InitializeThreading.cpp \
99 runtime/InternalFunction.cpp \
100 runtime/JSAPIValueWrapper.cpp \
101 runtime/JSActivation.cpp \
102 runtime/JSArray.cpp \
103 runtime/JSByteArray.cpp \
104 runtime/JSCell.cpp \
105 runtime/JSFunction.cpp \
106 runtime/JSGlobalData.cpp \
107 runtime/JSGlobalObject.cpp \
108 runtime/JSGlobalObjectFunctions.cpp \
109 runtime/JSImmediate.cpp \
110 runtime/JSLock.cpp \
111 runtime/JSNotAnObject.cpp \
112 runtime/JSNumberCell.cpp \
113 runtime/JSONObject.cpp \
114 runtime/JSObject.cpp \
115 runtime/JSPropertyNameIterator.cpp \
116 runtime/JSStaticScopeObject.cpp \
117 runtime/JSString.cpp \
118 runtime/JSValue.cpp \
119 runtime/JSVariableObject.cpp \
120 runtime/JSWrapperObject.cpp \
121 runtime/LiteralParser.cpp \
122 runtime/Lookup.cpp \
123 runtime/MachineStackMarker.cpp \
124 runtime/ConservativeSet.cpp \
125 runtime/MarkStack.cpp \
126 runtime/MarkStackPosix.cpp \
127 runtime/MathObject.cpp \
128 runtime/NativeErrorConstructor.cpp \
129 runtime/NativeErrorPrototype.cpp \
130 runtime/NumberConstructor.cpp \
131 runtime/NumberObject.cpp \
132 runtime/NumberPrototype.cpp \
133 runtime/ObjectConstructor.cpp \
134 runtime/ObjectPrototype.cpp \
135 runtime/Operations.cpp \
136 runtime/PropertyDescriptor.cpp \
137 runtime/PropertyNameArray.cpp \
138 runtime/PropertySlot.cpp \
139 runtime/RegExp.cpp \
140 runtime/RegExpConstructor.cpp \
141 runtime/RegExpObject.cpp \
142 runtime/RegExpPrototype.cpp \
143 runtime/ScopeChain.cpp \
144 runtime/SmallStrings.cpp \
145 runtime/StringConstructor.cpp \
146 runtime/StringObject.cpp \
147 runtime/StringPrototype.cpp \
148 runtime/StringRecursionChecker.cpp \
149 runtime/Structure.cpp \
150 runtime/StructureChain.cpp \
151 runtime/TimeoutChecker.cpp \
152 runtime/UString.cpp \
153 \
154 wtf/Assertions.cpp \
155 wtf/ByteArray.cpp \
156 wtf/CryptographicallyRandomNumber.cpp \
157 wtf/CurrentTime.cpp \
158 wtf/DateMath.cpp \
159 wtf/DecimalNumber.cpp \
160 wtf/FastMalloc.cpp \
161 wtf/HashTable.cpp \
162 wtf/MainThread.cpp \
163 wtf/OSRandomSource.cpp \
164 wtf/PageAllocationAligned.cpp\
165 wtf/PageBlock.cpp\
166 wtf/RandomNumber.cpp \
167 wtf/RefCountedLeakCounter.cpp \
168 wtf/StackBounds.cpp \
169 wtf/TCSystemAlloc.cpp \
170 wtf/ThreadIdentifierDataPthreads.cpp \
171 wtf/Threading.cpp \
172 wtf/ThreadingPthreads.cpp \
173 wtf/WTFThreadData.cpp \
174 \
175 wtf/TypeTraits.cpp \
176 wtf/dtoa.cpp \
177 \
178 wtf/android/MainThreadAndroid.cpp \
179 \
180 wtf/text/AtomicString.cpp \
181 wtf/text/CString.cpp \
182 wtf/text/StringBuilder.cpp \
183 wtf/text/StringImpl.cpp \
184 wtf/text/WTFString.cpp \
185 \
186 wtf/unicode/CollatorDefault.cpp \
187 wtf/unicode/UTF8.cpp \
188 \
189 wtf/unicode/icu/CollatorICU.cpp \
190 \
191 yarr/YarrPattern.cpp \
192 yarr/YarrInterpreter.cpp \
193 yarr/YarrJIT.cpp \
194 yarr/YarrSyntaxChecker.cpp
195
196# generated headers
197JSC_OBJECTS := $(addprefix $(intermediates)/runtime/, \
198 ArrayPrototype.lut.h \
199 DatePrototype.lut.h \
200 JSONObject.lut.h \
201 MathObject.lut.h \
202 NumberConstructor.lut.h \
203 RegExpConstructor.lut.h \
204 RegExpObject.lut.h \
205 StringPrototype.lut.h \
206 )
207$(JSC_OBJECTS): PRIVATE_PATH := $(LOCAL_PATH)
208$(JSC_OBJECTS): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/create_hash_table $< -i > $@
209$(JSC_OBJECTS): $(LOCAL_PATH)/create_hash_table
210$(JSC_OBJECTS): $(intermediates)/%.lut.h : $(LOCAL_PATH)/%.cpp
211 $(transform-generated-source)
212
213
214LEXER_HEADER := $(intermediates)/Lexer.lut.h
215$(LEXER_HEADER): PRIVATE_PATH := $(LOCAL_PATH)
216$(LEXER_HEADER): PRIVATE_CUSTOM_TOOL = perl $(PRIVATE_PATH)/create_hash_table $< -i > $@
217$(LEXER_HEADER): $(LOCAL_PATH)/create_hash_table
218$(LEXER_HEADER): $(intermediates)/%.lut.h : $(LOCAL_PATH)/parser/Keywords.table
219 $(transform-generated-source)
220
221LOCAL_GENERATED_SOURCES += $(JSC_OBJECTS) $(LEXER_HEADER)
Note: See TracBrowser for help on using the repository browser.