| OLD | NEW |
| 1 // Copyright (c) 2014, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 #ifndef SRC_VM_OBJECT_MAP_H_ | 5 #ifndef SRC_VM_OBJECT_MAP_H_ |
| 6 #define SRC_VM_OBJECT_MAP_H_ | 6 #define SRC_VM_OBJECT_MAP_H_ |
| 7 | 7 |
| 8 #include "src/vm/object.h" | 8 #include "src/vm/object.h" |
| 9 #include "src/shared/globals.h" | 9 #include "src/shared/globals.h" |
| 10 | 10 |
| 11 namespace fletch { | 11 namespace dartino { |
| 12 | 12 |
| 13 class ObjectMap { | 13 class ObjectMap { |
| 14 public: | 14 public: |
| 15 explicit ObjectMap(int capacity); | 15 explicit ObjectMap(int capacity); |
| 16 virtual ~ObjectMap(); | 16 virtual ~ObjectMap(); |
| 17 | 17 |
| 18 int size() const { return size_; } | 18 int size() const { return size_; } |
| 19 | 19 |
| 20 void Add(int64 id, Object* object); | 20 void Add(int64 id, Object* object); |
| 21 | 21 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 50 void AddToTableByObject(int64 id, Object* object); | 50 void AddToTableByObject(int64 id, Object* object); |
| 51 | 51 |
| 52 bool Expand(); | 52 bool Expand(); |
| 53 | 53 |
| 54 void PopulateTableByObject(); | 54 void PopulateTableByObject(); |
| 55 | 55 |
| 56 static List<Bucket*> NewTable(int length); | 56 static List<Bucket*> NewTable(int length); |
| 57 static void DeleteTable(List<Bucket*> table); | 57 static void DeleteTable(List<Bucket*> table); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 } // namespace fletch | 60 } // namespace dartino |
| 61 | 61 |
| 62 #endif // SRC_VM_OBJECT_MAP_H_ | 62 #endif // SRC_VM_OBJECT_MAP_H_ |
| OLD | NEW |