Changeset 41275 in webkit for trunk/JavaScriptCore/jit/JIT.cpp
- Timestamp:
- Feb 26, 2009, 5:09:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/jit/JIT.cpp
r41168 r41275 236 236 emitGetVirtualRegisters(src1, regT0, src2, regT1); 237 237 238 #if USE(ALTERNATE_JSIMMEDIATE)239 238 // Jump to a slow case if either operand is a number, or if both are JSCell*s. 240 239 move(regT0, regT2); … … 248 247 set32(NotEqual, regT1, regT0, regT0); 249 248 emitTagAsBoolImmediate(regT0); 250 #else251 bool negated = (type == OpNStrictEq);252 253 // Check that both are immediates, if so check if they're equal254 Jump firstNotImmediate = emitJumpIfJSCell(regT0);255 Jump secondNotImmediate = emitJumpIfJSCell(regT1);256 Jump bothWereImmediatesButNotEqual = branchPtr(NotEqual, regT1, regT0);257 258 // They are equal - set the result to true. (Or false, if negated).259 move(ImmPtr(JSValuePtr::encode(jsBoolean(!negated))), regT0);260 Jump bothWereImmediatesAndEqual = jump();261 262 // eax was not an immediate, we haven't yet checked edx.263 // If edx is also a JSCell, or is 0, then jump to a slow case,264 // otherwise these values are not equal.265 firstNotImmediate.link(this);266 emitJumpSlowCaseIfJSCell(regT1);267 addSlowCase(branchPtr(Equal, regT1, ImmPtr(JSValuePtr::encode(js0()))));268 Jump firstWasNotImmediate = jump();269 270 // eax was an immediate, but edx wasn't.271 // If eax is 0 jump to a slow case, otherwise these values are not equal.272 secondNotImmediate.link(this);273 addSlowCase(branchPtr(Equal, regT0, ImmPtr(JSValuePtr::encode(js0()))));274 275 // We get here if the two values are different immediates, or one is 0 and the other is a JSCell.276 // Vaelues are not equal, set the result to false.277 bothWereImmediatesButNotEqual.link(this);278 firstWasNotImmediate.link(this);279 move(ImmPtr(JSValuePtr::encode(jsBoolean(negated))), regT0);280 281 bothWereImmediatesAndEqual.link(this);282 #endif283 249 284 250 emitPutVirtualRegister(dst); … … 1546 1512 linkSlowCase(iter); 1547 1513 linkSlowCase(iter); 1548 #if !USE(ALTERNATE_JSIMMEDIATE)1549 linkSlowCase(iter);1550 #endif1551 1514 emitPutJITStubArg(regT0, 1); 1552 1515 emitPutJITStubArg(regT1, 2); … … 1558 1521 linkSlowCase(iter); 1559 1522 linkSlowCase(iter); 1560 #if !USE(ALTERNATE_JSIMMEDIATE)1561 linkSlowCase(iter);1562 #endif1563 1523 emitPutJITStubArg(regT0, 1); 1564 1524 emitPutJITStubArg(regT1, 2);
Note:
See TracChangeset
for help on using the changeset viewer.