-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean-up JavaScript from unneeded exported functions #1589
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is currently done in an blunt way via awk. Proper solution would be for Emscripten to have a way to expose two layers: C[++] functions that needs to be externally visible to other dlopened modules and C[++] functions that needs to be exposed to the JS side
I was discussing the PR with @Mause, that suggested adding a sample of the lines that are filtered out: var __ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor14ExecuteGenericIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_ = Module["__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) => (__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_ = Module["__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"] = wasmExports["_ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIyyyNS_29BinaryStandardOperatorWrapperENS_11AddOperatorEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIiiiNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIxxxNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchINS_9hugeint_tES2_S2_NS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES6_S6_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIhhhNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchItttNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIjjjNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor13ExecuteSwitchIyyyNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_ = Module["__ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_"] = (a0, a1) => (__ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_ = Module["__ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_"] = wasmExports["_ZN6duckdb24AddOperatorOverflowCheck9OperationIaaaEET1_T_T0_"])(a0, a1);
var __ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor11ExecuteFlatIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = (a0, a1, a2, a3, a4, a5, a6) => (__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = wasmExports["_ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"])(a0, a1, a2, a3, a4, a5, a6);
var __ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor14ExecuteGenericIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = (a0, a1, a2, a3, a4, a5, a6) => (__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = wasmExports["_ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"])(a0, a1, a2, a3, a4, a5, a6);
var __ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = (a0, a1, a2, a3, a4, a5, a6) => (__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_ = Module["__ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"] = wasmExports["_ZN6duckdb14BinaryExecutor15ExecuteFlatLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvPKT_PKT0_PT1_yRNS_12ValidityMaskET4_"])(a0, a1, a2, a3, a4, a5, a6);
var __ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_ = Module["__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"] = (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) => (__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_ = Module["__ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"] = wasmExports["_ZN6duckdb14BinaryExecutor18ExecuteGenericLoopIaaaNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbEEvPKT_PKT0_PT1_PKNS_15SelectionVectorESE_yRNS_12ValidityMaskESG_SG_T4_"])(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
var __ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_ = Module["__ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_"] = (a0, a1) => (__ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_ = Module["__ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_"] = wasmExports["_ZN6duckdb24AddOperatorOverflowCheck9OperationIsssEET1_T_T0_"])(a0, a1);
var __ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb0ELb1EEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5);
var __ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"] = (a0, a1, a2, a3, a4, a5) => (__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_ = Module["__ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"] = wasmExports["_ZN6duckdb14BinaryExecutor11ExecuteFlatIsssNS_29BinaryStandardOperatorWrapperENS_24AddOperatorOverflowCheckEbLb1ELb0EEEvRNS_6VectorES5_S5_yT4_"])(a0, a1, a2, a3, a4, a5); Average symbol name is 100 chars, repeated 5 times in the same line, multiplied 80K symbols. |
carlopi
changed the title
Clean-up JavaScript from unneded exported functions
Clean-up JavaScript from unneeded exported functions
Jan 17, 2024
Thanks! Let's give it a shot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This drastically reduce the size of the generated JavaScript worker code, from 45M uncompressed to 2M, and reduces also the time spent processing the JS file and creating a bunch of (unnecessary) wrappers.
Problem is connected to dynamic loading of extensions, since I haven't found a proper way to express "symbol should be available to other dlopen-ed modules BUT it's not needed on the JavaScript side".
I am not sure whether this is a current Emscripten limitation or if the compiler wrapper should be invoked in a different way.
Current solution is blunt and exploit current Emscripten specifics code-generation around
var wasmExports = createWasm();
. This needs to be reworked to be compatible with future versions.Basically before this PR for any symbol exported at the C++ level a function like:
would be generated.
Multiplied 80K symbols, it meant a lot of JavaScript code had to be downloaded, parsed and executed for no actual use.
This should solve #1561, but I will have to properly check after this gets merged.
This adds a (compile-time) dependency on awk (that should be widely available) and on the npm module js-beautify.