Commit 74a9e837 authored by mark.lam@apple.com's avatar mark.lam@apple.com
Browse files

Deleting the classic interpreter and cleaning up some build options.

https://bugs.webkit.org/show_bug.cgi?id=96969.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC):
* bytecode/Instruction.h:
(JSC::Instruction::Instruction):
* interpreter/AbstractPC.cpp:
(JSC::AbstractPC::AbstractPC):
* interpreter/AbstractPC.h:
(AbstractPC):
* interpreter/CallFrame.h:
(ExecState):
* interpreter/Interpreter.cpp:
(JSC):
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::~Interpreter):
(JSC::Interpreter::initialize):
(JSC::Interpreter::isOpcode):
(JSC::Interpreter::unwindCallFrame):
(JSC::getLineNumberForCallFrame):
(JSC::getCallerInfo):
(JSC::getSourceURLFromCallFrame):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::retrieveArgumentsFromVMCode):
(JSC::Interpreter::retrieveCallerFromVMCode):
(JSC::Interpreter::retrieveLastCaller):
* interpreter/Interpreter.h:
(JSC::Interpreter::getOpcodeID):
(Interpreter):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):
* offlineasm/asm.rb:
* offlineasm/offsets.rb:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
(NativeExecutable):
(JSC::NativeExecutable::finishCreation):
* runtime/JSGlobalData.cpp:
(JSC):
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::getHostFunction):
* runtime/JSGlobalData.h:
(JSGlobalData):
(JSC::JSGlobalData::canUseJIT):
(JSC::JSGlobalData::canUseRegExpJIT):
* runtime/Options.cpp:
(JSC::Options::initialize):

Source/WebKit/blackberry: 

* WebCoreSupport/AboutDataEnableFeatures.in:

Source/WTF: 

* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):
* wtf/Platform.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8a2e6f0f
2012-09-24 Mark Lam <mark.lam@apple.com>
Deleting the classic interpreter and cleaning up some build options.
https://bugs.webkit.org/show_bug.cgi?id=96969.
Reviewed by Geoffrey Garen.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
(JSC::CodeBlock::finalizeUnconditionally):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC):
* bytecode/Instruction.h:
(JSC::Instruction::Instruction):
* interpreter/AbstractPC.cpp:
(JSC::AbstractPC::AbstractPC):
* interpreter/AbstractPC.h:
(AbstractPC):
* interpreter/CallFrame.h:
(ExecState):
* interpreter/Interpreter.cpp:
(JSC):
(JSC::Interpreter::Interpreter):
(JSC::Interpreter::~Interpreter):
(JSC::Interpreter::initialize):
(JSC::Interpreter::isOpcode):
(JSC::Interpreter::unwindCallFrame):
(JSC::getLineNumberForCallFrame):
(JSC::getCallerInfo):
(JSC::getSourceURLFromCallFrame):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::retrieveArgumentsFromVMCode):
(JSC::Interpreter::retrieveCallerFromVMCode):
(JSC::Interpreter::retrieveLastCaller):
* interpreter/Interpreter.h:
(JSC::Interpreter::getOpcodeID):
(Interpreter):
* jit/ExecutableAllocatorFixedVMPool.cpp:
(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):
* offlineasm/asm.rb:
* offlineasm/offsets.rb:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal):
* runtime/Executable.h:
(JSC::NativeExecutable::create):
(NativeExecutable):
(JSC::NativeExecutable::finishCreation):
* runtime/JSGlobalData.cpp:
(JSC):
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::getHostFunction):
* runtime/JSGlobalData.h:
(JSGlobalData):
(JSC::JSGlobalData::canUseJIT):
(JSC::JSGlobalData::canUseRegExpJIT):
* runtime/Options.cpp:
(JSC::Options::initialize):
2012-09-24 Filip Pizlo <fpizlo@apple.com>
 
Nested try/finally should not confuse the finally unpopper in BytecodeGenerator::emitComplexJumpScopes
......
......@@ -588,25 +588,6 @@ void CodeBlock::dump(ExecState* exec)
} while (i < m_globalResolveInfos.size());
}
#endif
#if ENABLE(CLASSIC_INTERPRETER)
if (!m_globalResolveInstructions.isEmpty() || !m_propertyAccessInstructions.isEmpty())
dataLog("\nStructures:\n");
if (!m_globalResolveInstructions.isEmpty()) {
size_t i = 0;
do {
printStructures(&instructions()[m_globalResolveInstructions[i]]);
++i;
} while (i < m_globalResolveInstructions.size());
}
if (!m_propertyAccessInstructions.isEmpty()) {
size_t i = 0;
do {
printStructures(&instructions()[m_propertyAccessInstructions[i]]);
++i;
} while (i < m_propertyAccessInstructions.size());
}
#endif
if (m_rareData && !m_rareData->m_exceptionHandlers.isEmpty()) {
dataLog("\nException Handlers:\n");
......@@ -2065,9 +2046,7 @@ void CodeBlock::finalizeUnconditionally()
{
#if ENABLE(LLINT)
Interpreter* interpreter = m_globalData->interpreter;
// interpreter->classicEnabled() returns true if the old C++ interpreter is enabled. If that's enabled
// then we're not using LLInt.
if (!interpreter->classicEnabled() && !!numberOfInstructions()) {
if (!!numberOfInstructions()) {
for (size_t size = m_propertyAccessInstructions.size(), i = 0; i < size; ++i) {
Instruction* curInstruction = &instructions()[m_propertyAccessInstructions[i]];
switch (interpreter->getOpcodeID(curInstruction[0].u.opcode)) {
......@@ -2260,14 +2239,6 @@ void CodeBlock::stronglyVisitStrongReferences(SlotVisitor& visitor)
visitor.append(&m_functionExprs[i]);
for (size_t i = 0; i < m_functionDecls.size(); ++i)
visitor.append(&m_functionDecls[i]);
#if ENABLE(CLASSIC_INTERPRETER)
if (m_globalData->interpreter->classicEnabled() && !!numberOfInstructions()) {
for (size_t size = m_propertyAccessInstructions.size(), i = 0; i < size; ++i)
visitStructures(visitor, &instructions()[m_propertyAccessInstructions[i]]);
for (size_t size = m_globalResolveInstructions.size(), i = 0; i < size; ++i)
visitStructures(visitor, &instructions()[m_globalResolveInstructions[i]]);
}
#endif
updateAllPredictions(Collection);
}
......@@ -2444,27 +2415,6 @@ void CodeBlock::expressionRangeForBytecodeOffset(unsigned bytecodeOffset, int& d
return;
}
#if ENABLE(CLASSIC_INTERPRETER)
bool CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset(unsigned bytecodeOffset)
{
if (m_globalResolveInstructions.isEmpty())
return false;
int low = 0;
int high = m_globalResolveInstructions.size();
while (low < high) {
int mid = low + (high - low) / 2;
if (m_globalResolveInstructions[mid] <= bytecodeOffset)
low = mid + 1;
else
high = mid;
}
if (!low || m_globalResolveInstructions[low - 1] != bytecodeOffset)
return false;
return true;
}
#endif
#if ENABLE(JIT)
bool CodeBlock::hasGlobalResolveInfoAtBytecodeOffset(unsigned bytecodeOffset)
{
......
......@@ -154,7 +154,7 @@ namespace JSC {
Instruction(Opcode opcode)
{
#if !ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER)
#if !ENABLE(COMPUTED_GOTO_OPCODES)
// We have to initialize one of the pointer members to ensure that
// the entire struct is initialized, when opcode is not a pointer.
u.jsCell.clear();
......
......@@ -45,12 +45,6 @@ AbstractPC::AbstractPC(JSGlobalData& globalData, ExecState* exec)
return;
}
#endif
#if ENABLE(CLASSIC_INTERPRETER)
UNUSED_PARAM(globalData);
m_pointer = exec->returnVPC();
m_mode = Interpreter;
#endif
}
} // namespace JSC
......
......@@ -60,21 +60,6 @@ public:
}
#endif
#if ENABLE(CLASSIC_INTERPRETER)
AbstractPC(Instruction* vPC)
: m_pointer(vPC)
, m_mode(Interpreter)
{
}
bool hasInterpreterReturnAddress() const { return m_mode == Interpreter; }
Instruction* interpreterReturnAddress() const
{
ASSERT(hasInterpreterReturnAddress());
return static_cast<Instruction*>(m_pointer);
}
#endif
bool isSet() const { return m_mode != None; }
bool operator!() const { return !isSet(); }
......
......@@ -148,9 +148,6 @@ namespace JSC {
return 0;
}
#endif
#if ENABLE(CLASSIC_INTERPRETER)
Instruction* returnVPC() const { return this[RegisterFile::ReturnPC].vPC(); }
#endif
#if USE(JSVALUE32_64)
Instruction* currentVPC() const
{
......
......@@ -204,27 +204,14 @@ namespace JSC {
OpcodeID getOpcodeID(Opcode opcode)
{
ASSERT(m_initialized);
#if ENABLE(COMPUTED_GOTO_OPCODES)
#if ENABLE(LLINT)
ASSERT(isOpcode(opcode));
return m_opcodeIDTable.get(opcode);
#elif ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER)
#if ENABLE(COMPUTED_GOTO_OPCODES) && ENABLE(LLINT)
ASSERT(isOpcode(opcode));
if (!m_classicEnabled)
return static_cast<OpcodeID>(bitwise_cast<uintptr_t>(opcode));
return m_opcodeIDTable.get(opcode);
#endif // ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER)
#else // !ENABLE(COMPUTED_GOTO_OPCODES)
#else
return opcode;
#endif // !ENABLE(COMPUTED_GOTO_OPCODES)
#endif
}
bool classicEnabled()
{
return m_classicEnabled;
}
bool isOpcode(Opcode);
JSValue execute(ProgramExecutable*, CallFrame*, JSObject* thisObj);
......@@ -260,15 +247,6 @@ namespace JSC {
void endRepeatCall(CallFrameClosure&);
JSValue execute(CallFrameClosure&);
#if ENABLE(CLASSIC_INTERPRETER)
NEVER_INLINE JSScope* createNameScope(CallFrame*, const Instruction* vPC);
void tryCacheGetByID(CallFrame*, CodeBlock*, Instruction*, JSValue baseValue, const Identifier& propertyName, const PropertySlot&);
void uncacheGetByID(CodeBlock*, Instruction* vPC);
void tryCachePutByID(CallFrame*, CodeBlock*, Instruction*, JSValue baseValue, const PutPropertySlot&);
void uncachePutByID(CodeBlock*, Instruction* vPC);
#endif // ENABLE(CLASSIC_INTERPRETER)
NEVER_INLINE bool unwindCallFrame(CallFrame*&, JSValue, unsigned& bytecodeOffset, CodeBlock*&);
static ALWAYS_INLINE CallFrame* slideRegisterWindowForCall(CodeBlock*, RegisterFile*, CallFrame*, size_t registerOffset, int argc);
......@@ -291,20 +269,14 @@ namespace JSC {
RegisterFile m_registerFile;
#if ENABLE(COMPUTED_GOTO_OPCODES)
#if ENABLE(LLINT)
#if ENABLE(COMPUTED_GOTO_OPCODES) && ENABLE(LLINT)
Opcode* m_opcodeTable; // Maps OpcodeID => Opcode for compiling
HashMap<Opcode, OpcodeID> m_opcodeIDTable; // Maps Opcode => OpcodeID for decompiling
#elif ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER)
Opcode m_opcodeTable[numOpcodeIDs]; // Maps OpcodeID => Opcode for compiling
HashMap<Opcode, OpcodeID> m_opcodeIDTable; // Maps Opcode => OpcodeID for decompiling
#endif
#endif // ENABLE(COMPUTED_GOTO_OPCODES)
#if !ASSERT_DISABLED
bool m_initialized;
#endif
bool m_classicEnabled;
};
// This value must not be an object that would require this conversion (WebCore's global object).
......
......@@ -54,7 +54,7 @@ public:
: MetaAllocator(jitAllocationGranule) // round up all allocations to 32 bytes
{
m_reservation = PageReservation::reserveWithGuardPages(fixedExecutableMemoryPoolSize, OSAllocator::JSJITCodePages, EXECUTABLE_POOL_WRITABLE, true);
#if !(ENABLE(CLASSIC_INTERPRETER) || ENABLE(LLINT))
#if !ENABLE(LLINT)
if (!m_reservation)
CRASH();
#endif
......
......@@ -225,7 +225,7 @@ $stderr.puts "offlineasm: Parsing #{asmFile} and #{offsetsFile} and creating ass
begin
configurationList = offsetsAndConfigurationIndex(offsetsFile)
rescue MissingMagicValuesException
$stderr.puts "offlineasm: No magic values found. Skipping assembly file generation assuming the classic interpreter is enabled."
$stderr.puts "offlineasm: No magic values found. Skipping assembly file generation."
exit 0
end
......
......@@ -38,7 +38,6 @@ OFFSET_MAGIC_NUMBERS = [ to32Bit(0xec577ac7), to32Bit(0x0ff5e755) ]
# MissingMagicValuesException
#
# Thrown when magic values are missing from the binary.
# This is usually an indication that the classic interpreter is enabled.
#
class MissingMagicValuesException < Exception
......
......@@ -231,11 +231,6 @@ JSObject* EvalExecutable::compileInternal(ExecState* exec, JSScope* scope, JITCo
#endif
#if ENABLE(JIT)
#if ENABLE(CLASSIC_INTERPRETER)
if (!m_jitCodeForCall)
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_evalCodeBlock));
else
#endif
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_evalCodeBlock) + m_jitCodeForCall.size());
#else
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_evalCodeBlock));
......@@ -356,12 +351,7 @@ JSObject* ProgramExecutable::compileInternal(ExecState* exec, JSScope* scope, JI
#endif
#if ENABLE(JIT)
#if ENABLE(CLASSIC_INTERPRETER)
if (!m_jitCodeForCall)
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_programCodeBlock));
else
#endif
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_programCodeBlock) + m_jitCodeForCall.size());
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_programCodeBlock) + m_jitCodeForCall.size());
#else
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_programCodeBlock));
#endif
......@@ -534,12 +524,7 @@ JSObject* FunctionExecutable::compileForCallInternal(ExecState* exec, JSScope* s
#endif
#if ENABLE(JIT)
#if ENABLE(CLASSIC_INTERPRETER)
if (!m_jitCodeForCall)
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_codeBlockForCall));
else
#endif
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_codeBlockForCall) + m_jitCodeForCall.size());
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_codeBlockForCall) + m_jitCodeForCall.size());
#else
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_codeBlockForCall));
#endif
......@@ -576,11 +561,6 @@ JSObject* FunctionExecutable::compileForConstructInternal(ExecState* exec, JSSco
#endif
#if ENABLE(JIT)
#if ENABLE(CLASSIC_INTERPRETER)
if (!m_jitCodeForConstruct)
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_codeBlockForConstruct));
else
#endif
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_codeBlockForConstruct) + m_jitCodeForConstruct.size());
#else
Heap::heap(this)->reportExtraMemoryCost(sizeof(*m_codeBlockForConstruct));
......
......@@ -266,7 +266,6 @@ namespace JSC {
#if ENABLE(JIT)
static NativeExecutable* create(JSGlobalData& globalData, MacroAssemblerCodeRef callThunk, NativeFunction function, MacroAssemblerCodeRef constructThunk, NativeFunction constructor, Intrinsic intrinsic)
{
ASSERT(!globalData.interpreter->classicEnabled());
NativeExecutable* executable;
if (!callThunk) {
executable = new (NotNull, allocateCell<NativeExecutable>(globalData.heap)) NativeExecutable(globalData, function, constructor);
......@@ -279,7 +278,7 @@ namespace JSC {
}
#endif
#if ENABLE(CLASSIC_INTERPRETER) || ENABLE(LLINT_C_LOOP)
#if ENABLE(LLINT_C_LOOP)
static NativeExecutable* create(JSGlobalData& globalData, NativeFunction function, NativeFunction constructor)
{
ASSERT(!globalData.canUseJIT());
......@@ -306,7 +305,6 @@ namespace JSC {
#if ENABLE(JIT)
void finishCreation(JSGlobalData& globalData, JITCode callThunk, JITCode constructThunk, Intrinsic intrinsic)
{
ASSERT(!globalData.interpreter->classicEnabled());
Base::finishCreation(globalData);
m_jitCodeForCall = callThunk;
m_jitCodeForConstruct = constructThunk;
......@@ -316,15 +314,6 @@ namespace JSC {
}
#endif
#if ENABLE(CLASSIC_INTERPRETER)
void finishCreation(JSGlobalData& globalData)
{
ASSERT(!globalData.canUseJIT());
Base::finishCreation(globalData);
m_intrinsic = NoIntrinsic;
}
#endif
private:
NativeExecutable(JSGlobalData& globalData, NativeFunction function, NativeFunction constructor)
: ExecutableBase(globalData, globalData.nativeExecutableStructure.get(), NUM_PARAMETERS_IS_HOST)
......
......@@ -97,7 +97,11 @@ extern const HashTable regExpPrototypeTable;
extern const HashTable stringTable;
extern const HashTable stringConstructorTable;
#if ENABLE(ASSEMBLER) && (ENABLE(CLASSIC_INTERPRETER) || ENABLE(LLINT))
// Note: Platform.h will enforce that ENABLE(ASSEMBLER) is true if either
// ENABLE(JIT) or ENABLE(YARR_JIT) or both are enabled. The code below
// just checks for ENABLE(JIT) or ENABLE(YARR_JIT) with this premise in mind.
#if ENABLE(ASSEMBLER)
static bool enableAssembler(ExecutableAllocator& executableAllocator)
{
if (!executableAllocator.isValid() || (!Options::useJIT() && !Options::useRegExpJIT()))
......@@ -124,7 +128,7 @@ static bool enableAssembler(ExecutableAllocator& executableAllocator)
return true;
#endif
}
#endif
#endif // ENABLE(!ASSEMBLER)
JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType threadStackType, HeapType heapType)
:
......@@ -180,9 +184,13 @@ JSGlobalData::JSGlobalData(GlobalDataType globalDataType, ThreadStackType thread
, m_timeoutCount(512)
#endif
, m_newStringsSinceLastHashConst(0)
#if ENABLE(ASSEMBLER) && (ENABLE(CLASSIC_INTERPRETER) || ENABLE(LLINT))
#if ENABLE(ASSEMBLER)
, m_canUseAssembler(enableAssembler(executableAllocator))
#endif
#if ENABLE(JIT)
, m_canUseJIT(m_canUseAssembler && Options::useJIT())
#endif
#if ENABLE(YARR_JIT)
, m_canUseRegExpJIT(m_canUseAssembler && Options::useRegExpJIT())
#endif
#if ENABLE(GC_VALIDATION)
......@@ -370,10 +378,6 @@ static ThunkGenerator thunkGeneratorForIntrinsic(Intrinsic intrinsic)
NativeExecutable* JSGlobalData::getHostFunction(NativeFunction function, NativeFunction constructor)
{
#if ENABLE(CLASSIC_INTERPRETER)
if (!canUseJIT())
return NativeExecutable::create(*this, function, constructor);
#endif
return jitStubs->hostFunctionStub(this, function, constructor);
}
NativeExecutable* JSGlobalData::getHostFunction(NativeFunction function, Intrinsic intrinsic)
......
......@@ -280,20 +280,18 @@ namespace JSC {
return m_enabledProfiler;
}
#if !ENABLE(JIT)
bool canUseJIT() { return false; } // interpreter only
#elif !ENABLE(CLASSIC_INTERPRETER) && !ENABLE(LLINT)
#if ENABLE(JIT) && ENABLE(LLINT)
bool canUseJIT() { return m_canUseJIT; }
#elif ENABLE(JIT)
bool canUseJIT() { return true; } // jit only
#else
bool canUseJIT() { return m_canUseJIT; }
bool canUseJIT() { return false; } // interpreter only
#endif
#if !ENABLE(YARR_JIT)
bool canUseRegExpJIT() { return false; } // interpreter only
#elif !ENABLE(CLASSIC_INTERPRETER) && !ENABLE(LLINT)
bool canUseRegExpJIT() { return true; } // jit only
#else
#if ENABLE(YARR_JIT)
bool canUseRegExpJIT() { return m_canUseRegExpJIT; }
#else
bool canUseRegExpJIT() { return false; } // interpreter only
#endif
PrivateName m_inheritorIDKey;
......@@ -440,9 +438,13 @@ namespace JSC {
JSGlobalData(GlobalDataType, ThreadStackType, HeapType);
static JSGlobalData*& sharedInstanceInternal();
void createNativeThunk();
#if ENABLE(ASSEMBLER) && (ENABLE(CLASSIC_INTERPRETER) || ENABLE(LLINT))
#if ENABLE(ASSEMBLER)
bool m_canUseAssembler;
#endif
#if ENABLE(JIT)
bool m_canUseJIT;
#endif
#if ENABLE(YARR_JIT)
bool m_canUseRegExpJIT;
#endif
#if ENABLE(GC_VALIDATION)
......
2012-09-24 Mark Lam <mark.lam@apple.com>
Deleting the classic interpreter and cleaning up some build options.
https://bugs.webkit.org/show_bug.cgi?id=96969.
Reviewed by Geoffrey Garen.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):
* wtf/Platform.h:
2012-09-24 Patrick Gansterer <paroga@webkit.org>
Remove String::operator+=()
......
......@@ -113,11 +113,11 @@ void* OSAllocator::reserveAndCommit(size_t bytes, Usage usage, bool writable, bo
result = mmap(result, bytes, protection, flags, fd, 0);
if (result == MAP_FAILED) {
#if ENABLE(CLASSIC_INTERPRETER) || ENABLE(LLINT)
#if ENABLE(LLINT)
if (executable)
result = 0;
else
#endif
#endif
CRASH();
}
if (result && includesGuardPages) {
......
......@@ -604,11 +604,9 @@
#define WTF_USE_PTHREADS 1
#if PLATFORM(IOS_SIMULATOR)
#define ENABLE_CLASSIC_INTERPRETER 1
#define ENABLE_JIT 0
#define ENABLE_YARR_JIT 0
#else
#define ENABLE_CLASSIC_INTERPRETER 0
#define ENABLE_JIT 1
#define ENABLE_LLINT 1
#define ENABLE_YARR_JIT 1
......@@ -641,7 +639,9 @@
#if PLATFORM(WX)
#if !CPU(PPC)
#if !defined(ENABLE_ASSEMBLER)
#define ENABLE_ASSEMBLER 1
#endif
#define ENABLE_JIT 1
#endif
#define ENABLE_GLOBAL_FASTMALLOC_NEW 0
......@@ -953,13 +953,8 @@
#define ENABLE_WRITE_BARRIER_PROFILING 0
#endif
/* Ensure that either the JIT or the interpreter has been enabled. */
#if !defined(ENABLE_CLASSIC_INTERPRETER) && !ENABLE(JIT) && !ENABLE(LLINT)
#define ENABLE_CLASSIC_INTERPRETER 1
#endif
/* If the jit and classic interpreter is not available, enable the LLInt C Loop: */
#if !ENABLE(JIT) && !ENABLE(CLASSIC_INTERPRETER)
#if !ENABLE(JIT)
#define ENABLE_LLINT 1
#define ENABLE_LLINT_C_LOOP 1
#define ENABLE_DFG_JIT 0
......@@ -967,14 +962,9 @@
/* Do a sanity check to make sure that we at least have one execution engine in
use: */
#if !(ENABLE(JIT) || ENABLE(CLASSIC_INTERPRETER) || ENABLE(LLINT))
#if !(ENABLE(JIT) || ENABLE(LLINT))
#error You have to have at least one execution model enabled to build JSC
#endif
/* Do a sanity check to make sure that we don't have both the classic interpreter
and the llint C loop in use at the same time: */
#if ENABLE(CLASSIC_INTERPRETER) && ENABLE(LLINT_C_LOOP)
#error You cannot build both the classic interpreter and the llint C loop together
#endif
/* Configure the JIT */
#if CPU(X86) && COMPILER(MSVC)
......@@ -989,12 +979,9 @@
#if COMPILER(GCC) || (RVCT_VERSION_AT_LEAST(4, 0, 0, 0) && defined(__GNUC__))
#define HAVE_COMPUTED_GOTO 1
#endif
#if HAVE(COMPUTED_GOTO) && ENABLE(CLASSIC_INTERPRETER)
#define ENABLE_COMPUTED_GOTO_CLASSIC_INTERPRETER 1
#endif
/* Determine if we need to enable Computed Goto Opcodes or not: */
#if (HAVE(COMPUTED_GOTO) && ENABLE(LLINT)) || ENABLE(COMPUTED_GOTO_CLASSIC_INTERPRETER)
#if HAVE(COMPUTED_GOTO) && ENABLE(LLINT)
#define ENABLE_COMPUTED_GOTO_OPCODES 1
#endif
......@@ -1009,9 +996,16 @@
#define ENABLE_YARR_JIT_DEBUG 0
#endif
/* If either the JIT or the RegExp JIT is enabled, then the Assembler must be
enabled as well: */
#if ENABLE(JIT) || ENABLE(YARR_JIT)
#if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
#error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
#else
#undef ENABLE_ASSEMBLER
#define ENABLE_ASSEMBLER 1
#endif
#endif
/* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in.
On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */
......
2012-09-24 Mark Lam <mark.lam@apple.com>
Deleting the classic interpreter and cleaning up some build options.
https://bugs.webkit.org/show_bug.cgi?id=96969.
Reviewed by Geoffrey Garen.