Specialize to prototype for non-monomorphic functions.
Solves the trace-explosion problem with closure-heavy programming.
This commit is contained in:
@@ -1392,7 +1392,7 @@ static GCproto *fs_finish(LexState *ls, BCLine line)
|
||||
pt->gct = ~LJ_TPROTO;
|
||||
pt->sizept = (MSize)sizept;
|
||||
pt->trace = 0;
|
||||
pt->flags = fs->flags;
|
||||
pt->flags = (uint8_t)(fs->flags & ~(PROTO_HAS_RETURN|PROTO_FIXUP_RETURN));
|
||||
pt->numparams = fs->numparams;
|
||||
pt->framesize = fs->framesize;
|
||||
setgcref(pt->chunkname, obj2gco(ls->chunkname));
|
||||
|
||||
Reference in New Issue
Block a user