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

Unified Diff: src/heap.cc

Issue 17153011: DataView implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes Created 7 years, 6 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
« no previous file with comments | « src/globals.h ('k') | src/macros.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 4243bcab442dba760215358d3b707617185f8adf..06c54a9bc00dde300d3f53c1b9752264a7ac507a 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -1674,24 +1674,24 @@ void Heap::ProcessNativeContexts(WeakObjectRetainer* retainer,
template<>
-struct WeakListVisitor<JSTypedArray> {
- static void SetWeakNext(JSTypedArray* obj, Object* next) {
+struct WeakListVisitor<JSArrayBufferView> {
+ static void SetWeakNext(JSArrayBufferView* obj, Object* next) {
obj->set_weak_next(next);
}
- static Object* WeakNext(JSTypedArray* obj) {
+ static Object* WeakNext(JSArrayBufferView* obj) {
return obj->weak_next();
}
static void VisitLiveObject(Heap*,
- JSTypedArray* obj,
+ JSArrayBufferView* obj,
WeakObjectRetainer* retainer,
bool record_slots) {}
- static void VisitPhantomObject(Heap*, JSTypedArray*) {}
+ static void VisitPhantomObject(Heap*, JSArrayBufferView*) {}
static int WeakNextOffset() {
- return JSTypedArray::kWeakNextOffset;
+ return JSArrayBufferView::kWeakNextOffset;
}
};
@@ -1711,14 +1711,14 @@ struct WeakListVisitor<JSArrayBuffer> {
WeakObjectRetainer* retainer,
bool record_slots) {
Object* typed_array_obj =
- VisitWeakList<JSTypedArray>(
+ VisitWeakList<JSArrayBufferView>(
heap,
- array_buffer->weak_first_array(),
+ array_buffer->weak_first_view(),
retainer, record_slots);
- array_buffer->set_weak_first_array(typed_array_obj);
+ array_buffer->set_weak_first_view(typed_array_obj);
if (typed_array_obj != heap->undefined_value() && record_slots) {
Object** slot = HeapObject::RawField(
- array_buffer, JSArrayBuffer::kWeakFirstArrayOffset);
+ array_buffer, JSArrayBuffer::kWeakFirstViewOffset);
heap->mark_compact_collector()->RecordSlot(slot, slot, typed_array_obj);
}
}
@@ -1937,6 +1937,10 @@ class ScavengingVisitor : public StaticVisitorBase {
&ObjectEvacuationStrategy<POINTER_OBJECT>::
Visit);
+ table_.Register(kVisitJSDataView,
+ &ObjectEvacuationStrategy<POINTER_OBJECT>::
+ Visit);
+
table_.Register(kVisitJSRegExp,
&ObjectEvacuationStrategy<POINTER_OBJECT>::
Visit);
« no previous file with comments | « src/globals.h ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698