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

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

Issue 132233012: Revert "Implement in-heap backing store for typed arrays." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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(ConstantPoolArray) \ 57 V(ConstantPoolArray) \
59 V(NativeContext) \ 58 V(NativeContext) \
60 V(AllocationSite) \ 59 V(AllocationSite) \
61 V(DataObject2) \ 60 V(DataObject2) \
62 V(DataObject3) \ 61 V(DataObject3) \
63 V(DataObject4) \ 62 V(DataObject4) \
64 V(DataObject5) \ 63 V(DataObject5) \
65 V(DataObject6) \ 64 V(DataObject6) \
66 V(DataObject7) \ 65 V(DataObject7) \
67 V(DataObject8) \ 66 V(DataObject8) \
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 315
317 INLINE(static int VisitByteArray(Map* map, HeapObject* object)) { 316 INLINE(static int VisitByteArray(Map* map, HeapObject* object)) {
318 return reinterpret_cast<ByteArray*>(object)->ByteArraySize(); 317 return reinterpret_cast<ByteArray*>(object)->ByteArraySize();
319 } 318 }
320 319
321 INLINE(static int VisitFixedDoubleArray(Map* map, HeapObject* object)) { 320 INLINE(static int VisitFixedDoubleArray(Map* map, HeapObject* object)) {
322 int length = reinterpret_cast<FixedDoubleArray*>(object)->length(); 321 int length = reinterpret_cast<FixedDoubleArray*>(object)->length();
323 return FixedDoubleArray::SizeFor(length); 322 return FixedDoubleArray::SizeFor(length);
324 } 323 }
325 324
326 INLINE(static int VisitFixedTypedArray(Map* map, HeapObject* object)) {
327 return reinterpret_cast<FixedTypedArrayBase*>(object)->size();
328 }
329
330 INLINE(static int VisitJSObject(Map* map, HeapObject* object)) { 325 INLINE(static int VisitJSObject(Map* map, HeapObject* object)) {
331 return JSObjectVisitor::Visit(map, object); 326 return JSObjectVisitor::Visit(map, object);
332 } 327 }
333 328
334 INLINE(static int VisitSeqOneByteString(Map* map, HeapObject* object)) { 329 INLINE(static int VisitSeqOneByteString(Map* map, HeapObject* object)) {
335 return SeqOneByteString::cast(object)-> 330 return SeqOneByteString::cast(object)->
336 SeqOneByteStringSize(map->instance_type()); 331 SeqOneByteStringSize(map->instance_type());
337 } 332 }
338 333
339 INLINE(static int VisitSeqTwoByteString(Map* map, HeapObject* object)) { 334 INLINE(static int VisitSeqTwoByteString(Map* map, HeapObject* object)) {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 471
477 472
478 template<typename StaticVisitor> 473 template<typename StaticVisitor>
479 VisitorDispatchTable<typename StaticMarkingVisitor<StaticVisitor>::Callback> 474 VisitorDispatchTable<typename StaticMarkingVisitor<StaticVisitor>::Callback>
480 StaticMarkingVisitor<StaticVisitor>::table_; 475 StaticMarkingVisitor<StaticVisitor>::table_;
481 476
482 477
483 } } // namespace v8::internal 478 } } // namespace v8::internal
484 479
485 #endif // V8_OBJECTS_VISITING_H_ 480 #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