Title: [241699] releases/WebKitGTK/webkit-2.24
Revision
241699
Author
carlo...@webkit.org
Date
2019-02-18 08:15:41 -0800 (Mon, 18 Feb 2019)

Log Message

Merge r241613 - [JSC] CodeBlock::jettison should clear related watchpoints
https://bugs.webkit.org/show_bug.cgi?id=194544

Reviewed by Mark Lam.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::jettison):
* dfg/DFGCommonData.h:
(JSC::DFG::CommonData::clearWatchpoints): Added.
* dfg/CommonData.cpp:
(JSC::DFG::CommonData::clearWatchpoints): Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.24/JSTests/ChangeLog (241698 => 241699)


--- releases/WebKitGTK/webkit-2.24/JSTests/ChangeLog	2019-02-18 16:15:36 UTC (rev 241698)
+++ releases/WebKitGTK/webkit-2.24/JSTests/ChangeLog	2019-02-18 16:15:41 UTC (rev 241699)
@@ -1,3 +1,12 @@
+2019-02-15  Robin Morisset  <rmoris...@apple.com>
+        CodeBlock::jettison should clear related watchpoints
+        https://bugs.webkit.org/show_bug.cgi?id=194544
+
+        Reviewed by Mark Lam.
+
+        * stress/regexp-replace-double-watchpoint.js: Added.
+        (foo):
+
 2019-02-15  Saam barati  <sbar...@apple.com>
 
         [WebAssembly] Write a new register allocator for Air O0 and make BBQ use it

Added: releases/WebKitGTK/webkit-2.24/JSTests/stress/regexp-replace-double-watchpoint.js (0 => 241699)


--- releases/WebKitGTK/webkit-2.24/JSTests/stress/regexp-replace-double-watchpoint.js	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.24/JSTests/stress/regexp-replace-double-watchpoint.js	2019-02-18 16:15:41 UTC (rev 241699)
@@ -0,0 +1,19 @@
+function foo() {
+    for (const x in []) {
+        new Float64Array(65493);
+    }
+
+    const nullRegexp = RegExp();
+
+    for (let i = 0; i < 10000; i++) {
+        function bar() {
+            nullRegexp.test("asdf");
+        }
+        bar();
+    }
+
+    for (let j = 13.37; j < 10000; j++) {
+        [].__proto__[j] = 0;
+    }
+}
+"ii".replace(/i/g, foo);

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog (241698 => 241699)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog	2019-02-18 16:15:36 UTC (rev 241698)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog	2019-02-18 16:15:41 UTC (rev 241699)
@@ -1,3 +1,17 @@
+2019-02-15  Robin Morisset  <rmoris...@apple.com>
+
+        CodeBlock::jettison should clear related watchpoints
+        https://bugs.webkit.org/show_bug.cgi?id=194544
+
+        Reviewed by Mark Lam.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::jettison):
+        * dfg/DFGCommonData.h:
+        (JSC::DFG::CommonData::clearWatchpoints): Added.
+        * dfg/CommonData.cpp:
+        (JSC::DFG::CommonData::clearWatchpoints): Added.
+
 2019-02-15  Yusuke Suzuki  <ysuz...@apple.com>
 
         [JSC] DFG, FTL, and Wasm worklist creation should be fenced

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/bytecode/CodeBlock.cpp (241698 => 241699)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/bytecode/CodeBlock.cpp	2019-02-18 16:15:36 UTC (rev 241698)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/bytecode/CodeBlock.cpp	2019-02-18 16:15:41 UTC (rev 241699)
@@ -1997,6 +1997,9 @@
     // 2) Make sure that if we call the owner executable, then we shouldn't call this CodeBlock.
 
 #if ENABLE(DFG_JIT)
+    if (JITCode::isOptimizingJIT(jitType()))
+        jitCode()->dfgCommon()->clearWatchpoints();
+    
     if (reason != Profiler::JettisonDueToOldAge) {
         Profiler::Compilation* compilation = jitCode()->dfgCommon()->compilation.get();
         if (UNLIKELY(compilation))

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/dfg/DFGCommonData.cpp (241698 => 241699)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/dfg/DFGCommonData.cpp	2019-02-18 16:15:36 UTC (rev 241698)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/dfg/DFGCommonData.cpp	2019-02-18 16:15:41 UTC (rev 241699)
@@ -205,6 +205,13 @@
 #endif
 }
 
+void CommonData::clearWatchpoints()
+{
+    watchpoints.clear();
+    adaptiveStructureWatchpoints.clear();
+    adaptiveInferredPropertyValueWatchpoints.clear();
+}
+
 } } // namespace JSC::DFG
 
 #endif // ENABLE(DFG_JIT)

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/dfg/DFGCommonData.h (241698 => 241699)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/dfg/DFGCommonData.h	2019-02-18 16:15:36 UTC (rev 241698)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/dfg/DFGCommonData.h	2019-02-18 16:15:41 UTC (rev 241699)
@@ -114,6 +114,8 @@
     void validateReferences(const TrackedReferences&);
 
     static ptrdiff_t frameRegisterCountOffset() { return OBJECT_OFFSETOF(CommonData, frameRegisterCount); }
+    
+    void clearWatchpoints();
 
     RefPtr<InlineCallFrameSet> inlineCallFrames;
     Vector<CodeOrigin, 0, UnsafeVectorOverflow> codeOrigins;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to