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

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

Issue 1722193002: [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
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 3249 matching lines...) Expand 10 before | Expand all | Expand 10 after
3260 value()->type().IsJSReceiver()) { 3260 value()->type().IsJSReceiver()) {
3261 *block = SecondSuccessor(); 3261 *block = SecondSuccessor();
3262 return true; 3262 return true;
3263 } 3263 }
3264 *block = NULL; 3264 *block = NULL;
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 (known_successor_index() != kNoKnownSuccessorIndex) {
3271 *block = SuccessorAt(known_successor_index());
3272 return true;
3273 }
3270 if (FLAG_fold_constants && value()->IsConstant()) { 3274 if (FLAG_fold_constants && value()->IsConstant()) {
3271 *block = HConstant::cast(value())->IsUndetectable() 3275 *block = HConstant::cast(value())->IsUndetectable()
3272 ? FirstSuccessor() : SecondSuccessor(); 3276 ? FirstSuccessor() : SecondSuccessor();
3273 return true; 3277 return true;
3274 } 3278 }
3279 if (value()->type().IsNull() || value()->type().IsUndefined()) {
3280 *block = FirstSuccessor();
3281 return true;
3282 }
3283 if (value()->type().IsBoolean() ||
3284 value()->type().IsSmi() ||
3285 value()->type().IsString() ||
3286 value()->type().IsJSReceiver()) {
3287 *block = SecondSuccessor();
3288 return true;
3289 }
3275 *block = NULL; 3290 *block = NULL;
3276 return false; 3291 return false;
3277 } 3292 }
3278 3293
3279 3294
3280 bool HHasInstanceTypeAndBranch::KnownSuccessorBlock(HBasicBlock** block) { 3295 bool HHasInstanceTypeAndBranch::KnownSuccessorBlock(HBasicBlock** block) {
3281 if (FLAG_fold_constants && value()->IsConstant()) { 3296 if (FLAG_fold_constants && value()->IsConstant()) {
3282 InstanceType type = HConstant::cast(value())->GetInstanceType(); 3297 InstanceType type = HConstant::cast(value())->GetInstanceType();
3283 *block = (from_ <= type) && (type <= to_) 3298 *block = (from_ <= type) && (type <= to_)
3284 ? FirstSuccessor() : SecondSuccessor(); 3299 ? FirstSuccessor() : SecondSuccessor();
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
4643 case HObjectAccess::kExternalMemory: 4658 case HObjectAccess::kExternalMemory:
4644 os << "[external-memory]"; 4659 os << "[external-memory]";
4645 break; 4660 break;
4646 } 4661 }
4647 4662
4648 return os << "@" << access.offset(); 4663 return os << "@" << access.offset();
4649 } 4664 }
4650 4665
4651 } // namespace internal 4666 } // namespace internal
4652 } // namespace v8 4667 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698