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 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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()); |
1923 return new(zone()) LReturn(UseFixed(instr->value(), v0), | 1923 return new(zone()) LReturn(UseFixed(instr->value(), v0), |
1924 parameter_count); | 1924 parameter_count); |
1925 } | 1925 } |
1926 | 1926 |
1927 | 1927 |
1928 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 1928 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
1929 Representation r = instr->representation(); | 1929 Representation r = instr->representation(); |
1930 if (r.IsInteger32()) { | 1930 if (r.IsSmi()) { |
| 1931 return DefineAsRegister(new(zone()) LConstantS); |
| 1932 } else if (r.IsInteger32()) { |
1931 return DefineAsRegister(new(zone()) LConstantI); | 1933 return DefineAsRegister(new(zone()) LConstantI); |
1932 } else if (r.IsDouble()) { | 1934 } else if (r.IsDouble()) { |
1933 return DefineAsRegister(new(zone()) LConstantD); | 1935 return DefineAsRegister(new(zone()) LConstantD); |
1934 } else if (r.IsSmiOrTagged()) { | 1936 } else if (r.IsTagged()) { |
1935 return DefineAsRegister(new(zone()) LConstantT); | 1937 return DefineAsRegister(new(zone()) LConstantT); |
1936 } else { | 1938 } else { |
1937 UNREACHABLE(); | 1939 UNREACHABLE(); |
1938 return NULL; | 1940 return NULL; |
1939 } | 1941 } |
1940 } | 1942 } |
1941 | 1943 |
1942 | 1944 |
1943 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 1945 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
1944 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | 1946 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; |
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2499 | 2501 |
2500 | 2502 |
2501 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2503 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2502 LOperand* object = UseRegister(instr->object()); | 2504 LOperand* object = UseRegister(instr->object()); |
2503 LOperand* index = UseRegister(instr->index()); | 2505 LOperand* index = UseRegister(instr->index()); |
2504 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2506 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2505 } | 2507 } |
2506 | 2508 |
2507 | 2509 |
2508 } } // namespace v8::internal | 2510 } } // namespace v8::internal |
OLD | NEW |