| 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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 } | 1382 } |
| 1383 return NULL; | 1383 return NULL; |
| 1384 } | 1384 } |
| 1385 | 1385 |
| 1386 | 1386 |
| 1387 LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) { | 1387 LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) { |
| 1388 HValue* right = instr->right(); | 1388 HValue* right = instr->right(); |
| 1389 LOperand* dividend = UseRegister(instr->left()); | 1389 LOperand* dividend = UseRegister(instr->left()); |
| 1390 LOperand* divisor = UseRegisterOrConstant(right); | 1390 LOperand* divisor = UseRegisterOrConstant(right); |
| 1391 LOperand* remainder = TempRegister(); | 1391 LOperand* remainder = TempRegister(); |
| 1392 ASSERT(right->IsConstant() && | |
| 1393 HConstant::cast(right)->HasInteger32Value()); | |
| 1394 return AssignEnvironment(DefineAsRegister( | 1392 return AssignEnvironment(DefineAsRegister( |
| 1395 new(zone()) LMathFloorOfDiv(dividend, divisor, remainder))); | 1393 new(zone()) LMathFloorOfDiv(dividend, divisor, remainder))); |
| 1396 } | 1394 } |
| 1397 | 1395 |
| 1398 | 1396 |
| 1399 LInstruction* LChunkBuilder::DoMod(HMod* instr) { | 1397 LInstruction* LChunkBuilder::DoMod(HMod* instr) { |
| 1400 HValue* left = instr->left(); | 1398 HValue* left = instr->left(); |
| 1401 HValue* right = instr->right(); | 1399 HValue* right = instr->right(); |
| 1402 if (instr->representation().IsSmiOrInteger32()) { | 1400 if (instr->representation().IsSmiOrInteger32()) { |
| 1403 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1401 ASSERT(instr->left()->representation().Equals(instr->representation())); |
| (...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2504 | 2502 |
| 2505 | 2503 |
| 2506 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2504 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2507 LOperand* object = UseRegister(instr->object()); | 2505 LOperand* object = UseRegister(instr->object()); |
| 2508 LOperand* index = UseRegister(instr->index()); | 2506 LOperand* index = UseRegister(instr->index()); |
| 2509 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2507 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2510 } | 2508 } |
| 2511 | 2509 |
| 2512 | 2510 |
| 2513 } } // namespace v8::internal | 2511 } } // namespace v8::internal |
| OLD | NEW |