Skip to content

Commit 9119428

Browse files
authored
Remove references to RESERVED_FUNCTION_POINTERS. NFC (#19315)
This setting was replaced by ALLOW_TABLE_GROWTH a long time ago.
1 parent d9a6a12 commit 9119428

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

site/source/docs/compiling/WebAssembly.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,6 @@ upgrade from fastcomp to upstream:
7575
`strip` on an archive file that contains WebAssembly object files it will
7676
remove the index which makes the archive unusable at link time.
7777

78-
* Fastcomp emits asm.js and so has some limitations on function pointers. For
79-
example, the ``RESERVED_FUNCTION_POINTERS`` setting exists there to work
80-
around the fact that we can't grow the table. In the upstream backend table
81-
growth is easy, and you can just enable ``ALLOW_TABLE_GROWTH``.
82-
83-
* Fastcomp and upstream use very different LLVM and clang versions (fastcomp
84-
has been stuck on LLVM 6, upstream is many releases after). This affects
85-
optimizations, usually by making the upstream version faster and smaller.
86-
However, in rare cases you may see a regression (for example, in some cases
87-
*UN*-optimized code may be
88-
`less optimal in upstream <https://github.com/emscripten-core/emscripten/issues/10753#issuecomment-603486677>`_,
89-
so make sure to optimize both when compiling and when linking).
90-
9178
* Also see the `blocker bugs on the wasm backend <https://github.com/emscripten-core/emscripten/projects/1>`_, and the `wasm backend tagged issues <https://github.com/emscripten-core/emscripten/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3A"LLVM+wasm+backend">`_.
9279

9380
Trapping

test/test_core.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7410,17 +7410,15 @@ def test_large_exported_response(self):
74107410
def test_add_function(self):
74117411
self.set_setting('INVOKE_RUN', 0)
74127412
self.set_setting('WASM_ASYNC_COMPILATION', 0)
7413-
self.set_setting('RESERVED_FUNCTION_POINTERS')
7413+
self.set_setting('ALLOW_TABLE_GROWTH')
74147414
self.set_setting('EXPORTED_RUNTIME_METHODS', ['callMain'])
7415-
src = test_file('interop/test_add_function.cpp')
7416-
post_js = test_file('interop/test_add_function_post.js')
7417-
self.emcc_args += ['--post-js', post_js]
7415+
self.emcc_args += ['--post-js', test_file('interop/test_add_function_post.js')]
74187416

74197417
print('basics')
74207418
self.do_run_in_out_file_test('interop/test_add_function.cpp')
74217419

7422-
print('with RESERVED_FUNCTION_POINTERS=0')
7423-
self.set_setting('RESERVED_FUNCTION_POINTERS', 0)
7420+
print('with ALLOW_TABLE_GROWTH=0')
7421+
self.set_setting('ALLOW_TABLE_GROWTH', 0)
74247422
expected = 'Unable to grow wasm table'
74257423
if self.is_wasm2js():
74267424
# in wasm2js the error message doesn't come from the VM, but from our
@@ -7429,7 +7427,7 @@ def test_add_function(self):
74297427
# shows a generic error.
74307428
expected = 'wasmTable.grow is not a function'
74317429

7432-
self.do_runf(src, expected, assert_returncode=NON_ZERO)
7430+
self.do_runf(test_file('interop/test_add_function.cpp'), expected, assert_returncode=NON_ZERO)
74337431

74347432
print('- with table growth')
74357433
self.set_setting('ALLOW_TABLE_GROWTH')
@@ -9573,16 +9571,14 @@ def test_Module_dynamicLibraries_pthreads(self):
95739571

95749572
# Tests the emscripten_get_exported_function() API.
95759573
def test_emscripten_get_exported_function(self):
9576-
# Could also test with -sALLOW_TABLE_GROWTH
9577-
self.set_setting('RESERVED_FUNCTION_POINTERS', 2)
9574+
self.set_setting('ALLOW_TABLE_GROWTH')
95789575
self.emcc_args += ['-lexports.js']
95799576
self.do_core_test('test_get_exported_function.cpp')
95809577

95819578
# Tests the emscripten_get_exported_function() API.
95829579
@no_asan('TODO: ASan support in minimal runtime')
95839580
def test_minimal_runtime_emscripten_get_exported_function(self):
9584-
# Could also test with -sALLOW_TABLE_GROWTH
9585-
self.set_setting('RESERVED_FUNCTION_POINTERS', 2)
9581+
self.set_setting('ALLOW_TABLE_GROWTH')
95869582
self.set_setting('MINIMAL_RUNTIME')
95879583
self.emcc_args += ['--pre-js', test_file('minimal_runtime_exit_handling.js')]
95889584
self.emcc_args += ['-lexports.js']

0 commit comments

Comments
 (0)