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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/double.h" | 8 #include "src/double.h" |
9 #include "src/elements.h" | 9 #include "src/elements.h" |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 3386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3397 // calling ToPrimitive() on their arguments. The standard Crankshaft | 3397 // calling ToPrimitive() on their arguments. The standard Crankshaft |
3398 // tagged-to-double conversion to ensure the HCompareNumericAndBranch's | 3398 // tagged-to-double conversion to ensure the HCompareNumericAndBranch's |
3399 // inputs are doubles caused 'undefined' to be converted to NaN. That's | 3399 // inputs are doubles caused 'undefined' to be converted to NaN. That's |
3400 // compatible out-of-the box with ordered relational comparisons (<, >, <=, | 3400 // compatible out-of-the box with ordered relational comparisons (<, >, <=, |
3401 // >=). However, for equality comparisons (and for 'in' and 'instanceof'), | 3401 // >=). However, for equality comparisons (and for 'in' and 'instanceof'), |
3402 // it is not consistent with the spec. For example, it would cause undefined | 3402 // it is not consistent with the spec. For example, it would cause undefined |
3403 // == undefined (should be true) to be evaluated as NaN == NaN | 3403 // == undefined (should be true) to be evaluated as NaN == NaN |
3404 // (false). Therefore, any comparisons other than ordered relational | 3404 // (false). Therefore, any comparisons other than ordered relational |
3405 // comparisons must cause a deopt when one of their arguments is undefined. | 3405 // comparisons must cause a deopt when one of their arguments is undefined. |
3406 // See also v8:1434 | 3406 // See also v8:1434 |
3407 if (Token::IsOrderedRelationalCompareOp(token_)) { | 3407 if (Token::IsOrderedRelationalCompareOp(token_) && !is_strong(strength())) { |
3408 SetFlag(kAllowUndefinedAsNaN); | 3408 SetFlag(kAllowUndefinedAsNaN); |
3409 } | 3409 } |
3410 } | 3410 } |
3411 ChangeRepresentation(rep); | 3411 ChangeRepresentation(rep); |
3412 } | 3412 } |
3413 | 3413 |
3414 | 3414 |
3415 std::ostream& HParameter::PrintDataTo(std::ostream& os) const { // NOLINT | 3415 std::ostream& HParameter::PrintDataTo(std::ostream& os) const { // NOLINT |
3416 return os << index(); | 3416 return os << index(); |
3417 } | 3417 } |
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4708 case HObjectAccess::kExternalMemory: | 4708 case HObjectAccess::kExternalMemory: |
4709 os << "[external-memory]"; | 4709 os << "[external-memory]"; |
4710 break; | 4710 break; |
4711 } | 4711 } |
4712 | 4712 |
4713 return os << "@" << access.offset(); | 4713 return os << "@" << access.offset(); |
4714 } | 4714 } |
4715 | 4715 |
4716 } // namespace internal | 4716 } // namespace internal |
4717 } // namespace v8 | 4717 } // namespace v8 |
OLD | NEW |