Open
Bug 622302
Opened 15 years ago
Updated 1 year ago
Figure out a way to call WebIDL functions directly when argument types match
Categories
(Core :: JavaScript Engine, enhancement)
Tracking
()
REOPENED
People
(Reporter: bzbarsky, Unassigned)
References
(Blocks 1 open bug)
Details
That would significantly speed up DOM bindings, by reducing the need for type conversions.
Updated•14 years ago
|
Priority: -- → P1
Updated•14 years ago
|
Priority: P1 → --
Comment 1•12 years ago
|
||
JM is gone
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 2•12 years ago
|
||
We might want something like this for IM, though...
Comment 3•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) (reading mail, but on paternity leave) from comment #2)
> We might want something like this for IM, though...
Is this still worth it for DOM calls with the jitinfo stuff etc we have now?
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: Figure out a way to call things sort of like traceable natives for JM, using type inference → Figure out a way to call things sort of like traceable natives for IM, using type inference
| Reporter | ||
Comment 4•12 years ago
|
||
That's a good question.
The primary benefit of the traceable natives was that they avoided the need for argument and return value boxing/unboxing. The jitinfo stuff does nothing to address this (though it helps with this-value unboxing, and helps speed up return value unboxing a bit by communicating the general kind of return value).
It's pretty easy to write testcases in which the boxing and unboxing is a significant fraction of the time; the question is whether these commonly matter in web code...
The main likely beneficiary would presumably be WebGL; roc has had some thoughts about it in the past.
Comment 5•12 years ago
|
||
Ah, so IIUC, the idea would be to have, hanging off a DOM builtin's jitinfo, an array of argument/return-type-specialized overloads that could be called directly? ISTR, that's what we did for traceable natives.
| Reporter | ||
Comment 6•12 years ago
|
||
Or something along those lines, yes.
I thought for each WebIDL method we'd have one function whose signature matches the corresponding C++ method (with 'this' passed as an explicit parameter), which tail-calls the C++ method. Then we could have IM assemble direct calls to this function, under the right conditions (e.g., all parameter types known).
Currently I don't know of any benchmarks that definitely need this. The closest I know of is canvas. So let's leave this bug open but not work on it until we have a benchmark.
| Assignee | ||
Updated•11 years ago
|
Assignee: general → nobody
Updated•3 years ago
|
Severity: normal → S3
Comment 8•1 year ago
|
||
TI is gone now, but I see that this bug was reopend.
:jandem, is this bug still relevant?
Flags: needinfo?(jdemooij)
Comment 9•1 year ago
|
||
TI is gone but the idea is still relevant so I'll rename this bug.
Now that we're thinking about exposing WebIDL more directly in SpiderMonkey, it might be more feasible to do this eventually.
Flags: needinfo?(jdemooij)
Updated•1 year ago
|
Summary: Figure out a way to call things sort of like traceable natives for IM, using type inference → Figure out a way to call WebIDL functions directly when argument types match
Updated•1 year ago
|
Type: defect → enhancement
Updated•1 year ago
|
Blocks: sm-js-perf
You need to log in
before you can comment on or make changes to this bug.
Description
•