Bug 23367

Summary: Increase range of values that can be represented by JSImmediate on 64-bit platforms.
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
The patch ggaren: review+

Gavin Barraclough
Reported 2009-01-15 16:57:16 PST
Increase range of values that can be represented by JSImmediate on 64-bit platforms.
Attachments
The patch (77.09 KB, patch)
2009-01-15 16:58 PST, Gavin Barraclough
ggaren: review+
Gavin Barraclough
Comment 1 2009-01-15 16:58:13 PST
Created attachment 26776 [details] The patch
Geoffrey Garen
Comment 2 2009-01-15 17:35:14 PST
Comment on attachment 26776 [details] The patch > + 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
Gavin Barraclough
Comment 3 2009-01-15 21:32:15 PST
fixed in r39958
Note You need to log in before you can comment on or make changes to this bug.