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 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1826 info()->MarkAsDeferredCalling(); | 1826 info()->MarkAsDeferredCalling(); |
1827 LOperand* value = UseRegister(instr->value()); | 1827 LOperand* value = UseRegister(instr->value()); |
1828 LNumberUntagD* res = new(zone()) LNumberUntagD(value); | 1828 LNumberUntagD* res = new(zone()) LNumberUntagD(value); |
1829 return AssignEnvironment(DefineAsRegister(res)); | 1829 return AssignEnvironment(DefineAsRegister(res)); |
1830 } else if (to.IsSmi()) { | 1830 } else if (to.IsSmi()) { |
1831 HValue* val = instr->value(); | 1831 HValue* val = instr->value(); |
1832 LOperand* value = UseRegister(val); | 1832 LOperand* value = UseRegister(val); |
1833 if (val->type().IsSmi()) { | 1833 if (val->type().IsSmi()) { |
1834 return DefineSameAsFirst(new(zone()) LDummyUse(value)); | 1834 return DefineSameAsFirst(new(zone()) LDummyUse(value)); |
1835 } | 1835 } |
1836 return AssignEnvironment( | 1836 return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); |
1837 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); | |
1838 } else { | 1837 } else { |
1839 ASSERT(to.IsInteger32()); | 1838 ASSERT(to.IsInteger32()); |
1840 LOperand* value = UseRegister(instr->value()); | 1839 LOperand* value = UseRegister(instr->value()); |
1841 if (instr->value()->type().IsSmi()) { | 1840 if (instr->value()->type().IsSmi()) { |
1842 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); | 1841 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); |
1843 } else { | 1842 } else { |
1844 bool truncating = instr->CanTruncateToInt32(); | 1843 bool truncating = instr->CanTruncateToInt32(); |
1845 LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1); | 1844 LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1); |
1846 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); | 1845 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); |
1847 return AssignEnvironment(DefineSameAsFirst(res)); | 1846 return AssignEnvironment(DefineSameAsFirst(res)); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1921 } | 1920 } |
1922 | 1921 |
1923 | 1922 |
1924 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { | 1923 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { |
1925 LUnallocated* temp = TempRegister(); | 1924 LUnallocated* temp = TempRegister(); |
1926 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp); | 1925 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp); |
1927 return AssignEnvironment(result); | 1926 return AssignEnvironment(result); |
1928 } | 1927 } |
1929 | 1928 |
1930 | 1929 |
1931 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { | |
1932 LOperand* value = UseRegisterAtStart(instr->value()); | |
1933 return AssignEnvironment(new(zone()) LCheckSmi(value)); | |
1934 } | |
1935 | |
1936 | |
1937 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 1930 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
1938 LOperand* value = UseRegisterAtStart(instr->value()); | 1931 LOperand* value = UseRegisterAtStart(instr->value()); |
1939 return AssignEnvironment(new(zone()) LCheckFunction(value)); | 1932 return AssignEnvironment(new(zone()) LCheckFunction(value)); |
1940 } | 1933 } |
1941 | 1934 |
1942 | 1935 |
1943 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { | 1936 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
1944 LOperand* value = UseRegisterAtStart(instr->value()); | 1937 LOperand* value = UseRegisterAtStart(instr->value()); |
1945 LCheckMaps* result = new(zone()) LCheckMaps(value); | 1938 LCheckMaps* result = new(zone()) LCheckMaps(value); |
1946 return AssignEnvironment(result); | 1939 return AssignEnvironment(result); |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2572 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2565 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2573 LOperand* object = UseRegister(instr->object()); | 2566 LOperand* object = UseRegister(instr->object()); |
2574 LOperand* index = UseTempRegister(instr->index()); | 2567 LOperand* index = UseTempRegister(instr->index()); |
2575 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2568 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2576 } | 2569 } |
2577 | 2570 |
2578 | 2571 |
2579 } } // namespace v8::internal | 2572 } } // namespace v8::internal |
2580 | 2573 |
2581 #endif // V8_TARGET_ARCH_X64 | 2574 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |