Open
Bug 1266081
Opened 8 years ago
Updated 2 years ago
JSOP_TRY is not included in try notes "start" field.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox48 | --- | affected |
People
(Reporter: nbp, Unassigned)
Details
Currently we have 2 locations where we emit JSOP_TRY, under emitTry[1], and under emitYieldStar[2]. What we can remark is that the tryStart is not captured at the same location in both cases, which is then translated into added/remove JSOP_TRY_LENGTH later, and all over the code base. More over, the all the code base currently assumes that JSOP_TRY is not included as part of the try. This has the side effect of having undocumented extra +1 / -1 (== JSOP_TRY_LENGTH / -JSOP_TRY_LENGTH) all over the the code base [3,4,…]. By moving the tryStart offset above the emit1(JSOP_TRY), and removing the added JSOP_TRY_LENGTH [5,6], we should be able to remove these +1/-1 offsets from the code. [1] https://dxr.mozilla.org/mozilla-central/source/js/src/frontend/BytecodeEmitter.cpp#5123-5126 [2] https://dxr.mozilla.org/mozilla-central/source/js/src/frontend/BytecodeEmitter.cpp#6957-6959 [3] https://dxr.mozilla.org/mozilla-central/source/js/src/jsscript.cpp#1403-1404 [4] https://dxr.mozilla.org/mozilla-central/source/js/src/jit/BytecodeAnalysis.cpp?from=Bytecodeanalysis.cpp#120-121 [5] https://dxr.mozilla.org/mozilla-central/source/js/src/frontend/BytecodeEmitter.cpp#5138-5139 [6] https://dxr.mozilla.org/mozilla-central/source/js/src/frontend/BytecodeEmitter.cpp#7031-7032
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•