@@ -25839,13 +25839,11 @@ static int exported_names_cmp(const void *p1, const void *p2, void *opaque)
25839
25839
return ret;
25840
25840
}
25841
25841
25842
- static JSValue js_get_module_ns(JSContext *ctx, JSModuleDef *m);
25843
-
25844
25842
static JSValue js_module_ns_autoinit(JSContext *ctx, JSObject *p, JSAtom atom,
25845
25843
void *opaque)
25846
25844
{
25847
25845
JSModuleDef *m = opaque;
25848
- return js_get_module_ns (ctx, m);
25846
+ return JS_GetModuleNamespace (ctx, m);
25849
25847
}
25850
25848
25851
25849
static JSValue js_build_module_ns(JSContext *ctx, JSModuleDef *m)
@@ -25951,7 +25949,7 @@ static JSValue js_build_module_ns(JSContext *ctx, JSModuleDef *m)
25951
25949
return JS_EXCEPTION;
25952
25950
}
25953
25951
25954
- static JSValue js_get_module_ns (JSContext *ctx, JSModuleDef *m)
25952
+ JSValue JS_GetModuleNamespace (JSContext *ctx, JSModuleDef *m)
25955
25953
{
25956
25954
if (JS_IsUndefined(m->module_ns)) {
25957
25955
JSValue val;
@@ -26185,7 +26183,7 @@ static int js_link_module(JSContext *ctx, JSModuleDef *m)
26185
26183
if (mi->import_name == JS_ATOM__star_) {
26186
26184
JSValue val;
26187
26185
/* name space import */
26188
- val = js_get_module_ns (ctx, m1);
26186
+ val = JS_GetModuleNamespace (ctx, m1);
26189
26187
if (JS_IsException(val))
26190
26188
goto fail;
26191
26189
set_value(ctx, &var_refs[mi->var_idx]->value, val);
@@ -26209,7 +26207,7 @@ static int js_link_module(JSContext *ctx, JSModuleDef *m)
26209
26207
JSModuleDef *m2;
26210
26208
/* name space import from */
26211
26209
m2 = res_m->req_module_entries[res_me->u.req_module_idx].module;
26212
- val = js_get_module_ns (ctx, m2);
26210
+ val = JS_GetModuleNamespace (ctx, m2);
26213
26211
if (JS_IsException(val))
26214
26212
goto fail;
26215
26213
var_ref = js_create_module_var(ctx, TRUE);
@@ -26396,7 +26394,7 @@ static JSValue js_dynamic_import_job(JSContext *ctx,
26396
26394
goto exception;
26397
26395
26398
26396
/* return the module namespace */
26399
- ns = js_get_module_ns (ctx, m);
26397
+ ns = JS_GetModuleNamespace (ctx, m);
26400
26398
if (JS_IsException(ns))
26401
26399
goto exception;
26402
26400
@@ -34396,37 +34394,6 @@ int JS_SetModuleExportList(JSContext *ctx, JSModuleDef *m,
34396
34394
return 0;
34397
34395
}
34398
34396
34399
- JSValue JS_GetModuleExport(JSContext *ctx, const JSModuleDef *m, const char *export_name) {
34400
- JSExportEntry *me;
34401
- JSAtom name;
34402
- name = JS_NewAtom(ctx, export_name);
34403
- if (name == JS_ATOM_NULL)
34404
- goto fail;
34405
- me = find_export_entry(ctx, m, name);
34406
- JS_FreeAtom(ctx, name);
34407
- if (!me)
34408
- goto fail;
34409
- return JS_DupValue(ctx, me->u.local.var_ref->value);
34410
- fail:
34411
- return JS_UNDEFINED;
34412
- }
34413
-
34414
- int JS_CountModuleExport(JSContext *ctx, const JSModuleDef *m) {
34415
- return m->export_entries_count;
34416
- }
34417
-
34418
- JSAtom JS_GetModuleExportName(JSContext *ctx, const JSModuleDef *m, int idx) {
34419
- if (idx >= m->export_entries_count || idx < 0)
34420
- return JS_ATOM_NULL;
34421
- return JS_DupAtom(ctx, m->export_entries[idx].export_name);
34422
- }
34423
-
34424
- JSValue JS_GetModuleExportValue(JSContext *ctx, const JSModuleDef *m, int idx) {
34425
- if (idx >= m->export_entries_count || idx < 0)
34426
- return JS_UNDEFINED;
34427
- return JS_DupValue(ctx, m->export_entries[idx].u.local.var_ref->value);
34428
- }
34429
-
34430
34397
/* Note: 'func_obj' is not necessarily a constructor */
34431
34398
static void JS_SetConstructor2(JSContext *ctx,
34432
34399
JSValue func_obj,
0 commit comments