Bug 163099 - [JSC] Clean up callOperation APIs
Summary: [JSC] Clean up callOperation APIs
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-06 21:18 PDT by Yusuke Suzuki
Modified: 2016-10-06 22:42 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2016-10-06 21:18:11 PDT
From Saam's idea. https://bugs.webkit.org/show_bug.cgi?id=162978#c3

class Call {
      struct Argument {
              Argument(GPRReg);
              Argument(JSValueRegs);
              Argument(immediate type: int32/int64/pointer); 
      }
      Type m_resultType;
      Vector<Arguments> m_arguments;
      FunctionPtr m_function;
};

and then have a function like:
setupCallWithExecState(const Call& call);

And API should correctly construct the frame according to Vector<Arguments>.
Comment 1 Saam Barati 2016-10-06 22:42:20 PDT
(In reply to comment #0)
> From Saam's idea. https://bugs.webkit.org/show_bug.cgi?id=162978#c3
> 
> class Call {
>       struct Argument {
>               Argument(GPRReg);
>               Argument(JSValueRegs);
>               Argument(immediate type: int32/int64/pointer); 
>       }
>       Type m_resultType;
>       Vector<Arguments> m_arguments;
>       FunctionPtr m_function;
> };
> 
> and then have a function like:
> setupCallWithExecState(const Call& call);
> 
> And API should correctly construct the frame according to Vector<Arguments>.

Thinking about it more, we'd probably want to encode if the first argument is ExecState or not since we have some operations that don't take ExecState