|
Lines 1426-1444
CodeGeneratorARM::visitUnbox(LUnbox* unb
|
Link Here
|
---|
|
1426 |
{ |
1426 |
{ |
1427 |
// Note that for unbox, the type and payload indexes are switched on the |
1427 |
// Note that for unbox, the type and payload indexes are switched on the |
1428 |
// inputs. |
1428 |
// inputs. |
1429 |
MUnbox* mir = unbox->mir(); |
1429 |
MUnbox* mir = unbox->mir(); |
1430 |
Register type = ToRegister(unbox->type()); |
1430 |
Register type = ToRegister(unbox->type()); |
1431 |
|
1431 |
|
1432 |
ScratchRegisterScope scratch(masm); |
1432 |
ScratchRegisterScope scratch(masm); |
1433 |
|
1433 |
|
|
|
1434 |
JSValueTag tag = MIRTypeToTag(mir->type()); |
1434 |
if (mir->fallible()) { |
1435 |
if (mir->fallible()) { |
1435 |
masm.ma_cmp(type, Imm32(MIRTypeToTag(mir->type())), scratch); |
1436 |
masm.ma_cmp(type, Imm32(tag), scratch); |
1436 |
bailoutIf(Assembler::NotEqual, unbox->snapshot()); |
1437 |
bailoutIf(Assembler::NotEqual, unbox->snapshot()); |
|
|
1438 |
} else { |
1439 |
#ifdef DEBUG |
1440 |
Label ok; |
1441 |
masm.branch32(Assembler::Equal, type, Imm32(tag), &ok); |
1442 |
masm.assumeUnreachable("Infallible unbox type mismatch"); |
1443 |
masm.bind(&ok); |
1444 |
#endif |
1437 |
} |
1445 |
} |
1438 |
} |
1446 |
} |
1439 |
|
1447 |
|
1440 |
void |
1448 |
void |
1441 |
CodeGeneratorARM::visitDouble(LDouble* ins) |
1449 |
CodeGeneratorARM::visitDouble(LDouble* ins) |
1442 |
{ |
1450 |
{ |
1443 |
const LDefinition* out = ins->getDef(0); |
1451 |
const LDefinition* out = ins->getDef(0); |
1444 |
masm.loadConstantDouble(ins->getDouble(), ToFloatRegister(out)); |
1452 |
masm.loadConstantDouble(ins->getDouble(), ToFloatRegister(out)); |