Title: [273972] trunk
Revision
273972
Author
tzaga...@apple.com
Date
2021-03-05 08:24:08 -0800 (Fri, 05 Mar 2021)

Log Message

OpGetPrivateName needs to be listed in FOR_EACH_OPCODE_WITH_VALUE_PROFILE
https://bugs.webkit.org/show_bug.cgi?id=222775
<rdar://74982634>

Reviewed by Michael Saboff.

JSTests:

* stress/private-name-assignment-in-constructor.js: Added.
(Foo):

Source/_javascript_Core:

Right now valueProfileForBytecodeIndex incorrectly returns null for op_get_private_name.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::valueProfileForBytecodeIndex):
* bytecode/Opcode.h:

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (273971 => 273972)


--- trunk/JSTests/ChangeLog	2021-03-05 16:20:06 UTC (rev 273971)
+++ trunk/JSTests/ChangeLog	2021-03-05 16:24:08 UTC (rev 273972)
@@ -1,3 +1,14 @@
+2021-03-05  Tadeu Zagallo  <tzaga...@apple.com>
+
+        OpGetPrivateName needs to be listed in FOR_EACH_OPCODE_WITH_VALUE_PROFILE
+        https://bugs.webkit.org/show_bug.cgi?id=222775
+        <rdar://74982634>
+
+        Reviewed by Michael Saboff.
+
+        * stress/private-name-assignment-in-constructor.js: Added.
+        (Foo):
+
 2021-03-05  Dmitry Bezhetskov  <dbezhets...@igalia.com>
 
         [WASM-Function-References] Update ref.func to produce (ref $t)

Added: trunk/JSTests/stress/private-name-assignment-in-constructor.js (0 => 273972)


--- trunk/JSTests/stress/private-name-assignment-in-constructor.js	                        (rev 0)
+++ trunk/JSTests/stress/private-name-assignment-in-constructor.js	2021-03-05 16:24:08 UTC (rev 273972)
@@ -0,0 +1,8 @@
+class Foo {
+  #foo;
+  constructor() {
+    this.#foo /= 1;
+  }
+}
+for (let i = 0; i < 10000000; ++i)
+  new Foo();

Modified: trunk/Source/_javascript_Core/ChangeLog (273971 => 273972)


--- trunk/Source/_javascript_Core/ChangeLog	2021-03-05 16:20:06 UTC (rev 273971)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-03-05 16:24:08 UTC (rev 273972)
@@ -1,3 +1,17 @@
+2021-03-05  Tadeu Zagallo  <tzaga...@apple.com>
+
+        OpGetPrivateName needs to be listed in FOR_EACH_OPCODE_WITH_VALUE_PROFILE
+        https://bugs.webkit.org/show_bug.cgi?id=222775
+        <rdar://74982634>
+
+        Reviewed by Michael Saboff.
+
+        Right now valueProfileForBytecodeIndex incorrectly returns null for op_get_private_name.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::valueProfileForBytecodeIndex):
+        * bytecode/Opcode.h:
+
 2021-03-05  Chris Dumez  <cdu...@apple.com>
 
         Reduce use of CFRetain() / CFRelease() / CFAutoRelease() in WebKit

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (273971 => 273972)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2021-03-05 16:20:06 UTC (rev 273971)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2021-03-05 16:24:08 UTC (rev 273972)
@@ -3223,7 +3223,9 @@
 
 ValueProfile& CodeBlock::valueProfileForBytecodeIndex(BytecodeIndex bytecodeIndex)
 {
-    return *tryGetValueProfileForBytecodeIndex(bytecodeIndex);
+    ValueProfile* profile = ""
+    ASSERT(profile);
+    return *profile;
 }
 
 void CodeBlock::validate()

Modified: trunk/Source/_javascript_Core/bytecode/Opcode.h (273971 => 273972)


--- trunk/Source/_javascript_Core/bytecode/Opcode.h	2021-03-05 16:20:06 UTC (rev 273971)
+++ trunk/Source/_javascript_Core/bytecode/Opcode.h	2021-03-05 16:24:08 UTC (rev 273972)
@@ -124,6 +124,7 @@
     macro(OpBitxor) \
     macro(OpLshift) \
     macro(OpRshift) \
+    macro(OpGetPrivateName) \
 
 #define FOR_EACH_OPCODE_WITH_ARRAY_PROFILE(macro) \
     macro(OpHasEnumerableIndexedProperty) \
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to