Ignore:
Timestamp:
Dec 7, 2015, 2:03:48 PM (10 years ago)
Author:
[email protected]
Message:

Add op_watchdog opcode that is generated when VM has a watchdog
https://bugs.webkit.org/show_bug.cgi?id=151954

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch also makes watchdog a private member
of VM and adds a getter function.

  • API/JSContextRef.cpp:

(JSContextGroupClearExecutionTimeLimit):

  • bytecode/BytecodeList.json:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitLoopHint):
(JSC::BytecodeGenerator::emitWatchdog):
(JSC::BytecodeGenerator::retrieveLastBinaryOp):

  • bytecompiler/BytecodeGenerator.h:
  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::DFG::LowerDFGToLLVM::compileCheckWatchdogTimer):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emit_op_watchdog):
(JSC::JIT::emitSlow_op_watchdog):
(JSC::JIT::emit_op_new_regexp):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • runtime/VM.cpp:

(JSC::VM::ensureWatchdog):

  • runtime/VM.h:

(JSC::VM::watchdog):

  • runtime/VMEntryScope.cpp:

(JSC::VMEntryScope::VMEntryScope):
(JSC::VMEntryScope::~VMEntryScope):

  • runtime/VMInlines.h:

(JSC::VM::shouldTriggerTermination):

Source/WebCore:

No new tests because JSC already has tests for this.

  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::scheduleExecutionTermination):
(WebCore::WorkerScriptController::isTerminatingExecution):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r193606 r193649  
    44614461
    44624462    case CheckWatchdogTimer: {
    4463         ASSERT(m_jit.vm()->watchdog);
     4463        ASSERT(m_jit.vm()->watchdog());
    44644464        GPRTemporary unused(this);
    44654465        GPRReg unusedGPR = unused.gpr();
    44664466
    44674467        JITCompiler::Jump timerDidFire = m_jit.branchTest8(JITCompiler::NonZero,
    4468             JITCompiler::AbsoluteAddress(m_jit.vm()->watchdog->timerDidFireAddress()));
     4468            JITCompiler::AbsoluteAddress(m_jit.vm()->watchdog()->timerDidFireAddress()));
    44694469
    44704470        addSlowPathGenerator(slowPathCall(timerDidFire, this, operationHandleWatchdogTimer, unusedGPR));
Note: See TracChangeset for help on using the changeset viewer.