| OLD | NEW |
| 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 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 } else { | 1428 } else { |
| 1429 return DoArithmeticT(Token::ADD, instr); | 1429 return DoArithmeticT(Token::ADD, instr); |
| 1430 } | 1430 } |
| 1431 return NULL; | 1431 return NULL; |
| 1432 } | 1432 } |
| 1433 | 1433 |
| 1434 | 1434 |
| 1435 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { | 1435 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { |
| 1436 LOperand* left = NULL; | 1436 LOperand* left = NULL; |
| 1437 LOperand* right = NULL; | 1437 LOperand* right = NULL; |
| 1438 if (instr->representation().IsSmiOrInteger32()) { | 1438 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 1439 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1439 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1440 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1440 if (instr->representation().IsSmi()) { |
| 1441 left = UseRegisterAtStart(instr->BetterLeftOperand()); |
| 1442 right = UseAtStart(instr->BetterRightOperand()); |
| 1443 } else if (instr->representation().IsInteger32()) { |
| 1441 left = UseRegisterAtStart(instr->BetterLeftOperand()); | 1444 left = UseRegisterAtStart(instr->BetterLeftOperand()); |
| 1442 right = UseOrConstantAtStart(instr->BetterRightOperand()); | 1445 right = UseOrConstantAtStart(instr->BetterRightOperand()); |
| 1443 } else { | 1446 } else { |
| 1444 ASSERT(instr->representation().IsDouble()); | 1447 ASSERT(instr->representation().IsDouble()); |
| 1445 ASSERT(instr->left()->representation().IsDouble()); | |
| 1446 ASSERT(instr->right()->representation().IsDouble()); | |
| 1447 left = UseRegisterAtStart(instr->left()); | 1448 left = UseRegisterAtStart(instr->left()); |
| 1448 right = UseRegisterAtStart(instr->right()); | 1449 right = UseRegisterAtStart(instr->right()); |
| 1449 } | 1450 } |
| 1450 LMathMinMax* minmax = new(zone()) LMathMinMax(left, right); | 1451 LMathMinMax* minmax = new(zone()) LMathMinMax(left, right); |
| 1451 return DefineSameAsFirst(minmax); | 1452 return DefineSameAsFirst(minmax); |
| 1452 } | 1453 } |
| 1453 | 1454 |
| 1454 | 1455 |
| 1455 LInstruction* LChunkBuilder::DoPower(HPower* instr) { | 1456 LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
| 1456 ASSERT(instr->representation().IsDouble()); | 1457 ASSERT(instr->representation().IsDouble()); |
| (...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2435 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2436 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2436 LOperand* object = UseRegister(instr->object()); | 2437 LOperand* object = UseRegister(instr->object()); |
| 2437 LOperand* index = UseTempRegister(instr->index()); | 2438 LOperand* index = UseTempRegister(instr->index()); |
| 2438 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2439 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2439 } | 2440 } |
| 2440 | 2441 |
| 2441 | 2442 |
| 2442 } } // namespace v8::internal | 2443 } } // namespace v8::internal |
| 2443 | 2444 |
| 2444 #endif // V8_TARGET_ARCH_X64 | 2445 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |