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 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1744 } | 1744 } |
1745 | 1745 |
1746 | 1746 |
1747 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { | 1747 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { |
1748 LOperand* value = UseRegisterAtStart(instr->value()); | 1748 LOperand* value = UseRegisterAtStart(instr->value()); |
1749 LInstruction* result = new LCheckMap(value); | 1749 LInstruction* result = new LCheckMap(value); |
1750 return AssignEnvironment(result); | 1750 return AssignEnvironment(result); |
1751 } | 1751 } |
1752 | 1752 |
1753 | 1753 |
1754 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { | |
1755 HValue* value = instr->value(); | |
1756 Representation rep = value->representation(); | |
Kevin Millikin (Chromium)
2011/05/16 07:06:35
Can we rename this to input_rep and assert that in
danno
2011/05/16 14:13:43
Done.
| |
1757 LOperand* reg = UseRegister(value); | |
1758 if (rep.IsDouble()) { | |
1759 return DefineAsRegister(new LClampDoubleToUint8(reg, FixedTemp(d1))); | |
Kevin Millikin (Chromium)
2011/05/16 07:06:35
Probably needs a comment that the fixed register i
danno
2011/05/16 14:13:43
Done.
| |
1760 } else if (rep.IsInteger32()) { | |
1761 return DefineAsRegister(new LClampIToUint8(reg)); | |
1762 } else { | |
1763 ASSERT(rep.IsTagged()); | |
1764 LClampTaggedToUint8* result = new LClampTaggedToUint8(reg, FixedTemp(d1)); | |
1765 return AssignEnvironment(DefineAsRegister(result)); | |
1766 } | |
1767 } | |
1768 | |
1769 | |
1754 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1770 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
1755 return new LReturn(UseFixed(instr->value(), r0)); | 1771 return new LReturn(UseFixed(instr->value(), r0)); |
1756 } | 1772 } |
1757 | 1773 |
1758 | 1774 |
1759 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 1775 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
1760 Representation r = instr->representation(); | 1776 Representation r = instr->representation(); |
1761 if (r.IsInteger32()) { | 1777 if (r.IsInteger32()) { |
1762 return DefineAsRegister(new LConstantI); | 1778 return DefineAsRegister(new LConstantI); |
1763 } else if (r.IsDouble()) { | 1779 } else if (r.IsDouble()) { |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2180 | 2196 |
2181 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2197 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
2182 LOperand* key = UseRegisterAtStart(instr->key()); | 2198 LOperand* key = UseRegisterAtStart(instr->key()); |
2183 LOperand* object = UseRegisterAtStart(instr->object()); | 2199 LOperand* object = UseRegisterAtStart(instr->object()); |
2184 LIn* result = new LIn(key, object); | 2200 LIn* result = new LIn(key, object); |
2185 return MarkAsCall(DefineFixed(result, r0), instr); | 2201 return MarkAsCall(DefineFixed(result, r0), instr); |
2186 } | 2202 } |
2187 | 2203 |
2188 | 2204 |
2189 } } // namespace v8::internal | 2205 } } // namespace v8::internal |
OLD | NEW |