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

Unified Diff: src/heap/heap.cc

Issue 1248483007: Store offset between fixed typed array base and data start in object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 5 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/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 3340a0fd384a3cdf8bb9e11a90b00f9f00b3b249..a799eb524a347de49c36ef83e47e6aea27855468 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4007,6 +4007,10 @@ AllocationResult Heap::AllocateFixedTypedArray(int length,
object->set_map(MapForFixedTypedArray(array_type));
FixedTypedArrayBase* elements = FixedTypedArrayBase::cast(object);
elements->set_base_pointer(elements, SKIP_WRITE_BARRIER);
+ elements->set_external_pointer(
+ reinterpret_cast<void*>(FixedTypedArrayBase::kDataOffset -
+ kHeapObjectTag),
Jarin 2015/07/22 09:00:20 Can't you say ExternalReference::fixed_typed_array
jochen (gone - plz use gerrit) 2015/07/22 09:08:13 done
+ SKIP_WRITE_BARRIER);
elements->set_length(length);
if (initialize) memset(elements->DataPtr(), 0, elements->DataSize());
return elements;
« no previous file with comments | « src/elements-kind.cc ('k') | src/hydrogen.cc » ('j') | src/ia32/lithium-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698