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

Side by Side Diff: src/objects-visiting.h

Issue 101413006: Implement in-heap backing store for typed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: GC fixes Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-printer.cc ('k') | src/objects-visiting.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 29 matching lines...) Expand all
40 // field which contains an index of specialized visitor to use. 40 // field which contains an index of specialized visitor to use.
41 41
42 namespace v8 { 42 namespace v8 {
43 namespace internal { 43 namespace internal {
44 44
45 45
46 // Base class for all static visitors. 46 // Base class for all static visitors.
47 class StaticVisitorBase : public AllStatic { 47 class StaticVisitorBase : public AllStatic {
48 public: 48 public:
49 #define VISITOR_ID_LIST(V) \ 49 #define VISITOR_ID_LIST(V) \
50 V(SeqOneByteString) \ 50 V(SeqOneByteString) \
51 V(SeqTwoByteString) \ 51 V(SeqTwoByteString) \
52 V(ShortcutCandidate) \ 52 V(ShortcutCandidate) \
53 V(ByteArray) \ 53 V(ByteArray) \
54 V(FreeSpace) \ 54 V(FreeSpace) \
55 V(FixedArray) \ 55 V(FixedArray) \
56 V(FixedDoubleArray) \ 56 V(FixedDoubleArray) \
57 V(FixedTypedArray) \
58 V(FixedFloat64Array) \
57 V(ConstantPoolArray) \ 59 V(ConstantPoolArray) \
58 V(NativeContext) \ 60 V(NativeContext) \
59 V(AllocationSite) \ 61 V(AllocationSite) \
60 V(DataObject2) \ 62 V(DataObject2) \
61 V(DataObject3) \ 63 V(DataObject3) \
62 V(DataObject4) \ 64 V(DataObject4) \
63 V(DataObject5) \ 65 V(DataObject5) \
64 V(DataObject6) \ 66 V(DataObject6) \
65 V(DataObject7) \ 67 V(DataObject7) \
66 V(DataObject8) \ 68 V(DataObject8) \
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 317
316 INLINE(static int VisitByteArray(Map* map, HeapObject* object)) { 318 INLINE(static int VisitByteArray(Map* map, HeapObject* object)) {
317 return reinterpret_cast<ByteArray*>(object)->ByteArraySize(); 319 return reinterpret_cast<ByteArray*>(object)->ByteArraySize();
318 } 320 }
319 321
320 INLINE(static int VisitFixedDoubleArray(Map* map, HeapObject* object)) { 322 INLINE(static int VisitFixedDoubleArray(Map* map, HeapObject* object)) {
321 int length = reinterpret_cast<FixedDoubleArray*>(object)->length(); 323 int length = reinterpret_cast<FixedDoubleArray*>(object)->length();
322 return FixedDoubleArray::SizeFor(length); 324 return FixedDoubleArray::SizeFor(length);
323 } 325 }
324 326
327 INLINE(static int VisitFixedTypedArray(Map* map, HeapObject* object)) {
328 return reinterpret_cast<FixedTypedArrayBase*>(object)->size();
329 }
330
325 INLINE(static int VisitJSObject(Map* map, HeapObject* object)) { 331 INLINE(static int VisitJSObject(Map* map, HeapObject* object)) {
326 return JSObjectVisitor::Visit(map, object); 332 return JSObjectVisitor::Visit(map, object);
327 } 333 }
328 334
329 INLINE(static int VisitSeqOneByteString(Map* map, HeapObject* object)) { 335 INLINE(static int VisitSeqOneByteString(Map* map, HeapObject* object)) {
330 return SeqOneByteString::cast(object)-> 336 return SeqOneByteString::cast(object)->
331 SeqOneByteStringSize(map->instance_type()); 337 SeqOneByteStringSize(map->instance_type());
332 } 338 }
333 339
334 INLINE(static int VisitSeqTwoByteString(Map* map, HeapObject* object)) { 340 INLINE(static int VisitSeqTwoByteString(Map* map, HeapObject* object)) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 477
472 478
473 template<typename StaticVisitor> 479 template<typename StaticVisitor>
474 VisitorDispatchTable<typename StaticMarkingVisitor<StaticVisitor>::Callback> 480 VisitorDispatchTable<typename StaticMarkingVisitor<StaticVisitor>::Callback>
475 StaticMarkingVisitor<StaticVisitor>::table_; 481 StaticMarkingVisitor<StaticVisitor>::table_;
476 482
477 483
478 } } // namespace v8::internal 484 } } // namespace v8::internal
479 485
480 #endif // V8_OBJECTS_VISITING_H_ 486 #endif // V8_OBJECTS_VISITING_H_
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/objects-visiting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698