| OLD | NEW |
| 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 ASSERT(instr->representation().IsTagged()); | 1176 ASSERT(instr->representation().IsTagged()); |
| 1177 return DoArithmeticT(Token::SUB, instr); | 1177 return DoArithmeticT(Token::SUB, instr); |
| 1178 } | 1178 } |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 | 1181 |
| 1182 LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { | 1182 LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { |
| 1183 if (instr->representation().IsInteger32()) { | 1183 if (instr->representation().IsInteger32()) { |
| 1184 ASSERT(instr->left()->representation().IsInteger32()); | 1184 ASSERT(instr->left()->representation().IsInteger32()); |
| 1185 ASSERT(instr->right()->representation().IsInteger32()); | 1185 ASSERT(instr->right()->representation().IsInteger32()); |
| 1186 LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand()); | 1186 LOperand* left = UseRegisterAtStart(instr->left()->IsConstant() |
| 1187 LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand()); | 1187 ? instr->right() |
| 1188 : instr->left()); |
| 1189 LOperand* right = UseOrConstantAtStart(instr->left()->IsConstant() |
| 1190 ? instr->left() |
| 1191 : instr->right()); |
| 1188 LAddI* add = new LAddI(left, right); | 1192 LAddI* add = new LAddI(left, right); |
| 1189 LInstruction* result = DefineSameAsFirst(add); | 1193 LInstruction* result = DefineSameAsFirst(add); |
| 1190 if (instr->CheckFlag(HValue::kCanOverflow)) { | 1194 if (instr->CheckFlag(HValue::kCanOverflow)) { |
| 1191 result = AssignEnvironment(result); | 1195 result = AssignEnvironment(result); |
| 1192 } | 1196 } |
| 1193 return result; | 1197 return result; |
| 1194 } else if (instr->representation().IsDouble()) { | 1198 } else if (instr->representation().IsDouble()) { |
| 1195 Abort("Unimplemented: %s", "DoAdd on Doubles"); | 1199 Abort("Unimplemented: %s", "DoAdd on Doubles"); |
| 1196 } else { | 1200 } else { |
| 1197 ASSERT(instr->representation().IsTagged()); | 1201 ASSERT(instr->representation().IsTagged()); |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 | 1653 |
| 1650 | 1654 |
| 1651 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1655 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 1652 Abort("Unimplemented: %s", "DoLeaveInlined"); | 1656 Abort("Unimplemented: %s", "DoLeaveInlined"); |
| 1653 return NULL; | 1657 return NULL; |
| 1654 } | 1658 } |
| 1655 | 1659 |
| 1656 } } // namespace v8::internal | 1660 } } // namespace v8::internal |
| 1657 | 1661 |
| 1658 #endif // V8_TARGET_ARCH_X64 | 1662 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |