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 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1850 return AssignEnvironment(Define(result, temp)); | 1850 return AssignEnvironment(Define(result, temp)); |
1851 } | 1851 } |
1852 | 1852 |
1853 | 1853 |
1854 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { | 1854 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { |
1855 LOperand* value = UseAtStart(instr->value()); | 1855 LOperand* value = UseAtStart(instr->value()); |
1856 return AssignEnvironment(new(zone()) LCheckSmi(value)); | 1856 return AssignEnvironment(new(zone()) LCheckSmi(value)); |
1857 } | 1857 } |
1858 | 1858 |
1859 | 1859 |
| 1860 LInstruction* LChunkBuilder::DoCheckSmiOrInt32(HCheckSmiOrInt32* instr) { |
| 1861 if (instr->representation().IsTagged() && !instr->type().IsSmi()) { |
| 1862 LOperand* value = UseAtStart(instr->value()); |
| 1863 return AssignEnvironment(new(zone()) LCheckSmi(value)); |
| 1864 } else { |
| 1865 return NULL; |
| 1866 } |
| 1867 } |
| 1868 |
| 1869 |
1860 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 1870 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
1861 // If the target is in new space, we'll emit a global cell compare and so | 1871 // If the target is in new space, we'll emit a global cell compare and so |
1862 // want the value in a register. If the target gets promoted before we | 1872 // want the value in a register. If the target gets promoted before we |
1863 // emit code, we will still get the register but will do an immediate | 1873 // emit code, we will still get the register but will do an immediate |
1864 // compare instead of the cell compare. This is safe. | 1874 // compare instead of the cell compare. This is safe. |
1865 LOperand* value = instr->target_in_new_space() | 1875 LOperand* value = instr->target_in_new_space() |
1866 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value()); | 1876 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value()); |
1867 return AssignEnvironment(new(zone()) LCheckFunction(value)); | 1877 return AssignEnvironment(new(zone()) LCheckFunction(value)); |
1868 } | 1878 } |
1869 | 1879 |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2550 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2541 LOperand* object = UseRegister(instr->object()); | 2551 LOperand* object = UseRegister(instr->object()); |
2542 LOperand* index = UseTempRegister(instr->index()); | 2552 LOperand* index = UseTempRegister(instr->index()); |
2543 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2553 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2544 } | 2554 } |
2545 | 2555 |
2546 | 2556 |
2547 } } // namespace v8::internal | 2557 } } // namespace v8::internal |
2548 | 2558 |
2549 #endif // V8_TARGET_ARCH_IA32 | 2559 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |