diff --git a/tpl/macro.twig b/tpl/macro.twig index 6c81209..e176537 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -56,11 +56,11 @@ #if !BHL_FRONT {% if has_token(o, 'bhl_coroutine') -%} var coro = CoroutinePool.New(frm.vm); - coro.Init(frm, args_info); + coro.Init(frm, stack, args_info); return coro; {%- else -%} {%- if o.args -%} - var args = Script_{{o.name|norm_name}}.ReadArgs(frm, args_info); + var args = Script_{{o.name|norm_name}}.ReadArgs(frm, stack, args_info); Script_{{o.name|norm_name}}.Exec(frm, stack, args); {%- else ~%} Script_{{o.name|norm_name}}.Exec(frm, stack); @@ -117,7 +117,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.Exec( frm, stack, - Script_{{o.name|norm_name}}.Method_{{m.name}}.ReadArgs(frm, args_info) + Script_{{o.name|norm_name}}.Method_{{m.name}}.ReadArgs(frm, stack, args_info) ); return null; } @@ -141,7 +141,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.Exec( frm, stack, - Script_{{o.name|norm_name}}.Method_{{m.name}}.ReadArgs(frm, args_info) + Script_{{o.name|norm_name}}.Method_{{m.name}}.ReadArgs(frm, stack, args_info) ); return null; } @@ -166,9 +166,9 @@ public void Init(VM.Frame frm, ValStack stack, FuncArgsInfo args_info) { {% if o.args or this_type ~%} - args = ReadArgs(frm, args_info); + args = ReadArgs(frm, stack, args_info); {% endif %} - Init(frm); + Init(frm, stack); } public void Tick(VM.Frame frm, bhl.VM.ExecState exec, ref BHS status) { @@ -291,7 +291,7 @@ {%- if this_type ~%} { var dv = stack.Pop(); - {{ _self.val2native(this_type, 'dv', arg_prefix ~ '.self') }}; + {{ _self.val2native(this_type, 'dv', arg_prefix ~ 'self') }}; dv.Release(); } {%- endif ~%} @@ -352,7 +352,7 @@ for(int i=0;i