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 HValue* val = instr->value(); | 1902 HValue* val = instr->value(); |
1903 LOperand* value = UseRegister(val); | 1903 LOperand* value = UseRegister(val); |
1904 if (val->type().IsSmi()) { | 1904 if (val->type().IsSmi()) { |
1905 return DefineSameAsFirst(new(zone()) LDummyUse(value)); | 1905 return DefineSameAsFirst(new(zone()) LDummyUse(value)); |
1906 } | 1906 } |
1907 return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); | 1907 return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); |
1908 } else { | 1908 } else { |
1909 ASSERT(to.IsInteger32()); | 1909 ASSERT(to.IsInteger32()); |
1910 LOperand* value = NULL; | 1910 LOperand* value = NULL; |
1911 LInstruction* res = NULL; | 1911 LInstruction* res = NULL; |
1912 if (instr->value()->type().IsSmi()) { | 1912 HValue* val = instr->value(); |
1913 value = UseRegisterAtStart(instr->value()); | 1913 if (val->type().IsSmi() || val->representation().IsSmi()) { |
| 1914 value = UseRegisterAtStart(val); |
1914 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); | 1915 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); |
1915 } else { | 1916 } else { |
1916 value = UseRegister(instr->value()); | 1917 value = UseRegister(val); |
1917 LOperand* temp1 = TempRegister(); | 1918 LOperand* temp1 = TempRegister(); |
1918 LOperand* temp2 = FixedTemp(d11); | 1919 LOperand* temp2 = FixedTemp(d11); |
1919 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, | 1920 res = DefineSameAsFirst(new(zone()) LTaggedToI(value, |
1920 temp1, | 1921 temp1, |
1921 temp2)); | 1922 temp2)); |
1922 res = AssignEnvironment(res); | 1923 res = AssignEnvironment(res); |
1923 } | 1924 } |
1924 return res; | 1925 return res; |
1925 } | 1926 } |
1926 } else if (from.IsDouble()) { | 1927 } else if (from.IsDouble()) { |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2573 | 2574 |
2574 | 2575 |
2575 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2576 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2576 LOperand* object = UseRegister(instr->object()); | 2577 LOperand* object = UseRegister(instr->object()); |
2577 LOperand* index = UseRegister(instr->index()); | 2578 LOperand* index = UseRegister(instr->index()); |
2578 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2579 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2579 } | 2580 } |
2580 | 2581 |
2581 | 2582 |
2582 } } // namespace v8::internal | 2583 } } // namespace v8::internal |
OLD | NEW |