Reviewers: Yang,
Description:
[heap] All immutable roots are either smis or immovable heap objects.
[email protected]
Please review this at https://codereview.chromium.org/1180043002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+5, -2 lines):
M src/heap/heap.cc
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index
bc46cc2cff46d51d2ebaed81bce29d7476d25560..8fb72dc6d9b45b9b82cd92db61873ba0524635f0
100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3316,8 +3316,11 @@ bool
Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) {
bool Heap::RootCanBeTreatedAsConstant(RootListIndex root_index) {
- return !RootCanBeWrittenAfterInitialization(root_index) &&
- !InNewSpace(roots_array_start()[root_index]);
+ if (!RootCanBeWrittenAfterInitialization(root_index)) {
+ DCHECK(!InNewSpace(roots_array_start()[root_index]));
+ return true;
+ }
+ return false;
}
--
--
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/d/optout.