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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 7248063: Simplify UnaryOpStub a little bit. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 5 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/code-stubs-arm.h ('k') | src/ia32/code-stubs-ia32.h » ('j') | 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 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 GenerateHeapNumberStub(masm); 1724 GenerateHeapNumberStub(masm);
1725 break; 1725 break;
1726 case UnaryOpIC::GENERIC: 1726 case UnaryOpIC::GENERIC:
1727 GenerateGenericStub(masm); 1727 GenerateGenericStub(masm);
1728 break; 1728 break;
1729 } 1729 }
1730 } 1730 }
1731 1731
1732 1732
1733 void UnaryOpStub::GenerateTypeTransition(MacroAssembler* masm) { 1733 void UnaryOpStub::GenerateTypeTransition(MacroAssembler* masm) {
1734 // Prepare to push argument. 1734 __ mov(r3, Operand(r0)); // the operand
1735 __ mov(r3, Operand(r0)); 1735 __ mov(r2, Operand(Smi::FromInt(op_)));
1736 1736 __ mov(r1, Operand(Smi::FromInt(mode_)));
1737 // Push this stub's key. Although the operation and the type info are
1738 // encoded into the key, the encoding is opaque, so push them too.
1739 __ mov(r2, Operand(Smi::FromInt(MinorKey())));
1740 __ mov(r1, Operand(Smi::FromInt(op_)));
1741 __ mov(r0, Operand(Smi::FromInt(operand_type_))); 1737 __ mov(r0, Operand(Smi::FromInt(operand_type_)));
1742
1743 __ Push(r3, r2, r1, r0); 1738 __ Push(r3, r2, r1, r0);
1744 1739
1745 __ TailCallExternalReference( 1740 __ TailCallExternalReference(
1746 ExternalReference(IC_Utility(IC::kUnaryOp_Patch), 1741 ExternalReference(IC_Utility(IC::kUnaryOp_Patch), masm->isolate()), 4, 1);
1747 masm->isolate()),
1748 4,
1749 1);
1750 } 1742 }
1751 1743
1752 1744
1753 // TODO(svenpanne): Use virtual functions instead of switch. 1745 // TODO(svenpanne): Use virtual functions instead of switch.
1754 void UnaryOpStub::GenerateSmiStub(MacroAssembler* masm) { 1746 void UnaryOpStub::GenerateSmiStub(MacroAssembler* masm) {
1755 switch (op_) { 1747 switch (op_) {
1756 case Token::SUB: 1748 case Token::SUB:
1757 GenerateSmiStubSub(masm); 1749 GenerateSmiStubSub(masm);
1758 break; 1750 break;
1759 case Token::BIT_NOT: 1751 case Token::BIT_NOT:
(...skipping 4842 matching lines...) Expand 10 before | Expand all | Expand 10 after
6602 __ mov(result, Operand(0)); 6594 __ mov(result, Operand(0));
6603 __ Ret(); 6595 __ Ret();
6604 } 6596 }
6605 6597
6606 6598
6607 #undef __ 6599 #undef __
6608 6600
6609 } } // namespace v8::internal 6601 } } // namespace v8::internal
6610 6602
6611 #endif // V8_TARGET_ARCH_ARM 6603 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/ia32/code-stubs-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698