summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/llint
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
commit1b914638db989aaa98631a1c1e02c7b2d44805d8 (patch)
tree87f4fd2c7b38db320079a5de8877890d2ca3c485 /Source/JavaScriptCore/llint
parent2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (diff)
downloadqtwebkit-1b914638db989aaa98631a1c1e02c7b2d44805d8.tar.gz
Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736)
New snapshot to include QDeclarative* -> QQml* build fixes
Diffstat (limited to 'Source/JavaScriptCore/llint')
-rw-r--r--Source/JavaScriptCore/llint/LLIntSlowPaths.cpp22
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm27
-rw-r--r--Source/JavaScriptCore/llint/LowLevelInterpreter64.asm26
3 files changed, 33 insertions, 42 deletions
diff --git a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
index 2b5161f7b..d184b6e62 100644
--- a/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
+++ b/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
@@ -458,13 +458,7 @@ LLINT_SLOW_PATH_DECL(slow_path_create_this)
ASSERT(constructor->methodTable()->getConstructData(constructor, constructData) == ConstructTypeJS);
#endif
- Structure* structure;
- JSValue proto = LLINT_OP(2).jsValue();
- if (proto.isObject())
- structure = asObject(proto)->inheritorID(globalData);
- else
- structure = constructor->scope()->globalObject->emptyObjectStructure();
-
+ Structure* structure = constructor->cachedInheritorID(exec);
LLINT_RETURN(constructEmptyObject(exec, structure));
}
@@ -1167,6 +1161,20 @@ LLINT_SLOW_PATH_DECL(slow_path_switch_imm)
LLINT_END();
}
+LLINT_SLOW_PATH_DECL(slow_path_switch_char)
+{
+ LLINT_BEGIN();
+ JSValue scrutinee = LLINT_OP_C(3).jsValue();
+ ASSERT(scrutinee.isString());
+ JSString* string = asString(scrutinee);
+ ASSERT(string->length() == 1);
+ int defaultOffset = pc[2].u.operand;
+ StringImpl* impl = string->value(exec).impl();
+ CodeBlock* codeBlock = exec->codeBlock();
+ pc += codeBlock->characterSwitchJumpTable(pc[1].u.operand).offsetForValue((*impl)[0], defaultOffset);
+ LLINT_END();
+}
+
LLINT_SLOW_PATH_DECL(slow_path_switch_string)
{
LLINT_BEGIN();
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
index 42ab4c1e4..e1361315f 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
@@ -343,31 +343,17 @@ _llint_op_create_arguments:
_llint_op_create_this:
traceExecution()
- loadi 8[PC], t0
- assertNotConstant(t0)
- bineq TagOffset[cfr, t0, 8], CellTag, .opCreateThisSlow
- loadi PayloadOffset[cfr, t0, 8], t0
- loadp JSCell::m_structure[t0], t1
- bbb Structure::m_typeInfo + TypeInfo::m_type[t1], ObjectType, .opCreateThisSlow
- loadp JSObject::m_inheritorID[t0], t2
+ loadp Callee[cfr], t0
+ loadp JSFunction::m_cachedInheritorID[t0], t2
btpz t2, .opCreateThisSlow
allocateBasicJSObject(JSFinalObjectSizeClassIndex, JSGlobalData::jsFinalObjectClassInfo, t2, t0, t1, t3, .opCreateThisSlow)
loadi 4[PC], t1
storei CellTag, TagOffset[cfr, t1, 8]
storei t0, PayloadOffset[cfr, t1, 8]
- dispatch(3)
+ dispatch(2)
.opCreateThisSlow:
callSlowPath(_llint_slow_path_create_this)
- dispatch(3)
-
-
-_llint_op_get_callee:
- traceExecution()
- loadi 4[PC], t0
- loadp PayloadOffset + Callee[cfr], t1
- storei CellTag, TagOffset[cfr, t0, 8]
- storei t1, PayloadOffset[cfr, t0, 8]
dispatch(2)
@@ -1446,8 +1432,9 @@ _llint_op_switch_char:
bineq t1, CellTag, .opSwitchCharFallThrough
loadp JSCell::m_structure[t0], t1
bbneq Structure::m_typeInfo + TypeInfo::m_type[t1], StringType, .opSwitchCharFallThrough
+ bineq JSString::m_length[t0], 1, .opSwitchCharFallThrough
loadp JSString::m_value[t0], t0
- bineq StringImpl::m_length[t0], 1, .opSwitchCharFallThrough
+ btpz t0, .opSwitchOnRope
loadp StringImpl::m_data8[t0], t1
btinz StringImpl::m_hashAndFlags[t0], HashFlags8BitBuffer, .opSwitchChar8Bit
loadh [t1], t0
@@ -1465,6 +1452,10 @@ _llint_op_switch_char:
.opSwitchCharFallThrough:
dispatchBranch(8[PC])
+.opSwitchOnRope:
+ callSlowPath(_llint_slow_path_switch_char)
+ dispatch(0)
+
_llint_op_new_func:
traceExecution()
diff --git a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
index b28051f33..baf246b0b 100644
--- a/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
+++ b/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
@@ -221,29 +221,16 @@ _llint_op_create_arguments:
_llint_op_create_this:
traceExecution()
- loadis 16[PB, PC, 8], t0
- assertNotConstant(t0)
- loadp [cfr, t0, 8], t0
- btpnz t0, tagMask, .opCreateThisSlow
- loadp JSCell::m_structure[t0], t1
- bbb Structure::m_typeInfo + TypeInfo::m_type[t1], ObjectType, .opCreateThisSlow
- loadp JSObject::m_inheritorID[t0], t2
+ loadp Callee[cfr], t0
+ loadp JSFunction::m_cachedInheritorID[t0], t2
btpz t2, .opCreateThisSlow
allocateBasicJSObject(JSFinalObjectSizeClassIndex, JSGlobalData::jsFinalObjectClassInfo, t2, t0, t1, t3, .opCreateThisSlow)
loadis 8[PB, PC, 8], t1
storep t0, [cfr, t1, 8]
- dispatch(3)
+ dispatch(2)
.opCreateThisSlow:
callSlowPath(_llint_slow_path_create_this)
- dispatch(3)
-
-
-_llint_op_get_callee:
- traceExecution()
- loadis 8[PB, PC, 8], t0
- loadp Callee[cfr], t1
- storep t1, [cfr, t0, 8]
dispatch(2)
@@ -1292,8 +1279,9 @@ _llint_op_switch_char:
btpnz t1, tagMask, .opSwitchCharFallThrough
loadp JSCell::m_structure[t1], t0
bbneq Structure::m_typeInfo + TypeInfo::m_type[t0], StringType, .opSwitchCharFallThrough
+ bineq JSString::m_length[t1], 1, .opSwitchCharFallThrough
loadp JSString::m_value[t1], t0
- bineq StringImpl::m_length[t0], 1, .opSwitchCharFallThrough
+ btpz t0, .opSwitchOnRope
loadp StringImpl::m_data8[t0], t1
btinz StringImpl::m_hashAndFlags[t0], HashFlags8BitBuffer, .opSwitchChar8Bit
loadh [t1], t0
@@ -1311,6 +1299,10 @@ _llint_op_switch_char:
.opSwitchCharFallThrough:
dispatchInt(16[PB, PC, 8])
+.opSwitchOnRope:
+ callSlowPath(_llint_slow_path_switch_char)
+ dispatch(0)
+
_llint_op_new_func:
traceExecution()