Bug 138934

Summary: Add some comments to describe the DFG UseKind representations.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, ggaren, mmirman, msaboff
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
the patch.
none
patch 2: addressed Geoff's feedback.
fpizlo: review-
patch 3: UntypedUse is at enum 0 again, with extra comments.
none
patch 4: don't like the comment about UntypedUse in last patch. Updated.
fpizlo: review+
patch 5: moved al the JSValue representation UseKinds up nelow UntypedUse as Filip suggested. fpizlo: review+

Description Mark Lam 2014-11-20 14:09:54 PST
Also regrouped the UseKind enums by representation.
Comment 1 Mark Lam 2014-11-20 14:12:55 PST
Created attachment 241980 [details]
the patch.
Comment 2 Geoffrey Garen 2014-11-20 15:13:43 PST
Comment on attachment 241980 [details]
the patch.

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

> Source/JavaScriptCore/dfg/DFGUseKind.h:38
>      UntypedUse,

Which case is UntypedUse? (Seems like it should be JSValue, right?)

> Source/JavaScriptCore/dfg/DFGUseKind.h:43
> +    //    in a FP register.

"an"
Comment 3 Mark Lam 2014-11-20 15:16:11 PST
Created attachment 241989 [details]
patch 2: addressed Geoff's feedback.
Comment 4 Filip Pizlo 2014-11-20 15:17:53 PST
Comment on attachment 241989 [details]
patch 2: addressed Geoff's feedback.

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

> Source/JavaScriptCore/dfg/DFGUseKind.h:54
>      UntypedUse,

This could be dangerous; I believe that UntypedUse is expected to be zero.
Comment 5 Filip Pizlo 2014-11-20 15:18:17 PST
Comment on attachment 241989 [details]
patch 2: addressed Geoff's feedback.

Please arrange to have UntypedUse be the first thing, as before.
Comment 6 Mark Lam 2014-11-20 15:23:34 PST
Created attachment 241992 [details]
patch 3: UntypedUse is at enum 0 again, with extra comments.
Comment 7 Mark Lam 2014-11-20 15:31:45 PST
Created attachment 241995 [details]
patch 4: don't like the comment about UntypedUse in last patch.  Updated.
Comment 8 Filip Pizlo 2014-11-20 15:33:57 PST
Comment on attachment 241995 [details]
patch 4: don't like the comment about UntypedUse in last patch.  Updated.

You could also have moved all of the other JS representations up with UntypedUse.  That would make the most logical sense to me.
Comment 9 Mark Lam 2014-11-20 15:36:49 PST
Created attachment 241996 [details]
patch 5: moved al the JSValue representation UseKinds up nelow UntypedUse as Filip suggested.
Comment 10 Mark Lam 2014-11-20 15:40:25 PST
Thanks for the review.  Landed in r176425: <http://trac.webkit.org/r176425>.