Ignore:
Timestamp:
Feb 29, 2012, 9:46:20 PM (13 years ago)
Author:
[email protected]
Message:

The JIT should not crash the entire process just because there is not
enough executable memory, if the LLInt is enabled
https://bugs.webkit.org/show_bug.cgi?id=79962
<rdar://problem/10922215>

Reviewed by Gavin Barraclough.

Added the notion of JITCompilationEffort. If we're JIT'ing as a result of
a tier-up, then we set it to JITCompilationCanFail. Otherwise it's
JITCompilationMustSucceed. This preserves the old behavior of LLInt is
disabled or if we're compiling something that can't be interpreted (like
an OSR exit stub).

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/ARMAssembler.cpp:

(JSC::ARMAssembler::executableCopy):

  • assembler/ARMAssembler.h:

(ARMAssembler):

  • assembler/AssemblerBuffer.h:

(JSC::AssemblerBuffer::executableCopy):

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::~LinkBuffer):
(LinkBuffer):
(JSC::LinkBuffer::didFailToAllocate):
(JSC::LinkBuffer::isValid):
(JSC::LinkBuffer::linkCode):
(JSC::LinkBuffer::performFinalization):

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::executableCopy):

  • assembler/SH4Assembler.h:

(JSC::SH4Assembler::executableCopy):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::executableCopy):
(JSC::X86Assembler::X86InstructionFormatter::executableCopy):

  • bytecode/CodeBlock.cpp:

(JSC::ProgramCodeBlock::jitCompileImpl):
(JSC::EvalCodeBlock::jitCompileImpl):
(JSC::FunctionCodeBlock::jitCompileImpl):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::jitCompile):
(CodeBlock):
(ProgramCodeBlock):
(EvalCodeBlock):
(FunctionCodeBlock):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compile):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGJITCompiler.h:

(JITCompiler):

  • jit/ExecutableAllocator.cpp:

(JSC::DemandExecutableAllocator::allocateNewSpace):
(JSC::ExecutableAllocator::allocate):

  • jit/ExecutableAllocator.h:

(ExecutableAllocator):

  • jit/ExecutableAllocatorFixedVMPool.cpp:

(JSC::ExecutableAllocator::allocate):

  • jit/JIT.cpp:

(JSC::JIT::privateCompile):

  • jit/JIT.h:

(JSC::JIT::compile):
(JIT):

  • jit/JITCompilationEffort.h: Added.

(JSC):

  • jit/JITDriver.h:

(JSC::jitCompileIfAppropriate):
(JSC::jitCompileFunctionIfAppropriate):

  • llint/LLIntSlowPaths.cpp:

(LLInt):
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::entryOSR):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/Executable.cpp:

(JSC::EvalExecutable::jitCompile):
(JSC::ProgramExecutable::jitCompile):
(JSC::FunctionExecutable::jitCompileForCall):
(JSC::FunctionExecutable::jitCompileForConstruct):

  • runtime/Executable.h:

(EvalExecutable):
(ProgramExecutable):
(FunctionExecutable):
(JSC::FunctionExecutable::jitCompileFor):

  • runtime/ExecutionHarness.h:

(JSC::prepareForExecution):
(JSC::prepareFunctionForExecution):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/SH4Assembler.h

    r107499 r109307  
    3232#include "AssemblerBuffer.h"
    3333#include "AssemblerBufferWithConstantPool.h"
     34#include "JITCompilationEffort.h"
    3435#include <stdarg.h>
    3536#include <stdint.h>
     
    15151516    }
    15161517
    1517     PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData, void* ownerUID)
    1518     {
    1519         return m_buffer.executableCopy(globalData, ownerUID);
     1518    PassRefPtr<ExecutableMemoryHandle> executableCopy(JSGlobalData& globalData, void* ownerUID, JITCompilationEffort effort)
     1519    {
     1520        return m_buffer.executableCopy(globalData, ownerUID, effort);
    15201521    }
    15211522
Note: See TracChangeset for help on using the changeset viewer.