Redesign of prototype generation, part 2: late init of chunkname.

This commit is contained in:
Mike Pall
2010-02-08 05:27:43 +01:00
parent 60b5af4422
commit 48d93d8c84
2 changed files with 6 additions and 5 deletions

View File

@@ -333,10 +333,6 @@ void lj_lex_setup(lua_State *L, LexState *ls)
setstrV(L, L->top++, lj_err_str(L, LJ_ERR_XBCLOAD));
lj_err_throw(L, LUA_ERRSYNTAX);
}
/* This is an unanchored GCstr before it's stored in the prototype.
** Do this last since next() calls the reader which may call the GC.
*/
ls->chunkname = lj_str_newz(L, ls->chunkarg);
}
/* Cleanup lexer state. */