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

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

Issue 150663005: Optimize redundant HCompareMap instructions with known successors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/lithium-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 2012 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
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 } 1110 }
1111 *block = NULL; 1111 *block = NULL;
1112 return false; 1112 return false;
1113 } 1113 }
1114 1114
1115 1115
1116 void HCompareMap::PrintDataTo(StringStream* stream) { 1116 void HCompareMap::PrintDataTo(StringStream* stream) {
1117 value()->PrintNameTo(stream); 1117 value()->PrintNameTo(stream);
1118 stream->Add(" (%p)", *map().handle()); 1118 stream->Add(" (%p)", *map().handle());
1119 HControlInstruction::PrintDataTo(stream); 1119 HControlInstruction::PrintDataTo(stream);
1120 if (known_successor_index() == 0) {
1121 stream->Add(" [true]");
1122 } else if (known_successor_index() == 1) {
1123 stream->Add(" [false]");
1124 }
1120 } 1125 }
1121 1126
1122 1127
1123 const char* HUnaryMathOperation::OpName() const { 1128 const char* HUnaryMathOperation::OpName() const {
1124 switch (op()) { 1129 switch (op()) {
1125 case kMathFloor: return "floor"; 1130 case kMathFloor: return "floor";
1126 case kMathRound: return "round"; 1131 case kMathRound: return "round";
1127 case kMathAbs: return "abs"; 1132 case kMathAbs: return "abs";
1128 case kMathLog: return "log"; 1133 case kMathLog: return "log";
1129 case kMathExp: return "exp"; 1134 case kMathExp: return "exp";
(...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after
4461 break; 4466 break;
4462 case kExternalMemory: 4467 case kExternalMemory:
4463 stream->Add("[external-memory]"); 4468 stream->Add("[external-memory]");
4464 break; 4469 break;
4465 } 4470 }
4466 4471
4467 stream->Add("@%d", offset()); 4472 stream->Add("@%d", offset());
4468 } 4473 }
4469 4474
4470 } } // namespace v8::internal 4475 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698