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/jit/JIT.cpp

    r193606 r193649  
    252252        DEFINE_OP(op_jtrue)
    253253        DEFINE_OP(op_loop_hint)
     254        DEFINE_OP(op_watchdog)
    254255        DEFINE_OP(op_lshift)
    255256        DEFINE_OP(op_mod)
     
    413414        DEFINE_SLOWCASE_OP(op_jtrue)
    414415        DEFINE_SLOWCASE_OP(op_loop_hint)
     416        DEFINE_SLOWCASE_OP(op_watchdog)
    415417        DEFINE_SLOWCASE_OP(op_lshift)
    416418        DEFINE_SLOWCASE_OP(op_mod)
Note: See TracChangeset for help on using the changeset viewer.