Closed
Bug 1663889
Opened 4 years ago
Closed 4 years ago
Remove JS::CompileForNonSyntacticScope
Categories
(Core :: JavaScript Engine, task, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
82 Branch
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Now JS::CompileForNonSyntacticScope
is just a wrapper for JS::Compile
's underlying-impl with options.setNonSyntacticScope(true)
.
JSScript* JS::CompileForNonSyntacticScope(
JSContext* cx, const ReadOnlyCompileOptions& optionsArg,
SourceText<char16_t>& srcBuf) {
CompileOptions options(cx, optionsArg);
options.setNonSyntacticScope(true);
return CompileSourceBuffer(cx, options, srcBuf);
}
JSScript* JS::CompileForNonSyntacticScope(
JSContext* cx, const ReadOnlyCompileOptions& optionsArg,
SourceText<Utf8Unit>& srcBuf) {
CompileOptions options(cx, optionsArg);
options.setNonSyntacticScope(true);
return CompileSourceBuffer(cx, options, srcBuf);
}
Having separate API for this isn't good when we want to introduce stencil-related compilation API, given it doubles the variants.
There's no consumer that depends on options
not being modified (except testcase),
so all callsites can be replaced with options.setNonSyntacticScope(true)
+ JS::Compile
.
This will simplify bug 1660940 (JS::CompileToStencil
), and also bug 1662273 (if we go with composite API for "compile + start XDR encode").
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Priority: P3 → P1
Assignee | ||
Comment 2•4 years ago
|
||
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/7e4eab0c0430
Remove JS::CompileForNonSyntacticScope and set CompileOptions in caller. r=tcampbell
Comment 4•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox82:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•