aboutsummaryrefslogtreecommitdiffstats
path: root/deps/LuaJIT/src/lj_snap.h
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-30 00:19:31 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-30 00:19:31 -0400
commitbd3fe0cac583739bc0d7c4b5c8f301bb350abca0 (patch)
tree7eeb1aabcebd6999de1c3457d0882246ec0ff4d4 /deps/LuaJIT/src/lj_snap.h
parent2662ac356ce14dacfbc91689fd37244facff4989 (diff)
Renamed lib to deps so github will ignore it for language stats
Diffstat (limited to 'deps/LuaJIT/src/lj_snap.h')
-rw-r--r--deps/LuaJIT/src/lj_snap.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/deps/LuaJIT/src/lj_snap.h b/deps/LuaJIT/src/lj_snap.h
new file mode 100644
index 0000000..2c9ae3d
--- /dev/null
+++ b/deps/LuaJIT/src/lj_snap.h
@@ -0,0 +1,34 @@
+/*
+** Snapshot handling.
+** Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
+*/
+
+#ifndef _LJ_SNAP_H
+#define _LJ_SNAP_H
+
+#include "lj_obj.h"
+#include "lj_jit.h"
+
+#if LJ_HASJIT
+LJ_FUNC void lj_snap_add(jit_State *J);
+LJ_FUNC void lj_snap_purge(jit_State *J);
+LJ_FUNC void lj_snap_shrink(jit_State *J);
+LJ_FUNC IRIns *lj_snap_regspmap(GCtrace *T, SnapNo snapno, IRIns *ir);
+LJ_FUNC void lj_snap_replay(jit_State *J, GCtrace *T);
+LJ_FUNC const BCIns *lj_snap_restore(jit_State *J, void *exptr);
+LJ_FUNC void lj_snap_grow_buf_(jit_State *J, MSize need);
+LJ_FUNC void lj_snap_grow_map_(jit_State *J, MSize need);
+
+static LJ_AINLINE void lj_snap_grow_buf(jit_State *J, MSize need)
+{
+ if (LJ_UNLIKELY(need > J->sizesnap)) lj_snap_grow_buf_(J, need);
+}
+
+static LJ_AINLINE void lj_snap_grow_map(jit_State *J, MSize need)
+{
+ if (LJ_UNLIKELY(need > J->sizesnapmap)) lj_snap_grow_map_(J, need);
+}
+
+#endif
+
+#endif