Closed Bug 1467403 Opened 3 years ago Closed 3 years ago

Stop handling source notes in prologue

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

I cannot find any case that prologue contains source notes.
we could remove code which handles it.
mostly just removed the code that handles when prologue have source notes.
BytecodeEmitter::finishTakingSrcNotes's else-clause is necessary since the delta of the source note in the main section has to be updated to reflect the prologue bytecode length.
Attachment #8984332 - Flags: review?(jdemooij)
Comment on attachment 8984332 [details] [diff] [review]
Remove the source notes handling for prologue bytecode.

Review of attachment 8984332 [details] [diff] [review]:
-----------------------------------------------------------------

Nice!

::: js/src/frontend/BytecodeEmitter.cpp
@@ +11458,5 @@
>      MOZ_ASSERT(current == &main);
>  
> +    MOZ_ASSERT(prologue.notes.length() == 0);
> +    MOZ_ASSERT(prologue.lastNoteOffset == 0);
> +    // We may need to adjust the offset of the first main note, by adding to

Nit: we usually have a blank line before comments like this, if not at the start of a block?
Attachment #8984332 - Flags: review?(jdemooij) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/09d892dcaca7f8700a08f14b3b075b769bd82c5d
Bug 1467403 - Remove the source notes handling for prologue bytecode. r=jandem
https://hg.mozilla.org/mozilla-central/rev/09d892dcaca7
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.