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

Side by Side Diff: runtime/vm/intermediate_language.cc

Issue 29023002: VM: Fix bug in optimization of identical comparisons. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 (cid == kMintCid) || 1533 (cid == kMintCid) ||
1534 (cid == kBigintCid) || 1534 (cid == kBigintCid) ||
1535 (cid == kDoubleCid); 1535 (cid == kDoubleCid);
1536 } 1536 }
1537 1537
1538 1538
1539 static bool MaybeNumber(CompileType* type) { 1539 static bool MaybeNumber(CompileType* type) {
1540 ASSERT(Type::Handle(Type::Number()).IsMoreSpecificThan( 1540 ASSERT(Type::Handle(Type::Number()).IsMoreSpecificThan(
1541 Type::Handle(Type::Number()), NULL)); 1541 Type::Handle(Type::Number()), NULL));
1542 return type->ToAbstractType()->IsDynamicType() 1542 return type->ToAbstractType()->IsDynamicType()
1543 || type->ToAbstractType()->IsTypeParameter()
1543 || type->IsMoreSpecificThan(Type::Handle(Type::Number())); 1544 || type->IsMoreSpecificThan(Type::Handle(Type::Number()));
1544 } 1545 }
1545 1546
1546 1547
1547 // Returns a replacement for a strict comparison and signals if the result has 1548 // Returns a replacement for a strict comparison and signals if the result has
1548 // to be negated. 1549 // to be negated.
1549 static Definition* CanonicalizeStrictCompare(StrictCompareInstr* compare, 1550 static Definition* CanonicalizeStrictCompare(StrictCompareInstr* compare,
1550 bool* negated) { 1551 bool* negated) {
1551 // Use propagated cid and type information to eliminate number checks. 1552 // Use propagated cid and type information to eliminate number checks.
1552 // If one of the inputs is not a boxable number (Mint, Double, Bigint), or 1553 // If one of the inputs is not a boxable number (Mint, Double, Bigint), or
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
2800 return kCosRuntimeEntry; 2801 return kCosRuntimeEntry;
2801 default: 2802 default:
2802 UNREACHABLE(); 2803 UNREACHABLE();
2803 } 2804 }
2804 return kSinRuntimeEntry; 2805 return kSinRuntimeEntry;
2805 } 2806 }
2806 2807
2807 #undef __ 2808 #undef __
2808 2809
2809 } // namespace dart 2810 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698