Title: [199755] trunk/Source/_javascript_Core
Revision
199755
Author
sbar...@apple.com
Date
2016-04-19 19:41:00 -0700 (Tue, 19 Apr 2016)

Log Message

Add a couple UNLIKELY macros in parseMemberExpression
https://bugs.webkit.org/show_bug.cgi?id=156775

Reviewed by Filip Pizlo.

These UNLIKELY macros have to do with the base of the
member _expression_ being 'super'. I think it's safe to
argue that this is truly UNLIKELY. I am seeing speedups
sometimes on Octane codeload. Usually around 0.5%. Sometimes 1%.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseMemberExpression):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (199754 => 199755)


--- trunk/Source/_javascript_Core/ChangeLog	2016-04-20 02:24:53 UTC (rev 199754)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-04-20 02:41:00 UTC (rev 199755)
@@ -1,5 +1,20 @@
 2016-04-19  Saam barati  <sbar...@apple.com>
 
+        Add a couple UNLIKELY macros in parseMemberExpression
+        https://bugs.webkit.org/show_bug.cgi?id=156775
+
+        Reviewed by Filip Pizlo.
+
+        These UNLIKELY macros have to do with the base of the
+        member _expression_ being 'super'. I think it's safe to
+        argue that this is truly UNLIKELY. I am seeing speedups
+        sometimes on Octane codeload. Usually around 0.5%. Sometimes 1%.
+
+        * parser/Parser.cpp:
+        (JSC::Parser<LexerType>::parseMemberExpression):
+
+2016-04-19  Saam barati  <sbar...@apple.com>
+
         allow jsc shell to dump sampling profiler data
         https://bugs.webkit.org/show_bug.cgi?id=156725
 

Modified: trunk/Source/_javascript_Core/parser/Parser.cpp (199754 => 199755)


--- trunk/Source/_javascript_Core/parser/Parser.cpp	2016-04-20 02:24:53 UTC (rev 199754)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp	2016-04-20 02:41:00 UTC (rev 199755)
@@ -3922,7 +3922,7 @@
             failIfFalse(property, "Cannot parse subscript _expression_");
             base = context.createBracketAccess(location, base, property, initialAssignments != m_parserState.assignmentCount, expressionStart, expressionEnd, tokenEndPosition());
             
-            if (baseIsSuper && currentScope()->isArrowFunction())
+            if (UNLIKELY(baseIsSuper && currentScope()->isArrowFunction()))
                 currentFunctionScope()->setInnerArrowFunctionUsesSuperProperty();
             
             handleProductionOrFail(CLOSEBRACKET, "]", "end", "subscript _expression_");
@@ -3958,7 +3958,7 @@
             nextExpectIdentifier(LexerFlagsIgnoreReservedWords | TreeBuilder::DontBuildKeywords);
             matchOrFail(IDENT, "Expected a property name after '.'");
             base = context.createDotAccess(location, base, m_token.m_data.ident, expressionStart, expressionEnd, tokenEndPosition());
-            if (baseIsSuper && currentScope()->isArrowFunction())
+            if (UNLIKELY(baseIsSuper && currentScope()->isArrowFunction()))
                 currentFunctionScope()->setInnerArrowFunctionUsesSuperProperty();
             next();
             break;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to