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: rebase 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
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/full-codegen-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 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 (compares_number_type()) {
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 3154 matching lines...) Expand 10 before | Expand all | Expand 10 after
4344 break; 4358 break;
4345 case kExternalMemory: 4359 case kExternalMemory:
4346 stream->Add("[external-memory]"); 4360 stream->Add("[external-memory]");
4347 break; 4361 break;
4348 } 4362 }
4349 4363
4350 stream->Add("@%d", offset()); 4364 stream->Add("@%d", offset());
4351 } 4365 }
4352 4366
4353 } } // namespace v8::internal 4367 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698