Open Bug 1973076 Opened 2 days ago Updated 1 day ago

JumpTarget ops have the bad line number information

Categories

(Core :: JavaScript Engine, task)

task

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

Details

Example

function f(x) {
    if (x === 5) {
        return 1;
    }
    return 2;
}
loc   line  op
----- ----  --
main:
00000:   2  GetArg 0                    # x
00003:   2  StrictConstantEq 261        # (x === 5)
00006:   2  JumpIfFalse 18 (+12)        # 
00011:   2  JumpTarget (ic: 1)          # 
00016:   3  One                         # 1
00017:   6  Return                      # 
00018:   6  JumpTarget (ic: 1)          # 
00023:   5  Int8 2                      # 2
00025:   6  Return                      # 
00026:   6  RetRval                     # !!! UNREACHABLE !!!

Most obvious is the JumpTarget at 00018 that has a lineno of 6 when it should obviously be 5

There is no source associated with JumpTarget, this is an opcode that I added initially for sanity checks of the stack depth, and later reused for code coverage.

What is the broader issue you are facing, is that the JumpTarget, or something else?

The bad line number info on JumpTargets causes us to generate bad jit dump source info here: https://searchfox.org/mozilla-central/rev/158fb9063c06a36e6a2efb2b1823bba8c01e82a1/js/src/jit/PerfSpewer.cpp#760

You need to log in before you can comment on or make changes to this bug.