Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1760 } else { | 1760 } else { |
| 1761 ASSERT(input_rep.IsTagged()); | 1761 ASSERT(input_rep.IsTagged()); |
| 1762 // Register allocator doesn't (yet) support allocation of double | 1762 // Register allocator doesn't (yet) support allocation of double |
| 1763 // temps. Reserve d1 explicitly. | 1763 // temps. Reserve d1 explicitly. |
| 1764 LClampTToUint8* result = new LClampTToUint8(reg, FixedTemp(d1)); | 1764 LClampTToUint8* result = new LClampTToUint8(reg, FixedTemp(d1)); |
| 1765 return AssignEnvironment(DefineAsRegister(result)); | 1765 return AssignEnvironment(DefineAsRegister(result)); |
| 1766 } | 1766 } |
| 1767 } | 1767 } |
| 1768 | 1768 |
| 1769 | 1769 |
| 1770 LInstruction* LChunkBuilder::DoToInt32(HToInt32* instr) { | |
| 1771 HValue* value = instr->value(); | |
| 1772 Representation input_rep = value->representation(); | |
| 1773 LOperand* reg = UseRegister(value); | |
| 1774 if (input_rep.IsDouble()) { | |
| 1775 LDoubleToI* res = new LDoubleToI(reg, | |
|
Kevin Millikin (Chromium)
2011/05/26 07:53:37
Two space indent here.
I'd name the two TempRegis
danno
2011/06/01 13:14:41
Done.
| |
| 1776 TempRegister(), | |
| 1777 TempRegister()); | |
| 1778 return AssignEnvironment(DefineAsRegister(res)); | |
| 1779 } else if (input_rep.IsInteger32()) { | |
| 1780 // Canonicalization should already have removed the hydrogen instruction in | |
| 1781 // this case, since it is a noop. | |
| 1782 UNREACHABLE(); | |
| 1783 return NULL; | |
| 1784 } else { | |
| 1785 ASSERT(input_rep.IsTagged()); | |
| 1786 LOperand* temp1 = TempRegister(); | |
| 1787 LOperand* temp2 = TempRegister(); | |
| 1788 LOperand* temp3 = FixedTemp(d3); | |
| 1789 LInstruction* res = DefineSameAsFirst( | |
|
Kevin Millikin (Chromium)
2011/05/26 07:53:37
I like
LTaggedToI* res = new LTaggedToI(reg, temp
danno
2011/06/01 13:14:41
Done.
| |
| 1790 new LTaggedToI(reg, temp1, temp2, temp3)); | |
| 1791 return AssignEnvironment(res); | |
| 1792 } | |
| 1793 } | |
| 1794 | |
| 1795 | |
| 1770 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1796 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
| 1771 return new LReturn(UseFixed(instr->value(), r0)); | 1797 return new LReturn(UseFixed(instr->value(), r0)); |
| 1772 } | 1798 } |
| 1773 | 1799 |
| 1774 | 1800 |
| 1775 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 1801 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
| 1776 Representation r = instr->representation(); | 1802 Representation r = instr->representation(); |
| 1777 if (r.IsInteger32()) { | 1803 if (r.IsInteger32()) { |
| 1778 return DefineAsRegister(new LConstantI); | 1804 return DefineAsRegister(new LConstantI); |
| 1779 } else if (r.IsDouble()) { | 1805 } else if (r.IsDouble()) { |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2197 | 2223 |
| 2198 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2224 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
| 2199 LOperand* key = UseRegisterAtStart(instr->key()); | 2225 LOperand* key = UseRegisterAtStart(instr->key()); |
| 2200 LOperand* object = UseRegisterAtStart(instr->object()); | 2226 LOperand* object = UseRegisterAtStart(instr->object()); |
| 2201 LIn* result = new LIn(key, object); | 2227 LIn* result = new LIn(key, object); |
| 2202 return MarkAsCall(DefineFixed(result, r0), instr); | 2228 return MarkAsCall(DefineFixed(result, r0), instr); |
| 2203 } | 2229 } |
| 2204 | 2230 |
| 2205 | 2231 |
| 2206 } } // namespace v8::internal | 2232 } } // namespace v8::internal |
| OLD | NEW |