Consider introducing compound source note type
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
People
(Reporter: arai, Unassigned)
References
(Blocks 2 open bugs)
Details
in bug 1845865, I've tried adding more colspan source notes in order to improve the column number preciseness in the error report, but it results in huge increase in the source note size.
in order to mitigate the size increase, we could look into compressing the existing source notes, by introducing compound source note type, so that multiple source note can be expressed in single byte.
for example, SrcNoteType::StepSep
and SrcNoteType::Breakpoint
are emitted at the same time:
bool BytecodeEmitter::markStepBreakpoint() {
...
if (!newSrcNote(SrcNoteType::StepSep)) {
...
if (!newSrcNote(SrcNoteType::Breakpoint)) {
also, we emit multiple NewLine
s if there's 2-3 line gap.
do {
if (!newSrcNote(SrcNoteType::NewLine)) {
return false;
}
} while (--delta != 0);
there should be more cases where multiple source notes are added to the same opcode,
and compressing common cases should reduce the source note size.
Reporter | ||
Comment 1•11 months ago
|
||
as suggested in bug 1604121 comment, it's better looking into moving line/column/debugger notes into separate array before this.
at least having AssignOp
in the same list doesn't make much sense, especially if we want to compress.
Reporter | ||
Updated•11 months ago
|
Reporter | ||
Updated•11 months ago
|
Reporter | ||
Updated•11 months ago
|
Reporter | ||
Comment 2•8 months ago
|
||
closing for now.
we can revisit when we found any frequently-used sequence of source notes which can be represented with single note.
Description
•