| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1215 ASSERT(compare->value()->representation().IsTagged()); | 1215 ASSERT(compare->value()->representation().IsTagged()); |
| 1216 | 1216 |
| 1217 return new LIsSmiAndBranch(Use(compare->value()), | 1217 return new LIsSmiAndBranch(Use(compare->value()), |
| 1218 first_id, | 1218 first_id, |
| 1219 second_id); | 1219 second_id); |
| 1220 } else if (v->IsHasInstanceType()) { | 1220 } else if (v->IsHasInstanceType()) { |
| 1221 HHasInstanceType* compare = HHasInstanceType::cast(v); | 1221 HHasInstanceType* compare = HHasInstanceType::cast(v); |
| 1222 ASSERT(compare->value()->representation().IsTagged()); | 1222 ASSERT(compare->value()->representation().IsTagged()); |
| 1223 | 1223 |
| 1224 return new LHasInstanceTypeAndBranch(UseRegisterAtStart(compare->value()), | 1224 return new LHasInstanceTypeAndBranch(UseRegisterAtStart(compare->value()), |
| 1225 TempRegister(), | |
| 1226 first_id, | 1225 first_id, |
| 1227 second_id); | 1226 second_id); |
| 1228 } else if (v->IsHasCachedArrayIndex()) { | 1227 } else if (v->IsHasCachedArrayIndex()) { |
| 1229 HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v); | 1228 HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v); |
| 1230 ASSERT(compare->value()->representation().IsTagged()); | 1229 ASSERT(compare->value()->representation().IsTagged()); |
| 1231 | 1230 |
| 1232 return new LHasCachedArrayIndexAndBranch( | 1231 return new LHasCachedArrayIndexAndBranch( |
| 1233 UseRegisterAtStart(compare->value()), first_id, second_id); | 1232 UseRegisterAtStart(compare->value()), first_id, second_id); |
| 1234 } else if (v->IsIsNull()) { | 1233 } else if (v->IsIsNull()) { |
| 1235 HIsNull* compare = HIsNull::cast(v); | 1234 HIsNull* compare = HIsNull::cast(v); |
| 1236 ASSERT(compare->value()->representation().IsTagged()); | 1235 ASSERT(compare->value()->representation().IsTagged()); |
| 1237 | 1236 |
| 1238 // We only need a temp register for non-strict compare. | |
| 1239 LOperand* temp = compare->is_strict() ? NULL : TempRegister(); | |
| 1240 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), | 1237 return new LIsNullAndBranch(UseRegisterAtStart(compare->value()), |
| 1241 compare->is_strict(), | 1238 compare->is_strict(), |
| 1242 temp, | |
| 1243 first_id, | 1239 first_id, |
| 1244 second_id); | 1240 second_id); |
| 1245 } else if (v->IsIsObject()) { | 1241 } else if (v->IsIsObject()) { |
| 1246 HIsObject* compare = HIsObject::cast(v); | 1242 HIsObject* compare = HIsObject::cast(v); |
| 1247 ASSERT(compare->value()->representation().IsTagged()); | 1243 ASSERT(compare->value()->representation().IsTagged()); |
| 1248 | 1244 |
| 1249 LOperand* temp1 = TempRegister(); | 1245 LOperand* temp1 = TempRegister(); |
| 1250 LOperand* temp2 = TempRegister(); | 1246 LOperand* temp2 = TempRegister(); |
| 1251 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), | 1247 return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), |
| 1252 temp1, | 1248 temp1, |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1843 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 1839 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
| 1844 LOperand* object = UseFixed(instr->object(), r0); | 1840 LOperand* object = UseFixed(instr->object(), r0); |
| 1845 LInstruction* result = DefineFixed(new LLoadNamedGeneric(object), r0); | 1841 LInstruction* result = DefineFixed(new LLoadNamedGeneric(object), r0); |
| 1846 return MarkAsCall(result, instr); | 1842 return MarkAsCall(result, instr); |
| 1847 } | 1843 } |
| 1848 | 1844 |
| 1849 | 1845 |
| 1850 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 1846 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
| 1851 HLoadFunctionPrototype* instr) { | 1847 HLoadFunctionPrototype* instr) { |
| 1852 return AssignEnvironment(DefineAsRegister( | 1848 return AssignEnvironment(DefineAsRegister( |
| 1853 new LLoadFunctionPrototype(UseRegister(instr->function()), | 1849 new LLoadFunctionPrototype(UseRegister(instr->function())))); |
| 1854 TempRegister()))); | |
| 1855 } | 1850 } |
| 1856 | 1851 |
| 1857 | 1852 |
| 1858 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { | 1853 LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) { |
| 1859 LOperand* input = UseRegisterAtStart(instr->value()); | 1854 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1860 return DefineSameAsFirst(new LLoadElements(input)); | 1855 return DefineSameAsFirst(new LLoadElements(input)); |
| 1861 } | 1856 } |
| 1862 | 1857 |
| 1863 | 1858 |
| 1864 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( | 1859 LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2108 void LPointerMap::PrintTo(StringStream* stream) const { | 2103 void LPointerMap::PrintTo(StringStream* stream) const { |
| 2109 stream->Add("{"); | 2104 stream->Add("{"); |
| 2110 for (int i = 0; i < pointer_operands_.length(); ++i) { | 2105 for (int i = 0; i < pointer_operands_.length(); ++i) { |
| 2111 if (i != 0) stream->Add(";"); | 2106 if (i != 0) stream->Add(";"); |
| 2112 pointer_operands_[i]->PrintTo(stream); | 2107 pointer_operands_[i]->PrintTo(stream); |
| 2113 } | 2108 } |
| 2114 stream->Add("} @%d", position()); | 2109 stream->Add("} @%d", position()); |
| 2115 } | 2110 } |
| 2116 | 2111 |
| 2117 } } // namespace v8::internal | 2112 } } // namespace v8::internal |
| OLD | NEW |