Skip to content

Commit e776c41

Browse files
wksmmtkgc-bot
andauthored
Rename edge to slot (#150)
Parent PR: mmtk/mmtk-core#1134 --------- Co-authored-by: mmtkgc-bot <[email protected]>
1 parent d1e42bd commit e776c41

File tree

9 files changed

+179
-176
lines changed

9 files changed

+179
-176
lines changed

julia/mmtk_julia.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,13 @@ void scan_vm_specific_roots(RootsWorkClosure* closure)
330330
(closure->report_tpinned_nodes_func)(tpinned_buf.ptr, tpinned_len, tpinned_buf.cap, closure->data, false);
331331
}
332332

333-
JL_DLLEXPORT void scan_julia_exc_obj(void* obj_raw, void* closure, ProcessEdgeFn process_edge) {
333+
JL_DLLEXPORT void scan_julia_exc_obj(void* obj_raw, void* closure, ProcessSlotFn process_slot) {
334334
jl_task_t *ta = (jl_task_t*)obj_raw;
335335

336336
if (ta->excstack) { // inlining label `excstack` from mark_loop
337337
// if it is not managed by MMTk, nothing needs to be done because the object does not need to be scanned
338338
if (mmtk_object_is_managed_by_mmtk(ta->excstack)) {
339-
process_edge(closure, &ta->excstack);
339+
process_slot(closure, &ta->excstack);
340340
}
341341
jl_excstack_t *excstack = ta->excstack;
342342
size_t itr = ta->excstack->top;
@@ -353,20 +353,20 @@ JL_DLLEXPORT void scan_julia_exc_obj(void* obj_raw, void* closure, ProcessEdgeFn
353353
// GC-managed values inside.
354354
size_t njlvals = jl_bt_num_jlvals(bt_entry);
355355
while (jlval_index < njlvals) {
356-
jl_value_t** new_obj_edge = &bt_entry[2 + jlval_index].jlvalue;
356+
jl_value_t** new_obj_slot = &bt_entry[2 + jlval_index].jlvalue;
357357
jlval_index += 1;
358-
process_edge(closure, new_obj_edge);
358+
process_slot(closure, new_obj_slot);
359359
}
360360
jlval_index = 0;
361361
}
362362

363363
jl_bt_element_t *stack_raw = (jl_bt_element_t *)(excstack+1);
364-
jl_value_t** stack_obj_edge = &stack_raw[itr-1].jlvalue;
364+
jl_value_t** stack_obj_slot = &stack_raw[itr-1].jlvalue;
365365

366366
itr = jl_excstack_next(excstack, itr);
367367
bt_index = 0;
368368
jlval_index = 0;
369-
process_edge(closure, stack_obj_edge);
369+
process_slot(closure, stack_obj_slot);
370370
}
371371
}
372372
}

mmtk/Cargo.lock

+56-49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mmtk/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ lazy_static = "1.1"
3131
# - change branch
3232
# - change repo name
3333
# But other changes including adding/removing whitespaces in commented lines may break the CI
34-
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "fea59e4f5cc6176093da1d8efa7d7b3b4b8d0fa7" }
34+
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "56b2521d2b99848ee0613a0a5288fe6d81b754ba" }
3535
# Uncomment the following to build locally
3636
# mmtk = { path = "../repos/mmtk-core" }
3737
log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"] }

mmtk/api/mmtk.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ extern "C" {
1111

1212
typedef void* MMTk_Mutator;
1313
typedef void* MMTk_TraceLocal;
14-
typedef void (*ProcessEdgeFn)(void* closure, void* slot);
15-
typedef void (*ProcessOffsetEdgeFn)(void* closure, void* slot, int offset);
14+
typedef void (*ProcessSlotFn)(void* closure, void* slot);
15+
typedef void (*ProcessOffsetSlotFn)(void* closure, void* slot, int offset);
1616

1717
typedef struct {
1818
void** ptr;
1919
size_t cap;
2020
} RootsWorkBuffer;
2121

2222
typedef struct {
23-
RootsWorkBuffer (*report_edges_func)(void** buf, size_t size, size_t cap, void* data, bool renew);
23+
RootsWorkBuffer (*report_slots_func)(void** buf, size_t size, size_t cap, void* data, bool renew);
2424
RootsWorkBuffer (*report_nodes_func)(void** buf, size_t size, size_t cap, void* data, bool renew);
2525
RootsWorkBuffer (*report_tpinned_nodes_func)(void** buf, size_t size, size_t cap, void* data, bool renew);
2626
void* data;
@@ -70,7 +70,7 @@ extern uintptr_t JULIA_MALLOC_BYTES;
7070
// * int is 4 bytes
7171
// * size_t is 8 bytes
7272
typedef struct {
73-
void (* scan_julia_exc_obj) (void* obj, void* closure, ProcessEdgeFn process_edge);
73+
void (* scan_julia_exc_obj) (void* obj, void* closure, ProcessSlotFn process_slot);
7474
void* (* get_stackbase) (int16_t tid);
7575
void (* mmtk_jl_run_finalizers) (void* tls);
7676
void (* jl_throw_out_of_memory_error) (void);

0 commit comments

Comments
 (0)