Changeset 193606 in webkit for trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
- Timestamp:
- Dec 6, 2015, 5:54:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r193584 r193606 668 668 emitStoreCell(dst, regT0); 669 669 } 670 671 void JIT::emit_op_load_arrowfunction_this(Instruction* currentInstruction) 672 { 673 int dst = currentInstruction[1].u.operand; 674 emitGetFromCallFrameHeaderPtr(JSStack::Callee, regT0); 675 loadPtr(Address(regT0, JSArrowFunction::offsetOfThisValue()), regT0); 676 emitStoreCell(dst, regT0); 677 } 670 678 671 679 void JIT::emit_op_to_this(Instruction* currentInstruction) … … 962 970 void JIT::emitNewFuncExprCommon(Instruction* currentInstruction) 963 971 { 972 OpcodeID opcodeID = m_vm->interpreter->getOpcodeID(currentInstruction->u.opcode); 973 bool isArrowFunction = opcodeID == op_new_arrow_func_exp; 974 964 975 Jump notUndefinedScope; 965 976 int dst = currentInstruction[1].u.operand; 966 977 #if USE(JSVALUE64) 967 978 emitGetVirtualRegister(currentInstruction[2].u.operand, regT0); 979 if (isArrowFunction) 980 emitGetVirtualRegister(currentInstruction[4].u.operand, regT1); 968 981 notUndefinedScope = branch64(NotEqual, regT0, TrustedImm64(JSValue::encode(jsUndefined()))); 969 982 store64(TrustedImm64(JSValue::encode(jsUndefined())), Address(callFrameRegister, sizeof(Register) * dst)); 970 983 #else 971 984 emitLoadPayload(currentInstruction[2].u.operand, regT0); 985 if (isArrowFunction) { 986 int value = currentInstruction[4].u.operand; 987 emitLoad(value, regT3, regT2); 988 } 972 989 notUndefinedScope = branch32(NotEqual, tagFor(currentInstruction[2].u.operand), TrustedImm32(JSValue::UndefinedTag)); 973 990 emitStore(dst, jsUndefined()); … … 977 994 978 995 FunctionExecutable* function = m_codeBlock->functionExpr(currentInstruction[3].u.operand); 979 OpcodeID opcodeID = m_vm->interpreter->getOpcodeID(currentInstruction->u.opcode); 980 981 if (opcodeID == op_new_func_exp || opcodeID == op_new_arrow_func_exp) 982 callOperation(operationNewFunction, dst, regT0, function); 996 if (isArrowFunction) 997 #if USE(JSVALUE64) 998 callOperation(operationNewArrowFunction, dst, regT0, function, regT1); 999 #else 1000 callOperation(operationNewArrowFunction, dst, regT0, function, regT3, regT2); 1001 #endif 983 1002 else { 984 ASSERT(opcodeID == op_new_generator_func_exp); 985 callOperation(operationNewGeneratorFunction, dst, regT0, function); 1003 if (opcodeID == op_new_func_exp) 1004 callOperation(operationNewFunction, dst, regT0, function); 1005 else { 1006 ASSERT(opcodeID == op_new_generator_func_exp); 1007 callOperation(operationNewGeneratorFunction, dst, regT0, function); 1008 } 986 1009 } 987 988 1010 done.link(this); 989 1011 }
Note:
See TracChangeset
for help on using the changeset viewer.