| 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 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 | 1467 |
| 1468 LInstruction* LChunkBuilder::DoMod(HMod* instr) { | 1468 LInstruction* LChunkBuilder::DoMod(HMod* instr) { |
| 1469 HValue* left = instr->left(); | 1469 HValue* left = instr->left(); |
| 1470 HValue* right = instr->right(); | 1470 HValue* right = instr->right(); |
| 1471 if (instr->representation().IsSmiOrInteger32()) { | 1471 if (instr->representation().IsSmiOrInteger32()) { |
| 1472 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1472 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| 1473 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1473 ASSERT(instr->right()->representation().Equals(instr->representation())); |
| 1474 if (instr->HasPowerOf2Divisor()) { | 1474 if (instr->HasPowerOf2Divisor()) { |
| 1475 ASSERT(!right->CanBeZero()); | 1475 ASSERT(!right->CanBeZero()); |
| 1476 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left), | 1476 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left), |
| 1477 UseOrConstant(right)); | 1477 UseConstant(right)); |
| 1478 LInstruction* result = DefineAsRegister(mod); | 1478 LInstruction* result = DefineAsRegister(mod); |
| 1479 return (left->CanBeNegative() && | 1479 return (left->CanBeNegative() && |
| 1480 instr->CheckFlag(HValue::kBailoutOnMinusZero)) | 1480 instr->CheckFlag(HValue::kBailoutOnMinusZero)) |
| 1481 ? AssignEnvironment(result) | 1481 ? AssignEnvironment(result) |
| 1482 : result; | 1482 : result; |
| 1483 } else if (CpuFeatures::IsSupported(SUDIV)) { | 1483 } else if (CpuFeatures::IsSupported(SUDIV)) { |
| 1484 LModI* mod = new(zone()) LModI(UseRegister(left), | 1484 LModI* mod = new(zone()) LModI(UseRegister(left), |
| 1485 UseRegister(right)); | 1485 UseRegister(right)); |
| 1486 LInstruction* result = DefineAsRegister(mod); | 1486 LInstruction* result = DefineAsRegister(mod); |
| 1487 return (right->CanBeZero() || | 1487 return (right->CanBeZero() || |
| (...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2672 | 2672 |
| 2673 | 2673 |
| 2674 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2674 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2675 LOperand* object = UseRegister(instr->object()); | 2675 LOperand* object = UseRegister(instr->object()); |
| 2676 LOperand* index = UseRegister(instr->index()); | 2676 LOperand* index = UseRegister(instr->index()); |
| 2677 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2677 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2678 } | 2678 } |
| 2679 | 2679 |
| 2680 | 2680 |
| 2681 } } // namespace v8::internal | 2681 } } // namespace v8::internal |
| OLD | NEW |