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

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

Issue 1216463003: [strong] Implement strong mode semantics for the count operation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl feedback + eliminate runtime check Created 5 years, 5 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/hydrogen-instructions.h ('k') | src/ia32/full-codegen-ia32.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/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
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
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
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698