[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
barraclough at apple.com
barraclough at apple.com
Wed Jan 20 22:27:32 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit a119b01284e2ec5c4a5d695efcd92f176b4856fa
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 18 07:28:53 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=33731
Remove uses of PtrAndFlags from JIT data stuctures.
Reviewed by Oliver Hunt.
These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid
permutation of pointer states in MethodCallLinkInfo to represent the removed bits.
* bytecode/CodeBlock.h:
(JSC::CallLinkInfo::seenOnce):
(JSC::CallLinkInfo::setSeen):
(JSC::MethodCallLinkInfo::MethodCallLinkInfo):
(JSC::MethodCallLinkInfo::seenOnce):
(JSC::MethodCallLinkInfo::setSeen):
* jit/JIT.cpp:
(JSC::JIT::unlinkCall):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::patchMethodCallProto):
* runtime/UString.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index d744185..46d65fb 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,25 @@
+2010-01-15 Gavin Barraclough <barraclough at apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33731
+ Remove uses of PtrAndFlags from JIT data stuctures.
+
+ These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid
+ permutation of pointer states in MethodCallLinkInfo to represent the removed bits.
+
+ * bytecode/CodeBlock.h:
+ (JSC::CallLinkInfo::seenOnce):
+ (JSC::CallLinkInfo::setSeen):
+ (JSC::MethodCallLinkInfo::MethodCallLinkInfo):
+ (JSC::MethodCallLinkInfo::seenOnce):
+ (JSC::MethodCallLinkInfo::setSeen):
+ * jit/JIT.cpp:
+ (JSC::JIT::unlinkCall):
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::patchMethodCallProto):
+ * runtime/UString.h:
+
2010-01-16 Maciej Stachowiak <mjs at apple.com>
Reviewed by Oliver Hunt.
diff --git a/JavaScriptCore/bytecode/CodeBlock.h b/JavaScriptCore/bytecode/CodeBlock.h
index eb874cc..4029ed7 100644
--- a/JavaScriptCore/bytecode/CodeBlock.h
+++ b/JavaScriptCore/bytecode/CodeBlock.h
@@ -110,44 +110,56 @@ namespace JSC {
CodeLocationNearCall callReturnLocation;
CodeLocationDataLabelPtr hotPathBegin;
CodeLocationNearCall hotPathOther;
- PtrAndFlags<CodeBlock, HasSeenShouldRepatch> ownerCodeBlock;
+ CodeBlock* ownerCodeBlock;
CodeBlock* callee;
- unsigned position;
+ unsigned position : 31;
+ unsigned hasSeenShouldRepatch : 1;
void setUnlinked() { callee = 0; }
bool isLinked() { return callee; }
bool seenOnce()
{
- return ownerCodeBlock.isFlagSet(hasSeenShouldRepatch);
+ return hasSeenShouldRepatch;
}
void setSeen()
{
- ownerCodeBlock.setFlag(hasSeenShouldRepatch);
+ hasSeenShouldRepatch = true;
}
};
+#define MethodCallLinkInfo_seenFlag ((Structure*)1)
+
struct MethodCallLinkInfo {
MethodCallLinkInfo()
: cachedStructure(0)
+ , cachedPrototypeStructure(0)
{
}
bool seenOnce()
{
- return cachedPrototypeStructure.isFlagSet(hasSeenShouldRepatch);
+ ASSERT(!cachedStructure);
+ return cachedPrototypeStructure;
}
void setSeen()
{
- cachedPrototypeStructure.setFlag(hasSeenShouldRepatch);
+ ASSERT(!cachedStructure && !cachedPrototypeStructure);
+ // We use the values of cachedStructure & cachedPrototypeStructure to indicate the
+ // current state.
+ // - In the initial state, both are null.
+ // - Once this transition has been taken once, cachedStructure is
+ // null and cachedPrototypeStructure is set to a nun-null value.
+ // - Once the call is linked both structures are set to non-null values.
+ cachedPrototypeStructure = MethodCallLinkInfo_seenFlag;
}
CodeLocationCall callReturnLocation;
CodeLocationDataLabelPtr structureLabel;
Structure* cachedStructure;
- PtrAndFlags<Structure, HasSeenShouldRepatch> cachedPrototypeStructure;
+ Structure* cachedPrototypeStructure;
};
struct FunctionRegisterInfo {
diff --git a/JavaScriptCore/jit/JIT.cpp b/JavaScriptCore/jit/JIT.cpp
index c0da66d..a846fb9 100644
--- a/JavaScriptCore/jit/JIT.cpp
+++ b/JavaScriptCore/jit/JIT.cpp
@@ -582,7 +582,7 @@ void JIT::unlinkCall(CallLinkInfo* callLinkInfo)
// When the JSFunction is deleted the pointer embedded in the instruction stream will no longer be valid
// (and, if a new JSFunction happened to be constructed at the same location, we could get a false positive
// match). Reset the check so it no longer matches.
- RepatchBuffer repatchBuffer(callLinkInfo->ownerCodeBlock.get());
+ RepatchBuffer repatchBuffer(callLinkInfo->ownerCodeBlock);
#if USE(JSVALUE32_64)
repatchBuffer.repatch(callLinkInfo->hotPathBegin, 0);
#else
diff --git a/JavaScriptCore/jit/JITPropertyAccess.cpp b/JavaScriptCore/jit/JITPropertyAccess.cpp
index ef95f99..47cef9f 100644
--- a/JavaScriptCore/jit/JITPropertyAccess.cpp
+++ b/JavaScriptCore/jit/JITPropertyAccess.cpp
@@ -644,7 +644,6 @@ void JIT::patchMethodCallProto(CodeBlock* codeBlock, MethodCallLinkInfo& methodC
structure->ref();
Structure* prototypeStructure = proto->structure();
- ASSERT(!methodCallLinkInfo.cachedPrototypeStructure);
methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure;
prototypeStructure->ref();
@@ -1594,7 +1593,6 @@ void JIT::patchMethodCallProto(CodeBlock* codeBlock, MethodCallLinkInfo& methodC
structure->ref();
Structure* prototypeStructure = proto->structure();
- ASSERT(!methodCallLinkInfo.cachedPrototypeStructure);
methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure;
prototypeStructure->ref();
diff --git a/JavaScriptCore/runtime/UString.h b/JavaScriptCore/runtime/UString.h
index 59e296f..ff2afe0 100644
--- a/JavaScriptCore/runtime/UString.h
+++ b/JavaScriptCore/runtime/UString.h
@@ -31,7 +31,6 @@
#include <wtf/CrossThreadRefCounted.h>
#include <wtf/OwnFastMallocPtr.h>
#include <wtf/PassRefPtr.h>
-#include <wtf/PtrAndFlags.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
#include <wtf/unicode/Unicode.h>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list