206 {
207 ASSERT(visitor !=
nullptr);
208
209
210
211
212
213
214 NoSafepointScope no_safepoint;
216
217 CompressedStackMaps::RawPayloadHandle maps;
218 CompressedStackMaps::RawPayloadHandle global_table;
219
221
222 if (FLAG_precompiled_mode) {
223 const UntaggedCompressedStackMaps::Payload* global_table_payload;
225 true, &code_start,
226 &global_table_payload);
227 global_table = global_table_payload;
228 } else {
229 ObjectPtr pc_marker = *(reinterpret_cast<ObjectPtr*>(
231
232
233 visitor->VisitPointer(&pc_marker);
234 if (pc_marker->IsHeapObject() && (pc_marker->GetClassId() == kCodeCid)) {
236 code_start =
code.PayloadStart();
238 maps =
code.compressed_stackmaps();
239 if (maps.UsesGlobalTable()) {
240 global_table =
242 }
243 } else {
245 }
246 }
247
248 if (!maps.IsNull()) {
249
250
251 CompressedStackMaps::Iterator<CompressedStackMaps::RawPayloadHandle> it(
252 maps, global_table);
253 const uint32_t pc_offset =
pc() - code_start;
254 if (it.Find(pc_offset)) {
255 ObjectPtr* first =
reinterpret_cast<ObjectPtr*
>(
sp());
256 ObjectPtr* last = reinterpret_cast<ObjectPtr*>(
258
259
260
261
262
263
264
265
266
267
268
269
270
271 intptr_t spill_slot_count = it.SpillSlotBitCount();
272 for (intptr_t bit = 0; bit < spill_slot_count; ++bit) {
273 if (it.IsObject(bit)) {
274 visitor->VisitPointer(last);
275 }
276 --last;
277 }
278
279
280
281 for (intptr_t bit = it.Length() - 1; bit >= spill_slot_count; --bit) {
282 if (it.IsObject(bit)) {
283 visitor->VisitPointer(first);
284 }
285 ++first;
286 }
287
288
289
290 ASSERT((last + 1) >= first);
291 visitor->VisitPointers(first, last);
292
293
294 first = reinterpret_cast<ObjectPtr*>(
296 last = reinterpret_cast<ObjectPtr*>(
298 visitor->VisitPointers(first, last);
299 return;
300 }
301
302
303
304
305
306#if defined(DEBUG)
307 if (FLAG_precompiled_mode) {
309 } else {
311 (pc_offset ==
code.EntryPoint() -
code.PayloadStart()));
312 }
313#endif
314 }
315
316
317
318 ObjectPtr* first =
reinterpret_cast<ObjectPtr*
>(
sp());
319 ObjectPtr* last = reinterpret_cast<ObjectPtr*>(
321
322 visitor->VisitPointers(first, last);
323}
ObjectStore * object_store() const
static const UntaggedCompressedStackMaps::Payload * FindStackMap(IsolateGroup *group, uword pc, bool is_return_address, uword *code_start, const UntaggedCompressedStackMaps::Payload **global_table)
intptr_t first_local_from_fp
intptr_t first_object_from_fp