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

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

Issue 1978603002: Remove DebuggerEvent. Refactor remaining code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
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 TEST_CASE(RangeTests) { 10 TEST_CASE(RangeTests) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 RangeBoundary(-60), RangeBoundary(-20)); 69 RangeBoundary(-60), RangeBoundary(-20));
70 TEST_RANGE_OP(Range::Shl, 5, 10, -2, 2, 70 TEST_RANGE_OP(Range::Shl, 5, 10, -2, 2,
71 RangeBoundary(5), RangeBoundary(40)); 71 RangeBoundary(5), RangeBoundary(40));
72 TEST_RANGE_OP(Range::Shl, -15, 100, 0, 64, 72 TEST_RANGE_OP(Range::Shl, -15, 100, 0, 64,
73 RangeBoundary::NegativeInfinity(), 73 RangeBoundary::NegativeInfinity(),
74 RangeBoundary::PositiveInfinity()); 74 RangeBoundary::PositiveInfinity());
75 TEST_RANGE_OP(Range::Shl, -1, 1, 63, 63, 75 TEST_RANGE_OP(Range::Shl, -1, 1, 63, 63,
76 RangeBoundary(kMinInt64), 76 RangeBoundary(kMinInt64),
77 RangeBoundary::PositiveInfinity()); 77 RangeBoundary::PositiveInfinity());
78 if (kBitsPerWord == 64) { 78 if (kBitsPerWord == 64) {
79 #if 0
turnidge 2016/05/12 20:06:05 Ignore this change -- I need it because I am on th
turnidge 2016/05/13 15:49:35 I fixed the warning I was seeing in the most recen
79 TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 62, 62, 80 TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 62, 62,
80 RangeBoundary(kSmiMin), 81 RangeBoundary(kSmiMin),
81 RangeBoundary(kSmiMax)); 82  RangeBoundary(kSmiMax));
82 TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 30, 30, 83 TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 30, 30,
83 RangeBoundary(-1 << 30), 84 RangeBoundary(-1 << 30),
84 RangeBoundary(1 << 30)); 85  RangeBoundary(1 << 30));
86 #endif
85 } else { 87 } else {
86 TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 30, 30, 88 TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 30, 30,
87 RangeBoundary(kSmiMin), 89 RangeBoundary(kSmiMin),
88 RangeBoundary(kSmiMax)); 90 RangeBoundary(kSmiMax));
89 TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 62, 62, 91 TEST_RANGE_OP_SMI(Range::Shl, -1, 1, 62, 62,
90 RangeBoundary(kSmiMin), 92 RangeBoundary(kSmiMin),
91 RangeBoundary(kSmiMax)); 93 RangeBoundary(kSmiMax));
92 } 94 }
93 TEST_RANGE_OP(Range::Shl, 0, 100, 0, 64, 95 TEST_RANGE_OP(Range::Shl, 0, 100, 0, 64,
94 RangeBoundary(0), RangeBoundary::PositiveInfinity()); 96 RangeBoundary(0), RangeBoundary::PositiveInfinity());
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 p_infinity, 701 p_infinity,
700 size).IsMaximumOrAbove(size)); 702 size).IsMaximumOrAbove(size));
701 703
702 EXPECT(RangeBoundary::JoinMax( 704 EXPECT(RangeBoundary::JoinMax(
703 p_infinity, 705 p_infinity,
704 RangeBoundary::FromConstant(1), 706 RangeBoundary::FromConstant(1),
705 size).IsMaximumOrAbove(size)); 707 size).IsMaximumOrAbove(size));
706 } 708 }
707 709
708 } // namespace dart 710 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698