aboutsummaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/types.zc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/types.zc b/src/compiler/types.zc
index ca31248..81547a5 100644
--- a/src/compiler/types.zc
+++ b/src/compiler/types.zc
@@ -873,7 +873,8 @@ int methcall(int s, word rst, word receiver_fact, int receiver, word receiver_ma
}
if ((sflag[s] & F_SIG) && np != ((ssig[s] >> 1) & 31)) serrn(sname[s], "wrong number of arguments");
if (sflag[s] & F_GEN) { s = ginstance(s, bs); effect_specialize(original, s, requirements, edges); }
- fnref(s); op(O_CALL);
+ if (!o3on && (sflag[s] & F_O3)) { o3_enter_code(); fnref(s); op(O_CALL); callname(intern("rt.o3_leave")); op(O_DROP); } // into o3 from normal code, as call() does
+ else { fnref(s); op(O_CALL); }
lv = 0;
lvk = LV_NONE;
xzero = 0;
@@ -885,6 +886,7 @@ int methcall(int s, word rst, word receiver_fact, int receiver, word receiver_ma
xstamp = 0;
xty = tword;
if (ft) xty = subst(ft[4], bs);
+ if (!o3on && (sflag[s] & F_O3) && ft && hasptr(xty)) { lit(xty); callname(s_fatten); } // non-o3 called o3: fatten the result here
if (isfl(xty)) xfloat = 1;
effect_value = 0;
if (!ret && (isptr(xty) || xty == tword)) {