| 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/ieee754.h" | 8 #include "src/base/ieee754.h" |
| 9 #include "src/base/safe_math.h" | 9 #include "src/base/safe_math.h" |
| 10 #include "src/crankshaft/hydrogen-infer-representation.h" | 10 #include "src/crankshaft/hydrogen-infer-representation.h" |
| (...skipping 3271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3282 bool HStoreKeyed::NeedsCanonicalization() { | 3282 bool HStoreKeyed::NeedsCanonicalization() { |
| 3283 switch (value()->opcode()) { | 3283 switch (value()->opcode()) { |
| 3284 case kLoadKeyed: { | 3284 case kLoadKeyed: { |
| 3285 ElementsKind load_kind = HLoadKeyed::cast(value())->elements_kind(); | 3285 ElementsKind load_kind = HLoadKeyed::cast(value())->elements_kind(); |
| 3286 return IsFixedFloatElementsKind(load_kind); | 3286 return IsFixedFloatElementsKind(load_kind); |
| 3287 } | 3287 } |
| 3288 case kChange: { | 3288 case kChange: { |
| 3289 Representation from = HChange::cast(value())->from(); | 3289 Representation from = HChange::cast(value())->from(); |
| 3290 return from.IsTagged() || from.IsHeapObject(); | 3290 return from.IsTagged() || from.IsHeapObject(); |
| 3291 } | 3291 } |
| 3292 case kLoadNamedField: | 3292 case kConstant: { |
| 3293 case kPhi: { | 3293 return HConstant::cast(value())->DoubleValueAsBits() == kHoleNanInt64; |
| 3294 // Better safe than sorry... | |
| 3295 return true; | |
| 3296 } | 3294 } |
| 3297 default: | 3295 default: |
| 3298 return false; | 3296 return !value()->IsBinaryOperation(); |
| 3299 } | 3297 } |
| 3300 } | 3298 } |
| 3301 | 3299 |
| 3302 | 3300 |
| 3303 #define H_CONSTANT_INT(val) \ | 3301 #define H_CONSTANT_INT(val) \ |
| 3304 HConstant::New(isolate, zone, context, static_cast<int32_t>(val)) | 3302 HConstant::New(isolate, zone, context, static_cast<int32_t>(val)) |
| 3305 #define H_CONSTANT_DOUBLE(val) \ | 3303 #define H_CONSTANT_DOUBLE(val) \ |
| 3306 HConstant::New(isolate, zone, context, static_cast<double>(val)) | 3304 HConstant::New(isolate, zone, context, static_cast<double>(val)) |
| 3307 | 3305 |
| 3308 #define DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR(HInstr, op) \ | 3306 #define DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR(HInstr, op) \ |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4041 case HObjectAccess::kExternalMemory: | 4039 case HObjectAccess::kExternalMemory: |
| 4042 os << "[external-memory]"; | 4040 os << "[external-memory]"; |
| 4043 break; | 4041 break; |
| 4044 } | 4042 } |
| 4045 | 4043 |
| 4046 return os << "@" << access.offset(); | 4044 return os << "@" << access.offset(); |
| 4047 } | 4045 } |
| 4048 | 4046 |
| 4049 } // namespace internal | 4047 } // namespace internal |
| 4050 } // namespace v8 | 4048 } // namespace v8 |
| OLD | NEW |