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

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

Issue 246133005: Optimize numeric comparison with known successors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 8 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/hydrogen-instructions.cc ('k') | src/mips/lithium-mips.cc » ('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 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 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1670 LOperand* context = UseFixed(instr->context(), esi); 1670 LOperand* context = UseFixed(instr->context(), esi);
1671 LOperand* left = UseFixed(instr->left(), edx); 1671 LOperand* left = UseFixed(instr->left(), edx);
1672 LOperand* right = UseFixed(instr->right(), eax); 1672 LOperand* right = UseFixed(instr->right(), eax);
1673 LCmpT* result = new(zone()) LCmpT(context, left, right); 1673 LCmpT* result = new(zone()) LCmpT(context, left, right);
1674 return MarkAsCall(DefineFixed(result, eax), instr); 1674 return MarkAsCall(DefineFixed(result, eax), instr);
1675 } 1675 }
1676 1676
1677 1677
1678 LInstruction* LChunkBuilder::DoCompareNumericAndBranch( 1678 LInstruction* LChunkBuilder::DoCompareNumericAndBranch(
1679 HCompareNumericAndBranch* instr) { 1679 HCompareNumericAndBranch* instr) {
1680 LInstruction* goto_instr = CheckElideControlInstruction(instr);
1681 if (goto_instr != NULL) return goto_instr;
1680 Representation r = instr->representation(); 1682 Representation r = instr->representation();
1681 if (r.IsSmiOrInteger32()) { 1683 if (r.IsSmiOrInteger32()) {
1682 ASSERT(instr->left()->representation().Equals(r)); 1684 ASSERT(instr->left()->representation().Equals(r));
1683 ASSERT(instr->right()->representation().Equals(r)); 1685 ASSERT(instr->right()->representation().Equals(r));
1684 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1686 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1685 LOperand* right = UseOrConstantAtStart(instr->right()); 1687 LOperand* right = UseOrConstantAtStart(instr->right());
1686 return new(zone()) LCompareNumericAndBranch(left, right); 1688 return new(zone()) LCompareNumericAndBranch(left, right);
1687 } else { 1689 } else {
1688 ASSERT(r.IsDouble()); 1690 ASSERT(r.IsDouble());
1689 ASSERT(instr->left()->representation().IsDouble()); 1691 ASSERT(instr->left()->representation().IsDouble());
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 LOperand* index = UseTempRegister(instr->index()); 2720 LOperand* index = UseTempRegister(instr->index());
2719 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2721 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2720 LInstruction* result = DefineSameAsFirst(load); 2722 LInstruction* result = DefineSameAsFirst(load);
2721 return AssignPointerMap(result); 2723 return AssignPointerMap(result);
2722 } 2724 }
2723 2725
2724 2726
2725 } } // namespace v8::internal 2727 } } // namespace v8::internal
2726 2728
2727 #endif // V8_TARGET_ARCH_IA32 2729 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698