Changeset 157313 in webkit
- Timestamp:
- Oct 11, 2013 12:03:39 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r157307 r157313 1 2013-10-11 Mark Lam <mark.lam@apple.com> 2 3 Transition op_new_* JITStubs to JIT operations. 4 https://bugs.webkit.org/show_bug.cgi?id=122460. 5 6 Reviewed by Michael Saboff. 7 8 Also: 9 - Removed the redundant operationNewFunctionExpression(). It is identical to 10 operationNewFunctionNoCheck(). 11 - Sorted JIT operation signature keys in the comment in JITOperations.h. 12 - Removed the unused returnValue2Register definition for X86_64. 13 14 * dfg/DFGOperations.cpp: 15 * dfg/DFGOperations.h: 16 * dfg/DFGSpeculativeJIT.cpp: 17 (JSC::DFG::SpeculativeJIT::compileNewFunctionExpression): 18 * jit/CCallHelpers.h: 19 (JSC::CCallHelpers::setupArgumentsWithExecState): 20 * jit/JIT.h: 21 * jit/JITInlines.h: 22 (JSC::JIT::callOperation): 23 * jit/JITOpcodes.cpp: 24 (JSC::JIT::emitSlow_op_new_object): 25 (JSC::JIT::emit_op_new_func): 26 (JSC::JIT::emit_op_new_func_exp): 27 (JSC::JIT::emit_op_new_array): 28 (JSC::JIT::emit_op_new_array_with_size): 29 (JSC::JIT::emit_op_new_array_buffer): 30 * jit/JITOpcodes32_64.cpp: 31 (JSC::JIT::emitSlow_op_new_object): 32 * jit/JITOperations.cpp: 33 * jit/JITOperations.h: 34 * jit/JITStubs.cpp: 35 * jit/JITStubs.h: 36 * jit/JSInterfaceJIT.h: 37 1 38 2013-10-11 Oliver Hunt <oliver@apple.com> 2 39 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r157266 r157313 221 221 } 222 222 223 JSCell* JIT_OPERATION operationNewObject(ExecState* exec, Structure* structure)224 {225 VM* vm = &exec->vm();226 NativeCallFrameTracer tracer(vm, exec);227 228 return constructEmptyObject(exec, structure);229 }230 231 223 EncodedJSValue JIT_OPERATION operationValueAdd(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 232 224 { … … 789 781 NativeCallFrameTracer tracer(&vm, exec); 790 782 return JSFunction::create(vm, static_cast<FunctionExecutable*>(functionExecutable), exec->scope()); 791 }792 793 EncodedJSValue JIT_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable)794 {795 ASSERT(functionExecutable->inherits(FunctionExecutable::info()));796 VM& vm = exec->vm();797 NativeCallFrameTracer tracer(&vm, exec);798 return JSValue::encode(JSFunction::create(vm, static_cast<FunctionExecutable*>(functionExecutable), exec->scope()));799 }800 801 JSCell* JIT_OPERATION operationNewFunctionExpression(ExecState* exec, JSCell* functionExecutableAsCell)802 {803 ASSERT(functionExecutableAsCell->inherits(FunctionExecutable::info()));804 805 VM& vm = exec->vm();806 NativeCallFrameTracer tracer(&vm, exec);807 808 FunctionExecutable* functionExecutable =809 static_cast<FunctionExecutable*>(functionExecutableAsCell);810 return JSFunction::create(vm, functionExecutable, exec->scope());811 783 } 812 784 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.h
r157266 r157313 42 42 43 43 // These routines are provide callbacks out to C++ implementations of operations too complex to JIT. 44 JSCell* JIT_OPERATION operationNewObject(ExecState*, Structure*) WTF_INTERNAL;45 44 JSCell* JIT_OPERATION operationCreateThis(ExecState*, JSObject* constructor, int32_t inlineCapacity) WTF_INTERNAL; 46 45 EncodedJSValue JIT_OPERATION operationToThis(ExecState*, EncodedJSValue encodedOp1) WTF_INTERNAL; … … 101 100 EncodedJSValue JIT_OPERATION operationGetArgumentByVal(ExecState*, int32_t, int32_t) WTF_INTERNAL; 102 101 JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState*, JSCell*) WTF_INTERNAL; 103 EncodedJSValue JIT_OPERATION operationNewFunction(ExecState*, JSCell*) WTF_INTERNAL;104 JSCell* JIT_OPERATION operationNewFunctionExpression(ExecState*, JSCell*) WTF_INTERNAL;105 102 double JIT_OPERATION operationFModOnInts(int32_t, int32_t) WTF_INTERNAL; 106 103 size_t JIT_OPERATION operationIsObject(ExecState*, EncodedJSValue) WTF_INTERNAL; -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r157043 r157313 4390 4390 flushRegisters(); 4391 4391 callOperation( 4392 operationNewFunction Expression,4392 operationNewFunctionNoCheck, 4393 4393 resultGPR, 4394 4394 m_jit.codeBlock()->functionExpr(node->functionExprIndex())); -
trunk/Source/JavaScriptCore/jit/CCallHelpers.h
r156559 r157313 193 193 } 194 194 195 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImm32 arg2, TrustedImm32 arg3) 196 { 197 resetCallArguments(); 198 addCallArgument(GPRInfo::callFrameRegister); 199 addCallArgument(arg1); 200 addCallArgument(arg2); 201 addCallArgument(arg3); 202 } 203 195 204 ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3) 196 205 { … … 230 239 231 240 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, GPRReg arg3) 241 { 242 resetCallArguments(); 243 addCallArgument(GPRInfo::callFrameRegister); 244 addCallArgument(arg1); 245 addCallArgument(arg2); 246 addCallArgument(arg3); 247 } 248 249 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, TrustedImm32 arg3) 250 { 251 resetCallArguments(); 252 addCallArgument(GPRInfo::callFrameRegister); 253 addCallArgument(arg1); 254 addCallArgument(arg2); 255 addCallArgument(arg3); 256 } 257 258 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImmPtr arg2, TrustedImm32 arg3) 232 259 { 233 260 resetCallArguments(); … … 824 851 } 825 852 853 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImm32 arg2, TrustedImm32 arg3) 854 { 855 move(arg1, GPRInfo::argumentGPR1); 856 move(arg2, GPRInfo::argumentGPR2); 857 move(arg3, GPRInfo::argumentGPR3); 858 move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 859 } 860 826 861 ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3) 827 862 { … … 910 945 setupTwoStubArgsGPR<GPRInfo::argumentGPR2, GPRInfo::argumentGPR3>(arg2, arg3); 911 946 move(arg1, GPRInfo::argumentGPR1); 947 move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 948 } 949 950 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, GPRReg arg2, TrustedImm32 arg3) 951 { 952 move(arg1, GPRInfo::argumentGPR1); 953 move(arg2, GPRInfo::argumentGPR2); 954 move(arg3, GPRInfo::argumentGPR3); 955 move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 956 } 957 958 ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1, TrustedImmPtr arg2, TrustedImm32 arg3) 959 { 960 move(arg1, GPRInfo::argumentGPR1); 961 move(arg2, GPRInfo::argumentGPR2); 962 move(arg3, GPRInfo::argumentGPR3); 912 963 move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); 913 964 } -
trunk/Source/JavaScriptCore/jit/JIT.h
r157266 r157313 52 52 namespace JSC { 53 53 54 class ArrayAllocationProfile; 54 55 class CodeBlock; 55 56 class FunctionExecutable; … … 867 868 MacroAssembler::Call appendCallWithCallFrameRollbackOnException(const FunctionPtr&); 868 869 MacroAssembler::Call appendCallWithExceptionCheckSetJSValueResult(const FunctionPtr&, int); 870 MacroAssembler::Call callOperation(C_JITOperation_ESt, Structure*); 869 871 MacroAssembler::Call callOperation(J_JITOperation_E, int); 872 #if USE(JSVALUE64) 873 MacroAssembler::Call callOperation(J_JITOperation_EAapJ, int, ArrayAllocationProfile*, GPRReg); 874 #else 875 MacroAssembler::Call callOperation(J_JITOperation_EAapJ, int, ArrayAllocationProfile*, GPRReg, GPRReg); 876 #endif 877 MacroAssembler::Call callOperation(J_JITOperation_EAapJcpZ, int, ArrayAllocationProfile*, GPRReg, int32_t); 878 MacroAssembler::Call callOperation(J_JITOperation_EAapJcpZ, int, ArrayAllocationProfile*, const JSValue*, int32_t); 879 MacroAssembler::Call callOperation(J_JITOperation_EC, int, JSCell*); 870 880 MacroAssembler::Call callOperation(J_JITOperation_EP, int, void*); 871 881 MacroAssembler::Call callOperation(S_JITOperation_ECC, RegisterID, RegisterID); -
trunk/Source/JavaScriptCore/jit/JITInlines.h
r157266 r157313 232 232 } 233 233 234 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(C_JITOperation_ESt operation, Structure* structure) 235 { 236 setupArgumentsWithExecState(TrustedImmPtr(structure)); 237 return appendCallWithExceptionCheck(operation); 238 } 239 234 240 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_E operation, int dst) 235 241 { 236 242 setupArgumentsExecState(); 243 return appendCallWithExceptionCheckSetJSValueResult(operation, dst); 244 } 245 246 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EAapJcpZ operation, int dst, ArrayAllocationProfile* arg1, GPRReg arg2, int32_t arg3) 247 { 248 setupArgumentsWithExecState(TrustedImmPtr(arg1), arg2, TrustedImm32(arg3)); 249 return appendCallWithExceptionCheckSetJSValueResult(operation, dst); 250 } 251 252 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EAapJcpZ operation, int dst, ArrayAllocationProfile* arg1, const JSValue* arg2, int32_t arg3) 253 { 254 setupArgumentsWithExecState(TrustedImmPtr(arg1), TrustedImmPtr(arg2), TrustedImm32(arg3)); 255 return appendCallWithExceptionCheckSetJSValueResult(operation, dst); 256 } 257 258 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EC operation, int dst, JSCell* cell) 259 { 260 setupArgumentsWithExecState(TrustedImmPtr(cell)); 237 261 return appendCallWithExceptionCheckSetJSValueResult(operation, dst); 238 262 } … … 304 328 #endif 305 329 330 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EAapJ operation, int dst, ArrayAllocationProfile* arg1, GPRReg arg2Tag, GPRReg arg2Payload) 331 { 332 setupArgumentsWithExecState(TrustedImmPtr(arg1), EABI_32BIT_DUMMY_ARG arg2Payload, arg2Tag); 333 return appendCallWithExceptionCheckSetJSValueResult(operation, dst); 334 } 335 306 336 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(S_JITOperation_EJ operation, RegisterID argTag, RegisterID argPayload) 307 337 { … … 318 348 #undef EABI_32BIT_DUMMY_ARG 319 349 #undef SH4_32BIT_DUMMY_ARG 350 351 #else // USE(JSVALUE32_64) 352 353 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(J_JITOperation_EAapJ operation, int dst, ArrayAllocationProfile* arg1, GPRReg arg2) 354 { 355 setupArgumentsWithExecState(TrustedImmPtr(arg1), arg2); 356 return appendCallWithExceptionCheckSetJSValueResult(operation, dst); 357 } 320 358 321 359 #endif // USE(JSVALUE32_64) -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r157266 r157313 114 114 { 115 115 linkSlowCase(iter); 116 JITStubCall stubCall(this, cti_op_new_object); 117 stubCall.addArgument(TrustedImmPtr(currentInstruction[3].u.objectAllocationProfile->structure())); 118 stubCall.call(currentInstruction[1].u.operand); 116 int dst = currentInstruction[1].u.operand; 117 Structure* structure = currentInstruction[3].u.objectAllocationProfile->structure(); 118 callOperation(operationNewObject, structure); 119 emitStoreCell(dst, returnValueRegister); 119 120 } 120 121 … … 1214 1215 } 1215 1216 1216 JITStubCall stubCall(this, cti_op_new_func); 1217 stubCall.addArgument(TrustedImmPtr(m_codeBlock->functionDecl(currentInstruction[2].u.operand))); 1218 stubCall.call(dst); 1217 FunctionExecutable* funcExec = m_codeBlock->functionDecl(currentInstruction[2].u.operand); 1218 callOperation(operationNewFunction, dst, funcExec); 1219 1219 1220 1220 if (currentInstruction[3].u.operand) { … … 1230 1230 void JIT::emit_op_new_func_exp(Instruction* currentInstruction) 1231 1231 { 1232 JITStubCall stubCall(this, cti_op_new_func_exp);1233 stubCall.addArgument(TrustedImmPtr(m_codeBlock->functionExpr(currentInstruction[2].u.operand)));1234 stubCall.call(currentInstruction[1].u.operand);1232 int dst = currentInstruction[1].u.operand; 1233 FunctionExecutable* funcExpr = m_codeBlock->functionExpr(currentInstruction[2].u.operand); 1234 callOperation(operationNewFunction, dst, funcExpr); 1235 1235 } 1236 1236 1237 1237 void JIT::emit_op_new_array(Instruction* currentInstruction) 1238 1238 { 1239 JITStubCall stubCall(this, cti_op_new_array); 1240 stubCall.addArgument(TrustedImm32(currentInstruction[2].u.operand)); 1241 stubCall.addArgument(TrustedImm32(currentInstruction[3].u.operand)); 1242 stubCall.addArgument(TrustedImmPtr(currentInstruction[4].u.arrayAllocationProfile)); 1243 stubCall.call(currentInstruction[1].u.operand); 1239 int dst = currentInstruction[1].u.operand; 1240 int valuesIndex = currentInstruction[2].u.operand; 1241 int size = currentInstruction[3].u.operand; 1242 addPtr(TrustedImm32(valuesIndex * sizeof(Register)), callFrameRegister, regT0); 1243 callOperation(operationNewArrayWithProfile, dst, 1244 currentInstruction[4].u.arrayAllocationProfile, regT0, size); 1244 1245 } 1245 1246 1246 1247 void JIT::emit_op_new_array_with_size(Instruction* currentInstruction) 1247 1248 { 1248 JITStubCall stubCall(this, cti_op_new_array_with_size); 1249 int dst = currentInstruction[1].u.operand; 1250 int sizeIndex = currentInstruction[2].u.operand; 1249 1251 #if USE(JSVALUE64) 1250 stubCall.addArgument(currentInstruction[2].u.operand, regT2); 1252 emitGetVirtualRegister(sizeIndex, regT0); 1253 callOperation(operationNewArrayWithSizeAndProfile, dst, 1254 currentInstruction[3].u.arrayAllocationProfile, regT0); 1251 1255 #else 1252 stubCall.addArgument(currentInstruction[2].u.operand); 1256 emitLoad(sizeIndex, regT1, regT0); 1257 callOperation(operationNewArrayWithSizeAndProfile, dst, 1258 currentInstruction[3].u.arrayAllocationProfile, regT1, regT0); 1253 1259 #endif 1254 stubCall.addArgument(TrustedImmPtr(currentInstruction[3].u.arrayAllocationProfile));1255 stubCall.call(currentInstruction[1].u.operand);1256 1260 } 1257 1261 1258 1262 void JIT::emit_op_new_array_buffer(Instruction* currentInstruction) 1259 1263 { 1260 JITStubCall stubCall(this, cti_op_new_array_buffer);1261 stubCall.addArgument(TrustedImm32(currentInstruction[2].u.operand));1262 stubCall.addArgument(TrustedImm32(currentInstruction[3].u.operand));1263 stubCall.addArgument(TrustedImmPtr(currentInstruction[4].u.arrayAllocationProfile));1264 stubCall.call(currentInstruction[1].u.operand);1264 int dst = currentInstruction[1].u.operand; 1265 int valuesIndex = currentInstruction[2].u.operand; 1266 int size = currentInstruction[3].u.operand; 1267 const JSValue* values = codeBlock()->constantBuffer(valuesIndex); 1268 callOperation(operationNewArrayBufferWithProfile, dst, currentInstruction[4].u.arrayAllocationProfile, values, size); 1265 1269 } 1266 1270 -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r157266 r157313 228 228 { 229 229 linkSlowCase(iter); 230 JITStubCall stubCall(this, cti_op_new_object); 231 stubCall.addArgument(TrustedImmPtr(currentInstruction[3].u.objectAllocationProfile->structure())); 232 stubCall.call(currentInstruction[1].u.operand); 230 int dst = currentInstruction[1].u.operand; 231 Structure* structure = currentInstruction[3].u.objectAllocationProfile->structure(); 232 callOperation(operationNewObject, structure); 233 emitStoreCell(dst, returnValueRegister); 233 234 } 234 235 -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r157266 r157313 28 28 #include "JITOperations.h" 29 29 30 #include "ArrayConstructor.h" 30 31 #include "CommonSlowPaths.h" 31 32 #include "Error.h" … … 34 35 #include "JITOperationWrappers.h" 35 36 #include "JSGlobalObjectFunctions.h" 37 #include "ObjectConstructor.h" 36 38 #include "Operations.h" 37 39 #include "Repatch.h" … … 744 746 745 747 748 EncodedJSValue JIT_OPERATION operationNewArrayWithProfile(ExecState* exec, ArrayAllocationProfile* profile, const JSValue* values, int size) 749 { 750 VM* vm = &exec->vm(); 751 NativeCallFrameTracer tracer(vm, exec); 752 return JSValue::encode(constructArrayNegativeIndexed(exec, profile, values, size)); 753 } 754 755 EncodedJSValue JIT_OPERATION operationNewArrayBufferWithProfile(ExecState* exec, ArrayAllocationProfile* profile, const JSValue* values, int size) 756 { 757 VM* vm = &exec->vm(); 758 NativeCallFrameTracer tracer(vm, exec); 759 return JSValue::encode(constructArray(exec, profile, values, size)); 760 } 761 762 EncodedJSValue JIT_OPERATION operationNewArrayWithSizeAndProfile(ExecState* exec, ArrayAllocationProfile* profile, EncodedJSValue size) 763 { 764 VM* vm = &exec->vm(); 765 NativeCallFrameTracer tracer(vm, exec); 766 JSValue sizeValue = JSValue::decode(size); 767 return JSValue::encode(constructArrayWithSizeQuirk(exec, profile, exec->lexicalGlobalObject(), sizeValue)); 768 } 769 770 EncodedJSValue JIT_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable) 771 { 772 ASSERT(functionExecutable->inherits(FunctionExecutable::info())); 773 VM& vm = exec->vm(); 774 NativeCallFrameTracer tracer(&vm, exec); 775 return JSValue::encode(JSFunction::create(vm, static_cast<FunctionExecutable*>(functionExecutable), exec->scope())); 776 } 777 778 JSCell* JIT_OPERATION operationNewObject(ExecState* exec, Structure* structure) 779 { 780 VM* vm = &exec->vm(); 781 NativeCallFrameTracer tracer(vm, exec); 782 783 return constructEmptyObject(exec, structure); 784 } 785 746 786 EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr) 747 787 { -
trunk/Source/JavaScriptCore/jit/JITOperations.h
r157266 r157313 47 47 /* 48 48 Key: 49 V: void 50 J: JSValue 51 P: pointer (void*) 49 A: JSArray* 50 Aap: ArrayAllocationProfile* 52 51 C: JSCell* 53 52 Cb: CodeBlock* 54 A: JSArray* 53 D: double 54 E: ExecState* 55 I: StringImpl* 56 Icf: InlineCalLFrame* 57 J: EncodedJSValue 58 Jcp: const JSValue* 59 Jss: JSString* 60 O: JSObject* 61 P: pointer (void*) 55 62 R: Register 56 63 S: size_t 64 St: Structure* 65 V: void 66 W: WatchpointSet* 57 67 Z: int32_t 58 D: double59 I: StringImpl*60 68 */ 61 69 typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_E)(ExecState*); … … 75 83 typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJP)(ExecState*, EncodedJSValue, void*); 76 84 typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EP)(ExecState*, void*); 85 typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EAapJ)(ExecState*, ArrayAllocationProfile*, EncodedJSValue); 86 typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EAapJcpZ)(ExecState*, ArrayAllocationProfile*, const JSValue*, int32_t); 77 87 typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EPP)(ExecState*, void*, void*); 78 88 typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EPS)(ExecState*, void*, size_t); … … 220 230 #endif 221 231 size_t JIT_OPERATION operationHasProperty(ExecState*, JSObject*, JSString*) WTF_INTERNAL; 232 EncodedJSValue JIT_OPERATION operationNewArrayWithProfile(ExecState*, ArrayAllocationProfile*, const JSValue* values, int32_t size) WTF_INTERNAL; 233 EncodedJSValue JIT_OPERATION operationNewArrayBufferWithProfile(ExecState*, ArrayAllocationProfile*, const JSValue* values, int32_t size) WTF_INTERNAL; 234 EncodedJSValue JIT_OPERATION operationNewArrayWithSizeAndProfile(ExecState*, ArrayAllocationProfile*, EncodedJSValue size) WTF_INTERNAL; 235 EncodedJSValue JIT_OPERATION operationNewFunction(ExecState*, JSCell*) WTF_INTERNAL; 236 JSCell* JIT_OPERATION operationNewObject(ExecState*, Structure*) WTF_INTERNAL; 222 237 EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState*, void*) WTF_INTERNAL; 223 238 -
trunk/Source/JavaScriptCore/jit/JITStubs.cpp
r157266 r157313 437 437 } 438 438 439 DEFINE_STUB_FUNCTION(JSObject*, op_new_object)440 {441 STUB_INIT_STACK_FRAME(stackFrame);442 443 return constructEmptyObject(stackFrame.callFrame, stackFrame.args[0].structure());444 }445 446 439 DEFINE_STUB_FUNCTION(void, op_put_by_id_generic) 447 440 { … … 1140 1133 } 1141 1134 1142 DEFINE_STUB_FUNCTION(JSObject*, op_new_func)1143 {1144 STUB_INIT_STACK_FRAME(stackFrame);1145 1146 ASSERT(stackFrame.callFrame->codeBlock()->codeType() != FunctionCode || !stackFrame.callFrame->codeBlock()->needsFullScopeChain() || stackFrame.callFrame->uncheckedR(stackFrame.callFrame->codeBlock()->activationRegister().offset()).jsValue());1147 return JSFunction::create(stackFrame.callFrame->vm(), stackFrame.args[0].function(), stackFrame.callFrame->scope());1148 }1149 1150 1135 DEFINE_STUB_FUNCTION(JSObject*, op_push_activation) 1151 1136 { … … 1201 1186 if (LegacyProfiler* profiler = stackFrame.vm->enabledProfiler()) 1202 1187 profiler->didExecute(stackFrame.callFrame, stackFrame.args[0].jsValue()); 1203 }1204 1205 DEFINE_STUB_FUNCTION(JSObject*, op_new_array)1206 {1207 STUB_INIT_STACK_FRAME(stackFrame);1208 1209 return constructArrayNegativeIndexed(stackFrame.callFrame, stackFrame.args[2].arrayAllocationProfile(), reinterpret_cast<JSValue*>(&stackFrame.callFrame->registers()[stackFrame.args[0].int32()]), stackFrame.args[1].int32());1210 }1211 1212 DEFINE_STUB_FUNCTION(JSObject*, op_new_array_with_size)1213 {1214 STUB_INIT_STACK_FRAME(stackFrame);1215 1216 return constructArrayWithSizeQuirk(stackFrame.callFrame, stackFrame.args[1].arrayAllocationProfile(), stackFrame.callFrame->lexicalGlobalObject(), stackFrame.args[0].jsValue());1217 }1218 1219 DEFINE_STUB_FUNCTION(JSObject*, op_new_array_buffer)1220 {1221 STUB_INIT_STACK_FRAME(stackFrame);1222 1223 return constructArray(stackFrame.callFrame, stackFrame.args[2].arrayAllocationProfile(), stackFrame.callFrame->codeBlock()->constantBuffer(stackFrame.args[0].int32()), stackFrame.args[1].int32());1224 1188 } 1225 1189 … … 1445 1409 } 1446 1410 1447 DEFINE_STUB_FUNCTION(JSObject*, op_new_func_exp)1448 {1449 STUB_INIT_STACK_FRAME(stackFrame);1450 CallFrame* callFrame = stackFrame.callFrame;1451 1452 FunctionExecutable* function = stackFrame.args[0].function();1453 JSFunction* func = JSFunction::create(callFrame->vm(), function, callFrame->scope());1454 ASSERT(callFrame->codeBlock()->codeType() != FunctionCode || !callFrame->codeBlock()->needsFullScopeChain() || callFrame->uncheckedR(callFrame->codeBlock()->activationRegister().offset()).jsValue());1455 1456 return func;1457 }1458 1459 1411 DEFINE_STUB_FUNCTION(void*, op_throw) 1460 1412 { -
trunk/Source/JavaScriptCore/jit/JITStubs.h
r157266 r157313 349 349 EncodedJSValue JIT_STUB cti_op_instanceof(STUB_ARGS_DECLARATION) WTF_INTERNAL; 350 350 EncodedJSValue JIT_STUB cti_to_object(STUB_ARGS_DECLARATION) WTF_INTERNAL; 351 JSObject* JIT_STUB cti_op_new_array(STUB_ARGS_DECLARATION) WTF_INTERNAL;352 JSObject* JIT_STUB cti_op_new_array_with_size(STUB_ARGS_DECLARATION) WTF_INTERNAL;353 JSObject* JIT_STUB cti_op_new_array_buffer(STUB_ARGS_DECLARATION) WTF_INTERNAL;354 JSObject* JIT_STUB cti_op_new_func(STUB_ARGS_DECLARATION) WTF_INTERNAL;355 JSObject* JIT_STUB cti_op_new_func_exp(STUB_ARGS_DECLARATION) WTF_INTERNAL;356 JSObject* JIT_STUB cti_op_new_object(STUB_ARGS_DECLARATION) WTF_INTERNAL;357 351 JSObject* JIT_STUB cti_op_push_activation(STUB_ARGS_DECLARATION) WTF_INTERNAL; 358 352 void JIT_STUB cti_op_push_name_scope(STUB_ARGS_DECLARATION) WTF_INTERNAL; -
trunk/Source/JavaScriptCore/jit/JSInterfaceJIT.h
r156934 r157313 63 63 #if CPU(X86_64) 64 64 static const RegisterID returnValueRegister = X86Registers::eax; 65 static const RegisterID returnValue2Register = X86Registers::edx;66 65 static const RegisterID cachedResultRegister = X86Registers::eax; 67 66 #if !OS(WINDOWS)
Note: See TracChangeset
for help on using the changeset viewer.