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

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

Issue 1743433002: Revert of [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-types.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 // 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 "src/crankshaft/hydrogen-instructions.h" 5 #include "src/crankshaft/hydrogen-instructions.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/safe_math.h" 8 #include "src/base/safe_math.h"
9 #include "src/crankshaft/hydrogen-infer-representation.h" 9 #include "src/crankshaft/hydrogen-infer-representation.h"
10 #include "src/double.h" 10 #include "src/double.h"
(...skipping 3254 matching lines...) Expand 10 before | Expand all | Expand 10 after
3265 return false; 3265 return false;
3266 } 3266 }
3267 3267
3268 3268
3269 bool HIsUndetectableAndBranch::KnownSuccessorBlock(HBasicBlock** block) { 3269 bool HIsUndetectableAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
3270 if (FLAG_fold_constants && value()->IsConstant()) { 3270 if (FLAG_fold_constants && value()->IsConstant()) {
3271 *block = HConstant::cast(value())->IsUndetectable() 3271 *block = HConstant::cast(value())->IsUndetectable()
3272 ? FirstSuccessor() : SecondSuccessor(); 3272 ? FirstSuccessor() : SecondSuccessor();
3273 return true; 3273 return true;
3274 } 3274 }
3275 if (value()->type().IsNull() || value()->type().IsUndefined()) {
3276 *block = FirstSuccessor();
3277 return true;
3278 }
3279 if (value()->type().IsBoolean() ||
3280 value()->type().IsSmi() ||
3281 value()->type().IsString() ||
3282 value()->type().IsJSReceiver()) {
3283 *block = SecondSuccessor();
3284 return true;
3285 }
3286 *block = NULL; 3275 *block = NULL;
3287 return false; 3276 return false;
3288 } 3277 }
3289 3278
3290 3279
3291 bool HHasInstanceTypeAndBranch::KnownSuccessorBlock(HBasicBlock** block) { 3280 bool HHasInstanceTypeAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
3292 if (FLAG_fold_constants && value()->IsConstant()) { 3281 if (FLAG_fold_constants && value()->IsConstant()) {
3293 InstanceType type = HConstant::cast(value())->GetInstanceType(); 3282 InstanceType type = HConstant::cast(value())->GetInstanceType();
3294 *block = (from_ <= type) && (type <= to_) 3283 *block = (from_ <= type) && (type <= to_)
3295 ? FirstSuccessor() : SecondSuccessor(); 3284 ? FirstSuccessor() : SecondSuccessor();
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
4654 case HObjectAccess::kExternalMemory: 4643 case HObjectAccess::kExternalMemory:
4655 os << "[external-memory]"; 4644 os << "[external-memory]";
4656 break; 4645 break;
4657 } 4646 }
4658 4647
4659 return os << "@" << access.offset(); 4648 return os << "@" << access.offset();
4660 } 4649 }
4661 4650
4662 } // namespace internal 4651 } // namespace internal
4663 } // namespace v8 4652 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/crankshaft/hydrogen-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698