Title: [198275] releases/WebKitGTK/webkit-2.12/Source/_javascript_Core
Revision
198275
Author
[email protected]
Date
2016-03-16 08:14:14 -0700 (Wed, 16 Mar 2016)

Log Message

Revert "Merge r197730 - Reduce the number of instructions needed to record the last regexp result"

This reverts commit 074b9a12367b04dd3cd70f9d7c73695f8184fbb6.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog (198274 => 198275)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-03-16 15:14:03 UTC (rev 198274)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/ChangeLog	2016-03-16 15:14:14 UTC (rev 198275)
@@ -15,34 +15,6 @@
         * heap/WeakBlock.cpp:
         (JSC::WeakBlock::visit):
 
-2016-03-07  Filip Pizlo  <[email protected]>
-
-        Reduce the number of instructions needed to record the last regexp result
-        https://bugs.webkit.org/show_bug.cgi?id=155161
-
-        Reviewed by Sam Weinig.
-
-        This tightens up RegExpCachedResult::record(). My profiling shows that we spend just
-        over 1% of the time in Octane/regexp in this function. This function had two obvious
-        redundancies:
-
-        1) It executed the write barrier on owner twice. It only needs to execute it once. Since
-           the same RegExpConstructor is likely to be used many times, it makes sense to do the
-           barrier without looking at the 'to' objects at all. In steady state, this means that
-           the RegExpConstructor will simply be OldGrey so this one barrier will always skip the
-           slow path.
-
-        2) It cleared some fields that didn't need to be cleared, since we can just use
-           m_reified to indicate that the fields are not meaningful anymore.
-
-        This is meant to be a microscopic regexp speed-up.
-
-        * runtime/RegExpCachedResult.cpp:
-        (JSC::RegExpCachedResult::visitChildren):
-        (JSC::RegExpCachedResult::lastResult):
-        * runtime/RegExpCachedResult.h:
-        (JSC::RegExpCachedResult::record):
-
 2016-03-07  Benjamin Poulain  <[email protected]>
 
         [JSC] Small clean up of how we use SSA's valuesAtHead

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/runtime/RegExpCachedResult.cpp (198274 => 198275)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/runtime/RegExpCachedResult.cpp	2016-03-16 15:14:03 UTC (rev 198274)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/runtime/RegExpCachedResult.cpp	2016-03-16 15:14:14 UTC (rev 198275)
@@ -35,12 +35,10 @@
 {
     visitor.append(&m_lastInput);
     visitor.append(&m_lastRegExp);
-    if (m_reified) {
-        visitor.append(&m_reifiedInput);
-        visitor.append(&m_reifiedResult);
-        visitor.append(&m_reifiedLeftContext);
-        visitor.append(&m_reifiedRightContext);
-    }
+    visitor.append(&m_reifiedInput);
+    visitor.append(&m_reifiedResult);
+    visitor.append(&m_reifiedLeftContext);
+    visitor.append(&m_reifiedRightContext);
 }
 
 JSArray* RegExpCachedResult::lastResult(ExecState* exec, JSObject* owner)
@@ -51,8 +49,6 @@
             m_reifiedResult.set(exec->vm(), owner, createRegExpMatchesArray(exec, exec->lexicalGlobalObject(), m_lastInput.get(), m_lastRegExp.get(), m_result.start));
         else
             m_reifiedResult.set(exec->vm(), owner, createEmptyRegExpMatchesArray(exec->lexicalGlobalObject(), m_lastInput.get(), m_lastRegExp.get()));
-        m_reifiedLeftContext.clear();
-        m_reifiedRightContext.clear();
         m_reified = true;
     }
     return m_reifiedResult.get();

Modified: releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/runtime/RegExpCachedResult.h (198274 => 198275)


--- releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/runtime/RegExpCachedResult.h	2016-03-16 15:14:03 UTC (rev 198274)
+++ releases/WebKitGTK/webkit-2.12/Source/_javascript_Core/runtime/RegExpCachedResult.h	2016-03-16 15:14:14 UTC (rev 198275)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -54,9 +54,10 @@
 
     ALWAYS_INLINE void record(VM& vm, JSObject* owner, RegExp* regExp, JSString* input, MatchResult result)
     {
-        vm.heap.writeBarrier(owner);
-        m_lastRegExp.setWithoutWriteBarrier(regExp);
-        m_lastInput.setWithoutWriteBarrier(input);
+        m_lastRegExp.set(vm, owner, regExp);
+        m_lastInput.set(vm, owner, input);
+        m_reifiedLeftContext.clear();
+        m_reifiedRightContext.clear();
         m_result = result;
         m_reified = false;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to