| 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 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1703 Representation from = instr->from(); | 1703 Representation from = instr->from(); |
| 1704 Representation to = instr->to(); | 1704 Representation to = instr->to(); |
| 1705 if (from.IsTagged()) { | 1705 if (from.IsTagged()) { |
| 1706 if (to.IsDouble()) { | 1706 if (to.IsDouble()) { |
| 1707 LOperand* value = UseRegister(instr->value()); | 1707 LOperand* value = UseRegister(instr->value()); |
| 1708 LNumberUntagD* res = new(zone()) LNumberUntagD(value); | 1708 LNumberUntagD* res = new(zone()) LNumberUntagD(value); |
| 1709 return AssignEnvironment(DefineAsRegister(res)); | 1709 return AssignEnvironment(DefineAsRegister(res)); |
| 1710 } else { | 1710 } else { |
| 1711 ASSERT(to.IsInteger32()); | 1711 ASSERT(to.IsInteger32()); |
| 1712 LOperand* value = UseRegisterAtStart(instr->value()); | 1712 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1713 bool needs_check = !instr->value()->type().IsSmi(); | |
| 1714 LInstruction* res = NULL; | 1713 LInstruction* res = NULL; |
| 1715 if (!needs_check) { | 1714 if (instr->value()->type().IsSmi()) { |
| 1716 res = DefineAsRegister(new(zone()) LSmiUntag(value, needs_check)); | 1715 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); |
| 1717 } else { | 1716 } else { |
| 1718 LOperand* temp1 = TempRegister(); | 1717 LOperand* temp1 = TempRegister(); |
| 1719 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() | 1718 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() |
| 1720 : NULL; | 1719 : NULL; |
| 1721 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(d11) | 1720 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(d11) |
| 1722 : NULL; | 1721 : NULL; |
| 1723 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, | 1722 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, |
| 1724 temp1, | 1723 temp1, |
| 1725 temp2, | 1724 temp2, |
| 1726 temp3)); | 1725 temp3)); |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2395 | 2394 |
| 2396 | 2395 |
| 2397 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2396 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2398 LOperand* object = UseRegister(instr->object()); | 2397 LOperand* object = UseRegister(instr->object()); |
| 2399 LOperand* index = UseRegister(instr->index()); | 2398 LOperand* index = UseRegister(instr->index()); |
| 2400 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2399 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2401 } | 2400 } |
| 2402 | 2401 |
| 2403 | 2402 |
| 2404 } } // namespace v8::internal | 2403 } } // namespace v8::internal |
| OLD | NEW |