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

Unified Diff: src/objects-body-descriptors-inl.h

Issue 1469883002: Allow in-object properties in JSFunctions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-body-descriptors-inl.h
diff --git a/src/objects-body-descriptors-inl.h b/src/objects-body-descriptors-inl.h
index b5489ce21912b0c84c29fa547388a0850f73a08e..e8de54d57e00a901263835293905042aa033d79e 100644
--- a/src/objects-body-descriptors-inl.h
+++ b/src/objects-body-descriptors-inl.h
@@ -116,10 +116,7 @@ class JSFunction::BodyDescriptorImpl final : public BodyDescriptorBase {
static bool IsValidSlot(HeapObject* obj, int offset) {
if (offset < kSize) return true;
- // TODO(ishell): v8:4531, fix when JFunctions are allowed to have
- // in-object properties
- // return IsValidSlotImpl(obj, offset);
- return true;
+ return IsValidSlotImpl(obj, offset);
}
template <typename ObjectVisitor>
@@ -134,10 +131,7 @@ class JSFunction::BodyDescriptorImpl final : public BodyDescriptorBase {
if (body_visiting_policy & kVisitNextFunction) {
IteratePointers(obj, kNextFunctionLinkOffset, kSize, v);
}
-
- // TODO(ishell): v8:4531, fix when JFunctions are allowed to have in-object
- // properties
- // IterateBodyImpl(obj, kSize, object_size, v);
+ IterateBodyImpl(obj, kSize, object_size, v);
}
template <typename StaticVisitor>
@@ -154,16 +148,11 @@ class JSFunction::BodyDescriptorImpl final : public BodyDescriptorBase {
if (body_visiting_policy & kVisitNextFunction) {
IteratePointers<StaticVisitor>(heap, obj, kNextFunctionLinkOffset, kSize);
}
-
- // TODO(ishell): v8:4531, fix when JFunctions are allowed to have in-object
- // properties
- // IterateBodyImpl<StaticVisitor>(heap, obj, kSize, object_size);
+ IterateBodyImpl<StaticVisitor>(heap, obj, kSize, object_size);
}
static inline int SizeOf(Map* map, HeapObject* object) {
- // TODO(ishell): v8:4531, fix when JFunctions are allowed to have in-object
- // properties
- return JSFunction::kSize;
+ return map->instance_size();
}
};
@@ -555,14 +544,14 @@ ReturnType BodyDescriptorApply(InstanceType type, T1 p1, T2 p2, T3 p3) {
template <typename ObjectVisitor>
void HeapObject::IterateFast(ObjectVisitor* v) {
BodyDescriptorBase::IteratePointer(this, kMapOffset, v);
- IterateBody(v);
+ IterateBodyFast(v);
}
template <typename ObjectVisitor>
void HeapObject::IterateBodyFast(ObjectVisitor* v) {
Map* m = map();
- IterateBody(m->instance_type(), SizeFromMap(m), v);
+ IterateBodyFast(m->instance_type(), SizeFromMap(m), v);
}
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698