| OLD | NEW |
| 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 Loading... |
| 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 } |
| 3275 *block = NULL; | 3286 *block = NULL; |
| 3276 return false; | 3287 return false; |
| 3277 } | 3288 } |
| 3278 | 3289 |
| 3279 | 3290 |
| 3280 bool HHasInstanceTypeAndBranch::KnownSuccessorBlock(HBasicBlock** block) { | 3291 bool HHasInstanceTypeAndBranch::KnownSuccessorBlock(HBasicBlock** block) { |
| 3281 if (FLAG_fold_constants && value()->IsConstant()) { | 3292 if (FLAG_fold_constants && value()->IsConstant()) { |
| 3282 InstanceType type = HConstant::cast(value())->GetInstanceType(); | 3293 InstanceType type = HConstant::cast(value())->GetInstanceType(); |
| 3283 *block = (from_ <= type) && (type <= to_) | 3294 *block = (from_ <= type) && (type <= to_) |
| 3284 ? FirstSuccessor() : SecondSuccessor(); | 3295 ? FirstSuccessor() : SecondSuccessor(); |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4643 case HObjectAccess::kExternalMemory: | 4654 case HObjectAccess::kExternalMemory: |
| 4644 os << "[external-memory]"; | 4655 os << "[external-memory]"; |
| 4645 break; | 4656 break; |
| 4646 } | 4657 } |
| 4647 | 4658 |
| 4648 return os << "@" << access.offset(); | 4659 return os << "@" << access.offset(); |
| 4649 } | 4660 } |
| 4650 | 4661 |
| 4651 } // namespace internal | 4662 } // namespace internal |
| 4652 } // namespace v8 | 4663 } // namespace v8 |
| OLD | NEW |