Bug 137771

Summary: CSS JIT: Introduce addressToStackReference
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch benjamin: review+

Description Yusuke Suzuki 2014-10-15 23:50:55 PDT
CSS JIT: Introduce addressToStackReference
Comment 1 Yusuke Suzuki 2014-10-15 23:53:43 PDT
Created attachment 239934 [details]
Patch
Comment 2 Yusuke Suzuki 2014-10-16 00:15:33 PDT
Created attachment 239938 [details]
Patch
Comment 3 Benjamin Poulain 2014-10-16 21:27:07 PDT
Comment on attachment 239938 [details]
Patch

That's a great idea, this cleans up the code and make it harder to misuse the stack.

I think the name addressToStackReference can be confusing. What do you think of:
-stackReferenceAddress()
-addressOfStackReference()
or simply
-addressOf(StackReference)
Comment 4 Yusuke Suzuki 2014-10-16 22:09:01 PDT
(In reply to comment #3)
> Comment on attachment 239938 [details]
> Patch
> 
> That's a great idea, this cleans up the code and make it harder to misuse
> the stack.
> 
> I think the name addressToStackReference can be confusing. What do you think
> of:
> -stackReferenceAddress()
> -addressOfStackReference()
> or simply
> -addressOf(StackReference)

`addressOf` looks very nice :), its name and parameter's type describes the role of the function clearly.
I'll apply this change and land the patch.
Comment 5 Yusuke Suzuki 2014-10-16 22:17:49 PDT
Committed r174810: <http://trac.webkit.org/changeset/174810>