abrown updated PR #1223 from upstream-interpreter-in-wasmtime
to master
:
See https://github.com/bytecodealliance/cranelift/pull/1351.
abrown updated PR #1223 from upstream-interpreter-in-wasmtime
to master
:
See https://github.com/bytecodealliance/cranelift/pull/1351.
bnjbvr submitted PR Review.
bnjbvr submitted PR Review.
bnjbvr created PR Review Comment:
Can you put
The Cranelift Project Developers
here, please?
bnjbvr created PR Review Comment:
Can you detail this FIXME? Is this something you plan to fix before or after landing this PR?
bnjbvr created PR Review Comment:
Could this be a soft-error via a
FileRunnerFailure
instead?
bnjbvr created PR Review Comment:
nit: former URL here
bnjbvr created PR Review Comment:
This should just contain
values
, notinvoke
andcompare
right?
bnjbvr created PR Review Comment:
Would it make sense to put this file in
filetests
itself, instead? It seems this functionality is usually handled infiletests
src.
bnjbvr created PR Review Comment:
nit: we can just return
self.block()
here
bnjbvr created PR Review Comment:
Out of curiosity, should all these modules be publicly exposed? Instead, could we expose the minimal amount that's required to be useful and for testing?
bnjbvr created PR Review Comment:
nit: this field's name is a bit strange, I'd have expected a hashmap here.. How about
func_names
instead?
bnjbvr created PR Review Comment:
Could the recursion be avoided by having an infinite loop above the for loop, remembering what the next BB will be, and breaking when the next BB differs from the current BB?
(also nit: we do have BB and not EBBs now :))
bnjbvr created PR Review Comment:
brnz is actually polymorphic and can take integers as inputs. Can you either implement the right thing or add a TODO here, please?
bnjbvr created PR Review Comment:
Could this function be inlined at uses instead?
bnjbvr created PR Review Comment:
Alternatively, could the
opcode
be passed tobinary
, and the result can be computed there (with a match on the opcode), without passing a function pointer? Then we don't need the implicit add/sub impl of values, and it makes it easier to add new opcodes.
bjorn3 submitted PR Review.
bjorn3 created PR Review Comment:
Miri exposes a lot of things that are only used by priroda, which is a graphical debugger based on miri. It may make sense to do the same for
cranelift-interpreter
.
abrown updated PR #1223 from upstream-interpreter-in-wasmtime
to master
:
See https://github.com/bytecodealliance/cranelift/pull/1351.
abrown updated PR #1223 from upstream-interpreter-in-wasmtime
to master
:
See https://github.com/bytecodealliance/cranelift/pull/1351.
abrown updated PR #1223 from upstream-interpreter-in-wasmtime
to master
:
See https://github.com/bytecodealliance/cranelift/pull/1351.
abrown updated PR #1223 from upstream-interpreter-in-wasmtime
to master
:
See https://github.com/bytecodealliance/cranelift/pull/1351.
abrown updated PR #1223 from upstream-interpreter-in-wasmtime
to master
:
See https://github.com/bytecodealliance/cranelift/pull/1351.
abrown submitted PR Review.
abrown created PR Review Comment:
The newly-pushed commits move all of this stuff into the filetests crate.
abrown submitted PR Review.
abrown created PR Review Comment:
Now that
RunCommand
is incranelift-reader
, I was able to remove theclif
module and use that instead. The other modules we probably do want to make public:interpreter
,frame
,environment
.
abrown submitted PR Review.
abrown created PR Review Comment:
In the rebased commits I used a macro instead; let me know what you think of that.
abrown submitted PR Review.
abrown created PR Review Comment:
The rebased commits have
block
instead ofebb
. My TCO comment (now removed) was in hopes that Rust was somehow smart enough to avoid recursive calls... is there an easy way to check if that is happening?
bnjbvr requested bnjbvr for a review on PR #1223.
abrown updated PR #1223 from upstream-interpreter-in-wasmtime
to master
:
See https://github.com/bytecodealliance/cranelift/pull/1351.
bnjbvr requested fitzgen and sunfishcode for a review on PR #1223.
bnjbvr requested fitzgen and sunfishcode for a review on PR #1223.
fitzgen submitted PR Review.
fitzgen submitted PR Review.
fitzgen created PR Review Comment:
Oh, I see. Yeah, I think the intent would be a lot more clear with a hash map.
fitzgen created PR Review Comment:
It looks like this is actually mapping indices to names. If so, then the field name should be changed to
index_to_function_name
to reflect that.
fitzgen created PR Review Comment:
This can be made a bit more concise and less boiler plate-y with
?
propagation:let fr = self.index_of(name)?; self.get_by_func_ref(fr)
fitzgen created PR Review Comment:
assert_eq!(old_names.len(), new_names.len());
Also, it isn't valid to clear every other value, since blocks are free to access variables defined in other blocks that dominate them, right?
fitzgen created PR Review Comment:
Check that
arguments.len() == parameters.len()
?
fitzgen created PR Review Comment:
_ => unimplemented!("interpreter doesn't support opcode yet: {:?}", opcode),
fitzgen created PR Review Comment:
_ => unimplemented!("interpreter doesn't support opcode yet: {:?}", opcode),
fitzgen created PR Review Comment:
_ => unimplemented!("interpreter doesn't support opcode yet: {:?}", opcode),
fitzgen created PR Review Comment:
_ => unimplemented!("interpreter doesn't support opcode yet: {:?}", opcode),
fitzgen created PR Review Comment:
_ => unimplemented!("interpreter doesn't support opcode yet: {:?}", opcode),
fitzgen created PR Review Comment:
_ => unimplemented!("interpreter doesn't support opcode yet: {:?}", opcode),
fitzgen created PR Review Comment:
_ => unimplemented!("interpreter doesn't support opcode yet: {:?}", opcode),
fitzgen created PR Review Comment:
_ => unimplemented!("interpreter doesn't support opcode yet: {:?}", opcode),
abrown submitted PR Review.
abrown created PR Review Comment:
Nice. Only thought that worked with
Result
!
abrown submitted PR Review.
abrown created PR Review Comment:
The assertion is inside
Frame::with_parameters
abrown submitted PR Review.
abrown created PR Review Comment:
But those variables would be in another frame and I am using a frame per block; we can't access SSA values from another block (I just checked). I guess the naming is confusing because normally one would expect a "frame per function" scheme. I'll leave it for now but I'll try to think of some better name...
BlockEnvironment
? And renameEnvironment
to something likeFunctionEnvironment
? Suggestions welcome.
abrown updated PR #1223 from upstream-interpreter-in-wasmtime
to master
:
See https://github.com/bytecodealliance/cranelift/pull/1351.
abrown merged PR #1223.
Last updated: Nov 22 2024 at 16:03 UTC