Commit 063fc251 authored by Ross McIlroy's avatar Ross McIlroy

Replace OVERRIDE->override and FINAL->final since we now require C++11.

R=jochen@chromium.org

Review URL: https://codereview.chromium.org/1088993003

Cr-Commit-Position: refs/heads/master@{#27937}
parent fde66e2a
......@@ -163,8 +163,6 @@
// V8_HAS_CXX11_ALIGNOF - alignof(type) operator supported
// V8_HAS_CXX11_STATIC_ASSERT - static_assert() supported
// V8_HAS_CXX11_DELETE - deleted functions supported
// V8_HAS_CXX11_FINAL - final marker supported
// V8_HAS_CXX11_OVERRIDE - override marker supported
//
// Compiler-specific feature detection
//
......@@ -231,8 +229,6 @@
# define V8_HAS_CXX11_ALIGNAS (__has_feature(cxx_alignas))
# define V8_HAS_CXX11_STATIC_ASSERT (__has_feature(cxx_static_assert))
# define V8_HAS_CXX11_DELETE (__has_feature(cxx_deleted_functions))
# define V8_HAS_CXX11_FINAL (__has_feature(cxx_override_control))
# define V8_HAS_CXX11_OVERRIDE (__has_feature(cxx_override_control))
#elif defined(__GNUC__)
......
......@@ -74,7 +74,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() override { return false; }
static void PatchBranchIntoNop(MacroAssembler* masm, int pos) {
masm->instr_at_put(pos, (masm->instr_at(pos) & ~B27) | (B24 | B20));
......@@ -197,9 +197,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
inline Major MajorKey() const FINAL { return RecordWrite; }
inline Major MajorKey() const final { return RecordWrite; }
void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) override;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
......@@ -207,7 +207,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
void Activate(Code* code) OVERRIDE {
void Activate(Code* code) override {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}
......@@ -255,7 +255,7 @@ class DirectCEntryStub: public PlatformCodeStub {
void GenerateCall(MacroAssembler* masm, Register target);
private:
bool NeedsImmovableCode() OVERRIDE { return true; }
bool NeedsImmovableCode() override { return true; }
DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
......@@ -287,7 +287,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register r0,
Register r1);
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() override { return false; }
private:
static const int kInlinedProbes = 4;
......
This diff is collapsed.
......@@ -18,7 +18,7 @@ namespace v8 {
namespace internal {
class SafepointGenerator FINAL : public CallWrapper {
class SafepointGenerator final : public CallWrapper {
public:
SafepointGenerator(LCodeGen* codegen,
LPointerMap* pointers,
......@@ -28,9 +28,9 @@ class SafepointGenerator FINAL : public CallWrapper {
deopt_mode_(mode) { }
virtual ~SafepointGenerator() {}
void BeforeCall(int call_size) const OVERRIDE {}
void BeforeCall(int call_size) const override {}
void AfterCall() const OVERRIDE {
void AfterCall() const override {
codegen_->RecordSafepoint(pointers_, deopt_mode_);
}
......@@ -2783,16 +2783,16 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
class DeferredInstanceOfKnownGlobal FINAL : public LDeferredCode {
class DeferredInstanceOfKnownGlobal final : public LDeferredCode {
public:
DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE {
void Generate() override {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_,
&load_bool_);
}
LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() override { return instr_; }
Label* map_check() { return &map_check_; }
Label* load_bool() { return &load_bool_; }
......@@ -3726,14 +3726,14 @@ void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) {
void LCodeGen::DoMathAbs(LMathAbs* instr) {
// Class for deferred case.
class DeferredMathAbsTaggedHeapNumber FINAL : public LDeferredCode {
class DeferredMathAbsTaggedHeapNumber final : public LDeferredCode {
public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE {
void Generate() override {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
}
LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() override { return instr_; }
private:
LMathAbs* instr_;
......@@ -4544,12 +4544,12 @@ void LCodeGen::DoStringAdd(LStringAdd* instr) {
void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
class DeferredStringCharCodeAt FINAL : public LDeferredCode {
class DeferredStringCharCodeAt final : public LDeferredCode {
public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
void Generate() override { codegen()->DoDeferredStringCharCodeAt(instr_); }
LInstruction* instr() override { return instr_; }
private:
LStringCharCodeAt* instr_;
......@@ -4599,14 +4599,14 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) {
void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
class DeferredStringCharFromCode FINAL : public LDeferredCode {
class DeferredStringCharFromCode final : public LDeferredCode {
public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE {
void Generate() override {
codegen()->DoDeferredStringCharFromCode(instr_);
}
LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() override { return instr_; }
private:
LStringCharFromCode* instr_;
......@@ -4677,18 +4677,18 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
class DeferredNumberTagI FINAL : public LDeferredCode {
class DeferredNumberTagI final : public LDeferredCode {
public:
DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE {
void Generate() override {
codegen()->DoDeferredNumberTagIU(instr_,
instr_->value(),
instr_->temp1(),
instr_->temp2(),
SIGNED_INT32);
}
LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() override { return instr_; }
private:
LNumberTagI* instr_;
......@@ -4705,18 +4705,18 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
class DeferredNumberTagU FINAL : public LDeferredCode {
class DeferredNumberTagU final : public LDeferredCode {
public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE {
void Generate() override {
codegen()->DoDeferredNumberTagIU(instr_,
instr_->value(),
instr_->temp1(),
instr_->temp2(),
UNSIGNED_INT32);
}
LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() override { return instr_; }
private:
LNumberTagU* instr_;
......@@ -4800,12 +4800,12 @@ void LCodeGen::DoDeferredNumberTagIU(LInstruction* instr,
void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
class DeferredNumberTagD FINAL : public LDeferredCode {
class DeferredNumberTagD final : public LDeferredCode {
public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
void Generate() override { codegen()->DoDeferredNumberTagD(instr_); }
LInstruction* instr() override { return instr_; }
private:
LNumberTagD* instr_;
......@@ -5018,12 +5018,12 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) {
void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
class DeferredTaggedToI FINAL : public LDeferredCode {
class DeferredTaggedToI final : public LDeferredCode {
public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
void Generate() override { codegen()->DoDeferredTaggedToI(instr_); }
LInstruction* instr() override { return instr_; }
private:
LTaggedToI* instr_;
......@@ -5212,17 +5212,17 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
class DeferredCheckMaps FINAL : public LDeferredCode {
class DeferredCheckMaps final : public LDeferredCode {
public:
DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object)
: LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps());
}
void Generate() OVERRIDE {
void Generate() override {
codegen()->DoDeferredInstanceMigration(instr_, object_);
}
Label* check_maps() { return &check_maps_; }
LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() override { return instr_; }
private:
LCheckMaps* instr_;
......@@ -5343,12 +5343,12 @@ void LCodeGen::DoConstructDouble(LConstructDouble* instr) {
void LCodeGen::DoAllocate(LAllocate* instr) {
class DeferredAllocate FINAL : public LDeferredCode {
class DeferredAllocate final : public LDeferredCode {
public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
void Generate() override { codegen()->DoDeferredAllocate(instr_); }
LInstruction* instr() override { return instr_; }
private:
LAllocate* instr_;
......@@ -5699,12 +5699,12 @@ void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
void LCodeGen::DoStackCheck(LStackCheck* instr) {
class DeferredStackCheck FINAL : public LDeferredCode {
class DeferredStackCheck final : public LDeferredCode {
public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { }
void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
void Generate() override { codegen()->DoDeferredStackCheck(instr_); }
LInstruction* instr() override { return instr_; }
private:
LStackCheck* instr_;
......@@ -5838,7 +5838,7 @@ void LCodeGen::DoDeferredLoadMutableDouble(LLoadFieldByIndex* instr,
void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
class DeferredLoadMutableDouble FINAL : public LDeferredCode {
class DeferredLoadMutableDouble final : public LDeferredCode {
public:
DeferredLoadMutableDouble(LCodeGen* codegen,
LLoadFieldByIndex* instr,
......@@ -5851,10 +5851,10 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
void Generate() OVERRIDE {
void Generate() override {
codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
}
LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() override { return instr_; }
private:
LLoadFieldByIndex* instr_;
......
......@@ -169,7 +169,7 @@ class LCodeGen: public LCodeGenBase {
// Code generation passes. Returns true if code generation should
// continue.
void GenerateBodyInstructionPre(LInstruction* instr) OVERRIDE;
void GenerateBodyInstructionPre(LInstruction* instr) override;
bool GeneratePrologue();
bool GenerateDeferredCode();
bool GenerateJumpTable();
......@@ -265,7 +265,7 @@ class LCodeGen: public LCodeGenBase {
int arguments,
Safepoint::DeoptMode mode);
void RecordAndWritePosition(int position) OVERRIDE;
void RecordAndWritePosition(int position) override;
static Condition TokenToCondition(Token::Value op, bool is_unsigned);
void EmitGoto(int block);
......@@ -314,7 +314,7 @@ class LCodeGen: public LCodeGenBase {
int* offset,
AllocationSiteMode mode);
void EnsureSpaceForLazyDeopt(int space_needed) OVERRIDE;
void EnsureSpaceForLazyDeopt(int space_needed) override;
void DoLoadKeyedExternalArray(LLoadKeyed* instr);
void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr);
void DoLoadKeyedFixedArray(LLoadKeyed* instr);
......@@ -344,7 +344,7 @@ class LCodeGen: public LCodeGenBase {
Safepoint::Kind expected_safepoint_kind_;
class PushSafepointRegistersScope FINAL BASE_EMBEDDED {
class PushSafepointRegistersScope final BASE_EMBEDDED {
public:
explicit PushSafepointRegistersScope(LCodeGen* codegen)
: codegen_(codegen) {
......
......@@ -15,7 +15,7 @@ namespace internal {
class LCodeGen;
class LGapResolver;
class LGapResolver FINAL BASE_EMBEDDED {
class LGapResolver final BASE_EMBEDDED {
public:
explicit LGapResolver(LCodeGen* owner);
......
......@@ -97,7 +97,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() override { return false; }
static Mode GetMode(Code* stub) {
// Find the mode depending on the first two instructions.
......@@ -275,9 +275,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
inline Major MajorKey() const FINAL { return RecordWrite; }
inline Major MajorKey() const final { return RecordWrite; }
void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) override;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
......@@ -285,7 +285,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
void Activate(Code* code) OVERRIDE {
void Activate(Code* code) override {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}
......@@ -328,7 +328,7 @@ class DirectCEntryStub: public PlatformCodeStub {
void GenerateCall(MacroAssembler* masm, Register target);
private:
bool NeedsImmovableCode() OVERRIDE { return true; }
bool NeedsImmovableCode() override { return true; }
DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
......@@ -360,7 +360,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register scratch1,
Register scratch2);
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() override { return false; }
private:
static const int kInlinedProbes = 4;
......
This diff is collapsed.
......@@ -18,7 +18,7 @@ namespace v8 {
namespace internal {
class SafepointGenerator FINAL : public CallWrapper {
class SafepointGenerator final : public CallWrapper {
public:
SafepointGenerator(LCodeGen* codegen,
LPointerMap* pointers,
......@@ -5941,7 +5941,7 @@ void LCodeGen::DoDeferredLoadMutableDouble(LLoadFieldByIndex* instr,
void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
class DeferredLoadMutableDouble FINAL : public LDeferredCode {
class DeferredLoadMutableDouble final : public LDeferredCode {
public:
DeferredLoadMutableDouble(LCodeGen* codegen,
LLoadFieldByIndex* instr,
......@@ -5954,10 +5954,10 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
void Generate() OVERRIDE {
void Generate() override {
codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
}
LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() override { return instr_; }
private:
LLoadFieldByIndex* instr_;
......
......@@ -276,7 +276,7 @@ class LCodeGen: public LCodeGenBase {
void RestoreCallerDoubles();
// Code generation steps. Returns true if code generation should continue.
void GenerateBodyInstructionPre(LInstruction* instr) OVERRIDE;
void GenerateBodyInstructionPre(LInstruction* instr) override;
bool GeneratePrologue();
bool GenerateDeferredCode();
bool GenerateJumpTable();
......@@ -324,7 +324,7 @@ class LCodeGen: public LCodeGenBase {
LInstruction* instr);
// Support for recording safepoint and position information.
void RecordAndWritePosition(int position) OVERRIDE;
void RecordAndWritePosition(int position) override;
void RecordSafepoint(LPointerMap* pointers,
Safepoint::Kind kind,
int arguments,
......@@ -337,7 +337,7 @@ class LCodeGen: public LCodeGenBase {
void RecordSafepointWithLazyDeopt(LInstruction* instr,
SafepointMode safepoint_mode);
void EnsureSpaceForLazyDeopt(int space_needed) OVERRIDE;
void EnsureSpaceForLazyDeopt(int space_needed) override;
ZoneList<LEnvironment*> deoptimizations_;
ZoneList<Deoptimizer::JumpTableEntry*> jump_table_;
......
......@@ -14,7 +14,7 @@ namespace internal {
namespace {
struct PerThreadAssertKeyConstructTrait FINAL {
struct PerThreadAssertKeyConstructTrait final {
static void Construct(base::Thread::LocalStorageKey* key) {
*key = base::Thread::CreateThreadLocalKey();
}
......@@ -31,7 +31,7 @@ PerThreadAssertKey kPerThreadAssertKey;
} // namespace
class PerThreadAssertData FINAL {
class PerThreadAssertData final {
public:
PerThreadAssertData() : nesting_level_(0) {
for (int i = 0; i < LAST_PER_THREAD_ASSERT_TYPE; i++) {
......
......@@ -12,7 +12,7 @@ namespace v8 {
namespace internal {
class AstNumberingVisitor FINAL : public AstVisitor {
class AstNumberingVisitor final : public AstVisitor {
public:
explicit AstNumberingVisitor(Isolate* isolate, Zone* zone)
: AstVisitor(),
......@@ -27,14 +27,14 @@ class AstNumberingVisitor FINAL : public AstVisitor {
private:
// AST node visitor interface.
#define DEFINE_VISIT(type) virtual void Visit##type(type* node) OVERRIDE;
#define DEFINE_VISIT(type) virtual void Visit##type(type* node) override;
AST_NODE_LIST(DEFINE_VISIT)
#undef DEFINE_VISIT
bool Finish(FunctionLiteral* node);
void VisitStatements(ZoneList<Statement*>* statements) OVERRIDE;
void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE;
void VisitStatements(ZoneList<Statement*>* statements) override;
void VisitDeclarations(ZoneList<Declaration*>* declarations) override;
void VisitArguments(ZoneList<Expression*>* arguments);
void VisitObjectLiteralProperty(ObjectLiteralProperty* property);
......
......@@ -56,20 +56,20 @@ class AstRawStringInternalizationKey : public HashTableKey {
explicit AstRawStringInternalizationKey(const AstRawString* string)
: string_(string) {}
bool IsMatch(Object* other) OVERRIDE {
bool IsMatch(Object* other) override {
if (string_->is_one_byte_)
return String::cast(other)->IsOneByteEqualTo(string_->literal_bytes_);
return String::cast(other)->IsTwoByteEqualTo(
Vector<const uint16_t>::cast(string_->literal_bytes_));
}
uint32_t Hash() OVERRIDE { return string_->hash() >> Name::kHashShift; }
uint32_t Hash() override { return string_->hash() >> Name::kHashShift; }
uint32_t HashForObject(Object* key) OVERRIDE {
uint32_t HashForObject(Object* key) override {
return String::cast(key)->Hash();
}
Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
Handle<Object> AsHandle(Isolate* isolate) override {
if (string_->is_one_byte_)
return isolate->factory()->NewOneByteInternalizedString(
string_->literal_bytes_, string_->hash());
......
......@@ -64,7 +64,7 @@ class AstString : public ZoneObject {
class AstRawString : public AstString {
public:
int length() const OVERRIDE {
int length() const override {
if (is_one_byte_)
return literal_bytes_.length();
return literal_bytes_.length() / 2;
......@@ -72,7 +72,7 @@ class AstRawString : public AstString {
int byte_length() const { return literal_bytes_.length(); }
void Internalize(Isolate* isolate) OVERRIDE;
void Internalize(Isolate* isolate) override;
bool AsArrayIndex(uint32_t* index) const;
......@@ -121,9 +121,9 @@ class AstConsString : public AstString {
: left_(left),
right_(right) {}
int length() const OVERRIDE { return left_->length() + right_->length(); }
int length() const override { return left_->length() + right_->length(); }
void Internalize(Isolate* isolate) OVERRIDE;
void Internalize(Isolate* isolate) override;
private:
friend class AstValueFactory;
......
......@@ -789,12 +789,12 @@ bool RegExpCapture::IsAnchoredAtEnd() {
// in as many cases as possible, to make it more difficult for incorrect
// parses to look as correct ones which is likely if the input and
// output formats are alike.
class RegExpUnparser FINAL : public RegExpVisitor {
class RegExpUnparser final : public RegExpVisitor {
public:
RegExpUnparser(std::ostream& os, Zone* zone) : os_(os), zone_(zone) {}
void VisitCharacterRange(CharacterRange that);
#define MAKE_CASE(Name) virtual void* Visit##Name(RegExp##Name*, \
void* data) OVERRIDE;
#define MAKE_CASE(Name) \
virtual void* Visit##Name(RegExp##Name*, void* data) override;
FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE)
#undef MAKE_CASE
private:
......
This diff is collapsed.
......@@ -17,31 +17,6 @@
#endif
// Annotate a virtual method indicating it must be overriding a virtual
// method in the parent class.
// Use like:
// virtual void bar() OVERRIDE;
#if V8_HAS_CXX11_OVERRIDE
#define OVERRIDE override
#else
#define OVERRIDE /* NOT SUPPORTED */
#endif
// Annotate a virtual method indicating that subclasses must not override it,
// or annotate a class to indicate that it cannot be subclassed.
// Use like:
// class B FINAL : public A {};
// virtual void bar() FINAL;
#if V8_HAS_CXX11_FINAL
#define FINAL final
#elif V8_HAS___FINAL
#define FINAL __final
#else
#define FINAL /* NOT SUPPORTED */
#endif
// Annotate a function indicating the caller must examine the return value.
// Use like:
// int foo() WARN_UNUSED_RESULT;
......
......@@ -178,7 +178,7 @@ int __detect_mips_arch_revision(void) {
#endif
// Extract the information exposed by the kernel via /proc/cpuinfo.
class CPUInfo FINAL {
class CPUInfo final {
public:
CPUInfo() : datalen_(0) {
// Get the size of the cpuinfo file by reading it until the end. This is
......
......@@ -28,7 +28,7 @@ namespace base {
// architectures. For each architecture the file cpu_<arch>.cc contains the
// implementation of these static functions.
class CPU FINAL {
class CPU final {
public:
CPU();
......
......@@ -20,7 +20,7 @@ namespace base {
// other enum value and passed on to a function that takes an int or unsigned
// int.
template <typename T, typename S = int>
class Flags FINAL {
class Flags final {
public:
typedef T flag_type;
typedef S mask_type;
......
......@@ -28,7 +28,7 @@ class TimeDelta;
// the mutex and suspend the execution of the calling thread. When the condition
// variable is notified, the thread is awakened, and the mutex is reacquired.
class ConditionVariable FINAL {
class ConditionVariable final {
public:
ConditionVariable();
~ConditionVariable();
......@@ -63,7 +63,7 @@ class ConditionVariable FINAL {
typedef pthread_cond_t NativeHandle;
#elif V8_OS_WIN
struct Event;
class NativeHandle FINAL {
class NativeHandle final {
public:
NativeHandle() : waitlist_(NULL), freelist_(NULL) {}
~NativeHandle();
......
......@@ -11,7 +11,7 @@
namespace v8 {
namespace base {
class ElapsedTimer FINAL {
class ElapsedTimer final {
public:
#ifdef DEBUG
ElapsedTimer() : started_(false) {}
......
......@@ -33,7 +33,7 @@ namespace base {
// |TryLock()|. The behavior of a program is undefined if a mutex is destroyed
// while still owned by some thread. The Mutex class is non-copyable.
class Mutex FINAL {
class Mutex final {
public:
Mutex();
~Mutex();
......@@ -127,7 +127,7 @@ typedef LazyStaticInstance<Mutex, DefaultConstructTrait<Mutex>,
// The behavior of a program is undefined if a recursive mutex is destroyed
// while still owned by some thread. The RecursiveMutex class is non-copyable.
class RecursiveMutex FINAL {
class RecursiveMutex final {
public:
RecursiveMutex();
~RecursiveMutex();
......@@ -199,7 +199,7 @@ typedef LazyStaticInstance<RecursiveMutex,
// The LockGuard class is non-copyable.
template <typename Mutex>
class LockGuard FINAL {
class LockGuard final {
public:
explicit LockGuard(Mutex* mutex) : mutex_(mutex) { mutex_->Lock(); }
~LockGuard() { mutex_->Unlock(); }
......
......@@ -31,7 +31,7 @@ class TimeDelta;
// count reaches zero, threads waiting for the semaphore blocks until the
// count becomes non-zero.
class Semaphore FINAL {
class Semaphore final {
public:
explicit Semaphore(int count);
~Semaphore();
......
......@@ -147,7 +147,7 @@ struct timespec TimeDelta::ToTimespec() const {
// We implement time using the high-resolution timers so that we can get
// timeouts which are smaller than 10-15ms. To avoid any drift, we
// periodically resync the internal clock to the system clock.
class Clock FINAL {
class Clock final {
public:
Clock() : initial_ticks_(GetSystemTicks()), initial_time_(GetSystemTime()) {}
......@@ -399,7 +399,7 @@ class TickClock {
// (3) System time. The system time provides a low-resolution (typically 10ms
// to 55 milliseconds) time stamp but is comparatively less expensive to
// retrieve and more reliable.
class HighResolutionTickClock FINAL : public TickClock {
class HighResolutionTickClock final : public TickClock {
public:
explicit HighResolutionTickClock(int64_t ticks_per_second)
: ticks_per_second_(ticks_per_second) {
......@@ -407,7 +407,7 @@ class HighResolutionTickClock FINAL : public TickClock {
}
virtual ~HighResolutionTickClock() {}
int64_t Now() OVERRIDE {
int64_t Now() override {
LARGE_INTEGER now;
BOOL result = QueryPerformanceCounter(&now);
DCHECK(result);
......@@ -425,21 +425,21 @@ class HighResolutionTickClock FINAL : public TickClock {
return ticks + 1;
}
bool IsHighResolution() OVERRIDE { return true; }
bool IsHighResolution() override { return true; }
private:
int64_t ticks_per_second_;
};
class RolloverProtectedTickClock FINAL : public TickClock {
class RolloverProtectedTickClock final : public TickClock {
public:
// We initialize rollover_ms_ to 1 to ensure that we will never
// return 0 from TimeTicks::HighResolutionNow() and TimeTicks::Now() below.
RolloverProtectedTickClock() : last_seen_now_(0), rollover_ms_(1) {}
virtual ~RolloverProtectedTickClock() {}
int64_t Now() OVERRIDE {
int64_t Now() override {
LockGuard<Mutex> lock_guard(&mutex_);
// We use timeGetTime() to implement TimeTicks::Now(), which rolls over
// every ~49.7 days. We try to track rollover ourselves, which works if
......@@ -458,7 +458,7 @@ class RolloverProtectedTickClock FINAL : public TickClock {
return (now + rollover_ms_) * Time::kMicrosecondsPerMillisecond;
}
bool IsHighResolution() OVERRIDE { return false; }
bool IsHighResolution() override { return false; }
private:
Mutex mutex_;
......
......@@ -31,7 +31,7 @@ class TimeTicks;
// This class represents a duration of time, internally represented in
// microseonds.
class TimeDelta FINAL {
class TimeDelta final {
public:
TimeDelta() : delta_(0) {}
......@@ -159,7 +159,7 @@ class TimeDelta FINAL {
// This class represents an absolute point in time, internally represented as
// microseconds (s/1,000,000) since 00:00:00 UTC, January 1, 1970.
class Time FINAL {
class Time final {
public:
static const int64_t kMillisecondsPerSecond = 1000;
static const int64_t kMicrosecondsPerMillisecond = 1000;
......@@ -298,7 +298,7 @@ inline Time operator+(const TimeDelta& delta, const Time& time) {
// Time::Now() may actually decrease or jump). But note that TimeTicks may
// "stand still", for example if the computer suspended.
class TimeTicks FINAL {
class TimeTicks final {
public:
TimeTicks() : ticks_(0) {}
......
......@@ -11,7 +11,7 @@
namespace v8 {
namespace base {
class SysInfo FINAL {
class SysInfo final {
public:
// Returns the number of logical processors/core on the current machine.
static int NumberOfProcessors();
......
......@@ -25,7 +25,7 @@ namespace base {
// https://code.google.com/p/v8/issues/detail?id=2905
// This class is neither reentrant nor threadsafe.
class RandomNumberGenerator FINAL {
class RandomNumberGenerator final {
public:
// EntropySource is used as a callback function when V8 needs a source of
// entropy.
......
......@@ -15,7 +15,7 @@ namespace internal {
// (runtime.js, etc.) to precompiled functions. Instead of mapping
// names to functions it might make sense to let the JS2C tool
// generate an index for each native JS file.
class SourceCodeCache FINAL BASE_EMBEDDED {
class SourceCodeCache final BASE_EMBEDDED {
public:
explicit SourceCodeCache(Script::Type type): type_(type), cache_(NULL) { }
......@@ -64,7 +64,7 @@ class SourceCodeCache FINAL BASE_EMBEDDED {
// The Boostrapper is the public interface for creating a JavaScript global
// context.
class Bootstrapper FINAL {
class Bootstrapper final {
public:
static void InitializeOncePerProcess();
static void TearDownExtensions();
......@@ -126,7 +126,7 @@ class Bootstrapper FINAL {
};
class BootstrapperActive FINAL BASE_EMBEDDED {
class BootstrapperActive final BASE_EMBEDDED {
public:
explicit BootstrapperActive(Bootstrapper* bootstrapper)
: bootstrapper_(bootstrapper) {
......@@ -144,13 +144,13 @@ class BootstrapperActive FINAL BASE_EMBEDDED {
};
class NativesExternalStringResource FINAL
class NativesExternalStringResource final
: public v8::String::ExternalOneByteStringResource {
public:
NativesExternalStringResource(const char* source, size_t length)
: data_(source), length_(length) {}
const char* data() const OVERRIDE { return data_; }
size_t length() const OVERRIDE { return length_; }
const char* data() const override { return data_; }
size_t length() const override { return length_; }
private:
const char* data_;
......
......@@ -15,7 +15,7 @@ namespace v8 {
namespace internal {
// Associates a body of code with an interface descriptor.
class Callable FINAL BASE_EMBEDDED {
class Callable final BASE_EMBEDDED {
public:
Callable(Handle<Code> code, CallInterfaceDescriptor descriptor)
: code_(code), descriptor_(descriptor) {}
......@@ -29,7 +29,7 @@ class Callable FINAL BASE_EMBEDDED {
};
class CodeFactory FINAL {
class CodeFactory final {
public:
// Initial states for ICs.
static Callable LoadGlobalIC(Isolate* isolate, Handle<GlobalObject> global,
......
This diff is collapsed.
......@@ -16,7 +16,7 @@ namespace internal {
class CompilationInfo;
class CompilationStatistics FINAL : public Malloced {
class CompilationStatistics final : public Malloced {
public:
CompilationStatistics() {}
......
This diff is collapsed.
......@@ -14,7 +14,7 @@ namespace compiler {
// This access builder provides a set of static methods constructing commonly
// used FieldAccess and ElementAccess descriptors. These descriptors serve as
// parameters to simplified load/store operators.
class AccessBuilder FINAL : public AllStatic {
class AccessBuilder final : public AllStatic {
public:
// Provides access to HeapObject::map() field.
static FieldAccess ForMap();
......
This diff is collapsed.
This diff is collapsed.
......@@ -25,7 +25,7 @@ enum ImmediateMode {
// Adds Arm64-specific methods for generating operands.
class Arm64OperandGenerator FINAL : public OperandGenerator {
class Arm64OperandGenerator final : public OperandGenerator {
public:
explicit Arm64OperandGenerator(InstructionSelector* selector)
: OperandGenerator(selector) {}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment