Skip to content

Commit

Permalink
Remove deps_info system and and the running of llvm-nm on input file.…
Browse files Browse the repository at this point in the history
… NFC

This uses a new "stub object" construct to tell the linker (wasm-ld)
not only about the existence of the JS library symbols but the native
symbols on which they depend (a.k.a reverse dependencies).

This allows us to completely remove deps_info.py in favor of just using
normal `__deps` entries in the library files.  It also means we no
longer need to run `llvm-nm` on the linker inputs to discover the
symbols they use.

Depends on: https://reviews.llvm.org/D145308

Fixes: #18875
  • Loading branch information
sbc100 committed Apr 11, 2023
1 parent 38eedc6 commit 67c9142
Show file tree
Hide file tree
Showing 30 changed files with 126 additions and 544 deletions.
23 changes: 12 additions & 11 deletions emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
from tools.minimal_runtime_shell import generate_minimal_runtime_html
import tools.line_endings
from tools import feature_matrix
from tools import deps_info
from tools import js_manipulation
from tools import wasm2c
from tools import webassembly
Expand Down Expand Up @@ -1316,11 +1315,19 @@ def run(args):
js_info = get_js_sym_info()
if not settings.SIDE_MODULE:
js_syms = js_info['deps']
deps_info.append_deps_info(js_syms)
if not settings.USES_DYNAMIC_ALLOC:
# When USES_DYNAMIC_ALLOC=0 is set we don't export malloc/free, even
# if the JS library symbols depend on them. In this mode we instead
# fail at runtime if they are actaully called.
for value in js_syms.values():
if 'malloc' in value:
value.remove('malloc')
if 'free' in value:
value.remove('free')
if settings.ASYNCIFY:
settings.ASYNCIFY_IMPORTS += ['env.' + x for x in js_info['asyncFuncs']]

phase_calculate_system_libraries(state, linker_arguments, linker_inputs, newargs)
phase_calculate_system_libraries(state, linker_arguments, newargs)

phase_link(linker_arguments, wasm_target, js_syms)

Expand Down Expand Up @@ -2079,11 +2086,6 @@ def phase_linker_setup(options, state, newargs):
settings.INCLUDE_FULL_LIBRARY = 1
settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE += ['$loadDylibs']

# If we are including the entire JS library then we know for sure we will, by definition,
# require all the reverse dependencies.
if settings.INCLUDE_FULL_LIBRARY:
default_setting('REVERSE_DEPS', 'all')

if settings.MAIN_MODULE == 1 or settings.SIDE_MODULE == 1:
settings.LINKABLE = 1

Expand Down Expand Up @@ -3074,14 +3076,13 @@ def compile_source_file(i, input_file):


@ToolchainProfiler.profile_block('calculate system libraries')
def phase_calculate_system_libraries(state, linker_arguments, linker_inputs, newargs):
def phase_calculate_system_libraries(state, linker_arguments, newargs):
extra_files_to_link = []
# Link in ports and system libraries, if necessary
if not settings.SIDE_MODULE:
# Ports are always linked into the main module, never the side module.
extra_files_to_link += ports.get_libs(settings)
all_linker_inputs = [f for _, f in sorted(linker_inputs)] + extra_files_to_link
extra_files_to_link += system_libs.calculate(all_linker_inputs, newargs, forced=state.forced_stdlibs)
extra_files_to_link += system_libs.calculate(newargs, forced=state.forced_stdlibs)
linker_arguments.extend(extra_files_to_link)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,6 @@ See the `library_*.js`_ files for other examples.
This is useful when all the implemented methods use a JavaScript
singleton containing helper methods. See ``library_webgl.js`` for
an example.
- If a JavaScript library depends on a compiled C library (like most
of *libc*), you must edit `src/deps_info.json`_. Search for
"deps_info" in `tools/system_libs.py`_.
- The keys passed into `mergeInto` generate functions that are prefixed
by ``_``. In other words ``my_func: function() {},`` becomes
``function _my_func() {}``, as all C methods in emscripten have a ``_`` prefix. Keys starting with ``$`` have the ``$``
Expand Down Expand Up @@ -810,7 +807,6 @@ you can give it a try. See `Emnapi documentation`_ for more details.

.. _library.js: https://github.com/emscripten-core/emscripten/blob/main/src/library.js
.. _test_js_libraries: https://github.com/emscripten-core/emscripten/blob/1.29.12/tests/test_core.py#L5043
.. _src/deps_info.json: https://github.com/emscripten-core/emscripten/blob/main/src/deps_info.json
.. _tools/system_libs.py: https://github.com/emscripten-core/emscripten/blob/main/tools/system_libs.py
.. _library_\*.js: https://github.com/emscripten-core/emscripten/tree/main/src
.. _test_add_function in test/test_core.py: https://github.com/emscripten-core/emscripten/blob/1.29.12/tests/test_core.py#L6237
Expand Down
29 changes: 27 additions & 2 deletions src/jsifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,25 @@ function isDefined(symName) {
return false;
}

function getTransitiveDeps(symbol) {
const transitiveDeps = new Set();
const seen = new Set();
const toVisit = [symbol];
while (toVisit.length) {
const sym = toVisit.pop();
if (!seen.has(sym)) {
let directDeps = LibraryManager.library[sym + '__deps'] || [];
directDeps = directDeps.filter((d) => typeof d === 'string');
if (directDeps.length) {
directDeps.forEach(transitiveDeps.add, transitiveDeps);
toVisit.push(...directDeps);
}
seen.add(sym);
}
}
return Array.from(transitiveDeps);
}

function runJSify() {
const libraryItems = [];
const symbolDeps = {};
Expand Down Expand Up @@ -260,8 +279,14 @@ function ${name}(${args}) {

if (symbolsOnly) {
if (!isJsOnlySymbol(symbol) && LibraryManager.library.hasOwnProperty(symbol)) {
externalDeps = deps.filter((d) => !isJsOnlySymbol(d) && !(d in LibraryManager.library) && typeof d === 'string');
symbolDeps[symbol] = externalDeps;
var value = LibraryManager.library[symbol];
var resolvedSymbol = symbol;
// Resolve aliases before looking up deps
if (typeof value == 'string' && value[0] != '=' && LibraryManager.library.hasOwnProperty(value)) {
resolvedSymbol = value;
}
var transtiveDeps = getTransitiveDeps(resolvedSymbol);
symbolDeps[symbol] = transtiveDeps.filter((d) => !isJsOnlySymbol(d) && !(d in LibraryManager.library));
}
return;
}
Expand Down
11 changes: 6 additions & 5 deletions src/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ mergeInto(LibraryManager.library, {

// TODO: Initialize these to defaults on startup from system settings.
// Note: glibc has one fewer underscore for all of these. Also used in other related functions (timegm)
_tzset_js__deps: ['$stringToNewUTF8'],
_tzset_js__deps: ['$stringToNewUTF8', 'malloc'],
_tzset_js__internal: true,
_tzset_js: function(timezone, daylight, tzname) {
// TODO: Use (malleable) environment variables instead of system settings.
Expand Down Expand Up @@ -1210,6 +1210,7 @@ mergeInto(LibraryManager.library, {
// ==========================================================================

#if SUPPORT_LONGJMP == 'emscripten'
_emscripten_throw_longjmp__deps: ['setThrew'],
_emscripten_throw_longjmp: function() {
#if EXCEPTION_STACK_TRACES
throw new EmscriptenSjLj;
Expand Down Expand Up @@ -1719,7 +1720,7 @@ mergeInto(LibraryManager.library, {
return { family: family, addr: addr, port: port };
},
$writeSockaddr__docs: '/** @param {number=} addrlen */',
$writeSockaddr__deps: ['$Sockets', '$inetPton4', '$inetPton6', '$zeroMemory'],
$writeSockaddr__deps: ['$Sockets', '$inetPton4', '$inetPton6', '$zeroMemory', 'htons'],
$writeSockaddr: function (sa, family, addr, port, addrlen) {
switch (family) {
case {{{ cDefs.AF_INET }}}:
Expand Down Expand Up @@ -1856,7 +1857,7 @@ mergeInto(LibraryManager.library, {
return 0;
},

getaddrinfo__deps: ['$Sockets', '$DNS', '$inetPton4', '$inetNtop4', '$inetPton6', '$inetNtop6', '$writeSockaddr'],
getaddrinfo__deps: ['$Sockets', '$DNS', '$inetPton4', '$inetNtop4', '$inetPton6', '$inetNtop6', '$writeSockaddr', 'malloc', 'htonl'],
getaddrinfo__proxy: 'sync',
getaddrinfo: function(node, service, hint, out) {
// Note getaddrinfo currently only returns a single addrinfo with ai_next defaulting to NULL. When NULL
Expand Down Expand Up @@ -2621,7 +2622,7 @@ mergeInto(LibraryManager.library, {
// using builtin_malloc to avoid LSan reporting these as leaks.
emscripten_get_compiler_setting__noleakcheck: true,
#if RETAIN_COMPILER_SETTINGS
emscripten_get_compiler_setting__deps: ['$stringToNewUTF8'],
emscripten_get_compiler_setting__deps: ['$stringToNewUTF8', 'malloc'],
#endif
emscripten_get_compiler_setting: function(name) {
#if RETAIN_COMPILER_SETTINGS
Expand Down Expand Up @@ -2803,7 +2804,7 @@ mergeInto(LibraryManager.library, {

// Look up the function name from our stack frame cache with our PC representation.
#if USE_OFFSET_CONVERTER
emscripten_pc_get_function__deps: ['$UNWIND_CACHE', 'free', '$stringToNewUTF8'],
emscripten_pc_get_function__deps: ['$UNWIND_CACHE', '$stringToNewUTF8', 'malloc', 'free'],
// Don't treat allocation of _emscripten_pc_get_function.ret as a leak
emscripten_pc_get_function__noleakcheck: true,
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/library_async.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ mergeInto(LibraryManager.library, {
});
},

emscripten_wget_data__deps: ['$asyncLoad', 'malloc'],
emscripten_wget_data__deps: ['$asyncLoad', 'malloc', 'free'],
emscripten_wget_data__async: true,
emscripten_wget_data: function(url, pbuffer, pnum, perror) {
return Asyncify.handleSleep((wakeUp) => {
Expand Down
1 change: 1 addition & 0 deletions src/library_browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ var LibraryBrowser = {

// To avoid creating worker parent->child chains, always proxies to execute on the main thread.
emscripten_create_worker__proxy: 'sync',
emscripten_create_worker__deps: ['$UTF8ToString', 'malloc', 'free'],
emscripten_create_worker: function(url) {
url = UTF8ToString(url);
var id = Browser.workers.length;
Expand Down
2 changes: 1 addition & 1 deletion src/library_exceptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ var LibraryExceptions = {
return type;
},

__cxa_begin_catch__deps: ['$exceptionCaught', '$exception_addRef', '$uncaughtExceptionCount'],
__cxa_begin_catch__deps: ['$exceptionCaught', '$exception_addRef', '$uncaughtExceptionCount', '__cxa_can_catch', 'setTempRet0'],
__cxa_begin_catch__sig: 'pp',
__cxa_begin_catch: function(ptr) {
var info = new ExceptionInfo(ptr);
Expand Down
1 change: 1 addition & 0 deletions src/library_glew.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ var LibraryGLEW = {
},
},

glewInit__deps: ['malloc'],
glewInit: function() { return 0; },

glewIsSupported: function(name) {
Expand Down
3 changes: 2 additions & 1 deletion src/library_glfw.js
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ var LibraryGLFW = {
/*******************************************************************************
* GLFW FUNCTIONS
******************************************************************************/
glfwInit__deps: ['emscripten_get_device_pixel_ratio'],
glfwInit__deps: ['emscripten_get_device_pixel_ratio', 'malloc', 'free'],
glfwInit__sig: 'i',
glfwInit: function() {
if (GLFW.windows) return 1; // GL_TRUE
Expand Down Expand Up @@ -1269,6 +1269,7 @@ var LibraryGLFW = {
glfwPostEmptyEvent__sig: 'v',
glfwPostEmptyEvent: function() {},

glfwGetMonitors__deps: ['malloc'],
glfwGetMonitors__sig: 'ii',
glfwGetMonitors: function(count) {
{{{ makeSetValue('count', '0', '1', 'i32') }}};
Expand Down
28 changes: 14 additions & 14 deletions src/library_html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ var LibraryHTML5 = {
},
},

$registerKeyEventCallback__deps: ['$JSEvents', '$findEventTarget', '$stringToUTF8'],
$registerKeyEventCallback__deps: ['$JSEvents', '$findEventTarget', 'malloc', '$stringToUTF8'],
$registerKeyEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -503,7 +503,7 @@ var LibraryHTML5 = {
#endif
},

$registerMouseEventCallback__deps: ['$JSEvents', '$fillMouseEventData', '$findEventTarget'],
$registerMouseEventCallback__deps: ['$JSEvents', '$fillMouseEventData', '$findEventTarget', 'malloc'],
$registerMouseEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -616,7 +616,7 @@ var LibraryHTML5 = {
return {{{ cDefs.EMSCRIPTEN_RESULT_SUCCESS }}};
},

$registerWheelEventCallback__deps: ['$JSEvents', '$fillMouseEventData', '$findEventTarget'],
$registerWheelEventCallback__deps: ['$JSEvents', '$fillMouseEventData', '$findEventTarget', 'malloc'],
$registerWheelEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -692,7 +692,7 @@ var LibraryHTML5 = {
}
},

$registerUiEventCallback__deps: ['$JSEvents', '$findEventTarget'],
$registerUiEventCallback__deps: ['$JSEvents', '$findEventTarget', 'malloc'],
$registerUiEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -768,7 +768,7 @@ var LibraryHTML5 = {
return {{{ cDefs.EMSCRIPTEN_RESULT_SUCCESS }}};
},

$registerFocusEventCallback__deps: ['$JSEvents', '$findEventTarget', '$stringToUTF8'],
$registerFocusEventCallback__deps: ['$JSEvents', '$findEventTarget', 'malloc', '$stringToUTF8'],
$registerFocusEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -911,7 +911,7 @@ var LibraryHTML5 = {
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenDeviceMotionEvent.rotationRateGamma, 'rr["gamma"]', 'double') }}};
},

$registerDeviceMotionEventCallback__deps: ['$JSEvents', '$fillDeviceMotionEventData', '$findEventTarget'],
$registerDeviceMotionEventCallback__deps: ['$JSEvents', '$fillDeviceMotionEventData', '$findEventTarget', 'malloc'],
$registerDeviceMotionEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -979,7 +979,7 @@ var LibraryHTML5 = {
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenOrientationChangeEvent.orientationAngle, 'orientation', 'i32') }}};
},

$registerOrientationChangeEventCallback__deps: ['$JSEvents', '$fillOrientationChangeEventData', '$findEventTarget'],
$registerOrientationChangeEventCallback__deps: ['$JSEvents', '$fillOrientationChangeEventData', '$findEventTarget', 'malloc'],
$registerOrientationChangeEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -1099,7 +1099,7 @@ var LibraryHTML5 = {
}
},

$registerFullscreenChangeEventCallback__deps: ['$JSEvents', '$fillFullscreenChangeEventData', '$findEventTarget'],
$registerFullscreenChangeEventCallback__deps: ['$JSEvents', '$fillFullscreenChangeEventData', '$findEventTarget', 'malloc'],
$registerFullscreenChangeEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -1677,7 +1677,7 @@ var LibraryHTML5 = {
stringToUTF8(id, eventStruct + {{{ C_STRUCTS.EmscriptenPointerlockChangeEvent.id }}}, {{{ cDefs.EM_HTML5_LONG_STRING_LEN_BYTES }}});
},

$registerPointerlockChangeEventCallback__deps: ['$JSEvents', '$fillPointerlockChangeEventData', '$findEventTarget'],
$registerPointerlockChangeEventCallback__deps: ['$JSEvents', '$fillPointerlockChangeEventData', '$findEventTarget', 'malloc'],
$registerPointerlockChangeEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -1923,7 +1923,7 @@ var LibraryHTML5 = {
{{{ makeSetValue('eventStruct', C_STRUCTS.EmscriptenVisibilityChangeEvent.visibilityState, 'visibilityState', 'i32') }}};
},

$registerVisibilityChangeEventCallback__deps: ['$JSEvents', '$fillVisibilityChangeEventData', '$findEventTarget'],
$registerVisibilityChangeEventCallback__deps: ['$JSEvents', '$fillVisibilityChangeEventData', '$findEventTarget', 'malloc'],
$registerVisibilityChangeEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -1978,7 +1978,7 @@ var LibraryHTML5 = {
return {{{ cDefs.EMSCRIPTEN_RESULT_SUCCESS }}};
},

$registerTouchEventCallback__deps: ['$JSEvents', '$findEventTarget', '$getBoundingClientRect'],
$registerTouchEventCallback__deps: ['$JSEvents', '$findEventTarget', '$getBoundingClientRect', 'malloc'],
$registerTouchEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -2137,7 +2137,7 @@ var LibraryHTML5 = {
stringToUTF8(e.mapping, eventStruct + {{{ C_STRUCTS.EmscriptenGamepadEvent.mapping }}}, {{{ cDefs.EM_HTML5_MEDIUM_STRING_LEN_BYTES }}});
},

$registerGamepadEventCallback__deps: ['$JSEvents', '$fillGamepadEventData', '$findEventTarget'],
$registerGamepadEventCallback__deps: ['$JSEvents', '$fillGamepadEventData', '$findEventTarget', 'malloc'],
$registerGamepadEventCallback: function(target, userData, useCapture, callbackfunc, eventTypeId, eventTypeString, targetThread) {
#if PTHREADS
targetThread = JSEvents.getTargetThreadForEventCallback(targetThread);
Expand Down Expand Up @@ -2305,15 +2305,15 @@ var LibraryHTML5 = {
},

emscripten_set_batterychargingchange_callback_on_thread__proxy: 'sync',
emscripten_set_batterychargingchange_callback_on_thread__deps: ['$registerBatteryEventCallback', '$battery', 'malloc'],
emscripten_set_batterychargingchange_callback_on_thread__deps: ['$registerBatteryEventCallback', '$battery'],
emscripten_set_batterychargingchange_callback_on_thread: function(userData, callbackfunc, targetThread) {
if (!battery()) return {{{ cDefs.EMSCRIPTEN_RESULT_NOT_SUPPORTED }}};
registerBatteryEventCallback(battery(), userData, true, callbackfunc, {{{ cDefs.EMSCRIPTEN_EVENT_BATTERYCHARGINGCHANGE }}}, "chargingchange", targetThread);
return {{{ cDefs.EMSCRIPTEN_RESULT_SUCCESS }}};
},

emscripten_set_batterylevelchange_callback_on_thread__proxy: 'sync',
emscripten_set_batterylevelchange_callback_on_thread__deps: ['$registerBatteryEventCallback', '$battery', 'malloc'],
emscripten_set_batterylevelchange_callback_on_thread__deps: ['$registerBatteryEventCallback', '$battery'],
emscripten_set_batterylevelchange_callback_on_thread: function(userData, callbackfunc, targetThread) {
if (!battery()) return {{{ cDefs.EMSCRIPTEN_RESULT_NOT_SUPPORTED }}};
registerBatteryEventCallback(battery(), userData, true, callbackfunc, {{{ cDefs.EMSCRIPTEN_EVENT_BATTERYLEVELCHANGE }}}, "levelchange", targetThread);
Expand Down
11 changes: 7 additions & 4 deletions src/library_html5_webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ var LibraryHtml5WebGL = {
#if LibraryManager.has('library_webgl.js')
'$GL',
#endif
#if OFFSCREENCANVAS_SUPPORT
'malloc',
#endif
#if PTHREADS && OFFSCREEN_FRAMEBUFFER
'emscripten_webgl_create_context_proxied',
#endif
Expand Down Expand Up @@ -445,7 +448,7 @@ var LibraryHtml5WebGL = {
},

emscripten_webgl_get_supported_extensions__proxy: 'sync_on_current_webgl_context_thread',
emscripten_webgl_get_supported_extensions__deps: ['$stringToNewUTF8'],
emscripten_webgl_get_supported_extensions__deps: ['$stringToNewUTF8', 'malloc'],
emscripten_webgl_get_supported_extensions: function() {
return stringToNewUTF8(GLctx.getSupportedExtensions().join(' '));
},
Expand All @@ -467,13 +470,13 @@ var LibraryHtml5WebGL = {
},

emscripten_webgl_get_shader_info_log_utf8__proxy: 'sync_on_current_webgl_context_thread',
emscripten_webgl_get_shader_info_log_utf8__deps: ['$stringToNewUTF8'],
emscripten_webgl_get_shader_info_log_utf8__deps: ['$stringToNewUTF8', 'malloc'],
emscripten_webgl_get_shader_info_log_utf8: function(shader) {
return stringToNewUTF8(GLctx.getShaderInfoLog(GL.shaders[shader]));
},

emscripten_webgl_get_shader_source_utf8__proxy: 'sync_on_current_webgl_context_thread',
emscripten_webgl_get_shader_source_utf8__deps: ['$stringToNewUTF8'],
emscripten_webgl_get_shader_source_utf8__deps: ['$stringToNewUTF8', 'malloc'],
emscripten_webgl_get_shader_source_utf8: function(shader) {
return stringToNewUTF8(GLctx.getShaderSource(GL.shaders[shader]));
},
Expand Down Expand Up @@ -524,7 +527,7 @@ var LibraryHtml5WebGL = {
return obj && obj.name;
},

emscripten_webgl_get_parameter_utf8__deps: ['$stringToNewUTF8'],
emscripten_webgl_get_parameter_utf8__deps: ['$stringToNewUTF8', 'malloc'],
emscripten_webgl_get_parameter_utf8__proxy: 'sync_on_current_webgl_context_thread',
emscripten_webgl_get_parameter_utf8: function(param) {
return stringToNewUTF8(GLctx.getParameter(param));
Expand Down
Loading

0 comments on commit 67c9142

Please sign in to comment.