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

Unified Diff: runtime/platform/hashmap.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/platform/growable_array.h ('k') | runtime/platform/signal_blocker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/hashmap.cc
diff --git a/runtime/platform/hashmap.cc b/runtime/platform/hashmap.cc
index 4a18cb211ca7ded120828c462c3bacf7019b6d88..d5dfba94ae7a33194da8b7527bc3dec5ea8f72e1 100644
--- a/runtime/platform/hashmap.cc
+++ b/runtime/platform/hashmap.cc
@@ -13,12 +13,10 @@ HashMap::HashMap(MatchFun match, uint32_t initial_capacity) {
Initialize(initial_capacity);
}
-
HashMap::~HashMap() {
delete[] map_;
}
-
HashMap::Entry* HashMap::Lookup(void* key, uint32_t hash, bool insert) {
// Find a matching entry.
Entry* p = Probe(key, hash);
@@ -46,7 +44,6 @@ HashMap::Entry* HashMap::Lookup(void* key, uint32_t hash, bool insert) {
return NULL;
}
-
void HashMap::Remove(void* key, uint32_t hash) {
// Lookup the entry for the key to remove.
Entry* candidate = Probe(key, hash);
@@ -109,7 +106,6 @@ void HashMap::Remove(void* key, uint32_t hash) {
occupancy_--;
}
-
void HashMap::Clear(ClearFun clear) {
// Mark all entries as empty.
const Entry* end = map_end();
@@ -122,12 +118,10 @@ void HashMap::Clear(ClearFun clear) {
occupancy_ = 0;
}
-
HashMap::Entry* HashMap::Start() const {
return Next(map_ - 1);
}
-
HashMap::Entry* HashMap::Next(Entry* p) const {
const Entry* end = map_end();
ASSERT(map_ - 1 <= p && p < end);
@@ -139,7 +133,6 @@ HashMap::Entry* HashMap::Next(Entry* p) const {
return NULL;
}
-
HashMap::Entry* HashMap::Probe(void* key, uint32_t hash) {
ASSERT(key != NULL);
@@ -159,7 +152,6 @@ HashMap::Entry* HashMap::Probe(void* key, uint32_t hash) {
return p;
}
-
void HashMap::Initialize(uint32_t capacity) {
ASSERT(dart::Utils::IsPowerOfTwo(capacity));
map_ = new Entry[capacity];
@@ -170,7 +162,6 @@ void HashMap::Initialize(uint32_t capacity) {
occupancy_ = 0;
}
-
void HashMap::Resize() {
Entry* map = map_;
uint32_t n = occupancy_;
« no previous file with comments | « runtime/platform/growable_array.h ('k') | runtime/platform/signal_blocker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698