summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/llint/LLIntData.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/JavaScriptCore/llint/LLIntData.cpp
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
downloadqtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/JavaScriptCore/llint/LLIntData.cpp')
-rw-r--r--Source/JavaScriptCore/llint/LLIntData.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntData.cpp b/Source/JavaScriptCore/llint/LLIntData.cpp
index 983a7d706..c7fd741d6 100644
--- a/Source/JavaScriptCore/llint/LLIntData.cpp
+++ b/Source/JavaScriptCore/llint/LLIntData.cpp
@@ -31,20 +31,31 @@
#include "BytecodeConventions.h"
#include "CodeType.h"
#include "Instruction.h"
-#include "LowLevelInterpreter.h"
+#include "LLIntCLoop.h"
#include "Opcode.h"
namespace JSC { namespace LLInt {
-Data::Data()
- : m_exceptionInstructions(new Instruction[maxOpcodeLength + 1])
- , m_opcodeMap(new Opcode[numOpcodeIDs])
+Instruction* Data::s_exceptionInstructions = 0;
+Opcode* Data::s_opcodeMap = 0;
+
+void initialize()
{
+ Data::s_exceptionInstructions = new Instruction[maxOpcodeLength + 1];
+ Data::s_opcodeMap = new Opcode[numOpcodeIDs];
+
+ #if ENABLE(LLINT_C_LOOP)
+ CLoop::initialize();
+
+ #else // !ENABLE(LLINT_C_LOOP)
for (int i = 0; i < maxOpcodeLength + 1; ++i)
- m_exceptionInstructions[i].u.pointer = bitwise_cast<void*>(&llint_throw_from_slow_path_trampoline);
-#define OPCODE_ENTRY(opcode, length) m_opcodeMap[opcode] = bitwise_cast<void*>(&llint_##opcode);
+ Data::s_exceptionInstructions[i].u.pointer =
+ LLInt::getCodePtr(llint_throw_from_slow_path_trampoline);
+ #define OPCODE_ENTRY(opcode, length) \
+ Data::s_opcodeMap[opcode] = LLInt::getCodePtr(llint_##opcode);
FOR_EACH_OPCODE_ID(OPCODE_ENTRY);
-#undef OPCODE_ENTRY
+ #undef OPCODE_ENTRY
+ #endif // !ENABLE(LLINT_C_LOOP)
}
#if COMPILER(CLANG)
@@ -120,12 +131,6 @@ void Data::performAssertions(JSGlobalData& globalData)
#pragma clang diagnostic pop
#endif
-Data::~Data()
-{
- delete[] m_exceptionInstructions;
- delete[] m_opcodeMap;
-}
-
} } // namespace JSC::LLInt
#endif // ENABLE(LLINT)