Revision: 13563
Author: [email protected]
Date: Wed Jan 30 09:40:25 2013
Log: Merged r13562 into trunk branch.
Work around a bug in Clang that optimizes away a NULL check
[email protected]
Review URL: https://codereview.chromium.org/12089074
http://code.google.com/p/v8/source/detail?r=13563
Modified:
/trunk/src/spaces.cc
/trunk/src/spaces.h
/trunk/src/version.cc
=======================================
--- /trunk/src/spaces.cc Wed Jan 30 01:39:44 2013
+++ /trunk/src/spaces.cc Wed Jan 30 09:40:25 2013
@@ -710,7 +710,7 @@
void MemoryAllocator::Free(MemoryChunk* chunk) {
LOG(isolate_, DeleteEvent("MemoryChunk", chunk));
- if (chunk->owner() != NULL) {
+ if (chunk->has_owner()) {
ObjectSpace space =
static_cast<ObjectSpace>(1 << chunk->owner()->identity());
PerformAllocationCallback(space, kAllocationActionFree, chunk->size());
=======================================
--- /trunk/src/spaces.h Wed Jan 30 01:39:44 2013
+++ /trunk/src/spaces.h Wed Jan 30 09:40:25 2013
@@ -332,6 +332,14 @@
ASSERT((reinterpret_cast<intptr_t>(owner_) & kFailureTagMask) ==
kFailureTag);
}
+
+ // Workaround for a bug in Clang-3.3 which in some situations optimizes
away
+ // an "if (chunk->owner() != NULL)" check.
+ bool has_owner() {
+ if (owner_ == 0) return false;
+ if (reinterpret_cast<intptr_t>(owner_) == kFailureTag) return false;
+ return true;
+ }
VirtualMemory* reserved_memory() {
return &reservation_;
=======================================
--- /trunk/src/version.cc Wed Jan 30 01:39:44 2013
+++ /trunk/src/version.cc Wed Jan 30 09:40:25 2013
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 16
#define BUILD_NUMBER 11
-#define PATCH_LEVEL 0
+#define PATCH_LEVEL 1
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.