[webkit-reviews] review granted: [Bug 23367] Increase range of values that can be represented by JSImmediate on 64-bit platforms. : [Attachment 26776] The patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 15 17:35:14 PST 2009


Geoffrey Garen <ggaren at apple.com> has granted Gavin Barraclough
<barraclough at apple.com>'s request for review:
Bug 23367: Increase range of values that can be represented by JSImmediate on
64-bit platforms.
https://bugs.webkit.org/show_bug.cgi?id=23367

Attachment 26776: The patch
https://bugs.webkit.org/attachment.cgi?id=26776&action=review

------- Additional Comments from Geoffrey Garen <ggaren at apple.com>

> +    addSlowCase(emitJumpIfEitherNumber(X86::ecx));

Let's call this "emitJumpIfImmediateNumber".

> +		   emitJumpSlowCaseIfNotImmediateIntegerNumber(X86::eax);

Let's call "*IntegerNumber" "*Integer".


-    , numberStructure(JSNumberCell::createStructure(jsNull()))
+    , numberStructure(createNumberStructure(jsNull()))

You could just use NULL or 0xbbadbeef here in 64bit, since we shouldn't be
using the JSNumberCell structure on 64bit. Not a big deal, though.

+     * C++'s idea of a reinterpret_cast lacks sufficient cojones.
+     */
+    template<typename TO, typename FROM>
+    TO wtf_reinterpret_cast(FROM in)

Let's put this in wtf/StdLibExtras.h, in the WTF namespace. Then, we can remove
the "wtf_" prefix. Maybe we should call this "union_cast."

+    inline JSValuePtr JSImmediate::makeOutOfIntegerRange(T value)

How about calling this "fromOutOfRangeInteger".

r=me


More information about the webkit-reviews mailing list