Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: src/objects-inl.h

Issue 1441453002: Avoid manual object's body traversal in GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments + removed HeapObject::ContentType() Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/heap/spaces.cc ('K') | « src/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 661566fb06df01c2287a882dd968bbe673782204..60611ecda2de98569a90a20a32738fe6ba31fde5 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1490,46 +1490,6 @@ int HeapObject::Size() {
}
-HeapObjectContents HeapObject::ContentType() {
- InstanceType type = map()->instance_type();
- if (type <= LAST_NAME_TYPE) {
- if (type == SYMBOL_TYPE) {
- return HeapObjectContents::kTaggedValues;
- }
- DCHECK(type < FIRST_NONSTRING_TYPE);
- // There are four string representations: sequential strings, external
- // strings, cons strings, and sliced strings.
- // Only the former two contain raw values and no heap pointers (besides the
- // map-word).
- if (((type & kIsIndirectStringMask) != kIsIndirectStringTag))
- return HeapObjectContents::kRawValues;
- else
- return HeapObjectContents::kTaggedValues;
-#if 0
- // TODO(jochen): Enable eventually.
- } else if (type == JS_FUNCTION_TYPE) {
- return HeapObjectContents::kMixedValues;
-#endif
- } else if (type == BYTECODE_ARRAY_TYPE) {
- return HeapObjectContents::kMixedValues;
- } else if (type >= FIRST_FIXED_TYPED_ARRAY_TYPE &&
- type <= LAST_FIXED_TYPED_ARRAY_TYPE) {
- return HeapObjectContents::kMixedValues;
- } else if (type == JS_ARRAY_BUFFER_TYPE) {
- return HeapObjectContents::kMixedValues;
- } else if (type <= LAST_DATA_TYPE) {
- // TODO(jochen): Why do we claim that Code and Map contain only raw values?
- return HeapObjectContents::kRawValues;
- } else {
- if (FLAG_unbox_double_fields) {
- LayoutDescriptorHelper helper(map());
- if (!helper.all_fields_tagged()) return HeapObjectContents::kMixedValues;
- }
- return HeapObjectContents::kTaggedValues;
- }
-}
-
-
double HeapNumber::value() const {
return READ_DOUBLE_FIELD(this, kValueOffset);
}
« src/heap/spaces.cc ('K') | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698