Bug 125972

Summary: Add an utility class to simplify generating function calls
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ggaren: review+

Description Benjamin Poulain 2013-12-18 19:15:36 PST
Add an utility class to simplify generating function calls
Comment 1 Benjamin Poulain 2013-12-18 19:20:29 PST
Created attachment 219604 [details]
Patch
Comment 2 Geoffrey Garen 2013-12-18 21:54:27 PST
Comment on attachment 219604 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219604&action=review

r=me

> Source/WebCore/ChangeLog:13
> +        the stack, do the call, restores the stack, and restore the registers.

Should be "does the call".

> Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h:1148
> +    void test32AndSetFlags(RegisterID reg, TrustedImm32 mask = TrustedImm32(-1))

Is there going to be a version of test32 that doesn't set flags? If not, then I would just call this "test32".

> Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h:1158
> +    Jump branchOnFlags(ResultCondition cond)

I would just call this "branch".

> Source/WebCore/cssjit/FunctionCall.h:41
> +    static const JSC::MacroAssembler::RegisterID firstArgument = JSC::X86Registers::edi;
> +    static const JSC::MacroAssembler::RegisterID returnRegister = JSC::X86Registers::eax;

Please use the values defined in GPRInfo (argumentGPR0, returnValueGPR) instead of redefining them here.
Comment 3 Benjamin Poulain 2013-12-19 17:36:01 PST
Committed r160881: <http://trac.webkit.org/changeset/160881>