| 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 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1652 | 1652 |
| 1653 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { | 1653 LInstruction* LChunkBuilder::DoDateField(HDateField* instr) { |
| 1654 LOperand* date = UseFixed(instr->value(), eax); | 1654 LOperand* date = UseFixed(instr->value(), eax); |
| 1655 LDateField* result = | 1655 LDateField* result = |
| 1656 new(zone()) LDateField(date, FixedTemp(ecx), instr->index()); | 1656 new(zone()) LDateField(date, FixedTemp(ecx), instr->index()); |
| 1657 return MarkAsCall(DefineFixed(result, eax), instr); | 1657 return MarkAsCall(DefineFixed(result, eax), instr); |
| 1658 } | 1658 } |
| 1659 | 1659 |
| 1660 | 1660 |
| 1661 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { | 1661 LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { |
| 1662 return AssignEnvironment(new(zone()) LBoundsCheck( | 1662 if (instr->index()->IsConstant() || |
| 1663 UseRegisterOrConstantAtStart(instr->index()), | 1663 (instr->lower_offset() == 0 && instr->upper_offset() == 0)) { |
| 1664 UseAtStart(instr->length()))); | 1664 return AssignEnvironment(new(zone()) LBoundsCheck( |
| 1665 UseRegisterOrConstantAtStart(instr->index()), |
| 1666 UseAtStart(instr->length()), NULL)); |
| 1667 } else { |
| 1668 return AssignEnvironment(new(zone()) LBoundsCheck( |
| 1669 UseRegisterOrConstant(instr->index()), |
| 1670 UseAtStart(instr->length()), TempRegister())); |
| 1671 } |
| 1665 } | 1672 } |
| 1666 | 1673 |
| 1667 | 1674 |
| 1668 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { | 1675 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { |
| 1669 // The control instruction marking the end of a block that completed | 1676 // The control instruction marking the end of a block that completed |
| 1670 // abruptly (e.g., threw an exception). There is nothing specific to do. | 1677 // abruptly (e.g., threw an exception). There is nothing specific to do. |
| 1671 return NULL; | 1678 return NULL; |
| 1672 } | 1679 } |
| 1673 | 1680 |
| 1674 | 1681 |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2448 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2455 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2449 LOperand* object = UseRegister(instr->object()); | 2456 LOperand* object = UseRegister(instr->object()); |
| 2450 LOperand* index = UseTempRegister(instr->index()); | 2457 LOperand* index = UseTempRegister(instr->index()); |
| 2451 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2458 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2452 } | 2459 } |
| 2453 | 2460 |
| 2454 | 2461 |
| 2455 } } // namespace v8::internal | 2462 } } // namespace v8::internal |
| 2456 | 2463 |
| 2457 #endif // V8_TARGET_ARCH_IA32 | 2464 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |