Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (259714 => 259715)
--- trunk/Source/_javascript_Core/ChangeLog 2020-04-08 14:20:05 UTC (rev 259714)
+++ trunk/Source/_javascript_Core/ChangeLog 2020-04-08 14:32:12 UTC (rev 259715)
@@ -1,3 +1,27 @@
+2020-04-08 Guillaume Emont <[email protected]>
+
+ [JSC][32-bits] Build failure after r259676 (Not using strict mode within ClassDeclaration statement)
+ https://bugs.webkit.org/show_bug.cgi?id=210176
+
+ Reviewed by Aakash Jain.
+
+ Fixed 32-bit paths to match changes in r259676.
+
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::emitCall):
+ (JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
+ (JSC::DFG::SpeculativeJIT::compile):
+ (JSC::DFG::SpeculativeJIT::compileDeleteById):
+ (JSC::DFG::SpeculativeJIT::compileDeleteByVal):
+ * jit/JITCall32_64.cpp:
+ (JSC::JIT::compileCallEval):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::emit_op_del_by_id):
+ (JSC::JIT::emit_op_del_by_val):
+ (JSC::JIT::emitPutByValWithCachedId):
+ (JSC::JIT::emitSlow_op_put_by_val):
+ (JSC::JIT::emit_op_put_by_id):
+
2020-04-08 Tim Horton <[email protected]>
Rearrange and simplify some JSC feature flags
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (259714 => 259715)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2020-04-08 14:20:05 UTC (rev 259714)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2020-04-08 14:32:12 UTC (rev 259715)
@@ -808,7 +808,8 @@
unsigned requiredBytes = sizeof(CallerFrameAndPC) + sizeof(CallFrame*) * 2;
requiredBytes = WTF::roundUpToMultipleOf(stackAlignmentBytes(), requiredBytes);
m_jit.subPtr(TrustedImm32(requiredBytes), JITCompiler::stackPointerRegister);
- m_jit.setupArguments<decltype(operationCallEval)>(TrustedImmPtr::weakPointer(m_graph, globalObject), GPRInfo::regT0);
+ m_jit.move(TrustedImm32(node->ecmaMode().value()), GPRInfo::regT1);
+ m_jit.setupArguments<decltype(operationCallEval)>(TrustedImmPtr::weakPointer(m_graph, globalObject), GPRInfo::regT0, GPRInfo::regT1);
prepareForExternalCall();
m_jit.appendCall(operationCallEval);
m_jit.exceptionCheck();
@@ -1784,12 +1785,12 @@
if (node->op() == PutByValDirect) {
addSlowPathGenerator(slowPathCall(
slowCase, this,
- m_jit.isStrictModeFor(node->origin.semantic) ? operationPutByValDirectBeyondArrayBoundsStrict : operationPutByValDirectBeyondArrayBoundsNonStrict,
+ node->ecmaMode().isStrict() ? operationPutByValDirectBeyondArrayBoundsStrict : operationPutByValDirectBeyondArrayBoundsNonStrict,
NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseReg, propertyReg, JSValueRegs(valueTag, valuePayloadReg)));
} else {
addSlowPathGenerator(slowPathCall(
slowCase, this,
- m_jit.isStrictModeFor(node->origin.semantic) ? operationPutByValBeyondArrayBoundsStrict : operationPutByValBeyondArrayBoundsNonStrict,
+ node->ecmaMode().isStrict() ? operationPutByValBeyondArrayBoundsStrict : operationPutByValBeyondArrayBoundsNonStrict,
NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseReg, propertyReg, JSValueRegs(valueTag, valuePayloadReg)));
}
}
@@ -2629,9 +2630,9 @@
flushRegisters();
if (node->op() == PutByValDirect)
- callOperation(m_jit.isStrictModeFor(node->origin.semantic) ? operationPutByValDirectCellStrict : operationPutByValDirectCellNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, propertyRegs, valueRegs);
+ callOperation(node->ecmaMode().isStrict() ? operationPutByValDirectCellStrict : operationPutByValDirectCellNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, propertyRegs, valueRegs);
else
- callOperation(m_jit.isStrictModeFor(node->origin.semantic) ? operationPutByValCellStrict : operationPutByValCellNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, propertyRegs, valueRegs);
+ callOperation(node->ecmaMode().isStrict() ? operationPutByValCellStrict : operationPutByValCellNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, propertyRegs, valueRegs);
m_jit.exceptionCheck();
noResult(node);
@@ -2742,12 +2743,12 @@
if (node->op() == PutByValDirect) {
addSlowPathGenerator(slowPathCall(
slowCases, this,
- m_jit.isStrictModeFor(node->origin.semantic) ? operationPutByValDirectBeyondArrayBoundsStrict : operationPutByValDirectBeyondArrayBoundsNonStrict,
+ node->ecmaMode().isStrict() ? operationPutByValDirectBeyondArrayBoundsStrict : operationPutByValDirectBeyondArrayBoundsNonStrict,
NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseReg, propertyReg, JSValueRegs(valueTagReg, valuePayloadReg)));
} else {
addSlowPathGenerator(slowPathCall(
slowCases, this,
- m_jit.isStrictModeFor(node->origin.semantic) ? operationPutByValBeyondArrayBoundsStrict : operationPutByValBeyondArrayBoundsNonStrict,
+ node->ecmaMode().isStrict() ? operationPutByValBeyondArrayBoundsStrict : operationPutByValBeyondArrayBoundsNonStrict,
NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseReg, propertyReg, JSValueRegs(valueTagReg, valuePayloadReg)));
}
}
@@ -2782,7 +2783,7 @@
JSValueRegs valueRegs = value.jsValueRegs();
flushRegisters();
- callOperation(m_jit.isStrictModeFor(node->origin.semantic) ? operationPutByValWithThisStrict : operationPutByValWithThis,
+ callOperation(node->ecmaMode().isStrict() ? operationPutByValWithThisStrict : operationPutByValWithThis,
TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseRegs, thisRegs, propertyRegs, valueRegs);
m_jit.exceptionCheck();
@@ -4293,7 +4294,7 @@
value.use();
flushRegisters();
- callOperation(operationDeleteByIdGeneric, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), nullptr, valueRegs, node->cacheableIdentifier().rawBits());
+ callOperation(operationDeleteByIdGeneric, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), nullptr, valueRegs, node->cacheableIdentifier().rawBits(), TrustedImm32(node->ecmaMode().value()));
m_jit.exceptionCheck();
unblessedBooleanResult(resultGPR, node, UseChildrenCalledExplicitly);
@@ -4313,7 +4314,7 @@
key.use();
flushRegisters();
- callOperation(operationDeleteByValGeneric, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), nullptr, baseRegs, keyRegs);
+ callOperation(operationDeleteByValGeneric, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), nullptr, baseRegs, keyRegs, TrustedImm32(node->ecmaMode().value()));
m_jit.exceptionCheck();
unblessedBooleanResult(resultGPR, node, UseChildrenCalledExplicitly);
Modified: trunk/Source/_javascript_Core/jit/JITCall32_64.cpp (259714 => 259715)
--- trunk/Source/_javascript_Core/jit/JITCall32_64.cpp 2020-04-08 14:20:05 UTC (rev 259714)
+++ trunk/Source/_javascript_Core/jit/JITCall32_64.cpp 2020-04-08 14:32:12 UTC (rev 259715)
@@ -229,7 +229,8 @@
addPtr(TrustedImm32(stackPointerOffsetFor(m_codeBlock) * sizeof(Register)), callFrameRegister, stackPointerRegister);
- callOperation(operationCallEval, m_codeBlock->globalObject(), regT1);
+ move(TrustedImm32(bytecode.m_ecmaMode.value()), regT2);
+ callOperation(operationCallEval, m_codeBlock->globalObject(), regT1, regT2);
addSlowCase(branchIfEmpty(regT1));
Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (259714 => 259715)
--- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2020-04-08 14:20:05 UTC (rev 259714)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2020-04-08 14:32:12 UTC (rev 259715)
@@ -124,7 +124,7 @@
const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property));
emitLoad(base, regT1, regT0);
- callOperation(operationDeleteByIdGeneric, m_codeBlock->globalObject(), nullptr, JSValueRegs(regT1, regT0), CacheableIdentifier::createFromIdentifierOwnedByCodeBlock(m_codeBlock, *ident).rawBits());
+ callOperation(operationDeleteByIdGeneric, m_codeBlock->globalObject(), nullptr, JSValueRegs(regT1, regT0), CacheableIdentifier::createFromIdentifierOwnedByCodeBlock(m_codeBlock, *ident).rawBits(), TrustedImm32(bytecode.m_ecmaMode.value()));
boxBoolean(regT0, JSValueRegs(regT1, regT0));
emitPutVirtualRegister(dst, JSValueRegs(regT1, regT0));
}
@@ -136,7 +136,7 @@
VirtualRegister base = bytecode.m_base;
VirtualRegister property = bytecode.m_property;
emitLoad2(base, regT1, regT0, property, regT3, regT2);
- callOperation(operationDeleteByValGeneric, m_codeBlock->globalObject(), nullptr, JSValueRegs(regT1, regT0), JSValueRegs(regT3, regT2));
+ callOperation(operationDeleteByValGeneric, m_codeBlock->globalObject(), nullptr, JSValueRegs(regT1, regT0), JSValueRegs(regT3, regT2), TrustedImm32(bytecode.m_ecmaMode.value()));
boxBoolean(regT0, JSValueRegs(regT1, regT0));
emitPutVirtualRegister(dst, JSValueRegs(regT1, regT0));
}
@@ -378,7 +378,7 @@
JITPutByIdGenerator gen(
m_codeBlock, CodeOrigin(m_bytecodeIndex), CallSiteIndex(m_bytecodeIndex), RegisterSet::stubUnavailableRegisters(), propertyName,
- JSValueRegs::payloadOnly(regT0), JSValueRegs(regT3, regT2), regT1, m_codeBlock->ecmaMode(), putKind);
+ JSValueRegs::payloadOnly(regT0), JSValueRegs(regT3, regT2), regT1, bytecode.m_ecmaMode, putKind);
gen.generateFastPath(*this);
doneCases.append(jump());
@@ -401,11 +401,13 @@
VirtualRegister base;
VirtualRegister property;
VirtualRegister value;
+ ECMAMode ecmaMode = ECMAMode::strict();
auto load = [&](auto bytecode) {
base = bytecode.m_base;
property = bytecode.m_property;
value = bytecode.m_value;
+ ecmaMode = bytecode.m_ecmaMode;
};
if (isDirect)
@@ -423,7 +425,7 @@
emitLoad(base, regT2, regT1);
emitLoad(property, regT3, regT0);
emitLoad(value, regT5, regT4);
- Call call = callOperation(isDirect ? operationDirectPutByValOptimize : operationPutByValOptimize, m_codeBlock->globalObject(), JSValueRegs(regT2, regT1), JSValueRegs(regT3, regT0), JSValueRegs(regT5, regT4), byValInfo, bytecode.m_isStrictMode);
+ Call call = callOperation(isDirect ? operationDirectPutByValOptimize : operationPutByValOptimize, m_codeBlock->globalObject(), JSValueRegs(regT2, regT1), JSValueRegs(regT3, regT0), JSValueRegs(regT5, regT4), byValInfo, TrustedImm32(ecmaMode.value()));
m_byValCompilationInfo[m_byValInstructionIndex].slowPathTarget = slowPath;
m_byValCompilationInfo[m_byValInstructionIndex].returnAddress = call;
@@ -603,7 +605,7 @@
auto bytecode = currentInstruction->as<OpPutById>();
VirtualRegister base = bytecode.m_base;
VirtualRegister value = bytecode.m_value;
- bool direct = !!(bytecode.m_flags & PutByIdIsDirect);
+ bool direct = bytecode.m_flags.isDirect();
const Identifier* ident = &(m_codeBlock->identifier(bytecode.m_property));
emitLoad2(base, regT1, regT0, value, regT3, regT2);
@@ -614,7 +616,7 @@
m_codeBlock, CodeOrigin(m_bytecodeIndex), CallSiteIndex(m_bytecodeIndex), RegisterSet::stubUnavailableRegisters(),
CacheableIdentifier::createFromIdentifierOwnedByCodeBlock(m_codeBlock, *ident),
JSValueRegs::payloadOnly(regT0), JSValueRegs(regT3, regT2),
- regT1, m_codeBlock->ecmaMode(), direct ? Direct : NotDirect);
+ regT1, bytecode.m_flags.ecmaMode(), direct ? Direct : NotDirect);
gen.generateFastPath(*this);
addSlowCase(gen.slowPathJump());