From f27d5b820e7eeb435ef3d874298c2b1182fd64f6 Mon Sep 17 00:00:00 2001 From: otya128 Date: Fri, 2 Sep 2016 16:24:41 +0900 Subject: [PATCH] =?UTF-8?q?CALL=E5=91=BD=E4=BB=A4=E3=82=92=E7=9C=81?= =?UTF-8?q?=E7=95=A5=E5=8F=AF=E8=83=BD=E3=81=AA=E5=BC=95=E6=95=B0=E3=82=92?= =?UTF-8?q?=E6=8C=81=E3=81=A3=E3=81=9F=E7=B5=84=E3=81=BF=E8=BE=BC=E3=81=BF?= =?UTF-8?q?=E9=96=A2=E6=95=B0=E3=81=AB=E4=BD=BF=E3=81=86=E3=81=A8=E3=82=B9?= =?UTF-8?q?=E3=82=BF=E3=83=83=E3=82=AF=E3=81=8C=E3=81=8A=E3=81=8B=E3=81=97?= =?UTF-8?q?=E3=81=8F=E3=81=AA=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3,CALL=E5=91=BD=E4=BB=A4=E3=81=8Ccase=20insensitive?= =?UTF-8?q?=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SMILEBASIC/VM.d | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/SMILEBASIC/VM.d b/SMILEBASIC/VM.d index 052f97f..75ed204 100644 --- a/SMILEBASIC/VM.d +++ b/SMILEBASIC/VM.d @@ -1250,14 +1250,7 @@ class CallFunctionS : Code result = newarg; } func.func(vm.petitcomputer, arg, result); - if(func.variadic) - { - vm.stacki -= argCount; - } - else - { - vm.stacki -= func.argments.length;// - outcount; - } + vm.stacki -= argCount; ////vm.stacki += outcount; //vm.stacki = old; for(int i = 0; i < outArgCount; i++) @@ -1299,7 +1292,7 @@ class CallFunctionS : Code { throw new TypeMismatch(); } - auto name = vname.castString; + auto name = vname.castString.toUpper; Function func = vm.currentSlot.functions.get(name, null); if(!func) { @@ -1310,14 +1303,6 @@ class CallFunctionS : Code } auto bfunc = bfuncs.overloadResolution(argCount, outArgCount); - /* if(bfunc.argments.length >= argCount) - { - auto k = bfunc.argments.length - argCount; - foreach(l;0..k) - { - vm.push(Value(ValueType.Void)); - } - }*/ callBuintinFunc(bfunc, vm); return; }