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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 void HValue::PrintRangeTo(StringStream* stream) { | 418 void HValue::PrintRangeTo(StringStream* stream) { |
419 if (range() == NULL || range()->IsMostGeneric()) return; | 419 if (range() == NULL || range()->IsMostGeneric()) return; |
420 stream->Add(" range[%d,%d,m0=%d]", | 420 stream->Add(" range[%d,%d,m0=%d]", |
421 range()->lower(), | 421 range()->lower(), |
422 range()->upper(), | 422 range()->upper(), |
423 static_cast<int>(range()->CanBeMinusZero())); | 423 static_cast<int>(range()->CanBeMinusZero())); |
424 } | 424 } |
425 | 425 |
426 | 426 |
427 void HValue::PrintChangesTo(StringStream* stream) { | 427 void HValue::PrintChangesTo(StringStream* stream) { |
428 int changes_flags = (flags() & HValue::ChangesFlagsMask()); | 428 int changes_flags = ChangesFlags(); |
429 if (changes_flags == 0) return; | 429 if (changes_flags == 0) return; |
430 stream->Add(" changes["); | 430 stream->Add(" changes["); |
431 if (changes_flags == AllSideEffects()) { | 431 if (changes_flags == AllSideEffects()) { |
432 stream->Add("*"); | 432 stream->Add("*"); |
433 } else { | 433 } else { |
434 bool add_comma = false; | 434 bool add_comma = false; |
435 #define PRINT_DO(type) \ | 435 #define PRINT_DO(type) \ |
436 if (changes_flags & (1 << kChanges##type)) { \ | 436 if (changes_flags & (1 << kChanges##type)) { \ |
437 if (add_comma) stream->Add(","); \ | 437 if (add_comma) stream->Add(","); \ |
438 add_comma = true; \ | 438 add_comma = true; \ |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 void HInstruction::PrintTo(StringStream* stream) { | 505 void HInstruction::PrintTo(StringStream* stream) { |
506 PrintMnemonicTo(stream); | 506 PrintMnemonicTo(stream); |
507 PrintDataTo(stream); | 507 PrintDataTo(stream); |
508 PrintRangeTo(stream); | 508 PrintRangeTo(stream); |
509 PrintChangesTo(stream); | 509 PrintChangesTo(stream); |
510 PrintTypeTo(stream); | 510 PrintTypeTo(stream); |
511 } | 511 } |
512 | 512 |
513 | 513 |
514 void HInstruction::PrintMnemonicTo(StringStream* stream) { | 514 void HInstruction::PrintMnemonicTo(StringStream* stream) { |
515 stream->Add("%s", Mnemonic()); | 515 stream->Add("%s ", Mnemonic()); |
516 if (HasSideEffects()) stream->Add("*"); | |
517 stream->Add(" "); | |
518 } | 516 } |
519 | 517 |
520 | 518 |
521 void HInstruction::Unlink() { | 519 void HInstruction::Unlink() { |
522 ASSERT(IsLinked()); | 520 ASSERT(IsLinked()); |
523 ASSERT(!IsControlInstruction()); // Must never move control instructions. | 521 ASSERT(!IsControlInstruction()); // Must never move control instructions. |
524 ASSERT(!IsBlockEntry()); // Doesn't make sense to delete these. | 522 ASSERT(!IsBlockEntry()); // Doesn't make sense to delete these. |
525 ASSERT(previous_ != NULL); | 523 ASSERT(previous_ != NULL); |
526 previous_->next_ = next_; | 524 previous_->next_ = next_; |
527 if (next_ == NULL) { | 525 if (next_ == NULL) { |
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1871 | 1869 |
1872 | 1870 |
1873 void HCheckPrototypeMaps::Verify() { | 1871 void HCheckPrototypeMaps::Verify() { |
1874 HInstruction::Verify(); | 1872 HInstruction::Verify(); |
1875 ASSERT(HasNoUses()); | 1873 ASSERT(HasNoUses()); |
1876 } | 1874 } |
1877 | 1875 |
1878 #endif | 1876 #endif |
1879 | 1877 |
1880 } } // namespace v8::internal | 1878 } } // namespace v8::internal |
OLD | NEW |