]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Clear bytecode penalty cache in jit.flush().
authorMike Pall <mike>
Sun, 23 Jan 2011 18:06:19 +0000 (19:06 +0100)
committerMike Pall <mike>
Sun, 23 Jan 2011 18:06:19 +0000 (19:06 +0100)
src/lj_trace.c

index 612a41bc101b2cf110d8d0646007f35a27e13e0d..cc42dffeb720a5d5aff29b50db74762b2008efb8 100644 (file)
@@ -274,6 +274,8 @@ int lj_trace_flushall(lua_State *L)
   }
   J->cur.traceno = 0;
   J->freetrace = 0;
+  /* Clear penalty cache. */
+  memset(J->penalty, 0, sizeof(J->penalty));
   /* Free the whole machine code and invalidate all exit stub groups. */
   lj_mcode_free(J);
   memset(J->exitstubgroup, 0, sizeof(J->exitstubgroup));