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

Unified Diff: src/objects-inl.h

Issue 300753002: Fix PathTracer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: also, test case. Created 6 years, 7 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
« src/objects.h ('K') | « src/objects.h ('k') | test/cctest/test-heap.cc » ('j') | 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 31ebbb18c8a42bf0399208099e20ac7f910c2d8c..f17540af484ce2e3b95e31f43ead0dbb4862fa60 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3673,8 +3673,8 @@ void* FixedTypedArrayBase::DataPtr() {
}
-int FixedTypedArrayBase::DataSize() {
- InstanceType instance_type = map()->instance_type();
+int FixedTypedArrayBase::DataSizeFromMap(Map* map) {
+ InstanceType instance_type = map->instance_type();
int element_size;
switch (instance_type) {
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
@@ -3693,7 +3693,12 @@ int FixedTypedArrayBase::DataSize() {
int FixedTypedArrayBase::size() {
- return OBJECT_POINTER_ALIGN(kDataOffset + DataSize());
+ return OBJECT_POINTER_ALIGN(kDataOffset + DataSizeFromMap(map()));
+}
+
+
+int FixedTypedArrayBase::SizeFromMap(Map* map) {
+ return OBJECT_POINTER_ALIGN(kDataOffset + DataSizeFromMap(map));
}
@@ -3951,7 +3956,7 @@ int HeapObject::SizeFromMap(Map* map) {
}
if (instance_type >= FIRST_FIXED_TYPED_ARRAY_TYPE &&
instance_type <= LAST_FIXED_TYPED_ARRAY_TYPE) {
- return reinterpret_cast<FixedTypedArrayBase*>(this)->size();
+ return reinterpret_cast<FixedTypedArrayBase*>(this)->SizeFromMap(map);
}
ASSERT(instance_type == CODE_TYPE);
return reinterpret_cast<Code*>(this)->CodeSize();
« src/objects.h ('K') | « src/objects.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698