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

Unified Diff: runtime/vm/bit_vector_test.cc

Issue 868913002: Add Zone-based handle allocation interface and reduce use of Isolate-based interfaces. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/bit_vector.h ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bit_vector_test.cc
===================================================================
--- runtime/vm/bit_vector_test.cc (revision 43075)
+++ runtime/vm/bit_vector_test.cc (working copy)
@@ -8,10 +8,10 @@
namespace dart {
-#define I Isolate::Current()
+#define Z Thread::Current()->zone()
TEST_CASE(BitVector) {
- { BitVector* v = new BitVector(I, 15);
+ { BitVector* v = new BitVector(Z, 15);
v->Add(1);
EXPECT_EQ(true, v->Contains(1));
EXPECT_EQ(false, v->Contains(0));
@@ -33,7 +33,7 @@
}
}
- { BitVector* v = new BitVector(I, 128);
+ { BitVector* v = new BitVector(Z, 128);
v->Add(49);
v->Add(62);
v->Add(63);
@@ -55,9 +55,9 @@
EXPECT(iter.Done());
}
- { BitVector* a = new BitVector(I, 128);
- BitVector* b = new BitVector(I, 128);
- BitVector* c = new BitVector(I, 128);
+ { BitVector* a = new BitVector(Z, 128);
+ BitVector* b = new BitVector(Z, 128);
+ BitVector* c = new BitVector(Z, 128);
b->Add(0);
b->Add(32);
b->Add(64);
@@ -86,8 +86,8 @@
EXPECT_EQ(false, a->Contains(96));
}
- { BitVector* a = new BitVector(I, 34);
- BitVector* b = new BitVector(I, 34);
+ { BitVector* a = new BitVector(Z, 34);
+ BitVector* b = new BitVector(Z, 34);
a->SetAll();
b->Add(0);
b->Add(1);
@@ -97,8 +97,8 @@
EXPECT_EQ(true, a->Equals(*b));
}
- { BitVector* a = new BitVector(I, 2);
- BitVector* b = new BitVector(I, 2);
+ { BitVector* a = new BitVector(Z, 2);
+ BitVector* b = new BitVector(Z, 2);
a->SetAll();
a->Remove(0);
a->Remove(1);
@@ -105,8 +105,8 @@
EXPECT_EQ(true, a->Equals(*b));
}
- { BitVector* a = new BitVector(I, 128);
- BitVector* b = new BitVector(I, 128);
+ { BitVector* a = new BitVector(Z, 128);
+ BitVector* b = new BitVector(Z, 128);
b->Add(0);
b->Add(32);
b->Add(64);
« no previous file with comments | « runtime/vm/bit_vector.h ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698