Changeset 43331 in webkit for trunk/JavaScriptCore/jit
- Timestamp:
- May 6, 2009, 5:06:07 PM (16 years ago)
- Location:
- trunk/JavaScriptCore/jit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r43276 r43331 464 464 NEXT_OPCODE(op_construct_verify); 465 465 } 466 case op_to_primitive: { 467 int dst = currentInstruction[1].u.operand; 468 int src = currentInstruction[2].u.operand; 469 470 emitGetVirtualRegister(src, regT0); 471 472 Jump isImm = emitJumpIfNotJSCell(regT0); 473 addSlowCase(branchPtr(NotEqual, Address(regT0), ImmPtr(m_globalData->jsStringVPtr))); 474 isImm.link(this); 475 476 if (dst != src) 477 emitPutVirtualRegister(dst); 478 479 NEXT_OPCODE(op_to_primitive); 480 } 481 case op_strcat: { 482 emitPutJITStubArgConstant(currentInstruction[2].u.operand, 1); 483 emitPutJITStubArgConstant(currentInstruction[3].u.operand, 2); 484 emitCTICall(JITStubs::cti_op_strcat); 485 emitPutVirtualRegister(currentInstruction[1].u.operand); 486 487 NEXT_OPCODE(op_strcat); 488 } 466 489 case op_get_by_val: { 467 490 emitGetVirtualRegisters(currentInstruction[2].u.operand, regT0, currentInstruction[3].u.operand, regT1); … … 1167 1190 NEXT_OPCODE(op_construct_verify); 1168 1191 } 1192 case op_to_primitive: { 1193 linkSlowCase(iter); 1194 1195 emitPutJITStubArg(regT0, 1); 1196 emitCTICall(JITStubs::cti_op_to_primitive); 1197 emitPutVirtualRegister(currentInstruction[1].u.operand); 1198 1199 NEXT_OPCODE(op_to_primitive); 1200 } 1169 1201 case op_get_by_val: { 1170 1202 // The slow case that handles accesses to arrays (below) may jump back up to here. -
trunk/JavaScriptCore/jit/JITStubs.cpp
r43273 r43331 2196 2196 } 2197 2197 2198 EncodedJSValue JITStubs::cti_op_to_primitive(STUB_ARGS) 2199 { 2200 BEGIN_STUB_FUNCTION(); 2201 2202 return JSValue::encode(ARG_src1.toPrimitive(ARG_callFrame)); 2203 } 2204 2205 EncodedJSValue JITStubs::cti_op_strcat(STUB_ARGS) 2206 { 2207 BEGIN_STUB_FUNCTION(); 2208 2209 return JSValue::encode(concatenateStrings(ARG_callFrame, &ARG_callFrame->registers()[ARG_int1], ARG_int2)); 2210 } 2211 2198 2212 EncodedJSValue JITStubs::cti_op_nstricteq(STUB_ARGS) 2199 2213 { -
trunk/JavaScriptCore/jit/JITStubs.h
r43273 r43331 212 212 static EncodedJSValue JIT_STUB cti_op_rshift(STUB_ARGS); 213 213 static EncodedJSValue JIT_STUB cti_op_stricteq(STUB_ARGS); 214 static EncodedJSValue JIT_STUB cti_op_strcat(STUB_ARGS); 215 static EncodedJSValue JIT_STUB cti_op_to_primitive(STUB_ARGS); 214 216 static EncodedJSValue JIT_STUB cti_op_sub(STUB_ARGS); 215 217 static EncodedJSValue JIT_STUB cti_op_throw(STUB_ARGS);
Note:
See TracChangeset
for help on using the changeset viewer.