Skip to content

Instantly share code, notes, and snippets.

@MasterDuke17
Created January 18, 2021 12:12
Show Gist options
  • Save MasterDuke17/1985655da57a1b626fc9b8883bb87d06 to your computer and use it in GitHub Desktop.
Save MasterDuke17/1985655da57a1b626fc9b8883bb87d06 to your computer and use it in GitHub Desktop.
25 /* Called by the VM to mark any GCable items. */
26 static void gc_mark(MVMThreadContext *tc, MVMSTable *st, void *data, MVMGCWorklist *worklist) {
27 MVMStaticFrameSpeshBody *body = (MVMStaticFrameSpeshBody *)data;
28 MVMSpeshCandidatesAndArgGuards *cands_and_arg_guards = body->spesh_cands_and_arg_guards;
29 MVM_spesh_stats_gc_mark(tc, body->spesh_stats, worklist);
30 if (cands_and_arg_guards) {
31 MVM_spesh_arg_guard_gc_mark(tc, cands_and_arg_guards->spesh_arg_guard, worklist);
32 if (body->num_spesh_candidates) {
33 MVMuint32 i;
34 for (i = 0; i < body->num_spesh_candidates; i++) {
35 MVM_gc_worklist_add(tc, worklist, &cands_and_arg_guards->spesh_candidates[i]);
36 }
37 }
38 }
39 MVM_gc_worklist_add(tc, worklist, &body->plugin_state);
40 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment