Mercurial > hg > Papers > 2019 > anatofuz-prosym
changeset 41:de0f0fa18b71
fix c source
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 09 Nov 2018 13:49:33 +0900 |
parents | 2a21f7911f92 |
children | 1abd6fc0abe8 |
files | Paper/anatofuz.pdf Paper/src/dispatch.c |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Paper/src/dispatch.c Fri Nov 09 13:31:27 2018 +0900 +++ b/Paper/src/dispatch.c Fri Nov 09 13:49:33 2018 +0900 @@ -9,4 +9,17 @@ GET_REG(cur_op, 0).i64 = MVM_BC_get_I64(cur_op, 2); cur_op += 10; goto NEXT; + OP(pushcompsc): { + MVMObject * const sc = GET_REG(cur_op, 0).o; + if (REPR(sc)->ID != MVM_REPR_ID_SCRef) + MVM_exception_throw_adhoc(tc, "Can only push an SCRef with pushcompsc"); + if (MVM_is_null(tc, tc->compiling_scs)) { + MVMROOT(tc, sc, { + tc->compiling_scs = MVM_repr_alloc_init(tc, tc->instance->boot_types.BOOTArray); + }); + } + MVM_repr_unshift_o(tc, tc->compiling_scs, sc); + cur_op += 2; + goto NEXT; + } }