OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 { | 369 { |
370 return isAlive(member.get()); | 370 return isAlive(member.get()); |
371 } | 371 } |
372 | 372 |
373 #ifndef NDEBUG | 373 #ifndef NDEBUG |
374 void checkGCInfo(const void*, const GCInfo*); | 374 void checkGCInfo(const void*, const GCInfo*); |
375 #endif | 375 #endif |
376 | 376 |
377 // Macro to declare methods needed for each typed heap. | 377 // Macro to declare methods needed for each typed heap. |
378 #define DECLARE_VISITOR_METHODS(Type) \ | 378 #define DECLARE_VISITOR_METHODS(Type) \ |
379 DEBUG_ONLY(void checkGCInfo(const Type*, const GCInfo*);) \ | 379 DEBUG_ONLY(void checkGCInfo(const Type*, const GCInfo*);) \ |
380 virtual void mark(const Type*, TraceCallback) = 0; \ | 380 virtual void mark(const Type*, TraceCallback) = 0; \ |
381 virtual bool isMarked(const Type*) = 0; | 381 virtual bool isMarked(const Type*) = 0; |
382 | 382 |
383 FOR_EACH_TYPED_HEAP(DECLARE_VISITOR_METHODS) | 383 FOR_EACH_TYPED_HEAP(DECLARE_VISITOR_METHODS) |
384 #undef DECLARE_VISITOR_METHODS | 384 #undef DECLARE_VISITOR_METHODS |
385 | 385 |
386 protected: | 386 protected: |
387 virtual void registerWeakCell(void**, WeakPointerCallback) = 0; | 387 virtual void registerWeakCell(void**, WeakPointerCallback) = 0; |
388 | 388 |
389 private: | 389 private: |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 struct GCInfoTrait { | 656 struct GCInfoTrait { |
657 static const GCInfo* get() | 657 static const GCInfo* get() |
658 { | 658 { |
659 return GCInfoAtBase<typename GetGarbageCollectedBase<T>::type>::get(); | 659 return GCInfoAtBase<typename GetGarbageCollectedBase<T>::type>::get(); |
660 } | 660 } |
661 }; | 661 }; |
662 | 662 |
663 } | 663 } |
664 | 664 |
665 #endif | 665 #endif |
OLD | NEW |