summaryrefslogtreecommitdiff
path: root/deps/v8/src/mark-compact-inl.h
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-05-29 15:05:24 -0700
committerisaacs <i@izs.me>2012-06-01 22:31:04 -0700
commitcbdf3393a21690178822c2d6ce2513270d70a02e (patch)
treeebbf375e5d7aa32bf5fe988d2b3fe5fe788b404d /deps/v8/src/mark-compact-inl.h
parent0262b6d2a563e8b96f02c3066b69fed66d956675 (diff)
downloadnode-cbdf3393a21690178822c2d6ce2513270d70a02e.tar.gz
Upgrade v8 to 3.11.7
Diffstat (limited to 'deps/v8/src/mark-compact-inl.h')
-rw-r--r--deps/v8/src/mark-compact-inl.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/deps/v8/src/mark-compact-inl.h b/deps/v8/src/mark-compact-inl.h
index 43f6b8986..2f7e31fea 100644
--- a/deps/v8/src/mark-compact-inl.h
+++ b/deps/v8/src/mark-compact-inl.h
@@ -1,4 +1,4 @@
-// Copyright 2011 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -52,6 +52,15 @@ void MarkCompactCollector::SetFlags(int flags) {
}
+bool MarkCompactCollector::MarkObjectAndPush(HeapObject* obj) {
+ if (MarkObjectWithoutPush(obj)) {
+ marking_deque_.PushBlack(obj);
+ return true;
+ }
+ return false;
+}
+
+
void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) {
ASSERT(Marking::MarkBitFrom(obj) == mark_bit);
if (!mark_bit.Get()) {
@@ -62,16 +71,13 @@ void MarkCompactCollector::MarkObject(HeapObject* obj, MarkBit mark_bit) {
}
-bool MarkCompactCollector::MarkObjectWithoutPush(HeapObject* object) {
- MarkBit mark = Marking::MarkBitFrom(object);
- bool old_mark = mark.Get();
- if (!old_mark) SetMark(object, mark);
- return old_mark;
-}
-
-
-void MarkCompactCollector::MarkObjectAndPush(HeapObject* object) {
- if (!MarkObjectWithoutPush(object)) marking_deque_.PushBlack(object);
+bool MarkCompactCollector::MarkObjectWithoutPush(HeapObject* obj) {
+ MarkBit mark_bit = Marking::MarkBitFrom(obj);
+ if (!mark_bit.Get()) {
+ SetMark(obj, mark_bit);
+ return true;
+ }
+ return false;
}