aboutsummaryrefslogtreecommitdiff
path: root/src/ic/stub-cache.cc
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2017-06-06 11:06:27 +0100
committerBen Murdoch <benm@google.com>2017-06-07 12:29:44 +0100
commit62ed631aa0ff23db68a47fd423efa9c019ff2c9e (patch)
tree1df435310690642f8fd4628d6d16462d05ffc797 /src/ic/stub-cache.cc
parentb0475911e4499628ec03ff93ce693450724887c2 (diff)
downloadv8-62ed631aa0ff23db68a47fd423efa9c019ff2c9e.tar.gz
Merge V8 5.8.283.32
Test: Build V8 for arm, arm64, x86, x86_64, mips, mips64 and set a PAC script from the UI on bullhead Change-Id: I7cc773b5daca34d869e768a1deebae3876f2dfac
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);