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

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

Issue 16134003: Support Smi in CompareIDAndBranch (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 6 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/x64/lithium-codegen-x64.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 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 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1590 LOperand* left = UseFixed(instr->left(), rdx); 1590 LOperand* left = UseFixed(instr->left(), rdx);
1591 LOperand* right = UseFixed(instr->right(), rax); 1591 LOperand* right = UseFixed(instr->right(), rax);
1592 LCmpT* result = new(zone()) LCmpT(left, right); 1592 LCmpT* result = new(zone()) LCmpT(left, right);
1593 return MarkAsCall(DefineFixed(result, rax), instr); 1593 return MarkAsCall(DefineFixed(result, rax), instr);
1594 } 1594 }
1595 1595
1596 1596
1597 LInstruction* LChunkBuilder::DoCompareIDAndBranch( 1597 LInstruction* LChunkBuilder::DoCompareIDAndBranch(
1598 HCompareIDAndBranch* instr) { 1598 HCompareIDAndBranch* instr) {
1599 Representation r = instr->representation(); 1599 Representation r = instr->representation();
1600 if (r.IsInteger32()) { 1600 if (r.IsSmiOrInteger32()) {
1601 ASSERT(instr->left()->representation().IsInteger32()); 1601 ASSERT(instr->left()->representation().IsSmiOrInteger32());
1602 ASSERT(instr->right()->representation().IsInteger32()); 1602 ASSERT(instr->left()->representation().Equals(
1603 instr->right()->representation()));
1603 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1604 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1604 LOperand* right = UseOrConstantAtStart(instr->right()); 1605 LOperand* right = UseOrConstantAtStart(instr->right());
1605 return new(zone()) LCmpIDAndBranch(left, right); 1606 return new(zone()) LCmpIDAndBranch(left, right);
1606 } else { 1607 } else {
1607 ASSERT(r.IsDouble()); 1608 ASSERT(r.IsDouble());
1608 ASSERT(instr->left()->representation().IsDouble()); 1609 ASSERT(instr->left()->representation().IsDouble());
1609 ASSERT(instr->right()->representation().IsDouble()); 1610 ASSERT(instr->right()->representation().IsDouble());
1610 LOperand* left; 1611 LOperand* left;
1611 LOperand* right; 1612 LOperand* right;
1612 if (instr->left()->IsConstant() && instr->right()->IsConstant()) { 1613 if (instr->left()->IsConstant() && instr->right()->IsConstant()) {
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2566 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2566 LOperand* object = UseRegister(instr->object()); 2567 LOperand* object = UseRegister(instr->object());
2567 LOperand* index = UseTempRegister(instr->index()); 2568 LOperand* index = UseTempRegister(instr->index());
2568 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2569 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2569 } 2570 }
2570 2571
2571 2572
2572 } } // namespace v8::internal 2573 } } // namespace v8::internal
2573 2574
2574 #endif // V8_TARGET_ARCH_X64 2575 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698