]> Nishi Git Mirror - gwion.git/commitdiff
:art: change emit call
authorfennecdjay <fennecdjay@gmail.com>
Wed, 29 Jun 2022 15:03:32 +0000 (17:03 +0200)
committerfennecdjay <fennecdjay@gmail.com>
Wed, 29 Jun 2022 15:03:32 +0000 (17:03 +0200)
src/emit/emit.c

index ec6ae806cc0d913beab4765ea60c05375eacf462..abc2f703a718f5904f298ea9940c554aeeb28740 100644 (file)
@@ -1616,7 +1616,12 @@ ANN m_bool emit_exp_call1(const Emitter emit, const Func f,
   else if (unlikely(!f->code && emit->env->func != f)) {
     if (tmpl) CHECK_BB(emit_template_code(emit, f));
     else CHECK_BB(emit_ensure_func(emit, f));
-  } else push_func_code(emit, f);
+  } else {
+    if(!f->value_ref->from->owner_class ||
+       GET_FLAG(f->value_ref->from->owner_class, final) ||
+       GET_FLAG(f->value_ref->from->owner_class, static))
+    push_func_code(emit, f);
+  }
   call_finish(emit, f, is_static);
   emit->status = status;
   return GW_OK;