fix intrinsics and env
This commit is contained in:
@@ -267,7 +267,8 @@ static int g_has_native_env = 0;
|
||||
|
||||
void cell_rt_set_native_env(JSContext *ctx, JSValue env) {
|
||||
if (!JS_IsNull(env) && !JS_IsStone(env)) {
|
||||
fprintf(stderr, "cell_rt_set_native_env: WARNING env not stone\n");
|
||||
fprintf(stderr, "cell_rt_set_native_env: ERROR env not stone\n");
|
||||
abort();
|
||||
}
|
||||
if (g_has_native_env)
|
||||
JS_DeleteGCRef(ctx, &g_native_env_ref);
|
||||
@@ -585,13 +586,6 @@ void cell_rt_disrupt(JSContext *ctx) {
|
||||
JS_ThrowTypeError(ctx, "type error in native code");
|
||||
}
|
||||
|
||||
/* --- set_var: set a variable in env_record or global --- */
|
||||
|
||||
void cell_rt_set_var(JSContext *ctx, JSValue val, const char *name) {
|
||||
JSValue key = JS_NewString(ctx, name);
|
||||
JS_SetProperty(ctx, ctx->global_obj, key, val);
|
||||
}
|
||||
|
||||
/* --- in: key in obj --- */
|
||||
|
||||
JSValue cell_rt_in(JSContext *ctx, JSValue key, JSValue obj) {
|
||||
|
||||
Reference in New Issue
Block a user