125 {
126 const bool kBypassSafepoint = false;
128 kBypassSafepoint);
129 {
131
132 StackZone stack_zone(thread);
133 Zone* zone = thread->zone();
134 EXPECT_EQ(zone, stack_zone.GetZone());
135 ZoneGrowableArray<bool>* a0 = new (zone) ZoneGrowableArray<bool>(zone, 1);
136 GrowableArray<bool> a1(zone, 1);
137 for (intptr_t
i = 0;
i < 100000; ++
i) {
138 a0->Add(true);
139 a1.Add(true);
140 }
141
143 EXPECT(str.Equals(
"old"));
144
145 const intptr_t unique_smi = id_ + 928327281;
147 EXPECT(smi.Value() == unique_smi);
148 {
149 HeapIterationScope iteration(thread);
150 ObjectCounter counter(isolate_group_, &smi);
151
152 iteration.IterateStackPointers(&counter,
154 EXPECT_EQ(1, counter.count());
155 }
156 char* unique_chars = zone->PrintToString(
"unique_str_%" Pd, id_);
158 {
159
160
163 }
164 EXPECT(unique_str.Equals(unique_chars));
165 {
166 HeapIterationScope iteration(thread);
167 ObjectCounter str_counter(isolate_group_, &unique_str);
168
169 iteration.IterateStackPointers(&str_counter,
171
172 EXPECT_EQ(1, str_counter.count());
173 }
174 }
176 {
177 MonitorLocker ml(monitor_);
178 *done_ = true;
179 ml.Notify();
180 }
181 }
static SmiPtr New(intptr_t value)
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
static Thread * Current()
static void ExitIsolateGroupAsHelper(bool bypass_safepoint)
static bool EnterIsolateGroupAsHelper(IsolateGroup *isolate_group, TaskKind kind, bool bypass_safepoint)
#define HANDLESCOPE(thread)