#include "list.h"
#include "quickjs-libc.h"
-/* enable test262 thread support to test SharedArrayBuffer and Atomics */
-#define CONFIG_AGENT
-
#define CMD_NAME "run-test262"
typedef struct namelist_t {
return ret;
}
-#ifdef CONFIG_AGENT
-
#include <pthread.h>
typedef struct {
countof(js_agent_funcs));
return agent;
}
-#endif
static JSValue js_createRealm(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
JS_SetPropertyStr(ctx, obj262, "codePointRange",
JS_NewCFunction(ctx, js_string_codePointRange,
"codePointRange", 2));
-#ifdef CONFIG_AGENT
JS_SetPropertyStr(ctx, obj262, "agent", js_new_agent(ctx));
-#endif
JS_SetPropertyStr(ctx, obj262, "global",
JS_DupValue(ctx, global_obj));
if (dump_memory) {
update_stats(rt, filename);
}
-#ifdef CONFIG_AGENT
js_agent_free(ctx);
-#endif
JS_FreeContext(ctx);
JS_FreeRuntime(rt);
JS_FreeValue(ctx, promise);
}
free(buf);
-#ifdef CONFIG_AGENT
js_agent_free(ctx);
-#endif
JS_FreeContext(ctx);
JS_FreeRuntime(rt);
return ret_code;