mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 22:10:01 -04:00
chrome 60? support
This commit is contained in:
parent
07a304e9c6
commit
268711e9a5
2 changed files with 8 additions and 4 deletions
|
@ -23,12 +23,14 @@ else
|
|||
WASMOPTFLAGS=""
|
||||
fi
|
||||
|
||||
if [ "${RELEASE:-0}" = "1" ]; then
|
||||
mv out/epoxy_client_bg.wasm out/epoxy_client_unoptimized.wasm
|
||||
wasm-opt --signext-lowering out/epoxy_client_unoptimized.wasm -o out/epoxy_client_lowered.wasm
|
||||
|
||||
if [ "${RELEASE:-0}" = "1" ]; then
|
||||
(
|
||||
G="--generate-global-effects"
|
||||
time wasm-opt $WASMOPTFLAGS \
|
||||
out/epoxy_client_unoptimized.wasm -o out/epoxy_client_bg.wasm \
|
||||
out/epoxy_client_lowered.wasm -o out/epoxy_client_bg.wasm \
|
||||
--converge \
|
||||
$G --type-unfinalizing $G --type-ssa $G -O4 $G --flatten $G --rereloop $G -O4 $G -O4 $G --type-merging $G --type-finalizing $G -O4 \
|
||||
$G --type-unfinalizing $G --type-ssa $G -Oz $G --flatten $G --rereloop $G -Oz $G -Oz $G --type-merging $G --type-finalizing $G -Oz \
|
||||
|
@ -36,6 +38,8 @@ if [ "${RELEASE:-0}" = "1" ]; then
|
|||
$G --type-unfinalizing $G --type-ssa $G -O4 $G --flatten $G --rereloop $G -O4 $G -O4 $G --type-merging $G --type-finalizing $G -O4 \
|
||||
$G --type-unfinalizing $G --type-ssa $G -Oz $G --flatten $G --rereloop $G -Oz $G -Oz $G --type-merging $G --type-finalizing $G -Oz
|
||||
)
|
||||
else
|
||||
mv out/epoxy_client_lowered.wasm out/epoxy_client_bg.wasm
|
||||
fi
|
||||
echo "[epx] wasm-opt finished"
|
||||
|
||||
|
@ -77,7 +81,7 @@ echo "$AUTOGENERATED_SOURCE" > pkg/epoxy.js
|
|||
echo "$AUTOGENERATED_INFO_FUNC" >> pkg/epoxy.js
|
||||
|
||||
WASM_BASE64=$(base64 -w0 out/epoxy_client_bg.wasm)
|
||||
AUTOGENERATED_SOURCE=${AUTOGENERATED_SOURCE//__wbg_init(module_or_path, memory) \{/__wbg_init(module_or_path, memory) \{$'\n\t'module_or_path ||= $'{};\n\t'module_or_path.module_or_path=new URL(\'data:application/wasm;base64,$WASM_BASE64\')}
|
||||
AUTOGENERATED_SOURCE=${AUTOGENERATED_SOURCE//__wbg_init(module_or_path) \{/__wbg_init(module_or_path) \{$'\n\t'module_or_path ||= $'{};\n\t'module_or_path.module_or_path=new URL(\'data:application/wasm;base64,$WASM_BASE64\')}
|
||||
|
||||
echo "$AUTOGENERATED_SOURCE" > pkg/epoxy-bundled.js
|
||||
echo "$AUTOGENERATED_INFO_FUNC" >> pkg/epoxy-bundled.js
|
||||
|
|
|
@ -312,7 +312,7 @@ pub fn is_null_body(code: u16) -> bool {
|
|||
export function object_get(obj, k) {
|
||||
try {
|
||||
return obj[k]
|
||||
} catch {
|
||||
} catch(x) {
|
||||
return undefined
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue