Bug 123574

Summary: Remove CachedTranscendentalFunction because caching math functions is an ugly idea
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, commit-queue, ggaren, mark.lam, mhahnenberg, msaboff, nrotem, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch mhahnenberg: review+

Description Filip Pizlo 2013-10-31 09:23:26 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2013-10-31 09:26:10 PDT
Created attachment 215656 [details]
the patch
Comment 2 WebKit Commit Bot 2013-10-31 09:27:31 PDT
Attachment 215656 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj', u'Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h', u'Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp', u'Source/JavaScriptCore/dfg/DFGCSEPhase.cpp', u'Source/JavaScriptCore/dfg/DFGClobberize.h', u'Source/JavaScriptCore/dfg/DFGFixupPhase.cpp', u'Source/JavaScriptCore/dfg/DFGNodeType.h', u'Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGSafeToExecute.h', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp', u'Source/JavaScriptCore/jit/JITOperations.h', u'Source/JavaScriptCore/runtime/CachedTranscendentalFunction.h', u'Source/JavaScriptCore/runtime/DateInstanceCache.h', u'Source/JavaScriptCore/runtime/Intrinsic.h', u'Source/JavaScriptCore/runtime/MathObject.cpp', u'Source/JavaScriptCore/runtime/VM.h']" exit_code: 1
Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:566:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
Total errors found: 1 in 16 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mark Hahnenberg 2013-10-31 09:36:32 PDT
Comment on attachment 215656 [details]
the patch

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

r=me

> Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:570
> +            setConstant(node, jsNumber(sin(child.asNumber())));

Is this supposed to be cos?

> Source/JavaScriptCore/runtime/DateInstanceCache.h:29
> +#include "JSCJSValue.h"

Is this necessary?
Comment 4 Michael Saboff 2013-10-31 09:40:37 PDT
Comment on attachment 215656 [details]
the patch

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

> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:1485
>          if (argumentCountIncludingThis == 1) { // Math.sqrt()

Remove/change the Math.sqrt() comment
Comment 5 Filip Pizlo 2013-10-31 12:14:22 PDT
(In reply to comment #3)
> (From update of attachment 215656 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=215656&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:570
> > +            setConstant(node, jsNumber(sin(child.asNumber())));
> 
> Is this supposed to be cos?

Heh.  Good point.  I added a test.

> 
> > Source/JavaScriptCore/runtime/DateInstanceCache.h:29
> > +#include "JSCJSValue.h"
> 
> Is this necessary?

Yup!
Comment 6 Filip Pizlo 2013-10-31 12:14:45 PDT
(In reply to comment #2)
> Attachment 215656 [details] did not pass style-queue:
> 
> Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj', u'Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h', u'Source/JavaScriptCore/dfg/DFGBackwardsPropagationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp', u'Source/JavaScriptCore/dfg/DFGCSEPhase.cpp', u'Source/JavaScriptCore/dfg/DFGClobberize.h', u'Source/JavaScriptCore/dfg/DFGFixupPhase.cpp', u'Source/JavaScriptCore/dfg/DFGNodeType.h', u'Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp', u'Source/JavaScriptCore/dfg/DFGSafeToExecute.h', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h', u'Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp', u'Source/JavaScriptCore/jit/JITOperations.h', u'Source/JavaScriptCore/runtime/CachedTranscendentalFunction.h', u'Source/JavaScriptCore/runtime/DateInstanceCache.h', u'Source/JavaScriptCore/runtime/Intrinsic.h', u'Source/JavaScriptCore/runtime/MathObject.cpp', u'Source/JavaScriptCore/runtime/VM.h']" exit_code: 1
> Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:566:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]

Fixed.

> Total errors found: 1 in 16 files
> 
> 
> If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Filip Pizlo 2013-10-31 12:14:55 PDT
(In reply to comment #4)
> (From update of attachment 215656 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=215656&action=review
> 
> > Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:1485
> >          if (argumentCountIncludingThis == 1) { // Math.sqrt()
> 
> Remove/change the Math.sqrt() comment

Fixed.