[JSC] handle Put/DefinePrivateField in resetPutByID
authorcaitp@igalia.com <caitp@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jun 2020 02:05:51 +0000 (02:05 +0000)
committercaitp@igalia.com <caitp@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jun 2020 02:05:51 +0000 (02:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=213583

Reviewed by Yusuke Suzuki.

r262613 extends and uses PutByValDirect to support updating and defining private fields, in order to reuse
the IC machinery. The necessary resetPutByID change was erroneously omitted, and is presented here.

* jit/Repatch.cpp:
(JSC::resetPutByID):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@263491 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/Repatch.cpp

index 184d6a3..41bdeab 100644 (file)
@@ -1,3 +1,16 @@
+2020-06-24  Caitlin Potter  <caitp@igalia.com>
+
+        [JSC] handle Put/DefinePrivateField in resetPutByID
+        https://bugs.webkit.org/show_bug.cgi?id=213583
+
+        Reviewed by Yusuke Suzuki.
+
+        r262613 extends and uses PutByValDirect to support updating and defining private fields, in order to reuse
+        the IC machinery. The necessary resetPutByID change was erroneously omitted, and is presented here.
+
+        * jit/Repatch.cpp:
+        (JSC::resetPutByID):
+
 2020-06-24  Yusuke Suzuki  <ysuzuki@apple.com>
 
         [JSC] llintTrue / jitTrue can encounter native functions
index ca5b894..258f139 100644 (file)
@@ -1483,6 +1483,10 @@ void resetPutByID(CodeBlock* codeBlock, StructureStubInfo& stubInfo)
         optimizedFunction = operationPutByIdNonStrictOptimize;
     else if (unoptimizedFunction == operationPutByIdDirectStrict || unoptimizedFunction == operationPutByIdDirectStrictOptimize)
         optimizedFunction = operationPutByIdDirectStrictOptimize;
+    else if (unoptimizedFunction == operationPutByIdPutPrivateFieldStrict || unoptimizedFunction == operationPutByIdPutPrivateFieldStrictOptimize)
+        optimizedFunction = operationPutByIdPutPrivateFieldStrictOptimize;
+    else if (unoptimizedFunction == operationPutByIdDefinePrivateFieldStrict || unoptimizedFunction == operationPutByIdDefinePrivateFieldStrictOptimize)
+        optimizedFunction = operationPutByIdDefinePrivateFieldStrictOptimize;
     else {
         ASSERT(unoptimizedFunction == operationPutByIdDirectNonStrict || unoptimizedFunction == operationPutByIdDirectNonStrictOptimize);
         optimizedFunction = operationPutByIdDirectNonStrictOptimize;