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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 6364007: ARM: Implement DoInstanceOfAndBranch in the lithium code generator (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add fixed input register allocation. Created 9 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 1997 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
1998 1998
1999 Label true_value, done; 1999 Label true_value, done;
2000 __ tst(r0, r0); 2000 __ tst(r0, r0);
2001 __ mov(r0, Operand(Factory::false_value()), LeaveCC, ne); 2001 __ mov(r0, Operand(Factory::false_value()), LeaveCC, ne);
2002 __ mov(r0, Operand(Factory::true_value()), LeaveCC, eq); 2002 __ mov(r0, Operand(Factory::true_value()), LeaveCC, eq);
2003 } 2003 }
2004 2004
2005 2005
2006 void LCodeGen::DoInstanceOfAndBranch(LInstanceOfAndBranch* instr) { 2006 void LCodeGen::DoInstanceOfAndBranch(LInstanceOfAndBranch* instr) {
2007 Abort("DoInstanceOfAndBranch unimplemented."); 2007 ASSERT(ToRegister(instr->InputAt(0)).is(r0)); // Object is in r0.
2008 ASSERT(ToRegister(instr->InputAt(1)).is(r1)); // Function is in r1.
2009
2010 int true_block = chunk_->LookupDestination(instr->true_block_id());
2011 int false_block = chunk_->LookupDestination(instr->false_block_id());
2012
2013 InstanceofStub stub(InstanceofStub::kArgsInRegisters);
2014 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2015 __ tst(r0, Operand(r0));
2016 EmitBranch(true_block, false_block, eq);
2008 } 2017 }
2009 2018
2010 2019
2011 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { 2020 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
2012 class DeferredInstanceOfKnownGlobal: public LDeferredCode { 2021 class DeferredInstanceOfKnownGlobal: public LDeferredCode {
2013 public: 2022 public:
2014 DeferredInstanceOfKnownGlobal(LCodeGen* codegen, 2023 DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
2015 LInstanceOfKnownGlobal* instr) 2024 LInstanceOfKnownGlobal* instr)
2016 : LDeferredCode(codegen), instr_(instr) { } 2025 : LDeferredCode(codegen), instr_(instr) { }
2017 virtual void Generate() { 2026 virtual void Generate() {
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
3674 3683
3675 3684
3676 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 3685 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
3677 Abort("DoOsrEntry unimplemented."); 3686 Abort("DoOsrEntry unimplemented.");
3678 } 3687 }
3679 3688
3680 3689
3681 #undef __ 3690 #undef __
3682 3691
3683 } } // namespace v8::internal 3692 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698