MCPcopy Create free account
hub / github.com/codr7/hacktical-c / hc_vm_eval

Function hc_vm_eval

vm/vm.c:96–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void hc_vm_eval(struct hc_vm *vm,
97 const size_t start_pc,
98 const size_t end_pc) {
99 const uint8_t *const ep = (end_pc == -1)
100 ? vm->code.end
101 : hc_vector_get(&vm->code, end_pc);
102
103 for (uint8_t *p = hc_vector_get(&vm->code, start_pc);
104 p != ep;
105 p = (*(hc_op_eval_t *)p)(vm, p + vm->code.item_size));
106}
107
108static void fun_print(const struct hc_value *v, struct hc_stream *out) {
109 hc_printf(out, "%p", v->as_other);

Callers 3

hc_dsl_evalFunction · 0.85
dsl_benchmarksFunction · 0.85
emit_testsFunction · 0.85

Calls 1

hc_vector_getFunction · 0.85

Tested by 1

emit_testsFunction · 0.68