Closed Bug 1576900 Opened 5 years ago Closed 5 years ago

Wasm FuncType has a vector of return values

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: wingo, Assigned: wingo)

References

Details

Attachments

(1 file)

The attached patch changes wasm::FuncType to have a ValTypeVector of result types, instead of an ExprType (a thin wrapper over zero or one ValTypes), and adapts uses.

Status: NEW → ASSIGNED
Priority: -- → P1
Keywords: checkin-needed

Hi Andy, do both patches need to land?

https://irccloud.mozilla.com/file/JabIUx59/image.png

Flags: needinfo?(wingo)
Keywords: checkin-needed
Pushed by apavel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fe49a3616f91 Wasm FuncType has a vector of return values r=luke

Nevermind, I figured out the order to land them.

Flags: needinfo?(wingo)

Backed out 2 changesets (Bug 1577757, Bug 1576900) for build bustage in build/src/js/src/wasm/WasmTypes.

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=fe49a3616f91ec154b6db215a7ff0240d4872a15

Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=267621897&repo=autoland

Backout link: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=267621897&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=e3a5836b677af4e52f309e416ebe33048921b829

[task 2019-09-20T10:36:21.480Z] 10:36:21     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -o StoreBuffer.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DDEBUG=1 -DWASM_SUPPORTS_HUGE_MEMORY -DJS_CACHEIR_SPEW -DJS_STRUCTURED_SPEW -DJS_HAS_CTYPES -DFFI_BUILDING -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -I/builds/worker/workspace/build/src/js/src/gc -I/builds/worker/workspace/build/src/obj-firefox/js/src/gc -I/builds/worker/workspace/build/src/obj-firefox/js/src -I/builds/worker/workspace/build/src/js/src -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/js/src/js-confdefs.h -Qunused-arguments -ftrivial-auto-var-init=pattern -U_FORTIFY_SOURCE -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-noexcept-type -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fsanitize=address -fcrash-diagnostics-dir=/builds/worker/artifacts -ftrivial-auto-var-init=pattern -U_FORTIFY_SOURCE -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O1 -fno-omit-frame-pointer -funwind-tables -Werror -fno-strict-aliasing -Werror=format -Wno-shadow  -MD -MP -MF .deps/StoreBuffer.o.pp   /builds/worker/workspace/build/src/js/src/gc/StoreBuffer.cpp
[task 2019-09-20T10:36:21.480Z] 10:36:21     INFO -  In file included from /builds/worker/workspace/build/src/js/src/gc/StoreBuffer.cpp:7:
[task 2019-09-20T10:36:21.481Z] 10:36:21     INFO -  In file included from /builds/worker/workspace/build/src/js/src/gc/StoreBuffer-inl.h:15:
[task 2019-09-20T10:36:21.481Z] 10:36:21     INFO -  In file included from /builds/worker/workspace/build/src/js/src/gc/Heap-inl.h:13:
[task 2019-09-20T10:36:21.481Z] 10:36:21     INFO -  In file included from /builds/worker/workspace/build/src/js/src/gc/Zone.h:19:
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  In file included from /builds/worker/workspace/build/src/js/src/vm/Runtime.h:59:
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  In file included from /builds/worker/workspace/build/src/js/src/vm/Stack.h:31:
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  In file included from /builds/worker/workspace/build/src/js/src/wasm/WasmFrameIter.h:24:
[task 2019-09-20T10:36:21.482Z] 10:36:21    ERROR -  /builds/worker/workspace/build/src/js/src/wasm/WasmTypes.h:511:53: error: Type 'Maybe<js::wasm::ValType>' must not be used as parameter
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  static inline jit::MIRType ToMIRType(Maybe<ValType> t) {
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -                                                      ^
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  /builds/worker/workspace/build/src/js/src/wasm/WasmTypes.h:511:53: note: Please consider passing a const reference instead
[task 2019-09-20T10:36:21.482Z] 10:36:21    ERROR -  /builds/worker/workspace/build/src/js/src/wasm/WasmTypes.h:538:52: error: Type 'Maybe<js::wasm::ValType>' must not be used as parameter
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  static inline const char* ToCString(Maybe<ValType> type) {
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -                                                     ^
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  /builds/worker/workspace/build/src/js/src/wasm/WasmTypes.h:538:52: note: Please consider passing a const reference instead
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  2 errors generated.
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  /builds/worker/workspace/build/src/config/rules.mk:785: recipe for target 'StoreBuffer.o' failed
[task 2019-09-20T10:36:21.482Z] 10:36:21    ERROR -  make[4]: *** [StoreBuffer.o] Error 1
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/src/gc'
[task 2019-09-20T10:36:21.482Z] 10:36:21     INFO -  make[4]: *** Waiting for unfinished jobs....
[task 2019-09-20T10:36:21.483Z] 10:36:21     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/js/src/wasm'
[task 2019-09-20T10:36:21.483Z] 10:36:21     INFO -  js/src/wasm/Unified_cpp_js_src_wasm1.o
[task 2019-09-20T10:36:21.483Z] 10:36:21     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/src/wasm'
[task 2019-09-20T10:36:21.660Z] 10:36:21     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/mfbt/tests'
[task 2019-09-20T10:36:21.661Z] 10:36:21     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -o TestMathAlgorithms.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DDEBUG=1 -DIMPL_MFBT -I/builds/worker/workspace/build/src/mfbt/tests -I/builds/worker/workspace/build/src/obj-firefox/mfbt/tests -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/testing -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -ftrivial-auto-var-init=pattern -U_FORTIFY_SOURCE -fno-common -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fsanitize=address -fcrash-diagnostics-dir=/builds/worker/artifacts -ftrivial-auto-var-init=pattern -U_FORTIFY_SOURCE -fno-common -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O1 -fno-omit-frame-pointer -funwind-tables -Werror -Wno-error=shadow  -MD -MP -MF .deps/TestMathAlgorithms.o.pp   /builds/worker/workspace/build/src/mfbt/tests/TestMathAlgorithms.cpp
[task 2019-09-20T10:36:21.662Z] 10:36:21     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/mfbt/tests'
[task 2019-09-20T10:36:21.682Z] 10:36:21     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/mfbt/tests'
[task 2019-09-20T10:36:21.682Z] 10:36:21     INFO -  mfbt/tests/TestMaybe.o
[task 2019-09-20T10:36:21.682Z] 10:36:21     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/mfbt/tests'
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/js/src/gdb'
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -o Unified_cpp_js_src_gdb0.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DDEBUG=1 -DMOZ_HAS_MOZGLUE -DEXPORT_JS_API -Dtopsrcdir=/builds/worker/workspace/build/src/js/src -I/builds/worker/workspace/build/src/js/src/gdb -I/builds/worker/workspace/build/src/obj-firefox/js/src/gdb -I/builds/worker/workspace/build/src/obj-firefox/js/src -I/builds/worker/workspace/build/src/js/src -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/js/src/js-confdefs.h -Qunused-arguments -ftrivial-auto-var-init=pattern -U_FORTIFY_SOURCE -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-noexcept-type -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fsanitize=address -fcrash-diagnostics-dir=/builds/worker/artifacts -ftrivial-auto-var-init=pattern -U_FORTIFY_SOURCE -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O1 -fno-omit-frame-pointer -funwind-tables -Werror -fno-strict-aliasing -Werror=format -Wno-shadow  -MD -MP -MF .deps/Unified_cpp_js_src_gdb0.o.pp   Unified_cpp_js_src_gdb0.cpp
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  In file included from Unified_cpp_js_src_gdb0.cpp:2:
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  In file included from /builds/worker/workspace/build/src/js/src/gdb/tests/test-ExecutableAllocator.cpp:5:
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  In file included from /builds/worker/workspace/build/src/js/src/vm/JSContext.h:27:
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  In file included from /builds/worker/workspace/build/src/js/src/vm/Runtime.h:59:
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  In file included from /builds/worker/workspace/build/src/js/src/vm/Stack.h:31:
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  In file included from /builds/worker/workspace/build/src/js/src/wasm/WasmFrameIter.h:24:
[task 2019-09-20T10:36:22.473Z] 10:36:22    ERROR -  /builds/worker/workspace/build/src/js/src/wasm/WasmTypes.h:511:53: error: Type 'Maybe<js::wasm::ValType>' must not be used as parameter
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  static inline jit::MIRType ToMIRType(Maybe<ValType> t) {
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -                                                      ^
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  /builds/worker/workspace/build/src/js/src/wasm/WasmTypes.h:511:53: note: Please consider passing a const reference instead
[task 2019-09-20T10:36:22.473Z] 10:36:22    ERROR -  /builds/worker/workspace/build/src/js/src/wasm/WasmTypes.h:538:52: error: Type 'Maybe<js::wasm::ValType>' must not be used as parameter
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  static inline const char* ToCString(Maybe<ValType> type) {
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -                                                     ^
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  /builds/worker/workspace/build/src/js/src/wasm/WasmTypes.h:538:52: note: Please consider passing a const reference instead
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  2 errors generated.
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  /builds/worker/workspace/build/src/config/rules.mk:785: recipe for target 'Unified_cpp_js_src_gdb0.o' failed
[task 2019-09-20T10:36:22.473Z] 10:36:22    ERROR -  make[4]: *** [Unified_cpp_js_src_gdb0.o] Error 1
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/src/gdb'
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  /builds/worker/workspace/build/src/config/recurse.mk:74: recipe for target 'js/src/gdb/target-objects' failed
[task 2019-09-20T10:36:22.473Z] 10:36:22    ERROR -  make[3]: *** [js/src/gdb/target-objects] Error 2
[task 2019-09-20T10:36:22.473Z] 10:36:22     INFO -  make[3]: *** Waiting for unfinished jobs....
[task 2019-09-20T10:36:22.493Z] 10:36:22     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/mfbt/tests'
[task 2019-09-20T10:36:22.493Z] 10:36:22     INFO -  mfbt/tests/TestNonDereferenceable.o
Flags: needinfo?(wingo)

Hi, sorry I didn't see the note in time -- I am wingo on IRC, fwiw. Indeed the order in phab is the right order for landing. I fixed this error (which oddly didn't show in my local builds), rebased, and re-uploaded to phab. Re-setting checkin-needed. Thanks very much for the landing!!

Flags: needinfo?(wingo)
Keywords: checkin-needed

Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/948702f3a01f
Wasm FuncType has a vector of return values r=luke

Keywords: checkin-needed

(In reply to Andy Wingo [:wingo] from comment #6)

Hi, sorry I didn't see the note in time -- I am wingo on IRC, fwiw. Indeed the order in phab is the right order for landing. I fixed this error (which oddly didn't show in my local builds), rebased, and re-uploaded to phab. Re-setting checkin-needed. Thanks very much for the landing!!

No problem, thanks for fixing this. Relanding the stack worked without issues this time.

setting checkin-needed; see https://bugzilla.mozilla.org/show_bug.cgi?id=1577757#c7 for summary. thanks :)

Keywords: checkin-needed

Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d2fa4e1a030f
Wasm FuncType has a vector of return values r=luke

Keywords: checkin-needed

Tx for poking, will reland this one tomorrow.

Flags: needinfo?(wingo)
Keywords: checkin-needed

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/133d7a10348a
Wasm FuncType has a vector of return values r=luke

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: