Closed Bug 1849336 Opened 1 year ago Closed 1 year ago

Combine SrcNoteType::StepSep with SrcNoteType::Breakpoint

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

SrcNoteType::StepSep and SrcNoteType::Breakpoint are emitted at the same time:

https://searchfox.org/mozilla-central/rev/d81e60336d9f498ad3985491dc17c2b77969ade4/js/src/frontend/BytecodeEmitter.cpp#218,223,227

bool BytecodeEmitter::markStepBreakpoint() {
...
  if (!newSrcNote(SrcNoteType::StepSep)) {
...
  if (!newSrcNote(SrcNoteType::Breakpoint)) {

and the only consumer of SrcNoteType::StepSep is the following, where SrcNoteType::Breakpoint is also handled.

https://searchfox.org/mozilla-central/rev/d7a8eadc28298c31381119cbf25c8ba14b8712b3/js/src/vm/BytecodeUtil-inl.h#215-221

} else if (type == SrcNoteType::Breakpoint) {
  isBreakpoint = true;
  lastLinePC = snpc;
} else if (type == SrcNoteType::StepSep) {
  seenStepSeparator = true;
  lastLinePC = snpc;
}

SrcNoteType::StepStep is always followed by SrcNoteType::Breakpoint,
and there's no need to emit them separately.

Depends on D186918

Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/2518234cf015 Replace SrcNoteType::StepStep + SrcNoteType::Breakpoint with combined SrcNoteType::BreakpointStepStep. r=bthrall
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: