| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 void HCallConstantFunction::PrintDataTo(StringStream* stream) const { | 563 void HCallConstantFunction::PrintDataTo(StringStream* stream) const { |
| 564 if (IsApplyFunction()) { | 564 if (IsApplyFunction()) { |
| 565 stream->Add("SPECIAL function: apply"); | 565 stream->Add("SPECIAL function: apply"); |
| 566 } else { | 566 } else { |
| 567 stream->Add("%s", *(function()->shared()->DebugName()->ToCString())); | 567 stream->Add("%s", *(function()->shared()->DebugName()->ToCString())); |
| 568 } | 568 } |
| 569 HCall::PrintDataTo(stream); | 569 HCall::PrintDataTo(stream); |
| 570 } | 570 } |
| 571 | 571 |
| 572 | 572 |
| 573 void HBranch::PrintDataTo(StringStream* stream) const { | 573 void HControlInstruction::PrintDataTo(StringStream* stream) const { |
| 574 int first_id = FirstSuccessor()->block_id(); | 574 if (FirstSuccessor() != NULL) { |
| 575 int second_id = SecondSuccessor()->block_id(); | 575 int first_id = FirstSuccessor()->block_id(); |
| 576 stream->Add("on "); | 576 if (SecondSuccessor() == NULL) { |
| 577 value()->PrintNameTo(stream); | 577 stream->Add(" B%d", first_id); |
| 578 stream->Add(" (B%d, B%d)", first_id, second_id); | 578 } else { |
| 579 int second_id = SecondSuccessor()->block_id(); |
| 580 stream->Add(" goto (B%d, B%d)", first_id, second_id); |
| 581 } |
| 582 } |
| 579 } | 583 } |
| 580 | 584 |
| 581 | 585 |
| 582 void HCompareMapAndBranch::PrintDataTo(StringStream* stream) const { | 586 void HUnaryControlInstruction::PrintDataTo(StringStream* stream) const { |
| 583 stream->Add("on "); | |
| 584 value()->PrintNameTo(stream); | 587 value()->PrintNameTo(stream); |
| 585 stream->Add(" (%p)", *map()); | 588 HControlInstruction::PrintDataTo(stream); |
| 586 } | 589 } |
| 587 | 590 |
| 588 | 591 |
| 589 void HGoto::PrintDataTo(StringStream* stream) const { | 592 void HCompareMap::PrintDataTo(StringStream* stream) const { |
| 590 stream->Add("B%d", FirstSuccessor()->block_id()); | 593 value()->PrintNameTo(stream); |
| 594 stream->Add(" (%p)", *map()); |
| 595 HControlInstruction::PrintDataTo(stream); |
| 591 } | 596 } |
| 592 | 597 |
| 593 | 598 |
| 594 void HReturn::PrintDataTo(StringStream* stream) const { | |
| 595 value()->PrintNameTo(stream); | |
| 596 } | |
| 597 | |
| 598 | |
| 599 void HThrow::PrintDataTo(StringStream* stream) const { | |
| 600 value()->PrintNameTo(stream); | |
| 601 } | |
| 602 | |
| 603 | |
| 604 const char* HUnaryMathOperation::OpName() const { | 599 const char* HUnaryMathOperation::OpName() const { |
| 605 switch (op()) { | 600 switch (op()) { |
| 606 case kMathFloor: return "floor"; | 601 case kMathFloor: return "floor"; |
| 607 case kMathRound: return "round"; | 602 case kMathRound: return "round"; |
| 608 case kMathCeil: return "ceil"; | 603 case kMathCeil: return "ceil"; |
| 609 case kMathAbs: return "abs"; | 604 case kMathAbs: return "abs"; |
| 610 case kMathLog: return "log"; | 605 case kMathLog: return "log"; |
| 611 case kMathSin: return "sin"; | 606 case kMathSin: return "sin"; |
| 612 case kMathCos: return "cos"; | 607 case kMathCos: return "cos"; |
| 613 case kMathTan: return "tan"; | 608 case kMathTan: return "tan"; |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1443 | 1438 |
| 1444 | 1439 |
| 1445 void HCheckPrototypeMaps::Verify() const { | 1440 void HCheckPrototypeMaps::Verify() const { |
| 1446 HInstruction::Verify(); | 1441 HInstruction::Verify(); |
| 1447 ASSERT(HasNoUses()); | 1442 ASSERT(HasNoUses()); |
| 1448 } | 1443 } |
| 1449 | 1444 |
| 1450 #endif | 1445 #endif |
| 1451 | 1446 |
| 1452 } } // namespace v8::internal | 1447 } } // namespace v8::internal |
| OLD | NEW |