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 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 LOperand* right_operand = UseFixed(right, reversed ? rdx : rax); | 1077 LOperand* right_operand = UseFixed(right, reversed ? rdx : rax); |
1071 LCmpTAndBranch* result = new LCmpTAndBranch(left_operand, | 1078 LCmpTAndBranch* result = new LCmpTAndBranch(left_operand, |
1072 right_operand); | 1079 right_operand); |
1073 return MarkAsCall(result, instr); | 1080 return MarkAsCall(result, instr); |
1074 } | 1081 } |
1075 } else if (v->IsIsSmi()) { | 1082 } else if (v->IsIsSmi()) { |
1076 HIsSmi* compare = HIsSmi::cast(v); | 1083 HIsSmi* compare = HIsSmi::cast(v); |
1077 ASSERT(compare->value()->representation().IsTagged()); | 1084 ASSERT(compare->value()->representation().IsTagged()); |
1078 | 1085 |
1079 return new LIsSmiAndBranch(Use(compare->value())); | 1086 return new LIsSmiAndBranch(Use(compare->value())); |
| 1087 } else if (v->IsIsUndetectable()) { |
| 1088 HIsUndetectable* compare = HIsUndetectable::cast(v); |
| 1089 ASSERT(compare->value()->representation().IsTagged()); |
| 1090 |
| 1091 return new LIsUndetectableAndBranch(UseRegisterAtStart(compare->value()), |
| 1092 TempRegister()); |
1080 } else if (v->IsHasInstanceType()) { | 1093 } else if (v->IsHasInstanceType()) { |
1081 HHasInstanceType* compare = HHasInstanceType::cast(v); | 1094 HHasInstanceType* compare = HHasInstanceType::cast(v); |
1082 ASSERT(compare->value()->representation().IsTagged()); | 1095 ASSERT(compare->value()->representation().IsTagged()); |
1083 | 1096 |
1084 return new LHasInstanceTypeAndBranch( | 1097 return new LHasInstanceTypeAndBranch( |
1085 UseRegisterAtStart(compare->value())); | 1098 UseRegisterAtStart(compare->value())); |
1086 } else if (v->IsHasCachedArrayIndex()) { | 1099 } else if (v->IsHasCachedArrayIndex()) { |
1087 HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v); | 1100 HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v); |
1088 ASSERT(compare->value()->representation().IsTagged()); | 1101 ASSERT(compare->value()->representation().IsTagged()); |
1089 | 1102 |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 | 1542 |
1530 | 1543 |
1531 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { | 1544 LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) { |
1532 ASSERT(instr->value()->representation().IsTagged()); | 1545 ASSERT(instr->value()->representation().IsTagged()); |
1533 LOperand* value = UseAtStart(instr->value()); | 1546 LOperand* value = UseAtStart(instr->value()); |
1534 | 1547 |
1535 return DefineAsRegister(new LIsSmi(value)); | 1548 return DefineAsRegister(new LIsSmi(value)); |
1536 } | 1549 } |
1537 | 1550 |
1538 | 1551 |
| 1552 LInstruction* LChunkBuilder::DoIsUndetectable(HIsUndetectable* instr) { |
| 1553 ASSERT(instr->value()->representation().IsTagged()); |
| 1554 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1555 |
| 1556 return DefineAsRegister(new LIsUndetectable(value)); |
| 1557 } |
| 1558 |
| 1559 |
1539 LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) { | 1560 LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) { |
1540 ASSERT(instr->value()->representation().IsTagged()); | 1561 ASSERT(instr->value()->representation().IsTagged()); |
1541 LOperand* value = UseRegisterAtStart(instr->value()); | 1562 LOperand* value = UseRegisterAtStart(instr->value()); |
1542 | 1563 |
1543 return DefineAsRegister(new LHasInstanceType(value)); | 1564 return DefineAsRegister(new LHasInstanceType(value)); |
1544 } | 1565 } |
1545 | 1566 |
1546 | 1567 |
1547 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( | 1568 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( |
1548 HGetCachedArrayIndex* instr) { | 1569 HGetCachedArrayIndex* instr) { |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2141 LOperand* key = UseOrConstantAtStart(instr->key()); | 2162 LOperand* key = UseOrConstantAtStart(instr->key()); |
2142 LOperand* object = UseOrConstantAtStart(instr->object()); | 2163 LOperand* object = UseOrConstantAtStart(instr->object()); |
2143 LIn* result = new LIn(key, object); | 2164 LIn* result = new LIn(key, object); |
2144 return MarkAsCall(DefineFixed(result, rax), instr); | 2165 return MarkAsCall(DefineFixed(result, rax), instr); |
2145 } | 2166 } |
2146 | 2167 |
2147 | 2168 |
2148 } } // namespace v8::internal | 2169 } } // namespace v8::internal |
2149 | 2170 |
2150 #endif // V8_TARGET_ARCH_X64 | 2171 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |