Directly call native functions instead using InvokeNativeFunction
Categories
(Core :: JavaScript Engine: JIT, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox127 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
:jandem mentioned during code review that InvokeNativeFunction
from bug 1889091 can be replaced with a direct call to the native C++ function.
Assignee | ||
Comment 1•10 months ago
|
||
CodeGenerator.cpp:
Split emitCallNative
into two methods, so we can reuse it for emitApplyNative
.
Also add some comments how NativeExitFrameLayout
is constructed on the stack and
add an assertion that the native C++ function returned an object when constructing.
emitCallNative
uses setupAlignedABICall
, so we now need to align the Value
arguments, this happens through the new emitAlignStackForApplyNative
method.
LIR-shared.h, Lowering.cpp:
The callee doesn't need to be stored which frees up one register, so we can
allocate an additional temp-register. This matches the approach taken for
LCallNative
. The additional temp register is needed, because emitCallNative
requires four registers.
VMFunctions:
- Remove no longer used
InvokeNativeFunction
.
Updated•10 months ago
|
Updated•10 months ago
|
Comment 3•10 months ago
|
||
bugherder |
Updated•9 months ago
|
Description
•