Bug 125972 - Add an utility class to simplify generating function calls
Summary: Add an utility class to simplify generating function calls
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-18 19:15 PST by Benjamin Poulain
Modified: 2013-12-19 17:36 PST (History)
2 users (show)

See Also:


Attachments
Patch (14.07 KB, patch)
2013-12-18 19:20 PST, Benjamin Poulain
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>