Bug 219847

Summary: [JSC] Introduce vmEntryCustomAccessor and vmEntryHostFunction for JITCage
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch mark.lam: review+

Yusuke Suzuki
Reported 2020-12-13 22:28:00 PST
[JSC] Introduce vmEntryCustomAccessor and vmEntryHostFunction for JITCage
Attachments
Patch (53.43 KB, patch)
2020-12-13 22:30 PST, Yusuke Suzuki
no flags
Patch (54.54 KB, patch)
2020-12-13 23:00 PST, Yusuke Suzuki
mark.lam: review+
Yusuke Suzuki
Comment 1 2020-12-13 22:30:53 PST
Yusuke Suzuki
Comment 2 2020-12-13 22:31:59 PST
Yusuke Suzuki
Comment 3 2020-12-13 23:00:03 PST
Created attachment 416138 [details] Patch Removed assertIsHostFunction
Mark Lam
Comment 4 2020-12-13 23:41:12 PST
Comment on attachment 416137 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416137&action=review > Source/JavaScriptCore/runtime/NativeFunction.h:36 > +using RawNativeFunctionWithPtr = EncodedJSValue(JSC_HOST_CALL_ATTRIBUTES*)(JSGlobalObject*, CallFrame*, void*); Please remove this since it is not used. > Source/JavaScriptCore/runtime/PutPropertySlot.h:42 > - typedef bool (*PutValueFunc)(JSGlobalObject*, EncodedJSValue thisObject, EncodedJSValue value); > + using PutValueFunc = bool (*)(JSGlobalObject*, EncodedJSValue, EncodedJSValue); > + using PutValueFuncWithPtr = bool (*)(JSGlobalObject*, EncodedJSValue, EncodedJSValue, void*); Would you mind keeping the variable names `thisObject` and `value` to document the different purposes of the 2 EncodedJSValue arguments? > Source/WTF/wtf/PlatformCallingConventions.h:96 > +#define JSC_DEFINE_JIT_OPERATION_WITH_ATTRIBUTES_WITHOUT_VARIABLE(functionName, attributes, returnType, parameters) \ > + attributes returnType JIT_OPERATION_ATTRIBUTES functionName parameters Should we get rid of the attributes argument since it is never used? Do you think there's value in keeping it?
Mark Lam
Comment 5 2020-12-13 23:42:53 PST
Comment on attachment 416138 [details] Patch r=me
Yusuke Suzuki
Comment 6 2020-12-13 23:44:38 PST
Comment on attachment 416137 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416137&action=review Thanks! >> Source/JavaScriptCore/runtime/NativeFunction.h:36 >> +using RawNativeFunctionWithPtr = EncodedJSValue(JSC_HOST_CALL_ATTRIBUTES*)(JSGlobalObject*, CallFrame*, void*); > > Please remove this since it is not used. Removed. >> Source/JavaScriptCore/runtime/PutPropertySlot.h:42 >> + using PutValueFuncWithPtr = bool (*)(JSGlobalObject*, EncodedJSValue, EncodedJSValue, void*); > > Would you mind keeping the variable names `thisObject` and `value` to document the different purposes of the 2 EncodedJSValue arguments? Recovered. >> Source/WTF/wtf/PlatformCallingConventions.h:96 >> + attributes returnType JIT_OPERATION_ATTRIBUTES functionName parameters > > Should we get rid of the attributes argument since it is never used? Do you think there's value in keeping it? Removed.
Yusuke Suzuki
Comment 7 2020-12-14 02:32:40 PST
Yusuke Suzuki
Comment 8 2020-12-16 05:48:17 PST
Note You need to log in before you can comment on or make changes to this bug.