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

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

Issue 726593002: Reland "Suppress canonicalization of Unbox() instruction that can deoptimize." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more fixes Created 6 years, 1 month 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 | « runtime/vm/flow_graph_range_analysis.cc ('k') | runtime/vm/intermediate_language.h » ('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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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/flow_graph_range_analysis.h" 5 #include "vm/flow_graph_range_analysis.h"
6 #include "vm/unit_test.h" 6 #include "vm/unit_test.h"
7 7
8 namespace dart { 8 namespace dart {
9 9
10 10
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 static_cast<int64_t>(0xffffffff), 524 static_cast<int64_t>(0xffffffff),
525 static_cast<int64_t>(0xffffffff), 525 static_cast<int64_t>(0xffffffff),
526 RangeBoundary(0), 526 RangeBoundary(0),
527 RangeBoundary(static_cast<int64_t>(0xffffffff))); 527 RangeBoundary(static_cast<int64_t>(0xffffffff)));
528 528
529 // Test that [-20, 20] & [-20, 20] = [Unknown, Unknown]. 529 // Test that [-20, 20] & [-20, 20] = [Unknown, Unknown].
530 TEST_RANGE_AND(static_cast<int64_t>(-20), 530 TEST_RANGE_AND(static_cast<int64_t>(-20),
531 static_cast<int64_t>(20), 531 static_cast<int64_t>(20),
532 static_cast<int64_t>(-20), 532 static_cast<int64_t>(-20),
533 static_cast<int64_t>(20), 533 static_cast<int64_t>(20),
534 RangeBoundary(), 534 RangeBoundary::MinConstant(RangeBoundary::kRangeBoundaryInt64),
535 RangeBoundary()); 535 RangeBoundary::MaxConstant(
536 RangeBoundary::kRangeBoundaryInt64));
536 537
537 #undef TEST_RANGE_AND 538 #undef TEST_RANGE_AND
538 } 539 }
539 540
540 541
541 TEST_CASE(RangeIntersectionMinMax) { 542 TEST_CASE(RangeIntersectionMinMax) {
542 // Test IntersectionMin and IntersectionMax methods which for constants are 543 // Test IntersectionMin and IntersectionMax methods which for constants are
543 // simply defined as Max/Min respectively. 544 // simply defined as Max/Min respectively.
544 545
545 // Constants. 546 // Constants.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 p_infinity, 697 p_infinity,
697 size).IsMaximumOrAbove(size)); 698 size).IsMaximumOrAbove(size));
698 699
699 EXPECT(RangeBoundary::JoinMax( 700 EXPECT(RangeBoundary::JoinMax(
700 p_infinity, 701 p_infinity,
701 RangeBoundary::FromConstant(1), 702 RangeBoundary::FromConstant(1),
702 size).IsMaximumOrAbove(size)); 703 size).IsMaximumOrAbove(size));
703 } 704 }
704 705
705 } // namespace dart 706 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_range_analysis.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698