Changeset 178143 in webkit for trunk/Source/JavaScriptCore/jit
- Timestamp:
- Jan 8, 2015, 4:10:01 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore/jit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JIT.h
r177146 r178143 682 682 MacroAssembler::Call callOperation(C_JITOperation_E); 683 683 MacroAssembler::Call callOperation(C_JITOperation_EO, GPRReg); 684 MacroAssembler::Call callOperation(C_JITOperation_EL, GPRReg); 685 MacroAssembler::Call callOperation(C_JITOperation_EL, TrustedImmPtr); 684 686 MacroAssembler::Call callOperation(C_JITOperation_ESt, Structure*); 685 687 MacroAssembler::Call callOperation(C_JITOperation_EZ, int32_t); -
trunk/Source/JavaScriptCore/jit/JITInlines.h
r177146 r178143 217 217 } 218 218 219 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(C_JITOperation_EL operation, GPRReg arg1) 220 { 221 setupArgumentsWithExecState(arg1); 222 return appendCallWithExceptionCheck(operation); 223 } 224 225 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(C_JITOperation_EL operation, TrustedImmPtr arg1) 226 { 227 setupArgumentsWithExecState(arg1); 228 return appendCallWithExceptionCheck(operation); 229 } 230 219 231 ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(C_JITOperation_EO operation, GPRReg arg) 220 232 { -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r177871 r178143 690 690 { 691 691 int dst = currentInstruction[1].u.operand; 692 int lexicalEnvironment = currentInstruction[2].u.operand; 692 693 693 694 Jump argsCreated = branchTest64(NonZero, Address(callFrameRegister, sizeof(Register) * dst)); 694 695 695 callOperation(operationCreateArguments); 696 if (VirtualRegister(lexicalEnvironment).isValid()) { 697 emitGetVirtualRegister(lexicalEnvironment, regT0); 698 callOperation(operationCreateArguments, regT0); 699 } else 700 callOperation(operationCreateArguments, TrustedImmPtr(nullptr)); 696 701 emitStoreCell(dst, returnValueGPR); 697 702 emitStoreCell(unmodifiedArgumentsRegister(VirtualRegister(dst)), returnValueGPR); … … 957 962 int arguments = currentInstruction[2].u.operand; 958 963 int property = currentInstruction[3].u.operand; 964 int lexicalEnvironment = currentInstruction[4].u.operand; 959 965 960 966 linkSlowCase(iter); … … 963 969 linkSlowCase(iter); 964 970 linkSlowCase(iter); 965 callOperation(operationCreateArguments); 971 if (VirtualRegister(lexicalEnvironment).isValid()) { 972 emitGetVirtualRegister(lexicalEnvironment, regT0); 973 callOperation(operationCreateArguments, regT0); 974 } else 975 callOperation(operationCreateArguments, TrustedImmPtr(nullptr)); 966 976 emitStoreCell(arguments, returnValueGPR); 967 977 emitStoreCell(unmodifiedArgumentsRegister(VirtualRegister(arguments)), returnValueGPR); -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r177146 r178143 919 919 { 920 920 int dst = currentInstruction[1].u.operand; 921 int lexicalEnvironment = currentInstruction[2].u.operand; 921 922 922 923 Jump argsCreated = branch32(NotEqual, tagFor(dst), TrustedImm32(JSValue::EmptyValueTag)); 923 callOperation(operationCreateArguments); 924 925 if (VirtualRegister(lexicalEnvironment).isValid()) { 926 emitLoadPayload(lexicalEnvironment, regT0); 927 callOperation(operationCreateArguments, regT0); 928 } else 929 callOperation(operationCreateArguments, TrustedImmPtr(nullptr)); 924 930 emitStoreCell(dst, returnValueGPR); 925 931 emitStoreCell(unmodifiedArgumentsRegister(VirtualRegister(dst)).offset(), returnValueGPR); 932 926 933 argsCreated.link(this); 927 934 } … … 1065 1072 int arguments = currentInstruction[2].u.operand; 1066 1073 int property = currentInstruction[3].u.operand; 1074 int lexicalEnvironment = currentInstruction[4].u.operand; 1067 1075 1068 1076 linkSlowCase(iter); … … 1072 1080 linkSlowCase(iter); 1073 1081 1074 callOperation(operationCreateArguments); 1082 if (VirtualRegister(lexicalEnvironment).isValid()) { 1083 emitLoadPayload(lexicalEnvironment, regT0); 1084 callOperation(operationCreateArguments, regT0); 1085 } else 1086 callOperation(operationCreateArguments, TrustedImmPtr(nullptr)); 1075 1087 emitStoreCell(arguments, returnValueGPR); 1076 1088 emitStoreCell(unmodifiedArgumentsRegister(VirtualRegister(arguments)).offset(), returnValueGPR); -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r177675 r178143 1403 1403 } 1404 1404 1405 JSCell* JIT_OPERATION operationCreateArguments(ExecState* exec) 1405 // FIXME: This is a temporary thunk for the DFG until we add the lexicalEnvironment operand to the DFG CreateArguments node. 1406 JSCell* JIT_OPERATION operationCreateArgumentsForDFG(ExecState* exec) 1407 { 1408 JSLexicalEnvironment* lexicalEnvironment = exec->lexicalEnvironmentOrNullptr(); 1409 return operationCreateArguments(exec, lexicalEnvironment); 1410 } 1411 1412 JSCell* JIT_OPERATION operationCreateArguments(ExecState* exec, JSLexicalEnvironment* lexicalEnvironment) 1406 1413 { 1407 1414 VM& vm = exec->vm(); … … 1409 1416 // NB: This needs to be exceedingly careful with top call frame tracking, since it 1410 1417 // may be called from OSR exit, while the state of the call stack is bizarre. 1411 Arguments* result = Arguments::create(vm, exec );1418 Arguments* result = Arguments::create(vm, exec, lexicalEnvironment); 1412 1419 ASSERT(!vm.exception()); 1413 1420 return result; … … 1417 1424 { 1418 1425 DeferGCForAWhile(exec->vm().heap); 1419 return operationCreateArguments(exec); 1426 JSLexicalEnvironment* lexicalEnvironment = exec->lexicalEnvironmentOrNullptr(); 1427 return operationCreateArguments(exec, lexicalEnvironment); 1420 1428 } 1421 1429 -
trunk/Source/JavaScriptCore/jit/JITOperations.h
r177146 r178143 72 72 Jsc: JSScope* 73 73 Jss: JSString* 74 L: JSLexicalEnvironment* 74 75 O: JSObject* 75 76 P: pointer (char*) … … 137 138 typedef JSCell* JIT_OPERATION (*C_JITOperation_EJssJss)(ExecState*, JSString*, JSString*); 138 139 typedef JSCell* JIT_OPERATION (*C_JITOperation_EJssJssJss)(ExecState*, JSString*, JSString*, JSString*); 140 typedef JSCell* JIT_OPERATION (*C_JITOperation_EL)(ExecState*, JSLexicalEnvironment*); 139 141 typedef JSCell* JIT_OPERATION (*C_JITOperation_EO)(ExecState*, JSObject*); 140 142 typedef JSCell* JIT_OPERATION (*C_JITOperation_EOZ)(ExecState*, JSObject*, int32_t); … … 295 297 EncodedJSValue JIT_OPERATION operationCheckHasInstance(ExecState*, EncodedJSValue, EncodedJSValue baseVal) WTF_INTERNAL; 296 298 JSCell* JIT_OPERATION operationCreateActivation(ExecState*, JSScope* currentScope, int32_t offset) WTF_INTERNAL; 297 JSCell* JIT_OPERATION operationCreateArguments(ExecState*) WTF_INTERNAL; 299 JSCell* JIT_OPERATION operationCreateArgumentsForDFG(ExecState*) WTF_INTERNAL; // FIXME: This is a temporary thunk for the DFG until we add the lexicalEnvironment operand to the DFG CreateArguments node. 300 JSCell* JIT_OPERATION operationCreateArguments(ExecState*, JSLexicalEnvironment*) WTF_INTERNAL; 298 301 JSCell* JIT_OPERATION operationCreateArgumentsDuringOSRExit(ExecState*) WTF_INTERNAL; 299 302 EncodedJSValue JIT_OPERATION operationGetArgumentsLength(ExecState*, int32_t) WTF_INTERNAL;
Note:
See TracChangeset
for help on using the changeset viewer.