Skip to content

Commit abadc89

Browse files
committed
jsifier: Rename libraryFunction -> librarySymbols
1 parent fceb56a commit abadc89

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

emcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def get_all_js_syms():
461461
glue, forwarded_data = emscripten.compile_settings()
462462
forwarded_json = json.loads(forwarded_data)
463463
library_syms = set()
464-
for name in forwarded_json['libraryFunctions']:
464+
for name in forwarded_json['librarySymbols']:
465465
if shared.is_c_symbol(name):
466466
name = shared.demangle_c_symbol_name(name)
467467
library_syms.add(name)

emscripten.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def emscript(in_wasm, out_wasm, outfile_js, memfile):
375375
if settings.ASYNCIFY:
376376
exports += ['asyncify_start_unwind', 'asyncify_stop_unwind', 'asyncify_start_rewind', 'asyncify_stop_rewind']
377377

378-
report_missing_symbols(forwarded_json['libraryFunctions'])
378+
report_missing_symbols(forwarded_json['librarySymbols'])
379379

380380
if not outfile_js:
381381
logger.debug('emscript: skipping remaining js glue generation')

src/jsifier.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,6 @@ function ${name}(${args}) {
317317
deps.push(snippet);
318318
snippet = mangleCSymbolName(snippet);
319319
}
320-
// In asm, we need to know about library functions. If there is a target, though, then no
321-
// need to consider this a library function - we will call directly to it anyhow
322-
if (!redirectedIdent && (typeof target == 'function')) {
323-
libraryFunctions.push(finalName);
324-
}
325320
}
326321
} else if (typeof snippet == 'object') {
327322
snippet = stringifyWithFunctions(snippet);
@@ -330,14 +325,9 @@ function ${name}(${args}) {
330325
isFunction = true;
331326
snippet = processLibraryFunction(snippet, ident, finalName, deps);
332327
addImplicitDeps(snippet, deps);
333-
libraryFunctions.push(finalName);
334328
}
335329

336-
// If a JS library item specifies xxx_import: true, then explicitly mark that symbol to be exported
337-
// to wasm module.
338-
if (LibraryManager.library[ident + '__import']) {
339-
libraryFunctions.push(finalName);
340-
}
330+
librarySymbols.push(finalName);
341331

342332
if (ONLY_CALC_JS_SYMBOLS) {
343333
return '';
@@ -555,7 +545,7 @@ function ${name}(${args}) {
555545
print(processMacros(preprocess(shellParts[1], shellFile)));
556546

557547
print('\n//FORWARDED_DATA:' + JSON.stringify({
558-
libraryFunctions: libraryFunctions,
548+
librarySymbols: librarySymbols,
559549
warnings: warnings,
560550
ATINITS: ATINITS.join('\n'),
561551
ATMAINS: ATMAINS.join('\n'),

src/modules.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ function genArgSequence(n) {
1717
return args;
1818
}
1919

20-
// List of functions that were added from the library.
21-
global.libraryFunctions = [];
20+
// List of symbols that were added from the library.
21+
global.librarySymbols = [];
2222

2323
global.LibraryManager = {
2424
library: {},

0 commit comments

Comments
 (0)