From b37a8c546dfde7121f6d6f4e5ea620ad1ff1ba5a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 14 Sep 2020 18:13:07 +0200 Subject: [PATCH] :art: Improve dotfunc --- README.md | 2 ++ src/vm/vm.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9085bf2f..9ad2ed6e 100644 --- a/README.md +++ b/README.md @@ -115,3 +115,5 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! > NOTE: if you should be on the list of contributors but we forgot you, don't be shy and let us know! + +qsdqisjdqls diff --git a/src/vm/vm.c b/src/vm/vm.c index aa7cc19c..934e4fa5 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -836,11 +836,14 @@ staticother: reg += VAL2; DISPATCH() dotfunc: +PRAGMA_PUSH() + *(VM_Code*)(reg) = ((Func)vector_at((*(M_Object*)(reg-SZ_INT))->vtable, VAL))->code; reg += SZ_INT; - VAL2 = SZ_INT; +PRAGMA_POP() + DISPATCH() dotstaticfunc: PRAGMA_PUSH() - *(VM_Code*)(reg-SZ_INT) = ((Func)vector_at((*(M_Object*)(reg-SZ_INT-VAL2))->vtable, VAL))->code; + *(VM_Code*)(reg-SZ_INT) = ((Func)vector_at((*(M_Object*)(reg-SZ_INT))->vtable, VAL))->code; PRAGMA_POP() DISPATCH() gcini: -- 2.43.0