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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } | 221 } |
222 | 222 |
223 | 223 |
224 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { | 224 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { |
225 stream->Add("if is_object("); | 225 stream->Add("if is_object("); |
226 InputAt(0)->PrintTo(stream); | 226 InputAt(0)->PrintTo(stream); |
227 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 227 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
228 } | 228 } |
229 | 229 |
230 | 230 |
| 231 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { |
| 232 stream->Add("if is_string("); |
| 233 InputAt(0)->PrintTo(stream); |
| 234 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 235 } |
| 236 |
| 237 |
231 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { | 238 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { |
232 stream->Add("if is_smi("); | 239 stream->Add("if is_smi("); |
233 InputAt(0)->PrintTo(stream); | 240 InputAt(0)->PrintTo(stream); |
234 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 241 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
235 } | 242 } |
236 | 243 |
237 | 244 |
238 void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) { | 245 void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) { |
239 stream->Add("if is_undetectable("); | 246 stream->Add("if is_undetectable("); |
240 InputAt(0)->PrintTo(stream); | 247 InputAt(0)->PrintTo(stream); |
241 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 248 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
242 } | 249 } |
243 | 250 |
244 | 251 |
| 252 void LStringCompareAndBranch::PrintDataTo(StringStream* stream) { |
| 253 stream->Add("if compare_generic("); |
| 254 InputAt(0)->PrintTo(stream); |
| 255 InputAt(1)->PrintTo(stream); |
| 256 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
| 257 } |
| 258 |
| 259 |
245 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { | 260 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { |
246 stream->Add("if has_instance_type("); | 261 stream->Add("if has_instance_type("); |
247 InputAt(0)->PrintTo(stream); | 262 InputAt(0)->PrintTo(stream); |
248 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 263 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
249 } | 264 } |
250 | 265 |
251 | 266 |
252 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { | 267 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { |
253 stream->Add("if has_cached_array_index("); | 268 stream->Add("if has_cached_array_index("); |
254 InputAt(0)->PrintTo(stream); | 269 InputAt(0)->PrintTo(stream); |
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 } | 1460 } |
1446 | 1461 |
1447 | 1462 |
1448 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { | 1463 LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { |
1449 ASSERT(instr->value()->representation().IsTagged()); | 1464 ASSERT(instr->value()->representation().IsTagged()); |
1450 LOperand* temp = TempRegister(); | 1465 LOperand* temp = TempRegister(); |
1451 return new LIsObjectAndBranch(UseRegisterAtStart(instr->value()), temp); | 1466 return new LIsObjectAndBranch(UseRegisterAtStart(instr->value()), temp); |
1452 } | 1467 } |
1453 | 1468 |
1454 | 1469 |
| 1470 LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { |
| 1471 ASSERT(instr->value()->representation().IsTagged()); |
| 1472 LOperand* temp = TempRegister(); |
| 1473 return new LIsStringAndBranch(UseRegisterAtStart(instr->value()), temp); |
| 1474 } |
| 1475 |
| 1476 |
1455 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { | 1477 LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) { |
1456 ASSERT(instr->value()->representation().IsTagged()); | 1478 ASSERT(instr->value()->representation().IsTagged()); |
1457 return new LIsSmiAndBranch(Use(instr->value())); | 1479 return new LIsSmiAndBranch(Use(instr->value())); |
1458 } | 1480 } |
1459 | 1481 |
1460 | 1482 |
1461 LInstruction* LChunkBuilder::DoIsUndetectableAndBranch( | 1483 LInstruction* LChunkBuilder::DoIsUndetectableAndBranch( |
1462 HIsUndetectableAndBranch* instr) { | 1484 HIsUndetectableAndBranch* instr) { |
1463 ASSERT(instr->value()->representation().IsTagged()); | 1485 ASSERT(instr->value()->representation().IsTagged()); |
1464 return new LIsUndetectableAndBranch(UseRegisterAtStart(instr->value()), | 1486 return new LIsUndetectableAndBranch(UseRegisterAtStart(instr->value()), |
1465 TempRegister()); | 1487 TempRegister()); |
1466 } | 1488 } |
1467 | 1489 |
1468 | 1490 |
| 1491 LInstruction* LChunkBuilder::DoStringCompareAndBranch( |
| 1492 HStringCompareAndBranch* instr) { |
| 1493 |
| 1494 ASSERT(instr->left()->representation().IsTagged()); |
| 1495 ASSERT(instr->right()->representation().IsTagged()); |
| 1496 LOperand* left = UseFixed(instr->left(), r1); |
| 1497 LOperand* right = UseFixed(instr->right(), r0); |
| 1498 LStringCompareAndBranch* result = new LStringCompareAndBranch(left, right); |
| 1499 return MarkAsCall(result, instr); |
| 1500 } |
| 1501 |
| 1502 |
1469 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( | 1503 LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch( |
1470 HHasInstanceTypeAndBranch* instr) { | 1504 HHasInstanceTypeAndBranch* instr) { |
1471 ASSERT(instr->value()->representation().IsTagged()); | 1505 ASSERT(instr->value()->representation().IsTagged()); |
1472 return new LHasInstanceTypeAndBranch(UseRegisterAtStart(instr->value())); | 1506 return new LHasInstanceTypeAndBranch(UseRegisterAtStart(instr->value())); |
1473 } | 1507 } |
1474 | 1508 |
1475 | 1509 |
1476 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( | 1510 LInstruction* LChunkBuilder::DoGetCachedArrayIndex( |
1477 HGetCachedArrayIndex* instr) { | 1511 HGetCachedArrayIndex* instr) { |
1478 ASSERT(instr->value()->representation().IsTagged()); | 1512 ASSERT(instr->value()->representation().IsTagged()); |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2194 | 2228 |
2195 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2229 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
2196 LOperand* key = UseRegisterAtStart(instr->key()); | 2230 LOperand* key = UseRegisterAtStart(instr->key()); |
2197 LOperand* object = UseRegisterAtStart(instr->object()); | 2231 LOperand* object = UseRegisterAtStart(instr->object()); |
2198 LIn* result = new LIn(key, object); | 2232 LIn* result = new LIn(key, object); |
2199 return MarkAsCall(DefineFixed(result, r0), instr); | 2233 return MarkAsCall(DefineFixed(result, r0), instr); |
2200 } | 2234 } |
2201 | 2235 |
2202 | 2236 |
2203 } } // namespace v8::internal | 2237 } } // namespace v8::internal |
OLD | NEW |