Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: src/arm/lithium-codegen-arm.cc

Issue 5988003: Implement inlining of instanceof tests on ARM. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/arm/lithium-arm.cc ('K') | « src/arm/lithium-arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index 533d32c747427cb9ee3a9aad1d3fb54af98c3b62..2ef4501258fd473c643dd668eaf48168a2ac7d37 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -1337,7 +1337,18 @@ void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) {
void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
- Abort("DoInstanceOf unimplemented.");
+ // we expect object and function in registers r1 and r0.
Søren Thygesen Gjesse 2010/12/20 13:07:10 Please start comment with uppercase letter.
Karl Klose 2010/12/21 08:56:37 Done.
+ InstanceofStub stub(InstanceofStub::kArgsInRegisters);
+ CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
+
+ Label true_value, done;
+ __ tst(r0, r0);
Søren Thygesen Gjesse 2010/12/20 13:07:10 I think this can be done with conditional moves an
Karl Klose 2010/12/21 08:56:37 Done.
+ __ b(eq, &true_value);
+ __ mov(r0, Operand(Factory::false_value()));
+ __ b(&done);
+ __ bind(&true_value);
+ __ mov(r0, Operand(Factory::true_value()));
+ __ bind(&done);
}
« src/arm/lithium-arm.cc ('K') | « src/arm/lithium-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698