Closed
Bug 1454352
Opened 7 years ago
Closed 7 years ago
[BinAST] Expose the APIs necessary for <script> loading
Categories
(Core :: JavaScript Engine, enhancement, P2)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: Yoric, Assigned: efaust)
References
Details
Attachments
(1 file, 2 obsolete files)
11.40 KB,
patch
|
jonco
:
review+
|
Details | Diff | Splinter Review |
List provided by jonco:
JS::Compile
JS::CompileForNonSyntacticScope
JS::CompileOffThread
JS::FinishOffThreadScript
Reporter | ||
Comment 1•7 years ago
|
||
efaust, it looks to me like these functions fall in your lap, right?
Flags: needinfo?(efaustbmo)
Assignee | ||
Comment 2•7 years ago
|
||
Yeah, that sounds reasonable. I have enough for JS::Compile already as part of my musings. Off-thread stuff should be pretty easy, though I haven't looked into it yet. I'm imagining (read: assuming.) that most of the stuff we want to use from frontend:: uses the appropriate main thread checks already.
Assignee: nobody → efaustbmo
Flags: needinfo?(efaustbmo)
Updated•7 years ago
|
Priority: -- → P2
Comment 3•7 years ago
|
||
(In reply to David Teller [:Yoric] (please use "needinfo") from comment #0)
> JS::CompileForNonSyntacticScope
I don't think we need this one - although it's called by the generic nsJSUtils class it's not used by the script loader so we can just assert that this case doesn't arise.
Updated•7 years ago
|
Depends on: binjs-bytecode
Assignee | ||
Comment 4•7 years ago
|
||
This looks right to me, and would provide the other two, but it seems like it must be supposed to be more complicated. Does this look plausible, Jon?
Attachment #8972472 -
Flags: feedback?(jcoppeard)
Assignee | ||
Updated•7 years ago
|
Status: NEW → ASSIGNED
Comment 5•7 years ago
|
||
Comment on attachment 8972472 [details] [diff] [review]
offThreadParse.patch
Review of attachment 8972472 [details] [diff] [review]:
-----------------------------------------------------------------
Yes this looks fine. I'm still working hooking up a test to use this path. I'll let you know if things don't work out.
Can you add JS::CanDecodeBinASTOffThread() (along the same lines as the existing versions) and add a case for BinAST in CanDoOffThread()?
Attachment #8972472 -
Flags: feedback?(jcoppeard) → feedback+
Comment 6•7 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #5)
Testing was successful.
Assignee | ||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
I combined the patches and rebased.
Attachment #8972472 -
Attachment is obsolete: true
Attachment #8973061 -
Attachment is obsolete: true
Comment 9•7 years ago
|
||
Comment on attachment 8974653 [details] [diff] [review]
off-thread-decode-binast
Review of attachment 8974653 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
::: js/src/frontend/BytecodeCompiler.h
@@ +41,5 @@
> JSScript*
> CompileGlobalBinASTScript(JSContext *cx, LifoAlloc& alloc,
> const ReadOnlyCompileOptions& options,
> + const uint8_t* src, size_t len,
> + ScriptSourceObject** sourceObjectOut = nullptr);
The last parameter should probably be a |RootedScriptSourceObject*|. If it wasn't optional you could use a MutableHandle, but I don't think we have a way of making that optional.
Attachment #8974653 -
Flags: review+
Comment 10•7 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #9)
> The last parameter should probably be a |RootedScriptSourceObject*|. If it
> wasn't optional you could use a MutableHandle, but I don't think we have a
> way of making that optional.
Oh we already do this in a bunch of places. Never mind, I'll file a separate bug.
Comment 11•7 years ago
|
||
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/91ced8101f99
Add APIs for parallel decoding of BinAST data r=jonco
Comment 12•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•