Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1042)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 7860035: Merge bleeding edge up to 9192 into the GC branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 782
785 void HChange::PrintDataTo(StringStream* stream) { 783 void HChange::PrintDataTo(StringStream* stream) {
786 HUnaryOperation::PrintDataTo(stream); 784 HUnaryOperation::PrintDataTo(stream);
787 stream->Add(" %s to %s", from_.Mnemonic(), to().Mnemonic()); 785 stream->Add(" %s to %s", from_.Mnemonic(), to().Mnemonic());
788 786
789 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); 787 if (CanTruncateToInt32()) stream->Add(" truncating-int32");
790 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); 788 if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
791 } 789 }
792 790
793 791
792 void HJSArrayLength::PrintDataTo(StringStream* stream) {
793 value()->PrintNameTo(stream);
794 stream->Add(" ");
795 typecheck()->PrintNameTo(stream);
796 }
797
798
794 HValue* HCheckInstanceType::Canonicalize() { 799 HValue* HCheckInstanceType::Canonicalize() {
795 if (check_ == IS_STRING && 800 if (check_ == IS_STRING &&
796 !value()->type().IsUninitialized() && 801 !value()->type().IsUninitialized() &&
797 value()->type().IsString()) { 802 value()->type().IsString()) {
798 return NULL; 803 return NULL;
799 } 804 }
800 if (check_ == IS_SYMBOL && 805 if (check_ == IS_SYMBOL &&
801 value()->IsConstant() && 806 value()->IsConstant() &&
802 HConstant::cast(value())->handle()->IsSymbol()) { 807 HConstant::cast(value())->handle()->IsSymbol()) {
803 return NULL; 808 return NULL;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 1018
1014 1019
1015 void HPhi::PrintTo(StringStream* stream) { 1020 void HPhi::PrintTo(StringStream* stream) {
1016 stream->Add("["); 1021 stream->Add("[");
1017 for (int i = 0; i < OperandCount(); ++i) { 1022 for (int i = 0; i < OperandCount(); ++i) {
1018 HValue* value = OperandAt(i); 1023 HValue* value = OperandAt(i);
1019 stream->Add(" "); 1024 stream->Add(" ");
1020 value->PrintNameTo(stream); 1025 value->PrintNameTo(stream);
1021 stream->Add(" "); 1026 stream->Add(" ");
1022 } 1027 }
1023 stream->Add(" uses%d_%di_%dd_%dt]", 1028 stream->Add(" uses%d_%di_%dd_%dt",
1024 UseCount(), 1029 UseCount(),
1025 int32_non_phi_uses() + int32_indirect_uses(), 1030 int32_non_phi_uses() + int32_indirect_uses(),
1026 double_non_phi_uses() + double_indirect_uses(), 1031 double_non_phi_uses() + double_indirect_uses(),
1027 tagged_non_phi_uses() + tagged_indirect_uses()); 1032 tagged_non_phi_uses() + tagged_indirect_uses());
1033 stream->Add("%s%s]",
1034 is_live() ? "_live" : "",
1035 IsConvertibleToInteger() ? "" : "_ncti");
1028 } 1036 }
1029 1037
1030 1038
1031 void HPhi::AddInput(HValue* value) { 1039 void HPhi::AddInput(HValue* value) {
1032 inputs_.Add(NULL); 1040 inputs_.Add(NULL);
1033 SetOperandAt(OperandCount() - 1, value); 1041 SetOperandAt(OperandCount() - 1, value);
1034 // Mark phis that may have 'arguments' directly or indirectly as an operand. 1042 // Mark phis that may have 'arguments' directly or indirectly as an operand.
1035 if (!CheckFlag(kIsArguments) && value->CheckFlag(kIsArguments)) { 1043 if (!CheckFlag(kIsArguments) && value->CheckFlag(kIsArguments)) {
1036 SetFlag(kIsArguments); 1044 SetFlag(kIsArguments);
1037 } 1045 }
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 1879
1872 1880
1873 void HCheckPrototypeMaps::Verify() { 1881 void HCheckPrototypeMaps::Verify() {
1874 HInstruction::Verify(); 1882 HInstruction::Verify();
1875 ASSERT(HasNoUses()); 1883 ASSERT(HasNoUses());
1876 } 1884 }
1877 1885
1878 #endif 1886 #endif
1879 1887
1880 } } // namespace v8::internal 1888 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698