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

Unified Diff: src/compiler/node-cache.cc

Issue 924453002: Fix invalid use of int in Zone. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Windows again... Created 5 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/node-cache.cc
diff --git a/src/compiler/node-cache.cc b/src/compiler/node-cache.cc
index 92a3fa078f38abf78a1f4c0b875dcae7ca406b4c..79c342b44e9b256f38d2e2cecb89692334fd3c7e 100644
--- a/src/compiler/node-cache.cc
+++ b/src/compiler/node-cache.cc
@@ -36,7 +36,7 @@ bool NodeCache<Key, Hash, Pred>::Resize(Zone* zone) {
size_t old_size = size_ + kLinearProbe;
size_ *= 4;
size_t num_entries = size_ + kLinearProbe;
- entries_ = zone->NewArray<Entry>(static_cast<int>(num_entries));
+ entries_ = zone->NewArray<Entry>(num_entries);
memset(entries_, 0, sizeof(Entry) * num_entries);
// Insert the old entries into the new block.
@@ -66,7 +66,7 @@ Node** NodeCache<Key, Hash, Pred>::Find(Zone* zone, Key key) {
if (!entries_) {
// Allocate the initial entries and insert the first entry.
size_t num_entries = kInitialSize + kLinearProbe;
- entries_ = zone->NewArray<Entry>(static_cast<int>(num_entries));
+ entries_ = zone->NewArray<Entry>(num_entries);
size_ = kInitialSize;
memset(entries_, 0, sizeof(Entry) * num_entries);
Entry* entry = &entries_[hash & (kInitialSize - 1)];

Powered by Google App Engine
This is Rietveld 408576698