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

Side by Side Diff: src/vm/void_hash_table.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 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
« no previous file with comments | « src/vm/void_hash_table.h ('k') | src/vm/weak_pointer.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) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 #include <string.h> 5 #include <string.h>
6 6
7 #include "src/vm/void_hash_table.h" 7 #include "src/vm/void_hash_table.h"
8 8
9 namespace fletch { 9 namespace dartino {
10 10
11 VoidHashTable::hash_t VoidHashTable::HashCode(const void* key) { 11 VoidHashTable::hash_t VoidHashTable::HashCode(const void* key) {
12 return reinterpret_cast<intptr_t>(key) & INTPTR_MAX; 12 return reinterpret_cast<intptr_t>(key) & INTPTR_MAX;
13 } 13 }
14 14
15 VoidHashTable::VoidHashTable(size_t pair_size) 15 VoidHashTable::VoidHashTable(size_t pair_size)
16 : entry_size_(sizeof(hash_t) + pair_size), 16 : entry_size_(sizeof(hash_t) + pair_size),
17 mask_(kInitialCapacity - 1) 17 mask_(kInitialCapacity - 1)
18 #ifdef DEBUG 18 #ifdef DEBUG
19 , 19 ,
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 if (size_ == 0) return; 232 if (size_ == 0) return;
233 delete[] backing_; 233 delete[] backing_;
234 #ifdef DEBUG 234 #ifdef DEBUG
235 mutations_++; 235 mutations_++;
236 #endif 236 #endif
237 mask_ = kInitialCapacity - 1; 237 mask_ = kInitialCapacity - 1;
238 size_ = 0; 238 size_ = 0;
239 AllocateBacking(kInitialCapacity); 239 AllocateBacking(kInitialCapacity);
240 } 240 }
241 241
242 } // namespace fletch. 242 } // namespace dartino.
OLDNEW
« no previous file with comments | « src/vm/void_hash_table.h ('k') | src/vm/weak_pointer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698