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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 } | 230 } |
231 | 231 |
232 | 232 |
233 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { | 233 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { |
234 stream->Add("if is_smi("); | 234 stream->Add("if is_smi("); |
235 InputAt(0)->PrintTo(stream); | 235 InputAt(0)->PrintTo(stream); |
236 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 236 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
237 } | 237 } |
238 | 238 |
239 | 239 |
| 240 void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) { |
| 241 stream->Add("if is_undetectable("); |
| 242 InputAt(0)->PrintTo(stream); |
| 243 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 244 } |
| 245 |
| 246 |
240 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { | 247 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
241 stream->Add("if has_instance_type("); | 248 stream->Add("if has_instance_type("); |
242 InputAt(0)->PrintTo(stream); | 249 InputAt(0)->PrintTo(stream); |
243 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 250 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
244 } | 251 } |
245 | 252 |
246 | 253 |
247 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { | 254 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { |
248 stream->Add("if has_cached_array_index("); | 255 stream->Add("if has_cached_array_index("); |
249 InputAt(0)->PrintTo(stream); | 256 InputAt(0)->PrintTo(stream); |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 LOperand* right_operand = UseFixed(right, reversed ? r1 : r0); | 1079 LOperand* right_operand = UseFixed(right, reversed ? r1 : r0); |
1073 LInstruction* result = new LCmpTAndBranch(left_operand, | 1080 LInstruction* result = new LCmpTAndBranch(left_operand, |
1074 right_operand); | 1081 right_operand); |
1075 return MarkAsCall(result, instr); | 1082 return MarkAsCall(result, instr); |
1076 } | 1083 } |
1077 } else if (v->IsIsSmi()) { | 1084 } else if (v->IsIsSmi()) { |
1078 HIsSmi* compare = HIsSmi::cast(v); | 1085 HIsSmi* compare = HIsSmi::cast(v); |
1079 ASSERT(compare->value()->representation().IsTagged()); | 1086 ASSERT(compare->value()->representation().IsTagged()); |
1080 | 1087 |
1081 return new LIsSmiAndBranch(Use(compare->value())); | 1088 return new LIsSmiAndBranch(Use(compare->value())); |
| 1089 } else if (v->IsIsUndetectable()) { |
| 1090 HIsUndetectable* compare = HIsUndetectable::cast(v); |
| 1091 ASSERT(compare->value()->representation().IsTagged()); |
| 1092 |
| 1093 return new LIsUndetectableAndBranch(UseRegisterAtStart(compare->value()), |
| 1094 TempRegister()); |
1082 } else if (v->IsHasInstanceType()) { | 1095 } else if (v->IsHasInstanceType()) { |
1083 HHasInstanceType* compare = HHasInstanceType::cast(v); | 1096 HHasInstanceType* compare = HHasInstanceType::cast(v); |
1084 ASSERT(compare->value()->representation().IsTagged()); | 1097 ASSERT(compare->value()->representation().IsTagged()); |
1085 return new LHasInstanceTypeAndBranch( | 1098 return new LHasInstanceTypeAndBranch( |
1086 UseRegisterAtStart(compare->value())); | 1099 UseRegisterAtStart(compare->value())); |
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 |
1091 return new LHasCachedArrayIndexAndBranch( | 1104 return new LHasCachedArrayIndexAndBranch( |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1522 | 1535 |
1523 | 1536 |
1524 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { | 1537 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { |
1525 ASSERT(instr->value()->representation().IsTagged()); | 1538 ASSERT(instr->value()->representation().IsTagged()); |
1526 LOperand* value = UseAtStart(instr->value()); | 1539 LOperand* value = UseAtStart(instr->value()); |
1527 | 1540 |
1528 return DefineAsRegister(new LIsSmi(value)); | 1541 return DefineAsRegister(new LIsSmi(value)); |
1529 } | 1542 } |
1530 | 1543 |
1531 | 1544 |
| 1545 LInstruction* LChunkBuilder::DoIsUndetectable(HIsUndetectable* instr) { |
| 1546 ASSERT(instr->value()->representation().IsTagged()); |
| 1547 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1548 |
| 1549 return DefineAsRegister(new LIsUndetectable(value)); |
| 1550 } |
| 1551 |
| 1552 |
1532 LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) { | 1553 LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) { |
1533 ASSERT(instr->value()->representation().IsTagged()); | 1554 ASSERT(instr->value()->representation().IsTagged()); |
1534 LOperand* value = UseRegisterAtStart(instr->value()); | 1555 LOperand* value = UseRegisterAtStart(instr->value()); |
1535 | 1556 |
1536 return DefineAsRegister(new LHasInstanceType(value)); | 1557 return DefineAsRegister(new LHasInstanceType(value)); |
1537 } | 1558 } |
1538 | 1559 |
1539 | 1560 |
1540 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( | 1561 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( |
1541 HGetCachedArrayIndex* instr) { | 1562 HGetCachedArrayIndex* instr) { |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2144 | 2165 |
2145 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2166 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
2146 LOperand* key = UseRegisterAtStart(instr->key()); | 2167 LOperand* key = UseRegisterAtStart(instr->key()); |
2147 LOperand* object = UseRegisterAtStart(instr->object()); | 2168 LOperand* object = UseRegisterAtStart(instr->object()); |
2148 LIn* result = new LIn(key, object); | 2169 LIn* result = new LIn(key, object); |
2149 return MarkAsCall(DefineFixed(result, r0), instr); | 2170 return MarkAsCall(DefineFixed(result, r0), instr); |
2150 } | 2171 } |
2151 | 2172 |
2152 | 2173 |
2153 } } // namespace v8::internal | 2174 } } // namespace v8::internal |
OLD | NEW |