Closed Bug 1693611 Opened 5 years ago Closed 4 years ago

Move stencil-related XDR logic from Xdr.cpp into StencilXdr.cpp

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(12 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

before working on bug 1693184, it's better gathering "buffer structure"-related code into single place.

Currently header and ParserAtomTable code is written in Xdr.cpp, and CompilationStencil code is written in StencilXdr.cpp.
After bug 1687095, the buffer structure is simple that there's one header (version, source), one ParserAtomTable, and one remaining CompilationStencil fields,
and it means it's just version + whole CompilationStencil.

Inlining header function and XDRCompilationStencil function will simplify the structure hierarchy inside code.
And that lets us adding markers in bug 1693184 cleanly.

Summary: Move stencil-related XDR logic in Xdr.cpp into StencilXdr.cpp → Move stencil-related XDR logic from Xdr.cpp into StencilXdr.cpp

Subsequent patches move other XDR functions into StencilXDR.
To avoid name collision between method and type name, prepend code to method.

Also reorder to match the field order.

Depends on D105911

Now the header and CompilationStencil are encoded into the same buffer,
and the alignment padding isn't necessary.

Depends on D105919

Attachment #9204474 - Attachment is obsolete: true
Attachment #9204475 - Attachment description: Bug 1693611 - Part 2: Rename StencilXDR::BigInt to StencilXDR::codeBigInt. → Bug 1693611 - Part 1: Rename StencilXDR::BigInt to StencilXDR::codeBigInt.
Attachment #9204476 - Attachment description: Bug 1693611 - Part 3: Rename StencilXDR::ObjLiteral to StencilXDR::codeObjLiteral. → Bug 1693611 - Part 2: Rename StencilXDR::ObjLiteral to StencilXDR::codeObjLiteral.
Attachment #9204477 - Attachment description: Bug 1693611 - Part 4: Rename StencilXDR::{ScopeData,ScopeSpecificData} to StencilXDR::{codeScopeData,codeScopeSpecificData}. → Bug 1693611 - Part 3: Rename StencilXDR::ScopeData to StencilXDR::codeScopeData.
Attachment #9204478 - Attachment description: Bug 1693611 - Part 5: Rename StencilXDR::SharedData to StencilXDR::codeSharedData. → Bug 1693611 - Part 4: Rename StencilXDR::SharedData to StencilXDR::codeSharedData.
Attachment #9204479 - Attachment description: Bug 1693611 - Part 6: Move ParserAtom XDR functions to StencilXDR. → Bug 1693611 - Part 5: Move ParserAtom XDR functions to StencilXDR.
Attachment #9204480 - Attachment description: Bug 1693611 - Part 7: Move StencilModuleMetadata XDR functions to StencilXDR. → Bug 1693611 - Part 6: Move StencilModuleMetadata XDR functions to StencilXDR.
Attachment #9204481 - Attachment description: Bug 1693611 - Part 8: Move XDRCheckCompilationStencil to StencilXDR. → Bug 1693611 - Part 7: Move XDRCheckCompilationStencil to StencilXDR.
Attachment #9204482 - Attachment description: Bug 1693611 - Part 9: Move XDRCompilationStencil to StencilXDR. → Bug 1693611 - Part 8: Move XDRCompilationStencil to StencilXDR.
Attachment #9204483 - Attachment description: Bug 1693611 - Part 10: Remove unnecessary alignment padding between header and CompilationStencil. → Bug 1693611 - Part 9: Remove unnecessary alignment padding between header and CompilationStencil.
Attachment #9204484 - Attachment description: Bug 1693611 - Part 11: Remove XDRStencilDecoder::stencilAlloc_. → Bug 1693611 - Part 10: Remove XDRStencilDecoder::stencilAlloc_.
Attachment #9204485 - Attachment description: Bug 1693611 - Part 12: Remove XDRStencilDecoder::{hasOptions,options}. → Bug 1693611 - Part 11: Remove XDRStencilDecoder::{hasOptions,options}.
Attachment #9204486 - Attachment description: Bug 1693611 - Part 13: Use XDRStencilEncoder from XDRIncrementalStencilEncoder. → Bug 1693611 - Part 12: Use XDRStencilEncoder from XDRIncrementalStencilEncoder.
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/0e435a571803 Part 1: Rename StencilXDR::BigInt to StencilXDR::codeBigInt. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/0d66ecd8acd4 Part 2: Rename StencilXDR::ObjLiteral to StencilXDR::codeObjLiteral. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/fb2c167165b8 Part 3: Rename StencilXDR::ScopeData to StencilXDR::codeScopeData. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/6f06ff0ebbc3 Part 4: Rename StencilXDR::SharedData to StencilXDR::codeSharedData. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/72fc08b6245d Part 5: Move ParserAtom XDR functions to StencilXDR. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/faacbf1943b6 Part 6: Move StencilModuleMetadata XDR functions to StencilXDR. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/565bee5296ac Part 7: Move XDRCheckCompilationStencil to StencilXDR. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/a4ff4b030aaa Part 8: Move XDRCompilationStencil to StencilXDR. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/7bf683fab589 Part 9: Remove unnecessary alignment padding between header and CompilationStencil. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/4928193b996f Part 10: Remove XDRStencilDecoder::stencilAlloc_. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/8fd50eba1621 Part 11: Remove XDRStencilDecoder::{hasOptions,options}. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/0069d43ee2c4 Part 12: Use XDRStencilEncoder from XDRIncrementalStencilEncoder. r=mgaudet
Attachment #9204486 - Attachment description: Bug 1693611 - Part 12: Use XDRStencilEncoder from XDRIncrementalStencilEncoder. → Bug 1693611 - Part 12: Use XDRStencilEncoder from XDRIncrementalStencilEncoder. r=mgaudet
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/d25a0b774152 Part 1: Rename StencilXDR::BigInt to StencilXDR::codeBigInt. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/e43244daf953 Part 2: Rename StencilXDR::ObjLiteral to StencilXDR::codeObjLiteral. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/4482d794a4da Part 3: Rename StencilXDR::ScopeData to StencilXDR::codeScopeData. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/68823de0b29d Part 4: Rename StencilXDR::SharedData to StencilXDR::codeSharedData. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/a435c1f3dfaa Part 5: Move ParserAtom XDR functions to StencilXDR. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/a4994838b654 Part 6: Move StencilModuleMetadata XDR functions to StencilXDR. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/5ce159cb3ccb Part 7: Move XDRCheckCompilationStencil to StencilXDR. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/5b208e65863b Part 8: Move XDRCompilationStencil to StencilXDR. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/35608d119e96 Part 9: Remove unnecessary alignment padding between header and CompilationStencil. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/1205a7afc825 Part 10: Remove XDRStencilDecoder::stencilAlloc_. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/144d29ce8c6a Part 11: Remove XDRStencilDecoder::{hasOptions,options}. r=mgaudet https://hg.mozilla.org/integration/autoland/rev/de28c772a038 Part 12: Use XDRStencilEncoder from XDRIncrementalStencilEncoder. r=mgaudet
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: