Chromium Code Reviews

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 16134003: Support Smi in CompareIDAndBranch (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1671 matching lines...)
1682 LOperand* left = UseFixed(instr->left(), edx); 1682 LOperand* left = UseFixed(instr->left(), edx);
1683 LOperand* right = UseFixed(instr->right(), eax); 1683 LOperand* right = UseFixed(instr->right(), eax);
1684 LCmpT* result = new(zone()) LCmpT(context, left, right); 1684 LCmpT* result = new(zone()) LCmpT(context, left, right);
1685 return MarkAsCall(DefineFixed(result, eax), instr); 1685 return MarkAsCall(DefineFixed(result, eax), instr);
1686 } 1686 }
1687 1687
1688 1688
1689 LInstruction* LChunkBuilder::DoCompareIDAndBranch( 1689 LInstruction* LChunkBuilder::DoCompareIDAndBranch(
1690 HCompareIDAndBranch* instr) { 1690 HCompareIDAndBranch* instr) {
1691 Representation r = instr->representation(); 1691 Representation r = instr->representation();
1692 if (r.IsInteger32()) { 1692 if (r.IsSmiOrInteger32()) {
1693 ASSERT(instr->left()->representation().IsInteger32()); 1693 ASSERT(instr->left()->representation().IsSmiOrInteger32());
1694 ASSERT(instr->right()->representation().IsInteger32()); 1694 ASSERT(instr->right()->representation().IsSmiOrInteger32());
Jakob Kummerow 2013/05/28 09:00:54 I think ASSERT(instr->right()->representation().Eq
1695 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1695 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1696 LOperand* right = UseOrConstantAtStart(instr->right()); 1696 LOperand* right = UseOrConstantAtStart(instr->right());
1697 return new(zone()) LCmpIDAndBranch(left, right); 1697 return new(zone()) LCmpIDAndBranch(left, right);
1698 } else { 1698 } else {
1699 ASSERT(r.IsDouble()); 1699 ASSERT(r.IsDouble());
1700 ASSERT(instr->left()->representation().IsDouble()); 1700 ASSERT(instr->left()->representation().IsDouble());
1701 ASSERT(instr->right()->representation().IsDouble()); 1701 ASSERT(instr->right()->representation().IsDouble());
1702 LOperand* left; 1702 LOperand* left;
1703 LOperand* right; 1703 LOperand* right;
1704 if (instr->left()->IsConstant() && instr->right()->IsConstant()) { 1704 if (instr->left()->IsConstant() && instr->right()->IsConstant()) {
(...skipping 1068 matching lines...)
2773 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2773 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2774 LOperand* object = UseRegister(instr->object()); 2774 LOperand* object = UseRegister(instr->object());
2775 LOperand* index = UseTempRegister(instr->index()); 2775 LOperand* index = UseTempRegister(instr->index());
2776 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2776 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2777 } 2777 }
2778 2778
2779 2779
2780 } } // namespace v8::internal 2780 } } // namespace v8::internal
2781 2781
2782 #endif // V8_TARGET_ARCH_IA32 2782 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine