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

Side by Side Diff: runtime/vm/freelist.h

Issue 56033002: Compute next field offset correctly. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/object.h » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_FREELIST_H_ 5 #ifndef VM_FREELIST_H_
6 #define VM_FREELIST_H_ 6 #define VM_FREELIST_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bit_set.h" 10 #include "vm/bit_set.h"
(...skipping 25 matching lines...) Expand all
36 static FreeListElement* AsElement(uword addr, intptr_t size); 36 static FreeListElement* AsElement(uword addr, intptr_t size);
37 37
38 static void InitOnce(); 38 static void InitOnce();
39 39
40 // Used to allocate class for free list elements in Object::InitOnce. 40 // Used to allocate class for free list elements in Object::InitOnce.
41 class FakeInstance { 41 class FakeInstance {
42 public: 42 public:
43 FakeInstance() { } 43 FakeInstance() { }
44 static cpp_vtable vtable() { return 0; } 44 static cpp_vtable vtable() { return 0; }
45 static intptr_t InstanceSize() { return 0; } 45 static intptr_t InstanceSize() { return 0; }
46 static intptr_t NextFieldOffset() { return -kWordSize; }
46 static const ClassId kClassId = kFreeListElement; 47 static const ClassId kClassId = kFreeListElement;
47 static bool IsInstance() { return true; } 48 static bool IsInstance() { return true; }
48 49
49 private: 50 private:
50 DISALLOW_ALLOCATION(); 51 DISALLOW_ALLOCATION();
51 DISALLOW_COPY_AND_ASSIGN(FakeInstance); 52 DISALLOW_COPY_AND_ASSIGN(FakeInstance);
52 }; 53 };
53 54
54 private: 55 private:
55 // This layout mirrors the layout of RawObject. 56 // This layout mirrors the layout of RawObject.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 BitSet<kNumLists> free_map_; 100 BitSet<kNumLists> free_map_;
100 101
101 FreeListElement* free_lists_[kNumLists + 1]; 102 FreeListElement* free_lists_[kNumLists + 1];
102 103
103 DISALLOW_COPY_AND_ASSIGN(FreeList); 104 DISALLOW_COPY_AND_ASSIGN(FreeList);
104 }; 105 };
105 106
106 } // namespace dart 107 } // namespace dart
107 108
108 #endif // VM_FREELIST_H_ 109 #endif // VM_FREELIST_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698