[Webkit-unassigned] [Bug 74455] Uint8ClampedArray support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 1 16:40:48 PST 2012


--- Comment #3 from Filip Pizlo <fpizlo at apple.com>  2012-01-01 16:40:47 PST ---
(From update of attachment 119096)
View in context: https://bugs.webkit.org/attachment.cgi?id=119096&action=review

You're doing it right! :-)  I think the only thing that is wrong is the PredictObjectMask.  As for the other two issues, it's more of a problem with the code base as-is - so it's up to you whether you want to (a) be consistent or (b) try to clean it up.  Probably for the array length code it would be better if you were consistent (i.e. you're doing it right), but for the shouldSpeculateXYZ() method that you've added, I'd sort of prefer that you implement that method the Right Way (call the helper from PredictedType.h rather than doing your own equality comparison).

> Source/JavaScriptCore/bytecode/PredictedType.h:54
> +static const PredictedType PredictObjectMask        = 0x00002fff; // Bitmask used for testing for any kind of object prediction.

I presume you meant 0x00003fff?

> Source/JavaScriptCore/dfg/DFGAbstractState.cpp:737
> +    case GetUint8ClampedArrayLength:

Ugggghhh!  This is not your fault, but we should probably unify these GetXYZArrayLength opcodes.  I wouldn't worry about it for this patch though unless you were feeling adventurous.

> Source/JavaScriptCore/dfg/DFGNode.h:949
> +        return prediction() == PredictUint8ClampedArray;

I know you're just being consistent but this should really be isUint8ClampedArrayPrediction(prediction()).

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list