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

Unified Diff: src/heap/objects-visiting.cc

Issue 2763413007: [heap] Remove size specializations in static object visitors. (Closed)
Patch Set: fast body descriptor for js objects Created 3 years, 9 months 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
Index: src/heap/objects-visiting.cc
diff --git a/src/heap/objects-visiting.cc b/src/heap/objects-visiting.cc
index a0df1f50c03800af72fbc0088accd4f3af3e6e4f..cf9fb5ed26210cee5972269ca33ec04195291dd8 100644
--- a/src/heap/objects-visiting.cc
+++ b/src/heap/objects-visiting.cc
@@ -40,8 +40,7 @@ StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId(
return kVisitSlicedString;
case kExternalStringTag:
- return GetVisitorIdForSize(kVisitDataObject, kVisitDataObjectGeneric,
- instance_size, has_unboxed_fields);
+ return kVisitDataObject;
case kThinStringTag:
return kVisitThinString;
@@ -97,8 +96,7 @@ StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId(
return kVisitSharedFunctionInfo;
case JS_PROXY_TYPE:
- return GetVisitorIdForSize(kVisitStruct, kVisitStructGeneric,
- instance_size, has_unboxed_fields);
+ return kVisitStruct;
case SYMBOL_TYPE:
return kVisitSymbol;
@@ -166,24 +164,19 @@ StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId(
case JS_PROMISE_CAPABILITY_TYPE:
case JS_PROMISE_TYPE:
case JS_BOUND_FUNCTION_TYPE:
- return GetVisitorIdForSize(kVisitJSObject, kVisitJSObjectGeneric,
- instance_size, has_unboxed_fields);
+ return has_unboxed_fields ? kVisitJSObject : kVisitJSObjectFast;
case JS_API_OBJECT_TYPE:
case JS_SPECIAL_API_OBJECT_TYPE:
- return GetVisitorIdForSize(kVisitJSApiObject, kVisitJSApiObjectGeneric,
- instance_size, has_unboxed_fields);
+ return kVisitJSApiObject;
case JS_FUNCTION_TYPE:
return kVisitJSFunction;
case FILLER_TYPE:
- if (instance_size == kPointerSize) return kVisitDataObjectGeneric;
- // Fall through.
case FOREIGN_TYPE:
case HEAP_NUMBER_TYPE:
case MUTABLE_HEAP_NUMBER_TYPE:
- return GetVisitorIdForSize(kVisitDataObject, kVisitDataObjectGeneric,
- instance_size, has_unboxed_fields);
+ return kVisitDataObject;
case FIXED_UINT8_ARRAY_TYPE:
case FIXED_INT8_ARRAY_TYPE:
@@ -205,8 +198,7 @@ StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId(
return kVisitAllocationSite;
}
- return GetVisitorIdForSize(kVisitStruct, kVisitStructGeneric,
- instance_size, has_unboxed_fields);
+ return kVisitStruct;
default:
UNREACHABLE();

Powered by Google App Engine
This is Rietveld 408576698