Bug 160110

Summary: MathICs should be able to emit only a jump along the inline path when they don't have any type data
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, fpizlo, ggaren, gskachkov, keith_miller, mark.lam, msaboff, oliver, ossy, sukolsak, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 160291    
Bug Blocks:    
Attachments:
Description Flags
WIP
none
patch
mark.lam: review+
patch for landing none

Description Saam Barati 2016-07-22 18:29:00 PDT
And we should repatch them on first execution
Comment 1 Saam Barati 2016-07-25 15:38:52 PDT
Created attachment 284532 [details]
WIP

almsot done
Comment 2 WebKit Commit Bot 2016-07-25 15:40:21 PDT
Attachment 284532 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/jit/JITMathIC.h:112:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITMathIC.h:124:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Saam Barati 2016-07-26 17:21:20 PDT
Created attachment 284656 [details]
patch
Comment 4 WebKit Commit Bot 2016-07-26 17:23:41 PDT
Attachment 284656 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/jit/JITMathIC.h:122:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITMathIC.h:134:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Mark Lam 2016-07-27 08:52:11 PDT
Comment on attachment 284656 [details]
patch

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

r=me with fixes.

> Source/JavaScriptCore/jit/JITMathIC.h:74
> +                // It looks like the MathIC has yet to execute. We don't want to emit code in this
> +                // case for a couple reasons. First, the operation may never execute, so if we don't emit
> +                // code, it's a win. Second, if the operation does execute, we can emit better code
> +                // once we have an idea about the types of lhs and rhs.

nice!

> Source/JavaScriptCore/jit/JITMathIC.h:81
> +                ASSERT(static_cast<ptrdiff_t>(inlineSize) <= MacroAssembler::maxJumpReplacementSize());

I think you should use ASSERT_UNUSED(inlineSize, ...) here to fix the build breakage.

> Source/JavaScriptCore/jit/JITMathICInlineResult.h:34
> +    DelayFastPath,

I don't see this used anywhere.  Can remove?
Comment 6 Saam Barati 2016-07-27 10:34:47 PDT
Comment on attachment 284656 [details]
patch

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

>> Source/JavaScriptCore/jit/JITMathICInlineResult.h:34
>> +    DelayFastPath,
> 
> I don't see this used anywhere.  Can remove?

Yeah. I forgot to remove this. I had this in the original patch but forgot to remove it after I refactored.
Comment 7 Saam Barati 2016-07-27 11:39:00 PDT
Created attachment 284712 [details]
patch for landing
Comment 8 WebKit Commit Bot 2016-07-27 11:40:57 PDT
Attachment 284712 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/jit/JITMathIC.h:122:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/jit/JITMathIC.h:134:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 WebKit Commit Bot 2016-07-27 12:57:41 PDT
Comment on attachment 284712 [details]
patch for landing

Clearing flags on attachment: 284712

Committed r203786: <http://trac.webkit.org/changeset/203786>
Comment 10 WebKit Commit Bot 2016-07-27 12:57:46 PDT
All reviewed patches have been landed.  Closing bug.