Closed Bug 1897979 Opened 6 months ago Closed 4 months ago

Implement string constants using special import path

Categories

(Core :: JavaScript: WebAssembly, task, P3)

task

Tracking

()

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

When 'importedStringConstants' is true, all imports from the "'" namespace
are automatically populated with a JS string equal to the import field.

So (import "'" "my string constant" (global (ref extern))) will yield
a global populated with a js string of 'my string constant'.

Assignee: nobody → rhunt
Status: NEW → ASSIGNED

This may or may not make it into the proposal. But allow changing the
string constant namespace from "'" to something else through a flag.

Depends on D213867

Attachment #9407681 - Attachment description: Bug 1897979 - wasm: Allow configuring string constants namespace. r?yury → Bug 1897979 - wasm: Require configuring string constants namespace. r?yury
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/5b131d8d64ea wasm: Implement 'importedStringConstants' option. r=yury https://hg.mozilla.org/integration/autoland/rev/0ed9397a77c1 wasm: Require configuring string constants namespace. r=bvisness https://hg.mozilla.org/integration/autoland/rev/de49cb439a66 1902835, 1903126: apply code formatting via Lando

Backed out for causing bustages on WasmJS.

[task 2024-07-18T20:53:14.051Z] 20:53:14     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/layout/style'
[task 2024-07-18T20:53:14.927Z] 20:53:14     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/js/src/wasm'
[task 2024-07-18T20:53:14.933Z] 20:53:14     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang-cl -fms-compatibility-version=19.39 -std:c++17 -Xclang -ivfsoverlay -Xclang /builds/worker/fetches/vs/overlay.yaml -FoUnified_cpp_js_src_wasm3.obj -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -guard:cf -DNDEBUG=1 -DTRIMMED=1 -DWASM_SUPPORTS_HUGE_MEMORY -DJS_HAS_CTYPES -DFFI_BUILDING -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -DMOZ_SUPPORT_LEAKCHECKING -I/builds/worker/checkouts/gecko/js/src/wasm -I/builds/worker/workspace/obj-build/js/src/wasm -I/builds/worker/workspace/obj-build/js/src -I/builds/worker/checkouts/gecko/js/src -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -MD -DMOZILLA_CLIENT -FI /builds/worker/workspace/obj-build/mozilla-config.h -Zc:sizedDealloc- -Gy -Zc:inline -Gw -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -TP -GR- -D_HAS_EXCEPTIONS=0 -fcrash-diagnostics-dir=/builds/worker/artifacts -Z7 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -Oy -Werror -W3 -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wvolatile -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-microsoft-exception-spec -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -Xclang -ffp-contract=off -DNS_FREE_PERMANENT_DATA=1 /clang:-fprofile-generate -mllvm -pgo-temporal-instrumentation -mllvm -enable-name-compression=false -Xclang -MP -Xclang -dependency-file -Xclang .deps/Unified_cpp_js_src_wasm3.obj.pp -Xclang -MT -Xclang Unified_cpp_js_src_wasm3.obj   Unified_cpp_js_src_wasm3.cpp
[task 2024-07-18T20:53:14.935Z] 20:53:14     INFO -  In file included from Unified_cpp_js_src_wasm3.cpp:38:
[task 2024-07-18T20:53:14.938Z] 20:53:14    ERROR -  /builds/worker/checkouts/gecko/js/src/wasm/WasmJS.cpp(1169,10): error: unused variable 'numFuncImport' [-Werror,-Wunused-variable]
[task 2024-07-18T20:53:14.939Z] 20:53:14     INFO -   1169 |   size_t numFuncImport = 0;
[task 2024-07-18T20:53:14.940Z] 20:53:14     INFO -        |          ^~~~~~~~~~~~~
[task 2024-07-18T20:53:14.940Z] 20:53:14    ERROR -  /builds/worker/checkouts/gecko/js/src/wasm/WasmJS.cpp(1170,10): error: unused variable 'numMemoryImport' [-Werror,-Wunused-variable]
[task 2024-07-18T20:53:14.941Z] 20:53:14     INFO -   1170 |   size_t numMemoryImport = 0;
[task 2024-07-18T20:53:14.942Z] 20:53:14     INFO -        |          ^~~~~~~~~~~~~~~
[task 2024-07-18T20:53:14.942Z] 20:53:14    ERROR -  /builds/worker/checkouts/gecko/js/src/wasm/WasmJS.cpp(1171,10): error: unused variable 'numGlobalImport' [-Werror,-Wunused-variable]
[task 2024-07-18T20:53:14.943Z] 20:53:14     INFO -   1171 |   size_t numGlobalImport = 0;
[task 2024-07-18T20:53:14.943Z] 20:53:14     INFO -        |          ^~~~~~~~~~~~~~~
[task 2024-07-18T20:53:14.944Z] 20:53:14    ERROR -  /builds/worker/checkouts/gecko/js/src/wasm/WasmJS.cpp(1172,10): error: unused variable 'numTableImport' [-Werror,-Wunused-variable]
[task 2024-07-18T20:53:14.945Z] 20:53:14     INFO -   1172 |   size_t numTableImport = 0;
[task 2024-07-18T20:53:14.945Z] 20:53:14     INFO -        |          ^~~~~~~~~~~~~~
[task 2024-07-18T20:53:14.946Z] 20:53:14    ERROR -  /builds/worker/checkouts/gecko/js/src/wasm/WasmJS.cpp(1173,10): error: unused variable 'numTagImport' [-Werror,-Wunused-variable]
[task 2024-07-18T20:53:14.946Z] 20:53:14     INFO -   1173 |   size_t numTagImport = 0;
[task 2024-07-18T20:53:14.947Z] 20:53:14     INFO -        |          ^~~~~~~~~~~~
[task 2024-07-18T20:53:14.948Z] 20:53:14     INFO -  5 errors generated.
[task 2024-07-18T20:53:14.948Z] 20:53:14    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:675: Unified_cpp_js_src_wasm3.obj] Error 1
[task 2024-07-18T20:53:14.948Z] 20:53:14     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src/wasm'
[task 2024-07-18T20:53:14.948Z] 20:53:14     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/js/src/wasm'
[task 2024-07-18T20:53:14.948Z] 20:53:14     INFO -  js/src/wasm/Unified_cpp_js_src_wasm4.obj
[task 2024-07-18T20:53:14.948Z] 20:53:14     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src/wasm'
[task 2024-07-18T20:53:15.493Z] 20:53:15     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/js/src'
[task 2024-07-18T20:53:15.496Z] 20:53:15     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang-cl -fms-compatibility-version=19.39 -std:c++17 -Xclang -ivfsoverlay -Xclang /builds/worker/fetches/vs/overlay.yaml -FoUnified_cpp_js_src20.obj -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -guard:cf -DNDEBUG=1 -DTRIMMED=1 -DWASM_SUPPORTS_HUGE_MEMORY -DJS_HAS_CTYPES -DFFI_BUILDING -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -DMOZ_SUPPORT_LEAKCHECKING -I/builds/worker/checkouts/gecko/js/src -I/builds/worker/workspace/obj-build/js/src -I/builds/worker/checkouts/gecko/intl/icu_capi/bindings/c -I/builds/worker/workspace/obj-build/js/src/ctypes/libffi/include -I/builds/worker/checkouts/gecko/js/src/ctypes/libffi/src/x86 -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -MD -DMOZILLA_CLIENT -FI /builds/worker/workspace/obj-build/mozilla-config.h -Zc:sizedDealloc- -Gy -Zc:inline -Gw -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -TP -GR- -D_HAS_EXCEPTIONS=0 -fcrash-diagnostics-dir=/builds/worker/artifacts -Z7 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -Oy -Werror -W3 -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wvolatile -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-microsoft-exception-spec -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -Xclang -ffp-contract=off -DNS_FREE_PERMANENT_DATA=1 /clang:-fprofile-generate -mllvm -pgo-temporal-instrumentation -mllvm -enable-name-compression=false -Xclang -MP -Xclang -dependency-file -Xclang .deps/Unified_cpp_js_src20.obj.pp -Xclang -MT -Xclang Unified_cpp_js_src20.obj   Unified_cpp_js_src20.cpp
Flags: needinfo?(rhunt)

Looks like I got an ifdef slightly wrong for when WASM_JS_STRING_BUILTINGS=1 but WASM_TYPE_REFLECTION=0, and that is triggered in a release sim job.

Flags: needinfo?(rhunt)
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/6ec476abf37e wasm: Implement 'importedStringConstants' option. r=yury https://hg.mozilla.org/integration/autoland/rev/9626a63bdcb0 wasm: Require configuring string constants namespace. r=bvisness https://hg.mozilla.org/integration/autoland/rev/bed025786300 1902835, 1903126: apply code formatting via Lando
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: