summaryrefslogtreecommitdiff
path: root/quickjs.h
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2025-04-12 12:14:37 +0200
committerFabrice Bellard <fabrice@bellard.org>2025-04-12 12:14:37 +0200
commit67b48ae4e6fadb812334b5836aa4a6e6e46d459b (patch)
tree9f612b2fff9b5009323364c9e20384b9eab86982 /quickjs.h
parentc50de13b1573735c57e918f2739428b82dd2481f (diff)
downloadquickjs-67b48ae4e6fadb812334b5836aa4a6e6e46d459b.tar.gz
quickjs-67b48ae4e6fadb812334b5836aa4a6e6e46d459b.zip
- removed the 'use strip' extension
- removed the JS_EVAL_FLAG_STRIP eval flag and replaced it with JS_SetStripInfo() which has simpler semantics. - qjs: added the '-s' and '--strip-source' options - qjsc: added the '-s' and '--keep-source' options
Diffstat (limited to 'quickjs.h')
-rw-r--r--quickjs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/quickjs.h b/quickjs.h
index 2d4b1f6..a75d990 100644
--- a/quickjs.h
+++ b/quickjs.h
@@ -334,7 +334,6 @@ static inline JSValue __JS_NewShortBigInt(JSContext *ctx, int64_t d)
#define JS_EVAL_TYPE_MASK (3 << 0)
#define JS_EVAL_FLAG_STRICT (1 << 3) /* force 'strict' mode */
-#define JS_EVAL_FLAG_STRIP (1 << 4) /* force 'strip' mode */
/* compile but do not run. The result is an object with a
JS_TAG_FUNCTION_BYTECODE or JS_TAG_MODULE tag. It can be executed
with JS_EvalFunction(). */
@@ -902,6 +901,12 @@ typedef int JSInterruptHandler(JSRuntime *rt, void *opaque);
void JS_SetInterruptHandler(JSRuntime *rt, JSInterruptHandler *cb, void *opaque);
/* if can_block is TRUE, Atomics.wait() can be used */
void JS_SetCanBlock(JSRuntime *rt, JS_BOOL can_block);
+/* select which debug info is stripped from the compiled code */
+#define JS_STRIP_SOURCE (1 << 0) /* strip source code */
+#define JS_STRIP_DEBUG (1 << 1) /* strip all debug info including source code */
+void JS_SetStripInfo(JSRuntime *rt, int flags);
+int JS_GetStripInfo(JSRuntime *rt);
+
/* set the [IsHTMLDDA] internal slot */
void JS_SetIsHTMLDDA(JSContext *ctx, JSValueConst obj);