Conversation
|
|
||
| ;; TODO(3, rossberg): enable t_2* <: C.RETURN | ||
| rule Instr_ok2/return_call_addr: | ||
| s; C |- RETURN_CALL_ADDR a : t_3* t_1* (REF NULL dt) -> t_4* |
There was a problem hiding this comment.
Same for the ref null dt here
| -- Instrtype_ok: C |- t_3* -> t_4* : OK | ||
|
|
||
| rule Instr_ok2/throw_addr: | ||
| s; C |- THROW_ADDR a : t_1* t* -> t_2* |
There was a problem hiding this comment.
t^* here looks to be droppable as well (same as the above 2)
| -- Instrs_ok2: s; C |- instr* : eps ->_(x*) t* | ||
|
|
||
| rule Instr_ok2/call_addr: | ||
| s; C |- CALL_ADDR a : t_1* (REF NULL dt) -> t_2* |
There was a problem hiding this comment.
Hmm, I thought we would be able to drop the additional REF NULL dt here given that call_addr is now the dedicated invoke admin instruction (so it only resolves the lookup and invoke the function frame).
|
That's a nice and helpful cleanup! Most of the changes look correct, although there are some The AL breakage might be due to Upd: Oh I might have seen the point -- without the guard it seems to introduce nondet reduction paths. But I think the program above is genuinely stuck, as the reference cannot be resolved to a Given that we now have |
|
Ah, too many copy&paste errors, thanks! As for the the AL problem, that already occurs during translation, so isn't a stuck rule. Fixing the throw_ref rule didn't change it. I suspect that I need to change where the ThrowI arg is coming from in the translate.ml, but I'm not sure how to get (and transform) the immediate. |
|
I see. iirc the AL had some hard coded implementations for evaluation context instructions, and On a side note, I'd only wish if a similar clean restriction could apply to the reference instructions like In my work I've made |
@raoxiaojia, this makes the change suggested in #2188 and replaces the use of call_ref as a semi-administrative instruction with a dedicated call_addr. Analogously, do the same change for throw_ref/throw_addr. This allowed to remove all occurrences of typeuse from the instruction syntax. PTAL.
@f52985, the change to throw_ref breaks AL translation. There appears to be some special handling of throw rules, but I couldn't figure out exactly what it does and
why the tweak I did wasn't enoughhow to get the immediate of the throw_addr instruction instead of the stack top. Can you please take a look?