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

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

Issue 9190047: Fixing issue 1898 (using HChange outside the insert-representation-changes phase). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 8 years, 11 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') | test/mjsunit/regress/regress-1898.js » ('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 2012 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
11 // with the distribution. 11 // with the distribution.
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 } 799 }
800 if (right()->IsConstant() && 800 if (right()->IsConstant() &&
801 HConstant::cast(right())->HasInteger32Value() && 801 HConstant::cast(right())->HasInteger32Value() &&
802 HConstant::cast(right())->Integer32Value() == nop_constant) { 802 HConstant::cast(right())->Integer32Value() == nop_constant) {
803 return left(); 803 return left();
804 } 804 }
805 return this; 805 return this;
806 } 806 }
807 807
808 808
809 HValue* HChange::Canonicalize() {
810 return (from().Equals(to())) ? value() : this;
811 }
812
813
809 void HTypeof::PrintDataTo(StringStream* stream) { 814 void HTypeof::PrintDataTo(StringStream* stream) {
810 value()->PrintNameTo(stream); 815 value()->PrintNameTo(stream);
811 } 816 }
812 817
813 818
814 void HChange::PrintDataTo(StringStream* stream) { 819 void HChange::PrintDataTo(StringStream* stream) {
815 HUnaryOperation::PrintDataTo(stream); 820 HUnaryOperation::PrintDataTo(stream);
816 stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic()); 821 stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic());
817 822
818 if (CanTruncateToInt32()) stream->Add(" truncating-int32"); 823 if (CanTruncateToInt32()) stream->Add(" truncating-int32");
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 2129
2125 2130
2126 void HCheckPrototypeMaps::Verify() { 2131 void HCheckPrototypeMaps::Verify() {
2127 HInstruction::Verify(); 2132 HInstruction::Verify();
2128 ASSERT(HasNoUses()); 2133 ASSERT(HasNoUses());
2129 } 2134 }
2130 2135
2131 #endif 2136 #endif
2132 2137
2133 } } // namespace v8::internal 2138 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | test/mjsunit/regress/regress-1898.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698