Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (249522 => 249523)
--- trunk/Source/_javascript_Core/ChangeLog 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-09-05 05:51:56 UTC (rev 249523)
@@ -1,5 +1,45 @@
2019-09-04 Yusuke Suzuki <[email protected]>
+ Unreviewed, partial roll out r249372 due to JetStream2/Basic ~10% regression
+ https://bugs.webkit.org/show_bug.cgi?id=201373
+
+ * bytecode/BytecodeList.rb:
+ * bytecode/BytecodeUseDef.h:
+ (JSC::computeUsesForBytecodeOffset):
+ (JSC::computeDefsForBytecodeOffset):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::emitLoopHint):
+ (JSC::BytecodeGenerator::emitCheckTraps):
+ * bytecompiler/BytecodeGenerator.h:
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ * dfg/DFGCapabilities.cpp:
+ (JSC::DFG::capabilityLevel):
+ * jit/JIT.cpp:
+ (JSC::JIT::emitEnterOptimizationCheck):
+ (JSC::JIT::privateCompileMainPass):
+ (JSC::JIT::privateCompileSlowCases):
+ * jit/JIT.h:
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_enter):
+ (JSC::JIT::emit_op_loop_hint):
+ (JSC::JIT::emitSlow_op_loop_hint):
+ (JSC::JIT::emit_op_check_traps):
+ (JSC::JIT::emitSlow_op_check_traps):
+ (JSC::JIT::emitSlow_op_enter): Deleted.
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_enter):
+ * llint/LowLevelInterpreter.asm:
+ * llint/LowLevelInterpreter32_64.asm:
+ * llint/LowLevelInterpreter64.asm:
+ * runtime/CommonSlowPaths.cpp:
+ (JSC::SLOW_PATH_DECL):
+ * runtime/CommonSlowPaths.h:
+
+2019-09-04 Yusuke Suzuki <[email protected]>
+
Unreviewed, rebaseline builtin generator test results
https://bugs.webkit.org/show_bug.cgi?id=200898
Modified: trunk/Source/_javascript_Core/bytecode/BytecodeList.rb (249522 => 249523)
--- trunk/Source/_javascript_Core/bytecode/BytecodeList.rb 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeList.rb 2019-09-05 05:51:56 UTC (rev 249523)
@@ -1109,6 +1109,8 @@
argument: VirtualRegister,
}
+op :check_traps
+
op :log_shadow_chicken_prologue,
args: {
scope: VirtualRegister,
Modified: trunk/Source/_javascript_Core/bytecode/BytecodeUseDef.h (249522 => 249523)
--- trunk/Source/_javascript_Core/bytecode/BytecodeUseDef.h 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/bytecode/BytecodeUseDef.h 2019-09-05 05:51:56 UTC (rev 249523)
@@ -87,6 +87,7 @@
case op_create_direct_arguments:
case op_create_cloned_arguments:
case op_get_rest_length:
+ case op_check_traps:
case op_get_argument:
case op_nop:
case op_unreachable:
@@ -351,6 +352,7 @@
case op_profile_control_flow:
case op_put_to_arguments:
case op_set_function_name:
+ case op_check_traps:
case op_log_shadow_chicken_prologue:
case op_log_shadow_chicken_tail:
case op_yield:
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (249522 => 249523)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2019-09-05 05:51:56 UTC (rev 249523)
@@ -361,6 +361,8 @@
allocateAndEmitScope();
+ emitCheckTraps();
+
const FunctionStack& functionStack = programNode->functionStack();
for (auto* function : functionStack)
@@ -482,6 +484,8 @@
allocateAndEmitScope();
+ emitCheckTraps();
+
if (functionNameIsInScope(functionNode->ident(), functionNode->functionMode())) {
ASSERT(parseMode != SourceParseMode::GeneratorBodyMode);
ASSERT(!isAsyncFunctionBodyParseMode(parseMode));
@@ -893,6 +897,8 @@
allocateAndEmitScope();
+ emitCheckTraps();
+
for (FunctionMetadataNode* function : evalNode->functionStack()) {
m_codeBlock->addFunctionDecl(makeFunction(function));
m_functionsToInitialize.append(std::make_pair(function, TopLevelFunctionVariable));
@@ -977,6 +983,8 @@
allocateAndEmitScope();
+ emitCheckTraps();
+
m_calleeRegister.setIndex(CallFrameSlot::callee);
m_codeBlock->setNumParameters(1); // Allocate space for "this"
@@ -1404,6 +1412,7 @@
void BytecodeGenerator::emitLoopHint()
{
OpLoopHint::emit(this);
+ emitCheckTraps();
}
void BytecodeGenerator::emitJump(Label& target)
@@ -1411,6 +1420,11 @@
OpJmp::emit(this, target.bind(this));
}
+void BytecodeGenerator::emitCheckTraps()
+{
+ OpCheckTraps::emit(this);
+}
+
void ALWAYS_INLINE BytecodeGenerator::rewind()
{
ASSERT(m_lastInstruction.isValid());
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h (249522 => 249523)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h 2019-09-05 05:51:56 UTC (rev 249523)
@@ -852,6 +852,7 @@
bool fuseTestAndJmp(RegisterID* cond, Label& target);
void emitEnter();
+ void emitCheckTraps();
RegisterID* emitHasIndexedProperty(RegisterID* dst, RegisterID* base, RegisterID* propertyName);
RegisterID* emitHasStructureProperty(RegisterID* dst, RegisterID* base, RegisterID* propertyName, RegisterID* enumerator);
Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (249522 => 249523)
--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2019-09-05 05:51:56 UTC (rev 249523)
@@ -1444,16 +1444,10 @@
for (int i = 0; i < stackEntry->m_codeBlock->numVars(); ++i)
setDirect(stackEntry->remapOperand(virtualRegisterForLocal(i)), undefined, NormalSet);
+ // We want to emit the SetLocals with an exit origin that points to the place we are jumping to.
unsigned oldIndex = m_currentIndex;
auto oldStackTop = m_inlineStackTop;
-
- // First, we emit check-traps operation pointing to bc#0 as exit.
m_inlineStackTop = stackEntry;
- m_currentIndex = 0;
- m_exitOK = true;
- addToGraph(Options::usePollingTraps() ? CheckTraps : InvalidationPoint);
-
- // Then, we want to emit the SetLocals with an exit origin that points to the place we are jumping to.
m_currentIndex = opcodeLengths[op_enter];
m_exitOK = true;
processSetLocalQueue();
@@ -4788,11 +4782,11 @@
// === Function entry opcodes ===
case op_enter: {
- addToGraph(Options::usePollingTraps() ? CheckTraps : InvalidationPoint);
Node* undefined = addToGraph(JSConstant, OpInfo(m_constantUndefined));
// Initialize all locals to undefined.
for (int i = 0; i < m_inlineStackTop->m_codeBlock->numVars(); ++i)
set(virtualRegisterForLocal(i), undefined, ImmediateNakedSet);
+
NEXT_OPCODE(op_enter);
}
@@ -6727,10 +6721,14 @@
m_currentBlock->isOSRTarget = true;
addToGraph(LoopHint);
- addToGraph(Options::usePollingTraps() ? CheckTraps : InvalidationPoint);
NEXT_OPCODE(op_loop_hint);
}
+ case op_check_traps: {
+ addToGraph(Options::usePollingTraps() ? CheckTraps : InvalidationPoint);
+ NEXT_OPCODE(op_check_traps);
+ }
+
case op_nop: {
addToGraph(Check); // We add a nop here so that basic block linking doesn't break.
NEXT_OPCODE(op_nop);
Modified: trunk/Source/_javascript_Core/dfg/DFGCapabilities.cpp (249522 => 249523)
--- trunk/Source/_javascript_Core/dfg/DFGCapabilities.cpp 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/dfg/DFGCapabilities.cpp 2019-09-05 05:51:56 UTC (rev 249523)
@@ -206,6 +206,7 @@
case op_jbelow:
case op_jbeloweq:
case op_loop_hint:
+ case op_check_traps:
case op_nop:
case op_ret:
case op_end:
Modified: trunk/Source/_javascript_Core/jit/JIT.cpp (249522 => 249523)
--- trunk/Source/_javascript_Core/jit/JIT.cpp 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/jit/JIT.cpp 2019-09-05 05:51:56 UTC (rev 249523)
@@ -91,6 +91,26 @@
{
}
+#if ENABLE(DFG_JIT)
+void JIT::emitEnterOptimizationCheck()
+{
+ if (!canBeOptimized())
+ return;
+
+ JumpList skipOptimize;
+
+ skipOptimize.append(branchAdd32(Signed, TrustedImm32(Options::executionCounterIncrementForEntry()), AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())));
+ ASSERT(!m_bytecodeOffset);
+
+ copyCalleeSavesFromFrameOrRegisterToEntryFrameCalleeSavesBuffer(vm().topEntryFrame);
+
+ callOperation(operationOptimize, m_bytecodeOffset);
+ skipOptimize.append(branchTestPtr(Zero, returnValueGPR));
+ farJump(returnValueGPR, GPRInfo::callFrameRegister);
+ skipOptimize.link(this);
+}
+#endif
+
void JIT::emitNotifyWrite(WatchpointSet* set)
{
if (!set || set->state() == IsInvalidated) {
@@ -365,6 +385,7 @@
DEFINE_OP(op_jbeloweq)
DEFINE_OP(op_jtrue)
DEFINE_OP(op_loop_hint)
+ DEFINE_OP(op_check_traps)
DEFINE_OP(op_nop)
DEFINE_OP(op_super_sampler_begin)
DEFINE_OP(op_super_sampler_end)
@@ -532,7 +553,7 @@
DEFINE_SLOWCASE_OP(op_jstricteq)
DEFINE_SLOWCASE_OP(op_jnstricteq)
DEFINE_SLOWCASE_OP(op_loop_hint)
- DEFINE_SLOWCASE_OP(op_enter)
+ DEFINE_SLOWCASE_OP(op_check_traps)
DEFINE_SLOWCASE_OP(op_mod)
DEFINE_SLOWCASE_OP(op_mul)
DEFINE_SLOWCASE_OP(op_negate)
Modified: trunk/Source/_javascript_Core/jit/JIT.h (249522 => 249523)
--- trunk/Source/_javascript_Core/jit/JIT.h 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/jit/JIT.h 2019-09-05 05:51:56 UTC (rev 249523)
@@ -575,6 +575,7 @@
void emit_op_jbeloweq(const Instruction*);
void emit_op_jtrue(const Instruction*);
void emit_op_loop_hint(const Instruction*);
+ void emit_op_check_traps(const Instruction*);
void emit_op_nop(const Instruction*);
void emit_op_super_sampler_begin(const Instruction*);
void emit_op_super_sampler_end(const Instruction*);
@@ -674,7 +675,7 @@
void emitSlow_op_jnstricteq(const Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_jtrue(const Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_loop_hint(const Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_enter(const Instruction*, Vector<SlowCaseEntry>::iterator&);
+ void emitSlow_op_check_traps(const Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_mod(const Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_mul(const Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_negate(const Instruction*, Vector<SlowCaseEntry>::iterator&);
@@ -869,6 +870,12 @@
int jumpTarget(const Instruction*, int target);
+#if ENABLE(DFG_JIT)
+ void emitEnterOptimizationCheck();
+#else
+ void emitEnterOptimizationCheck() { }
+#endif
+
#ifndef NDEBUG
void printBytecodeOperandTypes(int src1, int src2);
#endif
Modified: trunk/Source/_javascript_Core/jit/JITOpcodes.cpp (249522 => 249523)
--- trunk/Source/_javascript_Core/jit/JITOpcodes.cpp 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes.cpp 2019-09-05 05:51:56 UTC (rev 249523)
@@ -875,6 +875,20 @@
emitPutVirtualRegister(dst);
}
+void JIT::emit_op_enter(const Instruction*)
+{
+ // Even though CTI doesn't use them, we initialize our constant
+ // registers to zap stale pointers, to avoid unnecessarily prolonging
+ // object lifetime and increasing GC pressure.
+ size_t count = m_codeBlock->numVars();
+ for (size_t j = CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters(); j < count; ++j)
+ emitInitRegister(virtualRegisterForLocal(j).offset());
+
+ emitWriteBarrier(m_codeBlock);
+
+ emitEnterOptimizationCheck();
+}
+
void JIT::emit_op_get_scope(const Instruction* currentInstruction)
{
auto bytecode = currentInstruction->as<OpGetScope>();
@@ -1006,31 +1020,24 @@
void JIT::emit_op_loop_hint(const Instruction*)
{
- // Check traps.
- addSlowCase(branchTest8(NonZero, AbsoluteAddress(m_vm->needTrapHandlingAddress())));
-#if ENABLE(DFG_JIT)
- // Emit the JIT optimization check:
+ // Emit the JIT optimization check:
if (canBeOptimized()) {
addSlowCase(branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForLoop()),
AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())));
}
-#endif
}
void JIT::emitSlow_op_loop_hint(const Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
- linkSlowCase(iter);
- callOperation(operationHandleTraps);
#if ENABLE(DFG_JIT)
// Emit the slow path for the JIT optimization check:
if (canBeOptimized()) {
- emitJumpSlowToHot(branchAdd32(Signed, TrustedImm32(Options::executionCounterIncrementForLoop()), AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())), currentInstruction->size());
- linkSlowCase(iter);
+ linkAllSlowCases(iter);
copyCalleeSavesFromFrameOrRegisterToEntryFrameCalleeSavesBuffer(vm().topEntryFrame);
callOperation(operationOptimize, m_bytecodeOffset);
- emitJumpSlowToHot(branchTestPtr(Zero, returnValueGPR), currentInstruction->size());
+ Jump noOptimizedEntry = branchTestPtr(Zero, returnValueGPR);
if (!ASSERT_DISABLED) {
Jump ok = branchPtr(MacroAssembler::Above, returnValueGPR, TrustedImmPtr(bitwise_cast<void*>(static_cast<intptr_t>(1000))));
abortWithReason(JITUnreasonableLoopHintJumpTarget);
@@ -1037,12 +1044,21 @@
ok.link(this);
}
farJump(returnValueGPR, GPRInfo::callFrameRegister);
+ noOptimizedEntry.link(this);
+
+ emitJumpSlowToHot(jump(), currentInstruction->size());
}
#else
UNUSED_PARAM(currentInstruction);
+ UNUSED_PARAM(iter);
#endif
}
+void JIT::emit_op_check_traps(const Instruction*)
+{
+ addSlowCase(branchTest8(NonZero, AbsoluteAddress(m_vm->needTrapHandlingAddress())));
+}
+
void JIT::emit_op_nop(const Instruction*)
{
}
@@ -1057,46 +1073,11 @@
sub32(TrustedImm32(1), AbsoluteAddress(bitwise_cast<void*>(&g_superSamplerCount)));
}
-void JIT::emit_op_enter(const Instruction*)
+void JIT::emitSlow_op_check_traps(const Instruction*, Vector<SlowCaseEntry>::iterator& iter)
{
- // Even though JIT doesn't use them, we initialize our constant
- // registers to zap stale pointers, to avoid unnecessarily prolonging
- // object lifetime and increasing GC pressure.
- size_t count = m_codeBlock->numVars();
- for (size_t i = CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters(); i < count; ++i)
- emitInitRegister(virtualRegisterForLocal(i).offset());
+ linkAllSlowCases(iter);
- emitWriteBarrier(m_codeBlock);
-
- // Check traps.
- addSlowCase(branchTest8(NonZero, AbsoluteAddress(m_vm->needTrapHandlingAddress())));
-
-#if ENABLE(DFG_JIT)
- if (canBeOptimized())
- addSlowCase(branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForEntry()), AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())));
-#endif
-}
-
-void JIT::emitSlow_op_enter(const Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- linkSlowCase(iter);
callOperation(operationHandleTraps);
-#if ENABLE(DFG_JIT)
- if (canBeOptimized()) {
- emitJumpSlowToHot(branchAdd32(Signed, TrustedImm32(Options::executionCounterIncrementForEntry()), AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())), currentInstruction->size());
- linkSlowCase(iter);
-
- ASSERT(!m_bytecodeOffset);
-
- copyCalleeSavesFromFrameOrRegisterToEntryFrameCalleeSavesBuffer(vm().topEntryFrame);
-
- callOperation(operationOptimize, m_bytecodeOffset);
- emitJumpSlowToHot(branchTestPtr(Zero, returnValueGPR), currentInstruction->size());
- farJump(returnValueGPR, GPRInfo::callFrameRegister);
- }
-#else
- UNUSED_PARAM(currentInstruction);
-#endif
}
void JIT::emit_op_new_regexp(const Instruction* currentInstruction)
Modified: trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp (249522 => 249523)
--- trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp 2019-09-05 05:51:56 UTC (rev 249523)
@@ -1002,6 +1002,21 @@
noDebuggerRequests.link(this);
}
+
+void JIT::emit_op_enter(const Instruction* currentInstruction)
+{
+ emitEnterOptimizationCheck();
+
+ // Even though JIT code doesn't use them, we initialize our constant
+ // registers to zap stale pointers, to avoid unnecessarily prolonging
+ // object lifetime and increasing GC pressure.
+ for (int i = CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters(); i < m_codeBlock->numVars(); ++i)
+ emitStore(virtualRegisterForLocal(i).offset(), jsUndefined());
+
+ JITSlowPathCall slowPathCall(this, currentInstruction, slow_path_enter);
+ slowPathCall.call();
+}
+
void JIT::emit_op_get_scope(const Instruction* currentInstruction)
{
auto bytecode = currentInstruction->as<OpGetScope>();
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (249522 => 249523)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2019-09-05 05:51:56 UTC (rev 249523)
@@ -1673,16 +1673,23 @@
llintOp(op_loop_hint, OpLoopHint, macro (unused, unused, dispatch)
- # CheckTraps.
+ checkSwitchToJITForLoop()
+ dispatch()
+end)
+
+
+llintOp(op_check_traps, OpCheckTraps, macro (unused, unused, dispatch)
loadp CodeBlock[cfr], t1
loadp CodeBlock::m_vm[t1], t1
- btbnz VM::m_traps + VMTraps::m_needTrapHandling[t1], .handleTraps
+ loadb VM::m_traps+VMTraps::m_needTrapHandling[t1], t0
+ btpnz t0, .handleTraps
.afterHandlingTraps:
- checkSwitchToJITForLoop()
dispatch()
.handleTraps:
- callTrapHandler(_llint_throw_from_slow_path_trampoline)
+ callTrapHandler(.throwHandler)
jmp .afterHandlingTraps
+.throwHandler:
+ jmp _llint_throw_from_slow_path_trampoline
end)
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (249522 => 249523)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2019-09-05 05:51:56 UTC (rev 249523)
@@ -701,32 +701,25 @@
_llint_op_enter:
traceExecution()
checkStackPointerAlignment(t2, 0xdead00e1)
- loadp CodeBlock[cfr], t1 // t1<CodeBlock> = cfr.CodeBlock
- loadi CodeBlock::m_numVars[t1], t2 // t2<size_t> = t1<CodeBlock>.m_numVars
+ loadp CodeBlock[cfr], t2 // t2<CodeBlock> = cfr.CodeBlock
+ loadi CodeBlock::m_numVars[t2], t2 // t2<size_t> = t2<CodeBlock>.m_numVars
subi CalleeSaveSpaceAsVirtualRegisters, t2
move cfr, t3
subp CalleeSaveSpaceAsVirtualRegisters * SlotSize, t3
btiz t2, .opEnterDone
move UndefinedTag, t0
+ move 0, t1
negi t2
.opEnterLoop:
storei t0, TagOffset[t3, t2, 8]
- storei 0, PayloadOffset[t3, t2, 8]
+ storei t1, PayloadOffset[t3, t2, 8]
addi 1, t2
btinz t2, .opEnterLoop
.opEnterDone:
- writeBarrierOnCellWithReload(t1, macro ()
- loadp CodeBlock[cfr], t1 # Reload CodeBlock
- end)
- # Checking traps.
- loadp CodeBlock::m_vm[t1], t1
- btpnz VM::m_traps + VMTraps::m_needTrapHandling[t1], .handleTraps
-.afterHandlingTraps:
+ callSlowPath(_slow_path_enter)
dispatchOp(narrow, op_enter)
-.handleTraps:
- callTrapHandler(_llint_throw_from_slow_path_trampoline)
- jmp .afterHandlingTraps
+
llintOpWithProfile(op_get_argument, OpGetArgument, macro (size, get, dispatch, return)
get(m_index, t2)
loadi PayloadOffset + ArgumentCount[cfr], t0
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (249522 => 249523)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2019-09-05 05:51:56 UTC (rev 249523)
@@ -689,8 +689,8 @@
_llint_op_enter:
traceExecution()
checkStackPointerAlignment(t2, 0xdead00e1)
- loadp CodeBlock[cfr], t3 // t3<CodeBlock> = cfr.CodeBlock
- loadi CodeBlock::m_numVars[t3], t2 // t2<size_t> = t3<CodeBlock>.m_numVars
+ loadp CodeBlock[cfr], t2 // t2<CodeBlock> = cfr.CodeBlock
+ loadi CodeBlock::m_numVars[t2], t2 // t2<size_t> = t2<CodeBlock>.m_numVars
subq CalleeSaveSpaceAsVirtualRegisters, t2
move cfr, t1
subq CalleeSaveSpaceAsVirtualRegisters * 8, t1
@@ -703,17 +703,10 @@
addq 1, t2
btqnz t2, .opEnterLoop
.opEnterDone:
- writeBarrierOnCellWithReload(t3, macro ()
- loadp CodeBlock[cfr], t3 # Reload CodeBlock
- end)
- loadp CodeBlock::m_vm[t3], t1
- btbnz VM::m_traps + VMTraps::m_needTrapHandling[t1], .handleTraps
-.afterHandlingTraps:
+ callSlowPath(_slow_path_enter)
dispatchOp(narrow, op_enter)
-.handleTraps:
- callTrapHandler(_llint_throw_from_slow_path_trampoline)
- jmp .afterHandlingTraps
+
llintOpWithProfile(op_get_argument, OpGetArgument, macro (size, get, dispatch, return)
get(m_index, t2)
loadi PayloadOffset + ArgumentCount[cfr], t0
Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp (249522 => 249523)
--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2019-09-05 05:51:56 UTC (rev 249523)
@@ -932,6 +932,14 @@
RETURN(GET_C(bytecode.m_src).jsValue().toPrimitive(exec));
}
+SLOW_PATH_DECL(slow_path_enter)
+{
+ BEGIN();
+ CodeBlock* codeBlock = exec->codeBlock();
+ Heap::heap(codeBlock)->writeBarrier(codeBlock);
+ END();
+}
+
SLOW_PATH_DECL(slow_path_get_enumerable_length)
{
BEGIN();
Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h (249522 => 249523)
--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h 2019-09-05 05:24:02 UTC (rev 249522)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.h 2019-09-05 05:51:56 UTC (rev 249523)
@@ -323,6 +323,7 @@
SLOW_PATH_HIDDEN_DECL(slow_path_create_scoped_arguments);
SLOW_PATH_HIDDEN_DECL(slow_path_create_cloned_arguments);
SLOW_PATH_HIDDEN_DECL(slow_path_create_this);
+SLOW_PATH_HIDDEN_DECL(slow_path_enter);
SLOW_PATH_HIDDEN_DECL(slow_path_get_callee);
SLOW_PATH_HIDDEN_DECL(slow_path_to_this);
SLOW_PATH_HIDDEN_DECL(slow_path_throw_tdz_error);