diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:09:45 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-22 09:10:13 +0100 |
commit | 470286ecfe79d59df14944e5b5d34630fc739391 (patch) | |
tree | 43983212872e06cebefd2ae474418fa2908ca54c /Source/JavaScriptCore/bytecode/CodeBlock.h | |
parent | 23037105e948c2065da5a937d3a2396b0ff45c1e (diff) | |
download | qtwebkit-470286ecfe79d59df14944e5b5d34630fc739391.tar.gz |
Imported WebKit commit e89504fa9195b2063b2530961d4b73dd08de3242 (http://svn.webkit.org/repository/webkit/trunk@135485)
Change-Id: I03774e5ac79721c13ffa30d152537a74d0b12e66
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/bytecode/CodeBlock.h')
-rw-r--r-- | Source/JavaScriptCore/bytecode/CodeBlock.h | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h index a28064940..63a03630e 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.h +++ b/Source/JavaScriptCore/bytecode/CodeBlock.h @@ -163,7 +163,8 @@ namespace JSC { static void dumpStatistics(); - void dump(ExecState*); + void dump(); + void dump(unsigned bytecodeOffset); void printStructures(const Instruction*); void printStructure(const char* name, const Instruction*, int operand); @@ -245,6 +246,7 @@ namespace JSC { CallLinkInfo& getCallLinkInfo(unsigned bytecodeIndex) { + ASSERT(JITCode::isBaselineCode(getJITType())); return *(binarySearch<CallLinkInfo, unsigned, getCallLinkInfoBytecodeIndex>(m_callLinkInfos.begin(), m_callLinkInfos.size(), bytecodeIndex)); } #endif // ENABLE(JIT) @@ -274,6 +276,11 @@ namespace JSC { { m_incomingCalls.push(incoming); } + + bool isIncomingCallAlreadyLinked(CallLinkInfo* incoming) + { + return m_incomingCalls.isOnList(incoming); + } #endif // ENABLE(JIT) #if ENABLE(LLINT) @@ -755,6 +762,13 @@ namespace JSC { } ArrayProfile* getArrayProfile(unsigned bytecodeOffset); ArrayProfile* getOrAddArrayProfile(unsigned bytecodeOffset); + + unsigned numberOfArrayAllocationProfiles() const { return m_arrayAllocationProfiles.size(); } + ArrayAllocationProfile* addArrayAllocationProfile() + { + m_arrayAllocationProfiles.append(ArrayAllocationProfile()); + return &m_arrayAllocationProfiles.last(); + } #endif // Exception handling support @@ -806,17 +820,7 @@ namespace JSC { return m_rareData && !!m_rareData->m_codeOrigins.size(); } - bool codeOriginForReturn(ReturnAddressPtr returnAddress, CodeOrigin& codeOrigin) - { - if (!hasCodeOrigins()) - return false; - unsigned offset = getJITCode().offsetOf(returnAddress.value()); - CodeOriginAtCallReturnOffset* entry = binarySearch<CodeOriginAtCallReturnOffset, unsigned, getCallReturnOffsetForCodeOrigin>(codeOrigins().begin(), codeOrigins().size(), offset, WTF::KeyMustNotBePresentInArray); - if (entry->callReturnOffset != offset) - return false; - codeOrigin = entry->codeOrigin; - return true; - } + bool codeOriginForReturn(ReturnAddressPtr, CodeOrigin&); CodeOrigin codeOrigin(unsigned index) { @@ -1145,9 +1149,13 @@ namespace JSC { #if ENABLE(VALUE_PROFILER) bool shouldOptimizeNow(); + void updateAllValueProfilePredictions(OperationInProgress = NoOperation); + void updateAllArrayPredictions(OperationInProgress = NoOperation); void updateAllPredictions(OperationInProgress = NoOperation); #else bool shouldOptimizeNow() { return false; } + void updateAllValueProfilePredictions(OperationInProgress = NoOperation) { } + void updateAllArrayPredictions(OperationInProgress = NoOperation) { } void updateAllPredictions(OperationInProgress = NoOperation) { } #endif @@ -1176,6 +1184,10 @@ namespace JSC { private: friend class DFGCodeBlocks; + +#if ENABLE(JIT) + ClosureCallStubRoutine* findClosureCallForReturnPC(ReturnAddressPtr); +#endif #if ENABLE(DFG_JIT) void tallyFrequentExitSites(); @@ -1200,17 +1212,17 @@ namespace JSC { m_constantRegisters[i].set(*m_globalData, ownerExecutable(), constants[i].get()); } - void dump(ExecState*, const Vector<Instruction>::const_iterator& begin, Vector<Instruction>::const_iterator&); + void dump(ExecState*, const Instruction* begin, const Instruction*&); CString registerName(ExecState*, int r) const; - void printUnaryOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op); - void printBinaryOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op); - void printConditionalJump(ExecState*, const Vector<Instruction>::const_iterator&, Vector<Instruction>::const_iterator&, int location, const char* op); - void printGetByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&); + void printUnaryOp(ExecState*, int location, const Instruction*&, const char* op); + void printBinaryOp(ExecState*, int location, const Instruction*&, const char* op); + void printConditionalJump(ExecState*, const Instruction*, const Instruction*&, int location, const char* op); + void printGetByIdOp(ExecState*, int location, const Instruction*&); void printGetByIdCacheStatus(ExecState*, int location); enum CacheDumpMode { DumpCaches, DontDumpCaches }; - void printCallOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op, CacheDumpMode); - void printPutByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op); + void printCallOp(ExecState*, int location, const Instruction*&, const char* op, CacheDumpMode); + void printPutByIdOp(ExecState*, int location, const Instruction*&, const char* op); void visitStructures(SlotVisitor&, Instruction* vPC); #if ENABLE(DFG_JIT) @@ -1228,6 +1240,9 @@ namespace JSC { // allow them to continue to execute soundly. if (m_dfgData->mayBeExecuting) return true; + + if (Options::forceDFGCodeBlockLiveness()) + return true; return false; } @@ -1330,6 +1345,7 @@ namespace JSC { SegmentedVector<ValueProfile, 8> m_valueProfiles; SegmentedVector<RareCaseProfile, 8> m_rareCaseProfiles; SegmentedVector<RareCaseProfile, 8> m_specialFastCaseProfiles; + SegmentedVector<ArrayAllocationProfile, 8> m_arrayAllocationProfiles; ArrayProfileVector m_arrayProfiles; unsigned m_executionEntryCount; #endif |