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

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

Issue 58923004: Make HTypeofIsAndBranch accept any representation input (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Use KnownSuccessorBlock infrastructure Created 7 years, 1 month 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
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 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 } 1170 }
1171 1171
1172 1172
1173 void HTypeofIsAndBranch::PrintDataTo(StringStream* stream) { 1173 void HTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
1174 value()->PrintNameTo(stream); 1174 value()->PrintNameTo(stream);
1175 stream->Add(" == %o", *type_literal_); 1175 stream->Add(" == %o", *type_literal_);
1176 HControlInstruction::PrintDataTo(stream); 1176 HControlInstruction::PrintDataTo(stream);
1177 } 1177 }
1178 1178
1179 1179
1180 bool HTypeofIsAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
1181 if (value()->representation().IsSpecialization()) {
1182 if (CheckNumberString()) {
1183 *block = FirstSuccessor();
1184 } else {
1185 *block = SecondSuccessor();
1186 }
1187 return true;
1188 }
1189 *block = NULL;
1190 return false;
1191 }
1192
1193
1180 void HCheckMapValue::PrintDataTo(StringStream* stream) { 1194 void HCheckMapValue::PrintDataTo(StringStream* stream) {
1181 value()->PrintNameTo(stream); 1195 value()->PrintNameTo(stream);
1182 stream->Add(" "); 1196 stream->Add(" ");
1183 map()->PrintNameTo(stream); 1197 map()->PrintNameTo(stream);
1184 } 1198 }
1185 1199
1186 1200
1187 void HForInPrepareMap::PrintDataTo(StringStream* stream) { 1201 void HForInPrepareMap::PrintDataTo(StringStream* stream) {
1188 enumerable()->PrintNameTo(stream); 1202 enumerable()->PrintNameTo(stream);
1189 } 1203 }
(...skipping 3108 matching lines...) Expand 10 before | Expand all | Expand 10 after
4298 break; 4312 break;
4299 case kExternalMemory: 4313 case kExternalMemory:
4300 stream->Add("[external-memory]"); 4314 stream->Add("[external-memory]");
4301 break; 4315 break;
4302 } 4316 }
4303 4317
4304 stream->Add("@%d", offset()); 4318 stream->Add("@%d", offset());
4305 } 4319 }
4306 4320
4307 } } // namespace v8::internal 4321 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698