summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode/CodeBlock.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-18 14:03:11 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-18 14:03:11 +0200
commit8d473cf9743f1d30a16a27114e93bd5af5648d23 (patch)
treecdca40d0353886b3ca52f33a2d7b8f1c0011aafc /Source/JavaScriptCore/bytecode/CodeBlock.h
parent1b914638db989aaa98631a1c1e02c7b2d44805d8 (diff)
downloadqtwebkit-8d473cf9743f1d30a16a27114e93bd5af5648d23.tar.gz
Imported WebKit commit 1350e72f7345ced9da2bd9980deeeb5a8d62fab4 (http://svn.webkit.org/repository/webkit/trunk@117578)
Weekly snapshot
Diffstat (limited to 'Source/JavaScriptCore/bytecode/CodeBlock.h')
-rw-r--r--Source/JavaScriptCore/bytecode/CodeBlock.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h
index 778376f94..fe69ec673 100644
--- a/Source/JavaScriptCore/bytecode/CodeBlock.h
+++ b/Source/JavaScriptCore/bytecode/CodeBlock.h
@@ -309,26 +309,12 @@ namespace JSC {
m_dfgData->weakReferences.append(WriteBarrier<JSCell>(*globalData(), ownerExecutable(), target));
}
- void shrinkWeakReferencesToFit()
- {
- if (!m_dfgData)
- return;
- m_dfgData->weakReferences.shrinkToFit();
- }
-
void appendWeakReferenceTransition(JSCell* codeOrigin, JSCell* from, JSCell* to)
{
createDFGDataIfNecessary();
m_dfgData->transitions.append(
WeakReferenceTransition(*globalData(), ownerExecutable(), codeOrigin, from, to));
}
-
- void shrinkWeakReferenceTransitionsToFit()
- {
- if (!m_dfgData)
- return;
- m_dfgData->transitions.shrinkToFit();
- }
#endif
unsigned bytecodeOffset(Instruction* returnAddress)
@@ -826,7 +812,16 @@ namespace JSC {
EvalCodeCache& evalCodeCache() { createRareDataIfNecessary(); return m_rareData->m_evalCodeCache; }
- void shrinkToFit();
+ enum ShrinkMode {
+ // Shrink prior to generating machine code that may point directly into vectors.
+ EarlyShrink,
+
+ // Shrink after generating machine code, and after possibly creating new vectors
+ // and appending to others. At this time it is not safe to shrink certain vectors
+ // because we would have generated machine code that references them directly.
+ LateShrink
+ };
+ void shrinkToFit(ShrinkMode);
void copyPostParseDataFrom(CodeBlock* alternative);
void copyPostParseDataFromAlternative();