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

Side by Side Diff: src/objects.h

Issue 637253004: Use smi zero instead of undefine_value to zap dead weak cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 6 years, 2 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/heap/objects-visiting-inl.h ('k') | src/objects.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 9577 matching lines...) Expand 10 before | Expand all | Expand 10 after
9588 kSize> BodyDescriptor; 9588 kSize> BodyDescriptor;
9589 9589
9590 private: 9590 private:
9591 DECL_ACCESSORS(type_raw, Object) 9591 DECL_ACCESSORS(type_raw, Object)
9592 DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell); 9592 DISALLOW_IMPLICIT_CONSTRUCTORS(PropertyCell);
9593 }; 9593 };
9594 9594
9595 9595
9596 class WeakCell : public HeapObject { 9596 class WeakCell : public HeapObject {
9597 public: 9597 public:
9598 inline HeapObject* value() const; 9598 inline Object* value() const;
9599 9599
9600 // This should not be called by anyone except GC. 9600 // This should not be called by anyone except GC.
9601 inline void clear(HeapObject* undefined); 9601 inline void clear();
9602 9602
9603 // This should not be called by anyone except allocator. 9603 // This should not be called by anyone except allocator.
9604 inline void initialize(HeapObject* value); 9604 inline void initialize(HeapObject* value);
9605 9605
9606 inline bool cleared() const;
9607
9606 DECL_ACCESSORS(next, Object) 9608 DECL_ACCESSORS(next, Object)
9607 9609
9608 DECLARE_CAST(WeakCell) 9610 DECLARE_CAST(WeakCell)
9609 9611
9610 DECLARE_PRINTER(WeakCell) 9612 DECLARE_PRINTER(WeakCell)
9611 DECLARE_VERIFIER(WeakCell) 9613 DECLARE_VERIFIER(WeakCell)
9612 9614
9613 // Layout description. 9615 // Layout description.
9614 static const int kValueOffset = HeapObject::kHeaderSize; 9616 static const int kValueOffset = HeapObject::kHeaderSize;
9615 static const int kNextOffset = kValueOffset + kPointerSize; 9617 static const int kNextOffset = kValueOffset + kPointerSize;
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
10920 } else { 10922 } else {
10921 value &= ~(1 << bit_position); 10923 value &= ~(1 << bit_position);
10922 } 10924 }
10923 return value; 10925 return value;
10924 } 10926 }
10925 }; 10927 };
10926 10928
10927 } } // namespace v8::internal 10929 } } // namespace v8::internal
10928 10930
10929 #endif // V8_OBJECTS_H_ 10931 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698