Open Bug 1558385 Opened 5 years ago Updated 2 years ago

Add comments to clarify the consumer of JSScript.resumeOffset, CGResumeOffsetList, BytecodeSection.resumeOffsetList_ etc

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

Tracking Status
firefox69 --- affected

People

(Reporter: arai, Unassigned)

References

Details

Bug 1504979 changed the usage of resume offsets, and now it's used both from generator and tableswitch.
related functions, methods, fields should be renamed to reflect it, for clarity.

Hm "yield and await offset" was renamed to "resume offset" so that we could use it for generators, try-finally and tableswitch... What do you propose as new name? :)

currently it's just a list of offsets into bytecode, used for multiple purpose (multiple opcodes), just like other list of objects, scopes, etc.
so, just "offset list" or "bytecode offset list"?
I'll list the related things up tonight, to see if simple "offset" fits there.

(In reply to Tooru Fujisawa [:arai] from comment #2)

currently it's just a list of offsets into bytecode, used for multiple purpose (multiple opcodes), just like other list of objects, scopes, etc.
so, just "offset list" or "bytecode offset list"?

Resume offset are bytecode offsets where we may resume execution based on a "resume index" (generator, tableswitch index, try-finally block). BaselineScript for example has a corresponding list with a native code offset/address for every resume index. I'm open to new and clearer names but I think "bytecode offset" is too generic because it doesn't capture that aspect of it..

Thanks.
for now I'll add/fix comments to field etc to clarify for how those data are used.

Summary: Rename JSScript.resumeOffset, CGResumeOffsetList, BytecodeSection.resumeOffsetList_ etc to reflect the usage → Add comments to clarify the consumer of JSScript.resumeOffset, CGResumeOffsetList, BytecodeSection.resumeOffsetList_ etc
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.