Skip to content

Commit

Permalink
Use JS arrow functions in a few more places. NFC (#21975)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed May 22, 2024
1 parent 4d22ffe commit e3c4213
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_minimal_64.gzsize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1642
1639
2 changes: 1 addition & 1 deletion test/other/metadce/test_metadce_minimal_64.jssize
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3542
3492
4 changes: 2 additions & 2 deletions tools/js_manipulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def add_files_pre_js(pre_js_list, files_pre_js):
''')
utils.write_file(post, '''
if (!Module['preRun']) throw 'Module.preRun should exist because file support used it; did a pre-js delete it?';
necessaryPreJSTasks.forEach(function(task) {
necessaryPreJSTasks.forEach((task) => {
if (Module['preRun'].indexOf(task) < 0) throw 'All preRun tasks that exist before user pre-js code should remain after; did you replace Module or modify Module.preRun?';
});
''')
Expand Down Expand Up @@ -182,7 +182,7 @@ def make_wasm64_wrapper(sig):
# are certain places we need to avoid strict mode still.
# e.g. emscripten_get_callstack (getCallstack) which uses the `arguments`
# global.
return f' var makeWrapper_{sig} = (f) => function ({args_in}) {{ return {result} }};\n'
return f' var makeWrapper_{sig} = (f) => ({args_in}) => {result};\n'


def make_unsign_pointer_wrapper(sig):
Expand Down

0 comments on commit e3c4213

Please sign in to comment.