By inspection, the Verify/JIT pipeline does: coerce value -> int|Number coerce index -> int Whereas the abc/wordcode interpreters do: coerce index -> int coerce value -> int|Number I propose the JIT is correct because arguments are converted left-to-right on the stack, like calls. (Bug 624221 has a pending patch for the avmspec).
Test case: $ abcasm intrinsics.abs $ avm intrinsics.abc store-args.as (yes, its eval-compatible) notice how output differs with -Dinterp or not. I haven't turned this into a standard test case, so not doing R? yet. Doing so requires at least using dir.asc_args, but also ensuring that runtest.py can compile intrinsics.abs on-demand and also with --rebuildtests.
Attachment #563417 - Attachment description: mops store opcodes coerce args out of order. → Test case for mops-store opcodes.
Straightforward fix to align with JIT.
Assignee: nobody → wmaddox
Attachment #597234 - Flags: review?(edwsmith)
Comment on attachment 597234 [details] [diff] [review] Coerce value before address when interpretings MOps stores Note that Brent already landed some or all (at least intrinsics.abs) of the test case files.
Attachment #597234 - Flags: review?(edwsmith) → review+
changeset: 7226:ba888f512b73 user: William Maddox <email@example.com> summary: Bug 689882: Correct order in which coercions are applied to MOps store arguments (r=edwsmith) http://hg.mozilla.org/tamarin-redux/rev/ba888f512b73
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.