ARM: Implement DoInstanceOfAndBranch in the lithium code generator.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6364007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
4c6329c8f8
commit
592089419d
@ -1028,8 +1028,8 @@ LInstruction* LChunkBuilder::DoTest(HTest* instr) {
|
||||
} else if (v->IsInstanceOf()) {
|
||||
HInstanceOf* instance_of = HInstanceOf::cast(v);
|
||||
LInstruction* result =
|
||||
new LInstanceOfAndBranch(Use(instance_of->left()),
|
||||
Use(instance_of->right()));
|
||||
new LInstanceOfAndBranch(UseFixed(instance_of->left(), r0),
|
||||
UseFixed(instance_of->right(), r1));
|
||||
return MarkAsCall(result, instr);
|
||||
} else if (v->IsTypeofIs()) {
|
||||
HTypeofIs* typeof_is = HTypeofIs::cast(v);
|
||||
|
@ -1991,7 +1991,16 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
|
||||
|
||||
|
||||
void LCodeGen::DoInstanceOfAndBranch(LInstanceOfAndBranch* instr) {
|
||||
Abort("DoInstanceOfAndBranch unimplemented.");
|
||||
ASSERT(ToRegister(instr->InputAt(0)).is(r0)); // Object is in r0.
|
||||
ASSERT(ToRegister(instr->InputAt(1)).is(r1)); // Function is in r1.
|
||||
|
||||
int true_block = chunk_->LookupDestination(instr->true_block_id());
|
||||
int false_block = chunk_->LookupDestination(instr->false_block_id());
|
||||
|
||||
InstanceofStub stub(InstanceofStub::kArgsInRegisters);
|
||||
CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
|
||||
__ tst(r0, Operand(r0));
|
||||
EmitBranch(true_block, false_block, eq);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user