You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove `$ALLOC_NORMAL`, `$ALLOC_STACK`, and `$allocate` from
`liblegacy.js` and `extraLibraryFuncs` in `libcore.js`.
These symbols were moved to `library_legacy.js` when the file was first
created in July 2022 (emscripten-core#17390). They have produced `-Wdeprecated`
warnings on usage since February 2024 (emscripten-core#21357), over 2 years ago, giving
external users plenty time to transition.
The `test_legacy_exported_runtime_numbers` test in `test_core.py` is
also removed since it specifically tested `$ALLOC_STACK`. The error
messages checked by that test are covered elsewhere in `test_other.py`:
- "was not exported" is covered by `test_warn_module_out_err` and
`test_exported_runtime_methods_from_js_library`.
- "is a library symbol and not included by default" is covered by
`test_removed_runtime_function` and `test_legacy_runtime`.
Copy file name to clipboardExpand all lines: site/source/docs/api_reference/preamble.js.rst
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -425,17 +425,11 @@ types. The views for accessing different types of memory are listed below.
425
425
426
426
427
427
.. COMMENT (not rendered) : The following methods are explicitly not part of the public API and not documented. Note that in some case referred to by function name, other cases by Module assignment.
428
-
429
-
function allocate(slab, types, allocator, ptr) — Internal and use is discouraged. Documentation can remain in source code but not here.
# Without assertion indirect usages (via Module) result in `undefined` and direct usage
7314
-
# generates a builtin (not very helpful) JS error.
7315
-
self.set_setting('ASSERTIONS', 0)
7316
-
self.set_setting('LEGACY_RUNTIME', 0)
7317
-
test('|undefined|')
7318
-
test('ALLOC_STACK is not defined', args=['-DDIRECT'], assert_returncode=NON_ZERO)
7319
-
7320
-
# When assertions are enabled direct and indirect usage both abort with a useful error message.
7321
-
not_exported="'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)"
7322
-
not_included="`ALLOC_STACK` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='$ALLOC_STACK')"
7323
-
self.set_setting('ASSERTIONS')
7324
-
test(not_exported, assert_returncode=NON_ZERO)
7325
-
test(not_included, args=['-DDIRECT'])
7326
-
7327
-
# Adding the symbol to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE should allow direct usage, but
0 commit comments