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}
This commit is contained in:
Ross McIlroy 2015-04-20 14:08:11 +01:00
parent fde66e2a72
commit 063fc25122
196 changed files with 3551 additions and 3607 deletions

View File

@ -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__)

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -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_;

View File

@ -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) {

View File

@ -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);

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -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_;

View File

@ -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_;

View File

@ -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++) {

View File

@ -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);

View File

@ -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());

View File

@ -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;

View File

@ -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:

448
src/ast.h

File diff suppressed because it is too large Load Diff

View File

@ -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;

View File

@ -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

View File

@ -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();

View File

@ -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;

View File

@ -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();

View File

@ -11,7 +11,7 @@
namespace v8 {
namespace base {
class ElapsedTimer FINAL {
class ElapsedTimer final {
public:
#ifdef DEBUG
ElapsedTimer() : started_(false) {}

View File

@ -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(); }

View File

@ -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();

View File

@ -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_;

View File

@ -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) {}

View File

@ -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();

View File

@ -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.

View File

@ -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_;

View File

@ -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,

View File

@ -305,14 +305,14 @@ struct FakeStubForTesting : public CodeStub {
explicit FakeStubForTesting(Isolate* isolate) : CodeStub(isolate) {}
// Only used by pipeline.cc's GetDebugName in DEBUG mode.
Major MajorKey() const OVERRIDE { return CodeStub::NoCache; }
Major MajorKey() const override { return CodeStub::NoCache; }
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
UNREACHABLE();
return CallInterfaceDescriptor();
}
Handle<Code> GenerateCode() OVERRIDE {
Handle<Code> GenerateCode() override {
UNREACHABLE();
return Handle<Code>();
}
@ -329,30 +329,30 @@ struct FakeStubForTesting : public CodeStub {
#define DEFINE_CODE_STUB(NAME, SUPER) \
protected: \
inline Major MajorKey() const OVERRIDE { return NAME; }; \
inline Major MajorKey() const override { return NAME; }; \
DEFINE_CODE_STUB_BASE(NAME##Stub, SUPER)
#define DEFINE_PLATFORM_CODE_STUB(NAME, SUPER) \
private: \
void Generate(MacroAssembler* masm) OVERRIDE; \
void Generate(MacroAssembler* masm) override; \
DEFINE_CODE_STUB(NAME, SUPER)
#define DEFINE_HYDROGEN_CODE_STUB(NAME, SUPER) \
public: \
void InitializeDescriptor(CodeStubDescriptor* descriptor) OVERRIDE; \
Handle<Code> GenerateCode() OVERRIDE; \
void InitializeDescriptor(CodeStubDescriptor* descriptor) override; \
Handle<Code> GenerateCode() override; \
DEFINE_CODE_STUB(NAME, SUPER)
#define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \
public: \
Handle<Code> GenerateCode() OVERRIDE; \
Handle<Code> GenerateCode() override; \
DEFINE_CODE_STUB(NAME, SUPER)
#define DEFINE_CALL_INTERFACE_DESCRIPTOR(NAME) \
public: \
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE { \
CallInterfaceDescriptor GetCallInterfaceDescriptor() override { \
return NAME##Descriptor(isolate()); \
}
@ -361,7 +361,7 @@ struct FakeStubForTesting : public CodeStub {
// An attempt to retrieve a descriptor will fail.
#define DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR() \
public: \
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE { \
CallInterfaceDescriptor GetCallInterfaceDescriptor() override { \
UNREACHABLE(); \
return CallInterfaceDescriptor(); \
}
@ -370,9 +370,9 @@ struct FakeStubForTesting : public CodeStub {
class PlatformCodeStub : public CodeStub {
public:
// Retrieve the code for the stub. Generate the code if needed.
Handle<Code> GenerateCode() OVERRIDE;
Handle<Code> GenerateCode() override;
Code::Kind GetCodeKind() const OVERRIDE { return Code::STUB; }
Code::Kind GetCodeKind() const override { return Code::STUB; }
protected:
explicit PlatformCodeStub(Isolate* isolate) : CodeStub(isolate) {}
@ -472,7 +472,7 @@ class HydrogenCodeStub : public CodeStub {
INITIALIZED
};
Code::Kind GetCodeKind() const OVERRIDE { return Code::STUB; }
Code::Kind GetCodeKind() const override { return Code::STUB; }
template<class SubClass>
static Handle<Code> GetUninitialized(Isolate* isolate) {
@ -481,7 +481,7 @@ class HydrogenCodeStub : public CodeStub {
}
// Retrieve the code for the stub. Generate the code if needed.
Handle<Code> GenerateCode() OVERRIDE = 0;
Handle<Code> GenerateCode() override = 0;
bool IsUninitialized() const { return IsMissBits::decode(minor_key_); }
@ -581,7 +581,7 @@ class NopRuntimeCallHelper : public RuntimeCallHelper {
};
class NumberToStringStub FINAL : public HydrogenCodeStub {
class NumberToStringStub final : public HydrogenCodeStub {
public:
explicit NumberToStringStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
@ -621,7 +621,7 @@ class FastNewClosureStub : public HydrogenCodeStub {
};
class FastNewContextStub FINAL : public HydrogenCodeStub {
class FastNewContextStub final : public HydrogenCodeStub {
public:
static const int kMaximumSlots = 64;
@ -724,7 +724,7 @@ class InstanceofStub: public PlatformCodeStub {
static Register left() { return InstanceofDescriptor::left(); }
static Register right() { return InstanceofDescriptor::right(); }
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
if (HasArgsInRegisters()) {
return InstanceofDescriptor(isolate());
}
@ -744,7 +744,7 @@ class InstanceofStub: public PlatformCodeStub {
return (flags() & kReturnTrueFalseObject) != 0;
}
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const override; // NOLINT
class FlagBits : public BitField<Flags, 0, 3> {};
@ -775,7 +775,7 @@ class ArrayConstructorStub: public PlatformCodeStub {
void GenerateDispatchToArrayStub(MacroAssembler* masm,
AllocationSiteOverrideMode mode);
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const override; // NOLINT
class ArgumentCountBits : public BitField<ArgumentCountKey, 0, 2> {};
@ -805,7 +805,7 @@ class MathPowStub: public PlatformCodeStub {
minor_key_ = ExponentTypeBits::encode(exponent_type);
}
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
if (exponent_type() == TAGGED) {
return MathPowTaggedDescriptor(isolate());
} else if (exponent_type() == INTEGER) {
@ -838,11 +838,11 @@ class CallICStub: public PlatformCodeStub {
return state.arg_count();
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::CALL_IC; }
Code::Kind GetCodeKind() const override { return Code::CALL_IC; }
InlineCacheState GetICState() const OVERRIDE { return DEFAULT; }
InlineCacheState GetICState() const override { return DEFAULT; }
ExtraICState GetExtraICState() const FINAL {
ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(minor_key_);
}
@ -861,7 +861,7 @@ class CallICStub: public PlatformCodeStub {
void GenerateMiss(MacroAssembler* masm);
private:
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
void PrintState(std::ostream& os) const override; // NOLINT
DEFINE_CALL_INTERFACE_DESCRIPTOR(CallFunctionWithFeedbackAndVector);
DEFINE_PLATFORM_CODE_STUB(CallIC, PlatformCodeStub);
@ -873,10 +873,10 @@ class CallIC_ArrayStub: public CallICStub {
CallIC_ArrayStub(Isolate* isolate, const CallICState& state_in)
: CallICStub(isolate, state_in) {}
InlineCacheState GetICState() const FINAL { return MONOMORPHIC; }
InlineCacheState GetICState() const final { return MONOMORPHIC; }
private:
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
void PrintState(std::ostream& os) const override; // NOLINT
DEFINE_PLATFORM_CODE_STUB(CallIC_Array, CallICStub);
};
@ -888,12 +888,12 @@ class FunctionPrototypeStub : public PlatformCodeStub {
explicit FunctionPrototypeStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
Code::Kind GetCodeKind() const override { return Code::HANDLER; }
// TODO(mvstanton): only the receiver register is accessed. When this is
// translated to a hydrogen code stub, a new CallInterfaceDescriptor
// should be created that just uses that register for more efficient code.
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
if (FLAG_vector_ics) {
return VectorLoadICDescriptor(isolate());
}
@ -910,8 +910,8 @@ class LoadIndexedInterceptorStub : public PlatformCodeStub {
explicit LoadIndexedInterceptorStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
Code::Kind GetCodeKind() const override { return Code::HANDLER; }
Code::StubType GetStubType() const override { return Code::FAST; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
DEFINE_PLATFORM_CODE_STUB(LoadIndexedInterceptor, PlatformCodeStub);
@ -923,8 +923,8 @@ class LoadIndexedStringStub : public PlatformCodeStub {
explicit LoadIndexedStringStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
Code::Kind GetCodeKind() const override { return Code::HANDLER; }
Code::StubType GetStubType() const override { return Code::FAST; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
DEFINE_PLATFORM_CODE_STUB(LoadIndexedString, PlatformCodeStub);
@ -933,13 +933,13 @@ class LoadIndexedStringStub : public PlatformCodeStub {
class HandlerStub : public HydrogenCodeStub {
public:
Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
ExtraICState GetExtraICState() const OVERRIDE { return kind(); }
InlineCacheState GetICState() const OVERRIDE { return MONOMORPHIC; }
Code::Kind GetCodeKind() const override { return Code::HANDLER; }
ExtraICState GetExtraICState() const override { return kind(); }
InlineCacheState GetICState() const override { return MONOMORPHIC; }
void InitializeDescriptor(CodeStubDescriptor* descriptor) OVERRIDE;
void InitializeDescriptor(CodeStubDescriptor* descriptor) override;
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE;
CallInterfaceDescriptor GetCallInterfaceDescriptor() override;
protected:
explicit HandlerStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
@ -963,8 +963,8 @@ class LoadFieldStub: public HandlerStub {
}
protected:
Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
Code::Kind kind() const override { return Code::LOAD_IC; }
Code::StubType GetStubType() const override { return Code::FAST; }
private:
class LoadFieldByIndexBits : public BitField<int, 0, 13> {};
@ -979,8 +979,8 @@ class KeyedLoadSloppyArgumentsStub : public HandlerStub {
: HandlerStub(isolate) {}
protected:
Code::Kind kind() const OVERRIDE { return Code::KEYED_LOAD_IC; }
Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
Code::Kind kind() const override { return Code::KEYED_LOAD_IC; }
Code::StubType GetStubType() const override { return Code::FAST; }
private:
DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub);
@ -999,8 +999,8 @@ class LoadConstantStub : public HandlerStub {
}
protected:
Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
Code::Kind kind() const override { return Code::LOAD_IC; }
Code::StubType GetStubType() const override { return Code::FAST; }
private:
class ConstantIndexBits : public BitField<int, 0, kSubMinorKeyBits> {};
@ -1014,8 +1014,8 @@ class StringLengthStub: public HandlerStub {
explicit StringLengthStub(Isolate* isolate) : HandlerStub(isolate) {}
protected:
Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
Code::Kind kind() const override { return Code::LOAD_IC; }
Code::StubType GetStubType() const override { return Code::FAST; }
DEFINE_HANDLER_CODE_STUB(StringLength, HandlerStub);
};
@ -1043,8 +1043,8 @@ class StoreFieldStub : public HandlerStub {
}
protected:
Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
Code::Kind kind() const override { return Code::STORE_IC; }
Code::StubType GetStubType() const override { return Code::FAST; }
private:
class StoreFieldByIndexBits : public BitField<int, 0, 13> {};
@ -1093,11 +1093,11 @@ class StoreTransitionStub : public HandlerStub {
return StoreModeBits::decode(sub_minor_key());
}
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE;
CallInterfaceDescriptor GetCallInterfaceDescriptor() override;
protected:
Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
Code::Kind kind() const override { return Code::STORE_IC; }
Code::StubType GetStubType() const override { return Code::FAST; }
private:
class StoreFieldByIndexBits : public BitField<int, 0, 13> {};
@ -1137,7 +1137,7 @@ class StoreGlobalStub : public HandlerStub {
}
}
Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
Code::Kind kind() const override { return Code::STORE_IC; }
bool is_constant() const { return IsConstantBits::decode(sub_minor_key()); }
@ -1261,11 +1261,11 @@ class BinaryOpICStub : public HydrogenCodeStub {
static void GenerateAheadOfTime(Isolate* isolate);
Code::Kind GetCodeKind() const OVERRIDE { return Code::BINARY_OP_IC; }
Code::Kind GetCodeKind() const override { return Code::BINARY_OP_IC; }
InlineCacheState GetICState() const FINAL { return state().GetICState(); }
InlineCacheState GetICState() const final { return state().GetICState(); }
ExtraICState GetExtraICState() const FINAL {
ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(sub_minor_key());
}
@ -1273,7 +1273,7 @@ class BinaryOpICStub : public HydrogenCodeStub {
return BinaryOpICState(isolate(), GetExtraICState());
}
void PrintState(std::ostream& os) const FINAL; // NOLINT
void PrintState(std::ostream& os) const final; // NOLINT
// Parameters accessed via CodeStubGraphBuilder::GetParameter()
static const int kLeft = 0;
@ -1290,7 +1290,7 @@ class BinaryOpICStub : public HydrogenCodeStub {
// TODO(bmeurer): Merge this into the BinaryOpICStub once we have proper tail
// call support for stubs in Hydrogen.
class BinaryOpICWithAllocationSiteStub FINAL : public PlatformCodeStub {
class BinaryOpICWithAllocationSiteStub final : public PlatformCodeStub {
public:
BinaryOpICWithAllocationSiteStub(Isolate* isolate,
const BinaryOpICState& state)
@ -1306,15 +1306,15 @@ class BinaryOpICWithAllocationSiteStub FINAL : public PlatformCodeStub {
return CodeStub::GetCodeCopy(pattern);
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::BINARY_OP_IC; }
Code::Kind GetCodeKind() const override { return Code::BINARY_OP_IC; }
InlineCacheState GetICState() const OVERRIDE { return state().GetICState(); }
InlineCacheState GetICState() const override { return state().GetICState(); }
ExtraICState GetExtraICState() const OVERRIDE {
ExtraICState GetExtraICState() const override {
return static_cast<ExtraICState>(minor_key_);
}
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
void PrintState(std::ostream& os) const override; // NOLINT
private:
BinaryOpICState state() const {
@ -1329,7 +1329,7 @@ class BinaryOpICWithAllocationSiteStub FINAL : public PlatformCodeStub {
};
class BinaryOpWithAllocationSiteStub FINAL : public BinaryOpICStub {
class BinaryOpWithAllocationSiteStub final : public BinaryOpICStub {
public:
BinaryOpWithAllocationSiteStub(Isolate* isolate, Token::Value op)
: BinaryOpICStub(isolate, op) {}
@ -1337,7 +1337,7 @@ class BinaryOpWithAllocationSiteStub FINAL : public BinaryOpICStub {
BinaryOpWithAllocationSiteStub(Isolate* isolate, const BinaryOpICState& state)
: BinaryOpICStub(isolate, state) {}
Code::Kind GetCodeKind() const FINAL { return Code::STUB; }
Code::Kind GetCodeKind() const final { return Code::STUB; }
// Parameters accessed via CodeStubGraphBuilder::GetParameter()
static const int kAllocationSite = 0;
@ -1361,7 +1361,7 @@ enum StringAddFlags {
};
class StringAddStub FINAL : public HydrogenCodeStub {
class StringAddStub final : public HydrogenCodeStub {
public:
StringAddStub(Isolate* isolate, StringAddFlags flags,
PretenureFlag pretenure_flag)
@ -1386,7 +1386,7 @@ class StringAddStub FINAL : public HydrogenCodeStub {
class StringAddFlagsBits: public BitField<StringAddFlags, 0, 2> {};
class PretenureFlagBits: public BitField<PretenureFlag, 2, 1> {};
void PrintBaseName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintBaseName(std::ostream& os) const override; // NOLINT
DEFINE_CALL_INTERFACE_DESCRIPTOR(StringAdd);
DEFINE_HYDROGEN_CODE_STUB(StringAdd, HydrogenCodeStub);
@ -1405,7 +1405,7 @@ class CompareICStub : public PlatformCodeStub {
void set_known_map(Handle<Map> map) { known_map_ = map; }
InlineCacheState GetICState() const OVERRIDE;
InlineCacheState GetICState() const override;
Token::Value op() const {
return static_cast<Token::Value>(Token::EQ + OpBits::decode(minor_key_));
@ -1420,7 +1420,7 @@ class CompareICStub : public PlatformCodeStub {
CompareICState::State state() const { return StateBits::decode(minor_key_); }
private:
Code::Kind GetCodeKind() const OVERRIDE { return Code::COMPARE_IC; }
Code::Kind GetCodeKind() const override { return Code::COMPARE_IC; }
void GenerateSmis(MacroAssembler* masm);
void GenerateNumbers(MacroAssembler* masm);
@ -1435,9 +1435,9 @@ class CompareICStub : public PlatformCodeStub {
bool strict() const { return op() == Token::EQ_STRICT; }
Condition GetCondition() const;
void AddToSpecialCache(Handle<Code> new_object) OVERRIDE;
bool FindCodeInSpecialCache(Code** code_out) OVERRIDE;
bool UseSpecialCache() OVERRIDE {
void AddToSpecialCache(Handle<Code> new_object) override;
bool FindCodeInSpecialCache(Code** code_out) override;
bool UseSpecialCache() override {
return state() == CompareICState::KNOWN_OBJECT;
}
@ -1473,7 +1473,7 @@ class CompareNilICStub : public HydrogenCodeStub {
return CompareNilICStub(isolate, nil, UNINITIALIZED).GetCode();
}
InlineCacheState GetICState() const OVERRIDE {
InlineCacheState GetICState() const override {
State state = this->state();
if (state.Contains(GENERIC)) {
return MEGAMORPHIC;
@ -1484,9 +1484,9 @@ class CompareNilICStub : public HydrogenCodeStub {
}
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::COMPARE_NIL_IC; }
Code::Kind GetCodeKind() const override { return Code::COMPARE_NIL_IC; }
ExtraICState GetExtraICState() const OVERRIDE { return sub_minor_key(); }
ExtraICState GetExtraICState() const override { return sub_minor_key(); }
void UpdateStatus(Handle<Object> object);
@ -1498,8 +1498,8 @@ class CompareNilICStub : public HydrogenCodeStub {
set_sub_minor_key(TypesBits::update(sub_minor_key(), 0));
}
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
void PrintBaseName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintState(std::ostream& os) const override; // NOLINT
void PrintBaseName(std::ostream& os) const override; // NOLINT
private:
CompareNilICStub(Isolate* isolate, NilValue nil,
@ -1567,7 +1567,7 @@ class CEntryStub : public PlatformCodeStub {
int result_size() const { return ResultSizeBits::decode(minor_key_); }
#endif // _WIN64
bool NeedsImmovableCode() OVERRIDE;
bool NeedsImmovableCode() override;
class SaveDoublesBits : public BitField<bool, 0, 1> {};
class ResultSizeBits : public BitField<int, 1, 3> {};
@ -1586,9 +1586,9 @@ class JSEntryStub : public PlatformCodeStub {
}
private:
void FinishCode(Handle<Code> code) OVERRIDE;
void FinishCode(Handle<Code> code) override;
void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
void PrintName(std::ostream& os) const override { // NOLINT
os << (type() == StackFrame::ENTRY ? "JSEntryStub"
: "JSConstructEntryStub");
}
@ -1624,7 +1624,7 @@ class ArgumentsAccessStub: public PlatformCodeStub {
TypeBits::encode(type) | HasNewTargetBits::encode(has_new_target);
}
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
if (type() == READ_ELEMENT) {
return ArgumentsAccessReadDescriptor(isolate());
}
@ -1642,7 +1642,7 @@ class ArgumentsAccessStub: public PlatformCodeStub {
void GenerateNewSloppyFast(MacroAssembler* masm);
void GenerateNewSloppySlow(MacroAssembler* masm);
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const override; // NOLINT
class TypeBits : public BitField<Type, 0, 2> {};
class HasNewTargetBits : public BitField<HasNewTarget, 2, 1> {};
@ -1655,14 +1655,14 @@ class RestParamAccessStub: public PlatformCodeStub {
public:
explicit RestParamAccessStub(Isolate* isolate) : PlatformCodeStub(isolate) { }
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
return ContextOnlyDescriptor(isolate());
}
private:
void GenerateNew(MacroAssembler* masm);
virtual void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
virtual void PrintName(std::ostream& os) const override; // NOLINT
DEFINE_PLATFORM_CODE_STUB(RestParamAccess, PlatformCodeStub);
};
@ -1677,7 +1677,7 @@ class RegExpExecStub: public PlatformCodeStub {
};
class RegExpConstructResultStub FINAL : public HydrogenCodeStub {
class RegExpConstructResultStub final : public HydrogenCodeStub {
public:
explicit RegExpConstructResultStub(Isolate* isolate)
: HydrogenCodeStub(isolate) { }
@ -1714,7 +1714,7 @@ class CallFunctionStub: public PlatformCodeStub {
bool NeedsChecks() const { return flags() != WRAP_AND_CALL; }
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const override; // NOLINT
// Minor key encoding in 32 bits with Bitfield <Type, shift, size>.
class FlagBits : public BitField<CallFunctionFlags, 0, 2> {};
@ -1733,7 +1733,7 @@ class CallConstructStub: public PlatformCodeStub {
minor_key_ = FlagBits::encode(flags);
}
void FinishCode(Handle<Code> code) OVERRIDE {
void FinishCode(Handle<Code> code) override {
code->set_has_function_cache(RecordCallTarget());
}
@ -1748,7 +1748,7 @@ class CallConstructStub: public PlatformCodeStub {
return (flags() & SUPER_CONSTRUCTOR_CALL) != 0;
}
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const override; // NOLINT
class FlagBits : public BitField<CallConstructorFlags, 0, 2> {};
@ -1947,7 +1947,7 @@ class LoadDictionaryElementStub : public HydrogenCodeStub {
explicit LoadDictionaryElementStub(Isolate* isolate)
: HydrogenCodeStub(isolate) {}
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
if (FLAG_vector_ics) {
return VectorLoadICDescriptor(isolate());
}
@ -1962,8 +1962,8 @@ class KeyedLoadGenericStub : public HydrogenCodeStub {
public:
explicit KeyedLoadGenericStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
Code::Kind GetCodeKind() const OVERRIDE { return Code::KEYED_LOAD_IC; }
InlineCacheState GetICState() const OVERRIDE { return GENERIC; }
Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
InlineCacheState GetICState() const override { return GENERIC; }
// Since KeyedLoadGeneric stub doesn't miss (simply calls runtime), it
// doesn't need to use the VectorLoadICDescriptor for the case when
@ -1981,11 +1981,11 @@ class LoadICTrampolineStub : public PlatformCodeStub {
minor_key_ = state.GetExtraICState();
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; }
Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
InlineCacheState GetICState() const FINAL { return DEFAULT; }
InlineCacheState GetICState() const final { return DEFAULT; }
ExtraICState GetExtraICState() const FINAL {
ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(minor_key_);
}
@ -2004,7 +2004,7 @@ class KeyedLoadICTrampolineStub : public LoadICTrampolineStub {
explicit KeyedLoadICTrampolineStub(Isolate* isolate)
: LoadICTrampolineStub(isolate, LoadICState(0)) {}
Code::Kind GetCodeKind() const OVERRIDE { return Code::KEYED_LOAD_IC; }
Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub);
};
@ -2017,11 +2017,11 @@ class CallICTrampolineStub : public PlatformCodeStub {
minor_key_ = state.GetExtraICState();
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::CALL_IC; }
Code::Kind GetCodeKind() const override { return Code::CALL_IC; }
InlineCacheState GetICState() const FINAL { return DEFAULT; }
InlineCacheState GetICState() const final { return DEFAULT; }
ExtraICState GetExtraICState() const FINAL {
ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(minor_key_);
}
@ -2052,15 +2052,15 @@ class MegamorphicLoadStub : public HydrogenCodeStub {
set_sub_minor_key(state.GetExtraICState());
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; }
Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
InlineCacheState GetICState() const FINAL { return MEGAMORPHIC; }
InlineCacheState GetICState() const final { return MEGAMORPHIC; }
ExtraICState GetExtraICState() const FINAL {
ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(sub_minor_key());
}
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
if (FLAG_vector_ics) {
return VectorLoadICDescriptor(isolate());
}
@ -2080,11 +2080,11 @@ class VectorRawLoadStub : public PlatformCodeStub {
void GenerateForTrampoline(MacroAssembler* masm);
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; }
virtual Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
virtual InlineCacheState GetICState() const FINAL OVERRIDE { return DEFAULT; }
virtual InlineCacheState GetICState() const final override { return DEFAULT; }
virtual ExtraICState GetExtraICState() const FINAL OVERRIDE {
virtual ExtraICState GetExtraICState() const final override {
return static_cast<ExtraICState>(minor_key_);
}
@ -2103,11 +2103,11 @@ class VectorRawKeyedLoadStub : public PlatformCodeStub {
void GenerateForTrampoline(MacroAssembler* masm);
virtual Code::Kind GetCodeKind() const OVERRIDE {
virtual Code::Kind GetCodeKind() const override {
return Code::KEYED_LOAD_IC;
}
virtual InlineCacheState GetICState() const FINAL OVERRIDE { return DEFAULT; }
virtual InlineCacheState GetICState() const final override { return DEFAULT; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorLoadIC);
DEFINE_PLATFORM_CODE_STUB(VectorRawKeyedLoad, PlatformCodeStub);
@ -2130,7 +2130,7 @@ class DoubleToIStub : public PlatformCodeStub {
SSE3Bits::encode(CpuFeatures::IsSupported(SSE3) ? 1 : 0);
}
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() override { return false; }
private:
Register source() const {
@ -2192,7 +2192,7 @@ class ScriptContextFieldStub : public HandlerStub {
class SlotIndexBits
: public BitField<int, kContextIndexBits, kSlotIndexBits> {};
Code::StubType GetStubType() const OVERRIDE { return Code::FAST; }
Code::StubType GetStubType() const override { return Code::FAST; }
DEFINE_CODE_STUB_BASE(ScriptContextFieldStub, HandlerStub);
};
@ -2205,7 +2205,7 @@ class LoadScriptContextFieldStub : public ScriptContextFieldStub {
: ScriptContextFieldStub(isolate, lookup_result) {}
private:
Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
Code::Kind kind() const override { return Code::LOAD_IC; }
DEFINE_HANDLER_CODE_STUB(LoadScriptContextField, ScriptContextFieldStub);
};
@ -2218,7 +2218,7 @@ class StoreScriptContextFieldStub : public ScriptContextFieldStub {
: ScriptContextFieldStub(isolate, lookup_result) {}
private:
Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
Code::Kind kind() const override { return Code::STORE_IC; }
DEFINE_HANDLER_CODE_STUB(StoreScriptContextField, ScriptContextFieldStub);
};
@ -2243,7 +2243,7 @@ class LoadFastElementStub : public HydrogenCodeStub {
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
class IsJSArrayBits: public BitField<bool, 8, 1> {};
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
if (FLAG_vector_ics) {
return VectorLoadICDescriptor(isolate());
}
@ -2315,7 +2315,7 @@ class TransitionElementsKindStub : public HydrogenCodeStub {
};
class AllocateHeapNumberStub FINAL : public HydrogenCodeStub {
class AllocateHeapNumberStub final : public HydrogenCodeStub {
public:
explicit AllocateHeapNumberStub(Isolate* isolate)
: HydrogenCodeStub(isolate) {}
@ -2381,7 +2381,7 @@ class ArrayNoArgumentConstructorStub : public ArrayConstructorStubBase {
}
private:
void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
void PrintName(std::ostream& os) const override { // NOLINT
BasePrintName(os, "ArrayNoArgumentConstructorStub");
}
@ -2401,7 +2401,7 @@ class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase {
}
private:
void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
void PrintName(std::ostream& os) const override { // NOLINT
BasePrintName(os, "ArraySingleArgumentConstructorStub");
}
@ -2421,7 +2421,7 @@ class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase {
}
private:
void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
void PrintName(std::ostream& os) const override { // NOLINT
BasePrintName(os, "ArrayNArgumentsConstructorStub");
}
@ -2565,18 +2565,18 @@ class ToBooleanStub: public HydrogenCodeStub {
Types types() const { return Types(TypesBits::decode(sub_minor_key())); }
ResultMode mode() const { return ResultModeBits::decode(sub_minor_key()); }
Code::Kind GetCodeKind() const OVERRIDE { return Code::TO_BOOLEAN_IC; }
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
Code::Kind GetCodeKind() const override { return Code::TO_BOOLEAN_IC; }
void PrintState(std::ostream& os) const override; // NOLINT
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() override { return false; }
static Handle<Code> GetUninitialized(Isolate* isolate) {
return ToBooleanStub(isolate, UNINITIALIZED).GetCode();
}
ExtraICState GetExtraICState() const OVERRIDE { return types().ToIntegral(); }
ExtraICState GetExtraICState() const override { return types().ToIntegral(); }
InlineCacheState GetICState() const OVERRIDE {
InlineCacheState GetICState() const override {
if (types().IsEmpty()) {
return ::v8::internal::UNINITIALIZED;
} else {
@ -2688,7 +2688,7 @@ class ProfileEntryHookStub : public PlatformCodeStub {
explicit ProfileEntryHookStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
// The profile entry hook function is not allowed to cause a GC.
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() override { return false; }
// Generates a call to the entry hook if it's enabled.
static void MaybeCallEntryHook(MacroAssembler* masm);
@ -2713,7 +2713,7 @@ class StoreBufferOverflowStub : public PlatformCodeStub {
}
static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() override { return false; }
private:
bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }
@ -2734,7 +2734,7 @@ class SubStringStub : public PlatformCodeStub {
};
class ToNumberStub FINAL : public PlatformCodeStub {
class ToNumberStub final : public PlatformCodeStub {
public:
explicit ToNumberStub(Isolate* isolate) : PlatformCodeStub(isolate) {}

View File

@ -16,7 +16,7 @@ namespace internal {
class CompilationInfo;
class CompilationStatistics FINAL : public Malloced {
class CompilationStatistics final : public Malloced {
public:
CompilationStatistics() {}

View File

@ -324,7 +324,7 @@ class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
}
#define DEF_VISIT(type) \
void Visit##type(type* node) OVERRIDE { \
void Visit##type(type* node) override { \
SourcePosition old_position = SourcePosition::Unknown(); \
if (node->position() != RelocInfo::kNoPosition) { \
old_position = source_position(); \
@ -339,7 +339,7 @@ class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
#undef DEF_VISIT
#define DEF_VISIT(type) \
void Visit##type(type* node) OVERRIDE { \
void Visit##type(type* node) override { \
SourcePosition old_position = SourcePosition::Unknown(); \
if (node->position() != RelocInfo::kNoPosition) { \
old_position = source_position(); \
@ -354,7 +354,7 @@ class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
#undef DEF_VISIT
#define DEF_VISIT(type) \
void Visit##type(type* node) OVERRIDE { \
void Visit##type(type* node) override { \
HOptimizedGraphBuilder::Visit##type(node); \
}
MODULE_NODE_LIST(DEF_VISIT)

View File

@ -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();

View File

@ -21,7 +21,7 @@ namespace compiler {
// Adds Arm-specific methods to convert InstructionOperands.
class ArmOperandConverter FINAL : public InstructionOperandConverter {
class ArmOperandConverter final : public InstructionOperandConverter {
public:
ArmOperandConverter(CodeGenerator* gen, Instruction* instr)
: InstructionOperandConverter(gen, instr) {}
@ -160,12 +160,12 @@ class ArmOperandConverter FINAL : public InstructionOperandConverter {
namespace {
class OutOfLineLoadFloat32 FINAL : public OutOfLineCode {
class OutOfLineLoadFloat32 final : public OutOfLineCode {
public:
OutOfLineLoadFloat32(CodeGenerator* gen, SwVfpRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ vmov(result_, std::numeric_limits<float>::quiet_NaN());
}
@ -174,12 +174,12 @@ class OutOfLineLoadFloat32 FINAL : public OutOfLineCode {
};
class OutOfLineLoadFloat64 FINAL : public OutOfLineCode {
class OutOfLineLoadFloat64 final : public OutOfLineCode {
public:
OutOfLineLoadFloat64(CodeGenerator* gen, DwVfpRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ vmov(result_, std::numeric_limits<double>::quiet_NaN(), kScratchReg);
}
@ -188,12 +188,12 @@ class OutOfLineLoadFloat64 FINAL : public OutOfLineCode {
};
class OutOfLineLoadInteger FINAL : public OutOfLineCode {
class OutOfLineLoadInteger final : public OutOfLineCode {
public:
OutOfLineLoadInteger(CodeGenerator* gen, Register result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL { __ mov(result_, Operand::Zero()); }
void Generate() final { __ mov(result_, Operand::Zero()); }
private:
Register const result_;

View File

@ -18,7 +18,7 @@ namespace compiler {
// Adds Arm64-specific methods to convert InstructionOperands.
class Arm64OperandConverter FINAL : public InstructionOperandConverter {
class Arm64OperandConverter final : public InstructionOperandConverter {
public:
Arm64OperandConverter(CodeGenerator* gen, Instruction* instr)
: InstructionOperandConverter(gen, instr) {}
@ -198,12 +198,12 @@ class Arm64OperandConverter FINAL : public InstructionOperandConverter {
namespace {
class OutOfLineLoadNaN32 FINAL : public OutOfLineCode {
class OutOfLineLoadNaN32 final : public OutOfLineCode {
public:
OutOfLineLoadNaN32(CodeGenerator* gen, DoubleRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ Fmov(result_, std::numeric_limits<float>::quiet_NaN());
}
@ -212,12 +212,12 @@ class OutOfLineLoadNaN32 FINAL : public OutOfLineCode {
};
class OutOfLineLoadNaN64 FINAL : public OutOfLineCode {
class OutOfLineLoadNaN64 final : public OutOfLineCode {
public:
OutOfLineLoadNaN64(CodeGenerator* gen, DoubleRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ Fmov(result_, std::numeric_limits<double>::quiet_NaN());
}
@ -226,12 +226,12 @@ class OutOfLineLoadNaN64 FINAL : public OutOfLineCode {
};
class OutOfLineLoadZero FINAL : public OutOfLineCode {
class OutOfLineLoadZero final : public OutOfLineCode {
public:
OutOfLineLoadZero(CodeGenerator* gen, Register result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL { __ Mov(result_, 0); }
void Generate() final { __ Mov(result_, 0); }
private:
Register const result_;

View File

@ -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) {}

View File

@ -71,35 +71,35 @@ class AstGraphBuilder::AstContext BASE_EMBEDDED {
// Context to evaluate expression for its side effects only.
class AstGraphBuilder::AstEffectContext FINAL : public AstContext {
class AstGraphBuilder::AstEffectContext final : public AstContext {
public:
explicit AstEffectContext(AstGraphBuilder* owner)
: AstContext(owner, Expression::kEffect) {}
~AstEffectContext() FINAL;
void ProduceValue(Node* value) FINAL;
Node* ConsumeValue() FINAL;
~AstEffectContext() final;
void ProduceValue(Node* value) final;
Node* ConsumeValue() final;
};
// Context to evaluate expression for its value (and side effects).
class AstGraphBuilder::AstValueContext FINAL : public AstContext {
class AstGraphBuilder::AstValueContext final : public AstContext {
public:
explicit AstValueContext(AstGraphBuilder* owner)
: AstContext(owner, Expression::kValue) {}
~AstValueContext() FINAL;
void ProduceValue(Node* value) FINAL;
Node* ConsumeValue() FINAL;
~AstValueContext() final;
void ProduceValue(Node* value) final;
Node* ConsumeValue() final;
};
// Context to evaluate expression for a condition value (and side effects).
class AstGraphBuilder::AstTestContext FINAL : public AstContext {
class AstGraphBuilder::AstTestContext final : public AstContext {
public:
explicit AstTestContext(AstGraphBuilder* owner)
: AstContext(owner, Expression::kTest) {}
~AstTestContext() FINAL;
void ProduceValue(Node* value) FINAL;
Node* ConsumeValue() FINAL;
~AstTestContext() final;
void ProduceValue(Node* value) final;
Node* ConsumeValue() final;
};
@ -279,7 +279,7 @@ class AstGraphBuilder::ControlScopeForBreakable : public ControlScope {
: ControlScope(owner), target_(target), control_(control) {}
protected:
virtual bool Execute(Command cmd, Statement* target, Node* value) OVERRIDE {
virtual bool Execute(Command cmd, Statement* target, Node* value) override {
if (target != target_) return false; // We are not the command target.
switch (cmd) {
case CMD_BREAK:
@ -307,7 +307,7 @@ class AstGraphBuilder::ControlScopeForIteration : public ControlScope {
: ControlScope(owner), target_(target), control_(control) {}
protected:
virtual bool Execute(Command cmd, Statement* target, Node* value) OVERRIDE {
virtual bool Execute(Command cmd, Statement* target, Node* value) override {
if (target != target_) return false; // We are not the command target.
switch (cmd) {
case CMD_BREAK:
@ -341,7 +341,7 @@ class AstGraphBuilder::ControlScopeForCatch : public ControlScope {
}
protected:
virtual bool Execute(Command cmd, Statement* target, Node* value) OVERRIDE {
virtual bool Execute(Command cmd, Statement* target, Node* value) override {
switch (cmd) {
case CMD_THROW:
control_->Throw(value);
@ -372,7 +372,7 @@ class AstGraphBuilder::ControlScopeForFinally : public ControlScope {
}
protected:
virtual bool Execute(Command cmd, Statement* target, Node* value) OVERRIDE {
virtual bool Execute(Command cmd, Statement* target, Node* value) override {
Node* token = commands_->RecordCommand(cmd, target, value);
control_->LeaveTry(token, value);
return true;

View File

@ -47,13 +47,13 @@ class AstGraphBuilder : public AstVisitor {
}
protected:
#define DECLARE_VISIT(type) void Visit##type(type* node) OVERRIDE;
#define DECLARE_VISIT(type) void Visit##type(type* node) override;
// Visiting functions for AST nodes make this an AstVisitor.
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
// Visiting function for declarations list is overridden.
void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE;
void VisitDeclarations(ZoneList<Declaration*>* declarations) override;
private:
class AstContext;

View File

@ -45,7 +45,7 @@ class AstLoopAssignmentAnalyzer : public AstVisitor {
LoopAssignmentAnalysis* Analyze();
#define DECLARE_VISIT(type) void Visit##type(type* node) OVERRIDE;
#define DECLARE_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT

View File

@ -18,12 +18,12 @@ class Linkage;
class MachineOperatorBuilder;
class Operator;
class ChangeLowering FINAL : public Reducer {
class ChangeLowering final : public Reducer {
public:
explicit ChangeLowering(JSGraph* jsgraph) : jsgraph_(jsgraph) {}
~ChangeLowering() FINAL;
~ChangeLowering() final;
Reduction Reduce(Node* node) FINAL;
Reduction Reduce(Node* node) final;
private:
Node* HeapNumberValueIndexConstant();

View File

@ -12,7 +12,7 @@ namespace v8 {
namespace internal {
namespace compiler {
class CodeGenerator::JumpTable FINAL : public ZoneObject {
class CodeGenerator::JumpTable final : public ZoneObject {
public:
JumpTable(JumpTable* next, Label** targets, size_t target_count)
: next_(next), targets_(targets), target_count_(target_count) {}

View File

@ -28,7 +28,7 @@ struct BranchInfo {
// Generates native code for a sequence of instructions.
class CodeGenerator FINAL : public GapResolver::Assembler {
class CodeGenerator final : public GapResolver::Assembler {
public:
explicit CodeGenerator(Frame* frame, Linkage* linkage,
InstructionSequence* code, CompilationInfo* info);
@ -99,9 +99,9 @@ class CodeGenerator FINAL : public GapResolver::Assembler {
// Interface used by the gap resolver to emit moves and swaps.
void AssembleMove(InstructionOperand* source,
InstructionOperand* destination) FINAL;
InstructionOperand* destination) final;
void AssembleSwap(InstructionOperand* source,
InstructionOperand* destination) FINAL;
InstructionOperand* destination) final;
// ===========================================================================
// =================== Jump table construction methods. ======================

View File

@ -17,7 +17,7 @@ class ExternalReference;
namespace compiler {
// Bundles various caches for common nodes.
class CommonNodeCache FINAL {
class CommonNodeCache final {
public:
explicit CommonNodeCache(Zone* zone) : zone_(zone) {}
~CommonNodeCache() {}

View File

@ -20,12 +20,12 @@ class Operator;
// Performs strength reduction on nodes that have common operators.
class CommonOperatorReducer FINAL : public Reducer {
class CommonOperatorReducer final : public Reducer {
public:
explicit CommonOperatorReducer(JSGraph* jsgraph) : jsgraph_(jsgraph) {}
~CommonOperatorReducer() FINAL {}
~CommonOperatorReducer() final {}
Reduction Reduce(Node* node) FINAL;
Reduction Reduce(Node* node) final;
private:
Reduction ReduceEffectPhi(Node* node);

View File

@ -194,11 +194,11 @@ size_t ProjectionIndexOf(const Operator* const op) {
V(14)
struct CommonOperatorGlobalCache FINAL {
struct CommonOperatorGlobalCache final {
#define CACHED(Name, properties, value_input_count, effect_input_count, \
control_input_count, value_output_count, effect_output_count, \
control_output_count) \
struct Name##Operator FINAL : public Operator { \
struct Name##Operator final : public Operator { \
Name##Operator() \
: Operator(IrOpcode::k##Name, properties, #Name, value_input_count, \
effect_input_count, control_input_count, \
@ -210,7 +210,7 @@ struct CommonOperatorGlobalCache FINAL {
#undef CACHED
template <BranchHint kBranchHint>
struct BranchOperator FINAL : public Operator1<BranchHint> {
struct BranchOperator final : public Operator1<BranchHint> {
BranchOperator()
: Operator1<BranchHint>( // --
IrOpcode::kBranch, Operator::kKontrol, // opcode
@ -223,7 +223,7 @@ struct CommonOperatorGlobalCache FINAL {
BranchOperator<BranchHint::kFalse> kBranchFalseOperator;
template <int kEffectInputCount>
struct EffectPhiOperator FINAL : public Operator {
struct EffectPhiOperator final : public Operator {
EffectPhiOperator()
: Operator( // --
IrOpcode::kEffectPhi, Operator::kPure, // opcode
@ -236,7 +236,7 @@ struct CommonOperatorGlobalCache FINAL {
#undef CACHED_EFFECT_PHI
template <size_t kInputCount>
struct LoopOperator FINAL : public Operator {
struct LoopOperator final : public Operator {
LoopOperator()
: Operator( // --
IrOpcode::kLoop, Operator::kKontrol, // opcode
@ -249,7 +249,7 @@ struct CommonOperatorGlobalCache FINAL {
#undef CACHED_LOOP
template <size_t kInputCount>
struct MergeOperator FINAL : public Operator {
struct MergeOperator final : public Operator {
MergeOperator()
: Operator( // --
IrOpcode::kMerge, Operator::kKontrol, // opcode
@ -262,7 +262,7 @@ struct CommonOperatorGlobalCache FINAL {
#undef CACHED_MERGE
template <MachineType kType, int kInputCount>
struct PhiOperator FINAL : public Operator1<MachineType> {
struct PhiOperator final : public Operator1<MachineType> {
PhiOperator()
: Operator1<MachineType>( //--
IrOpcode::kPhi, Operator::kPure, // opcode
@ -276,7 +276,7 @@ struct CommonOperatorGlobalCache FINAL {
#undef CACHED_PHI
template <int kIndex>
struct ParameterOperator FINAL : public Operator1<int> {
struct ParameterOperator final : public Operator1<int> {
ParameterOperator()
: Operator1<int>( // --
IrOpcode::kParameter, Operator::kPure, // opcode
@ -290,7 +290,7 @@ struct CommonOperatorGlobalCache FINAL {
#undef CACHED_PARAMETER
template <size_t kIndex>
struct ProjectionOperator FINAL : public Operator1<size_t> {
struct ProjectionOperator final : public Operator1<size_t> {
ProjectionOperator()
: Operator1<size_t>( // --
IrOpcode::kProjection, // opcode
@ -305,7 +305,7 @@ struct CommonOperatorGlobalCache FINAL {
#undef CACHED_PROJECTION
template <int kInputCount>
struct StateValuesOperator FINAL : public Operator {
struct StateValuesOperator final : public Operator {
StateValuesOperator()
: Operator( // --
IrOpcode::kStateValues, // opcode
@ -625,7 +625,7 @@ const Operator* CommonOperatorBuilder::FrameState(
const Operator* CommonOperatorBuilder::Call(const CallDescriptor* descriptor) {
class CallOperator FINAL : public Operator1<const CallDescriptor*> {
class CallOperator final : public Operator1<const CallDescriptor*> {
public:
CallOperator(const CallDescriptor* descriptor, const char* mnemonic)
: Operator1<const CallDescriptor*>(
@ -637,7 +637,7 @@ const Operator* CommonOperatorBuilder::Call(const CallDescriptor* descriptor) {
Operator::ZeroIfPure(descriptor->properties()),
Operator::ZeroIfNoThrow(descriptor->properties()), descriptor) {}
void PrintParameter(std::ostream& os) const OVERRIDE {
void PrintParameter(std::ostream& os) const override {
os << "[" << *parameter() << "]";
}
};

View File

@ -33,7 +33,7 @@ std::ostream& operator<<(std::ostream&, BranchHint);
BranchHint BranchHintOf(const Operator* const);
class SelectParameters FINAL {
class SelectParameters final {
public:
explicit SelectParameters(MachineType type,
BranchHint hint = BranchHint::kNone)
@ -122,7 +122,7 @@ enum FrameStateType {
};
class FrameStateCallInfo FINAL {
class FrameStateCallInfo final {
public:
FrameStateCallInfo(
FrameStateType type, BailoutId bailout_id,
@ -158,7 +158,7 @@ size_t ProjectionIndexOf(const Operator* const);
// Interface for building common operators that can be used at any level of IR,
// including JavaScript, mid-level, and low-level.
class CommonOperatorBuilder FINAL : public ZoneObject {
class CommonOperatorBuilder final : public ZoneObject {
public:
explicit CommonOperatorBuilder(Zone* zone);

View File

@ -37,7 +37,7 @@ class ControlBuilder {
// Tracks control flow for a conditional statement.
class IfBuilder FINAL : public ControlBuilder {
class IfBuilder final : public ControlBuilder {
public:
explicit IfBuilder(AstGraphBuilder* builder)
: ControlBuilder(builder),
@ -57,7 +57,7 @@ class IfBuilder FINAL : public ControlBuilder {
// Tracks control flow for an iteration statement.
class LoopBuilder FINAL : public ControlBuilder {
class LoopBuilder final : public ControlBuilder {
public:
explicit LoopBuilder(AstGraphBuilder* builder)
: ControlBuilder(builder),
@ -72,7 +72,7 @@ class LoopBuilder FINAL : public ControlBuilder {
void EndLoop();
// Primitive support for break.
void Break() FINAL;
void Break() final;
// Compound control commands for conditional break.
void BreakUnless(Node* condition);
@ -86,7 +86,7 @@ class LoopBuilder FINAL : public ControlBuilder {
// Tracks control flow for a switch statement.
class SwitchBuilder FINAL : public ControlBuilder {
class SwitchBuilder final : public ControlBuilder {
public:
explicit SwitchBuilder(AstGraphBuilder* builder, int case_count)
: ControlBuilder(builder),
@ -105,7 +105,7 @@ class SwitchBuilder FINAL : public ControlBuilder {
void EndSwitch();
// Primitive support for break.
void Break() FINAL;
void Break() final;
// The number of cases within a switch is statically known.
size_t case_count() const { return body_environments_.size(); }
@ -119,7 +119,7 @@ class SwitchBuilder FINAL : public ControlBuilder {
// Tracks control flow for a block statement.
class BlockBuilder FINAL : public ControlBuilder {
class BlockBuilder final : public ControlBuilder {
public:
explicit BlockBuilder(AstGraphBuilder* builder)
: ControlBuilder(builder), break_environment_(NULL) {}
@ -129,7 +129,7 @@ class BlockBuilder FINAL : public ControlBuilder {
void EndBlock();
// Primitive support for break.
void Break() FINAL;
void Break() final;
private:
Environment* break_environment_; // Environment after the block exits.
@ -137,7 +137,7 @@ class BlockBuilder FINAL : public ControlBuilder {
// Tracks control flow for a try-catch statement.
class TryCatchBuilder FINAL : public ControlBuilder {
class TryCatchBuilder final : public ControlBuilder {
public:
explicit TryCatchBuilder(AstGraphBuilder* builder)
: ControlBuilder(builder),
@ -162,7 +162,7 @@ class TryCatchBuilder FINAL : public ControlBuilder {
// Tracks control flow for a try-finally statement.
class TryFinallyBuilder FINAL : public ControlBuilder {
class TryFinallyBuilder final : public ControlBuilder {
public:
explicit TryFinallyBuilder(AstGraphBuilder* builder)
: ControlBuilder(builder),

View File

@ -28,7 +28,7 @@ namespace compiler {
// control regions in linear time" by Johnson, Pearson & Pingali (PLDI94) which
// also contains proofs for the aforementioned equivalence. References to line
// numbers in the algorithm from figure 4 have been added [line:x].
class ControlEquivalence FINAL : public ZoneObject {
class ControlEquivalence final : public ZoneObject {
public:
ControlEquivalence(Zone* zone, Graph* graph)
: zone_(zone),

View File

@ -20,7 +20,7 @@ class MachineOperatorBuilder;
class Node;
class ControlFlowOptimizer FINAL {
class ControlFlowOptimizer final {
public:
ControlFlowOptimizer(JSGraph* jsgraph, Zone* zone);

View File

@ -11,7 +11,7 @@ namespace v8 {
namespace internal {
namespace compiler {
class GapResolver FINAL {
class GapResolver final {
public:
// Interface used by the gap resolver to emit moves and swaps.
class Assembler {

View File

@ -18,7 +18,7 @@ class Node;
// Represents the result of trying to reduce a node in the graph.
class Reduction FINAL {
class Reduction final {
public:
explicit Reduction(Node* replacement = NULL) : replacement_(replacement) {}
@ -54,7 +54,7 @@ class Reducer {
// Performs an iterative reduction of a node graph.
class GraphReducer FINAL {
class GraphReducer final {
public:
GraphReducer(Graph* graph, Zone* zone);

View File

@ -424,7 +424,7 @@ class GraphC1Visualizer {
void PrintType(Node* node);
void PrintLiveRange(LiveRange* range, const char* type);
class Tag FINAL BASE_EMBEDDED {
class Tag final BASE_EMBEDDED {
public:
Tag(GraphC1Visualizer* visualizer, const char* name) {
name_ = name;

View File

@ -173,37 +173,37 @@ bool HasImmediateInput(Instruction* instr, size_t index) {
}
class OutOfLineLoadInteger FINAL : public OutOfLineCode {
class OutOfLineLoadInteger final : public OutOfLineCode {
public:
OutOfLineLoadInteger(CodeGenerator* gen, Register result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL { __ xor_(result_, result_); }
void Generate() final { __ xor_(result_, result_); }
private:
Register const result_;
};
class OutOfLineLoadFloat FINAL : public OutOfLineCode {
class OutOfLineLoadFloat final : public OutOfLineCode {
public:
OutOfLineLoadFloat(CodeGenerator* gen, XMMRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL { __ pcmpeqd(result_, result_); }
void Generate() final { __ pcmpeqd(result_, result_); }
private:
XMMRegister const result_;
};
class OutOfLineTruncateDoubleToI FINAL : public OutOfLineCode {
class OutOfLineTruncateDoubleToI final : public OutOfLineCode {
public:
OutOfLineTruncateDoubleToI(CodeGenerator* gen, Register result,
XMMRegister input)
: OutOfLineCode(gen), result_(result), input_(input) {}
void Generate() FINAL {
void Generate() final {
__ sub(esp, Immediate(kDoubleSize));
__ movsd(MemOperand(esp, 0), input_);
__ SlowTruncateToI(result_, esp, 0);

View File

@ -11,7 +11,7 @@ namespace internal {
namespace compiler {
// Adds IA32-specific methods for generating operands.
class IA32OperandGenerator FINAL : public OperandGenerator {
class IA32OperandGenerator final : public OperandGenerator {
public:
explicit IA32OperandGenerator(InstructionSelector* selector)
: OperandGenerator(selector) {}

View File

@ -243,7 +243,7 @@ class OperandGenerator {
// The whole instruction is treated as a unit by the register allocator, and
// thus no spills or moves can be introduced between the flags-setting
// instruction and the branch or set it should be combined with.
class FlagsContinuation FINAL {
class FlagsContinuation final {
public:
FlagsContinuation() : mode_(kFlags_none) {}

View File

@ -28,7 +28,7 @@ typedef ZoneVector<InstructionOperand> InstructionOperandVector;
// Instruction selection generates an InstructionSequence for a given Schedule.
class InstructionSelector FINAL {
class InstructionSelector final {
public:
// Forward declarations.
class Features;
@ -81,7 +81,7 @@ class InstructionSelector FINAL {
// ============== Architecture-independent CPU feature methods. ==============
// ===========================================================================
class Features FINAL {
class Features final {
public:
Features() : bits_(0) {}
explicit Features(unsigned bits) : bits_(bits) {}

View File

@ -401,7 +401,7 @@ ALLOCATED_OPERAND_LIST(ALLOCATED_OPERAND_IS)
#define ALLOCATED_OPERAND_CLASS(SubKind, kOperandKind) \
class SubKind##Operand FINAL : public AllocatedOperand { \
class SubKind##Operand final : public AllocatedOperand { \
public: \
explicit SubKind##Operand(int index) \
: AllocatedOperand(kOperandKind, index) {} \
@ -429,7 +429,7 @@ ALLOCATED_OPERAND_LIST(ALLOCATED_OPERAND_CLASS)
#undef ALLOCATED_OPERAND_CLASS
class MoveOperands FINAL : public ZoneObject {
class MoveOperands final : public ZoneObject {
public:
MoveOperands(const InstructionOperand& source,
const InstructionOperand& destination)
@ -490,7 +490,7 @@ struct PrintableMoveOperands {
std::ostream& operator<<(std::ostream& os, const PrintableMoveOperands& mo);
class ParallelMove FINAL : public ZoneVector<MoveOperands*>, public ZoneObject {
class ParallelMove final : public ZoneVector<MoveOperands*>, public ZoneObject {
public:
explicit ParallelMove(Zone* zone) : ZoneVector<MoveOperands*>(zone) {
reserve(4);
@ -525,7 +525,7 @@ struct PrintableParallelMove {
std::ostream& operator<<(std::ostream& os, const PrintableParallelMove& pm);
class ReferenceMap FINAL : public ZoneObject {
class ReferenceMap final : public ZoneObject {
public:
explicit ReferenceMap(Zone* zone)
: reference_operands_(8, zone), instruction_position_(-1) {}
@ -708,7 +708,7 @@ struct PrintableInstruction {
std::ostream& operator<<(std::ostream& os, const PrintableInstruction& instr);
class RpoNumber FINAL {
class RpoNumber final {
public:
static const int kInvalidRpoNumber = -1;
int ToInt() const {
@ -741,7 +741,7 @@ class RpoNumber FINAL {
std::ostream& operator<<(std::ostream&, const RpoNumber&);
class Constant FINAL {
class Constant final {
public:
enum Type {
kInt32,
@ -851,7 +851,7 @@ class FrameStateDescriptor : public ZoneObject {
std::ostream& operator<<(std::ostream& os, const Constant& constant);
class PhiInstruction FINAL : public ZoneObject {
class PhiInstruction final : public ZoneObject {
public:
typedef ZoneVector<InstructionOperand> Inputs;
@ -875,7 +875,7 @@ class PhiInstruction FINAL : public ZoneObject {
// Analogue of BasicBlock for Instructions instead of Nodes.
class InstructionBlock FINAL : public ZoneObject {
class InstructionBlock final : public ZoneObject {
public:
InstructionBlock(Zone* zone, RpoNumber rpo_number, RpoNumber loop_header,
RpoNumber loop_end, bool deferred);
@ -956,7 +956,7 @@ struct PrintableInstructionSequence;
// Represents architecture-specific generated code before, during, and after
// register allocation.
// TODO(titzer): s/IsDouble/IsFloat64/
class InstructionSequence FINAL : public ZoneObject {
class InstructionSequence final : public ZoneObject {
public:
static InstructionBlocks* InstructionBlocksFor(Zone* zone,
const Schedule* schedule);

View File

@ -18,12 +18,12 @@ class JSGraph;
class MachineOperatorBuilder;
class JSBuiltinReducer FINAL : public Reducer {
class JSBuiltinReducer final : public Reducer {
public:
explicit JSBuiltinReducer(JSGraph* jsgraph);
~JSBuiltinReducer() FINAL {}
~JSBuiltinReducer() final {}
Reduction Reduce(Node* node) FINAL;
Reduction Reduce(Node* node) final;
private:
Reduction ReduceMathMax(Node* node);

View File

@ -19,7 +19,7 @@ class JSContextSpecializer : public Reducer {
public:
explicit JSContextSpecializer(JSGraph* jsgraph) : jsgraph_(jsgraph) {}
Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) override;
// Visible for unit testing.
Reduction ReduceJSLoadContext(Node* node);

View File

@ -22,12 +22,12 @@ class Linkage;
// Lowers JS-level operators to runtime and IC calls in the "generic" case.
class JSGenericLowering FINAL : public Reducer {
class JSGenericLowering final : public Reducer {
public:
JSGenericLowering(bool is_typing_enabled, JSGraph* jsgraph);
~JSGenericLowering() FINAL;
~JSGenericLowering() final;
Reduction Reduce(Node* node) FINAL;
Reduction Reduce(Node* node) final;
protected:
#define DECLARE_LOWER(x) void Lower##x(Node* node);

View File

@ -14,7 +14,7 @@ namespace compiler {
class JSCallFunctionAccessor;
class JSInliner FINAL : public Reducer {
class JSInliner final : public Reducer {
public:
enum Mode { kBuiltinsInlining, kGeneralInlining };
@ -22,7 +22,7 @@ class JSInliner FINAL : public Reducer {
JSGraph* jsgraph)
: mode_(mode), local_zone_(local_zone), info_(info), jsgraph_(jsgraph) {}
Reduction Reduce(Node* node) FINAL;
Reduction Reduce(Node* node) final;
private:
Mode const mode_;

View File

@ -20,12 +20,12 @@ class MachineOperatorBuilder;
// Lowers certain JS-level runtime calls.
class JSIntrinsicLowering FINAL : public Reducer {
class JSIntrinsicLowering final : public Reducer {
public:
explicit JSIntrinsicLowering(JSGraph* jsgraph);
~JSIntrinsicLowering() FINAL {}
~JSIntrinsicLowering() final {}
Reduction Reduce(Node* node) FINAL;
Reduction Reduce(Node* node) final;
private:
Reduction ReduceConstructDouble(Node* node);

View File

@ -247,9 +247,9 @@ const StoreNamedParameters& StoreNamedParametersOf(const Operator* op) {
V(CreateScriptContext, Operator::kNoProperties, 2, 1)
struct JSOperatorGlobalCache FINAL {
struct JSOperatorGlobalCache final {
#define CACHED(Name, properties, value_input_count, value_output_count) \
struct Name##Operator FINAL : public Operator { \
struct Name##Operator final : public Operator { \
Name##Operator() \
: Operator(IrOpcode::kJS##Name, properties, "JS" #Name, \
value_input_count, Operator::ZeroIfPure(properties), \
@ -262,7 +262,7 @@ struct JSOperatorGlobalCache FINAL {
#undef CACHED
template <LanguageMode kLanguageMode>
struct StorePropertyOperator FINAL : public Operator1<LanguageMode> {
struct StorePropertyOperator final : public Operator1<LanguageMode> {
StorePropertyOperator()
: Operator1<LanguageMode>(IrOpcode::kJSStoreProperty,
Operator::kNoProperties, "JSStoreProperty", 3,

View File

@ -19,7 +19,7 @@ struct JSOperatorGlobalCache;
// Defines the arity and the call flags for a JavaScript function call. This is
// used as a parameter by JSCallFunction operators.
class CallFunctionParameters FINAL {
class CallFunctionParameters final {
public:
CallFunctionParameters(size_t arity, CallFunctionFlags flags)
: arity_(arity), flags_(flags) {}
@ -44,7 +44,7 @@ const CallFunctionParameters& CallFunctionParametersOf(const Operator* op);
// Defines the arity and the ID for a runtime function call. This is used as a
// parameter by JSCallRuntime operators.
class CallRuntimeParameters FINAL {
class CallRuntimeParameters final {
public:
CallRuntimeParameters(Runtime::FunctionId id, size_t arity)
: id_(id), arity_(arity) {}
@ -70,7 +70,7 @@ const CallRuntimeParameters& CallRuntimeParametersOf(const Operator* op);
// Defines the location of a context slot relative to a specific scope. This is
// used as a parameter by JSLoadContext and JSStoreContext operators and allows
// accessing a context-allocated variable without keeping track of the scope.
class ContextAccess FINAL {
class ContextAccess final {
public:
ContextAccess(size_t depth, size_t index, bool immutable);
@ -117,7 +117,7 @@ bool operator==(VectorSlotPair const& lhs, VectorSlotPair const& rhs);
// Defines the property being loaded from an object by a named load. This is
// used as a parameter by JSLoadNamed operators.
class LoadNamedParameters FINAL {
class LoadNamedParameters final {
public:
LoadNamedParameters(const Unique<Name>& name, const VectorSlotPair& feedback,
ContextualMode contextual_mode)
@ -146,7 +146,7 @@ const LoadNamedParameters& LoadNamedParametersOf(const Operator* op);
// Defines the property being loaded from an object. This is
// used as a parameter by JSLoadProperty operators.
class LoadPropertyParameters FINAL {
class LoadPropertyParameters final {
public:
explicit LoadPropertyParameters(const VectorSlotPair& feedback)
: feedback_(feedback) {}
@ -169,7 +169,7 @@ const LoadPropertyParameters& LoadPropertyParametersOf(const Operator* op);
// Defines the property being stored to an object by a named store. This is
// used as a parameter by JSStoreNamed operators.
class StoreNamedParameters FINAL {
class StoreNamedParameters final {
public:
StoreNamedParameters(LanguageMode language_mode, const Unique<Name>& name)
: language_mode_(language_mode), name_(name) {}
@ -195,7 +195,7 @@ const StoreNamedParameters& StoreNamedParametersOf(const Operator* op);
// Interface for building JavaScript-level operators, e.g. directly from the
// AST. Most operators have no parameters, thus can be globally shared for all
// graphs.
class JSOperatorBuilder FINAL : public ZoneObject {
class JSOperatorBuilder final : public ZoneObject {
public:
explicit JSOperatorBuilder(Zone* zone);

View File

@ -58,7 +58,7 @@ class JSTypeFeedbackSpecializer : public Reducer {
CHECK(js_type_feedback);
}
Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) override;
// Visible for unit testing.
Reduction ReduceJSLoadNamed(Node* node);

View File

@ -59,7 +59,7 @@ Reduction JSTypedLowering::ReplaceEagerly(Node* old, Node* node) {
// JSOperator. This class manages the rewriting of context, control, and effect
// dependencies during lowering of a binop and contains numerous helper
// functions for matching the types of inputs to an operation.
class JSBinopReduction FINAL {
class JSBinopReduction final {
public:
JSBinopReduction(JSTypedLowering* lowering, Node* node)
: lowering_(lowering), node_(node) {}

View File

@ -26,12 +26,12 @@ class MachineOperatorBuilder;
// Lowers JS-level operators to simplified operators based on types.
class JSTypedLowering FINAL : public Reducer {
class JSTypedLowering final : public Reducer {
public:
JSTypedLowering(JSGraph* jsgraph, Zone* zone);
~JSTypedLowering() FINAL {}
~JSTypedLowering() final {}
Reduction Reduce(Node* node) FINAL;
Reduction Reduce(Node* node) final;
private:
friend class JSBinopReduction;

View File

@ -46,7 +46,7 @@ typedef Signature<LinkageLocation> LocationSignature;
// Describes a call to various parts of the compiler. Every call has the notion
// of a "target", which is the first input to the call.
class CallDescriptor FINAL : public ZoneObject {
class CallDescriptor final : public ZoneObject {
public:
// Describes the kind of this call, which determines the target.
enum Kind {

View File

@ -11,12 +11,12 @@ namespace v8 {
namespace internal {
namespace compiler {
class LoadElimination FINAL : public Reducer {
class LoadElimination final : public Reducer {
public:
LoadElimination() {}
~LoadElimination() FINAL;
~LoadElimination() final;
Reduction Reduce(Node* node) FINAL;
Reduction Reduce(Node* node) final;
private:
Reduction ReduceLoadField(Node* node);

View File

@ -19,12 +19,12 @@ class JSGraph;
// Performs constant folding and strength reduction on nodes that have
// machine operators.
class MachineOperatorReducer FINAL : public Reducer {
class MachineOperatorReducer final : public Reducer {
public:
explicit MachineOperatorReducer(JSGraph* jsgraph);
~MachineOperatorReducer();
Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) override;
private:
Node* Float32Constant(volatile float value);

View File

@ -176,7 +176,7 @@ CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const* op) {
struct MachineOperatorGlobalCache {
#define PURE(Name, properties, value_input_count, control_input_count, \
output_count) \
struct Name##Operator FINAL : public Operator { \
struct Name##Operator final : public Operator { \
Name##Operator() \
: Operator(IrOpcode::k##Name, Operator::kPure | properties, #Name, \
value_input_count, 0, control_input_count, output_count, 0, \
@ -187,13 +187,13 @@ struct MachineOperatorGlobalCache {
#undef PURE
#define LOAD(Type) \
struct Load##Type##Operator FINAL : public Operator1<LoadRepresentation> { \
struct Load##Type##Operator final : public Operator1<LoadRepresentation> { \
Load##Type##Operator() \
: Operator1<LoadRepresentation>( \
IrOpcode::kLoad, Operator::kNoThrow | Operator::kNoWrite, \
"Load", 2, 1, 1, 1, 1, 0, k##Type) {} \
}; \
struct CheckedLoad##Type##Operator FINAL \
struct CheckedLoad##Type##Operator final \
: public Operator1<CheckedLoadRepresentation> { \
CheckedLoad##Type##Operator() \
: Operator1<CheckedLoadRepresentation>( \
@ -213,17 +213,17 @@ struct MachineOperatorGlobalCache {
"Store", 3, 1, 1, 0, 1, 0, \
StoreRepresentation(k##Type, write_barrier_kind)) {} \
}; \
struct Store##Type##NoWriteBarrier##Operator FINAL \
struct Store##Type##NoWriteBarrier##Operator final \
: public Store##Type##Operator { \
Store##Type##NoWriteBarrier##Operator() \
: Store##Type##Operator(kNoWriteBarrier) {} \
}; \
struct Store##Type##FullWriteBarrier##Operator FINAL \
struct Store##Type##FullWriteBarrier##Operator final \
: public Store##Type##Operator { \
Store##Type##FullWriteBarrier##Operator() \
: Store##Type##Operator(kFullWriteBarrier) {} \
}; \
struct CheckedStore##Type##Operator FINAL \
struct CheckedStore##Type##Operator final \
: public Operator1<CheckedStoreRepresentation> { \
CheckedStore##Type##Operator() \
: Operator1<CheckedStoreRepresentation>( \

View File

@ -29,7 +29,7 @@ typedef MachineType LoadRepresentation;
// A Store needs a MachineType and a WriteBarrierKind in order to emit the
// correct write barrier.
class StoreRepresentation FINAL {
class StoreRepresentation final {
public:
StoreRepresentation(MachineType machine_type,
WriteBarrierKind write_barrier_kind)
@ -68,7 +68,7 @@ CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*);
// Interface for building machine-level operators. These operators are
// machine-level but machine-independent and thus define a language suitable
// for generating code to run on architectures such as ia32, x64, arm, etc.
class MachineOperatorBuilder FINAL : public ZoneObject {
class MachineOperatorBuilder final : public ZoneObject {
public:
// Flags that specify which operations are available. This is useful
// for operations that are unsupported by some back-ends.

View File

@ -34,7 +34,7 @@ namespace compiler {
// Adds Mips-specific methods to convert InstructionOperands.
class MipsOperandConverter FINAL : public InstructionOperandConverter {
class MipsOperandConverter final : public InstructionOperandConverter {
public:
MipsOperandConverter(CodeGenerator* gen, Instruction* instr)
: InstructionOperandConverter(gen, instr) {}
@ -124,12 +124,12 @@ static inline bool HasRegisterInput(Instruction* instr, size_t index) {
namespace {
class OutOfLineLoadSingle FINAL : public OutOfLineCode {
class OutOfLineLoadSingle final : public OutOfLineCode {
public:
OutOfLineLoadSingle(CodeGenerator* gen, FloatRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ Move(result_, std::numeric_limits<float>::quiet_NaN());
}
@ -138,12 +138,12 @@ class OutOfLineLoadSingle FINAL : public OutOfLineCode {
};
class OutOfLineLoadDouble FINAL : public OutOfLineCode {
class OutOfLineLoadDouble final : public OutOfLineCode {
public:
OutOfLineLoadDouble(CodeGenerator* gen, DoubleRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ Move(result_, std::numeric_limits<double>::quiet_NaN());
}
@ -152,12 +152,12 @@ class OutOfLineLoadDouble FINAL : public OutOfLineCode {
};
class OutOfLineLoadInteger FINAL : public OutOfLineCode {
class OutOfLineLoadInteger final : public OutOfLineCode {
public:
OutOfLineLoadInteger(CodeGenerator* gen, Register result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL { __ mov(result_, zero_reg); }
void Generate() final { __ mov(result_, zero_reg); }
private:
Register const result_;
@ -169,7 +169,7 @@ class OutOfLineRound : public OutOfLineCode {
OutOfLineRound(CodeGenerator* gen, DoubleRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
// Handle rounding to zero case where sign has to be preserved.
// High bits of double input already in kScratchReg.
__ srl(at, kScratchReg, 31);
@ -182,21 +182,21 @@ class OutOfLineRound : public OutOfLineCode {
};
class OutOfLineTruncate FINAL : public OutOfLineRound {
class OutOfLineTruncate final : public OutOfLineRound {
public:
OutOfLineTruncate(CodeGenerator* gen, DoubleRegister result)
: OutOfLineRound(gen, result) {}
};
class OutOfLineFloor FINAL : public OutOfLineRound {
class OutOfLineFloor final : public OutOfLineRound {
public:
OutOfLineFloor(CodeGenerator* gen, DoubleRegister result)
: OutOfLineRound(gen, result) {}
};
class OutOfLineCeil FINAL : public OutOfLineRound {
class OutOfLineCeil final : public OutOfLineRound {
public:
OutOfLineCeil(CodeGenerator* gen, DoubleRegister result)
: OutOfLineRound(gen, result) {}

View File

@ -18,7 +18,7 @@ namespace compiler {
// Adds Mips-specific methods for generating InstructionOperands.
class MipsOperandGenerator FINAL : public OperandGenerator {
class MipsOperandGenerator final : public OperandGenerator {
public:
explicit MipsOperandGenerator(InstructionSelector* selector)
: OperandGenerator(selector) {}

View File

@ -33,7 +33,7 @@ namespace compiler {
// Adds Mips-specific methods to convert InstructionOperands.
class MipsOperandConverter FINAL : public InstructionOperandConverter {
class MipsOperandConverter final : public InstructionOperandConverter {
public:
MipsOperandConverter(CodeGenerator* gen, Instruction* instr)
: InstructionOperandConverter(gen, instr) {}
@ -124,12 +124,12 @@ static inline bool HasRegisterInput(Instruction* instr, size_t index) {
namespace {
class OutOfLineLoadSingle FINAL : public OutOfLineCode {
class OutOfLineLoadSingle final : public OutOfLineCode {
public:
OutOfLineLoadSingle(CodeGenerator* gen, FloatRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ Move(result_, std::numeric_limits<float>::quiet_NaN());
}
@ -138,12 +138,12 @@ class OutOfLineLoadSingle FINAL : public OutOfLineCode {
};
class OutOfLineLoadDouble FINAL : public OutOfLineCode {
class OutOfLineLoadDouble final : public OutOfLineCode {
public:
OutOfLineLoadDouble(CodeGenerator* gen, DoubleRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ Move(result_, std::numeric_limits<double>::quiet_NaN());
}
@ -152,12 +152,12 @@ class OutOfLineLoadDouble FINAL : public OutOfLineCode {
};
class OutOfLineLoadInteger FINAL : public OutOfLineCode {
class OutOfLineLoadInteger final : public OutOfLineCode {
public:
OutOfLineLoadInteger(CodeGenerator* gen, Register result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL { __ mov(result_, zero_reg); }
void Generate() final { __ mov(result_, zero_reg); }
private:
Register const result_;
@ -169,7 +169,7 @@ class OutOfLineRound : public OutOfLineCode {
OutOfLineRound(CodeGenerator* gen, DoubleRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
// Handle rounding to zero case where sign has to be preserved.
// High bits of double input already in kScratchReg.
__ dsrl(at, kScratchReg, 31);
@ -182,21 +182,21 @@ class OutOfLineRound : public OutOfLineCode {
};
class OutOfLineTruncate FINAL : public OutOfLineRound {
class OutOfLineTruncate final : public OutOfLineRound {
public:
OutOfLineTruncate(CodeGenerator* gen, DoubleRegister result)
: OutOfLineRound(gen, result) {}
};
class OutOfLineFloor FINAL : public OutOfLineRound {
class OutOfLineFloor final : public OutOfLineRound {
public:
OutOfLineFloor(CodeGenerator* gen, DoubleRegister result)
: OutOfLineRound(gen, result) {}
};
class OutOfLineCeil FINAL : public OutOfLineRound {
class OutOfLineCeil final : public OutOfLineRound {
public:
OutOfLineCeil(CodeGenerator* gen, DoubleRegister result)
: OutOfLineRound(gen, result) {}

View File

@ -18,7 +18,7 @@ namespace compiler {
// Adds Mips-specific methods for generating InstructionOperands.
class Mips64OperandGenerator FINAL : public OperandGenerator {
class Mips64OperandGenerator final : public OperandGenerator {
public:
explicit Mips64OperandGenerator(InstructionSelector* selector)
: OperandGenerator(selector) {}

View File

@ -12,7 +12,7 @@ namespace v8 {
namespace internal {
namespace compiler {
class MoveOptimizer FINAL {
class MoveOptimizer final {
public:
MoveOptimizer(Zone* local_zone, InstructionSequence* code);
void Run();

View File

@ -27,7 +27,7 @@ class Node;
// nodes such as constants, parameters, etc.
template <typename Key, typename Hash = base::hash<Key>,
typename Pred = std::equal_to<Key> >
class NodeCache FINAL {
class NodeCache final {
public:
explicit NodeCache(unsigned max = 256)
: entries_(nullptr), size_(0), max_(max) {}

View File

@ -105,7 +105,7 @@ inline ValueMatcher<uint64_t, IrOpcode::kInt64Constant>::ValueMatcher(
// A pattern matcher for integer constants.
template <typename T, IrOpcode::Value kOpcode>
struct IntMatcher FINAL : public ValueMatcher<T, kOpcode> {
struct IntMatcher final : public ValueMatcher<T, kOpcode> {
explicit IntMatcher(Node* node) : ValueMatcher<T, kOpcode>(node) {}
bool IsMultipleOf(T n) const {
@ -136,7 +136,7 @@ typedef Uint64Matcher UintPtrMatcher;
// A pattern matcher for floating point constants.
template <typename T, IrOpcode::Value kOpcode>
struct FloatMatcher FINAL : public ValueMatcher<T, kOpcode> {
struct FloatMatcher final : public ValueMatcher<T, kOpcode> {
explicit FloatMatcher(Node* node) : ValueMatcher<T, kOpcode>(node) {}
bool IsMinusZero() const {
@ -153,7 +153,7 @@ typedef FloatMatcher<double, IrOpcode::kNumberConstant> NumberMatcher;
// A pattern matcher for heap object constants.
template <typename T>
struct HeapObjectMatcher FINAL
struct HeapObjectMatcher final
: public ValueMatcher<Unique<T>, IrOpcode::kHeapConstant> {
explicit HeapObjectMatcher(Node* node)
: ValueMatcher<Unique<T>, IrOpcode::kHeapConstant>(node) {}
@ -161,7 +161,7 @@ struct HeapObjectMatcher FINAL
// A pattern matcher for external reference constants.
struct ExternalReferenceMatcher FINAL
struct ExternalReferenceMatcher final
: public ValueMatcher<ExternalReference, IrOpcode::kExternalConstant> {
explicit ExternalReferenceMatcher(Node* node)
: ValueMatcher<ExternalReference, IrOpcode::kExternalConstant>(node) {}

View File

@ -17,7 +17,7 @@ class Operator;
class CommonOperatorBuilder;
// A facade that simplifies access to the different kinds of inputs to a node.
class NodeProperties FINAL {
class NodeProperties final {
public:
// ---------------------------------------------------------------------------
// Input layout.

View File

@ -39,7 +39,7 @@ typedef int32_t NodeId;
// compilation, e.g. during lowering passes. Other information that needs to be
// associated with Nodes during compilation must be stored out-of-line indexed
// by the Node's id.
class Node FINAL {
class Node final {
public:
static Node* New(Zone* zone, NodeId id, const Operator* op, int input_count,
Node** inputs, bool has_extensible_inputs);
@ -69,7 +69,7 @@ class Node FINAL {
int UseCount() const;
void ReplaceUses(Node* replace_to);
class InputEdges FINAL {
class InputEdges final {
public:
typedef Edge value_type;
@ -87,7 +87,7 @@ class Node FINAL {
InputEdges input_edges() { return InputEdges(this); }
class Inputs FINAL {
class Inputs final {
public:
typedef Node* value_type;
@ -105,7 +105,7 @@ class Node FINAL {
Inputs inputs() { return Inputs(this); }
class UseEdges FINAL {
class UseEdges final {
public:
typedef Edge value_type;
@ -123,7 +123,7 @@ class Node FINAL {
UseEdges use_edges() { return UseEdges(this); }
class Uses FINAL {
class Uses final {
public:
typedef Node* value_type;
@ -147,14 +147,14 @@ class Node FINAL {
}
private:
struct Use FINAL : public ZoneObject {
struct Use final : public ZoneObject {
Node* from;
Use* next;
Use* prev;
int input_index;
};
class Input FINAL {
class Input final {
public:
Node* to;
Use* use;
@ -262,7 +262,7 @@ static inline const T& OpParameter(const Node* node) {
// An encapsulation for information associated with a single use of node as a
// input from another node, allowing access to both the defining node and
// the node having the input.
class Edge FINAL {
class Edge final {
public:
Node* from() const { return input_->use->from; }
Node* to() const { return input_->to; }
@ -288,7 +288,7 @@ class Edge FINAL {
// A forward iterator to visit the edges for the input dependencies of a node.
class Node::InputEdges::iterator FINAL {
class Node::InputEdges::iterator final {
public:
typedef std::forward_iterator_tag iterator_category;
typedef int difference_type;
@ -341,7 +341,7 @@ Node::InputEdges::iterator Node::InputEdges::end() const {
// A forward iterator to visit the inputs of a node.
class Node::Inputs::const_iterator FINAL {
class Node::Inputs::const_iterator final {
public:
typedef std::forward_iterator_tag iterator_category;
typedef int difference_type;
@ -386,7 +386,7 @@ Node::Inputs::const_iterator Node::Inputs::end() const {
// A forward iterator to visit the uses edges of a node. The edges are returned
// in
// the order in which they were added as inputs.
class Node::UseEdges::iterator FINAL {
class Node::UseEdges::iterator final {
public:
iterator(const iterator& other)
: current_(other.current_), next_(other.next_) {}
@ -432,7 +432,7 @@ Node::UseEdges::iterator Node::UseEdges::end() const {
// A forward iterator to visit the uses of a node. The uses are returned in
// the order in which they were added as inputs.
class Node::Uses::const_iterator FINAL {
class Node::Uses::const_iterator final {
public:
typedef std::forward_iterator_tag iterator_category;
typedef int difference_type;

View File

@ -15,7 +15,7 @@ namespace compiler {
class Operator;
class OperatorProperties FINAL {
class OperatorProperties final {
public:
static bool HasContextInput(const Operator* op);
static int GetContextInputCount(const Operator* op) {

View File

@ -153,12 +153,12 @@ class Operator1 : public Operator {
T const& parameter() const { return parameter_; }
bool Equals(const Operator* other) const FINAL {
bool Equals(const Operator* other) const final {
if (opcode() != other->opcode()) return false;
const Operator1<T>* that = reinterpret_cast<const Operator1<T>*>(other);
return this->pred_(this->parameter(), that->parameter());
}
size_t HashCode() const FINAL {
size_t HashCode() const final {
return base::hash_combine(this->opcode(), this->hash_(this->parameter()));
}
virtual void PrintParameter(std::ostream& os) const {
@ -166,7 +166,7 @@ class Operator1 : public Operator {
}
protected:
void PrintTo(std::ostream& os) const FINAL {
void PrintTo(std::ostream& os) const final {
os << mnemonic();
PrintParameter(os);
}

View File

@ -349,7 +349,7 @@ class AstGraphBuilderWithPositions : public AstGraphBuilder {
}
#define DEF_VISIT(type) \
void Visit##type(type* node) OVERRIDE { \
void Visit##type(type* node) override { \
SourcePositionTable::Scope pos(source_positions_, \
SourcePosition(node->position())); \
AstGraphBuilder::Visit##type(node); \

View File

@ -21,7 +21,7 @@ namespace compiler {
// Adds PPC-specific methods to convert InstructionOperands.
class PPCOperandConverter FINAL : public InstructionOperandConverter {
class PPCOperandConverter final : public InstructionOperandConverter {
public:
PPCOperandConverter(CodeGenerator* gen, Instruction* instr)
: InstructionOperandConverter(gen, instr) {}
@ -117,12 +117,12 @@ static inline bool HasRegisterInput(Instruction* instr, size_t index) {
namespace {
class OutOfLineLoadNAN32 FINAL : public OutOfLineCode {
class OutOfLineLoadNAN32 final : public OutOfLineCode {
public:
OutOfLineLoadNAN32(CodeGenerator* gen, DoubleRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ LoadDoubleLiteral(result_, std::numeric_limits<float>::quiet_NaN(),
kScratchReg);
}
@ -132,12 +132,12 @@ class OutOfLineLoadNAN32 FINAL : public OutOfLineCode {
};
class OutOfLineLoadNAN64 FINAL : public OutOfLineCode {
class OutOfLineLoadNAN64 final : public OutOfLineCode {
public:
OutOfLineLoadNAN64(CodeGenerator* gen, DoubleRegister result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL {
void Generate() final {
__ LoadDoubleLiteral(result_, std::numeric_limits<double>::quiet_NaN(),
kScratchReg);
}
@ -147,12 +147,12 @@ class OutOfLineLoadNAN64 FINAL : public OutOfLineCode {
};
class OutOfLineLoadZero FINAL : public OutOfLineCode {
class OutOfLineLoadZero final : public OutOfLineCode {
public:
OutOfLineLoadZero(CodeGenerator* gen, Register result)
: OutOfLineCode(gen), result_(result) {}
void Generate() FINAL { __ li(result_, Operand::Zero()); }
void Generate() final { __ li(result_, Operand::Zero()); }
private:
Register const result_;

View File

@ -22,7 +22,7 @@ enum ImmediateMode {
// Adds PPC-specific methods for generating operands.
class PPCOperandGenerator FINAL : public OperandGenerator {
class PPCOperandGenerator final : public OperandGenerator {
public:
explicit PPCOperandGenerator(InstructionSelector* selector)
: OperandGenerator(selector) {}

View File

@ -47,7 +47,7 @@ class RawMachineAssembler : public GraphBuilder {
MachineType word = kMachPtr,
MachineOperatorBuilder::Flags flags =
MachineOperatorBuilder::Flag::kNoFlags);
~RawMachineAssembler() OVERRIDE {}
~RawMachineAssembler() override {}
Zone* zone() const { return graph()->zone(); }
MachineOperatorBuilder* machine() { return &machine_; }
@ -489,7 +489,7 @@ class RawMachineAssembler : public GraphBuilder {
protected:
Node* MakeNode(const Operator* op, int input_count, Node** inputs,
bool incomplete) FINAL;
bool incomplete) final;
bool ScheduleValid() { return schedule_ != NULL; }

View File

@ -14,7 +14,7 @@ namespace compiler {
class InstructionOperand;
class InstructionSequence;
class RegisterAllocatorVerifier FINAL : public ZoneObject {
class RegisterAllocatorVerifier final : public ZoneObject {
public:
RegisterAllocatorVerifier(Zone* zone, const RegisterConfiguration* config,
const InstructionSequence* sequence);

View File

@ -32,7 +32,7 @@ enum RegisterKind {
//
// [Lifetime::USED_AT_START, Lifetime::USED_AT_END]
//
class LifetimePosition FINAL {
class LifetimePosition final {
public:
// Return the lifetime position that corresponds to the beginning of
// the gap with the given index.
@ -130,7 +130,7 @@ class LifetimePosition FINAL {
// Representation of the non-empty interval [start,end[.
class UseInterval FINAL : public ZoneObject {
class UseInterval final : public ZoneObject {
public:
UseInterval(LifetimePosition start, LifetimePosition end)
: start_(start), end_(end), next_(nullptr) {
@ -173,7 +173,7 @@ enum class UsePositionType : uint8_t { kAny, kRequiresRegister, kRequiresSlot };
// Representation of a use position.
class UsePosition FINAL : public ZoneObject {
class UsePosition final : public ZoneObject {
public:
UsePosition(LifetimePosition pos, InstructionOperand* operand,
InstructionOperand* hint);
@ -212,7 +212,7 @@ class SpillRange;
// Representation of SSA values' live ranges as a collection of (continuous)
// intervals over the instruction ordering.
class LiveRange FINAL : public ZoneObject {
class LiveRange final : public ZoneObject {
public:
static const int kInvalidAssignment = 0x7fffffff;
@ -387,7 +387,7 @@ class LiveRange FINAL : public ZoneObject {
};
class SpillRange FINAL : public ZoneObject {
class SpillRange final : public ZoneObject {
public:
SpillRange(LiveRange* range, Zone* zone);
@ -412,7 +412,7 @@ class SpillRange FINAL : public ZoneObject {
};
class RegisterAllocator FINAL : public ZoneObject {
class RegisterAllocator final : public ZoneObject {
public:
explicit RegisterAllocator(const RegisterConfiguration* config,
Zone* local_zone, Frame* frame,

View File

@ -26,7 +26,7 @@ typedef ZoneVector<Node*> NodeVector;
// A basic block contains an ordered list of nodes and ends with a control
// node. Note that if a basic block has phis, then all phis must appear as the
// first nodes in the block.
class BasicBlock FINAL : public ZoneObject {
class BasicBlock final : public ZoneObject {
public:
// Possible control nodes that can end a block.
enum Control {
@ -176,7 +176,7 @@ std::ostream& operator<<(std::ostream&, const BasicBlock::Id&);
// and ordering them within basic blocks. Prior to computing a schedule,
// a graph has no notion of control flow ordering other than that induced
// by the graph's dependencies. A schedule is required to generate code.
class Schedule FINAL : public ZoneObject {
class Schedule final : public ZoneObject {
public:
explicit Schedule(Zone* zone, size_t node_count_hint = 0);

View File

@ -20,12 +20,12 @@ class Graph;
// Lowers Select nodes to diamonds.
class SelectLowering FINAL : public Reducer {
class SelectLowering final : public Reducer {
public:
SelectLowering(Graph* graph, CommonOperatorBuilder* common);
~SelectLowering();
Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) override;
private:
typedef std::multimap<Node*, Node*, std::less<Node*>,

View File

@ -18,7 +18,7 @@ namespace compiler {
class RepresentationChanger;
class SourcePositionTable;
class SimplifiedLowering FINAL {
class SimplifiedLowering final {
public:
SimplifiedLowering(JSGraph* jsgraph, Zone* zone,
SourcePositionTable* source_positions)

View File

@ -21,12 +21,12 @@ namespace compiler {
class JSGraph;
class MachineOperatorBuilder;
class SimplifiedOperatorReducer FINAL : public Reducer {
class SimplifiedOperatorReducer final : public Reducer {
public:
explicit SimplifiedOperatorReducer(JSGraph* jsgraph);
~SimplifiedOperatorReducer() FINAL;
~SimplifiedOperatorReducer() final;
Reduction Reduce(Node* node) FINAL;
Reduction Reduce(Node* node) final;
private:
Reduction Change(Node* node, const Operator* op, Node* a);

View File

@ -187,9 +187,9 @@ const ElementAccess& ElementAccessOf(const Operator* op) {
V(ObjectIsNonNegativeSmi, Operator::kNoProperties, 1)
struct SimplifiedOperatorGlobalCache FINAL {
struct SimplifiedOperatorGlobalCache final {
#define PURE(Name, properties, input_count) \
struct Name##Operator FINAL : public Operator { \
struct Name##Operator final : public Operator { \
Name##Operator() \
: Operator(IrOpcode::k##Name, Operator::kPure | properties, #Name, \
input_count, 0, 0, 1, 0, 0) {} \
@ -199,14 +199,14 @@ struct SimplifiedOperatorGlobalCache FINAL {
#undef PURE
#define BUFFER_ACCESS(Type, type, TYPE, ctype, size) \
struct LoadBuffer##Type##Operator FINAL : public Operator1<BufferAccess> { \
struct LoadBuffer##Type##Operator final : public Operator1<BufferAccess> { \
LoadBuffer##Type##Operator() \
: Operator1<BufferAccess>(IrOpcode::kLoadBuffer, \
Operator::kNoThrow | Operator::kNoWrite, \
"LoadBuffer", 3, 1, 1, 1, 1, 0, \
BufferAccess(kExternal##Type##Array)) {} \
}; \
struct StoreBuffer##Type##Operator FINAL : public Operator1<BufferAccess> { \
struct StoreBuffer##Type##Operator final : public Operator1<BufferAccess> { \
StoreBuffer##Type##Operator() \
: Operator1<BufferAccess>(IrOpcode::kStoreBuffer, \
Operator::kNoRead | Operator::kNoThrow, \

View File

@ -34,7 +34,7 @@ std::ostream& operator<<(std::ostream&, BaseTaggedness);
// An access descriptor for loads/stores of array buffers.
class BufferAccess FINAL {
class BufferAccess final {
public:
explicit BufferAccess(ExternalArrayType external_array_type)
: external_array_type_(external_array_type) {}
@ -124,7 +124,7 @@ ElementAccess const& ElementAccessOf(const Operator* op) WARN_UNUSED_RESULT;
// - Bool: a tagged pointer to either the canonical JS #false or
// the canonical JS #true object
// - Bit: an untagged integer 0 or 1, but word-sized
class SimplifiedOperatorBuilder FINAL {
class SimplifiedOperatorBuilder final {
public:
explicit SimplifiedOperatorBuilder(Zone* zone);

View File

@ -10,12 +10,12 @@ namespace v8 {
namespace internal {
namespace compiler {
class SourcePositionTable::Decorator FINAL : public GraphDecorator {
class SourcePositionTable::Decorator final : public GraphDecorator {
public:
explicit Decorator(SourcePositionTable* source_positions)
: source_positions_(source_positions) {}
void Decorate(Node* node, bool incomplete) FINAL {
void Decorate(Node* node, bool incomplete) final {
DCHECK(!source_positions_->current_position_.IsInvalid());
source_positions_->table_.Set(node, source_positions_->current_position_);
}

View File

@ -14,7 +14,7 @@ namespace compiler {
// Encapsulates encoding and decoding of sources positions from which Nodes
// originated.
class SourcePosition FINAL {
class SourcePosition final {
public:
explicit SourcePosition(int raw = kUnknownPosition) : raw_(raw) {}
@ -43,7 +43,7 @@ inline bool operator!=(const SourcePosition& lhs, const SourcePosition& rhs) {
}
class SourcePositionTable FINAL {
class SourcePositionTable final {
public:
class Scope {
public:

View File

@ -42,7 +42,7 @@ enum LazyCachedType {
// Constructs and caches types lazily.
// TODO(turbofan): these types could be globally cached or cached per isolate.
class LazyTypeCache FINAL : public ZoneObject {
class LazyTypeCache final : public ZoneObject {
public:
explicit LazyTypeCache(Isolate* isolate, Zone* zone)
: isolate_(isolate), zone_(zone) {
@ -141,10 +141,10 @@ class LazyTypeCache FINAL : public ZoneObject {
};
class Typer::Decorator FINAL : public GraphDecorator {
class Typer::Decorator final : public GraphDecorator {
public:
explicit Decorator(Typer* typer) : typer_(typer) {}
void Decorate(Node* node, bool incomplete) FINAL;
void Decorate(Node* node, bool incomplete) final;
private:
Typer* typer_;
@ -215,7 +215,7 @@ class Typer::Visitor : public Reducer {
explicit Visitor(Typer* typer)
: typer_(typer), weakened_nodes_(typer->zone()) {}
Reduction Reduce(Node* node) OVERRIDE {
Reduction Reduce(Node* node) override {
if (node->op()->ValueOutputCount() == 0) return NoChange();
switch (node->opcode()) {
#define DECLARE_CASE(x) \

View File

@ -11,12 +11,12 @@ namespace v8 {
namespace internal {
namespace compiler {
class ValueNumberingReducer FINAL : public Reducer {
class ValueNumberingReducer final : public Reducer {
public:
explicit ValueNumberingReducer(Zone* zone);
~ValueNumberingReducer();
Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) override;
private:
enum { kInitialCapacity = 256u, kCapacityToSizeRatio = 2u };

Some files were not shown because too many files have changed in this diff Show More