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•1 year 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•1 year ago
|
Updated•1 year ago
|
Comment 3•1 year ago
|
||
| bugherder | ||
Updated•1 year ago
|
Description
•