Bug 64654

Summary: DFG JIT compare/branch code emits is-integer tests even when a value is definitely not an integer
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, fpizlo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch
none
the patch (fix Platform.h)
none
the patch (fix style) none

Description Filip Pizlo 2011-07-16 14:15:56 PDT
The DFG JIT's support for comparisons and branching may emit tests to see if the operands are integers.  If they are, the comparison can be done more quickly by doing an Int32 compare.  But in some cases, the compiler knows statically that one or both of the operands are definitely not integers.  In that case, the JIT should always emit a slow call and omit the unnecessary is-int test.
Comment 1 Filip Pizlo 2011-07-16 14:22:06 PDT
Created attachment 101098 [details]
the patch
Comment 2 Filip Pizlo 2011-07-16 14:23:27 PDT
Created attachment 101099 [details]
the patch (fix Platform.h)

Previous patch accidentally had a change to Platform.h that it should not have had.
Comment 3 WebKit Review Bot 2011-07-16 14:24:00 PDT
Attachment 101098 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:437:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 WebKit Review Bot 2011-07-16 14:24:55 PDT
Attachment 101099 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:437:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Filip Pizlo 2011-07-16 14:26:28 PDT
Created attachment 101100 [details]
the patch (fix style)
Comment 6 WebKit Review Bot 2011-07-16 18:47:58 PDT
Comment on attachment 101100 [details]
the patch (fix style)

Clearing flags on attachment: 101100

Committed r91160: <http://trac.webkit.org/changeset/91160>
Comment 7 WebKit Review Bot 2011-07-16 18:48:03 PDT
All reviewed patches have been landed.  Closing bug.