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

Unified Diff: src/objects.cc

Issue 1088993003: Replace OVERRIDE->override and FINAL->final since we now require C++11. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « src/mips64/lithium-mips64.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 4e14108e6e73414962d9f0e2a444f031648fa149..f7eddb21226154e89d80cc205c3e47ffb8c905e8 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -7904,7 +7904,7 @@ class CodeCacheHashTableKey : public HashTableKey {
CodeCacheHashTableKey(Handle<Name> name, Handle<Code> code)
: name_(name), flags_(code->flags()), code_(code) { }
- bool IsMatch(Object* other) OVERRIDE {
+ bool IsMatch(Object* other) override {
if (!other->IsFixedArray()) return false;
FixedArray* pair = FixedArray::cast(other);
Name* name = Name::cast(pair->get(0));
@@ -7919,16 +7919,16 @@ class CodeCacheHashTableKey : public HashTableKey {
return name->Hash() ^ flags;
}
- uint32_t Hash() OVERRIDE { return NameFlagsHashHelper(*name_, flags_); }
+ uint32_t Hash() override { return NameFlagsHashHelper(*name_, flags_); }
- uint32_t HashForObject(Object* obj) OVERRIDE {
+ uint32_t HashForObject(Object* obj) override {
FixedArray* pair = FixedArray::cast(obj);
Name* name = Name::cast(pair->get(0));
Code* code = Code::cast(pair->get(1));
return NameFlagsHashHelper(name, code->flags());
}
- MUST_USE_RESULT Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
+ MUST_USE_RESULT Handle<Object> AsHandle(Isolate* isolate) override {
Handle<Code> code = code_.ToHandleChecked();
Handle<FixedArray> pair = isolate->factory()->NewFixedArray(2);
pair->set(0, *name_);
@@ -8032,7 +8032,7 @@ class PolymorphicCodeCacheHashTableKey : public HashTableKey {
: maps_(maps),
code_flags_(code_flags) {}
- bool IsMatch(Object* other) OVERRIDE {
+ bool IsMatch(Object* other) override {
MapHandleList other_maps(kDefaultListAllocationSize);
int other_flags;
FromObject(other, &other_flags, &other_maps);
@@ -8067,18 +8067,16 @@ class PolymorphicCodeCacheHashTableKey : public HashTableKey {
return hash;
}
- uint32_t Hash() OVERRIDE {
- return MapsHashHelper(maps_, code_flags_);
- }
+ uint32_t Hash() override { return MapsHashHelper(maps_, code_flags_); }
- uint32_t HashForObject(Object* obj) OVERRIDE {
+ uint32_t HashForObject(Object* obj) override {
MapHandleList other_maps(kDefaultListAllocationSize);
int other_flags;
FromObject(obj, &other_flags, &other_maps);
return MapsHashHelper(&other_maps, other_flags);
}
- MUST_USE_RESULT Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
+ MUST_USE_RESULT Handle<Object> AsHandle(Isolate* isolate) override {
// The maps in |maps_| must be copied to a newly allocated FixedArray,
// both because the referenced MapList is short-lived, and because C++
// objects can't be stored in the heap anyway.
@@ -14409,7 +14407,7 @@ class StringSharedKey : public HashTableKey {
language_mode_(language_mode),
scope_position_(scope_position) {}
- bool IsMatch(Object* other) OVERRIDE {
+ bool IsMatch(Object* other) override {
DisallowHeapAllocation no_allocation;
if (!other->IsFixedArray()) {
if (!other->IsNumber()) return false;
@@ -14450,12 +14448,12 @@ class StringSharedKey : public HashTableKey {
return hash;
}
- uint32_t Hash() OVERRIDE {
+ uint32_t Hash() override {
return StringSharedHashHelper(*source_, *shared_, language_mode_,
scope_position_);
}
- uint32_t HashForObject(Object* obj) OVERRIDE {
+ uint32_t HashForObject(Object* obj) override {
DisallowHeapAllocation no_allocation;
if (obj->IsNumber()) {
return static_cast<uint32_t>(obj->Number());
@@ -14472,7 +14470,7 @@ class StringSharedKey : public HashTableKey {
}
- Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
+ Handle<Object> AsHandle(Isolate* isolate) override {
Handle<FixedArray> array = isolate->factory()->NewFixedArray(4);
array->set(0, *shared_);
array->set(1, *source_);
@@ -14500,22 +14498,22 @@ class RegExpKey : public HashTableKey {
// stored value is stored where the key should be. IsMatch then
// compares the search key to the found object, rather than comparing
// a key to a key.
- bool IsMatch(Object* obj) OVERRIDE {
+ bool IsMatch(Object* obj) override {
FixedArray* val = FixedArray::cast(obj);
return string_->Equals(String::cast(val->get(JSRegExp::kSourceIndex)))
&& (flags_ == val->get(JSRegExp::kFlagsIndex));
}
- uint32_t Hash() OVERRIDE { return RegExpHash(*string_, flags_); }
+ uint32_t Hash() override { return RegExpHash(*string_, flags_); }
- Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
+ Handle<Object> AsHandle(Isolate* isolate) override {
// Plain hash maps, which is where regexp keys are used, don't
// use this function.
UNREACHABLE();
return MaybeHandle<Object>().ToHandleChecked();
}
- uint32_t HashForObject(Object* obj) OVERRIDE {
+ uint32_t HashForObject(Object* obj) override {
FixedArray* val = FixedArray::cast(obj);
return RegExpHash(String::cast(val->get(JSRegExp::kSourceIndex)),
Smi::cast(val->get(JSRegExp::kFlagsIndex)));
@@ -14561,17 +14559,17 @@ class InternalizedStringKey : public HashTableKey {
explicit InternalizedStringKey(Handle<String> string)
: string_(string) { }
- bool IsMatch(Object* string) OVERRIDE {
+ bool IsMatch(Object* string) override {
return String::cast(string)->Equals(*string_);
}
- uint32_t Hash() OVERRIDE { return string_->Hash(); }
+ uint32_t Hash() override { return string_->Hash(); }
- uint32_t HashForObject(Object* other) OVERRIDE {
+ uint32_t HashForObject(Object* other) override {
return String::cast(other)->Hash();
}
- Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
+ Handle<Object> AsHandle(Isolate* isolate) override {
// Internalize the string if possible.
MaybeHandle<Map> maybe_map =
isolate->factory()->InternalizedStringMapForString(string_);
@@ -15478,7 +15476,7 @@ class TwoCharHashTableKey : public HashTableKey {
#endif
}
- bool IsMatch(Object* o) OVERRIDE {
+ bool IsMatch(Object* o) override {
if (!o->IsString()) return false;
String* other = String::cast(o);
if (other->length() != 2) return false;
@@ -15486,13 +15484,13 @@ class TwoCharHashTableKey : public HashTableKey {
return other->Get(1) == c2_;
}
- uint32_t Hash() OVERRIDE { return hash_; }
- uint32_t HashForObject(Object* key) OVERRIDE {
+ uint32_t Hash() override { return hash_; }
+ uint32_t HashForObject(Object* key) override {
if (!key->IsString()) return 0;
return String::cast(key)->Hash();
}
- Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
+ Handle<Object> AsHandle(Isolate* isolate) override {
// The TwoCharHashTableKey is only used for looking in the string
// table, not for adding to it.
UNREACHABLE();
@@ -15755,7 +15753,7 @@ class StringsKey : public HashTableKey {
public:
explicit StringsKey(Handle<FixedArray> strings) : strings_(strings) { }
- bool IsMatch(Object* strings) OVERRIDE {
+ bool IsMatch(Object* strings) override {
FixedArray* o = FixedArray::cast(strings);
int len = strings_->length();
if (o->length() != len) return false;
@@ -15765,9 +15763,9 @@ class StringsKey : public HashTableKey {
return true;
}
- uint32_t Hash() OVERRIDE { return HashForObject(*strings_); }
+ uint32_t Hash() override { return HashForObject(*strings_); }
- uint32_t HashForObject(Object* obj) OVERRIDE {
+ uint32_t HashForObject(Object* obj) override {
FixedArray* strings = FixedArray::cast(obj);
int len = strings->length();
uint32_t hash = 0;
@@ -15777,7 +15775,7 @@ class StringsKey : public HashTableKey {
return hash;
}
- Handle<Object> AsHandle(Isolate* isolate) OVERRIDE { return strings_; }
+ Handle<Object> AsHandle(Isolate* isolate) override { return strings_; }
private:
Handle<FixedArray> strings_;
« no previous file with comments | « src/mips64/lithium-mips64.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698