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

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

Issue 11505002: Improve redundant load elimination (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 8 years 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/bit_vector.h" 6 #include "vm/bit_vector.h"
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 EXPECT_EQ(true, a->Equals(*b)); 95 EXPECT_EQ(true, a->Equals(*b));
96 } 96 }
97 97
98 { BitVector* a = new BitVector(2); 98 { BitVector* a = new BitVector(2);
99 BitVector* b = new BitVector(2); 99 BitVector* b = new BitVector(2);
100 a->SetAll(); 100 a->SetAll();
101 a->Remove(0); 101 a->Remove(0);
102 a->Remove(1); 102 a->Remove(1);
103 EXPECT_EQ(true, a->Equals(*b)); 103 EXPECT_EQ(true, a->Equals(*b));
104 } 104 }
105
106 { BitVector* a = new BitVector(128);
107 BitVector* b = new BitVector(128);
108 b->Add(0);
109 b->Add(32);
110 b->Add(64);
111 a->Add(0);
112 a->Add(64);
113 b->RemoveAll(a);
114 EXPECT_EQ(false, b->Contains(0));
115 EXPECT_EQ(true, b->Contains(32));
116 EXPECT_EQ(false, b->Contains(64));
117 }
105 } 118 }
106 119
107 } // namespace dart 120 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698