Closed Bug 1834483 Opened 11 months ago Closed 11 months ago

Add public API to set or calculate JS::NativeStackLimit for JS::FrontendContext APIs

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 2 open bugs)

Details

Attachments

(11 files)

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

For JSContext-based API, the stack quota is set by JS_SetNativeStackQuota.
We need the equivalent for JS::FrontendContext-based API, because the current JS::NativeStackLimit parameter is hard to use without at least helper to calculate it from size.

possible options:

  • a) add JS::NativeStackLimit JS::GetNativeStackLimit(JS::NativeStackSize size);, which is combination of js::GetNativeStackLimit + js::GetNativeStackBase, and use it when calling compilation APIs
  • b) add void JS::SetNativeStackQuota(JS::FrontendContext* fc, JS::NativeStackSize size);, which is JS::FrontendContext-variant of JS_SetNativeStackQuota for JSContext, and also add JS::NativeStackLimit field to JS::FrontendContext and remove JS::NativeStackLimit parameter from JS::FrontendContext-based APIs
Blocks: 1835955
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/fce0bc3f10ec
Part 1: Add NativeStackLimit field to FrontendContext. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/578fed7f201b
Part 2: Use FrontendContext NativeStackLimit field in ParseTask and DelazifyTask. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/248999f3a826
Part 3: Remove NativeStackLimit parameter from public FrontendContext-based API. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/54bc516f4981
Part 4: Remove NativeStackLimit parameter from private FrontendContext-based compile to global API. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/e64f38a183a1
Part 5: Remove NativeStackLimit parameter from private FrontendContext-based compile to module API. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/a12fb416dc16
Part 6: Remove NativeStackLimit parameter from private FrontendContext-based delazify API. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/ea422269d9ab
Part 7: Remove NativeStackLimit field from SourceAwareCompiler. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/28edc29c161b
Part 8: Remove NativeStackLimit field from Parser and BytecodeEmitter. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/cceddc6d6dd4
Part 9: Remove NativeStackLimit field from AsmJS module validator. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/447bcdef4023
Part 10: Remove NativeStackLimit parameter from smoosh API. r=bthrall
https://hg.mozilla.org/integration/autoland/rev/e7766c02eb55
Part 11: Add JS::SetNativeStackQuota for JS::FrontendContext. r=bthrall
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: