near / wasmtime

Standalone JIT-style runtime for WebAssembly, using Cranelift
https://wasmtime.dev/
Apache License 2.0
3 stars 4 forks source link

What ``cranelift::filetest::test_zkasm::optimize_labels`` do? #96

Closed MCJOHN974 closed 9 months ago

MCJOHN974 commented 9 months ago

Specially this line looks strange for me:

let pos_end = pos + line[pos..].find(&")").unwrap();

(cranelift/filetests/src/test_zkasm.rs, line 88).

Which label naming policy we have? How labels should be named?

MCJOHN974 commented 9 months ago

@akashin, maybe you can help?

aborg-dev commented 9 months ago

@akashin, maybe you can help?

Does https://github.com/near/wasmtime/pull/97 clarify this?

For the names of the labels, we must ensure they are unique across multiple Cranelift functions and are valid ZK ASM labels, but otherwise, we are free to choose anything.

MCJOHN974 commented 9 months ago

Fixed at #97