| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } | 232 } |
| 233 | 233 |
| 234 | 234 |
| 235 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { | 235 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { |
| 236 stream->Add("if is_smi("); | 236 stream->Add("if is_smi("); |
| 237 InputAt(0)->PrintTo(stream); | 237 InputAt(0)->PrintTo(stream); |
| 238 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 238 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 | 241 |
| 242 void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) { |
| 243 stream->Add("if is_undetectable("); |
| 244 InputAt(0)->PrintTo(stream); |
| 245 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 246 } |
| 247 |
| 248 |
| 242 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { | 249 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
| 243 stream->Add("if has_instance_type("); | 250 stream->Add("if has_instance_type("); |
| 244 InputAt(0)->PrintTo(stream); | 251 InputAt(0)->PrintTo(stream); |
| 245 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 252 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 246 } | 253 } |
| 247 | 254 |
| 248 | 255 |
| 249 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { | 256 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { |
| 250 stream->Add("if has_cached_array_index("); | 257 stream->Add("if has_cached_array_index("); |
| 251 InputAt(0)->PrintTo(stream); | 258 InputAt(0)->PrintTo(stream); |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 LOperand* right_operand = UseFixed(right, reversed ? edx : eax); | 1078 LOperand* right_operand = UseFixed(right, reversed ? edx : eax); |
| 1072 LCmpTAndBranch* result = new LCmpTAndBranch(left_operand, | 1079 LCmpTAndBranch* result = new LCmpTAndBranch(left_operand, |
| 1073 right_operand); | 1080 right_operand); |
| 1074 return MarkAsCall(result, instr); | 1081 return MarkAsCall(result, instr); |
| 1075 } | 1082 } |
| 1076 } else if (v->IsIsSmi()) { | 1083 } else if (v->IsIsSmi()) { |
| 1077 HIsSmi* compare = HIsSmi::cast(v); | 1084 HIsSmi* compare = HIsSmi::cast(v); |
| 1078 ASSERT(compare->value()->representation().IsTagged()); | 1085 ASSERT(compare->value()->representation().IsTagged()); |
| 1079 | 1086 |
| 1080 return new LIsSmiAndBranch(Use(compare->value())); | 1087 return new LIsSmiAndBranch(Use(compare->value())); |
| 1088 } else if (v->IsIsUndetectable()) { |
| 1089 HIsUndetectable* compare = HIsUndetectable::cast(v); |
| 1090 ASSERT(compare->value()->representation().IsTagged()); |
| 1091 |
| 1092 return new LIsUndetectableAndBranch(UseRegisterAtStart(compare->value()), |
| 1093 TempRegister()); |
| 1081 } else if (v->IsHasInstanceType()) { | 1094 } else if (v->IsHasInstanceType()) { |
| 1082 HHasInstanceType* compare = HHasInstanceType::cast(v); | 1095 HHasInstanceType* compare = HHasInstanceType::cast(v); |
| 1083 ASSERT(compare->value()->representation().IsTagged()); | 1096 ASSERT(compare->value()->representation().IsTagged()); |
| 1084 | 1097 |
| 1085 return new LHasInstanceTypeAndBranch(UseRegisterAtStart(compare->value()), | 1098 return new LHasInstanceTypeAndBranch(UseRegisterAtStart(compare->value()), |
| 1086 TempRegister()); | 1099 TempRegister()); |
| 1087 } else if (v->IsHasCachedArrayIndex()) { | 1100 } else if (v->IsHasCachedArrayIndex()) { |
| 1088 HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v); | 1101 HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v); |
| 1089 ASSERT(compare->value()->representation().IsTagged()); | 1102 ASSERT(compare->value()->representation().IsTagged()); |
| 1090 | 1103 |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 | 1568 |
| 1556 | 1569 |
| 1557 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { | 1570 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { |
| 1558 ASSERT(instr->value()->representation().IsTagged()); | 1571 ASSERT(instr->value()->representation().IsTagged()); |
| 1559 LOperand* value = UseAtStart(instr->value()); | 1572 LOperand* value = UseAtStart(instr->value()); |
| 1560 | 1573 |
| 1561 return DefineAsRegister(new LIsSmi(value)); | 1574 return DefineAsRegister(new LIsSmi(value)); |
| 1562 } | 1575 } |
| 1563 | 1576 |
| 1564 | 1577 |
| 1578 LInstruction* LChunkBuilder::DoIsUndetectable(HIsUndetectable* instr) { |
| 1579 ASSERT(instr->value()->representation().IsTagged()); |
| 1580 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1581 |
| 1582 return DefineAsRegister(new LIsUndetectable(value)); |
| 1583 } |
| 1584 |
| 1585 |
| 1565 LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) { | 1586 LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) { |
| 1566 ASSERT(instr->value()->representation().IsTagged()); | 1587 ASSERT(instr->value()->representation().IsTagged()); |
| 1567 LOperand* value = UseRegisterAtStart(instr->value()); | 1588 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1568 | 1589 |
| 1569 return DefineAsRegister(new LHasInstanceType(value)); | 1590 return DefineAsRegister(new LHasInstanceType(value)); |
| 1570 } | 1591 } |
| 1571 | 1592 |
| 1572 | 1593 |
| 1573 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( | 1594 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( |
| 1574 HGetCachedArrayIndex* instr) { | 1595 HGetCachedArrayIndex* instr) { |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2209 LOperand* key = UseOrConstantAtStart(instr->key()); | 2230 LOperand* key = UseOrConstantAtStart(instr->key()); |
| 2210 LOperand* object = UseOrConstantAtStart(instr->object()); | 2231 LOperand* object = UseOrConstantAtStart(instr->object()); |
| 2211 LIn* result = new LIn(key, object); | 2232 LIn* result = new LIn(key, object); |
| 2212 return MarkAsCall(DefineFixed(result, eax), instr); | 2233 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2213 } | 2234 } |
| 2214 | 2235 |
| 2215 | 2236 |
| 2216 } } // namespace v8::internal | 2237 } } // namespace v8::internal |
| 2217 | 2238 |
| 2218 #endif // V8_TARGET_ARCH_IA32 | 2239 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |