 Chromium Code Reviews
 Chromium Code Reviews Issue 8334021:
  Recognize special comparisons via pattern matching on the hydrogen graph, 2nd attempt.  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
    
  
    Issue 8334021:
  Recognize special comparisons via pattern matching on the hydrogen graph, 2nd attempt.  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/| 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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 780 } | 780 } | 
| 781 | 781 | 
| 782 | 782 | 
| 783 void HTypeofIsAndBranch::PrintDataTo(StringStream* stream) { | 783 void HTypeofIsAndBranch::PrintDataTo(StringStream* stream) { | 
| 784 value()->PrintNameTo(stream); | 784 value()->PrintNameTo(stream); | 
| 785 stream->Add(" == %o", *type_literal_); | 785 stream->Add(" == %o", *type_literal_); | 
| 786 HControlInstruction::PrintDataTo(stream); | 786 HControlInstruction::PrintDataTo(stream); | 
| 787 } | 787 } | 
| 788 | 788 | 
| 789 | 789 | 
| 790 HValue* HConstant::Canonicalize() { | |
| 791 return HasNoUses()&& !IsBlockEntry() ? NULL : this; | |
| 
Kevin Millikin (Chromium)
2011/10/19 07:24:41
Missing a space before &&, also below.
 
Sven Panne
2011/10/19 07:33:32
Done.
 | |
| 792 } | |
| 793 | |
| 794 | |
| 795 HValue* HTypeof::Canonicalize() { | |
| 796 return HasNoUses()&& !IsBlockEntry() ? NULL : this; | |
| 797 } | |
| 798 | |
| 799 | |
| 790 void HTypeof::PrintDataTo(StringStream* stream) { | 800 void HTypeof::PrintDataTo(StringStream* stream) { | 
| 791 value()->PrintNameTo(stream); | 801 value()->PrintNameTo(stream); | 
| 792 } | 802 } | 
| 793 | 803 | 
| 794 | 804 | 
| 795 void HChange::PrintDataTo(StringStream* stream) { | 805 void HChange::PrintDataTo(StringStream* stream) { | 
| 796 HUnaryOperation::PrintDataTo(stream); | 806 HUnaryOperation::PrintDataTo(stream); | 
| 797 stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic()); | 807 stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic()); | 
| 798 | 808 | 
| 799 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); | 809 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); | 
| (...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1964 | 1974 | 
| 1965 | 1975 | 
| 1966 void HCheckPrototypeMaps::Verify() { | 1976 void HCheckPrototypeMaps::Verify() { | 
| 1967 HInstruction::Verify(); | 1977 HInstruction::Verify(); | 
| 1968 ASSERT(HasNoUses()); | 1978 ASSERT(HasNoUses()); | 
| 1969 } | 1979 } | 
| 1970 | 1980 | 
| 1971 #endif | 1981 #endif | 
| 1972 | 1982 | 
| 1973 } } // namespace v8::internal | 1983 } } // namespace v8::internal | 
| OLD | NEW |