Commit 0d587919 authored by oliver@apple.com's avatar oliver@apple.com

fourthTier: Resurrect the CLoop LLINT on the FTL branch.

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

Reviewed by Mark Hahnenberg.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::jitType):
  - Fix the CodeBlock jitType to be InterpreterThunk when !ENABLE_JIT.
* bytecode/JumpTable.h:
(JSC::SimpleJumpTable::clear):
* interpreter/StackIterator.cpp:
(JSC::StackIterator::Frame::bytecodeOffset):
(JSC::StackIterator::Frame::print):
* jit/JITCode.cpp:
(JSC):
* jit/JITExceptions.cpp:
(JSC::getExceptionLocation):
* llint/LowLevelInterpreter.cpp:
* offlineasm/cloop.rb:
* runtime/Structure.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1d325fa7
2013-07-11 Mark Lam <mark.lam@apple.com>
Resurrect the CLoop LLINT on the FTL branch.
https://bugs.webkit.org/show_bug.cgi?id=118144.
Reviewed by Mark Hahnenberg.
* bytecode/CodeBlock.h:
(JSC::CodeBlock::jitType):
- Fix the CodeBlock jitType to be InterpreterThunk when !ENABLE_JIT.
* bytecode/JumpTable.h:
(JSC::SimpleJumpTable::clear):
* interpreter/StackIterator.cpp:
(JSC::StackIterator::Frame::bytecodeOffset):
(JSC::StackIterator::Frame::print):
* jit/JITCode.cpp:
(JSC):
* jit/JITExceptions.cpp:
(JSC::getExceptionLocation):
* llint/LowLevelInterpreter.cpp:
* offlineasm/cloop.rb:
* runtime/Structure.cpp:
2013-07-08 Filip Pizlo <fpizlo@apple.com>
NaturalLoops + Profiler = Crash
......
......@@ -312,7 +312,7 @@ public:
bool hasOptimizedReplacement();
#else
JITCode::JITType jitType() const { return JITCode::BaselineJIT; }
JITCode::JITType jitType() const { return JITCode::InterpreterThunk; }
#endif
ScriptExecutable* ownerExecutable() const { return m_ownerExecutable.get(); }
......
......@@ -105,7 +105,9 @@ namespace JSC {
void clear()
{
branchOffsets.clear();
#if ENABLE(JIT)
ctiOffsets.clear();
#endif
}
};
......
......@@ -151,8 +151,10 @@ unsigned StackIterator::Frame::bytecodeOffset()
{
if (!isJSFrame())
return 0;
#if ENABLE(DFG_JIT)
if (hasLocationAsCodeOriginIndex())
return bytecodeOffsetFromCodeOriginIndex();
#endif
return locationAsBytecodeOffset();
}
......@@ -360,9 +362,11 @@ void StackIterator::Frame::print(int indentLevel)
if (hasLocationAsBytecodeOffset()) {
unsigned bytecodeOffset = locationAsBytecodeOffset();
printif(i, " bytecodeOffset %u %p / %zu\n", bytecodeOffset, reinterpret_cast<void*>(bytecodeOffset), codeBlock->instructions().size());
#if ENABLE(DFG_JIT)
} else {
unsigned codeOriginIndex = locationAsCodeOriginIndex();
printif(i, " codeOriginIdex %u %p / %zu\n", codeOriginIndex, reinterpret_cast<void*>(codeOriginIndex), codeBlock->codeOrigins().size());
#endif
}
unsigned line = 0;
unsigned column = 0;
......@@ -370,11 +374,13 @@ void StackIterator::Frame::print(int indentLevel)
printif(i, " line %d\n", line);
printif(i, " column %d\n", column);
printif(i, " jitType %d <%s> isOptimizingJIT %d\n", jitType, jitTypeName(jitType), JITCode::isOptimizingJIT(jitType));
#if ENABLE(DFG_JIT)
printif(i, " hasCodeOrigins %d\n", codeBlock->hasCodeOrigins());
if (codeBlock->hasCodeOrigins()) {
JITCode* jitCode = codeBlock->jitCode().get();
printif(i, " jitCode %p start %p end %p\n", jitCode, jitCode->start(), jitCode->end());
}
#endif
}
printif(i, "}\n");
}
......
......@@ -40,11 +40,13 @@ JITCode::~JITCode()
{
}
#if ENABLE(JIT)
JSValue JITCode::execute(JSStack* stack, CallFrame* callFrame, VM* vm)
{
JSValue result = JSValue::decode(ctiTrampoline(executableAddress(), stack, callFrame, 0, 0, vm));
return vm->exception ? jsNull() : result;
}
#endif
DFG::CommonData* JITCode::dfgCommon()
{
......
......@@ -43,8 +43,10 @@ static unsigned getExceptionLocation(VM* vm, CallFrame* callFrame)
UNUSED_PARAM(vm);
ASSERT(!callFrame->hasHostCallFrameFlag());
#if ENABLE(DFG_JIT)
if (callFrame->hasLocationAsCodeOriginIndex())
return callFrame->bytecodeOffsetFromCodeOriginIndex();
#endif
return callFrame->locationAsBytecodeOffset();
}
......
......@@ -33,10 +33,10 @@
#if ENABLE(LLINT_C_LOOP)
#include "CodeBlock.h"
#include "CommonSlowPaths.h"
#include "LLIntCLoop.h"
#include "LLIntSlowPaths.h"
#include "Operations.h"
#include "SlowPaths.h"
#include "VMInspector.h"
#include <wtf/Assertions.h>
#include <wtf/MathExtras.h>
......
......@@ -546,7 +546,7 @@ def cloopEmitCallSlowPath(operands)
$asm.putc " ExecState* exec = CAST<ExecState*>(#{operands[1].clValue(:voidPtr)});"
$asm.putc " Instruction* pc = CAST<Instruction*>(#{operands[2].clValue(:voidPtr)});"
$asm.putc " SlowPathReturnType result = #{operands[0].cLabel}(exec, pc);"
$asm.putc " LLInt::decodeResult(result, t0.instruction, t1.execState);"
$asm.putc " decodeResult(result, t0.instruction, t1.execState);"
$asm.putc "}"
end
......
......@@ -33,6 +33,7 @@
#include "PropertyNameArray.h"
#include "StructureChain.h"
#include "StructureRareDataInlines.h"
#include <wtf/CommaPrinter.h>
#include <wtf/RefCountedLeakCounter.h>
#include <wtf/RefPtr.h>
#include <wtf/Threading.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment