Title: [283096] trunk
Revision
283096
Author
[email protected]
Date
2021-09-26 21:25:46 -0700 (Sun, 26 Sep 2021)

Log Message

Unreviewed, reverting r283095.
https://bugs.webkit.org/show_bug.cgi?id=230815

We should land the original patch since this does not work
with bytecode cache

Reverted changeset:

"[JSC] Optimize PutByVal with for-in"
https://bugs.webkit.org/show_bug.cgi?id=230801
https://commits.webkit.org/r283095

Modified Paths

Removed Paths

Diff

Modified: trunk/JSTests/ChangeLog (283095 => 283096)


--- trunk/JSTests/ChangeLog	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/JSTests/ChangeLog	2021-09-27 04:25:46 UTC (rev 283096)
@@ -1,3 +1,17 @@
+2021-09-26  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r283095.
+        https://bugs.webkit.org/show_bug.cgi?id=230815
+
+        We should land the original patch since this does not work
+        with bytecode cache
+
+        Reverted changeset:
+
+        "[JSC] Optimize PutByVal with for-in"
+        https://bugs.webkit.org/show_bug.cgi?id=230801
+        https://commits.webkit.org/r283095
+
 2021-09-26  Yusuke Suzuki  <[email protected]>
 
         [JSC] Optimize PutByVal with for-in

Deleted: trunk/JSTests/stress/for-in-sentinel.js (283095 => 283096)


--- trunk/JSTests/stress/for-in-sentinel.js	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/JSTests/stress/for-in-sentinel.js	2021-09-27 04:25:46 UTC (rev 283096)
@@ -1,22 +0,0 @@
-function shouldBe(actual, expected) {
-    if (actual !== expected)
-        throw new Error('bad value: ' + actual);
-}
-
-var object = {
-    $: 32,
-    test: 33,
-    hey: 34,
-};
-
-function test(object) {
-    var count = 0;
-    for (var i in object) {
-        ++count;
-    }
-    return count;
-}
-noInline(test);
-
-for (var i = 0; i < 1e6; ++i)
-    shouldBe(test(object), 3);

Modified: trunk/Source/_javascript_Core/ChangeLog (283095 => 283096)


--- trunk/Source/_javascript_Core/ChangeLog	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-09-27 04:25:46 UTC (rev 283096)
@@ -1,3 +1,17 @@
+2021-09-26  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r283095.
+        https://bugs.webkit.org/show_bug.cgi?id=230815
+
+        We should land the original patch since this does not work
+        with bytecode cache
+
+        Reverted changeset:
+
+        "[JSC] Optimize PutByVal with for-in"
+        https://bugs.webkit.org/show_bug.cgi?id=230801
+        https://commits.webkit.org/r283095
+
 2021-09-26  Yusuke Suzuki  <[email protected]>
 
         [JSC] Optimize PutByVal with for-in

Modified: trunk/Source/_javascript_Core/builtins/BuiltinNames.h (283095 => 283096)


--- trunk/Source/_javascript_Core/builtins/BuiltinNames.h	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/builtins/BuiltinNames.h	2021-09-27 04:25:46 UTC (rev 283096)
@@ -182,7 +182,7 @@
     macro(createPrivateSymbol) \
     macro(entries) \
     macro(outOfLineReactionCounts) \
-    macro(emptyPropertyNameEnumerator) \
+    macro(emptyPropertyNameEnumerator)
 
 
 namespace Symbols {

Modified: trunk/Source/_javascript_Core/bytecode/BytecodeList.rb (283095 => 283096)


--- trunk/Source/_javascript_Core/bytecode/BytecodeList.rb	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeList.rb	2021-09-27 04:25:46 UTC (rev 283096)
@@ -762,13 +762,6 @@
         targetLabel: BoundLabel,
     }
 
-op :jeq_ptr,
-    args: {
-        value: VirtualRegister,
-        specialPointer: VirtualRegister,
-        targetLabel: BoundLabel,
-    }
-
 op :jneq_ptr,
     args: {
         value: VirtualRegister,

Modified: trunk/Source/_javascript_Core/bytecode/BytecodeUseDef.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/bytecode/BytecodeUseDef.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeUseDef.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -80,6 +80,7 @@
     // No uses.
     case op_new_regexp:
     case op_debug:
+    case op_jneq_ptr:
     case op_loop_hint:
     case op_jmp:
     case op_new_object:
@@ -134,9 +135,6 @@
     USES(OpJnstricteq, lhs, rhs)
     USES(OpJbelow, lhs, rhs)
     USES(OpJbeloweq, lhs, rhs)
-    USES(OpJeqPtr, value, specialPointer)
-    USES(OpJneqPtr, value, specialPointer)
-
     USES(OpSetFunctionName, function, name)
     USES(OpLogShadowChickenTail, thisValue, scope)
 
@@ -367,7 +365,6 @@
     case op_jneq_null:
     case op_jundefined_or_null:
     case op_jnundefined_or_null:
-    case op_jeq_ptr:
     case op_jneq_ptr:
     case op_jless:
     case op_jlesseq:

Modified: trunk/Source/_javascript_Core/bytecode/Opcode.h (283095 => 283096)


--- trunk/Source/_javascript_Core/bytecode/Opcode.h	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/bytecode/Opcode.h	2021-09-27 04:25:46 UTC (rev 283096)
@@ -199,7 +199,6 @@
     case op_jneq_null:
     case op_jundefined_or_null:
     case op_jnundefined_or_null:
-    case op_jeq_ptr:
     case op_jneq_ptr:
     case op_jless:
     case op_jlesseq:

Modified: trunk/Source/_javascript_Core/bytecode/PreciseJumpTargetsInlines.h (283095 => 283096)


--- trunk/Source/_javascript_Core/bytecode/PreciseJumpTargetsInlines.h	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/bytecode/PreciseJumpTargetsInlines.h	2021-09-27 04:25:46 UTC (rev 283096)
@@ -43,7 +43,6 @@
     CASE_OP(OpJneqNull) \
     CASE_OP(OpJundefinedOrNull) \
     CASE_OP(OpJnundefinedOrNull) \
-    CASE_OP(OpJeqPtr) \
     CASE_OP(OpJneqPtr) \
     \
     CASE_OP(OpJless) \

Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -105,7 +105,6 @@
         CASE(OpJeq)
         CASE(OpJstricteq)
         CASE(OpJneq)
-        CASE(OpJeqPtr)
         CASE(OpJneqPtr)
         CASE(OpJnstricteq)
         CASE(OpJless)
@@ -1498,11 +1497,6 @@
     OpJneqPtr::emit(this, cond, moveLinkTimeConstant(nullptr, LinkTimeConstant::applyFunction), target.bind(this));
 }
 
-void BytecodeGenerator::emitJumpIfSentinelString(RegisterID* cond, Label& target)
-{
-    OpJeqPtr::emit(this, cond, emitLoad(nullptr, JSValue(vm().smallStrings.sentinelString())), target.bind(this));
-}
-
 unsigned BytecodeGenerator::emitWideJumpIfNotFunctionHasOwnProperty(RegisterID* cond, Label& target)
 {
     OpJneqPtr::emit<OpcodeSize::Wide32>(this, cond, moveLinkTimeConstant(nullptr, LinkTimeConstant::hasOwnPropertyFunction), target.bind(this));

Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h (283095 => 283096)


--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h	2021-09-27 04:25:46 UTC (rev 283096)
@@ -858,7 +858,6 @@
         void emitJumpIfFalse(RegisterID* cond, Label& target);
         void emitJumpIfNotFunctionCall(RegisterID* cond, Label& target);
         void emitJumpIfNotFunctionApply(RegisterID* cond, Label& target);
-        void emitJumpIfSentinelString(RegisterID* cond, Label& target);
         unsigned emitWideJumpIfNotFunctionHasOwnProperty(RegisterID* cond, Label& target);
         void recordHasOwnPropertyInForInLoop(ForInContext&, unsigned branchOffset, Label& genericPath);
 

Modified: trunk/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/bytecompiler/NodesCodegen.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -4227,8 +4227,10 @@
 
         // FIXME: We should have a way to see if anyone is actually using the propertyName for something other than a get_by_val. If not, we could eliminate the toString in this opcode.
         generator.emitEnumeratorNext(propertyName.get(), mode.get(), index.get(), base.get(), enumerator.get());
-        generator.emitJumpIfSentinelString(propertyName.get(), scope->breakTarget());
 
+        // Note, choosing undefined or null helps please DFG's Abstract Interpreter as it doesn't distinguish null and undefined as types (via SpecOther).
+        generator.emitJumpIfTrue(generator.emitIsUndefinedOrNull(generator.newTemporary(), propertyName.get()), scope->breakTarget());
+
         this->emitLoopHeader(generator, propertyName.get());
 
         generator.emitProfileControlFlow(profilerStartOffset);

Modified: trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h (283095 => 283096)


--- trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h	2021-09-27 04:25:46 UTC (rev 283096)
@@ -4323,7 +4323,7 @@
     }
 
     case EnumeratorNextUpdatePropertyName: {
-        setTypeForNode(node, SpecStringIdent);
+        setTypeForNode(node, SpecString | SpecOther);
         break;
     }
 

Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -7632,16 +7632,6 @@
             NEXT_OPCODE(op_iterator_next);
         }
 
-        case op_jeq_ptr: {
-            auto bytecode = currentInstruction->as<OpJeqPtr>();
-            FrozenValue* frozenPointer = m_graph.freezeStrong(m_inlineStackTop->m_codeBlock->getConstant(bytecode.m_specialPointer));
-            unsigned relativeOffset = jumpTarget(bytecode.m_targetLabel);
-            Node* child = get(bytecode.m_value);
-            Node* condition = addToGraph(CompareEqPtr, OpInfo(frozenPointer), child);
-            addToGraph(Branch, OpInfo(branchData(m_currentIndex.offset() + relativeOffset, m_currentIndex.offset() + currentInstruction->size())), condition);
-            LAST_OPCODE(op_jeq_ptr);
-        }
-
         case op_jneq_ptr: {
             auto bytecode = currentInstruction->as<OpJneqPtr>();
             FrozenValue* frozenPointer = m_graph.freezeStrong(m_inlineStackTop->m_codeBlock->getConstant(bytecode.m_specialPointer));

Modified: trunk/Source/_javascript_Core/dfg/DFGCapabilities.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/dfg/DFGCapabilities.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/dfg/DFGCapabilities.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -240,7 +240,6 @@
     case op_get_from_arguments:
     case op_put_to_arguments:
     case op_get_argument:
-    case op_jeq_ptr:
     case op_jneq_ptr:
     case op_typeof:
     case op_to_number:

Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -86,10 +86,10 @@
 namespace JSC { namespace DFG {
 
 template<bool strict, bool direct>
-static ALWAYS_INLINE void putByVal(JSGlobalObject* globalObject, VM& vm, JSValue baseValue, uint32_t index, JSValue value)
+static inline void putByVal(JSGlobalObject* globalObject, VM& vm, JSValue baseValue, uint32_t index, JSValue value)
 {
     ASSERT(isIndex(index));
-    if constexpr (direct) {
+    if (direct) {
         RELEASE_ASSERT(baseValue.isObject());
         asObject(baseValue)->putDirectIndex(globalObject, index, value, 0, strict ? PutDirectIndexShouldThrow : PutDirectIndexShouldNotThrow);
         return;
@@ -128,7 +128,7 @@
     RETURN_IF_EXCEPTION(scope, void());
 
     PutPropertySlot slot(baseValue, strict);
-    if constexpr (direct) {
+    if (direct) {
         RELEASE_ASSERT(baseValue.isObject());
         JSObject* baseObject = asObject(baseValue);
         if (std::optional<uint32_t> index = parseIndex(propertyName)) {
@@ -148,7 +148,7 @@
 ALWAYS_INLINE static void putByValCellInternal(JSGlobalObject* globalObject, VM& vm, JSCell* base, PropertyName propertyName, JSValue value)
 {
     PutPropertySlot slot(base, strict);
-    if constexpr (direct) {
+    if (direct) {
         RELEASE_ASSERT(base->isObject());
         JSObject* baseObject = asObject(base);
         if (std::optional<uint32_t> index = parseIndex(propertyName)) {
@@ -2486,7 +2486,7 @@
     return JSValue::encode(result);
 }
 
-JSC_DEFINE_JIT_OPERATION(operationEnumeratorNextUpdatePropertyName, JSString*, (JSGlobalObject* globalObject, uint32_t index, int32_t modeNumber, JSPropertyNameEnumerator* enumerator))
+JSC_DEFINE_JIT_OPERATION(operationEnumeratorNextUpdatePropertyName, EncodedJSValue, (JSGlobalObject* globalObject, uint32_t index, int32_t modeNumber, JSPropertyNameEnumerator* enumerator))
 {
     VM& vm = globalObject->vm();
     CallFrame* callFrame = DECLARE_CALL_FRAME(vm);
@@ -2494,15 +2494,15 @@
 
     if (modeNumber == JSPropertyNameEnumerator::IndexedMode) {
         if (index < enumerator->indexedLength())
-            return jsString(vm, Identifier::from(vm, index).string());
-        return vm.smallStrings.sentinelString();
+            return JSValue::encode(jsString(vm, Identifier::from(vm, index).string()));
+        return JSValue::encode(jsNull());
     }
 
     JSString* result = enumerator->propertyNameAtIndex(index);
     if (!result)
-        return vm.smallStrings.sentinelString();
+        return JSValue::encode(jsNull());
 
-    return result;
+    return JSValue::encode(result);
 }
 
 JSC_DEFINE_JIT_OPERATION(operationEnumeratorRecoverNameAndGetByVal, EncodedJSValue, (JSGlobalObject* globalObject, JSCell* base, uint32_t index, JSPropertyNameEnumerator* enumerator))

Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.h (283095 => 283096)


--- trunk/Source/_javascript_Core/dfg/DFGOperations.h	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.h	2021-09-27 04:25:46 UTC (rev 283096)
@@ -108,7 +108,7 @@
 JSC_DECLARE_JIT_OPERATION(operationGetPropertyEnumerator, JSCell*, (JSGlobalObject*, EncodedJSValue));
 JSC_DECLARE_JIT_OPERATION(operationGetPropertyEnumeratorCell, JSCell*, (JSGlobalObject*, JSCell*));
 JSC_DECLARE_JIT_OPERATION(operationEnumeratorNextUpdateIndexAndMode, EncodedJSValue, (JSGlobalObject*, EncodedJSValue, uint32_t, int32_t, JSPropertyNameEnumerator*));
-JSC_DECLARE_JIT_OPERATION(operationEnumeratorNextUpdatePropertyName, JSString*, (JSGlobalObject*, uint32_t, int32_t, JSPropertyNameEnumerator*));
+JSC_DECLARE_JIT_OPERATION(operationEnumeratorNextUpdatePropertyName, EncodedJSValue, (JSGlobalObject*, uint32_t, int32_t, JSPropertyNameEnumerator*));
 JSC_DECLARE_JIT_OPERATION(operationEnumeratorInByVal, EncodedJSValue, (JSGlobalObject*, EncodedJSValue, EncodedJSValue, uint32_t, int32_t));
 JSC_DECLARE_JIT_OPERATION(operationEnumeratorHasOwnProperty, EncodedJSValue, (JSGlobalObject*, EncodedJSValue, EncodedJSValue, uint32_t, int32_t));
 JSC_DECLARE_JIT_OPERATION(operationEnumeratorRecoverNameAndGetByVal, EncodedJSValue, (JSGlobalObject*, JSCell*, uint32_t, JSPropertyNameEnumerator*));

Modified: trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -1233,7 +1233,7 @@
         }
 
         case EnumeratorNextUpdatePropertyName: {
-            setPrediction(SpecStringIdent);
+            setPrediction(SpecString | SpecOther);
             break;
         }
 

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -13646,12 +13646,12 @@
     SpeculateStrictInt32Operand indexOperand(this, node->child1());
     SpeculateStrictInt32Operand modeOperand(this, node->child2());
     SpeculateCellOperand enumeratorOperand(this, node->child3());
-    GPRTemporary result(this);
+    JSValueRegsTemporary resultTemp(this);
 
     GPRReg index = indexOperand.gpr();
     GPRReg mode = modeOperand.gpr();
     GPRReg enumerator = enumeratorOperand.gpr();
-    GPRReg resultGPR = result.gpr();
+    JSValueRegs resultRegs = resultTemp.regs();
 
     OptionSet seenModes = node->enumeratorMetadata();
 
@@ -13667,21 +13667,24 @@
 
         auto outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, index, MacroAssembler::Address(enumerator, JSPropertyNameEnumerator::endGenericPropertyIndexOffset()));
 
-        m_jit.loadPtr(MacroAssembler::Address(enumerator, JSPropertyNameEnumerator::cachedPropertyNamesVectorOffset()), resultGPR);
-        m_jit.loadPtr(MacroAssembler::BaseIndex(resultGPR, index, MacroAssembler::ScalePtr), resultGPR);
+        m_jit.loadPtr(MacroAssembler::Address(enumerator, JSPropertyNameEnumerator::cachedPropertyNamesVectorOffset()), resultRegs.payloadGPR());
+        m_jit.loadPtr(MacroAssembler::BaseIndex(resultRegs.payloadGPR(), index, MacroAssembler::ScalePtr), resultRegs.payloadGPR());
+#if USE(JSVALUE32_64)
+        m_jit.move(TrustedImm32(JSValue::CellTag), resultRegs.tagGPR());
+#endif
         doneCases.append(m_jit.jump());
 
         outOfBounds.link(&m_jit);
-        m_jit.move(TrustedImmPtr::weakPointer(m_graph, vm().smallStrings.sentinelString()), resultGPR);
+        m_jit.moveTrustedValue(jsNull(), resultRegs);
         doneCases.append(m_jit.jump());
         operationCall.link(&m_jit);
     }
 
-    callOperation(operationEnumeratorNextUpdatePropertyName, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), index, mode, enumerator);
+    callOperation(operationEnumeratorNextUpdatePropertyName, resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), index, mode, enumerator);
     m_jit.exceptionCheck();
 
     doneCases.link(&m_jit);
-    cellResult(resultGPR, node);
+    jsValueResult(resultRegs, node);
 }
 
 template<typename SlowPathFunctionType>

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -13526,7 +13526,7 @@
 
             {
                 m_out.appendTo(outOfBoundsBlock);
-                results.append(m_out.anchor(weakPointer(vm().smallStrings.sentinelString())));
+                results.append(m_out.anchor(m_out.constInt64(JSValue::encode(jsNull()))));
                 m_out.jump(continuation);
             }
 
@@ -13533,7 +13533,7 @@
             {
                 m_out.appendTo(loadPropertyNameBlock);
                 LValue namesVector = m_out.loadPtr(enumerator, m_heaps.JSPropertyNameEnumerator_cachedPropertyNamesVector);
-                results.append(m_out.anchor(m_out.loadPtr(m_out.baseIndex(m_heaps.WriteBarrierBuffer_bufferContents.atAnyIndex(), namesVector, m_out.zeroExt(index, Int64), ScalePtr))));
+                results.append(m_out.anchor(m_out.zeroExtPtr(m_out.loadPtr(m_out.baseIndex(m_heaps.WriteBarrierBuffer_bufferContents.atAnyIndex(), namesVector, m_out.zeroExt(index, Int64), ScalePtr)))));
                 m_out.jump(continuation);
             }
         }
@@ -13541,7 +13541,7 @@
         if (operationBlock)
             m_out.appendTo(operationBlock);
         // Note: We can't omit the operation because we have no guarantee that the mode will match what we profiled.
-        results.append(m_out.anchor(vmCall(pointerType(), operationEnumeratorNextUpdatePropertyName, weakPointer(globalObject), index, mode, enumerator)));
+        results.append(m_out.anchor(vmCall(Int64, operationEnumeratorNextUpdatePropertyName, weakPointer(globalObject), index, mode, enumerator)));
         if (continuation) {
             m_out.jump(continuation);
             m_out.appendTo(continuation);
@@ -13548,7 +13548,7 @@
         }
 
         ASSERT(results.size());
-        LValue result = m_out.phi(pointerType(), results);
+        LValue result = m_out.phi(Int64, results);
         setJSValue(result);
     }
 

Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/jit/JIT.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -387,7 +387,6 @@
         DEFINE_OP(op_jneq_null)
         DEFINE_OP(op_jundefined_or_null)
         DEFINE_OP(op_jnundefined_or_null)
-        DEFINE_OP(op_jeq_ptr)
         DEFINE_OP(op_jneq_ptr)
         DEFINE_OP(op_jless)
         DEFINE_OP(op_jlesseq)

Modified: trunk/Source/_javascript_Core/jit/JIT.h (283095 => 283096)


--- trunk/Source/_javascript_Core/jit/JIT.h	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/jit/JIT.h	2021-09-27 04:25:46 UTC (rev 283096)
@@ -461,7 +461,6 @@
         void emit_op_jneq_null(const Instruction*);
         void emit_op_jundefined_or_null(const Instruction*);
         void emit_op_jnundefined_or_null(const Instruction*);
-        void emit_op_jeq_ptr(const Instruction*);
         void emit_op_jneq_ptr(const Instruction*);
         void emit_op_jless(const Instruction*);
         void emit_op_jlesseq(const Instruction*);

Modified: trunk/Source/_javascript_Core/jit/JITOpcodes.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/jit/JITOpcodes.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -579,18 +579,6 @@
     addJump(branch64(NotEqual, regT0, TrustedImm64(JSValue::encode(jsNull()))), target);
 }
 
-void JIT::emit_op_jeq_ptr(const Instruction* currentInstruction)
-{
-    auto bytecode = currentInstruction->as<OpJeqPtr>();
-    VirtualRegister src = ""
-    JSValue specialPointer = getConstantOperand(bytecode.m_specialPointer);
-    ASSERT(specialPointer.isCell());
-    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
-
-    emitGetVirtualRegister(src, regT0);
-    addJump(branchPtr(Equal, regT0, TrustedImmPtr(specialPointer.asCell())), target);
-}
-
 void JIT::emit_op_jneq_ptr(const Instruction* currentInstruction)
 {
     auto bytecode = currentInstruction->as<OpJneqPtr>();

Modified: trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -501,21 +501,6 @@
     addJump(branchIfNotNull(regT0), target);
 }
 
-void JIT::emit_op_jeq_ptr(const Instruction* currentInstruction)
-{
-    auto bytecode = currentInstruction->as<OpJeqPtr>();
-    auto& metadata = bytecode.metadata(m_profiledCodeBlock);
-    VirtualRegister src = ""
-    JSValue specialPointer = getConstantOperand(bytecode.m_specialPointer);
-    ASSERT(specialPointer.isCell());
-    unsigned target = jumpTarget(currentInstruction, bytecode.m_targetLabel);
-
-    emitLoad(src, regT1, regT0);
-    Jump notCell = branchIfNotCell(regT1);
-    addJump(branchPtr(Equal, regT0, TrustedImmPtr(specialPointer.asCell())), target);
-    notCell.link(this);
-}
-
 void JIT::emit_op_jneq_ptr(const Instruction* currentInstruction)
 {
     auto bytecode = currentInstruction->as<OpJneqPtr>();

Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -2866,7 +2866,7 @@
         done.append(jump());
 
         outOfBounds.link(this);
-        storeTrustedValue(vm().smallStrings.sentinelString(), addressFor(propertyName));
+        storeTrustedValue(jsNull(), addressFor(propertyName));
         done.append(jump());
     }
 

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (283095 => 283096)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2021-09-27 04:25:46 UTC (rev 283096)
@@ -1944,20 +1944,6 @@
 undefinedOrNullJumpOp(jnundefined_or_null, OpJnundefinedOrNull,
     macro (value, target) bineq value, NullTag, target end)
 
-llintOpWithReturn(op_jeq_ptr, OpJeqPtr, macro (size, get, dispatch, return)
-    get(m_value, t0)
-    get(m_specialPointer, t1)
-    loadConstant(size, t1, t3, t2)
-    bineq TagOffset[cfr, t0, 8], CellTag, .opJeqPtrFallThrough
-    bpneq PayloadOffset[cfr, t0, 8], t2, .opJeqPtrFallThrough
-.opJeqPtrBranch:
-    get(m_targetLabel, t0)
-    jumpImpl(dispatchIndirect, t0)
-.opJeqPtrFallThrough:
-    dispatch()
-end)
-
-
 llintOpWithMetadata(op_jneq_ptr, OpJneqPtr, macro (size, get, dispatch, metadata, return)
     get(m_value, t0)
     get(m_specialPointer, t1)

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (283095 => 283096)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2021-09-27 04:25:46 UTC (rev 283096)
@@ -2072,19 +2072,6 @@
 undefinedOrNullJumpOp(jnundefined_or_null, OpJnundefinedOrNull,
     macro (value, target) bqneq value, ValueNull, target end)
 
-llintOpWithReturn(op_jeq_ptr, OpJeqPtr, macro (size, get, dispatch, return)
-    get(m_value, t0)
-    get(m_specialPointer, t1)
-    loadConstant(size, t1, t2)
-    bpeq t2, [cfr, t0, 8], .opJeqPtrTarget
-    dispatch()
-
-.opJeqPtrTarget:
-    get(m_targetLabel, t0)
-    jumpImpl(dispatchIndirect, t0)
-end)
-
-
 llintOpWithMetadata(op_jneq_ptr, OpJneqPtr, macro (size, get, dispatch, metadata, return)
     get(m_value, t0)
     get(m_specialPointer, t1)

Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -1001,7 +1001,7 @@
     metadata.m_enumeratorMetadata |= static_cast<uint8_t>(mode);
     modeRegister = jsNumber(static_cast<uint8_t>(mode));
     indexRegister = jsNumber(index);
-    nameRegister = name ? name : vm.smallStrings.sentinelString();
+    nameRegister = name ? name : jsNull();
     END();
 }
 

Modified: trunk/Source/_javascript_Core/runtime/SmallStrings.cpp (283095 => 283096)


--- trunk/Source/_javascript_Core/runtime/SmallStrings.cpp	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/runtime/SmallStrings.cpp	2021-09-27 04:25:46 UTC (rev 283096)
@@ -62,7 +62,6 @@
     initialize(&vm, m_notEqualString, "not-equal");
     initialize(&vm, m_timedOutString, "timed-out");
     initialize(&vm, m_okString, "ok");
-    initialize(&vm, m_sentinelString, "$");
 
     setIsInitialized(true);
 }
@@ -84,7 +83,6 @@
     visitor.appendUnbarriered(m_notEqualString);
     visitor.appendUnbarriered(m_timedOutString);
     visitor.appendUnbarriered(m_okString);
-    visitor.appendUnbarriered(m_sentinelString);
 }
 
 template void SmallStrings::visitStrongReferences(AbstractSlotVisitor&);

Modified: trunk/Source/_javascript_Core/runtime/SmallStrings.h (283095 => 283096)


--- trunk/Source/_javascript_Core/runtime/SmallStrings.h	2021-09-27 04:14:23 UTC (rev 283095)
+++ trunk/Source/_javascript_Core/runtime/SmallStrings.h	2021-09-27 04:25:46 UTC (rev 283096)
@@ -119,7 +119,6 @@
     JSString* notEqualString() const { return m_notEqualString; }
     JSString* timedOutString() const { return m_timedOutString; }
     JSString* okString() const { return m_okString; }
-    JSString* sentinelString() const { return m_sentinelString; }
 
     bool needsToBeVisited(CollectionScope scope) const
     {
@@ -144,7 +143,6 @@
     JSString* m_notEqualString { nullptr };
     JSString* m_timedOutString { nullptr };
     JSString* m_okString { nullptr };
-    JSString* m_sentinelString { nullptr };
     JSString* m_singleCharacterStrings[singleCharacterStringCount] { nullptr };
     bool m_needsToBeVisited { true };
     bool m_isInitialized { false };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to