Bug 160110 - MathICs should be able to emit only a jump along the inline path when they don't have any type data
Summary: MathICs should be able to emit only a jump along the inline path when they do...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on: 160291
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-22 18:29 PDT by Saam Barati
Modified: 2016-07-28 04:57 PDT (History)
12 users (show)

See Also:


Attachments
WIP (12.31 KB, patch)
2016-07-25 15:38 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (12.94 KB, patch)
2016-07-26 17:21 PDT, Saam Barati
mark.lam: review+
Details | Formatted Diff | Diff
patch for landing (13.07 KB, patch)
2016-07-27 11:39 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.