Log Message
Stop making unnecessary copy of CodeBlock Identifier Vector https://bugs.webkit.org/show_bug.cgi?id=119702
Reviewed by Michael Saboff. Make CodeBlock simply use a separate Vector for additional Identifiers and use the UnlinkedCodeBlock for the initial set of identifiers. * bytecode/CodeBlock.cpp: (JSC::CodeBlock::printGetByIdOp): (JSC::dumpStructure): (JSC::dumpChain): (JSC::CodeBlock::printGetByIdCacheStatus): (JSC::CodeBlock::printPutByIdOp): (JSC::CodeBlock::dumpBytecode): (JSC::CodeBlock::CodeBlock): (JSC::CodeBlock::shrinkToFit): * bytecode/CodeBlock.h: (JSC::CodeBlock::numberOfIdentifiers): (JSC::CodeBlock::numberOfAdditionalIdentifiers): (JSC::CodeBlock::addAdditionalIdentifier): (JSC::CodeBlock::identifier): * dfg/DFGDesiredIdentifiers.cpp: (JSC::DFG::DesiredIdentifiers::reallyAdd): * jit/JIT.h: * jit/JITOpcodes.cpp: (JSC::JIT::emitSlow_op_get_arguments_length): * jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_by_id): (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::emitSlow_op_get_by_id): (JSC::JIT::compileGetByIdSlowCase): (JSC::JIT::emitSlow_op_put_by_id): * jit/JITPropertyAccess32_64.cpp: (JSC::JIT::emit_op_get_by_id): (JSC::JIT::compileGetByIdHotPath): (JSC::JIT::compileGetByIdSlowCase): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * llint/LLIntSlowPaths.cpp: (JSC::LLInt::LLINT_SLOW_PATH_DECL):
Modified Paths
- trunk/Source/_javascript_Core/ChangeLog
- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp
- trunk/Source/_javascript_Core/bytecode/CodeBlock.h
- trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.cpp
- trunk/Source/_javascript_Core/jit/JIT.h
- trunk/Source/_javascript_Core/jit/JITOpcodes.cpp
- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp
- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp
- trunk/Source/_javascript_Core/jit/JITStubs.cpp
- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (153961 => 153962)
--- trunk/Source/_javascript_Core/ChangeLog 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-08-12 22:39:13 UTC (rev 153962)
@@ -1,3 +1,47 @@
+2013-08-12 Oliver Hunt <[email protected]>
+
+ Stop making unnecessary copy of CodeBlock Identifier Vector
+ https://bugs.webkit.org/show_bug.cgi?id=119702
+
+ Reviewed by Michael Saboff.
+
+ Make CodeBlock simply use a separate Vector for additional Identifiers
+ and use the UnlinkedCodeBlock for the initial set of identifiers.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::printGetByIdOp):
+ (JSC::dumpStructure):
+ (JSC::dumpChain):
+ (JSC::CodeBlock::printGetByIdCacheStatus):
+ (JSC::CodeBlock::printPutByIdOp):
+ (JSC::CodeBlock::dumpBytecode):
+ (JSC::CodeBlock::CodeBlock):
+ (JSC::CodeBlock::shrinkToFit):
+ * bytecode/CodeBlock.h:
+ (JSC::CodeBlock::numberOfIdentifiers):
+ (JSC::CodeBlock::numberOfAdditionalIdentifiers):
+ (JSC::CodeBlock::addAdditionalIdentifier):
+ (JSC::CodeBlock::identifier):
+ * dfg/DFGDesiredIdentifiers.cpp:
+ (JSC::DFG::DesiredIdentifiers::reallyAdd):
+ * jit/JIT.h:
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emitSlow_op_get_arguments_length):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::emit_op_get_by_id):
+ (JSC::JIT::compileGetByIdHotPath):
+ (JSC::JIT::emitSlow_op_get_by_id):
+ (JSC::JIT::compileGetByIdSlowCase):
+ (JSC::JIT::emitSlow_op_put_by_id):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::emit_op_get_by_id):
+ (JSC::JIT::compileGetByIdHotPath):
+ (JSC::JIT::compileGetByIdSlowCase):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+
2013-08-08 Mark Lam <[email protected]>
Restoring use of StackIterator instead of Interpreter::getStacktrace().
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (153961 => 153962)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-08-12 22:39:13 UTC (rev 153962)
@@ -283,12 +283,12 @@
int r0 = (++it)->u.operand;
int r1 = (++it)->u.operand;
int id0 = (++it)->u.operand;
- out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(r0).data(), registerName(r1).data(), idName(id0, m_identifiers[id0]).data());
+ out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(r0).data(), registerName(r1).data(), idName(id0, identifier(id0)).data());
it += 4; // Increment up to the value profiler.
}
#if ENABLE(JIT) || ENABLE(LLINT) // unused in some configurations
-static void dumpStructure(PrintStream& out, const char* name, ExecState* exec, Structure* structure, Identifier& ident)
+static void dumpStructure(PrintStream& out, const char* name, ExecState* exec, Structure* structure, const Identifier& ident)
{
if (!structure)
return;
@@ -302,7 +302,7 @@
#endif
#if ENABLE(JIT) // unused when not ENABLE(JIT), leading to silly warnings
-static void dumpChain(PrintStream& out, ExecState* exec, StructureChain* chain, Identifier& ident)
+static void dumpChain(PrintStream& out, ExecState* exec, StructureChain* chain, const Identifier& ident)
{
out.printf("chain = %p: [", chain);
bool first = true;
@@ -323,7 +323,7 @@
{
Instruction* instruction = instructions().begin() + location;
- Identifier& ident = identifier(instruction[3].u.operand);
+ const Identifier& ident = identifier(instruction[3].u.operand);
UNUSED_PARAM(ident); // tell the compiler to shut up in certain platform configurations.
@@ -470,7 +470,7 @@
int r0 = (++it)->u.operand;
int id0 = (++it)->u.operand;
int r1 = (++it)->u.operand;
- out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(r1).data());
+ out.printf("[%4d] %s\t %s, %s, %s", location, op, registerName(r0).data(), idName(id0, identifier(id0)).data(), registerName(r1).data());
it += 5;
}
@@ -510,13 +510,13 @@
for (const Instruction* it = begin; it != end; ++it)
dumpBytecode(out, exec, begin, it);
- if (!m_identifiers.isEmpty()) {
+ if (numberOfIdentifiers()) {
out.printf("\nIdentifiers:\n");
size_t i = 0;
do {
- out.printf(" id%u = %s\n", static_cast<unsigned>(i), m_identifiers[i].string().utf8().data());
+ out.printf(" id%u = %s\n", static_cast<unsigned>(i), identifier(i).string().utf8().data());
++i;
- } while (i != m_identifiers.size());
+ } while (i != numberOfIdentifiers());
}
if (!m_constantRegisters.isEmpty()) {
@@ -972,14 +972,14 @@
int id0 = (++it)->u.operand;
int r1 = (++it)->u.operand;
int r2 = (++it)->u.operand;
- out.printf("[%4d] put_getter_setter\t %s, %s, %s, %s", location, registerName(r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(r1).data(), registerName(r2).data());
+ out.printf("[%4d] put_getter_setter\t %s, %s, %s, %s", location, registerName(r0).data(), idName(id0, identifier(id0)).data(), registerName(r1).data(), registerName(r2).data());
break;
}
case op_del_by_id: {
int r0 = (++it)->u.operand;
int r1 = (++it)->u.operand;
int id0 = (++it)->u.operand;
- out.printf("[%4d] del_by_id\t %s, %s, %s", location, registerName(r0).data(), registerName(r1).data(), idName(id0, m_identifiers[id0]).data());
+ out.printf("[%4d] del_by_id\t %s, %s, %s", location, registerName(r0).data(), registerName(r1).data(), idName(id0, identifier(id0)).data());
break;
}
case op_get_by_val: {
@@ -1246,7 +1246,7 @@
int id0 = (++it)->u.operand;
int r1 = (++it)->u.operand;
unsigned attributes = (++it)->u.operand;
- out.printf("[%4d] push_name_scope \t%s, %s, %u", location, idName(id0, m_identifiers[id0]).data(), registerName(r1).data(), attributes);
+ out.printf("[%4d] push_name_scope \t%s, %s, %u", location, idName(id0, identifier(id0)).data(), registerName(r1).data(), attributes);
break;
}
case op_catch: {
@@ -1293,7 +1293,7 @@
int id0 = (++it)->u.operand;
++it; // ResolveType
++it; // depth
- out.printf("[%4d] resolve_scope\t %s, %s", location, registerName(r0).data(), idName(id0, m_identifiers[id0]).data());
+ out.printf("[%4d] resolve_scope\t %s, %s", location, registerName(r0).data(), idName(id0, identifier(id0)).data());
break;
}
case op_get_from_scope: {
@@ -1304,7 +1304,7 @@
++it; // Structure
++it; // Operand
++it; // Skip value profile.
- out.printf("[%4d] get_from_scope\t %s, %s, %s, %d", location, registerName(r0).data(), registerName(r1).data(), idName(id0, m_identifiers[id0]).data(), resolveModeAndType);
+ out.printf("[%4d] get_from_scope\t %s, %s, %s, %d", location, registerName(r0).data(), registerName(r1).data(), idName(id0, identifier(id0)).data(), resolveModeAndType);
break;
}
case op_put_to_scope: {
@@ -1314,7 +1314,7 @@
int resolveModeAndType = (++it)->u.operand;
++it; // Structure
++it; // Operand
- out.printf("[%4d] put_to_scope\t %s, %s, %s, %d", location, registerName(r0).data(), idName(id0, m_identifiers[id0]).data(), registerName(r1).data(), resolveModeAndType);
+ out.printf("[%4d] put_to_scope\t %s, %s, %s, %d", location, registerName(r0).data(), idName(id0, identifier(id0)).data(), registerName(r1).data(), resolveModeAndType);
break;
}
#if ENABLE(LLINT_C_LOOP)
@@ -1491,7 +1491,7 @@
, m_sourceOffset(other.m_sourceOffset)
, m_firstLineColumnOffset(other.m_firstLineColumnOffset)
, m_codeType(other.m_codeType)
- , m_identifiers(other.m_identifiers)
+ , m_additionalIdentifiers(other.m_additionalIdentifiers)
, m_constantRegisters(other.m_constantRegisters)
, m_functionDecls(other.m_functionDecls)
, m_functionExprs(other.m_functionExprs)
@@ -1551,7 +1551,7 @@
#if DUMP_CODE_BLOCK_STATISTICS
liveCodeBlockSet.add(this);
#endif
- setIdentifiers(unlinkedCodeBlock->identifiers());
+
setConstantRegisters(unlinkedCodeBlock->constantRegisters());
if (unlinkedCodeBlock->usesGlobalObject())
m_constantRegisters[unlinkedCodeBlock->globalObjectRegister()].set(*m_vm, ownerExecutable, m_globalObject.get());
@@ -1764,7 +1764,7 @@
}
case op_resolve_scope: {
- Identifier& ident = identifier(pc[i + 2].u.operand);
+ const Identifier& ident = identifier(pc[i + 2].u.operand);
ResolveType type = static_cast<ResolveType>(pc[i + 3].u.operand);
ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), scope, ident, Get, type);
@@ -1782,7 +1782,7 @@
#endif
// get_from_scope dst, scope, id, ResolveModeAndType, Structure, Operand
- Identifier& ident = identifier(pc[i + 3].u.operand);
+ const Identifier& ident = identifier(pc[i + 3].u.operand);
ResolveModeAndType modeAndType = ResolveModeAndType(pc[i + 4].u.operand);
ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), scope, ident, Get, modeAndType.type());
@@ -1795,7 +1795,7 @@
case op_put_to_scope: {
// put_to_scope scope, id, value, ResolveModeAndType, Structure, Operand
- Identifier& ident = identifier(pc[i + 2].u.operand);
+ const Identifier& ident = identifier(pc[i + 2].u.operand);
ResolveModeAndType modeAndType = ResolveModeAndType(pc[i + 4].u.operand);
ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), scope, ident, Put, modeAndType.type());
@@ -2454,7 +2454,7 @@
#endif
if (shrinkMode == EarlyShrink) {
- m_identifiers.shrinkToFit();
+ m_additionalIdentifiers.shrinkToFit();
m_functionDecls.shrinkToFit();
m_functionExprs.shrinkToFit();
m_constantRegisters.shrinkToFit();
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (153961 => 153962)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2013-08-12 22:39:13 UTC (rev 153962)
@@ -655,9 +655,16 @@
// Constant Pool
- size_t numberOfIdentifiers() const { return m_identifiers.size(); }
- void addIdentifier(const Identifier& i) { return m_identifiers.append(i); }
- Identifier& identifier(int index) { return m_identifiers[index]; }
+ size_t numberOfIdentifiers() const { return m_unlinkedCode->numberOfIdentifiers() + numberOfAdditionalIdentifiers(); }
+ size_t numberOfAdditionalIdentifiers() const { return m_additionalIdentifiers.size(); }
+ void addAdditionalIdentifier(const Identifier& i) { return m_additionalIdentifiers.append(i); }
+ const Identifier& identifier(int index) const
+ {
+ size_t unlinkedIdentifiers = m_unlinkedCode->numberOfIdentifiers();
+ if (static_cast<unsigned>(index) < unlinkedIdentifiers)
+ return m_unlinkedCode->identifier(index);
+ return m_additionalIdentifiers[index - unlinkedIdentifiers];
+ }
size_t numberOfConstantRegisters() const { return m_constantRegisters.size(); }
unsigned addConstant(JSValue v)
@@ -963,12 +970,6 @@
void updateAllPredictionsAndCountLiveness(OperationInProgress, unsigned& numberOfLiveNonArgumentValueProfiles, unsigned& numberOfSamplesInProfiles);
#endif
- void setIdentifiers(const Vector<Identifier>& identifiers)
- {
- RELEASE_ASSERT(m_identifiers.isEmpty());
- m_identifiers.appendVector(identifiers);
- }
-
void setConstantRegisters(const Vector<WriteBarrier<Unknown> >& constants)
{
size_t count = constants.size();
@@ -1086,7 +1087,7 @@
SegmentedVector<ObjectAllocationProfile, 8> m_objectAllocationProfiles;
// Constant Pool
- Vector<Identifier> m_identifiers;
+ Vector<Identifier> m_additionalIdentifiers;
COMPILE_ASSERT(sizeof(Register) == sizeof(WriteBarrier<Unknown>), Register_must_be_same_size_as_WriteBarrier_Unknown);
// TODO: This could just be a pointer to m_unlinkedCodeBlock's data, but the DFG mutates
// it, so we're stuck with it for now.
Modified: trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.cpp (153961 => 153962)
--- trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.cpp 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.cpp 2013-08-12 22:39:13 UTC (rev 153962)
@@ -67,7 +67,7 @@
for (unsigned i = 0; i < m_addedIdentifiers.size(); ++i) {
StringImpl* rep = m_addedIdentifiers[i];
ASSERT(rep->hasAtLeastOneRef());
- m_codeBlock->addIdentifier(Identifier(&vm, rep));
+ m_codeBlock->addAdditionalIdentifier(Identifier(&vm, rep));
}
}
Modified: trunk/Source/_javascript_Core/jit/JIT.h (153961 => 153962)
--- trunk/Source/_javascript_Core/jit/JIT.h 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/jit/JIT.h 2013-08-12 22:39:13 UTC (rev 153962)
@@ -538,8 +538,8 @@
void emitJumpSlowCaseIfNotJSCell(int virtualRegisterIndex);
void emitJumpSlowCaseIfNotJSCell(int virtualRegisterIndex, RegisterID tag);
- void compileGetByIdHotPath(Identifier*);
- void compileGetByIdSlowCase(int resultVReg, int baseVReg, Identifier*, Vector<SlowCaseEntry>::iterator&);
+ void compileGetByIdHotPath(const Identifier*);
+ void compileGetByIdSlowCase(int resultVReg, int baseVReg, const Identifier*, Vector<SlowCaseEntry>::iterator&);
void compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, PropertyOffset cachedOffset);
void compileGetDirectOffset(JSObject* base, RegisterID resultTag, RegisterID resultPayload, PropertyOffset cachedOffset);
void compileGetDirectOffset(RegisterID base, RegisterID resultTag, RegisterID resultPayload, RegisterID offset, FinalObjectMode = MayBeFinal);
@@ -612,8 +612,8 @@
void compileBinaryArithOp(OpcodeID, unsigned dst, unsigned src1, unsigned src2, OperandTypes opi);
void compileBinaryArithOpSlowCase(Instruction*, OpcodeID, Vector<SlowCaseEntry>::iterator&, unsigned dst, unsigned src1, unsigned src2, OperandTypes, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase);
- void compileGetByIdHotPath(int baseVReg, Identifier*);
- void compileGetByIdSlowCase(int resultVReg, int baseVReg, Identifier*, Vector<SlowCaseEntry>::iterator&);
+ void compileGetByIdHotPath(int baseVReg, const Identifier*);
+ void compileGetByIdSlowCase(int resultVReg, int baseVReg, const Identifier*, Vector<SlowCaseEntry>::iterator&);
void compileGetDirectOffset(RegisterID base, RegisterID result, PropertyOffset cachedOffset);
void compileGetDirectOffset(JSObject* base, RegisterID result, PropertyOffset cachedOffset);
void compileGetDirectOffset(RegisterID base, RegisterID result, RegisterID offset, RegisterID scratch, FinalObjectMode = MayBeFinal);
Modified: trunk/Source/_javascript_Core/jit/JITOpcodes.cpp (153961 => 153962)
--- trunk/Source/_javascript_Core/jit/JITOpcodes.cpp 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes.cpp 2013-08-12 22:39:13 UTC (rev 153962)
@@ -1093,7 +1093,7 @@
linkSlowCase(iter);
unsigned dst = currentInstruction[1].u.operand;
unsigned base = currentInstruction[2].u.operand;
- Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
+ const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
emitGetVirtualRegister(base, regT0);
JITStubCall stubCall(this, cti_op_get_by_id_generic);
Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp (153961 => 153962)
--- trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2013-08-12 22:39:13 UTC (rev 153962)
@@ -518,7 +518,7 @@
{
unsigned resultVReg = currentInstruction[1].u.operand;
unsigned baseVReg = currentInstruction[2].u.operand;
- Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
+ const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
emitGetVirtualRegister(baseVReg, regT0);
compileGetByIdHotPath(baseVReg, ident);
@@ -526,7 +526,7 @@
emitPutVirtualRegister(resultVReg);
}
-void JIT::compileGetByIdHotPath(int baseVReg, Identifier* ident)
+void JIT::compileGetByIdHotPath(int baseVReg, const Identifier* ident)
{
// As for put_by_id, get_by_id requires the offset of the Structure and the offset of the access to be patched.
// Additionally, for get_by_id we need patch the offset of the branch to the slow case (we patch this to jump
@@ -562,13 +562,13 @@
{
unsigned resultVReg = currentInstruction[1].u.operand;
unsigned baseVReg = currentInstruction[2].u.operand;
- Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
+ const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
compileGetByIdSlowCase(resultVReg, baseVReg, ident, iter);
emitValueProfilingSite(regT4);
}
-void JIT::compileGetByIdSlowCase(int resultVReg, int baseVReg, Identifier* ident, Vector<SlowCaseEntry>::iterator& iter)
+void JIT::compileGetByIdSlowCase(int resultVReg, int baseVReg, const Identifier* ident, Vector<SlowCaseEntry>::iterator& iter)
{
// As for the hot path of get_by_id, above, we ensure that we can use an architecture specific offset
// so that we only need track one pointer into the slow case code - we track a pointer to the location
@@ -628,7 +628,7 @@
void JIT::emitSlow_op_put_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
unsigned baseVReg = currentInstruction[1].u.operand;
- Identifier* ident = &(m_codeBlock->identifier(currentInstruction[2].u.operand));
+ const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[2].u.operand));
unsigned direct = currentInstruction[8].u.operand;
linkSlowCaseIfNotJSCell(iter, baseVReg);
Modified: trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (153961 => 153962)
--- trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2013-08-12 22:39:13 UTC (rev 153962)
@@ -460,7 +460,7 @@
{
int dst = currentInstruction[1].u.operand;
int base = currentInstruction[2].u.operand;
- Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
+ const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
emitLoad(base, regT1, regT0);
emitJumpSlowCaseIfNotJSCell(base, regT1);
@@ -470,7 +470,7 @@
map(m_bytecodeOffset + OPCODE_LENGTH(op_get_by_id), dst, regT1, regT0);
}
-void JIT::compileGetByIdHotPath(Identifier* ident)
+void JIT::compileGetByIdHotPath(const Identifier* ident)
{
// As for put_by_id, get_by_id requires the offset of the Structure and the offset of the access to be patched.
// Additionally, for get_by_id we need patch the offset of the branch to the slow case (we patch this to jump
@@ -511,7 +511,7 @@
emitValueProfilingSite(regT4);
}
-void JIT::compileGetByIdSlowCase(int dst, int base, Identifier* ident, Vector<SlowCaseEntry>::iterator& iter)
+void JIT::compileGetByIdSlowCase(int dst, int base, const Identifier* ident, Vector<SlowCaseEntry>::iterator& iter)
{
// As for the hot path of get_by_id, above, we ensure that we can use an architecture specific offset
// so that we only need track one pointer into the slow case code - we track a pointer to the location
Modified: trunk/Source/_javascript_Core/jit/JITStubs.cpp (153961 => 153962)
--- trunk/Source/_javascript_Core/jit/JITStubs.cpp 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/jit/JITStubs.cpp 2013-08-12 22:39:13 UTC (rev 153962)
@@ -2186,7 +2186,7 @@
ExecState* exec = stackFrame.callFrame;
Instruction* pc = stackFrame.args[0].pc();
- Identifier& ident = exec->codeBlock()->identifier(pc[2].u.operand);
+ const Identifier& ident = exec->codeBlock()->identifier(pc[2].u.operand);
return JSValue::encode(JSScope::resolve(exec, exec->scope(), ident));
}
@@ -2196,7 +2196,7 @@
ExecState* exec = stackFrame.callFrame;
Instruction* pc = stackFrame.args[0].pc();
- Identifier& ident = exec->codeBlock()->identifier(pc[3].u.operand);
+ const Identifier& ident = exec->codeBlock()->identifier(pc[3].u.operand);
JSObject* scope = jsCast<JSObject*>(exec->uncheckedR(pc[2].u.operand).jsValue());
ResolveModeAndType modeAndType(pc[4].u.operand);
@@ -2229,7 +2229,7 @@
Instruction* pc = stackFrame.args[0].pc();
CodeBlock* codeBlock = exec->codeBlock();
- Identifier& ident = codeBlock->identifier(pc[2].u.operand);
+ const Identifier& ident = codeBlock->identifier(pc[2].u.operand);
JSObject* scope = jsCast<JSObject*>(exec->uncheckedR(pc[1].u.operand).jsValue());
JSValue value = exec->r(pc[3].u.operand).jsValue();
ResolveModeAndType modeAndType = ResolveModeAndType(pc[4].u.operand);
Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (153961 => 153962)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2013-08-12 22:05:07 UTC (rev 153961)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2013-08-12 22:39:13 UTC (rev 153962)
@@ -503,7 +503,7 @@
{
LLINT_BEGIN();
CodeBlock* codeBlock = exec->codeBlock();
- Identifier& ident = codeBlock->identifier(pc[3].u.operand);
+ const Identifier& ident = codeBlock->identifier(pc[3].u.operand);
JSValue baseValue = LLINT_OP_C(2).jsValue();
PropertySlot slot(baseValue);
@@ -557,7 +557,7 @@
{
LLINT_BEGIN();
CodeBlock* codeBlock = exec->codeBlock();
- Identifier& ident = codeBlock->identifier(pc[3].u.operand);
+ const Identifier& ident = codeBlock->identifier(pc[3].u.operand);
JSValue baseValue = LLINT_OP(2).jsValue();
PropertySlot slot(baseValue);
LLINT_RETURN(baseValue.get(exec, ident, slot));
@@ -567,7 +567,7 @@
{
LLINT_BEGIN();
CodeBlock* codeBlock = exec->codeBlock();
- Identifier& ident = codeBlock->identifier(pc[2].u.operand);
+ const Identifier& ident = codeBlock->identifier(pc[2].u.operand);
JSValue baseValue = LLINT_OP_C(1).jsValue();
PutPropertySlot slot(codeBlock->isStrictMode());
@@ -1268,14 +1268,14 @@
LLINT_SLOW_PATH_DECL(slow_path_resolve_scope)
{
LLINT_BEGIN();
- Identifier& ident = exec->codeBlock()->identifier(pc[2].u.operand);
+ const Identifier& ident = exec->codeBlock()->identifier(pc[2].u.operand);
LLINT_RETURN(JSScope::resolve(exec, exec->scope(), ident));
}
LLINT_SLOW_PATH_DECL(slow_path_get_from_scope)
{
LLINT_BEGIN();
- Identifier& ident = exec->codeBlock()->identifier(pc[3].u.operand);
+ const Identifier& ident = exec->codeBlock()->identifier(pc[3].u.operand);
JSObject* scope = jsCast<JSObject*>(LLINT_OP(2).jsValue());
ResolveModeAndType modeAndType(pc[4].u.operand);
@@ -1303,7 +1303,7 @@
{
LLINT_BEGIN();
CodeBlock* codeBlock = exec->codeBlock();
- Identifier& ident = codeBlock->identifier(pc[2].u.operand);
+ const Identifier& ident = codeBlock->identifier(pc[2].u.operand);
JSObject* scope = jsCast<JSObject*>(LLINT_OP(1).jsValue());
JSValue value = LLINT_OP_C(3).jsValue();
ResolveModeAndType modeAndType = ResolveModeAndType(pc[4].u.operand);
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
