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

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

Issue 310593004: Revert "Handle HCheckInstanceType and HIsStringAndBranch in check elimination." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/unique.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "double.h" 7 #include "double.h"
8 #include "factory.h" 8 #include "factory.h"
9 #include "hydrogen-infer-representation.h" 9 #include "hydrogen-infer-representation.h"
10 #include "property-details-inl.h" 10 #include "property-details-inl.h"
(...skipping 3238 matching lines...) Expand 10 before | Expand all | Expand 10 after
3249 *block = ConstantIsObject(HConstant::cast(value()), isolate()) 3249 *block = ConstantIsObject(HConstant::cast(value()), isolate())
3250 ? FirstSuccessor() : SecondSuccessor(); 3250 ? FirstSuccessor() : SecondSuccessor();
3251 return true; 3251 return true;
3252 } 3252 }
3253 *block = NULL; 3253 *block = NULL;
3254 return false; 3254 return false;
3255 } 3255 }
3256 3256
3257 3257
3258 bool HIsStringAndBranch::KnownSuccessorBlock(HBasicBlock** block) { 3258 bool HIsStringAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
3259 if (known_successor_index() != kNoKnownSuccessorIndex) {
3260 *block = SuccessorAt(known_successor_index());
3261 return true;
3262 }
3263 if (FLAG_fold_constants && value()->IsConstant()) { 3259 if (FLAG_fold_constants && value()->IsConstant()) {
3264 *block = HConstant::cast(value())->HasStringValue() 3260 *block = HConstant::cast(value())->HasStringValue()
3265 ? FirstSuccessor() : SecondSuccessor(); 3261 ? FirstSuccessor() : SecondSuccessor();
3266 return true; 3262 return true;
3267 } 3263 }
3268 if (value()->type().IsString()) {
3269 *block = FirstSuccessor();
3270 return true;
3271 }
3272 if (value()->type().IsSmi() ||
3273 value()->type().IsNull() ||
3274 value()->type().IsBoolean() ||
3275 value()->type().IsUndefined() ||
3276 value()->type().IsJSObject()) {
3277 *block = SecondSuccessor();
3278 return true;
3279 }
3280 *block = NULL; 3264 *block = NULL;
3281 return false; 3265 return false;
3282 } 3266 }
3283 3267
3284 3268
3285 bool HIsUndetectableAndBranch::KnownSuccessorBlock(HBasicBlock** block) { 3269 bool HIsUndetectableAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
3286 if (FLAG_fold_constants && value()->IsConstant()) { 3270 if (FLAG_fold_constants && value()->IsConstant()) {
3287 *block = HConstant::cast(value())->IsUndetectable() 3271 *block = HConstant::cast(value())->IsUndetectable()
3288 ? FirstSuccessor() : SecondSuccessor(); 3272 ? FirstSuccessor() : SecondSuccessor();
3289 return true; 3273 return true;
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after
4762 break; 4746 break;
4763 case kExternalMemory: 4747 case kExternalMemory:
4764 stream->Add("[external-memory]"); 4748 stream->Add("[external-memory]");
4765 break; 4749 break;
4766 } 4750 }
4767 4751
4768 stream->Add("@%d", offset()); 4752 stream->Add("@%d", offset());
4769 } 4753 }
4770 4754
4771 } } // namespace v8::internal 4755 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/unique.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698