aboutsummaryrefslogtreecommitdiff
path: root/src/ic/stub-cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ic/stub-cache.cc')
-rw-r--r--src/ic/stub-cache.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ic/stub-cache.cc b/src/ic/stub-cache.cc
index 84dbf484..5fc8cc31 100644
--- a/src/ic/stub-cache.cc
+++ b/src/ic/stub-cache.cc
@@ -6,6 +6,8 @@
#include "src/ast/ast.h"
#include "src/base/bits.h"
+#include "src/counters.h"
+#include "src/heap/heap.h"
#include "src/ic/ic-inl.h"
#include "src/type-info.h"
@@ -99,12 +101,12 @@ void StubCache::Clear() {
Code* empty = isolate_->builtins()->builtin(Builtins::kIllegal);
for (int i = 0; i < kPrimaryTableSize; i++) {
primary_[i].key = isolate()->heap()->empty_string();
- primary_[i].map = NULL;
+ primary_[i].map = nullptr;
primary_[i].value = empty;
}
for (int j = 0; j < kSecondaryTableSize; j++) {
secondary_[j].key = isolate()->heap()->empty_string();
- secondary_[j].map = NULL;
+ secondary_[j].map = nullptr;
secondary_[j].value = empty;
}
}
@@ -116,9 +118,9 @@ void StubCache::CollectMatchingMaps(SmallMapList* types, Handle<Name> name,
for (int i = 0; i < kPrimaryTableSize; i++) {
if (primary_[i].key == *name) {
Map* map = primary_[i].map;
- // Map can be NULL, if the stub is constant function call
+ // Map can be nullptr, if the stub is constant function call
// with a primitive receiver.
- if (map == NULL) continue;
+ if (map == nullptr) continue;
int offset = PrimaryOffset(*name, map);
if (entry(primary_, offset) == &primary_[i] &&
@@ -131,9 +133,9 @@ void StubCache::CollectMatchingMaps(SmallMapList* types, Handle<Name> name,
for (int i = 0; i < kSecondaryTableSize; i++) {
if (secondary_[i].key == *name) {
Map* map = secondary_[i].map;
- // Map can be NULL, if the stub is constant function call
+ // Map can be nullptr, if the stub is constant function call
// with a primitive receiver.
- if (map == NULL) continue;
+ if (map == nullptr) continue;
// Lookup in primary table and skip duplicates.
int primary_offset = PrimaryOffset(*name, map);