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 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1902 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { | 1902 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
1903 HValue* value = instr->value(); | 1903 HValue* value = instr->value(); |
1904 Representation input_rep = value->representation(); | 1904 Representation input_rep = value->representation(); |
1905 LOperand* reg = UseRegister(value); | 1905 LOperand* reg = UseRegister(value); |
1906 if (input_rep.IsDouble()) { | 1906 if (input_rep.IsDouble()) { |
1907 // Revisit this decision, here and 8 lines below. | 1907 // Revisit this decision, here and 8 lines below. |
1908 return DefineAsRegister(new(zone()) LClampDToUint8(reg, FixedTemp(f22))); | 1908 return DefineAsRegister(new(zone()) LClampDToUint8(reg, FixedTemp(f22))); |
1909 } else if (input_rep.IsInteger32()) { | 1909 } else if (input_rep.IsInteger32()) { |
1910 return DefineAsRegister(new(zone()) LClampIToUint8(reg)); | 1910 return DefineAsRegister(new(zone()) LClampIToUint8(reg)); |
1911 } else { | 1911 } else { |
1912 ASSERT(input_rep.IsTagged()); | 1912 ASSERT(input_rep.IsSmiOrTagged()); |
1913 // Register allocator doesn't (yet) support allocation of double | 1913 // Register allocator doesn't (yet) support allocation of double |
1914 // temps. Reserve f22 explicitly. | 1914 // temps. Reserve f22 explicitly. |
1915 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, FixedTemp(f22)); | 1915 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, FixedTemp(f22)); |
1916 return AssignEnvironment(DefineAsRegister(result)); | 1916 return AssignEnvironment(DefineAsRegister(result)); |
1917 } | 1917 } |
1918 } | 1918 } |
1919 | 1919 |
1920 | 1920 |
1921 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1921 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
1922 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); | 1922 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2499 | 2499 |
2500 | 2500 |
2501 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2501 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2502 LOperand* object = UseRegister(instr->object()); | 2502 LOperand* object = UseRegister(instr->object()); |
2503 LOperand* index = UseRegister(instr->index()); | 2503 LOperand* index = UseRegister(instr->index()); |
2504 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2504 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2505 } | 2505 } |
2506 | 2506 |
2507 | 2507 |
2508 } } // namespace v8::internal | 2508 } } // namespace v8::internal |
OLD | NEW |