diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h index d81dc0f57c..9a6c3958c7 100644 --- a/src/arm/lithium-arm.h +++ b/src/arm/lithium-arm.h @@ -189,13 +189,17 @@ class LCodeGen; V(WrapReceiver) -#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ - virtual Opcode opcode() const { return LInstruction::k##type; } \ - virtual void CompileToNative(LCodeGen* generator); \ - virtual const char* Mnemonic() const { return mnemonic; } \ - static L##type* cast(LInstruction* instr) { \ - ASSERT(instr->Is##type()); \ - return reinterpret_cast(instr); \ +#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ + virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ + return LInstruction::k##type; \ + } \ + virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ + virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ + return mnemonic; \ + } \ + static L##type* cast(LInstruction* instr) { \ + ASSERT(instr->Is##type()); \ + return reinterpret_cast(instr); \ } @@ -205,7 +209,7 @@ class LCodeGen; } -class LInstruction: public ZoneObject { +class LInstruction : public ZoneObject { public: LInstruction() : environment_(NULL), @@ -214,7 +218,7 @@ class LInstruction: public ZoneObject { set_position(RelocInfo::kNoPosition); } - virtual ~LInstruction() { } + virtual ~LInstruction() {} virtual void CompileToNative(LCodeGen* generator) = 0; virtual const char* Mnemonic() const = 0; @@ -313,11 +317,13 @@ class LInstruction: public ZoneObject { // I = number of input operands. // T = number of temporary operands. template -class LTemplateInstruction: public LInstruction { +class LTemplateInstruction : public LInstruction { public: // Allow 0 or 1 output operands. STATIC_ASSERT(R == 0 || R == 1); - virtual bool HasResult() const { return R != 0 && result() != NULL; } + virtual bool HasResult() const V8_FINAL V8_OVERRIDE { + return R != 0 && result() != NULL; + } void set_result(LOperand* operand) { results_[0] = operand; } LOperand* result() const { return results_[0]; } @@ -327,15 +333,15 @@ class LTemplateInstruction: public LInstruction { EmbeddedContainer temps_; private: - virtual int InputCount() { return I; } - virtual LOperand* InputAt(int i) { return inputs_[i]; } + virtual int InputCount() V8_FINAL V8_OVERRIDE { return I; } + virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; } - virtual int TempCount() { return T; } - virtual LOperand* TempAt(int i) { return temps_[i]; } + virtual int TempCount() V8_FINAL V8_OVERRIDE { return T; } + virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return temps_[i]; } }; -class LGap: public LTemplateInstruction<0, 0, 0> { +class LGap : public LTemplateInstruction<0, 0, 0> { public: explicit LGap(HBasicBlock* block) : block_(block) { @@ -346,8 +352,8 @@ class LGap: public LTemplateInstruction<0, 0, 0> { } // Can't use the DECLARE-macro here because of sub-classes. - virtual bool IsGap() const { return true; } - virtual void PrintDataTo(StringStream* stream); + virtual bool IsGap() const V8_OVERRIDE { return true; } + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; static LGap* cast(LInstruction* instr) { ASSERT(instr->IsGap()); return reinterpret_cast(instr); @@ -383,11 +389,11 @@ class LGap: public LTemplateInstruction<0, 0, 0> { }; -class LInstructionGap: public LGap { +class LInstructionGap V8_FINAL : public LGap { public: explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } - virtual bool HasInterestingComment(LCodeGen* gen) const { + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { return !IsRedundant(); } @@ -395,14 +401,14 @@ class LInstructionGap: public LGap { }; -class LGoto: public LTemplateInstruction<0, 0, 0> { +class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: explicit LGoto(int block_id) : block_id_(block_id) { } - virtual bool HasInterestingComment(LCodeGen* gen) const; + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") - virtual void PrintDataTo(StringStream* stream); - virtual bool IsControl() const { return true; } + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; + virtual bool IsControl() const V8_OVERRIDE { return true; } int block_id() const { return block_id_; } @@ -411,7 +417,7 @@ class LGoto: public LTemplateInstruction<0, 0, 0> { }; -class LLazyBailout: public LTemplateInstruction<0, 0, 0> { +class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: LLazyBailout() : gap_instructions_size_(0) { } @@ -427,7 +433,7 @@ class LLazyBailout: public LTemplateInstruction<0, 0, 0> { }; -class LDummyUse: public LTemplateInstruction<1, 1, 0> { +class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LDummyUse(LOperand* value) { inputs_[0] = value; @@ -436,22 +442,24 @@ class LDummyUse: public LTemplateInstruction<1, 1, 0> { }; -class LDeoptimize: public LTemplateInstruction<0, 0, 0> { +class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") DECLARE_HYDROGEN_ACCESSOR(Deoptimize) }; -class LLabel: public LGap { +class LLabel V8_FINAL : public LGap { public: explicit LLabel(HBasicBlock* block) : LGap(block), replacement_(NULL) { } - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(Label, "label") - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int block_id() const { return block()->block_id(); } bool is_loop_header() const { return block()->IsLoopHeader(); } @@ -467,14 +475,14 @@ class LLabel: public LGap { }; -class LParameter: public LTemplateInstruction<1, 0, 0> { +class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") }; -class LCallStub: public LTemplateInstruction<1, 0, 0> { +class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") DECLARE_HYDROGEN_ACCESSOR(CallStub) @@ -485,19 +493,21 @@ class LCallStub: public LTemplateInstruction<1, 0, 0> { }; -class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { +class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") }; template -class LControlInstruction: public LTemplateInstruction<0, I, T> { +class LControlInstruction : public LTemplateInstruction<0, I, T> { public: LControlInstruction() : false_label_(NULL), true_label_(NULL) { } - virtual bool IsControl() const { return true; } + virtual bool IsControl() const V8_FINAL V8_OVERRIDE { return true; } int SuccessorCount() { return hydrogen()->SuccessorCount(); } HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } @@ -536,7 +546,7 @@ class LControlInstruction: public LTemplateInstruction<0, I, T> { }; -class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { +class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LWrapReceiver(LOperand* receiver, LOperand* function) { inputs_[0] = receiver; @@ -550,7 +560,7 @@ class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { }; -class LApplyArguments: public LTemplateInstruction<1, 4, 0> { +class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { public: LApplyArguments(LOperand* function, LOperand* receiver, @@ -571,7 +581,7 @@ class LApplyArguments: public LTemplateInstruction<1, 4, 0> { }; -class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { +class LAccessArgumentsAt V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LAccessArgumentsAt(LOperand* arguments, LOperand* length, LOperand* index) { inputs_[0] = arguments; @@ -585,11 +595,11 @@ class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { LOperand* length() { return inputs_[1]; } LOperand* index() { return inputs_[2]; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { +class LArgumentsLength V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LArgumentsLength(LOperand* elements) { inputs_[0] = elements; @@ -601,14 +611,14 @@ class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { }; -class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { +class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) }; -class LModI: public LTemplateInstruction<1, 2, 2> { +class LModI V8_FINAL : public LTemplateInstruction<1, 2, 2> { public: LModI(LOperand* left, LOperand* right, @@ -630,7 +640,7 @@ class LModI: public LTemplateInstruction<1, 2, 2> { }; -class LDivI: public LTemplateInstruction<1, 2, 1> { +class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LDivI(LOperand* left, LOperand* right, LOperand* temp) { inputs_[0] = left; @@ -647,7 +657,7 @@ class LDivI: public LTemplateInstruction<1, 2, 1> { }; -class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { +class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LMathFloorOfDiv(LOperand* left, LOperand* right, @@ -666,7 +676,7 @@ class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { }; -class LMulI: public LTemplateInstruction<1, 2, 1> { +class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LMulI(LOperand* left, LOperand* right, LOperand* temp) { inputs_[0] = left; @@ -684,7 +694,7 @@ class LMulI: public LTemplateInstruction<1, 2, 1> { // Instruction for computing multiplier * multiplicand + addend. -class LMultiplyAddD: public LTemplateInstruction<1, 3, 0> { +class LMultiplyAddD V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LMultiplyAddD(LOperand* addend, LOperand* multiplier, LOperand* multiplicand) { @@ -702,7 +712,7 @@ class LMultiplyAddD: public LTemplateInstruction<1, 3, 0> { // Instruction for computing minuend - multiplier * multiplicand. -class LMultiplySubD: public LTemplateInstruction<1, 3, 0> { +class LMultiplySubD V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LMultiplySubD(LOperand* minuend, LOperand* multiplier, LOperand* multiplicand) { @@ -719,13 +729,13 @@ class LMultiplySubD: public LTemplateInstruction<1, 3, 0> { }; -class LDebugBreak: public LTemplateInstruction<0, 0, 0> { +class LDebugBreak V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") }; -class LCompareNumericAndBranch: public LControlInstruction<2, 0> { +class LCompareNumericAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LCompareNumericAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -744,11 +754,11 @@ class LCompareNumericAndBranch: public LControlInstruction<2, 0> { return hydrogen()->representation().IsDouble(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LMathFloor: public LTemplateInstruction<1, 1, 0> { +class LMathFloor V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathFloor(LOperand* value) { inputs_[0] = value; @@ -761,7 +771,7 @@ class LMathFloor: public LTemplateInstruction<1, 1, 0> { }; -class LMathRound: public LTemplateInstruction<1, 1, 1> { +class LMathRound V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LMathRound(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -776,7 +786,7 @@ class LMathRound: public LTemplateInstruction<1, 1, 1> { }; -class LMathAbs: public LTemplateInstruction<1, 1, 0> { +class LMathAbs V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathAbs(LOperand* value) { inputs_[0] = value; @@ -789,7 +799,7 @@ class LMathAbs: public LTemplateInstruction<1, 1, 0> { }; -class LMathLog: public LTemplateInstruction<1, 1, 0> { +class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathLog(LOperand* value) { inputs_[0] = value; @@ -801,7 +811,7 @@ class LMathLog: public LTemplateInstruction<1, 1, 0> { }; -class LMathSin: public LTemplateInstruction<1, 1, 0> { +class LMathSin V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathSin(LOperand* value) { inputs_[0] = value; @@ -813,7 +823,7 @@ class LMathSin: public LTemplateInstruction<1, 1, 0> { }; -class LMathCos: public LTemplateInstruction<1, 1, 0> { +class LMathCos V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathCos(LOperand* value) { inputs_[0] = value; @@ -825,7 +835,7 @@ class LMathCos: public LTemplateInstruction<1, 1, 0> { }; -class LMathTan: public LTemplateInstruction<1, 1, 0> { +class LMathTan V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathTan(LOperand* value) { inputs_[0] = value; @@ -837,7 +847,7 @@ class LMathTan: public LTemplateInstruction<1, 1, 0> { }; -class LMathExp: public LTemplateInstruction<1, 1, 3> { +class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 3> { public: LMathExp(LOperand* value, LOperand* double_temp, @@ -859,7 +869,7 @@ class LMathExp: public LTemplateInstruction<1, 1, 3> { }; -class LMathSqrt: public LTemplateInstruction<1, 1, 0> { +class LMathSqrt V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathSqrt(LOperand* value) { inputs_[0] = value; @@ -871,7 +881,7 @@ class LMathSqrt: public LTemplateInstruction<1, 1, 0> { }; -class LMathPowHalf: public LTemplateInstruction<1, 1, 1> { +class LMathPowHalf V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LMathPowHalf(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -885,7 +895,7 @@ class LMathPowHalf: public LTemplateInstruction<1, 1, 1> { }; -class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { +class LCmpObjectEqAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -900,7 +910,7 @@ class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { }; -class LCmpHoleAndBranch: public LControlInstruction<1, 0> { +class LCmpHoleAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LCmpHoleAndBranch(LOperand* object) { inputs_[0] = object; @@ -913,7 +923,7 @@ class LCmpHoleAndBranch: public LControlInstruction<1, 0> { }; -class LIsObjectAndBranch: public LControlInstruction<1, 1> { +class LIsObjectAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LIsObjectAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -926,11 +936,11 @@ class LIsObjectAndBranch: public LControlInstruction<1, 1> { DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsNumberAndBranch: public LControlInstruction<1, 0> { +class LIsNumberAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LIsNumberAndBranch(LOperand* value) { inputs_[0] = value; @@ -943,7 +953,7 @@ class LIsNumberAndBranch: public LControlInstruction<1, 0> { }; -class LIsStringAndBranch: public LControlInstruction<1, 1> { +class LIsStringAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LIsStringAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -956,11 +966,11 @@ class LIsStringAndBranch: public LControlInstruction<1, 1> { DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsSmiAndBranch: public LControlInstruction<1, 0> { +class LIsSmiAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LIsSmiAndBranch(LOperand* value) { inputs_[0] = value; @@ -971,11 +981,11 @@ class LIsSmiAndBranch: public LControlInstruction<1, 0> { DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { +class LIsUndetectableAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -989,11 +999,11 @@ class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { "is-undetectable-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LStringCompareAndBranch: public LControlInstruction<2, 0> { +class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LStringCompareAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1009,11 +1019,11 @@ class LStringCompareAndBranch: public LControlInstruction<2, 0> { Token::Value op() const { return hydrogen()->token(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { +class LHasInstanceTypeAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LHasInstanceTypeAndBranch(LOperand* value) { inputs_[0] = value; @@ -1025,11 +1035,11 @@ class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { "has-instance-type-and-branch") DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { +class LGetCachedArrayIndex V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGetCachedArrayIndex(LOperand* value) { inputs_[0] = value; @@ -1042,7 +1052,8 @@ class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { }; -class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { +class LHasCachedArrayIndexAndBranch V8_FINAL + : public LControlInstruction<1, 0> { public: explicit LHasCachedArrayIndexAndBranch(LOperand* value) { inputs_[0] = value; @@ -1054,11 +1065,11 @@ class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { "has-cached-array-index-and-branch") DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LClassOfTestAndBranch: public LControlInstruction<1, 1> { +class LClassOfTestAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LClassOfTestAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1072,11 +1083,11 @@ class LClassOfTestAndBranch: public LControlInstruction<1, 1> { "class-of-test-and-branch") DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LCmpT: public LTemplateInstruction<1, 2, 0> { +class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LCmpT(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1093,7 +1104,7 @@ class LCmpT: public LTemplateInstruction<1, 2, 0> { }; -class LInstanceOf: public LTemplateInstruction<1, 2, 0> { +class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LInstanceOf(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1107,7 +1118,7 @@ class LInstanceOf: public LTemplateInstruction<1, 2, 0> { }; -class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { +class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1125,7 +1136,8 @@ class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { return lazy_deopt_env_; } - virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { + virtual void SetDeferredLazyDeoptimizationEnvironment( + LEnvironment* env) V8_OVERRIDE { lazy_deopt_env_ = env; } @@ -1134,7 +1146,7 @@ class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { }; -class LInstanceSize: public LTemplateInstruction<1, 1, 0> { +class LInstanceSize V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInstanceSize(LOperand* object) { inputs_[0] = object; @@ -1147,7 +1159,7 @@ class LInstanceSize: public LTemplateInstruction<1, 1, 0> { }; -class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { +class LBoundsCheck V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LBoundsCheck(LOperand* index, LOperand* length) { inputs_[0] = index; @@ -1162,7 +1174,7 @@ class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { }; -class LBitI: public LTemplateInstruction<1, 2, 0> { +class LBitI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LBitI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1179,7 +1191,7 @@ class LBitI: public LTemplateInstruction<1, 2, 0> { }; -class LShiftI: public LTemplateInstruction<1, 2, 0> { +class LShiftI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) : op_(op), can_deopt_(can_deopt) { @@ -1200,7 +1212,7 @@ class LShiftI: public LTemplateInstruction<1, 2, 0> { }; -class LSubI: public LTemplateInstruction<1, 2, 0> { +class LSubI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LSubI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1215,7 +1227,7 @@ class LSubI: public LTemplateInstruction<1, 2, 0> { }; -class LRSubI: public LTemplateInstruction<1, 2, 0> { +class LRSubI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LRSubI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1230,7 +1242,7 @@ class LRSubI: public LTemplateInstruction<1, 2, 0> { }; -class LConstantI: public LTemplateInstruction<1, 0, 0> { +class LConstantI V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1239,7 +1251,7 @@ class LConstantI: public LTemplateInstruction<1, 0, 0> { }; -class LConstantS: public LTemplateInstruction<1, 0, 0> { +class LConstantS V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1248,7 +1260,7 @@ class LConstantS: public LTemplateInstruction<1, 0, 0> { }; -class LConstantD: public LTemplateInstruction<1, 0, 0> { +class LConstantD V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1257,7 +1269,7 @@ class LConstantD: public LTemplateInstruction<1, 0, 0> { }; -class LConstantE: public LTemplateInstruction<1, 0, 0> { +class LConstantE V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1268,7 +1280,7 @@ class LConstantE: public LTemplateInstruction<1, 0, 0> { }; -class LConstantT: public LTemplateInstruction<1, 0, 0> { +class LConstantT V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1277,7 +1289,7 @@ class LConstantT: public LTemplateInstruction<1, 0, 0> { }; -class LBranch: public LControlInstruction<1, 0> { +class LBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LBranch(LOperand* value) { inputs_[0] = value; @@ -1288,11 +1300,11 @@ class LBranch: public LControlInstruction<1, 0> { DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") DECLARE_HYDROGEN_ACCESSOR(Branch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LCmpMapAndBranch: public LControlInstruction<1, 1> { +class LCmpMapAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LCmpMapAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1309,7 +1321,7 @@ class LCmpMapAndBranch: public LControlInstruction<1, 1> { }; -class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { +class LMapEnumLength V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMapEnumLength(LOperand* value) { inputs_[0] = value; @@ -1321,7 +1333,7 @@ class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { }; -class LElementsKind: public LTemplateInstruction<1, 1, 0> { +class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LElementsKind(LOperand* value) { inputs_[0] = value; @@ -1334,7 +1346,7 @@ class LElementsKind: public LTemplateInstruction<1, 1, 0> { }; -class LValueOf: public LTemplateInstruction<1, 1, 1> { +class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LValueOf(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1349,7 +1361,7 @@ class LValueOf: public LTemplateInstruction<1, 1, 1> { }; -class LDateField: public LTemplateInstruction<1, 1, 1> { +class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) { inputs_[0] = date; @@ -1368,7 +1380,7 @@ class LDateField: public LTemplateInstruction<1, 1, 1> { }; -class LSeqStringSetChar: public LTemplateInstruction<1, 3, 0> { +class LSeqStringSetChar V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LSeqStringSetChar(String::Encoding encoding, LOperand* string, @@ -1392,7 +1404,7 @@ class LSeqStringSetChar: public LTemplateInstruction<1, 3, 0> { }; -class LThrow: public LTemplateInstruction<0, 1, 0> { +class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LThrow(LOperand* value) { inputs_[0] = value; @@ -1404,7 +1416,7 @@ class LThrow: public LTemplateInstruction<0, 1, 0> { }; -class LAddI: public LTemplateInstruction<1, 2, 0> { +class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LAddI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1419,7 +1431,7 @@ class LAddI: public LTemplateInstruction<1, 2, 0> { }; -class LMathMinMax: public LTemplateInstruction<1, 2, 0> { +class LMathMinMax V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LMathMinMax(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1434,7 +1446,7 @@ class LMathMinMax: public LTemplateInstruction<1, 2, 0> { }; -class LPower: public LTemplateInstruction<1, 2, 0> { +class LPower V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LPower(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1449,7 +1461,7 @@ class LPower: public LTemplateInstruction<1, 2, 0> { }; -class LRandom: public LTemplateInstruction<1, 1, 0> { +class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LRandom(LOperand* global_object) { inputs_[0] = global_object; @@ -1462,7 +1474,7 @@ class LRandom: public LTemplateInstruction<1, 1, 0> { }; -class LArithmeticD: public LTemplateInstruction<1, 2, 0> { +class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LArithmeticD(Token::Value op, LOperand* left, LOperand* right) : op_(op) { @@ -1474,16 +1486,18 @@ class LArithmeticD: public LTemplateInstruction<1, 2, 0> { LOperand* left() { return inputs_[0]; } LOperand* right() { return inputs_[1]; } - virtual Opcode opcode() const { return LInstruction::kArithmeticD; } - virtual void CompileToNative(LCodeGen* generator); - virtual const char* Mnemonic() const; + virtual Opcode opcode() const V8_OVERRIDE { + return LInstruction::kArithmeticD; + } + virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; + virtual const char* Mnemonic() const V8_OVERRIDE; private: Token::Value op_; }; -class LArithmeticT: public LTemplateInstruction<1, 2, 0> { +class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LArithmeticT(Token::Value op, LOperand* left, LOperand* right) : op_(op) { @@ -1495,16 +1509,18 @@ class LArithmeticT: public LTemplateInstruction<1, 2, 0> { LOperand* right() { return inputs_[1]; } Token::Value op() const { return op_; } - virtual Opcode opcode() const { return LInstruction::kArithmeticT; } - virtual void CompileToNative(LCodeGen* generator); - virtual const char* Mnemonic() const; + virtual Opcode opcode() const V8_OVERRIDE { + return LInstruction::kArithmeticT; + } + virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; + virtual const char* Mnemonic() const V8_OVERRIDE; private: Token::Value op_; }; -class LReturn: public LTemplateInstruction<0, 2, 0> { +class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: explicit LReturn(LOperand* value, LOperand* parameter_count) { inputs_[0] = value; @@ -1526,7 +1542,7 @@ class LReturn: public LTemplateInstruction<0, 2, 0> { }; -class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { +class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadNamedField(LOperand* object) { inputs_[0] = object; @@ -1539,7 +1555,7 @@ class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { }; -class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { +class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadNamedGeneric(LOperand* object) { inputs_[0] = object; @@ -1554,7 +1570,7 @@ class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { }; -class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> { +class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadFunctionPrototype(LOperand* function) { inputs_[0] = function; @@ -1567,7 +1583,8 @@ class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> { }; -class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { +class LLoadExternalArrayPointer V8_FINAL + : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadExternalArrayPointer(LOperand* object) { inputs_[0] = object; @@ -1580,7 +1597,7 @@ class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { }; -class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { +class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadKeyed(LOperand* elements, LOperand* key) { inputs_[0] = elements; @@ -1599,12 +1616,12 @@ class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; uint32_t additional_index() const { return hydrogen()->index_offset(); } }; -class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { +class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadKeyedGeneric(LOperand* object, LOperand* key) { inputs_[0] = object; @@ -1618,14 +1635,14 @@ class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { }; -class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { +class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) }; -class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { +class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadGlobalGeneric(LOperand* global_object) { inputs_[0] = global_object; @@ -1641,7 +1658,7 @@ class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { }; -class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> { +class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: LStoreGlobalCell(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1656,7 +1673,7 @@ class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> { }; -class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { +class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: explicit LStoreGlobalGeneric(LOperand* global_object, LOperand* value) { @@ -1675,7 +1692,7 @@ class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { }; -class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { +class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadContextSlot(LOperand* context) { inputs_[0] = context; @@ -1688,11 +1705,11 @@ class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { int slot_index() { return hydrogen()->slot_index(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LStoreContextSlot: public LTemplateInstruction<0, 2, 0> { +class LStoreContextSlot V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LStoreContextSlot(LOperand* context, LOperand* value) { inputs_[0] = context; @@ -1707,11 +1724,11 @@ class LStoreContextSlot: public LTemplateInstruction<0, 2, 0> { int slot_index() { return hydrogen()->slot_index(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LPushArgument: public LTemplateInstruction<0, 1, 0> { +class LPushArgument V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LPushArgument(LOperand* value) { inputs_[0] = value; @@ -1723,7 +1740,7 @@ class LPushArgument: public LTemplateInstruction<0, 1, 0> { }; -class LDrop: public LTemplateInstruction<0, 0, 0> { +class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: explicit LDrop(int count) : count_(count) { } @@ -1736,7 +1753,7 @@ class LDrop: public LTemplateInstruction<0, 0, 0> { }; -class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { +class LInnerAllocatedObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInnerAllocatedObject(LOperand* base_object) { inputs_[0] = base_object; @@ -1745,28 +1762,28 @@ class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { LOperand* base_object() { return inputs_[0]; } int offset() { return hydrogen()->offset(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object") DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject) }; -class LThisFunction: public LTemplateInstruction<1, 0, 0> { +class LThisFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") DECLARE_HYDROGEN_ACCESSOR(ThisFunction) }; -class LContext: public LTemplateInstruction<1, 0, 0> { +class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(Context, "context") DECLARE_HYDROGEN_ACCESSOR(Context) }; -class LOuterContext: public LTemplateInstruction<1, 1, 0> { +class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LOuterContext(LOperand* context) { inputs_[0] = context; @@ -1778,14 +1795,14 @@ class LOuterContext: public LTemplateInstruction<1, 1, 0> { }; -class LDeclareGlobals: public LTemplateInstruction<0, 0, 0> { +class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) }; -class LGlobalObject: public LTemplateInstruction<1, 1, 0> { +class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGlobalObject(LOperand* context) { inputs_[0] = context; @@ -1797,7 +1814,7 @@ class LGlobalObject: public LTemplateInstruction<1, 1, 0> { }; -class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { +class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGlobalReceiver(LOperand* global_object) { inputs_[0] = global_object; @@ -1809,19 +1826,19 @@ class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { }; -class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { +class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle function() { return hydrogen()->function(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { +class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInvokeFunction(LOperand* function) { inputs_[0] = function; @@ -1832,13 +1849,13 @@ class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallKeyed: public LTemplateInstruction<1, 1, 0> { +class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallKeyed(LOperand* key) { inputs_[0] = key; @@ -1849,26 +1866,26 @@ class LCallKeyed: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") DECLARE_HYDROGEN_ACCESSOR(CallKeyed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNamed: public LTemplateInstruction<1, 0, 0> { +class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") DECLARE_HYDROGEN_ACCESSOR(CallNamed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const { return hydrogen()->name(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallFunction: public LTemplateInstruction<1, 1, 0> { +class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallFunction(LOperand* function) { inputs_[0] = function; @@ -1883,30 +1900,30 @@ class LCallFunction: public LTemplateInstruction<1, 1, 0> { }; -class LCallGlobal: public LTemplateInstruction<1, 0, 0> { +class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") DECLARE_HYDROGEN_ACCESSOR(CallGlobal) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const {return hydrogen()->name(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { +class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNew: public LTemplateInstruction<1, 1, 0> { +class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallNew(LOperand* constructor) { inputs_[0] = constructor; @@ -1917,13 +1934,13 @@ class LCallNew: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") DECLARE_HYDROGEN_ACCESSOR(CallNew) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNewArray: public LTemplateInstruction<1, 1, 0> { +class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallNewArray(LOperand* constructor) { inputs_[0] = constructor; @@ -1934,13 +1951,13 @@ class LCallNewArray: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") DECLARE_HYDROGEN_ACCESSOR(CallNewArray) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallRuntime: public LTemplateInstruction<1, 0, 0> { +class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") DECLARE_HYDROGEN_ACCESSOR(CallRuntime) @@ -1950,7 +1967,7 @@ class LCallRuntime: public LTemplateInstruction<1, 0, 0> { }; -class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { +class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInteger32ToDouble(LOperand* value) { inputs_[0] = value; @@ -1962,7 +1979,7 @@ class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { }; -class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { +class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInteger32ToSmi(LOperand* value) { inputs_[0] = value; @@ -1975,7 +1992,7 @@ class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { }; -class LUint32ToDouble: public LTemplateInstruction<1, 1, 0> { +class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LUint32ToDouble(LOperand* value) { inputs_[0] = value; @@ -1987,7 +2004,7 @@ class LUint32ToDouble: public LTemplateInstruction<1, 1, 0> { }; -class LNumberTagI: public LTemplateInstruction<1, 1, 0> { +class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LNumberTagI(LOperand* value) { inputs_[0] = value; @@ -1999,7 +2016,7 @@ class LNumberTagI: public LTemplateInstruction<1, 1, 0> { }; -class LNumberTagU: public LTemplateInstruction<1, 1, 0> { +class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LNumberTagU(LOperand* value) { inputs_[0] = value; @@ -2011,7 +2028,7 @@ class LNumberTagU: public LTemplateInstruction<1, 1, 0> { }; -class LNumberTagD: public LTemplateInstruction<1, 1, 2> { +class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 2> { public: LNumberTagD(LOperand* value, LOperand* temp, LOperand* temp2) { inputs_[0] = value; @@ -2028,7 +2045,7 @@ class LNumberTagD: public LTemplateInstruction<1, 1, 2> { }; -class LDoubleToSmi: public LTemplateInstruction<1, 1, 2> { +class LDoubleToSmi V8_FINAL : public LTemplateInstruction<1, 1, 2> { public: LDoubleToSmi(LOperand* value, LOperand* temp, LOperand* temp2) { inputs_[0] = value; @@ -2048,7 +2065,7 @@ class LDoubleToSmi: public LTemplateInstruction<1, 1, 2> { // Sometimes truncating conversion from a tagged value to an int32. -class LDoubleToI: public LTemplateInstruction<1, 1, 2> { +class LDoubleToI V8_FINAL : public LTemplateInstruction<1, 1, 2> { public: LDoubleToI(LOperand* value, LOperand* temp, LOperand* temp2) { inputs_[0] = value; @@ -2068,7 +2085,7 @@ class LDoubleToI: public LTemplateInstruction<1, 1, 2> { // Truncating conversion from a tagged value to an int32. -class LTaggedToI: public LTemplateInstruction<1, 1, 3> { +class LTaggedToI V8_FINAL : public LTemplateInstruction<1, 1, 3> { public: LTaggedToI(LOperand* value, LOperand* temp, @@ -2092,7 +2109,7 @@ class LTaggedToI: public LTemplateInstruction<1, 1, 3> { }; -class LSmiTag: public LTemplateInstruction<1, 1, 0> { +class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LSmiTag(LOperand* value) { inputs_[0] = value; @@ -2104,7 +2121,7 @@ class LSmiTag: public LTemplateInstruction<1, 1, 0> { }; -class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { +class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LNumberUntagD(LOperand* value) { inputs_[0] = value; @@ -2117,7 +2134,7 @@ class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { }; -class LSmiUntag: public LTemplateInstruction<1, 1, 0> { +class LSmiUntag V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: LSmiUntag(LOperand* value, bool needs_check) : needs_check_(needs_check) { @@ -2134,7 +2151,7 @@ class LSmiUntag: public LTemplateInstruction<1, 1, 0> { }; -class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { +class LStoreNamedField V8_FINAL : public LTemplateInstruction<0, 2, 1> { public: LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp) { inputs_[0] = object; @@ -2149,7 +2166,7 @@ class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle transition() const { return hydrogen()->transition_map(); } Representation representation() const { @@ -2158,7 +2175,7 @@ class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { }; -class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { +class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LStoreNamedGeneric(LOperand* object, LOperand* value) { inputs_[0] = object; @@ -2171,14 +2188,14 @@ class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const { return hydrogen()->name(); } StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } }; -class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { +class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { inputs_[0] = object; @@ -2197,7 +2214,7 @@ class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; bool NeedsCanonicalization() { if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() || hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) { @@ -2209,7 +2226,7 @@ class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { }; -class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { +class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) { inputs_[0] = obj; @@ -2224,13 +2241,13 @@ class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } }; -class LTransitionElementsKind: public LTemplateInstruction<0, 1, 1> { +class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: LTransitionElementsKind(LOperand* object, LOperand* new_map_temp) { @@ -2245,7 +2262,7 @@ class LTransitionElementsKind: public LTemplateInstruction<0, 1, 1> { "transition-elements-kind") DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle original_map() { return hydrogen()->original_map(); } Handle transitioned_map() { return hydrogen()->transitioned_map(); } @@ -2254,7 +2271,7 @@ class LTransitionElementsKind: public LTemplateInstruction<0, 1, 1> { }; -class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { +class LTrapAllocationMemento V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: LTrapAllocationMemento(LOperand* object, LOperand* temp) { @@ -2270,7 +2287,7 @@ class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { }; -class LStringAdd: public LTemplateInstruction<1, 2, 0> { +class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LStringAdd(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -2286,7 +2303,7 @@ class LStringAdd: public LTemplateInstruction<1, 2, 0> { -class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { +class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LStringCharCodeAt(LOperand* string, LOperand* index) { inputs_[0] = string; @@ -2301,7 +2318,7 @@ class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { }; -class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { +class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LStringCharFromCode(LOperand* char_code) { inputs_[0] = char_code; @@ -2314,7 +2331,7 @@ class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { }; -class LCheckFunction: public LTemplateInstruction<0, 1, 0> { +class LCheckFunction V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckFunction(LOperand* value) { inputs_[0] = value; @@ -2327,7 +2344,7 @@ class LCheckFunction: public LTemplateInstruction<0, 1, 0> { }; -class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> { +class LCheckInstanceType V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckInstanceType(LOperand* value) { inputs_[0] = value; @@ -2340,7 +2357,7 @@ class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> { }; -class LCheckMaps: public LTemplateInstruction<0, 1, 0> { +class LCheckMaps V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckMaps(LOperand* value) { inputs_[0] = value; @@ -2353,7 +2370,7 @@ class LCheckMaps: public LTemplateInstruction<0, 1, 0> { }; -class LCheckSmi: public LTemplateInstruction<1, 1, 0> { +class LCheckSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCheckSmi(LOperand* value) { inputs_[0] = value; @@ -2365,7 +2382,7 @@ class LCheckSmi: public LTemplateInstruction<1, 1, 0> { }; -class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { +class LCheckNonSmi V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckNonSmi(LOperand* value) { inputs_[0] = value; @@ -2378,7 +2395,7 @@ class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { }; -class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { +class LClampDToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LClampDToUint8(LOperand* unclamped) { inputs_[0] = unclamped; @@ -2390,7 +2407,7 @@ class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { }; -class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { +class LClampIToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LClampIToUint8(LOperand* unclamped) { inputs_[0] = unclamped; @@ -2402,7 +2419,7 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { }; -class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { +class LClampTToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LClampTToUint8(LOperand* unclamped, LOperand* temp) { inputs_[0] = unclamped; @@ -2416,7 +2433,7 @@ class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { }; -class LAllocate: public LTemplateInstruction<1, 2, 2> { +class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> { public: LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) { inputs_[1] = size; @@ -2433,21 +2450,21 @@ class LAllocate: public LTemplateInstruction<1, 2, 2> { }; -class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> { +class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) }; -class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { +class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) }; -class LToFastProperties: public LTemplateInstruction<1, 1, 0> { +class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LToFastProperties(LOperand* value) { inputs_[0] = value; @@ -2460,7 +2477,7 @@ class LToFastProperties: public LTemplateInstruction<1, 1, 0> { }; -class LTypeof: public LTemplateInstruction<1, 1, 0> { +class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LTypeof(LOperand* value) { inputs_[0] = value; @@ -2472,7 +2489,7 @@ class LTypeof: public LTemplateInstruction<1, 1, 0> { }; -class LTypeofIsAndBranch: public LControlInstruction<1, 0> { +class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LTypeofIsAndBranch(LOperand* value) { inputs_[0] = value; @@ -2485,11 +2502,11 @@ class LTypeofIsAndBranch: public LControlInstruction<1, 0> { Handle type_literal() { return hydrogen()->type_literal(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { +class LIsConstructCallAndBranch V8_FINAL : public LControlInstruction<0, 1> { public: explicit LIsConstructCallAndBranch(LOperand* temp) { temps_[0] = temp; @@ -2502,16 +2519,18 @@ class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { }; -class LOsrEntry: public LTemplateInstruction<0, 0, 0> { +class LOsrEntry V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: LOsrEntry() {} - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") }; -class LStackCheck: public LTemplateInstruction<0, 0, 0> { +class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") DECLARE_HYDROGEN_ACCESSOR(StackCheck) @@ -2523,7 +2542,7 @@ class LStackCheck: public LTemplateInstruction<0, 0, 0> { }; -class LForInPrepareMap: public LTemplateInstruction<1, 1, 0> { +class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LForInPrepareMap(LOperand* object) { inputs_[0] = object; @@ -2535,7 +2554,7 @@ class LForInPrepareMap: public LTemplateInstruction<1, 1, 0> { }; -class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { +class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LForInCacheArray(LOperand* map) { inputs_[0] = map; @@ -2551,7 +2570,7 @@ class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { }; -class LCheckMapValue: public LTemplateInstruction<0, 2, 0> { +class LCheckMapValue V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LCheckMapValue(LOperand* value, LOperand* map) { inputs_[0] = value; @@ -2565,7 +2584,7 @@ class LCheckMapValue: public LTemplateInstruction<0, 2, 0> { }; -class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { +class LLoadFieldByIndex V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadFieldByIndex(LOperand* object, LOperand* index) { inputs_[0] = object; @@ -2580,7 +2599,7 @@ class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { class LChunkBuilder; -class LPlatformChunk: public LChunk { +class LPlatformChunk V8_FINAL : public LChunk { public: LPlatformChunk(CompilationInfo* info, HGraph* graph) : LChunk(info, graph) { } @@ -2590,7 +2609,7 @@ class LPlatformChunk: public LChunk { }; -class LChunkBuilder BASE_EMBEDDED { +class LChunkBuilder V8_FINAL BASE_EMBEDDED { public: LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) : chunk_(NULL), diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc index 9ec80f819a..8d9efbf31e 100644 --- a/src/arm/lithium-codegen-arm.cc +++ b/src/arm/lithium-codegen-arm.cc @@ -36,7 +36,7 @@ namespace v8 { namespace internal { -class SafepointGenerator : public CallWrapper { +class SafepointGenerator V8_FINAL : public CallWrapper { public: SafepointGenerator(LCodeGen* codegen, LPointerMap* pointers, @@ -44,11 +44,11 @@ class SafepointGenerator : public CallWrapper { : codegen_(codegen), pointers_(pointers), deopt_mode_(mode) { } - virtual ~SafepointGenerator() { } + virtual ~SafepointGenerator() {} - virtual void BeforeCall(int call_size) const { } + virtual void BeforeCall(int call_size) const V8_OVERRIDE {} - virtual void AfterCall() const { + virtual void AfterCall() const V8_OVERRIDE { codegen_->RecordSafepoint(pointers_, deopt_mode_); } @@ -2734,15 +2734,15 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) { void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { - class DeferredInstanceOfKnownGlobal: public LDeferredCode { + class DeferredInstanceOfKnownGlobal V8_FINAL : public LDeferredCode { public: DeferredInstanceOfKnownGlobal(LCodeGen* codegen, LInstanceOfKnownGlobal* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } Label* map_check() { return &map_check_; } private: LInstanceOfKnownGlobal* instr_; @@ -3721,14 +3721,14 @@ void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) { void LCodeGen::DoMathAbs(LMathAbs* instr) { // Class for deferred case. - class DeferredMathAbsTaggedHeapNumber: public LDeferredCode { + class DeferredMathAbsTaggedHeapNumber V8_FINAL : public LDeferredCode { public: DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LMathAbs* instr_; }; @@ -3877,12 +3877,12 @@ void LCodeGen::DoPower(LPower* instr) { void LCodeGen::DoRandom(LRandom* instr) { - class DeferredDoRandom: public LDeferredCode { + class DeferredDoRandom V8_FINAL : public LDeferredCode { public: DeferredDoRandom(LCodeGen* codegen, LRandom* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredRandom(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredRandom(instr_); } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LRandom* instr_; }; @@ -4519,12 +4519,14 @@ void LCodeGen::DoStringAdd(LStringAdd* instr) { void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { - class DeferredStringCharCodeAt: public LDeferredCode { + class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { public: DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStringCharCodeAt(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStringCharCodeAt* instr_; }; @@ -4572,12 +4574,14 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) { void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { - class DeferredStringCharFromCode: public LDeferredCode { + class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { public: DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStringCharFromCode(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStringCharFromCode(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStringCharFromCode* instr_; }; @@ -4660,16 +4664,16 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { void LCodeGen::DoNumberTagI(LNumberTagI* instr) { - class DeferredNumberTagI: public LDeferredCode { + class DeferredNumberTagI V8_FINAL : public LDeferredCode { public: DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredNumberTagI(instr_, instr_->value(), SIGNED_INT32); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagI* instr_; }; @@ -4685,16 +4689,16 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) { void LCodeGen::DoNumberTagU(LNumberTagU* instr) { - class DeferredNumberTagU: public LDeferredCode { + class DeferredNumberTagU V8_FINAL : public LDeferredCode { public: DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredNumberTagI(instr_, instr_->value(), UNSIGNED_INT32); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagU* instr_; }; @@ -4767,12 +4771,14 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr, void LCodeGen::DoNumberTagD(LNumberTagD* instr) { - class DeferredNumberTagD: public LDeferredCode { + class DeferredNumberTagD V8_FINAL : public LDeferredCode { public: DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredNumberTagD(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagD* instr_; }; @@ -4965,12 +4971,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) { void LCodeGen::DoTaggedToI(LTaggedToI* instr) { - class DeferredTaggedToI: public LDeferredCode { + class DeferredTaggedToI V8_FINAL : public LDeferredCode { public: DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredTaggedToI(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredTaggedToI(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LTaggedToI* instr_; }; @@ -5161,17 +5169,17 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { void LCodeGen::DoCheckMaps(LCheckMaps* instr) { - class DeferredCheckMaps: public LDeferredCode { + class DeferredCheckMaps V8_FINAL : public LDeferredCode { public: DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) : LDeferredCode(codegen), instr_(instr), object_(object) { SetExit(check_maps()); } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredInstanceMigration(instr_, object_); } Label* check_maps() { return &check_maps_; } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LCheckMaps* instr_; Label check_maps_; @@ -5264,12 +5272,14 @@ void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) { void LCodeGen::DoAllocate(LAllocate* instr) { - class DeferredAllocate: public LDeferredCode { + class DeferredAllocate V8_FINAL : public LDeferredCode { public: DeferredAllocate(LCodeGen* codegen, LAllocate* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredAllocate(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LAllocate* instr_; }; @@ -5620,12 +5630,14 @@ void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { void LCodeGen::DoStackCheck(LStackCheck* instr) { - class DeferredStackCheck: public LDeferredCode { + class DeferredStackCheck V8_FINAL : public LDeferredCode { public: DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStackCheck(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStackCheck(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStackCheck* instr_; }; diff --git a/src/arm/lithium-codegen-arm.h b/src/arm/lithium-codegen-arm.h index d0bfcbbb94..8a0d3be69b 100644 --- a/src/arm/lithium-codegen-arm.h +++ b/src/arm/lithium-codegen-arm.h @@ -43,7 +43,7 @@ namespace internal { class LDeferredCode; class SafepointGenerator; -class LCodeGen BASE_EMBEDDED { +class LCodeGen V8_FINAL BASE_EMBEDDED { public: LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) : zone_(info->zone()), @@ -420,7 +420,7 @@ class LCodeGen BASE_EMBEDDED { int old_position_; - class PushSafepointRegistersScope BASE_EMBEDDED { + class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { public: PushSafepointRegistersScope(LCodeGen* codegen, Safepoint::Kind kind) @@ -468,7 +468,7 @@ class LCodeGen BASE_EMBEDDED { }; -class LDeferredCode: public ZoneObject { +class LDeferredCode : public ZoneObject { public: explicit LDeferredCode(LCodeGen* codegen) : codegen_(codegen), @@ -477,7 +477,7 @@ class LDeferredCode: public ZoneObject { codegen->AddDeferredCode(this); } - virtual ~LDeferredCode() { } + virtual ~LDeferredCode() {} virtual void Generate() = 0; virtual LInstruction* instr() = 0; diff --git a/src/arm/lithium-gap-resolver-arm.h b/src/arm/lithium-gap-resolver-arm.h index 9dd09c8d03..044c2864a4 100644 --- a/src/arm/lithium-gap-resolver-arm.h +++ b/src/arm/lithium-gap-resolver-arm.h @@ -38,7 +38,7 @@ namespace internal { class LCodeGen; class LGapResolver; -class LGapResolver BASE_EMBEDDED { +class LGapResolver V8_FINAL BASE_EMBEDDED { public: explicit LGapResolver(LCodeGen* owner); diff --git a/src/ast.cc b/src/ast.cc index 23b680d47f..8f69bd7059 100644 --- a/src/ast.cc +++ b/src/ast.cc @@ -858,12 +858,13 @@ 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: public RegExpVisitor { +class RegExpUnparser V8_FINAL : public RegExpVisitor { public: explicit RegExpUnparser(Zone* zone); void VisitCharacterRange(CharacterRange that); SmartArrayPointer ToString() { return stream_.ToCString(); } -#define MAKE_CASE(Name) virtual void* Visit##Name(RegExp##Name*, void* data); +#define MAKE_CASE(Name) virtual void* Visit##Name(RegExp##Name*, \ + void* data) V8_OVERRIDE; FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE) #undef MAKE_CASE private: diff --git a/src/ast.h b/src/ast.h index a8b74213ad..f61f495271 100644 --- a/src/ast.h +++ b/src/ast.h @@ -165,9 +165,11 @@ typedef ZoneList > ZoneStringList; typedef ZoneList > ZoneObjectList; -#define DECLARE_NODE_TYPE(type) \ - virtual void Accept(AstVisitor* v); \ - virtual AstNode::NodeType node_type() const { return AstNode::k##type; } \ +#define DECLARE_NODE_TYPE(type) \ + virtual void Accept(AstVisitor* v) V8_OVERRIDE; \ + virtual AstNode::NodeType node_type() const V8_FINAL V8_OVERRIDE { \ + return AstNode::k##type; \ + } \ template friend class AstNodeFactory; @@ -180,7 +182,7 @@ enum AstPropertiesFlag { }; -class AstProperties BASE_EMBEDDED { +class AstProperties V8_FINAL BASE_EMBEDDED { public: class Flags : public EnumSet {}; @@ -209,9 +211,9 @@ class AstNode: public ZoneObject { return zone->New(static_cast(size)); } - AstNode() { } + AstNode() {} - virtual ~AstNode() { } + virtual ~AstNode() {} virtual void Accept(AstVisitor* v) = 0; virtual NodeType node_type() const = 0; @@ -254,7 +256,7 @@ class AstNode: public ZoneObject { }; -class Statement: public AstNode { +class Statement : public AstNode { public: Statement() : statement_pos_(RelocInfo::kNoPosition) {} @@ -269,7 +271,7 @@ class Statement: public AstNode { }; -class SmallMapList { +class SmallMapList V8_FINAL { public: SmallMapList() {} SmallMapList(int capacity, Zone* zone) : list_(capacity, zone) {} @@ -310,7 +312,7 @@ class SmallMapList { }; -class Expression: public AstNode { +class Expression : public AstNode { public: enum Context { // Not assigned a context yet, or else will not be visited during @@ -403,7 +405,7 @@ class Expression: public AstNode { }; -class BreakableStatement: public Statement { +class BreakableStatement : public Statement { public: enum BreakableType { TARGET_FOR_ANONYMOUS, @@ -415,7 +417,9 @@ class BreakableStatement: public Statement { ZoneStringList* labels() const { return labels_; } // Type testing & conversion. - virtual BreakableStatement* AsBreakableStatement() { return this; } + virtual BreakableStatement* AsBreakableStatement() V8_FINAL V8_OVERRIDE { + return this; + } // Code generation Label* break_target() { return &break_target_; } @@ -448,7 +452,7 @@ class BreakableStatement: public Statement { }; -class Block: public BreakableStatement { +class Block V8_FINAL : public BreakableStatement { public: DECLARE_NODE_TYPE(Block) @@ -459,7 +463,7 @@ class Block: public BreakableStatement { ZoneList* statements() { return &statements_; } bool is_initializer_block() const { return is_initializer_block_; } - virtual bool IsJump() const { + virtual bool IsJump() const V8_OVERRIDE { return !statements_.is_empty() && statements_.last()->IsJump() && labels() == NULL; // Good enough as an approximation... } @@ -486,7 +490,7 @@ class Block: public BreakableStatement { }; -class Declaration: public AstNode { +class Declaration : public AstNode { public: VariableProxy* proxy() const { return proxy_; } VariableMode mode() const { return mode_; } @@ -513,11 +517,11 @@ class Declaration: public AstNode { }; -class VariableDeclaration: public Declaration { +class VariableDeclaration V8_FINAL : public Declaration { public: DECLARE_NODE_TYPE(VariableDeclaration) - virtual InitializationFlag initialization() const { + virtual InitializationFlag initialization() const V8_OVERRIDE { return mode() == VAR ? kCreatedInitialized : kNeedsInitialization; } @@ -530,15 +534,15 @@ class VariableDeclaration: public Declaration { }; -class FunctionDeclaration: public Declaration { +class FunctionDeclaration V8_FINAL : public Declaration { public: DECLARE_NODE_TYPE(FunctionDeclaration) FunctionLiteral* fun() const { return fun_; } - virtual InitializationFlag initialization() const { + virtual InitializationFlag initialization() const V8_OVERRIDE { return kCreatedInitialized; } - virtual bool IsInlineable() const; + virtual bool IsInlineable() const V8_OVERRIDE; protected: FunctionDeclaration(VariableProxy* proxy, @@ -557,12 +561,12 @@ class FunctionDeclaration: public Declaration { }; -class ModuleDeclaration: public Declaration { +class ModuleDeclaration V8_FINAL : public Declaration { public: DECLARE_NODE_TYPE(ModuleDeclaration) Module* module() const { return module_; } - virtual InitializationFlag initialization() const { + virtual InitializationFlag initialization() const V8_OVERRIDE { return kCreatedInitialized; } @@ -579,12 +583,12 @@ class ModuleDeclaration: public Declaration { }; -class ImportDeclaration: public Declaration { +class ImportDeclaration V8_FINAL : public Declaration { public: DECLARE_NODE_TYPE(ImportDeclaration) Module* module() const { return module_; } - virtual InitializationFlag initialization() const { + virtual InitializationFlag initialization() const V8_OVERRIDE { return kCreatedInitialized; } @@ -601,11 +605,11 @@ class ImportDeclaration: public Declaration { }; -class ExportDeclaration: public Declaration { +class ExportDeclaration V8_FINAL : public Declaration { public: DECLARE_NODE_TYPE(ExportDeclaration) - virtual InitializationFlag initialization() const { + virtual InitializationFlag initialization() const V8_OVERRIDE { return kCreatedInitialized; } @@ -615,7 +619,7 @@ class ExportDeclaration: public Declaration { }; -class Module: public AstNode { +class Module : public AstNode { public: Interface* interface() const { return interface_; } Block* body() const { return body_; } @@ -634,7 +638,7 @@ class Module: public AstNode { }; -class ModuleLiteral: public Module { +class ModuleLiteral V8_FINAL : public Module { public: DECLARE_NODE_TYPE(ModuleLiteral) @@ -643,7 +647,7 @@ class ModuleLiteral: public Module { }; -class ModuleVariable: public Module { +class ModuleVariable V8_FINAL : public Module { public: DECLARE_NODE_TYPE(ModuleVariable) @@ -657,7 +661,7 @@ class ModuleVariable: public Module { }; -class ModulePath: public Module { +class ModulePath V8_FINAL : public Module { public: DECLARE_NODE_TYPE(ModulePath) @@ -677,7 +681,7 @@ class ModulePath: public Module { }; -class ModuleUrl: public Module { +class ModuleUrl V8_FINAL : public Module { public: DECLARE_NODE_TYPE(ModuleUrl) @@ -693,7 +697,7 @@ class ModuleUrl: public Module { }; -class ModuleStatement: public Statement { +class ModuleStatement V8_FINAL : public Statement { public: DECLARE_NODE_TYPE(ModuleStatement) @@ -712,10 +716,12 @@ class ModuleStatement: public Statement { }; -class IterationStatement: public BreakableStatement { +class IterationStatement : public BreakableStatement { public: // Type testing & conversion. - virtual IterationStatement* AsIterationStatement() { return this; } + virtual IterationStatement* AsIterationStatement() V8_FINAL V8_OVERRIDE { + return this; + } Statement* body() const { return body_; } @@ -745,7 +751,7 @@ class IterationStatement: public BreakableStatement { }; -class DoWhileStatement: public IterationStatement { +class DoWhileStatement V8_FINAL : public IterationStatement { public: DECLARE_NODE_TYPE(DoWhileStatement) @@ -761,8 +767,8 @@ class DoWhileStatement: public IterationStatement { int condition_position() { return condition_position_; } void set_condition_position(int pos) { condition_position_ = pos; } - virtual BailoutId ContinueId() const { return continue_id_; } - virtual BailoutId StackCheckId() const { return back_edge_id_; } + virtual BailoutId ContinueId() const V8_OVERRIDE { return continue_id_; } + virtual BailoutId StackCheckId() const V8_OVERRIDE { return back_edge_id_; } BailoutId BackEdgeId() const { return back_edge_id_; } protected: @@ -784,7 +790,7 @@ class DoWhileStatement: public IterationStatement { }; -class WhileStatement: public IterationStatement { +class WhileStatement V8_FINAL : public IterationStatement { public: DECLARE_NODE_TYPE(WhileStatement) @@ -801,8 +807,8 @@ class WhileStatement: public IterationStatement { may_have_function_literal_ = value; } - virtual BailoutId ContinueId() const { return EntryId(); } - virtual BailoutId StackCheckId() const { return body_id_; } + virtual BailoutId ContinueId() const V8_OVERRIDE { return EntryId(); } + virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; } BailoutId BodyId() const { return body_id_; } protected: @@ -823,7 +829,7 @@ class WhileStatement: public IterationStatement { }; -class ForStatement: public IterationStatement { +class ForStatement V8_FINAL : public IterationStatement { public: DECLARE_NODE_TYPE(ForStatement) @@ -848,8 +854,8 @@ class ForStatement: public IterationStatement { may_have_function_literal_ = value; } - virtual BailoutId ContinueId() const { return continue_id_; } - virtual BailoutId StackCheckId() const { return body_id_; } + virtual BailoutId ContinueId() const V8_OVERRIDE { return continue_id_; } + virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; } BailoutId BodyId() const { return body_id_; } bool is_fast_smi_loop() { return loop_variable_ != NULL; } @@ -882,7 +888,7 @@ class ForStatement: public IterationStatement { }; -class ForEachStatement: public IterationStatement { +class ForEachStatement : public IterationStatement { public: enum VisitMode { ENUMERATE, // for (each in subject) body; @@ -911,7 +917,7 @@ class ForEachStatement: public IterationStatement { }; -class ForInStatement: public ForEachStatement { +class ForInStatement V8_FINAL : public ForEachStatement { public: DECLARE_NODE_TYPE(ForInStatement) @@ -926,8 +932,8 @@ class ForInStatement: public ForEachStatement { BailoutId BodyId() const { return body_id_; } BailoutId PrepareId() const { return prepare_id_; } - virtual BailoutId ContinueId() const { return EntryId(); } - virtual BailoutId StackCheckId() const { return body_id_; } + virtual BailoutId ContinueId() const V8_OVERRIDE { return EntryId(); } + virtual BailoutId StackCheckId() const V8_OVERRIDE { return body_id_; } protected: ForInStatement(Isolate* isolate, ZoneStringList* labels) @@ -943,7 +949,7 @@ class ForInStatement: public ForEachStatement { }; -class ForOfStatement: public ForEachStatement { +class ForOfStatement V8_FINAL : public ForEachStatement { public: DECLARE_NODE_TYPE(ForOfStatement) @@ -985,8 +991,8 @@ class ForOfStatement: public ForEachStatement { return assign_each_; } - virtual BailoutId ContinueId() const { return EntryId(); } - virtual BailoutId StackCheckId() const { return BackEdgeId(); } + virtual BailoutId ContinueId() const V8_OVERRIDE { return EntryId(); } + virtual BailoutId StackCheckId() const V8_OVERRIDE { return BackEdgeId(); } BailoutId BackEdgeId() const { return back_edge_id_; } @@ -1008,13 +1014,13 @@ class ForOfStatement: public ForEachStatement { }; -class ExpressionStatement: public Statement { +class ExpressionStatement V8_FINAL : public Statement { public: DECLARE_NODE_TYPE(ExpressionStatement) void set_expression(Expression* e) { expression_ = e; } Expression* expression() const { return expression_; } - virtual bool IsJump() const { return expression_->IsThrow(); } + virtual bool IsJump() const V8_OVERRIDE { return expression_->IsThrow(); } protected: explicit ExpressionStatement(Expression* expression) @@ -1025,16 +1031,16 @@ class ExpressionStatement: public Statement { }; -class JumpStatement: public Statement { +class JumpStatement : public Statement { public: - virtual bool IsJump() const { return true; } + virtual bool IsJump() const V8_FINAL V8_OVERRIDE { return true; } protected: JumpStatement() {} }; -class ContinueStatement: public JumpStatement { +class ContinueStatement V8_FINAL : public JumpStatement { public: DECLARE_NODE_TYPE(ContinueStatement) @@ -1049,7 +1055,7 @@ class ContinueStatement: public JumpStatement { }; -class BreakStatement: public JumpStatement { +class BreakStatement V8_FINAL : public JumpStatement { public: DECLARE_NODE_TYPE(BreakStatement) @@ -1064,7 +1070,7 @@ class BreakStatement: public JumpStatement { }; -class ReturnStatement: public JumpStatement { +class ReturnStatement V8_FINAL : public JumpStatement { public: DECLARE_NODE_TYPE(ReturnStatement) @@ -1079,7 +1085,7 @@ class ReturnStatement: public JumpStatement { }; -class WithStatement: public Statement { +class WithStatement V8_FINAL : public Statement { public: DECLARE_NODE_TYPE(WithStatement) @@ -1100,7 +1106,7 @@ class WithStatement: public Statement { }; -class CaseClause: public ZoneObject { +class CaseClause V8_FINAL : public ZoneObject { public: CaseClause(Isolate* isolate, Expression* label, @@ -1137,7 +1143,7 @@ class CaseClause: public ZoneObject { }; -class SwitchStatement: public BreakableStatement { +class SwitchStatement V8_FINAL : public BreakableStatement { public: DECLARE_NODE_TYPE(SwitchStatement) @@ -1172,7 +1178,7 @@ class SwitchStatement: public BreakableStatement { // the parser implicitly creates an empty statement. Use the // HasThenStatement() and HasElseStatement() functions to check if a // given if-statement has a then- or an else-part containing code. -class IfStatement: public Statement { +class IfStatement V8_FINAL : public Statement { public: DECLARE_NODE_TYPE(IfStatement) @@ -1183,7 +1189,7 @@ class IfStatement: public Statement { Statement* then_statement() const { return then_statement_; } Statement* else_statement() const { return else_statement_; } - virtual bool IsJump() const { + virtual bool IsJump() const V8_OVERRIDE { return HasThenStatement() && then_statement()->IsJump() && HasElseStatement() && else_statement()->IsJump(); } @@ -1217,7 +1223,7 @@ class IfStatement: public Statement { // NOTE: TargetCollectors are represented as nodes to fit in the target // stack in the compiler; this should probably be reworked. -class TargetCollector: public AstNode { +class TargetCollector V8_FINAL : public AstNode { public: explicit TargetCollector(Zone* zone) : targets_(0, zone) { } @@ -1227,9 +1233,9 @@ class TargetCollector: public AstNode { void AddTarget(Label* target, Zone* zone); // Virtual behaviour. TargetCollectors are never part of the AST. - virtual void Accept(AstVisitor* v) { UNREACHABLE(); } - virtual NodeType node_type() const { return kInvalid; } - virtual TargetCollector* AsTargetCollector() { return this; } + virtual void Accept(AstVisitor* v) V8_OVERRIDE { UNREACHABLE(); } + virtual NodeType node_type() const V8_OVERRIDE { return kInvalid; } + virtual TargetCollector* AsTargetCollector() V8_OVERRIDE { return this; } ZoneList* targets() { return &targets_; } @@ -1238,7 +1244,7 @@ class TargetCollector: public AstNode { }; -class TryStatement: public Statement { +class TryStatement : public Statement { public: void set_escaping_targets(ZoneList* targets) { escaping_targets_ = targets; @@ -1263,7 +1269,7 @@ class TryStatement: public Statement { }; -class TryCatchStatement: public TryStatement { +class TryCatchStatement V8_FINAL : public TryStatement { public: DECLARE_NODE_TYPE(TryCatchStatement) @@ -1290,7 +1296,7 @@ class TryCatchStatement: public TryStatement { }; -class TryFinallyStatement: public TryStatement { +class TryFinallyStatement V8_FINAL : public TryStatement { public: DECLARE_NODE_TYPE(TryFinallyStatement) @@ -1306,7 +1312,7 @@ class TryFinallyStatement: public TryStatement { }; -class DebuggerStatement: public Statement { +class DebuggerStatement V8_FINAL : public Statement { public: DECLARE_NODE_TYPE(DebuggerStatement) @@ -1315,7 +1321,7 @@ class DebuggerStatement: public Statement { }; -class EmptyStatement: public Statement { +class EmptyStatement V8_FINAL : public Statement { public: DECLARE_NODE_TYPE(EmptyStatement) @@ -1324,11 +1330,11 @@ class EmptyStatement: public Statement { }; -class Literal: public Expression { +class Literal V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(Literal) - virtual bool IsPropertyName() { + virtual bool IsPropertyName() V8_OVERRIDE { if (value_->IsInternalizedString()) { uint32_t ignored; return !String::cast(*value_)->AsArrayIndex(&ignored); @@ -1341,8 +1347,12 @@ class Literal: public Expression { return Handle::cast(value_); } - virtual bool ToBooleanIsTrue() { return value_->BooleanValue(); } - virtual bool ToBooleanIsFalse() { return !value_->BooleanValue(); } + virtual bool ToBooleanIsTrue() V8_OVERRIDE { + return value_->BooleanValue(); + } + virtual bool ToBooleanIsFalse() V8_OVERRIDE { + return !value_->BooleanValue(); + } // Identity testers. bool IsNull() const { @@ -1385,7 +1395,7 @@ class Literal: public Expression { // Base class for literals that needs space in the corresponding JSFunction. -class MaterializedLiteral: public Expression { +class MaterializedLiteral : public Expression { public: virtual MaterializedLiteral* AsMaterializedLiteral() { return this; } @@ -1417,7 +1427,7 @@ class MaterializedLiteral: public Expression { // Property is used for passing information // about an object literal's properties from the parser // to the code generator. -class ObjectLiteralProperty: public ZoneObject { +class ObjectLiteralProperty V8_FINAL : public ZoneObject { public: enum Kind { CONSTANT, // Property with constant value (compile time). @@ -1460,7 +1470,7 @@ class ObjectLiteralProperty: public ZoneObject { // An object literal has a boilerplate object that is used // for minimizing the work when constructing it at runtime. -class ObjectLiteral: public MaterializedLiteral { +class ObjectLiteral V8_FINAL : public MaterializedLiteral { public: typedef ObjectLiteralProperty Property; @@ -1518,7 +1528,7 @@ class ObjectLiteral: public MaterializedLiteral { // Node for capturing a regexp literal. -class RegExpLiteral: public MaterializedLiteral { +class RegExpLiteral V8_FINAL : public MaterializedLiteral { public: DECLARE_NODE_TYPE(RegExpLiteral) @@ -1541,7 +1551,7 @@ class RegExpLiteral: public MaterializedLiteral { // An array literal has a literals object that is used // for minimizing the work when constructing it at runtime. -class ArrayLiteral: public MaterializedLiteral { +class ArrayLiteral V8_FINAL : public MaterializedLiteral { public: DECLARE_NODE_TYPE(ArrayLiteral) @@ -1572,11 +1582,11 @@ class ArrayLiteral: public MaterializedLiteral { }; -class VariableProxy: public Expression { +class VariableProxy V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(VariableProxy) - virtual bool IsValidLeftHandSide() { + virtual bool IsValidLeftHandSide() V8_OVERRIDE { return var_ == NULL ? true : var_->IsValidLeftHandSide(); } @@ -1624,15 +1634,15 @@ class VariableProxy: public Expression { }; -class Property: public Expression { +class Property V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(Property) - virtual bool IsValidLeftHandSide() { return true; } + virtual bool IsValidLeftHandSide() V8_OVERRIDE { return true; } Expression* obj() const { return obj_; } Expression* key() const { return key_; } - virtual int position() const { return pos_; } + virtual int position() const V8_OVERRIDE { return pos_; } BailoutId LoadId() const { return load_id_; } @@ -1642,9 +1652,11 @@ class Property: public Expression { // Type feedback information. void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); - virtual bool IsMonomorphic() { return is_monomorphic_; } - virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } - virtual KeyedAccessStoreMode GetStoreMode() { + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } + virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { + return &receiver_types_; + } + virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { return STANDARD_STORE; } bool IsUninitialized() { return is_uninitialized_; } @@ -1681,19 +1693,21 @@ class Property: public Expression { }; -class Call: public Expression { +class Call V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(Call) Expression* expression() const { return expression_; } ZoneList* arguments() const { return arguments_; } - virtual int position() const { return pos_; } + virtual int position() const V8_FINAL { return pos_; } // Type feedback information. TypeFeedbackId CallFeedbackId() const { return reuse(id()); } void RecordTypeFeedback(TypeFeedbackOracle* oracle, CallKind call_kind); - virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } - virtual bool IsMonomorphic() { return is_monomorphic_; } + virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { + return &receiver_types_; + } + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } CheckType check_type() const { return check_type_; } void set_string_check(Handle holder) { @@ -1764,18 +1778,18 @@ class Call: public Expression { }; -class CallNew: public Expression { +class CallNew V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(CallNew) Expression* expression() const { return expression_; } ZoneList* arguments() const { return arguments_; } - virtual int position() const { return pos_; } + virtual int position() const V8_OVERRIDE { return pos_; } // Type feedback information. TypeFeedbackId CallNewFeedbackId() const { return reuse(id()); } void RecordTypeFeedback(TypeFeedbackOracle* oracle); - virtual bool IsMonomorphic() { return is_monomorphic_; } + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } Handle target() const { return target_; } ElementsKind elements_kind() const { return elements_kind_; } Handle allocation_info_cell() const { @@ -1815,7 +1829,7 @@ class CallNew: public Expression { // language construct. Instead it is used to call a C or JS function // with a set of arguments. This is used from the builtins that are // implemented in JavaScript (see "v8natives.js"). -class CallRuntime: public Expression { +class CallRuntime V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(CallRuntime) @@ -1843,18 +1857,19 @@ class CallRuntime: public Expression { }; -class UnaryOperation: public Expression { +class UnaryOperation V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(UnaryOperation) Token::Value op() const { return op_; } Expression* expression() const { return expression_; } - virtual int position() const { return pos_; } + virtual int position() const V8_OVERRIDE { return pos_; } BailoutId MaterializeTrueId() { return materialize_true_id_; } BailoutId MaterializeFalseId() { return materialize_false_id_; } - virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); + virtual void RecordToBooleanTypeFeedback( + TypeFeedbackOracle* oracle) V8_OVERRIDE; protected: UnaryOperation(Isolate* isolate, @@ -1882,7 +1897,7 @@ class UnaryOperation: public Expression { }; -class BinaryOperation: public Expression { +class BinaryOperation V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(BinaryOperation) @@ -1891,7 +1906,7 @@ class BinaryOperation: public Expression { Token::Value op() const { return op_; } Expression* left() const { return left_; } Expression* right() const { return right_; } - virtual int position() const { return pos_; } + virtual int position() const V8_OVERRIDE { return pos_; } BailoutId RightId() const { return right_id_; } @@ -1899,7 +1914,8 @@ class BinaryOperation: public Expression { Maybe fixed_right_arg() const { return fixed_right_arg_; } void set_fixed_right_arg(Maybe arg) { fixed_right_arg_ = arg; } - virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle); + virtual void RecordToBooleanTypeFeedback( + TypeFeedbackOracle* oracle) V8_OVERRIDE; protected: BinaryOperation(Isolate* isolate, @@ -1932,7 +1948,7 @@ class BinaryOperation: public Expression { }; -class CountOperation: public Expression { +class CountOperation V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(CountOperation) @@ -1945,14 +1961,14 @@ class CountOperation: public Expression { } Expression* expression() const { return expression_; } - virtual int position() const { return pos_; } - - virtual void MarkAsStatement() { is_prefix_ = true; } + virtual int position() const V8_OVERRIDE { return pos_; } void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* znoe); - virtual bool IsMonomorphic() { return is_monomorphic_; } - virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } - virtual KeyedAccessStoreMode GetStoreMode() { + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } + virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { + return &receiver_types_; + } + virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { return store_mode_; } TypeInfo type() const { return type_; } @@ -1994,14 +2010,14 @@ class CountOperation: public Expression { }; -class CompareOperation: public Expression { +class CompareOperation V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(CompareOperation) Token::Value op() const { return op_; } Expression* left() const { return left_; } Expression* right() const { return right_; } - virtual int position() const { return pos_; } + virtual int position() const V8_OVERRIDE { return pos_; } // Type feedback information. TypeFeedbackId CompareOperationFeedbackId() const { return reuse(id()); } @@ -2037,7 +2053,7 @@ class CompareOperation: public Expression { }; -class Conditional: public Expression { +class Conditional V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(Conditional) @@ -2078,7 +2094,7 @@ class Conditional: public Expression { }; -class Assignment: public Expression { +class Assignment V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(Assignment) @@ -2089,7 +2105,7 @@ class Assignment: public Expression { Token::Value op() const { return op_; } Expression* target() const { return target_; } Expression* value() const { return value_; } - virtual int position() const { return pos_; } + virtual int position() const V8_OVERRIDE { return pos_; } BinaryOperation* binary_operation() const { return binary_operation_; } // This check relies on the definition order of token in token.h. @@ -2100,10 +2116,12 @@ class Assignment: public Expression { // Type feedback information. TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); } void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); - virtual bool IsMonomorphic() { return is_monomorphic_; } + virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; } bool IsUninitialized() { return is_uninitialized_; } - virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } - virtual KeyedAccessStoreMode GetStoreMode() { + virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE { + return &receiver_types_; + } + virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE { return store_mode_; } @@ -2139,7 +2157,7 @@ class Assignment: public Expression { }; -class Yield: public Expression { +class Yield V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(Yield) @@ -2153,7 +2171,7 @@ class Yield: public Expression { Expression* generator_object() const { return generator_object_; } Expression* expression() const { return expression_; } Kind yield_kind() const { return yield_kind_; } - virtual int position() const { return pos_; } + virtual int position() const V8_OVERRIDE { return pos_; } // Delegating yield surrounds the "yield" in a "try/catch". This index // locates the catch handler in the handler table, and is equivalent to @@ -2189,12 +2207,12 @@ class Yield: public Expression { }; -class Throw: public Expression { +class Throw V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(Throw) Expression* exception() const { return exception_; } - virtual int position() const { return pos_; } + virtual int position() const V8_OVERRIDE { return pos_; } protected: Throw(Isolate* isolate, Expression* exception, int pos) @@ -2206,7 +2224,7 @@ class Throw: public Expression { }; -class FunctionLiteral: public Expression { +class FunctionLiteral V8_FINAL : public Expression { public: enum FunctionType { ANONYMOUS_EXPRESSION, @@ -2356,7 +2374,7 @@ class FunctionLiteral: public Expression { }; -class SharedFunctionInfoLiteral: public Expression { +class SharedFunctionInfoLiteral V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(SharedFunctionInfoLiteral) @@ -2376,7 +2394,7 @@ class SharedFunctionInfoLiteral: public Expression { }; -class ThisFunction: public Expression { +class ThisFunction V8_FINAL : public Expression { public: DECLARE_NODE_TYPE(ThisFunction) @@ -2401,10 +2419,10 @@ class RegExpVisitor BASE_EMBEDDED { }; -class RegExpTree: public ZoneObject { +class RegExpTree : public ZoneObject { public: static const int kInfinity = kMaxInt; - virtual ~RegExpTree() { } + virtual ~RegExpTree() {} virtual void* Accept(RegExpVisitor* visitor, void* data) = 0; virtual RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) = 0; @@ -2426,19 +2444,19 @@ class RegExpTree: public ZoneObject { }; -class RegExpDisjunction: public RegExpTree { +class RegExpDisjunction V8_FINAL : public RegExpTree { public: explicit RegExpDisjunction(ZoneList* alternatives); - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); - virtual RegExpDisjunction* AsDisjunction(); - virtual Interval CaptureRegisters(); - virtual bool IsDisjunction(); - virtual bool IsAnchoredAtStart(); - virtual bool IsAnchoredAtEnd(); - virtual int min_match() { return min_match_; } - virtual int max_match() { return max_match_; } + RegExpNode* on_success) V8_OVERRIDE; + virtual RegExpDisjunction* AsDisjunction() V8_OVERRIDE; + virtual Interval CaptureRegisters() V8_OVERRIDE; + virtual bool IsDisjunction() V8_OVERRIDE; + virtual bool IsAnchoredAtStart() V8_OVERRIDE; + virtual bool IsAnchoredAtEnd() V8_OVERRIDE; + virtual int min_match() V8_OVERRIDE { return min_match_; } + virtual int max_match() V8_OVERRIDE { return max_match_; } ZoneList* alternatives() { return alternatives_; } private: ZoneList* alternatives_; @@ -2447,19 +2465,19 @@ class RegExpDisjunction: public RegExpTree { }; -class RegExpAlternative: public RegExpTree { +class RegExpAlternative V8_FINAL : public RegExpTree { public: explicit RegExpAlternative(ZoneList* nodes); - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); - virtual RegExpAlternative* AsAlternative(); - virtual Interval CaptureRegisters(); - virtual bool IsAlternative(); - virtual bool IsAnchoredAtStart(); - virtual bool IsAnchoredAtEnd(); - virtual int min_match() { return min_match_; } - virtual int max_match() { return max_match_; } + RegExpNode* on_success) V8_OVERRIDE; + virtual RegExpAlternative* AsAlternative() V8_OVERRIDE; + virtual Interval CaptureRegisters() V8_OVERRIDE; + virtual bool IsAlternative() V8_OVERRIDE; + virtual bool IsAnchoredAtStart() V8_OVERRIDE; + virtual bool IsAnchoredAtEnd() V8_OVERRIDE; + virtual int min_match() V8_OVERRIDE { return min_match_; } + virtual int max_match() V8_OVERRIDE { return max_match_; } ZoneList* nodes() { return nodes_; } private: ZoneList* nodes_; @@ -2468,7 +2486,7 @@ class RegExpAlternative: public RegExpTree { }; -class RegExpAssertion: public RegExpTree { +class RegExpAssertion V8_FINAL : public RegExpTree { public: enum AssertionType { START_OF_LINE, @@ -2479,22 +2497,22 @@ class RegExpAssertion: public RegExpTree { NON_BOUNDARY }; explicit RegExpAssertion(AssertionType type) : assertion_type_(type) { } - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); - virtual RegExpAssertion* AsAssertion(); - virtual bool IsAssertion(); - virtual bool IsAnchoredAtStart(); - virtual bool IsAnchoredAtEnd(); - virtual int min_match() { return 0; } - virtual int max_match() { return 0; } + RegExpNode* on_success) V8_OVERRIDE; + virtual RegExpAssertion* AsAssertion() V8_OVERRIDE; + virtual bool IsAssertion() V8_OVERRIDE; + virtual bool IsAnchoredAtStart() V8_OVERRIDE; + virtual bool IsAnchoredAtEnd() V8_OVERRIDE; + virtual int min_match() V8_OVERRIDE { return 0; } + virtual int max_match() V8_OVERRIDE { return 0; } AssertionType assertion_type() { return assertion_type_; } private: AssertionType assertion_type_; }; -class CharacterSet BASE_EMBEDDED { +class CharacterSet V8_FINAL BASE_EMBEDDED { public: explicit CharacterSet(uc16 standard_set_type) : ranges_(NULL), @@ -2517,7 +2535,7 @@ class CharacterSet BASE_EMBEDDED { }; -class RegExpCharacterClass: public RegExpTree { +class RegExpCharacterClass V8_FINAL : public RegExpTree { public: RegExpCharacterClass(ZoneList* ranges, bool is_negated) : set_(ranges), @@ -2525,15 +2543,15 @@ class RegExpCharacterClass: public RegExpTree { explicit RegExpCharacterClass(uc16 type) : set_(type), is_negated_(false) { } - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); - virtual RegExpCharacterClass* AsCharacterClass(); - virtual bool IsCharacterClass(); - virtual bool IsTextElement() { return true; } - virtual int min_match() { return 1; } - virtual int max_match() { return 1; } - virtual void AppendToText(RegExpText* text, Zone* zone); + RegExpNode* on_success) V8_OVERRIDE; + virtual RegExpCharacterClass* AsCharacterClass() V8_OVERRIDE; + virtual bool IsCharacterClass() V8_OVERRIDE; + virtual bool IsTextElement() V8_OVERRIDE { return true; } + virtual int min_match() V8_OVERRIDE { return 1; } + virtual int max_match() V8_OVERRIDE { return 1; } + virtual void AppendToText(RegExpText* text, Zone* zone) V8_OVERRIDE; CharacterSet character_set() { return set_; } // TODO(lrn): Remove need for complex version if is_standard that // recognizes a mangled standard set and just do { return set_.is_special(); } @@ -2559,18 +2577,18 @@ class RegExpCharacterClass: public RegExpTree { }; -class RegExpAtom: public RegExpTree { +class RegExpAtom V8_FINAL : public RegExpTree { public: explicit RegExpAtom(Vector data) : data_(data) { } - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); - virtual RegExpAtom* AsAtom(); - virtual bool IsAtom(); - virtual bool IsTextElement() { return true; } - virtual int min_match() { return data_.length(); } - virtual int max_match() { return data_.length(); } - virtual void AppendToText(RegExpText* text, Zone* zone); + RegExpNode* on_success) V8_OVERRIDE; + virtual RegExpAtom* AsAtom() V8_OVERRIDE; + virtual bool IsAtom() V8_OVERRIDE; + virtual bool IsTextElement() V8_OVERRIDE { return true; } + virtual int min_match() V8_OVERRIDE { return data_.length(); } + virtual int max_match() V8_OVERRIDE { return data_.length(); } + virtual void AppendToText(RegExpText* text, Zone* zone) V8_OVERRIDE; Vector data() { return data_; } int length() { return data_.length(); } private: @@ -2578,18 +2596,18 @@ class RegExpAtom: public RegExpTree { }; -class RegExpText: public RegExpTree { +class RegExpText V8_FINAL : public RegExpTree { public: explicit RegExpText(Zone* zone) : elements_(2, zone), length_(0) {} - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); - virtual RegExpText* AsText(); - virtual bool IsText(); - virtual bool IsTextElement() { return true; } - virtual int min_match() { return length_; } - virtual int max_match() { return length_; } - virtual void AppendToText(RegExpText* text, Zone* zone); + RegExpNode* on_success) V8_OVERRIDE; + virtual RegExpText* AsText() V8_OVERRIDE; + virtual bool IsText() V8_OVERRIDE; + virtual bool IsTextElement() V8_OVERRIDE { return true; } + virtual int min_match() V8_OVERRIDE { return length_; } + virtual int max_match() V8_OVERRIDE { return length_; } + virtual void AppendToText(RegExpText* text, Zone* zone) V8_OVERRIDE; void AddElement(TextElement elm, Zone* zone) { elements_.Add(elm, zone); length_ += elm.length(); @@ -2601,7 +2619,7 @@ class RegExpText: public RegExpTree { }; -class RegExpQuantifier: public RegExpTree { +class RegExpQuantifier V8_FINAL : public RegExpTree { public: enum QuantifierType { GREEDY, NON_GREEDY, POSSESSIVE }; RegExpQuantifier(int min, int max, QuantifierType type, RegExpTree* body) @@ -2616,9 +2634,9 @@ class RegExpQuantifier: public RegExpTree { max_match_ = max * body->max_match(); } } - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); + RegExpNode* on_success) V8_OVERRIDE; static RegExpNode* ToNode(int min, int max, bool is_greedy, @@ -2626,11 +2644,11 @@ class RegExpQuantifier: public RegExpTree { RegExpCompiler* compiler, RegExpNode* on_success, bool not_at_start = false); - virtual RegExpQuantifier* AsQuantifier(); - virtual Interval CaptureRegisters(); - virtual bool IsQuantifier(); - virtual int min_match() { return min_match_; } - virtual int max_match() { return max_match_; } + virtual RegExpQuantifier* AsQuantifier() V8_OVERRIDE; + virtual Interval CaptureRegisters() V8_OVERRIDE; + virtual bool IsQuantifier() V8_OVERRIDE; + virtual int min_match() V8_OVERRIDE { return min_match_; } + virtual int max_match() V8_OVERRIDE { return max_match_; } int min() { return min_; } int max() { return max_; } bool is_possessive() { return quantifier_type_ == POSSESSIVE; } @@ -2648,24 +2666,24 @@ class RegExpQuantifier: public RegExpTree { }; -class RegExpCapture: public RegExpTree { +class RegExpCapture V8_FINAL : public RegExpTree { public: explicit RegExpCapture(RegExpTree* body, int index) : body_(body), index_(index) { } - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); + RegExpNode* on_success) V8_OVERRIDE; static RegExpNode* ToNode(RegExpTree* body, int index, RegExpCompiler* compiler, RegExpNode* on_success); - virtual RegExpCapture* AsCapture(); - virtual bool IsAnchoredAtStart(); - virtual bool IsAnchoredAtEnd(); - virtual Interval CaptureRegisters(); - virtual bool IsCapture(); - virtual int min_match() { return body_->min_match(); } - virtual int max_match() { return body_->max_match(); } + virtual RegExpCapture* AsCapture() V8_OVERRIDE; + virtual bool IsAnchoredAtStart() V8_OVERRIDE; + virtual bool IsAnchoredAtEnd() V8_OVERRIDE; + virtual Interval CaptureRegisters() V8_OVERRIDE; + virtual bool IsCapture() V8_OVERRIDE; + virtual int min_match() V8_OVERRIDE { return body_->min_match(); } + virtual int max_match() V8_OVERRIDE { return body_->max_match(); } RegExpTree* body() { return body_; } int index() { return index_; } static int StartRegister(int index) { return index * 2; } @@ -2677,7 +2695,7 @@ class RegExpCapture: public RegExpTree { }; -class RegExpLookahead: public RegExpTree { +class RegExpLookahead V8_FINAL : public RegExpTree { public: RegExpLookahead(RegExpTree* body, bool is_positive, @@ -2688,15 +2706,15 @@ class RegExpLookahead: public RegExpTree { capture_count_(capture_count), capture_from_(capture_from) { } - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); - virtual RegExpLookahead* AsLookahead(); - virtual Interval CaptureRegisters(); - virtual bool IsLookahead(); - virtual bool IsAnchoredAtStart(); - virtual int min_match() { return 0; } - virtual int max_match() { return 0; } + RegExpNode* on_success) V8_OVERRIDE; + virtual RegExpLookahead* AsLookahead() V8_OVERRIDE; + virtual Interval CaptureRegisters() V8_OVERRIDE; + virtual bool IsLookahead() V8_OVERRIDE; + virtual bool IsAnchoredAtStart() V8_OVERRIDE; + virtual int min_match() V8_OVERRIDE { return 0; } + virtual int max_match() V8_OVERRIDE { return 0; } RegExpTree* body() { return body_; } bool is_positive() { return is_positive_; } int capture_count() { return capture_count_; } @@ -2710,17 +2728,17 @@ class RegExpLookahead: public RegExpTree { }; -class RegExpBackReference: public RegExpTree { +class RegExpBackReference V8_FINAL : public RegExpTree { public: explicit RegExpBackReference(RegExpCapture* capture) : capture_(capture) { } - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); - virtual RegExpBackReference* AsBackReference(); - virtual bool IsBackReference(); - virtual int min_match() { return 0; } - virtual int max_match() { return capture_->max_match(); } + RegExpNode* on_success) V8_OVERRIDE; + virtual RegExpBackReference* AsBackReference() V8_OVERRIDE; + virtual bool IsBackReference() V8_OVERRIDE; + virtual int min_match() V8_OVERRIDE { return 0; } + virtual int max_match() V8_OVERRIDE { return capture_->max_match(); } int index() { return capture_->index(); } RegExpCapture* capture() { return capture_; } private: @@ -2728,16 +2746,16 @@ class RegExpBackReference: public RegExpTree { }; -class RegExpEmpty: public RegExpTree { +class RegExpEmpty V8_FINAL : public RegExpTree { public: RegExpEmpty() { } - virtual void* Accept(RegExpVisitor* visitor, void* data); + virtual void* Accept(RegExpVisitor* visitor, void* data) V8_OVERRIDE; virtual RegExpNode* ToNode(RegExpCompiler* compiler, - RegExpNode* on_success); - virtual RegExpEmpty* AsEmpty(); - virtual bool IsEmpty(); - virtual int min_match() { return 0; } - virtual int max_match() { return 0; } + RegExpNode* on_success) V8_OVERRIDE; + virtual RegExpEmpty* AsEmpty() V8_OVERRIDE; + virtual bool IsEmpty() V8_OVERRIDE; + virtual int min_match() V8_OVERRIDE { return 0; } + virtual int max_match() V8_OVERRIDE { return 0; } static RegExpEmpty* GetInstance() { static RegExpEmpty* instance = ::new RegExpEmpty(); return instance; @@ -2761,7 +2779,7 @@ inline ModuleVariable::ModuleVariable(VariableProxy* proxy) class AstVisitor BASE_EMBEDDED { public: AstVisitor() {} - virtual ~AstVisitor() { } + virtual ~AstVisitor() {} // Stack overflow check and dynamic dispatch. virtual void Visit(AstNode* node) = 0; @@ -2781,7 +2799,7 @@ class AstVisitor BASE_EMBEDDED { #define DEFINE_AST_VISITOR_SUBCLASS_MEMBERS() \ public: \ - virtual void Visit(AstNode* node) { \ + virtual void Visit(AstNode* node) V8_FINAL V8_OVERRIDE { \ if (!CheckStackOverflow()) node->Accept(this); \ } \ \ @@ -2847,7 +2865,7 @@ class AstNullVisitor BASE_EMBEDDED { // AstNode factory template -class AstNodeFactory BASE_EMBEDDED { +class AstNodeFactory V8_FINAL BASE_EMBEDDED { public: AstNodeFactory(Isolate* isolate, Zone* zone) : isolate_(isolate), diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index 887168cc75..bef46df4ec 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -210,24 +210,27 @@ class LChunkBuilder; V(ExternalMemory) -#define DECLARE_ABSTRACT_INSTRUCTION(type) \ - virtual bool Is##type() const { return true; } \ - static H##type* cast(HValue* value) { \ - ASSERT(value->Is##type()); \ - return reinterpret_cast(value); \ +#define DECLARE_ABSTRACT_INSTRUCTION(type) \ + virtual bool Is##type() const V8_FINAL V8_OVERRIDE { return true; } \ + static H##type* cast(HValue* value) { \ + ASSERT(value->Is##type()); \ + return reinterpret_cast(value); \ } -#define DECLARE_CONCRETE_INSTRUCTION(type) \ - virtual LInstruction* CompileToLithium(LChunkBuilder* builder); \ - static H##type* cast(HValue* value) { \ - ASSERT(value->Is##type()); \ - return reinterpret_cast(value); \ - } \ - virtual Opcode opcode() const { return HValue::k##type; } +#define DECLARE_CONCRETE_INSTRUCTION(type) \ + virtual LInstruction* CompileToLithium( \ + LChunkBuilder* builder) V8_FINAL V8_OVERRIDE; \ + static H##type* cast(HValue* value) { \ + ASSERT(value->Is##type()); \ + return reinterpret_cast(value); \ + } \ + virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ + return HValue::k##type; \ + } -class Range: public ZoneObject { +class Range V8_FINAL : public ZoneObject { public: Range() : lower_(kMinInt), @@ -302,7 +305,7 @@ class Range: public ZoneObject { }; -class UniqueValueId { +class UniqueValueId V8_FINAL { public: UniqueValueId() : raw_address_(NULL) { } @@ -344,7 +347,7 @@ class UniqueValueId { }; -class HType { +class HType V8_FINAL { public: static HType None() { return HType(kNone); } static HType Tagged() { return HType(kTagged); } @@ -495,7 +498,7 @@ class HUseListNode: public ZoneObject { // We reuse use list nodes behind the scenes as uses are added and deleted. // This class is the safe way to iterate uses while deleting them. -class HUseIterator BASE_EMBEDDED { +class HUseIterator V8_FINAL BASE_EMBEDDED { public: bool Done() { return current_ == NULL; } void Advance(); @@ -539,7 +542,7 @@ enum GVNFlag { }; -class DecompositionResult BASE_EMBEDDED { +class DecompositionResult V8_FINAL BASE_EMBEDDED { public: DecompositionResult() : base_(NULL), offset_(0), scale_(0) {} @@ -587,7 +590,7 @@ class DecompositionResult BASE_EMBEDDED { typedef EnumSet GVNFlagSet; -class HValue: public ZoneObject { +class HValue : public ZoneObject { public: static const int kNoNumber = -1; @@ -1082,12 +1085,12 @@ class HValue: public ZoneObject { } -class HInstruction: public HValue { +class HInstruction : public HValue { public: HInstruction* next() const { return next_; } HInstruction* previous() const { return previous_; } - virtual void PrintTo(StringStream* stream); + virtual void PrintTo(StringStream* stream) V8_OVERRIDE; virtual void PrintDataTo(StringStream* stream); bool IsLinked() const { return block() != NULL; } @@ -1109,7 +1112,7 @@ class HInstruction: public HValue { virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0; #ifdef DEBUG - virtual void Verify(); + virtual void Verify() V8_OVERRIDE; #endif virtual bool IsCall() { return false; } @@ -1125,7 +1128,7 @@ class HInstruction: public HValue { SetGVNFlag(kDependsOnOsrEntries); } - virtual void DeleteFromGraph() { Unlink(); } + virtual void DeleteFromGraph() V8_OVERRIDE { Unlink(); } private: void InitializeAsFirst(HBasicBlock* block) { @@ -1146,26 +1149,30 @@ class HInstruction: public HValue { template class HTemplateInstruction : public HInstruction { public: - int OperandCount() { return V; } - HValue* OperandAt(int i) const { return inputs_[i]; } + virtual int OperandCount() V8_FINAL V8_OVERRIDE { return V; } + virtual HValue* OperandAt(int i) const V8_FINAL V8_OVERRIDE { + return inputs_[i]; + } protected: HTemplateInstruction(HType type = HType::Tagged()) : HInstruction(type) {} - void InternalSetOperandAt(int i, HValue* value) { inputs_[i] = value; } + virtual void InternalSetOperandAt(int i, HValue* value) V8_FINAL V8_OVERRIDE { + inputs_[i] = value; + } private: EmbeddedContainer inputs_; }; -class HControlInstruction: public HInstruction { +class HControlInstruction : public HInstruction { public: virtual HBasicBlock* SuccessorAt(int i) = 0; virtual int SuccessorCount() = 0; virtual void SetSuccessorAt(int i, HBasicBlock* block) = 0; - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; HBasicBlock* FirstSuccessor() { return SuccessorCount() > 0 ? SuccessorAt(0) : NULL; @@ -1178,7 +1185,7 @@ class HControlInstruction: public HInstruction { }; -class HSuccessorIterator BASE_EMBEDDED { +class HSuccessorIterator V8_FINAL BASE_EMBEDDED { public: explicit HSuccessorIterator(HControlInstruction* instr) : instr_(instr), current_(0) { } @@ -1194,18 +1201,22 @@ class HSuccessorIterator BASE_EMBEDDED { template -class HTemplateControlInstruction: public HControlInstruction { +class HTemplateControlInstruction : public HControlInstruction { public: - int SuccessorCount() { return S; } - HBasicBlock* SuccessorAt(int i) { return successors_[i]; } - void SetSuccessorAt(int i, HBasicBlock* block) { successors_[i] = block; } + int SuccessorCount() V8_OVERRIDE { return S; } + HBasicBlock* SuccessorAt(int i) V8_OVERRIDE { return successors_[i]; } + void SetSuccessorAt(int i, HBasicBlock* block) V8_OVERRIDE { + successors_[i] = block; + } - int OperandCount() { return V; } - HValue* OperandAt(int i) const { return inputs_[i]; } + int OperandCount() V8_OVERRIDE { return V; } + HValue* OperandAt(int i) const V8_OVERRIDE { return inputs_[i]; } protected: - void InternalSetOperandAt(int i, HValue* value) { inputs_[i] = value; } + void InternalSetOperandAt(int i, HValue* value) V8_OVERRIDE { + inputs_[i] = value; + } private: EmbeddedContainer successors_; @@ -1213,9 +1224,9 @@ class HTemplateControlInstruction: public HControlInstruction { }; -class HBlockEntry: public HTemplateInstruction<0> { +class HBlockEntry V8_FINAL : public HTemplateInstruction<0> { public: - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -1223,7 +1234,7 @@ class HBlockEntry: public HTemplateInstruction<0> { }; -class HDummyUse: public HTemplateInstruction<1> { +class HDummyUse V8_FINAL : public HTemplateInstruction<1> { public: explicit HDummyUse(HValue* value) : HTemplateInstruction<1>(HType::Smi()) { @@ -1235,23 +1246,23 @@ class HDummyUse: public HTemplateInstruction<1> { HValue* value() { return OperandAt(0); } - virtual bool HasEscapingOperandAt(int index) { return false; } - virtual Representation RequiredInputRepresentation(int index) { + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(DummyUse); }; -class HDeoptimize: public HTemplateInstruction<0> { +class HDeoptimize V8_FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P2(HDeoptimize, const char*, Deoptimizer::BailoutType); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -1270,9 +1281,9 @@ class HDeoptimize: public HTemplateInstruction<0> { // Inserts an int3/stop break instruction for debugging purposes. -class HDebugBreak: public HTemplateInstruction<0> { +class HDebugBreak V8_FINAL : public HTemplateInstruction<0> { public: - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -1280,23 +1291,23 @@ class HDebugBreak: public HTemplateInstruction<0> { }; -class HGoto: public HTemplateControlInstruction<1, 0> { +class HGoto V8_FINAL : public HTemplateControlInstruction<1, 0> { public: explicit HGoto(HBasicBlock* target) { SetSuccessorAt(0, target); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(Goto) }; -class HUnaryControlInstruction: public HTemplateControlInstruction<2, 1> { +class HUnaryControlInstruction : public HTemplateControlInstruction<2, 1> { public: HUnaryControlInstruction(HValue* value, HBasicBlock* true_target, @@ -1306,13 +1317,13 @@ class HUnaryControlInstruction: public HTemplateControlInstruction<2, 1> { SetSuccessorAt(1, false_target); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; HValue* value() { return OperandAt(0); } }; -class HBranch: public HUnaryControlInstruction { +class HBranch V8_FINAL : public HUnaryControlInstruction { public: HBranch(HValue* value, ToBooleanStub::Types expected_input_types = ToBooleanStub::Types(), @@ -1323,10 +1334,10 @@ class HBranch: public HUnaryControlInstruction { SetFlag(kAllowUndefinedAsNaN); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } - virtual Representation observed_input_representation(int index); + virtual Representation observed_input_representation(int index) V8_OVERRIDE; ToBooleanStub::Types expected_input_types() const { return expected_input_types_; @@ -1339,7 +1350,7 @@ class HBranch: public HUnaryControlInstruction { }; -class HCompareMap: public HUnaryControlInstruction { +class HCompareMap V8_FINAL : public HUnaryControlInstruction { public: HCompareMap(HValue* value, Handle map, @@ -1350,11 +1361,11 @@ class HCompareMap: public HUnaryControlInstruction { ASSERT(!map.is_null()); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle map() const { return map_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -1365,20 +1376,20 @@ class HCompareMap: public HUnaryControlInstruction { }; -class HContext: public HTemplateInstruction<0> { +class HContext V8_FINAL : public HTemplateInstruction<0> { public: static HContext* New(Zone* zone) { return new(zone) HContext(); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } DECLARE_CONCRETE_INSTRUCTION(Context) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: HContext() { @@ -1386,11 +1397,11 @@ class HContext: public HTemplateInstruction<0> { SetFlag(kUseGVN); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HReturn: public HTemplateControlInstruction<0, 3> { +class HReturn V8_FINAL : public HTemplateControlInstruction<0, 3> { public: static HInstruction* New(Zone* zone, HValue* context, @@ -1405,11 +1416,11 @@ class HReturn: public HTemplateControlInstruction<0, 3> { return new(zone) HReturn(value, context, 0); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; HValue* value() { return OperandAt(0); } HValue* context() { return OperandAt(1); } @@ -1426,9 +1437,9 @@ class HReturn: public HTemplateControlInstruction<0, 3> { }; -class HAbnormalExit: public HTemplateControlInstruction<0, 0> { +class HAbnormalExit V8_FINAL : public HTemplateControlInstruction<0, 0> { public: - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -1436,7 +1447,7 @@ class HAbnormalExit: public HTemplateControlInstruction<0, 0> { }; -class HUnaryOperation: public HTemplateInstruction<1> { +class HUnaryOperation : public HTemplateInstruction<1> { public: HUnaryOperation(HValue* value, HType type = HType::Tagged()) : HTemplateInstruction<1>(type) { @@ -1448,11 +1459,11 @@ class HUnaryOperation: public HTemplateInstruction<1> { } HValue* value() const { return OperandAt(0); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class HThrow: public HTemplateInstruction<2> { +class HThrow V8_FINAL : public HTemplateInstruction<2> { public: static HThrow* New(Zone* zone, HValue* context, @@ -1460,7 +1471,7 @@ class HThrow: public HTemplateInstruction<2> { return new(zone) HThrow(context, value); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -1478,11 +1489,11 @@ class HThrow: public HTemplateInstruction<2> { }; -class HUseConst: public HUnaryOperation { +class HUseConst V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HUseConst, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -1493,19 +1504,20 @@ class HUseConst: public HUnaryOperation { }; -class HForceRepresentation: public HTemplateInstruction<1> { +class HForceRepresentation V8_FINAL : public HTemplateInstruction<1> { public: DECLARE_INSTRUCTION_FACTORY_P2(HForceRepresentation, HValue*, Representation); HValue* value() { return OperandAt(0); } - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); + virtual HValue* EnsureAndPropagateNotMinusZero( + BitVector* visited) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return representation(); // Same as the output representation. } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(ForceRepresentation) @@ -1517,7 +1529,7 @@ class HForceRepresentation: public HTemplateInstruction<1> { }; -class HChange: public HUnaryOperation { +class HChange V8_FINAL : public HUnaryOperation { public: HChange(HValue* value, Representation to, @@ -1543,47 +1555,48 @@ class HChange: public HUnaryOperation { return CheckUsesForFlag(kAllowUndefinedAsNaN); } - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); - virtual HType CalculateInferredType(); - virtual HValue* Canonicalize(); + virtual HValue* EnsureAndPropagateNotMinusZero( + BitVector* visited) V8_OVERRIDE; + virtual HType CalculateInferredType() V8_OVERRIDE; + virtual HValue* Canonicalize() V8_OVERRIDE; Representation from() const { return value()->representation(); } Representation to() const { return representation(); } bool deoptimize_on_minus_zero() const { return CheckFlag(kBailoutOnMinusZero); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return from(); } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(Change) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: - virtual bool IsDeletable() const { + virtual bool IsDeletable() const V8_OVERRIDE { return !from().IsTagged() || value()->type().IsSmi(); } }; -class HClampToUint8: public HUnaryOperation { +class HClampToUint8 V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HClampToUint8, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } DECLARE_CONCRETE_INSTRUCTION(ClampToUint8) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: explicit HClampToUint8(HValue* value) @@ -1593,7 +1606,7 @@ class HClampToUint8: public HUnaryOperation { SetFlag(kUseGVN); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; @@ -1603,7 +1616,7 @@ enum RemovableSimulate { }; -class HSimulate: public HInstruction { +class HSimulate V8_FINAL : public HInstruction { public: HSimulate(BailoutId ast_id, int pop_count, @@ -1615,9 +1628,9 @@ class HSimulate: public HInstruction { assigned_indexes_(2, zone), zone_(zone), removable_(removable) {} - virtual ~HSimulate() {} + ~HSimulate() {} - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; bool HasAstId() const { return !ast_id_.IsNone(); } BailoutId ast_id() const { return ast_id_; } @@ -1647,11 +1660,13 @@ class HSimulate: public HInstruction { } return -1; } - virtual int OperandCount() { return values_.length(); } - virtual HValue* OperandAt(int index) const { return values_[index]; } + virtual int OperandCount() V8_OVERRIDE { return values_.length(); } + virtual HValue* OperandAt(int index) const V8_OVERRIDE { + return values_[index]; + } - virtual bool HasEscapingOperandAt(int index) { return false; } - virtual Representation RequiredInputRepresentation(int index) { + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -1661,13 +1676,13 @@ class HSimulate: public HInstruction { DECLARE_CONCRETE_INSTRUCTION(Simulate) #ifdef DEBUG - virtual void Verify(); + virtual void Verify() V8_OVERRIDE; void set_closure(Handle closure) { closure_ = closure; } Handle closure() const { return closure_; } #endif protected: - virtual void InternalSetOperandAt(int index, HValue* value) { + virtual void InternalSetOperandAt(int index, HValue* value) V8_OVERRIDE { values_[index] = value; } @@ -1700,7 +1715,7 @@ class HSimulate: public HInstruction { }; -class HEnvironmentMarker: public HTemplateInstruction<1> { +class HEnvironmentMarker V8_FINAL : public HTemplateInstruction<1> { public: enum Kind { BIND, LOOKUP }; @@ -1714,11 +1729,11 @@ class HEnvironmentMarker: public HTemplateInstruction<1> { next_simulate_ = simulate; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; #ifdef DEBUG void set_closure(Handle closure) { @@ -1742,7 +1757,7 @@ class HEnvironmentMarker: public HTemplateInstruction<1> { }; -class HStackCheck: public HTemplateInstruction<1> { +class HStackCheck V8_FINAL : public HTemplateInstruction<1> { public: enum Type { kFunctionEntry, @@ -1753,7 +1768,7 @@ class HStackCheck: public HTemplateInstruction<1> { HValue* context() { return OperandAt(0); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -1792,7 +1807,7 @@ enum InliningKind { class HArgumentsObject; -class HEnterInlined: public HTemplateInstruction<0> { +class HEnterInlined V8_FINAL : public HTemplateInstruction<0> { public: static HEnterInlined* New(Zone* zone, HValue* context, @@ -1811,7 +1826,7 @@ class HEnterInlined: public HTemplateInstruction<0> { void RegisterReturnTarget(HBasicBlock* return_target, Zone* zone); ZoneList* return_targets() { return &return_targets_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle closure() const { return closure_; } int arguments_count() const { return arguments_count_; } @@ -1821,7 +1836,7 @@ class HEnterInlined: public HTemplateInstruction<0> { InliningKind inlining_kind() const { return inlining_kind_; } bool undefined_receiver() const { return undefined_receiver_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -1862,11 +1877,11 @@ class HEnterInlined: public HTemplateInstruction<0> { }; -class HLeaveInlined: public HTemplateInstruction<0> { +class HLeaveInlined V8_FINAL : public HTemplateInstruction<0> { public: HLeaveInlined() { } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -1874,11 +1889,11 @@ class HLeaveInlined: public HTemplateInstruction<0> { }; -class HPushArgument: public HUnaryOperation { +class HPushArgument V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HPushArgument, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -1893,39 +1908,39 @@ class HPushArgument: public HUnaryOperation { }; -class HThisFunction: public HTemplateInstruction<0> { +class HThisFunction V8_FINAL : public HTemplateInstruction<0> { public: HThisFunction() { set_representation(Representation::Tagged()); SetFlag(kUseGVN); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } DECLARE_CONCRETE_INSTRUCTION(ThisFunction) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HOuterContext: public HUnaryOperation { +class HOuterContext V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HOuterContext, HValue*); DECLARE_CONCRETE_INSTRUCTION(OuterContext); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: explicit HOuterContext(HValue* inner) : HUnaryOperation(inner) { @@ -1933,11 +1948,11 @@ class HOuterContext: public HUnaryOperation { SetFlag(kUseGVN); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HDeclareGlobals: public HUnaryOperation { +class HDeclareGlobals V8_FINAL : public HUnaryOperation { public: HDeclareGlobals(HValue* context, Handle pairs, @@ -1962,7 +1977,7 @@ class HDeclareGlobals: public HUnaryOperation { DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals) - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -1972,7 +1987,7 @@ class HDeclareGlobals: public HUnaryOperation { }; -class HGlobalObject: public HUnaryOperation { +class HGlobalObject V8_FINAL : public HUnaryOperation { public: explicit HGlobalObject(HValue* context) : HUnaryOperation(context) { set_representation(Representation::Tagged()); @@ -1985,30 +2000,30 @@ class HGlobalObject: public HUnaryOperation { DECLARE_CONCRETE_INSTRUCTION(GlobalObject) - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HGlobalReceiver: public HUnaryOperation { +class HGlobalReceiver V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HGlobalReceiver, HValue*); DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver) - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: explicit HGlobalReceiver(HValue* global_object) @@ -2017,12 +2032,12 @@ class HGlobalReceiver: public HUnaryOperation { SetFlag(kUseGVN); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; template -class HCall: public HTemplateInstruction { +class HCall : public HTemplateInstruction { public: // The argument count includes the receiver. explicit HCall(int argument_count) : argument_count_(argument_count) { @@ -2030,35 +2045,38 @@ class HCall: public HTemplateInstruction { this->SetAllSideEffects(); } - virtual HType CalculateInferredType() { return HType::Tagged(); } + virtual HType CalculateInferredType() V8_FINAL V8_OVERRIDE { + return HType::Tagged(); + } virtual int argument_count() const { return argument_count_; } - virtual bool IsCall() { return true; } + virtual bool IsCall() V8_FINAL V8_OVERRIDE { return true; } private: int argument_count_; }; -class HUnaryCall: public HCall<1> { +class HUnaryCall : public HCall<1> { public: HUnaryCall(HValue* value, int argument_count) : HCall<1>(argument_count) { SetOperandAt(0, value); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation( + int index) V8_FINAL V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; HValue* value() { return OperandAt(0); } }; -class HBinaryCall: public HCall<2> { +class HBinaryCall : public HCall<2> { public: HBinaryCall(HValue* first, HValue* second, int argument_count) : HCall<2>(argument_count) { @@ -2066,9 +2084,10 @@ class HBinaryCall: public HCall<2> { SetOperandAt(1, second); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation( + int index) V8_FINAL V8_OVERRIDE { return Representation::Tagged(); } @@ -2077,7 +2096,7 @@ class HBinaryCall: public HCall<2> { }; -class HInvokeFunction: public HBinaryCall { +class HInvokeFunction V8_FINAL : public HBinaryCall { public: HInvokeFunction(HValue* context, HValue* function, int argument_count) : HBinaryCall(context, function, argument_count) { @@ -2109,10 +2128,6 @@ class HInvokeFunction: public HBinaryCall { known_function, argument_count); } - virtual Representation RequiredInputRepresentation(int index) { - return Representation::Tagged(); - } - HValue* context() { return first(); } HValue* function() { return second(); } Handle known_function() { return known_function_; } @@ -2126,7 +2141,7 @@ class HInvokeFunction: public HBinaryCall { }; -class HCallConstantFunction: public HCall<0> { +class HCallConstantFunction V8_FINAL : public HCall<0> { public: HCallConstantFunction(Handle function, int argument_count) : HCall<0>(argument_count), @@ -2141,9 +2156,9 @@ class HCallConstantFunction: public HCall<0> { Isolate::Current()->builtins()->builtin(Builtins::kFunctionApply); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -2155,16 +2170,12 @@ class HCallConstantFunction: public HCall<0> { }; -class HCallKeyed: public HBinaryCall { +class HCallKeyed V8_FINAL : public HBinaryCall { public: HCallKeyed(HValue* context, HValue* key, int argument_count) : HBinaryCall(context, key, argument_count) { } - virtual Representation RequiredInputRepresentation(int index) { - return Representation::Tagged(); - } - HValue* context() { return first(); } HValue* key() { return second(); } @@ -2172,29 +2183,25 @@ class HCallKeyed: public HBinaryCall { }; -class HCallNamed: public HUnaryCall { +class HCallNamed V8_FINAL : public HUnaryCall { public: HCallNamed(HValue* context, Handle name, int argument_count) : HUnaryCall(context, argument_count), name_(name) { } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; HValue* context() { return value(); } Handle name() const { return name_; } DECLARE_CONCRETE_INSTRUCTION(CallNamed) - virtual Representation RequiredInputRepresentation(int index) { - return Representation::Tagged(); - } - private: Handle name_; }; -class HCallFunction: public HBinaryCall { +class HCallFunction V8_FINAL : public HBinaryCall { public: HCallFunction(HValue* context, HValue* function, int argument_count) : HBinaryCall(context, function, argument_count) { @@ -2210,15 +2217,11 @@ class HCallFunction: public HBinaryCall { HValue* context() { return first(); } HValue* function() { return second(); } - virtual Representation RequiredInputRepresentation(int index) { - return Representation::Tagged(); - } - DECLARE_CONCRETE_INSTRUCTION(CallFunction) }; -class HCallGlobal: public HUnaryCall { +class HCallGlobal V8_FINAL : public HUnaryCall { public: HCallGlobal(HValue* context, Handle name, int argument_count) : HUnaryCall(context, argument_count), name_(name) { @@ -2231,15 +2234,11 @@ class HCallGlobal: public HUnaryCall { return new(zone) HCallGlobal(context, name, argument_count); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; HValue* context() { return value(); } Handle name() const { return name_; } - virtual Representation RequiredInputRepresentation(int index) { - return Representation::Tagged(); - } - DECLARE_CONCRETE_INSTRUCTION(CallGlobal) private: @@ -2247,19 +2246,19 @@ class HCallGlobal: public HUnaryCall { }; -class HCallKnownGlobal: public HCall<0> { +class HCallKnownGlobal V8_FINAL : public HCall<0> { public: HCallKnownGlobal(Handle target, int argument_count) : HCall<0>(argument_count), target_(target), formal_parameter_count_(target->shared()->formal_parameter_count()) { } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle target() const { return target_; } int formal_parameter_count() const { return formal_parameter_count_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -2271,15 +2270,10 @@ class HCallKnownGlobal: public HCall<0> { }; -class HCallNew: public HBinaryCall { +class HCallNew V8_FINAL : public HBinaryCall { public: HCallNew(HValue* context, HValue* constructor, int argument_count) - : HBinaryCall(context, constructor, argument_count) { - } - - virtual Representation RequiredInputRepresentation(int index) { - return Representation::Tagged(); - } + : HBinaryCall(context, constructor, argument_count) {} HValue* context() { return first(); } HValue* constructor() { return second(); } @@ -2288,15 +2282,18 @@ class HCallNew: public HBinaryCall { }; -class HCallNewArray: public HCallNew { +class HCallNewArray V8_FINAL : public HBinaryCall { public: HCallNewArray(HValue* context, HValue* constructor, int argument_count, Handle type_cell, ElementsKind elements_kind) - : HCallNew(context, constructor, argument_count), + : HBinaryCall(context, constructor, argument_count), elements_kind_(elements_kind), type_cell_(type_cell) {} - virtual void PrintDataTo(StringStream* stream); + HValue* context() { return first(); } + HValue* constructor() { return second(); } + + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle property_cell() const { return type_cell_; @@ -2312,7 +2309,7 @@ class HCallNewArray: public HCallNew { }; -class HCallRuntime: public HCall<1> { +class HCallRuntime V8_FINAL : public HCall<1> { public: static HCallRuntime* New(Zone* zone, HValue* context, @@ -2322,13 +2319,13 @@ class HCallRuntime: public HCall<1> { return new(zone) HCallRuntime(context, name, c_function, argument_count); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; HValue* context() { return OperandAt(0); } const Runtime::Function* function() const { return c_function_; } Handle name() const { return name_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -2348,18 +2345,18 @@ class HCallRuntime: public HCall<1> { }; -class HMapEnumLength: public HUnaryOperation { +class HMapEnumLength V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HMapEnumLength, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(MapEnumLength) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: explicit HMapEnumLength(HValue* value) @@ -2369,11 +2366,11 @@ class HMapEnumLength: public HUnaryOperation { SetGVNFlag(kDependsOnMaps); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HElementsKind: public HUnaryOperation { +class HElementsKind V8_FINAL : public HUnaryOperation { public: explicit HElementsKind(HValue* value) : HUnaryOperation(value) { set_representation(Representation::Integer32()); @@ -2381,21 +2378,21 @@ class HElementsKind: public HUnaryOperation { SetGVNFlag(kDependsOnElementsKind); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(ElementsKind) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HUnaryMathOperation: public HTemplateInstruction<2> { +class HUnaryMathOperation V8_FINAL : public HTemplateInstruction<2> { public: static HInstruction* New(Zone* zone, HValue* context, @@ -2405,11 +2402,12 @@ class HUnaryMathOperation: public HTemplateInstruction<2> { HValue* context() { return OperandAt(0); } HValue* value() { return OperandAt(1); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); + virtual HValue* EnsureAndPropagateNotMinusZero( + BitVector* visited) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { if (index == 0) { return Representation::Tagged(); } else { @@ -2433,10 +2431,10 @@ class HUnaryMathOperation: public HTemplateInstruction<2> { } } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; - virtual HValue* Canonicalize(); - virtual Representation RepresentationFromInputs(); + virtual HValue* Canonicalize() V8_OVERRIDE; + virtual Representation RepresentationFromInputs() V8_OVERRIDE; BuiltinFunctionId op() const { return op_; } const char* OpName() const; @@ -2444,7 +2442,7 @@ class HUnaryMathOperation: public HTemplateInstruction<2> { DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { HUnaryMathOperation* b = HUnaryMathOperation::cast(other); return op_ == b->op(); } @@ -2486,28 +2484,28 @@ class HUnaryMathOperation: public HTemplateInstruction<2> { SetFlag(kAllowUndefinedAsNaN); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } BuiltinFunctionId op_; }; -class HLoadExternalArrayPointer: public HUnaryOperation { +class HLoadExternalArrayPointer V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HLoadExternalArrayPointer, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual HType CalculateInferredType() { + virtual HType CalculateInferredType() V8_OVERRIDE { return HType::None(); } DECLARE_CONCRETE_INSTRUCTION(LoadExternalArrayPointer) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: explicit HLoadExternalArrayPointer(HValue* value) @@ -2520,11 +2518,11 @@ class HLoadExternalArrayPointer: public HUnaryOperation { SetFlag(kUseGVN); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HCheckMaps: public HTemplateInstruction<2> { +class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { public: static HCheckMaps* New(Zone* zone, HValue* context, HValue* value, Handle map, CompilationInfo* info, @@ -2542,13 +2540,13 @@ class HCheckMaps: public HTemplateInstruction<2> { bool CanOmitMapChecks() { return omit_; } - virtual bool HasEscapingOperandAt(int index) { return false; } - virtual Representation RequiredInputRepresentation(int index) { + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } virtual void HandleSideEffectDominator(GVNFlag side_effect, - HValue* dominator); - virtual void PrintDataTo(StringStream* stream); + HValue* dominator) V8_OVERRIDE; + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; HValue* value() { return OperandAt(0); } SmallMapList* map_set() { return &map_set_; } @@ -2557,12 +2555,12 @@ class HCheckMaps: public HTemplateInstruction<2> { return has_migration_target_; } - virtual void FinalizeUniqueValueId(); + virtual void FinalizeUniqueValueId() V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(CheckMaps) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { ASSERT_EQ(map_set_.length(), map_unique_ids_.length()); HCheckMaps* b = HCheckMaps::cast(other); // Relies on the fact that map_set has been sorted before. @@ -2617,22 +2615,22 @@ class HCheckMaps: public HTemplateInstruction<2> { }; -class HCheckFunction: public HUnaryOperation { +class HCheckFunction V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P2(HCheckFunction, HValue*, Handle); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; #ifdef DEBUG - virtual void Verify(); + virtual void Verify() V8_OVERRIDE; #endif - virtual void FinalizeUniqueValueId() { + virtual void FinalizeUniqueValueId() V8_OVERRIDE { target_unique_id_ = UniqueValueId(target_); } @@ -2642,7 +2640,7 @@ class HCheckFunction: public HUnaryOperation { DECLARE_CONCRETE_INSTRUCTION(CheckFunction) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { HCheckFunction* b = HCheckFunction::cast(other); return target_unique_id_ == b->target_unique_id_; } @@ -2662,7 +2660,7 @@ class HCheckFunction: public HUnaryOperation { }; -class HCheckInstanceType: public HUnaryOperation { +class HCheckInstanceType V8_FINAL : public HUnaryOperation { public: static HCheckInstanceType* NewIsSpecObject(HValue* value, Zone* zone) { return new(zone) HCheckInstanceType(value, IS_SPEC_OBJECT); @@ -2678,13 +2676,13 @@ class HCheckInstanceType: public HUnaryOperation { return new(zone) HCheckInstanceType(value, IS_INTERNALIZED_STRING); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; } void GetCheckInterval(InstanceType* first, InstanceType* last); @@ -2696,7 +2694,7 @@ class HCheckInstanceType: public HUnaryOperation { // TODO(ager): It could be nice to allow the ommision of instance // type checks if we have already performed an instance type check // with a larger range. - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { HCheckInstanceType* b = HCheckInstanceType::cast(other); return check_ == b->check_; } @@ -2722,15 +2720,15 @@ class HCheckInstanceType: public HUnaryOperation { }; -class HCheckSmi: public HUnaryOperation { +class HCheckSmi V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HCheckSmi, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual HValue* Canonicalize() { + virtual HValue* Canonicalize() V8_OVERRIDE { HType value_type = value()->type(); if (value_type.IsSmi()) { return NULL; @@ -2741,7 +2739,7 @@ class HCheckSmi: public HUnaryOperation { DECLARE_CONCRETE_INSTRUCTION(CheckSmi) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: explicit HCheckSmi(HValue* value) : HUnaryOperation(value, HType::Smi()) { @@ -2751,14 +2749,14 @@ class HCheckSmi: public HUnaryOperation { }; -class HIsNumberAndBranch: public HUnaryControlInstruction { +class HIsNumberAndBranch V8_FINAL : public HUnaryControlInstruction { public: explicit HIsNumberAndBranch(HValue* value) : HUnaryControlInstruction(value, NULL, NULL) { SetFlag(kFlexibleRepresentation); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -2766,27 +2764,27 @@ class HIsNumberAndBranch: public HUnaryControlInstruction { }; -class HCheckHeapObject: public HUnaryOperation { +class HCheckHeapObject V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HCheckHeapObject, HValue*); - virtual bool HasEscapingOperandAt(int index) { return false; } - virtual Representation RequiredInputRepresentation(int index) { + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } #ifdef DEBUG - virtual void Verify(); + virtual void Verify() V8_OVERRIDE; #endif - virtual HValue* Canonicalize() { + virtual HValue* Canonicalize() V8_OVERRIDE { return value()->type().IsHeapObject() ? NULL : this; } DECLARE_CONCRETE_INSTRUCTION(CheckHeapObject) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: explicit HCheckHeapObject(HValue* value) @@ -2818,7 +2816,7 @@ class HConstant; class HBitwise; -class InductionVariableData : public ZoneObject { +class InductionVariableData V8_FINAL : public ZoneObject { public: class InductionVariableCheck : public ZoneObject { public: @@ -3018,7 +3016,7 @@ class InductionVariableData : public ZoneObject { }; -class HPhi: public HValue { +class HPhi V8_FINAL : public HValue { public: HPhi(int merged_index, Zone* zone) : inputs_(2, zone), @@ -3034,19 +3032,22 @@ class HPhi: public HValue { SetFlag(kAllowUndefinedAsNaN); } - virtual Representation RepresentationFromInputs(); + virtual Representation RepresentationFromInputs() V8_OVERRIDE; - virtual Range* InferRange(Zone* zone); - virtual void InferRepresentation(HInferRepresentationPhase* h_infer); - virtual Representation RequiredInputRepresentation(int index) { + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual void InferRepresentation( + HInferRepresentationPhase* h_infer) V8_OVERRIDE; + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return representation(); } - virtual Representation KnownOptimalRepresentation() { + virtual Representation KnownOptimalRepresentation() V8_OVERRIDE { return representation(); } - virtual HType CalculateInferredType(); - virtual int OperandCount() { return inputs_.length(); } - virtual HValue* OperandAt(int index) const { return inputs_[index]; } + virtual HType CalculateInferredType() V8_OVERRIDE; + virtual int OperandCount() V8_OVERRIDE { return inputs_.length(); } + virtual HValue* OperandAt(int index) const V8_OVERRIDE { + return inputs_[index]; + } HValue* GetRedundantReplacement(); void AddInput(HValue* value); bool HasRealUses(); @@ -3071,10 +3072,10 @@ class HPhi: public HValue { induction_variable_data_ = InductionVariableData::ExaminePhi(this); } - virtual void PrintTo(StringStream* stream); + virtual void PrintTo(StringStream* stream) V8_OVERRIDE; #ifdef DEBUG - virtual void Verify(); + virtual void Verify() V8_OVERRIDE; #endif void InitRealUses(int id); @@ -3111,7 +3112,7 @@ class HPhi: public HValue { ASSERT(value->IsPhi()); return reinterpret_cast(value); } - virtual Opcode opcode() const { return HValue::kPhi; } + virtual Opcode opcode() const V8_OVERRIDE { return HValue::kPhi; } void SimplifyConstantInputs(); @@ -3119,8 +3120,8 @@ class HPhi: public HValue { static const int kInvalidMergedIndex = -1; protected: - virtual void DeleteFromGraph(); - virtual void InternalSetOperandAt(int index, HValue* value) { + virtual void DeleteFromGraph() V8_OVERRIDE; + virtual void InternalSetOperandAt(int index, HValue* value) V8_OVERRIDE { inputs_[index] = value; } @@ -3134,25 +3135,31 @@ class HPhi: public HValue { InductionVariableData* induction_variable_data_; // TODO(titzer): we can't eliminate the receiver for generating backtraces - virtual bool IsDeletable() const { return !IsReceiver(); } + virtual bool IsDeletable() const V8_OVERRIDE { return !IsReceiver(); } }; // Common base class for HArgumentsObject and HCapturedObject. -class HDematerializedObject: public HTemplateInstruction<0> { +class HDematerializedObject : public HInstruction { public: HDematerializedObject(int count, Zone* zone) : values_(count, zone) {} - virtual int OperandCount() { return values_.length(); } - virtual HValue* OperandAt(int index) const { return values_[index]; } + virtual int OperandCount() V8_FINAL V8_OVERRIDE { return values_.length(); } + virtual HValue* OperandAt(int index) const V8_FINAL V8_OVERRIDE { + return values_[index]; + } - virtual bool HasEscapingOperandAt(int index) { return false; } - virtual Representation RequiredInputRepresentation(int index) { + virtual bool HasEscapingOperandAt(int index) V8_FINAL V8_OVERRIDE { + return false; + } + virtual Representation RequiredInputRepresentation( + int index) V8_FINAL V8_OVERRIDE { return Representation::None(); } protected: - virtual void InternalSetOperandAt(int index, HValue* value) { + virtual void InternalSetOperandAt(int index, + HValue* value) V8_FINAL V8_OVERRIDE { values_[index] = value; } @@ -3160,11 +3167,11 @@ class HDematerializedObject: public HTemplateInstruction<0> { ZoneList values_; private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_FINAL V8_OVERRIDE { return true; } }; -class HArgumentsObject: public HDematerializedObject { +class HArgumentsObject V8_FINAL : public HDematerializedObject { public: static HArgumentsObject* New(Zone* zone, HValue* context, int count) { return new(zone) HArgumentsObject(count, zone); @@ -3191,7 +3198,7 @@ class HArgumentsObject: public HDematerializedObject { }; -class HCapturedObject: public HDematerializedObject { +class HCapturedObject V8_FINAL : public HDematerializedObject { public: HCapturedObject(int length, Zone* zone) : HDematerializedObject(length, zone) { @@ -3209,7 +3216,7 @@ class HCapturedObject: public HDematerializedObject { }; -class HConstant: public HTemplateInstruction<0> { +class HConstant V8_FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P1(HConstant, int32_t); DECLARE_INSTRUCTION_FACTORY_P2(HConstant, int32_t, Representation); @@ -3276,11 +3283,11 @@ class HConstant: public HTemplateInstruction<0> { return is_cell_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } - virtual Representation KnownOptimalRepresentation() { + virtual Representation KnownOptimalRepresentation() V8_OVERRIDE { if (HasSmiValue() && kSmiValueSize == 31) return Representation::Smi(); if (HasInteger32Value()) return Representation::Integer32(); if (HasNumberValue()) return Representation::Double(); @@ -3288,8 +3295,8 @@ class HConstant: public HTemplateInstruction<0> { return Representation::Tagged(); } - virtual bool EmitAtUses(); - virtual void PrintDataTo(StringStream* stream); + virtual bool EmitAtUses() V8_OVERRIDE; + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; bool IsInteger() { return handle()->IsSmi(); } HConstant* CopyToRepresentation(Representation r, Zone* zone) const; Maybe CopyToTruncatedInt32(Zone* zone); @@ -3346,7 +3353,7 @@ class HConstant: public HTemplateInstruction<0> { bool HasBooleanValue() const { return type_.IsBoolean(); } bool BooleanValue() const { return boolean_value_; } - virtual intptr_t Hashcode() { + virtual intptr_t Hashcode() V8_OVERRIDE { if (has_int32_value_) { return static_cast(int32_value_); } else if (has_double_value_) { @@ -3359,7 +3366,7 @@ class HConstant: public HTemplateInstruction<0> { } } - virtual void FinalizeUniqueValueId() { + virtual void FinalizeUniqueValueId() V8_OVERRIDE { if (!has_double_value_ && !has_external_reference_value_) { ASSERT(!handle_.is_null()); unique_id_ = UniqueValueId(handle_); @@ -3372,15 +3379,15 @@ class HConstant: public HTemplateInstruction<0> { } #ifdef DEBUG - virtual void Verify() { } + virtual void Verify() V8_OVERRIDE { } #endif DECLARE_CONCRETE_INSTRUCTION(Constant) protected: - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { HConstant* other_constant = HConstant::cast(other); if (has_int32_value_) { return other_constant->has_int32_value_ && @@ -3423,7 +3430,7 @@ class HConstant: public HTemplateInstruction<0> { void Initialize(Representation r); - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } // If this is a numerical constant, handle_ either points to to the // HeapObject the constant originated from or is null. If the @@ -3451,7 +3458,7 @@ class HConstant: public HTemplateInstruction<0> { }; -class HBinaryOperation: public HTemplateInstruction<3> { +class HBinaryOperation : public HTemplateInstruction<3> { public: HBinaryOperation(HValue* context, HValue* left, HValue* right, HType type = HType::Tagged()) @@ -3501,29 +3508,30 @@ class HBinaryOperation: public HTemplateInstruction<3> { observed_output_representation_ = observed; } - virtual Representation observed_input_representation(int index) { + virtual Representation observed_input_representation(int index) V8_OVERRIDE { if (index == 0) return Representation::Tagged(); return observed_input_representation_[index - 1]; } virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) { + const char* reason) V8_OVERRIDE { Representation rep = !FLAG_smi_binop && new_rep.IsSmi() ? Representation::Integer32() : new_rep; HValue::UpdateRepresentation(rep, h_infer, reason); } - virtual void InferRepresentation(HInferRepresentationPhase* h_infer); - virtual Representation RepresentationFromInputs(); + virtual void InferRepresentation( + HInferRepresentationPhase* h_infer) V8_OVERRIDE; + virtual Representation RepresentationFromInputs() V8_OVERRIDE; Representation RepresentationFromOutput(); - virtual void AssumeRepresentation(Representation r); + virtual void AssumeRepresentation(Representation r) V8_OVERRIDE; virtual bool IsCommutative() const { return false; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { if (index == 0) return Representation::Tagged(); return representation(); } @@ -3538,20 +3546,20 @@ class HBinaryOperation: public HTemplateInstruction<3> { }; -class HWrapReceiver: public HTemplateInstruction<2> { +class HWrapReceiver V8_FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P2(HWrapReceiver, HValue*, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } HValue* receiver() { return OperandAt(0); } HValue* function() { return OperandAt(1); } - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(WrapReceiver) @@ -3564,7 +3572,7 @@ class HWrapReceiver: public HTemplateInstruction<2> { }; -class HApplyArguments: public HTemplateInstruction<4> { +class HApplyArguments V8_FINAL : public HTemplateInstruction<4> { public: HApplyArguments(HValue* function, HValue* receiver, @@ -3578,7 +3586,7 @@ class HApplyArguments: public HTemplateInstruction<4> { SetAllSideEffects(); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { // The length is untagged, all other inputs are tagged. return (index == 2) ? Representation::Integer32() @@ -3594,20 +3602,20 @@ class HApplyArguments: public HTemplateInstruction<4> { }; -class HArgumentsElements: public HTemplateInstruction<0> { +class HArgumentsElements V8_FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsElements, bool); DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements) - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } bool from_inlined() const { return from_inlined_; } protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: explicit HArgumentsElements(bool from_inlined) : from_inlined_(from_inlined) { @@ -3617,24 +3625,24 @@ class HArgumentsElements: public HTemplateInstruction<0> { SetFlag(kUseGVN); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } bool from_inlined_; }; -class HArgumentsLength: public HUnaryOperation { +class HArgumentsLength V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HArgumentsLength, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: explicit HArgumentsLength(HValue* value) : HUnaryOperation(value) { @@ -3642,11 +3650,11 @@ class HArgumentsLength: public HUnaryOperation { SetFlag(kUseGVN); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HAccessArgumentsAt: public HTemplateInstruction<3> { +class HAccessArgumentsAt V8_FINAL : public HTemplateInstruction<3> { public: HAccessArgumentsAt(HValue* arguments, HValue* length, HValue* index) { set_representation(Representation::Tagged()); @@ -3656,9 +3664,9 @@ class HAccessArgumentsAt: public HTemplateInstruction<3> { SetOperandAt(2, index); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { // The arguments elements is considered tagged. return index == 0 ? Representation::Tagged() @@ -3671,14 +3679,14 @@ class HAccessArgumentsAt: public HTemplateInstruction<3> { DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt) - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } }; class HBoundsCheckBaseIndexInformation; -class HBoundsCheck: public HTemplateInstruction<2> { +class HBoundsCheck V8_FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P2(HBoundsCheck, HValue*, HValue*); @@ -3707,27 +3715,30 @@ class HBoundsCheck: public HTemplateInstruction<2> { } } - virtual Representation RequiredInputRepresentation(int arg_index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return representation(); } - virtual void PrintDataTo(StringStream* stream); - virtual void InferRepresentation(HInferRepresentationPhase* h_infer); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; + virtual void InferRepresentation( + HInferRepresentationPhase* h_infer) V8_OVERRIDE; HValue* index() { return OperandAt(0); } HValue* length() { return OperandAt(1); } bool allow_equality() { return allow_equality_; } void set_allow_equality(bool v) { allow_equality_ = v; } - virtual int RedefinedOperandIndex() { return 0; } - virtual bool IsPurelyInformativeDefinition() { return skip_check(); } + virtual int RedefinedOperandIndex() V8_OVERRIDE { return 0; } + virtual bool IsPurelyInformativeDefinition() V8_OVERRIDE { + return skip_check(); + } DECLARE_CONCRETE_INSTRUCTION(BoundsCheck) protected: friend class HBoundsCheckBaseIndexInformation; - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } bool skip_check_; HValue* base_; int offset_; @@ -3749,13 +3760,14 @@ class HBoundsCheck: public HTemplateInstruction<2> { SetFlag(kUseGVN); } - virtual bool IsDeletable() const { + virtual bool IsDeletable() const V8_OVERRIDE { return skip_check() && !FLAG_debug_code; } }; -class HBoundsCheckBaseIndexInformation: public HTemplateInstruction<2> { +class HBoundsCheckBaseIndexInformation V8_FINAL + : public HTemplateInstruction<2> { public: explicit HBoundsCheckBaseIndexInformation(HBoundsCheck* check) { DecompositionResult decomposition; @@ -3772,18 +3784,18 @@ class HBoundsCheckBaseIndexInformation: public HTemplateInstruction<2> { DECLARE_CONCRETE_INSTRUCTION(BoundsCheckBaseIndexInformation) - virtual Representation RequiredInputRepresentation(int arg_index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return representation(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual int RedefinedOperandIndex() { return 0; } - virtual bool IsPurelyInformativeDefinition() { return true; } + virtual int RedefinedOperandIndex() V8_OVERRIDE { return 0; } + virtual bool IsPurelyInformativeDefinition() V8_OVERRIDE { return true; } }; -class HBitwiseBinaryOperation: public HBinaryOperation { +class HBitwiseBinaryOperation : public HBinaryOperation { public: HBitwiseBinaryOperation(HValue* context, HValue* left, HValue* right, HType type = HType::Tagged()) @@ -3794,7 +3806,7 @@ class HBitwiseBinaryOperation: public HBinaryOperation { SetAllSideEffects(); } - virtual void RepresentationChanged(Representation to) { + virtual void RepresentationChanged(Representation to) V8_OVERRIDE { if (!to.IsTagged()) { ASSERT(to.IsSmiOrInteger32()); ClearAllSideEffects(); @@ -3807,13 +3819,13 @@ class HBitwiseBinaryOperation: public HBinaryOperation { virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) { + const char* reason) V8_OVERRIDE { // We only generate either int32 or generic tagged bitwise operations. if (new_rep.IsDouble()) new_rep = Representation::Integer32(); HBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } - virtual Representation observed_input_representation(int index) { + virtual Representation observed_input_representation(int index) V8_OVERRIDE { Representation r = HBinaryOperation::observed_input_representation(index); if (r.IsDouble()) return Representation::Integer32(); return r; @@ -3827,11 +3839,11 @@ class HBitwiseBinaryOperation: public HBinaryOperation { DECLARE_ABSTRACT_INSTRUCTION(BitwiseBinaryOperation) private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HMathFloorOfDiv: public HBinaryOperation { +class HMathFloorOfDiv V8_FINAL : public HBinaryOperation { public: static HMathFloorOfDiv* New(Zone* zone, HValue* context, @@ -3840,12 +3852,13 @@ class HMathFloorOfDiv: public HBinaryOperation { return new(zone) HMathFloorOfDiv(context, left, right); } - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); + virtual HValue* EnsureAndPropagateNotMinusZero( + BitVector* visited) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: HMathFloorOfDiv(HValue* context, HValue* left, HValue* right) @@ -3859,11 +3872,11 @@ class HMathFloorOfDiv: public HBinaryOperation { SetFlag(kAllowUndefinedAsNaN); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HArithmeticBinaryOperation: public HBinaryOperation { +class HArithmeticBinaryOperation : public HBinaryOperation { public: HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right) : HBinaryOperation(context, left, right, HType::TaggedNumber()) { @@ -3872,7 +3885,7 @@ class HArithmeticBinaryOperation: public HBinaryOperation { SetFlag(kAllowUndefinedAsNaN); } - virtual void RepresentationChanged(Representation to) { + virtual void RepresentationChanged(Representation to) V8_OVERRIDE { if (to.IsTagged()) { SetAllSideEffects(); ClearFlag(kUseGVN); @@ -3885,11 +3898,11 @@ class HArithmeticBinaryOperation: public HBinaryOperation { DECLARE_ABSTRACT_INSTRUCTION(ArithmeticBinaryOperation) private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HCompareGeneric: public HBinaryOperation { +class HCompareGeneric V8_FINAL : public HBinaryOperation { public: HCompareGeneric(HValue* context, HValue* left, @@ -3902,14 +3915,14 @@ class HCompareGeneric: public HBinaryOperation { SetAllSideEffects(); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return index == 0 ? Representation::Tagged() : representation(); } Token::Value token() const { return token_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(CompareGeneric) @@ -3918,7 +3931,7 @@ class HCompareGeneric: public HBinaryOperation { }; -class HCompareNumericAndBranch: public HTemplateControlInstruction<2, 2> { +class HCompareNumericAndBranch : public HTemplateControlInstruction<2, 2> { public: HCompareNumericAndBranch(HValue* left, HValue* right, Token::Value token) : token_(token) { @@ -3938,15 +3951,16 @@ class HCompareNumericAndBranch: public HTemplateControlInstruction<2, 2> { observed_input_representation_[1] = right; } - virtual void InferRepresentation(HInferRepresentationPhase* h_infer); + virtual void InferRepresentation( + HInferRepresentationPhase* h_infer) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return representation(); } - virtual Representation observed_input_representation(int index) { + virtual Representation observed_input_representation(int index) V8_OVERRIDE { return observed_input_representation_[index]; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch) @@ -3956,7 +3970,8 @@ class HCompareNumericAndBranch: public HTemplateControlInstruction<2, 2> { }; -class HCompareHoleAndBranch: public HTemplateControlInstruction<2, 1> { +class HCompareHoleAndBranch V8_FINAL + : public HTemplateControlInstruction<2, 1> { public: // TODO(danno): make this private when the IfBuilder properly constructs // control flow instructions. @@ -3970,19 +3985,20 @@ class HCompareHoleAndBranch: public HTemplateControlInstruction<2, 1> { HValue* object() { return OperandAt(0); } - virtual void InferRepresentation(HInferRepresentationPhase* h_infer); + virtual void InferRepresentation( + HInferRepresentationPhase* h_infer) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return representation(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(CompareHoleAndBranch) }; -class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> { +class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> { public: // TODO(danno): make this private when the IfBuilder properly constructs // control flow instructions. @@ -3997,13 +4013,13 @@ class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> { HValue* left() { return OperandAt(0); } HValue* right() { return OperandAt(1); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual Representation observed_input_representation(int index) { + virtual Representation observed_input_representation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -4011,24 +4027,24 @@ class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> { }; -class HIsObjectAndBranch: public HUnaryControlInstruction { +class HIsObjectAndBranch V8_FINAL : public HUnaryControlInstruction { public: explicit HIsObjectAndBranch(HValue* value) : HUnaryControlInstruction(value, NULL, NULL) { } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch) }; -class HIsStringAndBranch: public HUnaryControlInstruction { +class HIsStringAndBranch V8_FINAL : public HUnaryControlInstruction { public: explicit HIsStringAndBranch(HValue* value) : HUnaryControlInstruction(value, NULL, NULL) { } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -4036,28 +4052,28 @@ class HIsStringAndBranch: public HUnaryControlInstruction { }; -class HIsSmiAndBranch: public HUnaryControlInstruction { +class HIsSmiAndBranch V8_FINAL : public HUnaryControlInstruction { public: explicit HIsSmiAndBranch(HValue* value) : HUnaryControlInstruction(value, NULL, NULL) { } DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch) - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } }; -class HIsUndetectableAndBranch: public HUnaryControlInstruction { +class HIsUndetectableAndBranch V8_FINAL : public HUnaryControlInstruction { public: explicit HIsUndetectableAndBranch(HValue* value) : HUnaryControlInstruction(value, NULL, NULL) { } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -4065,7 +4081,7 @@ class HIsUndetectableAndBranch: public HUnaryControlInstruction { }; -class HStringCompareAndBranch: public HTemplateControlInstruction<2, 3> { +class HStringCompareAndBranch : public HTemplateControlInstruction<2, 3> { public: HStringCompareAndBranch(HValue* context, HValue* left, @@ -4085,9 +4101,9 @@ class HStringCompareAndBranch: public HTemplateControlInstruction<2, 3> { HValue* right() { return OperandAt(2); } Token::Value token() const { return token_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -4102,9 +4118,9 @@ class HStringCompareAndBranch: public HTemplateControlInstruction<2, 3> { }; -class HIsConstructCallAndBranch: public HTemplateControlInstruction<2, 0> { +class HIsConstructCallAndBranch : public HTemplateControlInstruction<2, 0> { public: - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -4112,7 +4128,7 @@ class HIsConstructCallAndBranch: public HTemplateControlInstruction<2, 0> { }; -class HHasInstanceTypeAndBranch: public HUnaryControlInstruction { +class HHasInstanceTypeAndBranch V8_FINAL : public HUnaryControlInstruction { public: HHasInstanceTypeAndBranch(HValue* value, InstanceType type) : HUnaryControlInstruction(value, NULL, NULL), from_(type), to_(type) { } @@ -4124,9 +4140,9 @@ class HHasInstanceTypeAndBranch: public HUnaryControlInstruction { InstanceType from() { return from_; } InstanceType to() { return to_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -4138,12 +4154,12 @@ class HHasInstanceTypeAndBranch: public HUnaryControlInstruction { }; -class HHasCachedArrayIndexAndBranch: public HUnaryControlInstruction { +class HHasCachedArrayIndexAndBranch V8_FINAL : public HUnaryControlInstruction { public: explicit HHasCachedArrayIndexAndBranch(HValue* value) : HUnaryControlInstruction(value, NULL, NULL) { } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -4151,28 +4167,28 @@ class HHasCachedArrayIndexAndBranch: public HUnaryControlInstruction { }; -class HGetCachedArrayIndex: public HUnaryOperation { +class HGetCachedArrayIndex V8_FINAL : public HUnaryOperation { public: explicit HGetCachedArrayIndex(HValue* value) : HUnaryOperation(value) { set_representation(Representation::Tagged()); SetFlag(kUseGVN); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HClassOfTestAndBranch: public HUnaryControlInstruction { +class HClassOfTestAndBranch V8_FINAL : public HUnaryControlInstruction { public: HClassOfTestAndBranch(HValue* value, Handle class_name) : HUnaryControlInstruction(value, NULL, NULL), @@ -4180,11 +4196,11 @@ class HClassOfTestAndBranch: public HUnaryControlInstruction { DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch) - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle class_name() const { return class_name_; } @@ -4193,18 +4209,18 @@ class HClassOfTestAndBranch: public HUnaryControlInstruction { }; -class HTypeofIsAndBranch: public HUnaryControlInstruction { +class HTypeofIsAndBranch V8_FINAL : public HUnaryControlInstruction { public: HTypeofIsAndBranch(HValue* value, Handle type_literal) : HUnaryControlInstruction(value, NULL, NULL), type_literal_(type_literal) { } Handle type_literal() { return type_literal_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch) - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -4213,7 +4229,7 @@ class HTypeofIsAndBranch: public HUnaryControlInstruction { }; -class HInstanceOf: public HBinaryOperation { +class HInstanceOf V8_FINAL : public HBinaryOperation { public: HInstanceOf(HValue* context, HValue* left, HValue* right) : HBinaryOperation(context, left, right, HType::Boolean()) { @@ -4221,17 +4237,17 @@ class HInstanceOf: public HBinaryOperation { SetAllSideEffects(); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(InstanceOf) }; -class HInstanceOfKnownGlobal: public HTemplateInstruction<2> { +class HInstanceOfKnownGlobal V8_FINAL : public HTemplateInstruction<2> { public: HInstanceOfKnownGlobal(HValue* context, HValue* left, @@ -4247,7 +4263,7 @@ class HInstanceOfKnownGlobal: public HTemplateInstruction<2> { HValue* left() { return OperandAt(1); } Handle function() { return function_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -4261,7 +4277,7 @@ class HInstanceOfKnownGlobal: public HTemplateInstruction<2> { // TODO(mstarzinger): This instruction should be modeled as a load of the map // field followed by a load of the instance size field once HLoadNamedField is // flexible enough to accommodate byte-field loads. -class HInstanceSize: public HTemplateInstruction<1> { +class HInstanceSize V8_FINAL : public HTemplateInstruction<1> { public: explicit HInstanceSize(HValue* object) { SetOperandAt(0, object); @@ -4270,7 +4286,7 @@ class HInstanceSize: public HTemplateInstruction<1> { HValue* object() { return OperandAt(0); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -4278,7 +4294,7 @@ class HInstanceSize: public HTemplateInstruction<1> { }; -class HPower: public HTemplateInstruction<2> { +class HPower V8_FINAL : public HTemplateInstruction<2> { public: static HInstruction* New(Zone* zone, HValue* context, @@ -4288,19 +4304,19 @@ class HPower: public HTemplateInstruction<2> { HValue* left() { return OperandAt(0); } HValue* right() const { return OperandAt(1); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return index == 0 ? Representation::Double() : Representation::None(); } - virtual Representation observed_input_representation(int index) { + virtual Representation observed_input_representation(int index) V8_OVERRIDE { return RequiredInputRepresentation(index); } DECLARE_CONCRETE_INSTRUCTION(Power) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: HPower(HValue* left, HValue* right) { @@ -4311,13 +4327,13 @@ class HPower: public HTemplateInstruction<2> { SetGVNFlag(kChangesNewSpacePromotion); } - virtual bool IsDeletable() const { + virtual bool IsDeletable() const V8_OVERRIDE { return !right()->representation().IsTagged(); } }; -class HRandom: public HTemplateInstruction<1> { +class HRandom V8_FINAL : public HTemplateInstruction<1> { public: explicit HRandom(HValue* global_object) { SetOperandAt(0, global_object); @@ -4326,18 +4342,18 @@ class HRandom: public HTemplateInstruction<1> { HValue* global_object() { return OperandAt(0); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(Random) private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HAdd: public HArithmeticBinaryOperation { +class HAdd V8_FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -4346,15 +4362,16 @@ class HAdd: public HArithmeticBinaryOperation { // Add is only commutative if two integer values are added and not if two // tagged values are added (because it might be a String concatenation). - virtual bool IsCommutative() const { + virtual bool IsCommutative() const V8_OVERRIDE { return !representation().IsTagged(); } - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); + virtual HValue* EnsureAndPropagateNotMinusZero( + BitVector* visited) V8_OVERRIDE; - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; - virtual bool TryDecompose(DecompositionResult* decomposition) { + virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE { if (left()->IsInteger32Constant()) { decomposition->Apply(right(), left()->GetInteger32Constant()); return true; @@ -4366,7 +4383,7 @@ class HAdd: public HArithmeticBinaryOperation { } } - virtual void RepresentationChanged(Representation to) { + virtual void RepresentationChanged(Representation to) V8_OVERRIDE { if (to.IsTagged()) ClearFlag(kAllowUndefinedAsNaN); HArithmeticBinaryOperation::RepresentationChanged(to); } @@ -4374,9 +4391,9 @@ class HAdd: public HArithmeticBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Add) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; private: HAdd(HValue* context, HValue* left, HValue* right) @@ -4386,18 +4403,19 @@ class HAdd: public HArithmeticBinaryOperation { }; -class HSub: public HArithmeticBinaryOperation { +class HSub V8_FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); + virtual HValue* EnsureAndPropagateNotMinusZero( + BitVector* visited) V8_OVERRIDE; - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; - virtual bool TryDecompose(DecompositionResult* decomposition) { + virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE { if (right()->IsInteger32Constant()) { decomposition->Apply(left(), -right()->GetInteger32Constant()); return true; @@ -4409,9 +4427,9 @@ class HSub: public HArithmeticBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Sub) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; private: HSub(HValue* context, HValue* left, HValue* right) @@ -4421,7 +4439,7 @@ class HSub: public HArithmeticBinaryOperation { }; -class HMul: public HArithmeticBinaryOperation { +class HMul V8_FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -4439,18 +4457,19 @@ class HMul: public HArithmeticBinaryOperation { return mul; } - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); + virtual HValue* EnsureAndPropagateNotMinusZero( + BitVector* visited) V8_OVERRIDE; - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; // Only commutative if it is certain that not two objects are multiplicated. - virtual bool IsCommutative() const { + virtual bool IsCommutative() const V8_OVERRIDE { return !representation().IsTagged(); } virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) { + const char* reason) V8_OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -4458,9 +4477,9 @@ class HMul: public HArithmeticBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Mul) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; private: HMul(HValue* context, HValue* left, HValue* right) @@ -4470,7 +4489,7 @@ class HMul: public HArithmeticBinaryOperation { }; -class HMod: public HArithmeticBinaryOperation { +class HMod V8_FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -4490,13 +4509,14 @@ class HMod: public HArithmeticBinaryOperation { return false; } - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); + virtual HValue* EnsureAndPropagateNotMinusZero( + BitVector* visited) V8_OVERRIDE; - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) { + const char* reason) V8_OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -4504,9 +4524,9 @@ class HMod: public HArithmeticBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Mod) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; private: HMod(HValue* context, @@ -4523,7 +4543,7 @@ class HMod: public HArithmeticBinaryOperation { }; -class HDiv: public HArithmeticBinaryOperation { +class HDiv V8_FINAL : public HArithmeticBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -4539,13 +4559,14 @@ class HDiv: public HArithmeticBinaryOperation { return false; } - virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); + virtual HValue* EnsureAndPropagateNotMinusZero( + BitVector* visited) V8_OVERRIDE; - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) { + const char* reason) V8_OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -4553,9 +4574,9 @@ class HDiv: public HArithmeticBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Div) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; private: HDiv(HValue* context, HValue* left, HValue* right) @@ -4566,7 +4587,7 @@ class HDiv: public HArithmeticBinaryOperation { }; -class HMathMinMax: public HArithmeticBinaryOperation { +class HMathMinMax V8_FINAL : public HArithmeticBinaryOperation { public: enum Operation { kMathMin, kMathMax }; @@ -4576,18 +4597,14 @@ class HMathMinMax: public HArithmeticBinaryOperation { HValue* right, Operation op); - virtual Representation RequiredInputRepresentation(int index) { - return index == 0 ? Representation::Tagged() - : representation(); - } - - virtual Representation observed_input_representation(int index) { + virtual Representation observed_input_representation(int index) V8_OVERRIDE { return RequiredInputRepresentation(index); } - virtual void InferRepresentation(HInferRepresentationPhase* h_infer); + virtual void InferRepresentation( + HInferRepresentationPhase* h_infer) V8_OVERRIDE; - virtual Representation RepresentationFromInputs() { + virtual Representation RepresentationFromInputs() V8_OVERRIDE { Representation left_rep = left()->representation(); Representation right_rep = right()->representation(); Representation result = Representation::Smi(); @@ -4597,19 +4614,19 @@ class HMathMinMax: public HArithmeticBinaryOperation { return result; } - virtual bool IsCommutative() const { return true; } + virtual bool IsCommutative() const V8_OVERRIDE { return true; } Operation operation() { return operation_; } DECLARE_CONCRETE_INSTRUCTION(MathMinMax) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return other->IsMathMinMax() && HMathMinMax::cast(other)->operation_ == operation_; } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; private: HMathMinMax(HValue* context, HValue* left, HValue* right, Operation op) @@ -4620,7 +4637,7 @@ class HMathMinMax: public HArithmeticBinaryOperation { }; -class HBitwise: public HBitwiseBinaryOperation { +class HBitwise V8_FINAL : public HBitwiseBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -4630,20 +4647,20 @@ class HBitwise: public HBitwiseBinaryOperation { Token::Value op() const { return op_; } - virtual bool IsCommutative() const { return true; } + virtual bool IsCommutative() const V8_OVERRIDE { return true; } - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(Bitwise) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return op() == HBitwise::cast(other)->op(); } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; private: HBitwise(HValue* context, @@ -4680,18 +4697,18 @@ class HBitwise: public HBitwiseBinaryOperation { }; -class HShl: public HBitwiseBinaryOperation { +class HShl V8_FINAL : public HBitwiseBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) { + const char* reason) V8_OVERRIDE { if (new_rep.IsSmi() && !(right()->IsInteger32Constant() && right()->GetInteger32Constant() >= 0)) { @@ -4703,7 +4720,7 @@ class HShl: public HBitwiseBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Shl) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: HShl(HValue* context, HValue* left, HValue* right) @@ -4711,14 +4728,14 @@ class HShl: public HBitwiseBinaryOperation { }; -class HShr: public HBitwiseBinaryOperation { +class HShr V8_FINAL : public HBitwiseBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual bool TryDecompose(DecompositionResult* decomposition) { + virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE { if (right()->IsInteger32Constant()) { if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) { // This is intended to look for HAdd and HSub, to handle compounds @@ -4730,11 +4747,11 @@ class HShr: public HBitwiseBinaryOperation { return false; } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) { + const char* reason) V8_OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -4742,7 +4759,7 @@ class HShr: public HBitwiseBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Shr) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: HShr(HValue* context, HValue* left, HValue* right) @@ -4750,14 +4767,14 @@ class HShr: public HBitwiseBinaryOperation { }; -class HSar: public HBitwiseBinaryOperation { +class HSar V8_FINAL : public HBitwiseBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, HValue* left, HValue* right); - virtual bool TryDecompose(DecompositionResult* decomposition) { + virtual bool TryDecompose(DecompositionResult* decomposition) V8_OVERRIDE { if (right()->IsInteger32Constant()) { if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) { // This is intended to look for HAdd and HSub, to handle compounds @@ -4769,11 +4786,11 @@ class HSar: public HBitwiseBinaryOperation { return false; } - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) { + const char* reason) V8_OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -4781,7 +4798,7 @@ class HSar: public HBitwiseBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Sar) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: HSar(HValue* context, HValue* left, HValue* right) @@ -4789,7 +4806,7 @@ class HSar: public HBitwiseBinaryOperation { }; -class HRor: public HBitwiseBinaryOperation { +class HRor V8_FINAL : public HBitwiseBinaryOperation { public: HRor(HValue* context, HValue* left, HValue* right) : HBitwiseBinaryOperation(context, left, right) { @@ -4798,7 +4815,7 @@ class HRor: public HBitwiseBinaryOperation { virtual void UpdateRepresentation(Representation new_rep, HInferRepresentationPhase* h_infer, - const char* reason) { + const char* reason) V8_OVERRIDE { if (new_rep.IsSmi()) new_rep = Representation::Integer32(); HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); } @@ -4806,17 +4823,17 @@ class HRor: public HBitwiseBinaryOperation { DECLARE_CONCRETE_INSTRUCTION(Ror) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } }; -class HOsrEntry: public HTemplateInstruction<0> { +class HOsrEntry V8_FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P1(HOsrEntry, BailoutId); BailoutId ast_id() const { return ast_id_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -4832,7 +4849,7 @@ class HOsrEntry: public HTemplateInstruction<0> { }; -class HParameter: public HTemplateInstruction<0> { +class HParameter V8_FINAL : public HTemplateInstruction<0> { public: enum ParameterKind { STACK_PARAMETER, @@ -4847,9 +4864,9 @@ class HParameter: public HTemplateInstruction<0> { unsigned index() const { return index_; } ParameterKind kind() const { return kind_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -4876,7 +4893,7 @@ class HParameter: public HTemplateInstruction<0> { }; -class HCallStub: public HUnaryCall { +class HCallStub V8_FINAL : public HUnaryCall { public: HCallStub(HValue* context, CodeStub::Major major_key, int argument_count) : HUnaryCall(context, argument_count), @@ -4895,11 +4912,7 @@ class HCallStub: public HUnaryCall { return transcendental_type_; } - virtual void PrintDataTo(StringStream* stream); - - virtual Representation RequiredInputRepresentation(int index) { - return Representation::Tagged(); - } + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(CallStub) @@ -4909,11 +4922,11 @@ class HCallStub: public HUnaryCall { }; -class HUnknownOSRValue: public HTemplateInstruction<0> { +class HUnknownOSRValue V8_FINAL : public HTemplateInstruction<0> { public: DECLARE_INSTRUCTION_FACTORY_P0(HUnknownOSRValue) - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } @@ -4925,7 +4938,7 @@ class HUnknownOSRValue: public HTemplateInstruction<0> { return incoming_value_; } - virtual Representation KnownOptimalRepresentation() { + virtual Representation KnownOptimalRepresentation() V8_OVERRIDE { if (incoming_value_ == NULL) return Representation::None(); return incoming_value_->KnownOptimalRepresentation(); } @@ -4942,7 +4955,7 @@ class HUnknownOSRValue: public HTemplateInstruction<0> { }; -class HLoadGlobalCell: public HTemplateInstruction<0> { +class HLoadGlobalCell V8_FINAL : public HTemplateInstruction<0> { public: HLoadGlobalCell(Handle cell, PropertyDetails details) : cell_(cell), details_(details), unique_id_() { @@ -4954,30 +4967,30 @@ class HLoadGlobalCell: public HTemplateInstruction<0> { Handle cell() const { return cell_; } bool RequiresHoleCheck() const; - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual intptr_t Hashcode() { + virtual intptr_t Hashcode() V8_OVERRIDE { return unique_id_.Hashcode(); } - virtual void FinalizeUniqueValueId() { + virtual void FinalizeUniqueValueId() V8_OVERRIDE { unique_id_ = UniqueValueId(cell_); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::None(); } DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { HLoadGlobalCell* b = HLoadGlobalCell::cast(other); return unique_id_ == b->unique_id_; } private: - virtual bool IsDeletable() const { return !RequiresHoleCheck(); } + virtual bool IsDeletable() const V8_OVERRIDE { return !RequiresHoleCheck(); } Handle cell_; PropertyDetails details_; @@ -4985,7 +4998,7 @@ class HLoadGlobalCell: public HTemplateInstruction<0> { }; -class HLoadGlobalGeneric: public HTemplateInstruction<2> { +class HLoadGlobalGeneric V8_FINAL : public HTemplateInstruction<2> { public: HLoadGlobalGeneric(HValue* context, HValue* global_object, @@ -5004,9 +5017,9 @@ class HLoadGlobalGeneric: public HTemplateInstruction<2> { Handle name() const { return name_; } bool for_typeof() const { return for_typeof_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -5018,7 +5031,7 @@ class HLoadGlobalGeneric: public HTemplateInstruction<2> { }; -class HAllocate: public HTemplateInstruction<2> { +class HAllocate V8_FINAL : public HTemplateInstruction<2> { public: static HAllocate* New(Zone* zone, HValue* context, @@ -5036,7 +5049,7 @@ class HAllocate: public HTemplateInstruction<2> { HValue* context() { return OperandAt(0); } HValue* size() { return OperandAt(1); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { if (index == 0) { return Representation::Tagged(); } else { @@ -5085,9 +5098,9 @@ class HAllocate: public HTemplateInstruction<2> { } virtual void HandleSideEffectDominator(GVNFlag side_effect, - HValue* dominator); + HValue* dominator) V8_OVERRIDE; - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(Allocate) @@ -5127,7 +5140,7 @@ class HAllocate: public HTemplateInstruction<2> { }; -class HInnerAllocatedObject: public HTemplateInstruction<1> { +class HInnerAllocatedObject V8_FINAL : public HTemplateInstruction<1> { public: static HInnerAllocatedObject* New(Zone* zone, HValue* context, @@ -5140,11 +5153,11 @@ class HInnerAllocatedObject: public HTemplateInstruction<1> { HValue* base_object() { return OperandAt(0); } int offset() { return offset_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject) @@ -5191,7 +5204,7 @@ inline bool ReceiverObjectNeedsWriteBarrier(HValue* object, } -class HStoreGlobalCell: public HUnaryOperation { +class HStoreGlobalCell V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P3(HStoreGlobalCell, HValue*, Handle, PropertyDetails); @@ -5204,10 +5217,10 @@ class HStoreGlobalCell: public HUnaryOperation { return StoringValueNeedsWriteBarrier(value()); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell) @@ -5226,7 +5239,7 @@ class HStoreGlobalCell: public HUnaryOperation { }; -class HStoreGlobalGeneric: public HTemplateInstruction<3> { +class HStoreGlobalGeneric : public HTemplateInstruction<3> { public: inline static HStoreGlobalGeneric* New(Zone* zone, HValue* context, @@ -5244,9 +5257,9 @@ class HStoreGlobalGeneric: public HTemplateInstruction<3> { HValue* value() { return OperandAt(2); } StrictModeFlag strict_mode_flag() { return strict_mode_flag_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -5272,7 +5285,7 @@ class HStoreGlobalGeneric: public HTemplateInstruction<3> { }; -class HLoadContextSlot: public HUnaryOperation { +class HLoadContextSlot V8_FINAL : public HUnaryOperation { public: enum Mode { // Perform a normal load of the context slot without checking its value. @@ -5317,29 +5330,29 @@ class HLoadContextSlot: public HUnaryOperation { return mode_ != kNoCheck; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { HLoadContextSlot* b = HLoadContextSlot::cast(other); return (slot_index() == b->slot_index()); } private: - virtual bool IsDeletable() const { return !RequiresHoleCheck(); } + virtual bool IsDeletable() const V8_OVERRIDE { return !RequiresHoleCheck(); } int slot_index_; Mode mode_; }; -class HStoreContextSlot: public HTemplateInstruction<2> { +class HStoreContextSlot V8_FINAL : public HTemplateInstruction<2> { public: enum Mode { // Perform a normal store to the context slot without checking its previous @@ -5374,11 +5387,11 @@ class HStoreContextSlot: public HTemplateInstruction<2> { return mode_ != kNoCheck; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot) @@ -5397,7 +5410,7 @@ class HStoreContextSlot: public HTemplateInstruction<2> { // Represents an access to a portion of an object, such as the map pointer, // array elements pointer, etc, but not accesses to array elements themselves. -class HObjectAccess { +class HObjectAccess V8_FINAL { public: inline bool IsInobject() const { return portion() != kBackingStore && portion() != kExternalMemory; @@ -5572,7 +5585,7 @@ class HObjectAccess { }; -class HLoadNamedField: public HTemplateInstruction<2> { +class HLoadNamedField V8_FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P2(HLoadNamedField, HValue*, HObjectAccess); DECLARE_INSTRUCTION_FACTORY_P3(HLoadNamedField, HValue*, HObjectAccess, @@ -5591,21 +5604,21 @@ class HLoadNamedField: public HTemplateInstruction<2> { return access_.representation(); } - virtual bool HasEscapingOperandAt(int index) { return false; } - virtual Representation RequiredInputRepresentation(int index) { + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { if (index == 0 && access().IsExternalMemory()) { // object must be external in case of external memory access return Representation::External(); } return Representation::Tagged(); } - virtual Range* InferRange(Zone* zone); - virtual void PrintDataTo(StringStream* stream); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(LoadNamedField) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { HLoadNamedField* b = HLoadNamedField::cast(other); return access_.Equals(b->access_); } @@ -5637,13 +5650,13 @@ class HLoadNamedField: public HTemplateInstruction<2> { access.SetGVNFlags(this, false); } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } HObjectAccess access_; }; -class HLoadNamedGeneric: public HTemplateInstruction<2> { +class HLoadNamedGeneric V8_FINAL : public HTemplateInstruction<2> { public: HLoadNamedGeneric(HValue* context, HValue* object, Handle name) : name_(name) { @@ -5657,11 +5670,11 @@ class HLoadNamedGeneric: public HTemplateInstruction<2> { HValue* object() { return OperandAt(1); } Handle name() const { return name_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) @@ -5670,7 +5683,7 @@ class HLoadNamedGeneric: public HTemplateInstruction<2> { }; -class HLoadFunctionPrototype: public HUnaryOperation { +class HLoadFunctionPrototype V8_FINAL : public HUnaryOperation { public: explicit HLoadFunctionPrototype(HValue* function) : HUnaryOperation(function) { @@ -5681,14 +5694,14 @@ class HLoadFunctionPrototype: public HUnaryOperation { HValue* function() { return OperandAt(0); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } }; class ArrayInstructionInterface { @@ -5713,7 +5726,7 @@ enum LoadKeyedHoleMode { }; -class HLoadKeyed +class HLoadKeyed V8_FINAL : public HTemplateInstruction<3>, public ArrayInstructionInterface { public: DECLARE_INSTRUCTION_FACTORY_P4(HLoadKeyed, HValue*, HValue*, HValue*, @@ -5748,7 +5761,7 @@ class HLoadKeyed return HoleModeField::decode(bit_field_); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { // kind_fast: tagged[int32] (none) // kind_double: tagged[int32] (none) // kind_external: external[int32] (none) @@ -5763,22 +5776,22 @@ class HLoadKeyed return Representation::None(); } - virtual Representation observed_input_representation(int index) { + virtual Representation observed_input_representation(int index) V8_OVERRIDE { return RequiredInputRepresentation(index); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; bool UsesMustHandleHole() const; bool AllUsesCanTreatHoleAsNaN() const; bool RequiresHoleCheck() const; - virtual Range* InferRange(Zone* zone); + virtual Range* InferRange(Zone* zone) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(LoadKeyed) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { if (!other->IsLoadKeyed()) return false; HLoadKeyed* other_load = HLoadKeyed::cast(other); @@ -5838,7 +5851,7 @@ class HLoadKeyed SetFlag(kUseGVN); } - virtual bool IsDeletable() const { + virtual bool IsDeletable() const V8_OVERRIDE { return !RequiresHoleCheck(); } @@ -5874,7 +5887,7 @@ class HLoadKeyed }; -class HLoadKeyedGeneric: public HTemplateInstruction<3> { +class HLoadKeyedGeneric V8_FINAL : public HTemplateInstruction<3> { public: HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key) { set_representation(Representation::Tagged()); @@ -5888,28 +5901,30 @@ class HLoadKeyedGeneric: public HTemplateInstruction<3> { HValue* key() { return OperandAt(1); } HValue* context() { return OperandAt(2); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { // tagged[tagged] return Representation::Tagged(); } - virtual HValue* Canonicalize(); + virtual HValue* Canonicalize() V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) }; -class HStoreNamedField: public HTemplateInstruction<3> { +class HStoreNamedField V8_FINAL : public HTemplateInstruction<3> { public: DECLARE_INSTRUCTION_FACTORY_P3(HStoreNamedField, HValue*, HObjectAccess, HValue*); DECLARE_CONCRETE_INSTRUCTION(StoreNamedField) - virtual bool HasEscapingOperandAt(int index) { return index == 1; } - virtual Representation RequiredInputRepresentation(int index) { + virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { + return index == 1; + } + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { if (index == 0 && access().IsExternalMemory()) { // object must be external in case of external memory access return Representation::External(); @@ -5922,11 +5937,11 @@ class HStoreNamedField: public HTemplateInstruction<3> { return Representation::Tagged(); } virtual void HandleSideEffectDominator(GVNFlag side_effect, - HValue* dominator) { + HValue* dominator) V8_OVERRIDE { ASSERT(side_effect == kChangesNewSpacePromotion); new_space_dominator_ = dominator; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; void SkipWriteBarrier() { write_barrier_mode_ = SKIP_WRITE_BARRIER; } bool IsSkipWriteBarrier() const { @@ -6001,7 +6016,7 @@ class HStoreNamedField: public HTemplateInstruction<3> { }; -class HStoreNamedGeneric: public HTemplateInstruction<3> { +class HStoreNamedGeneric V8_FINAL : public HTemplateInstruction<3> { public: HStoreNamedGeneric(HValue* context, HValue* object, @@ -6022,9 +6037,9 @@ class HStoreNamedGeneric: public HTemplateInstruction<3> { Handle name() { return name_; } StrictModeFlag strict_mode_flag() { return strict_mode_flag_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -6036,13 +6051,13 @@ class HStoreNamedGeneric: public HTemplateInstruction<3> { }; -class HStoreKeyed +class HStoreKeyed V8_FINAL : public HTemplateInstruction<3>, public ArrayInstructionInterface { public: DECLARE_INSTRUCTION_FACTORY_P4(HStoreKeyed, HValue*, HValue*, HValue*, ElementsKind); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { // kind_fast: tagged[int32] = tagged // kind_double: tagged[int32] = double // kind_smi : tagged[int32] = smi @@ -6072,7 +6087,7 @@ class HStoreKeyed return IsExternalArrayElementsKind(elements_kind()); } - virtual Representation observed_input_representation(int index) { + virtual Representation observed_input_representation(int index) V8_OVERRIDE { if (index < 2) return RequiredInputRepresentation(index); if (IsUninitialized()) { return Representation::None(); @@ -6113,7 +6128,7 @@ class HStoreKeyed } virtual void HandleSideEffectDominator(GVNFlag side_effect, - HValue* dominator) { + HValue* dominator) V8_OVERRIDE { ASSERT(side_effect == kChangesNewSpacePromotion); new_space_dominator_ = dominator; } @@ -6131,7 +6146,7 @@ class HStoreKeyed bool NeedsCanonicalization(); - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(StoreKeyed) @@ -6177,7 +6192,7 @@ class HStoreKeyed }; -class HStoreKeyedGeneric: public HTemplateInstruction<4> { +class HStoreKeyedGeneric V8_FINAL : public HTemplateInstruction<4> { public: HStoreKeyedGeneric(HValue* context, HValue* object, @@ -6198,12 +6213,12 @@ class HStoreKeyedGeneric: public HTemplateInstruction<4> { HValue* context() { return OperandAt(3); } StrictModeFlag strict_mode_flag() { return strict_mode_flag_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { // tagged[tagged] = tagged return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric) @@ -6212,7 +6227,7 @@ class HStoreKeyedGeneric: public HTemplateInstruction<4> { }; -class HTransitionElementsKind: public HTemplateInstruction<2> { +class HTransitionElementsKind V8_FINAL : public HTemplateInstruction<2> { public: inline static HTransitionElementsKind* New(Zone* zone, HValue* context, @@ -6223,7 +6238,7 @@ class HTransitionElementsKind: public HTemplateInstruction<2> { original_map, transitioned_map); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -6234,9 +6249,9 @@ class HTransitionElementsKind: public HTemplateInstruction<2> { ElementsKind from_kind() { return from_kind_; } ElementsKind to_kind() { return to_kind_; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual void FinalizeUniqueValueId() { + virtual void FinalizeUniqueValueId() V8_OVERRIDE { original_map_unique_id_ = UniqueValueId(original_map_); transitioned_map_unique_id_ = UniqueValueId(transitioned_map_); } @@ -6244,7 +6259,7 @@ class HTransitionElementsKind: public HTemplateInstruction<2> { DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { HTransitionElementsKind* instr = HTransitionElementsKind::cast(other); return original_map_unique_id_ == instr->original_map_unique_id_ && transitioned_map_unique_id_ == instr->transitioned_map_unique_id_; @@ -6281,7 +6296,7 @@ class HTransitionElementsKind: public HTemplateInstruction<2> { }; -class HStringAdd: public HBinaryOperation { +class HStringAdd V8_FINAL : public HBinaryOperation { public: static HInstruction* New(Zone* zone, HValue* context, @@ -6291,14 +6306,14 @@ class HStringAdd: public HBinaryOperation { StringAddFlags flags() const { return flags_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(StringAdd) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } private: HStringAdd(HValue* context, HValue* left, HValue* right, StringAddFlags flags) @@ -6311,13 +6326,13 @@ class HStringAdd: public HBinaryOperation { // No side-effects except possible allocation. // NOTE: this instruction _does not_ call ToString() on its inputs. - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } const StringAddFlags flags_; }; -class HStringCharCodeAt: public HTemplateInstruction<3> { +class HStringCharCodeAt V8_FINAL : public HTemplateInstruction<3> { public: static HStringCharCodeAt* New(Zone* zone, HValue* context, @@ -6340,9 +6355,9 @@ class HStringCharCodeAt: public HTemplateInstruction<3> { DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt) protected: - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } - virtual Range* InferRange(Zone* zone) { + virtual Range* InferRange(Zone* zone) V8_OVERRIDE { return new(zone) Range(0, String::kMaxUtf16CodeUnit); } @@ -6358,17 +6373,17 @@ class HStringCharCodeAt: public HTemplateInstruction<3> { } // No side effects: runtime function assumes string + number inputs. - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HStringCharFromCode: public HTemplateInstruction<2> { +class HStringCharFromCode V8_FINAL : public HTemplateInstruction<2> { public: static HInstruction* New(Zone* zone, HValue* context, HValue* char_code); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return index == 0 ? Representation::Tagged() : Representation::Integer32(); @@ -6377,7 +6392,7 @@ class HStringCharFromCode: public HTemplateInstruction<2> { HValue* context() const { return OperandAt(0); } HValue* value() const { return OperandAt(1); } - virtual bool DataEquals(HValue* other) { return true; } + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode) @@ -6391,14 +6406,14 @@ class HStringCharFromCode: public HTemplateInstruction<2> { SetGVNFlag(kChangesNewSpacePromotion); } - virtual bool IsDeletable() const { + virtual bool IsDeletable() const V8_OVERRIDE { return !value()->ToNumberCanBeObserved(); } }; template -class HMaterializedLiteral: public HTemplateInstruction { +class HMaterializedLiteral : public HTemplateInstruction { public: HMaterializedLiteral(int index, int depth, AllocationSiteMode mode) : literal_index_(index), depth_(depth), allocation_site_mode_(mode) { @@ -6418,7 +6433,7 @@ class HMaterializedLiteral: public HTemplateInstruction { } private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_FINAL V8_OVERRIDE { return true; } int literal_index_; int depth_; @@ -6426,7 +6441,7 @@ class HMaterializedLiteral: public HTemplateInstruction { }; -class HRegExpLiteral: public HMaterializedLiteral<1> { +class HRegExpLiteral V8_FINAL : public HMaterializedLiteral<1> { public: HRegExpLiteral(HValue* context, Handle literals, @@ -6447,7 +6462,7 @@ class HRegExpLiteral: public HMaterializedLiteral<1> { Handle pattern() { return pattern_; } Handle flags() { return flags_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -6460,7 +6475,7 @@ class HRegExpLiteral: public HMaterializedLiteral<1> { }; -class HFunctionLiteral: public HTemplateInstruction<1> { +class HFunctionLiteral V8_FINAL : public HTemplateInstruction<1> { public: HFunctionLiteral(HValue* context, Handle shared, @@ -6478,7 +6493,7 @@ class HFunctionLiteral: public HTemplateInstruction<1> { HValue* context() { return OperandAt(0); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -6491,7 +6506,7 @@ class HFunctionLiteral: public HTemplateInstruction<1> { LanguageMode language_mode() const { return language_mode_; } private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } Handle shared_info_; bool pretenure_ : 1; @@ -6501,7 +6516,7 @@ class HFunctionLiteral: public HTemplateInstruction<1> { }; -class HTypeof: public HTemplateInstruction<2> { +class HTypeof V8_FINAL : public HTemplateInstruction<2> { public: explicit HTypeof(HValue* context, HValue* value) { SetOperandAt(0, context); @@ -6512,24 +6527,24 @@ class HTypeof: public HTemplateInstruction<2> { HValue* context() { return OperandAt(0); } HValue* value() { return OperandAt(1); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(Typeof) private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HTrapAllocationMemento : public HTemplateInstruction<1> { +class HTrapAllocationMemento V8_FINAL : public HTemplateInstruction<1> { public: DECLARE_INSTRUCTION_FACTORY_P1(HTrapAllocationMemento, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -6544,11 +6559,11 @@ class HTrapAllocationMemento : public HTemplateInstruction<1> { }; -class HToFastProperties: public HUnaryOperation { +class HToFastProperties V8_FINAL : public HUnaryOperation { public: DECLARE_INSTRUCTION_FACTORY_P1(HToFastProperties, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -6570,28 +6585,28 @@ class HToFastProperties: public HUnaryOperation { #endif } - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HValueOf: public HUnaryOperation { +class HValueOf V8_FINAL : public HUnaryOperation { public: explicit HValueOf(HValue* value) : HUnaryOperation(value) { set_representation(Representation::Tagged()); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(ValueOf) private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; -class HDateField: public HUnaryOperation { +class HDateField V8_FINAL : public HUnaryOperation { public: HDateField(HValue* date, Smi* index) : HUnaryOperation(date), index_(index) { @@ -6600,7 +6615,7 @@ class HDateField: public HUnaryOperation { Smi* index() const { return index_; } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -6611,7 +6626,7 @@ class HDateField: public HUnaryOperation { }; -class HSeqStringSetChar: public HTemplateInstruction<3> { +class HSeqStringSetChar V8_FINAL : public HTemplateInstruction<3> { public: HSeqStringSetChar(String::Encoding encoding, HValue* string, @@ -6628,7 +6643,7 @@ class HSeqStringSetChar: public HTemplateInstruction<3> { HValue* index() { return OperandAt(1); } HValue* value() { return OperandAt(2); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return (index == 0) ? Representation::Tagged() : Representation::Integer32(); } @@ -6640,17 +6655,17 @@ class HSeqStringSetChar: public HTemplateInstruction<3> { }; -class HCheckMapValue: public HTemplateInstruction<2> { +class HCheckMapValue V8_FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P2(HCheckMapValue, HValue*, HValue*); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual HType CalculateInferredType() { + virtual HType CalculateInferredType() V8_OVERRIDE { return HType::Tagged(); } @@ -6660,7 +6675,7 @@ class HCheckMapValue: public HTemplateInstruction<2> { DECLARE_CONCRETE_INSTRUCTION(CheckMapValue) protected: - virtual bool DataEquals(HValue* other) { + virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } @@ -6677,7 +6692,7 @@ class HCheckMapValue: public HTemplateInstruction<2> { }; -class HForInPrepareMap : public HTemplateInstruction<2> { +class HForInPrepareMap V8_FINAL : public HTemplateInstruction<2> { public: static HForInPrepareMap* New(Zone* zone, HValue* context, @@ -6685,16 +6700,16 @@ class HForInPrepareMap : public HTemplateInstruction<2> { return new(zone) HForInPrepareMap(context, object); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } HValue* context() { return OperandAt(0); } HValue* enumerable() { return OperandAt(1); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual HType CalculateInferredType() { + virtual HType CalculateInferredType() V8_OVERRIDE { return HType::Tagged(); } @@ -6711,11 +6726,11 @@ class HForInPrepareMap : public HTemplateInstruction<2> { }; -class HForInCacheArray : public HTemplateInstruction<2> { +class HForInCacheArray V8_FINAL : public HTemplateInstruction<2> { public: DECLARE_INSTRUCTION_FACTORY_P3(HForInCacheArray, HValue*, HValue*, int); - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } @@ -6731,9 +6746,9 @@ class HForInCacheArray : public HTemplateInstruction<2> { index_cache_ = index_cache; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual HType CalculateInferredType() { + virtual HType CalculateInferredType() V8_OVERRIDE { return HType::Tagged(); } @@ -6753,7 +6768,7 @@ class HForInCacheArray : public HTemplateInstruction<2> { }; -class HLoadFieldByIndex : public HTemplateInstruction<2> { +class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> { public: HLoadFieldByIndex(HValue* object, HValue* index) { @@ -6762,23 +6777,23 @@ class HLoadFieldByIndex : public HTemplateInstruction<2> { set_representation(Representation::Tagged()); } - virtual Representation RequiredInputRepresentation(int index) { + virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { return Representation::Tagged(); } HValue* object() { return OperandAt(0); } HValue* index() { return OperandAt(1); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; - virtual HType CalculateInferredType() { + virtual HType CalculateInferredType() V8_OVERRIDE { return HType::Tagged(); } DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); private: - virtual bool IsDeletable() const { return true; } + virtual bool IsDeletable() const V8_OVERRIDE { return true; } }; diff --git a/src/hydrogen.cc b/src/hydrogen.cc index ba1de7aa22..9abca53821 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -7279,7 +7279,7 @@ void HOptimizedGraphBuilder::VisitCallNew(CallNew* expr) { CHECK_ALIVE(VisitArgument(expr->expression())); HValue* constructor = HPushArgument::cast(Top())->argument(); CHECK_ALIVE(VisitArgumentList(expr->arguments())); - HCallNew* call; + HBinaryCall* call; if (expr->target().is_identical_to(array_function)) { Handle cell = expr->allocation_info_cell(); Add(constructor, array_function); diff --git a/src/hydrogen.h b/src/hydrogen.h index 004aa16a87..af31b60a5b 100644 --- a/src/hydrogen.h +++ b/src/hydrogen.h @@ -53,10 +53,10 @@ class LChunk; class LiveRange; -class HBasicBlock: public ZoneObject { +class HBasicBlock V8_FINAL : public ZoneObject { public: explicit HBasicBlock(HGraph* graph); - virtual ~HBasicBlock() { } + ~HBasicBlock() { } // Simple accessors. int block_id() const { return block_id_; } @@ -220,7 +220,7 @@ class HBasicBlock: public ZoneObject { }; -class HPredecessorIterator BASE_EMBEDDED { +class HPredecessorIterator V8_FINAL BASE_EMBEDDED { public: explicit HPredecessorIterator(HBasicBlock* block) : predecessor_list_(block->predecessors()), current_(0) { } @@ -235,7 +235,7 @@ class HPredecessorIterator BASE_EMBEDDED { }; -class HInstructionIterator BASE_EMBEDDED { +class HInstructionIterator V8_FINAL BASE_EMBEDDED { public: explicit HInstructionIterator(HBasicBlock* block) : instr_(block->first()) { @@ -255,7 +255,7 @@ class HInstructionIterator BASE_EMBEDDED { }; -class HLoopInformation: public ZoneObject { +class HLoopInformation V8_FINAL : public ZoneObject { public: HLoopInformation(HBasicBlock* loop_header, Zone* zone) : back_edges_(4, zone), @@ -264,7 +264,7 @@ class HLoopInformation: public ZoneObject { stack_check_(NULL) { blocks_.Add(loop_header, zone); } - virtual ~HLoopInformation() {} + ~HLoopInformation() {} const ZoneList* back_edges() const { return &back_edges_; } const ZoneList* blocks() const { return &blocks_; } @@ -303,7 +303,7 @@ class HLoopInformation: public ZoneObject { class BoundsCheckTable; class InductionVariableBlocksTable; -class HGraph: public ZoneObject { +class HGraph V8_FINAL : public ZoneObject { public: explicit HGraph(CompilationInfo* info); @@ -523,7 +523,7 @@ enum FrameType { }; -class HEnvironment: public ZoneObject { +class HEnvironment V8_FINAL : public ZoneObject { public: HEnvironment(HEnvironment* outer, Scope* scope, @@ -793,33 +793,37 @@ class AstContext { }; -class EffectContext: public AstContext { +class EffectContext V8_FINAL : public AstContext { public: explicit EffectContext(HOptimizedGraphBuilder* owner) : AstContext(owner, Expression::kEffect) { } virtual ~EffectContext(); - virtual void ReturnValue(HValue* value); - virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); - virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); + virtual void ReturnValue(HValue* value) V8_OVERRIDE; + virtual void ReturnInstruction(HInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; + virtual void ReturnControl(HControlInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; virtual void ReturnContinuation(HIfContinuation* continuation, - BailoutId ast_id); + BailoutId ast_id) V8_OVERRIDE; }; -class ValueContext: public AstContext { +class ValueContext V8_FINAL : public AstContext { public: ValueContext(HOptimizedGraphBuilder* owner, ArgumentsAllowedFlag flag) : AstContext(owner, Expression::kValue), flag_(flag) { } virtual ~ValueContext(); - virtual void ReturnValue(HValue* value); - virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); - virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); + virtual void ReturnValue(HValue* value) V8_OVERRIDE; + virtual void ReturnInstruction(HInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; + virtual void ReturnControl(HControlInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; virtual void ReturnContinuation(HIfContinuation* continuation, - BailoutId ast_id); + BailoutId ast_id) V8_OVERRIDE; bool arguments_allowed() { return flag_ == ARGUMENTS_ALLOWED; } @@ -828,7 +832,7 @@ class ValueContext: public AstContext { }; -class TestContext: public AstContext { +class TestContext V8_FINAL : public AstContext { public: TestContext(HOptimizedGraphBuilder* owner, Expression* condition, @@ -840,11 +844,13 @@ class TestContext: public AstContext { if_false_(if_false) { } - virtual void ReturnValue(HValue* value); - virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); - virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); + virtual void ReturnValue(HValue* value) V8_OVERRIDE; + virtual void ReturnInstruction(HInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; + virtual void ReturnControl(HControlInstruction* instr, + BailoutId ast_id) V8_OVERRIDE; virtual void ReturnContinuation(HIfContinuation* continuation, - BailoutId ast_id); + BailoutId ast_id) V8_OVERRIDE; static TestContext* cast(AstContext* context) { ASSERT(context->IsTest()); @@ -866,7 +872,7 @@ class TestContext: public AstContext { }; -class FunctionState { +class FunctionState V8_FINAL { public: FunctionState(HOptimizedGraphBuilder* owner, CompilationInfo* info, @@ -933,7 +939,7 @@ class FunctionState { }; -class HIfContinuation { +class HIfContinuation V8_FINAL { public: HIfContinuation() { continuation_captured_ = false; } ~HIfContinuation() { ASSERT(!continuation_captured_); } @@ -1272,7 +1278,7 @@ class HGraphBuilder { void AddIncrementCounter(StatsCounter* counter, HValue* context); - class IfBuilder { + class IfBuilder V8_FINAL { public: explicit IfBuilder(HGraphBuilder* builder, int position = RelocInfo::kNoPosition); @@ -1402,7 +1408,7 @@ class HGraphBuilder { HBasicBlock* merge_block_; }; - class LoopBuilder { + class LoopBuilder V8_FINAL { public: enum Direction { kPreIncrement, @@ -1443,7 +1449,7 @@ class HGraphBuilder { void BuildNewSpaceArrayCheck(HValue* length, ElementsKind kind); - class JSArrayBuilder { + class JSArrayBuilder V8_FINAL { public: JSArrayBuilder(HGraphBuilder* builder, ElementsKind kind, @@ -1642,12 +1648,13 @@ inline HInstruction* HGraphBuilder::NewUncasted() { } -class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { +class HOptimizedGraphBuilder V8_FINAL + : public HGraphBuilder, public AstVisitor { public: // A class encapsulating (lazily-allocated) break and continue blocks for // a breakable statement. Separated from BreakAndContinueScope so that it // can have a separate lifetime. - class BreakAndContinueInfo BASE_EMBEDDED { + class BreakAndContinueInfo V8_FINAL BASE_EMBEDDED { public: explicit BreakAndContinueInfo(BreakableStatement* target, int drop_extra = 0) @@ -1673,7 +1680,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { // A helper class to maintain a stack of current BreakAndContinueInfo // structures mirroring BreakableStatement nesting. - class BreakAndContinueScope BASE_EMBEDDED { + class BreakAndContinueScope V8_FINAL BASE_EMBEDDED { public: BreakAndContinueScope(BreakAndContinueInfo* info, HOptimizedGraphBuilder* owner) @@ -1699,7 +1706,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { explicit HOptimizedGraphBuilder(CompilationInfo* info); - virtual bool BuildGraph(); + virtual bool BuildGraph() V8_OVERRIDE; // Simple accessors. BreakAndContinueScope* break_scope() const { return break_scope_; } @@ -1885,9 +1892,9 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { template HInstruction* PreProcessCall(Instruction* call); void SetUpScope(Scope* scope); - virtual void VisitStatements(ZoneList* statements); + virtual void VisitStatements(ZoneList* statements) V8_OVERRIDE; -#define DECLARE_VISIT(type) virtual void Visit##type(type* node); +#define DECLARE_VISIT(type) virtual void Visit##type(type* node) V8_OVERRIDE; AST_NODE_LIST(DECLARE_VISIT) #undef DECLARE_VISIT @@ -2166,7 +2173,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { Zone* AstContext::zone() const { return owner_->zone(); } -class HStatistics: public Malloced { +class HStatistics V8_FINAL: public Malloced { public: HStatistics() : timing_(5), @@ -2225,7 +2232,7 @@ class HPhase : public CompilationPhase { }; -class HTracer: public Malloced { +class HTracer V8_FINAL : public Malloced { public: explicit HTracer(int isolate_id) : trace_(&string_allocator_), indent_(0) { @@ -2246,7 +2253,7 @@ class HTracer: public Malloced { void TraceLiveRanges(const char* name, LAllocator* allocator); private: - class Tag BASE_EMBEDDED { + class Tag V8_FINAL BASE_EMBEDDED { public: Tag(HTracer* tracer, const char* name) { name_ = name; @@ -2311,7 +2318,7 @@ class HTracer: public Malloced { }; -class NoObservableSideEffectsScope { +class NoObservableSideEffectsScope V8_FINAL { public: explicit NoObservableSideEffectsScope(HGraphBuilder* builder) : builder_(builder) { diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index 19c553bfa5..6dc0171b00 100644 --- a/src/ia32/lithium-codegen-ia32.cc +++ b/src/ia32/lithium-codegen-ia32.cc @@ -48,7 +48,7 @@ static SaveFPRegsMode GetSaveFPRegsMode() { // When invoking builtins, we need to record the safepoint in the middle of // the invoke instruction sequence generated by the macro assembler. -class SafepointGenerator : public CallWrapper { +class SafepointGenerator V8_FINAL : public CallWrapper { public: SafepointGenerator(LCodeGen* codegen, LPointerMap* pointers, @@ -56,11 +56,11 @@ class SafepointGenerator : public CallWrapper { : codegen_(codegen), pointers_(pointers), deopt_mode_(mode) {} - virtual ~SafepointGenerator() { } + virtual ~SafepointGenerator() {} - virtual void BeforeCall(int call_size) const {} + virtual void BeforeCall(int call_size) const V8_OVERRIDE {} - virtual void AfterCall() const { + virtual void AfterCall() const V8_OVERRIDE { codegen_->RecordSafepoint(pointers_, deopt_mode_); } @@ -2816,15 +2816,15 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) { void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { - class DeferredInstanceOfKnownGlobal: public LDeferredCode { + class DeferredInstanceOfKnownGlobal V8_FINAL : public LDeferredCode { public: DeferredInstanceOfKnownGlobal(LCodeGen* codegen, LInstanceOfKnownGlobal* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } Label* map_check() { return &map_check_; } private: LInstanceOfKnownGlobal* instr_; @@ -3784,14 +3784,14 @@ void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) { void LCodeGen::DoMathAbs(LMathAbs* instr) { // Class for deferred case. - class DeferredMathAbsTaggedHeapNumber: public LDeferredCode { + class DeferredMathAbsTaggedHeapNumber V8_FINAL : public LDeferredCode { public: DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LMathAbs* instr_; }; @@ -4024,12 +4024,12 @@ void LCodeGen::DoPower(LPower* instr) { void LCodeGen::DoRandom(LRandom* instr) { - class DeferredDoRandom: public LDeferredCode { + class DeferredDoRandom V8_FINAL : public LDeferredCode { public: DeferredDoRandom(LCodeGen* codegen, LRandom* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredRandom(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredRandom(instr_); } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LRandom* instr_; }; @@ -4759,12 +4759,14 @@ void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { - class DeferredStringCharCodeAt: public LDeferredCode { + class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { public: DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStringCharCodeAt(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStringCharCodeAt* instr_; }; @@ -4814,12 +4816,14 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) { void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { - class DeferredStringCharFromCode: public LDeferredCode { + class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { public: DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStringCharFromCode(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStringCharFromCode(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStringCharFromCode* instr_; }; @@ -4906,14 +4910,14 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { void LCodeGen::DoNumberTagI(LNumberTagI* instr) { - class DeferredNumberTagI: public LDeferredCode { + class DeferredNumberTagI V8_FINAL : public LDeferredCode { public: DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredNumberTagI(instr_, instr_->value(), SIGNED_INT32); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagI* instr_; }; @@ -4930,14 +4934,14 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) { void LCodeGen::DoNumberTagU(LNumberTagU* instr) { - class DeferredNumberTagU: public LDeferredCode { + class DeferredNumberTagU V8_FINAL : public LDeferredCode { public: DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredNumberTagI(instr_, instr_->value(), UNSIGNED_INT32); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagU* instr_; }; @@ -5033,12 +5037,14 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr, void LCodeGen::DoNumberTagD(LNumberTagD* instr) { - class DeferredNumberTagD: public LDeferredCode { + class DeferredNumberTagD V8_FINAL : public LDeferredCode { public: DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredNumberTagD(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagD* instr_; }; @@ -5332,12 +5338,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) { void LCodeGen::DoTaggedToI(LTaggedToI* instr) { - class DeferredTaggedToI: public LDeferredCode { + class DeferredTaggedToI V8_FINAL : public LDeferredCode { public: DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredTaggedToI(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredTaggedToI(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LTaggedToI* instr_; }; @@ -5491,12 +5499,14 @@ void LCodeGen::DoDeferredTaggedToINoSSE2(LTaggedToINoSSE2* instr) { void LCodeGen::DoTaggedToINoSSE2(LTaggedToINoSSE2* instr) { - class DeferredTaggedToINoSSE2: public LDeferredCode { + class DeferredTaggedToINoSSE2 V8_FINAL : public LDeferredCode { public: DeferredTaggedToINoSSE2(LCodeGen* codegen, LTaggedToINoSSE2* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredTaggedToINoSSE2(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredTaggedToINoSSE2(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LTaggedToINoSSE2* instr_; }; @@ -5728,17 +5738,17 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { void LCodeGen::DoCheckMaps(LCheckMaps* instr) { - class DeferredCheckMaps: public LDeferredCode { + class DeferredCheckMaps V8_FINAL : public LDeferredCode { public: DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) : LDeferredCode(codegen), instr_(instr), object_(object) { SetExit(check_maps()); } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredInstanceMigration(instr_, object_); } Label* check_maps() { return &check_maps_; } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LCheckMaps* instr_; Label check_maps_; @@ -5951,12 +5961,14 @@ void LCodeGen::DoClampTToUint8NoSSE2(LClampTToUint8NoSSE2* instr) { void LCodeGen::DoAllocate(LAllocate* instr) { - class DeferredAllocate: public LDeferredCode { + class DeferredAllocate V8_FINAL : public LDeferredCode { public: DeferredAllocate(LCodeGen* codegen, LAllocate* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredAllocate(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LAllocate* instr_; }; @@ -6300,12 +6312,14 @@ void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { void LCodeGen::DoStackCheck(LStackCheck* instr) { - class DeferredStackCheck: public LDeferredCode { + class DeferredStackCheck V8_FINAL : public LDeferredCode { public: DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStackCheck(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStackCheck(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStackCheck* instr_; }; diff --git a/src/ia32/lithium-codegen-ia32.h b/src/ia32/lithium-codegen-ia32.h index aa8f6c248a..e498f5363e 100644 --- a/src/ia32/lithium-codegen-ia32.h +++ b/src/ia32/lithium-codegen-ia32.h @@ -45,7 +45,7 @@ class LDeferredCode; class LGapNode; class SafepointGenerator; -class LCodeGen BASE_EMBEDDED { +class LCodeGen V8_FINAL BASE_EMBEDDED { public: LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) : zone_(info->zone()), @@ -452,7 +452,7 @@ class LCodeGen BASE_EMBEDDED { int old_position_; - class PushSafepointRegistersScope BASE_EMBEDDED { + class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { public: explicit PushSafepointRegistersScope(LCodeGen* codegen) : codegen_(codegen) { @@ -479,7 +479,7 @@ class LCodeGen BASE_EMBEDDED { }; -class LDeferredCode: public ZoneObject { +class LDeferredCode : public ZoneObject { public: explicit LDeferredCode(LCodeGen* codegen) : codegen_(codegen), @@ -488,7 +488,7 @@ class LDeferredCode: public ZoneObject { codegen->AddDeferredCode(this); } - virtual ~LDeferredCode() { } + virtual ~LDeferredCode() {} virtual void Generate() = 0; virtual LInstruction* instr() = 0; diff --git a/src/ia32/lithium-gap-resolver-ia32.h b/src/ia32/lithium-gap-resolver-ia32.h index 3a58f585c3..4aff241f43 100644 --- a/src/ia32/lithium-gap-resolver-ia32.h +++ b/src/ia32/lithium-gap-resolver-ia32.h @@ -38,7 +38,7 @@ namespace internal { class LCodeGen; class LGapResolver; -class LGapResolver BASE_EMBEDDED { +class LGapResolver V8_FINAL BASE_EMBEDDED { public: explicit LGapResolver(LCodeGen* owner); diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h index 7ae87a08c8..f35c7776b2 100644 --- a/src/ia32/lithium-ia32.h +++ b/src/ia32/lithium-ia32.h @@ -188,13 +188,17 @@ class LCodeGen; V(WrapReceiver) -#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ - virtual Opcode opcode() const { return LInstruction::k##type; } \ - virtual void CompileToNative(LCodeGen* generator); \ - virtual const char* Mnemonic() const { return mnemonic; } \ - static L##type* cast(LInstruction* instr) { \ - ASSERT(instr->Is##type()); \ - return reinterpret_cast(instr); \ +#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ + virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ + return LInstruction::k##type; \ + } \ + virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ + virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ + return mnemonic; \ + } \ + static L##type* cast(LInstruction* instr) { \ + ASSERT(instr->Is##type()); \ + return reinterpret_cast(instr); \ } @@ -204,7 +208,7 @@ class LCodeGen; } -class LInstruction: public ZoneObject { +class LInstruction : public ZoneObject { public: LInstruction() : environment_(NULL), @@ -213,7 +217,7 @@ class LInstruction: public ZoneObject { set_position(RelocInfo::kNoPosition); } - virtual ~LInstruction() { } + virtual ~LInstruction() {} virtual void CompileToNative(LCodeGen* generator) = 0; virtual const char* Mnemonic() const = 0; @@ -319,11 +323,13 @@ class LInstruction: public ZoneObject { // I = number of input operands. // T = number of temporary operands. template -class LTemplateInstruction: public LInstruction { +class LTemplateInstruction : public LInstruction { public: // Allow 0 or 1 output operands. STATIC_ASSERT(R == 0 || R == 1); - virtual bool HasResult() const { return R != 0 && result() != NULL; } + virtual bool HasResult() const V8_FINAL V8_OVERRIDE { + return R != 0 && result() != NULL; + } void set_result(LOperand* operand) { results_[0] = operand; } LOperand* result() const { return results_[0]; } @@ -334,15 +340,15 @@ class LTemplateInstruction: public LInstruction { private: // Iterator support. - virtual int InputCount() { return I; } - virtual LOperand* InputAt(int i) { return inputs_[i]; } + virtual int InputCount() V8_FINAL V8_OVERRIDE { return I; } + virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; } - virtual int TempCount() { return T; } - virtual LOperand* TempAt(int i) { return temps_[i]; } + virtual int TempCount() V8_FINAL V8_OVERRIDE { return T; } + virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return temps_[i]; } }; -class LGap: public LTemplateInstruction<0, 0, 0> { +class LGap : public LTemplateInstruction<0, 0, 0> { public: explicit LGap(HBasicBlock* block) : block_(block) { parallel_moves_[BEFORE] = NULL; @@ -352,8 +358,8 @@ class LGap: public LTemplateInstruction<0, 0, 0> { } // Can't use the DECLARE-macro here because of sub-classes. - virtual bool IsGap() const { return true; } - virtual void PrintDataTo(StringStream* stream); + virtual bool IsGap() const V8_FINAL V8_OVERRIDE { return true; } + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; static LGap* cast(LInstruction* instr) { ASSERT(instr->IsGap()); return reinterpret_cast(instr); @@ -389,11 +395,11 @@ class LGap: public LTemplateInstruction<0, 0, 0> { }; -class LInstructionGap: public LGap { +class LInstructionGap V8_FINAL : public LGap { public: explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } - virtual bool HasInterestingComment(LCodeGen* gen) const { + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { return !IsRedundant(); } @@ -401,14 +407,14 @@ class LInstructionGap: public LGap { }; -class LGoto: public LTemplateInstruction<0, 0, 0> { +class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: explicit LGoto(int block_id) : block_id_(block_id) { } - virtual bool HasInterestingComment(LCodeGen* gen) const; + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") - virtual void PrintDataTo(StringStream* stream); - virtual bool IsControl() const { return true; } + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; + virtual bool IsControl() const V8_OVERRIDE { return true; } int block_id() const { return block_id_; } @@ -417,13 +423,13 @@ class LGoto: public LTemplateInstruction<0, 0, 0> { }; -class LLazyBailout: public LTemplateInstruction<0, 0, 0> { +class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") }; -class LDummyUse: public LTemplateInstruction<1, 1, 0> { +class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LDummyUse(LOperand* value) { inputs_[0] = value; @@ -432,22 +438,24 @@ class LDummyUse: public LTemplateInstruction<1, 1, 0> { }; -class LDeoptimize: public LTemplateInstruction<0, 0, 0> { +class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") DECLARE_HYDROGEN_ACCESSOR(Deoptimize) }; -class LLabel: public LGap { +class LLabel V8_FINAL : public LGap { public: explicit LLabel(HBasicBlock* block) : LGap(block), replacement_(NULL) { } - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(Label, "label") - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int block_id() const { return block()->block_id(); } bool is_loop_header() const { return block()->IsLoopHeader(); } @@ -463,14 +471,16 @@ class LLabel: public LGap { }; -class LParameter: public LTemplateInstruction<1, 0, 0> { +class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") }; -class LCallStub: public LTemplateInstruction<1, 1, 0> { +class LCallStub V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallStub(LOperand* context) { inputs_[0] = context; @@ -487,9 +497,11 @@ class LCallStub: public LTemplateInstruction<1, 1, 0> { }; -class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { +class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") }; @@ -499,7 +511,7 @@ class LControlInstruction: public LTemplateInstruction<0, I, T> { public: LControlInstruction() : false_label_(NULL), true_label_(NULL) { } - virtual bool IsControl() const { return true; } + virtual bool IsControl() const V8_FINAL V8_OVERRIDE { return true; } int SuccessorCount() { return hydrogen()->SuccessorCount(); } HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } @@ -538,7 +550,7 @@ class LControlInstruction: public LTemplateInstruction<0, I, T> { }; -class LWrapReceiver: public LTemplateInstruction<1, 2, 1> { +class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LWrapReceiver(LOperand* receiver, LOperand* function, @@ -556,7 +568,7 @@ class LWrapReceiver: public LTemplateInstruction<1, 2, 1> { }; -class LApplyArguments: public LTemplateInstruction<1, 4, 0> { +class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { public: LApplyArguments(LOperand* function, LOperand* receiver, @@ -577,7 +589,7 @@ class LApplyArguments: public LTemplateInstruction<1, 4, 0> { }; -class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { +class LAccessArgumentsAt V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LAccessArgumentsAt(LOperand* arguments, LOperand* length, LOperand* index) { inputs_[0] = arguments; @@ -591,11 +603,11 @@ class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { +class LArgumentsLength V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LArgumentsLength(LOperand* elements) { inputs_[0] = elements; @@ -607,20 +619,20 @@ class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { }; -class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { +class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) }; -class LDebugBreak: public LTemplateInstruction<0, 0, 0> { +class LDebugBreak V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") }; -class LModI: public LTemplateInstruction<1, 2, 1> { +class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LModI(LOperand* left, LOperand* right, LOperand* temp) { inputs_[0] = left; @@ -637,7 +649,7 @@ class LModI: public LTemplateInstruction<1, 2, 1> { }; -class LDivI: public LTemplateInstruction<1, 2, 1> { +class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LDivI(LOperand* left, LOperand* right, LOperand* temp) { inputs_[0] = left; @@ -655,7 +667,7 @@ class LDivI: public LTemplateInstruction<1, 2, 1> { }; -class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { +class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LMathFloorOfDiv(LOperand* left, LOperand* right, @@ -674,7 +686,7 @@ class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { }; -class LMulI: public LTemplateInstruction<1, 2, 1> { +class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LMulI(LOperand* left, LOperand* right, LOperand* temp) { inputs_[0] = left; @@ -691,7 +703,7 @@ class LMulI: public LTemplateInstruction<1, 2, 1> { }; -class LCompareNumericAndBranch: public LControlInstruction<2, 0> { +class LCompareNumericAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LCompareNumericAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -714,7 +726,7 @@ class LCompareNumericAndBranch: public LControlInstruction<2, 0> { }; -class LMathFloor: public LTemplateInstruction<1, 1, 0> { +class LMathFloor V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathFloor(LOperand* value) { inputs_[0] = value; @@ -727,7 +739,7 @@ class LMathFloor: public LTemplateInstruction<1, 1, 0> { }; -class LMathRound: public LTemplateInstruction<1, 2, 1> { +class LMathRound V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LMathRound(LOperand* context, LOperand* value, LOperand* temp) { inputs_[1] = context; @@ -744,7 +756,7 @@ class LMathRound: public LTemplateInstruction<1, 2, 1> { }; -class LMathAbs: public LTemplateInstruction<1, 2, 0> { +class LMathAbs V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LMathAbs(LOperand* context, LOperand* value) { inputs_[1] = context; @@ -759,7 +771,7 @@ class LMathAbs: public LTemplateInstruction<1, 2, 0> { }; -class LMathLog: public LTemplateInstruction<1, 1, 0> { +class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathLog(LOperand* value) { inputs_[0] = value; @@ -771,7 +783,7 @@ class LMathLog: public LTemplateInstruction<1, 1, 0> { }; -class LMathSin: public LTemplateInstruction<1, 1, 0> { +class LMathSin V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathSin(LOperand* value) { inputs_[0] = value; @@ -783,7 +795,7 @@ class LMathSin: public LTemplateInstruction<1, 1, 0> { }; -class LMathCos: public LTemplateInstruction<1, 1, 0> { +class LMathCos V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathCos(LOperand* value) { inputs_[0] = value; @@ -795,7 +807,7 @@ class LMathCos: public LTemplateInstruction<1, 1, 0> { }; -class LMathTan: public LTemplateInstruction<1, 1, 0> { +class LMathTan V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathTan(LOperand* value) { inputs_[0] = value; @@ -807,7 +819,7 @@ class LMathTan: public LTemplateInstruction<1, 1, 0> { }; -class LMathExp: public LTemplateInstruction<1, 1, 2> { +class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 2> { public: LMathExp(LOperand* value, LOperand* temp1, @@ -826,7 +838,7 @@ class LMathExp: public LTemplateInstruction<1, 1, 2> { }; -class LMathSqrt: public LTemplateInstruction<1, 1, 0> { +class LMathSqrt V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathSqrt(LOperand* value) { inputs_[0] = value; @@ -838,7 +850,7 @@ class LMathSqrt: public LTemplateInstruction<1, 1, 0> { }; -class LMathPowHalf: public LTemplateInstruction<1, 2, 1> { +class LMathPowHalf V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LMathPowHalf(LOperand* context, LOperand* value, LOperand* temp) { inputs_[1] = context; @@ -854,7 +866,7 @@ class LMathPowHalf: public LTemplateInstruction<1, 2, 1> { }; -class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { +class LCmpObjectEqAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -868,7 +880,7 @@ class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { }; -class LCmpHoleAndBranch: public LControlInstruction<1, 0> { +class LCmpHoleAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LCmpHoleAndBranch(LOperand* object) { inputs_[0] = object; @@ -881,7 +893,7 @@ class LCmpHoleAndBranch: public LControlInstruction<1, 0> { }; -class LIsObjectAndBranch: public LControlInstruction<1, 1> { +class LIsObjectAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LIsObjectAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -893,11 +905,11 @@ class LIsObjectAndBranch: public LControlInstruction<1, 1> { DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsNumberAndBranch: public LControlInstruction<1, 0> { +class LIsNumberAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LIsNumberAndBranch(LOperand* value) { inputs_[0] = value; @@ -910,7 +922,7 @@ class LIsNumberAndBranch: public LControlInstruction<1, 0> { }; -class LIsStringAndBranch: public LControlInstruction<1, 1> { +class LIsStringAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LIsStringAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -923,11 +935,11 @@ class LIsStringAndBranch: public LControlInstruction<1, 1> { DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsSmiAndBranch: public LControlInstruction<1, 0> { +class LIsSmiAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LIsSmiAndBranch(LOperand* value) { inputs_[0] = value; @@ -938,11 +950,11 @@ class LIsSmiAndBranch: public LControlInstruction<1, 0> { DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { +class LIsUndetectableAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -956,11 +968,11 @@ class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { "is-undetectable-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LStringCompareAndBranch: public LControlInstruction<3, 0> { +class LStringCompareAndBranch V8_FINAL : public LControlInstruction<3, 0> { public: LStringCompareAndBranch(LOperand* context, LOperand* left, LOperand* right) { inputs_[0] = context; @@ -975,13 +987,13 @@ class LStringCompareAndBranch: public LControlInstruction<3, 0> { "string-compare-and-branch") DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Token::Value op() const { return hydrogen()->token(); } }; -class LHasInstanceTypeAndBranch: public LControlInstruction<1, 1> { +class LHasInstanceTypeAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LHasInstanceTypeAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -995,11 +1007,11 @@ class LHasInstanceTypeAndBranch: public LControlInstruction<1, 1> { "has-instance-type-and-branch") DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { +class LGetCachedArrayIndex V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGetCachedArrayIndex(LOperand* value) { inputs_[0] = value; @@ -1012,7 +1024,8 @@ class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { }; -class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { +class LHasCachedArrayIndexAndBranch V8_FINAL + : public LControlInstruction<1, 0> { public: explicit LHasCachedArrayIndexAndBranch(LOperand* value) { inputs_[0] = value; @@ -1023,11 +1036,11 @@ class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch, "has-cached-array-index-and-branch") - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { +class LIsConstructCallAndBranch V8_FINAL : public LControlInstruction<0, 1> { public: explicit LIsConstructCallAndBranch(LOperand* temp) { temps_[0] = temp; @@ -1040,7 +1053,7 @@ class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { }; -class LClassOfTestAndBranch: public LControlInstruction<1, 2> { +class LClassOfTestAndBranch V8_FINAL : public LControlInstruction<1, 2> { public: LClassOfTestAndBranch(LOperand* value, LOperand* temp, LOperand* temp2) { inputs_[0] = value; @@ -1056,11 +1069,11 @@ class LClassOfTestAndBranch: public LControlInstruction<1, 2> { "class-of-test-and-branch") DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LCmpT: public LTemplateInstruction<1, 3, 0> { +class LCmpT V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LCmpT(LOperand* context, LOperand* left, LOperand* right) { inputs_[0] = context; @@ -1075,7 +1088,7 @@ class LCmpT: public LTemplateInstruction<1, 3, 0> { }; -class LInstanceOf: public LTemplateInstruction<1, 3, 0> { +class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LInstanceOf(LOperand* context, LOperand* left, LOperand* right) { inputs_[0] = context; @@ -1089,7 +1102,7 @@ class LInstanceOf: public LTemplateInstruction<1, 3, 0> { }; -class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 2, 1> { +class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LInstanceOfKnownGlobal(LOperand* context, LOperand* value, LOperand* temp) { inputs_[0] = context; @@ -1108,7 +1121,8 @@ class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 2, 1> { LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { return lazy_deopt_env_; } - virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { + virtual void SetDeferredLazyDeoptimizationEnvironment( + LEnvironment* env) V8_OVERRIDE { lazy_deopt_env_ = env; } @@ -1117,7 +1131,7 @@ class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 2, 1> { }; -class LInstanceSize: public LTemplateInstruction<1, 1, 0> { +class LInstanceSize V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInstanceSize(LOperand* object) { inputs_[0] = object; @@ -1130,7 +1144,7 @@ class LInstanceSize: public LTemplateInstruction<1, 1, 0> { }; -class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { +class LBoundsCheck V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LBoundsCheck(LOperand* index, LOperand* length) { inputs_[0] = index; @@ -1145,7 +1159,7 @@ class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { }; -class LBitI: public LTemplateInstruction<1, 2, 0> { +class LBitI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LBitI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1162,7 +1176,7 @@ class LBitI: public LTemplateInstruction<1, 2, 0> { }; -class LShiftI: public LTemplateInstruction<1, 2, 0> { +class LShiftI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) : op_(op), can_deopt_(can_deopt) { @@ -1184,7 +1198,7 @@ class LShiftI: public LTemplateInstruction<1, 2, 0> { }; -class LSubI: public LTemplateInstruction<1, 2, 0> { +class LSubI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LSubI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1199,7 +1213,7 @@ class LSubI: public LTemplateInstruction<1, 2, 0> { }; -class LConstantI: public LTemplateInstruction<1, 0, 0> { +class LConstantI V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1208,7 +1222,7 @@ class LConstantI: public LTemplateInstruction<1, 0, 0> { }; -class LConstantS: public LTemplateInstruction<1, 0, 0> { +class LConstantS V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1217,7 +1231,7 @@ class LConstantS: public LTemplateInstruction<1, 0, 0> { }; -class LConstantD: public LTemplateInstruction<1, 0, 1> { +class LConstantD V8_FINAL : public LTemplateInstruction<1, 0, 1> { public: explicit LConstantD(LOperand* temp) { temps_[0] = temp; @@ -1232,7 +1246,7 @@ class LConstantD: public LTemplateInstruction<1, 0, 1> { }; -class LConstantE: public LTemplateInstruction<1, 0, 0> { +class LConstantE V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1243,7 +1257,7 @@ class LConstantE: public LTemplateInstruction<1, 0, 0> { }; -class LConstantT: public LTemplateInstruction<1, 0, 0> { +class LConstantT V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1252,7 +1266,7 @@ class LConstantT: public LTemplateInstruction<1, 0, 0> { }; -class LBranch: public LControlInstruction<1, 1> { +class LBranch V8_FINAL : public LControlInstruction<1, 1> { public: LBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1265,11 +1279,11 @@ class LBranch: public LControlInstruction<1, 1> { DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") DECLARE_HYDROGEN_ACCESSOR(Branch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LCmpMapAndBranch: public LControlInstruction<1, 0> { +class LCmpMapAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LCmpMapAndBranch(LOperand* value) { inputs_[0] = value; @@ -1284,7 +1298,7 @@ class LCmpMapAndBranch: public LControlInstruction<1, 0> { }; -class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { +class LMapEnumLength V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMapEnumLength(LOperand* value) { inputs_[0] = value; @@ -1296,7 +1310,7 @@ class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { }; -class LElementsKind: public LTemplateInstruction<1, 1, 0> { +class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LElementsKind(LOperand* value) { inputs_[0] = value; @@ -1309,7 +1323,7 @@ class LElementsKind: public LTemplateInstruction<1, 1, 0> { }; -class LValueOf: public LTemplateInstruction<1, 1, 1> { +class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LValueOf(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1324,7 +1338,7 @@ class LValueOf: public LTemplateInstruction<1, 1, 1> { }; -class LDateField: public LTemplateInstruction<1, 1, 1> { +class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) { @@ -1345,7 +1359,7 @@ class LDateField: public LTemplateInstruction<1, 1, 1> { }; -class LSeqStringSetChar: public LTemplateInstruction<1, 3, 0> { +class LSeqStringSetChar V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LSeqStringSetChar(String::Encoding encoding, LOperand* string, @@ -1369,7 +1383,7 @@ class LSeqStringSetChar: public LTemplateInstruction<1, 3, 0> { }; -class LThrow: public LTemplateInstruction<0, 2, 0> { +class LThrow V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LThrow(LOperand* context, LOperand* value) { inputs_[0] = context; @@ -1383,7 +1397,7 @@ class LThrow: public LTemplateInstruction<0, 2, 0> { }; -class LAddI: public LTemplateInstruction<1, 2, 0> { +class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LAddI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1403,7 +1417,7 @@ class LAddI: public LTemplateInstruction<1, 2, 0> { }; -class LMathMinMax: public LTemplateInstruction<1, 2, 0> { +class LMathMinMax V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LMathMinMax(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1418,7 +1432,7 @@ class LMathMinMax: public LTemplateInstruction<1, 2, 0> { }; -class LPower: public LTemplateInstruction<1, 2, 0> { +class LPower V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LPower(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1433,7 +1447,7 @@ class LPower: public LTemplateInstruction<1, 2, 0> { }; -class LRandom: public LTemplateInstruction<1, 1, 0> { +class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LRandom(LOperand* global_object) { inputs_[0] = global_object; @@ -1446,7 +1460,7 @@ class LRandom: public LTemplateInstruction<1, 1, 0> { }; -class LArithmeticD: public LTemplateInstruction<1, 2, 0> { +class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LArithmeticD(Token::Value op, LOperand* left, LOperand* right) : op_(op) { @@ -1459,16 +1473,18 @@ class LArithmeticD: public LTemplateInstruction<1, 2, 0> { Token::Value op() const { return op_; } - virtual Opcode opcode() const { return LInstruction::kArithmeticD; } - virtual void CompileToNative(LCodeGen* generator); - virtual const char* Mnemonic() const; + virtual Opcode opcode() const V8_OVERRIDE { + return LInstruction::kArithmeticD; + } + virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; + virtual const char* Mnemonic() const V8_OVERRIDE; private: Token::Value op_; }; -class LArithmeticT: public LTemplateInstruction<1, 3, 0> { +class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LArithmeticT(Token::Value op, LOperand* context, @@ -1484,9 +1500,11 @@ class LArithmeticT: public LTemplateInstruction<1, 3, 0> { LOperand* left() { return inputs_[1]; } LOperand* right() { return inputs_[2]; } - virtual Opcode opcode() const { return LInstruction::kArithmeticT; } - virtual void CompileToNative(LCodeGen* generator); - virtual const char* Mnemonic() const; + virtual Opcode opcode() const V8_OVERRIDE { + return LInstruction::kArithmeticT; + } + virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; + virtual const char* Mnemonic() const V8_OVERRIDE; Token::Value op() const { return op_; } @@ -1495,7 +1513,7 @@ class LArithmeticT: public LTemplateInstruction<1, 3, 0> { }; -class LReturn: public LTemplateInstruction<0, 3, 0> { +class LReturn V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: explicit LReturn(LOperand* value, LOperand* context, LOperand* parameter_count) { @@ -1518,7 +1536,7 @@ class LReturn: public LTemplateInstruction<0, 3, 0> { }; -class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { +class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadNamedField(LOperand* object) { inputs_[0] = object; @@ -1536,7 +1554,7 @@ class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { }; -class LLoadNamedGeneric: public LTemplateInstruction<1, 2, 0> { +class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadNamedGeneric(LOperand* context, LOperand* object) { inputs_[0] = context; @@ -1553,7 +1571,7 @@ class LLoadNamedGeneric: public LTemplateInstruction<1, 2, 0> { }; -class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> { +class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LLoadFunctionPrototype(LOperand* function, LOperand* temp) { inputs_[0] = function; @@ -1568,7 +1586,8 @@ class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 1> { }; -class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { +class LLoadExternalArrayPointer V8_FINAL + : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadExternalArrayPointer(LOperand* object) { inputs_[0] = object; @@ -1581,7 +1600,7 @@ class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { }; -class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { +class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadKeyed(LOperand* elements, LOperand* key) { inputs_[0] = elements; @@ -1596,7 +1615,7 @@ class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { return hydrogen()->is_external(); } - virtual bool ClobbersDoubleRegisters() const { + virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { return !CpuFeatures::IsSupported(SSE2) && !IsDoubleOrFloatElementsKind(hydrogen()->elements_kind()); } @@ -1604,7 +1623,7 @@ class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; uint32_t additional_index() const { return hydrogen()->index_offset(); } bool key_is_smi() { return hydrogen()->key()->representation().IsTagged(); @@ -1625,7 +1644,7 @@ inline static bool ExternalArrayOpRequiresTemp( } -class LLoadKeyedGeneric: public LTemplateInstruction<1, 3, 0> { +class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) { inputs_[0] = context; @@ -1641,14 +1660,14 @@ class LLoadKeyedGeneric: public LTemplateInstruction<1, 3, 0> { }; -class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { +class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) }; -class LLoadGlobalGeneric: public LTemplateInstruction<1, 2, 0> { +class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadGlobalGeneric(LOperand* context, LOperand* global_object) { inputs_[0] = context; @@ -1666,7 +1685,7 @@ class LLoadGlobalGeneric: public LTemplateInstruction<1, 2, 0> { }; -class LStoreGlobalCell: public LTemplateInstruction<0, 1, 0> { +class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LStoreGlobalCell(LOperand* value) { inputs_[0] = value; @@ -1679,7 +1698,7 @@ class LStoreGlobalCell: public LTemplateInstruction<0, 1, 0> { }; -class LStoreGlobalGeneric: public LTemplateInstruction<0, 3, 0> { +class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: LStoreGlobalGeneric(LOperand* context, LOperand* global_object, @@ -1701,7 +1720,7 @@ class LStoreGlobalGeneric: public LTemplateInstruction<0, 3, 0> { }; -class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { +class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadContextSlot(LOperand* context) { inputs_[0] = context; @@ -1714,11 +1733,11 @@ class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { int slot_index() { return hydrogen()->slot_index(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> { +class LStoreContextSlot V8_FINAL : public LTemplateInstruction<0, 2, 1> { public: LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { inputs_[0] = context; @@ -1735,11 +1754,11 @@ class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> { int slot_index() { return hydrogen()->slot_index(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LPushArgument: public LTemplateInstruction<0, 1, 0> { +class LPushArgument V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LPushArgument(LOperand* value) { inputs_[0] = value; @@ -1751,7 +1770,7 @@ class LPushArgument: public LTemplateInstruction<0, 1, 0> { }; -class LDrop: public LTemplateInstruction<0, 0, 0> { +class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: explicit LDrop(int count) : count_(count) { } @@ -1764,7 +1783,7 @@ class LDrop: public LTemplateInstruction<0, 0, 0> { }; -class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { +class LInnerAllocatedObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInnerAllocatedObject(LOperand* base_object) { inputs_[0] = base_object; @@ -1780,21 +1799,21 @@ class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { }; -class LThisFunction: public LTemplateInstruction<1, 0, 0> { +class LThisFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") DECLARE_HYDROGEN_ACCESSOR(ThisFunction) }; -class LContext: public LTemplateInstruction<1, 0, 0> { +class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(Context, "context") DECLARE_HYDROGEN_ACCESSOR(Context) }; -class LOuterContext: public LTemplateInstruction<1, 1, 0> { +class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LOuterContext(LOperand* context) { inputs_[0] = context; @@ -1806,7 +1825,7 @@ class LOuterContext: public LTemplateInstruction<1, 1, 0> { }; -class LDeclareGlobals: public LTemplateInstruction<0, 1, 0> { +class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LDeclareGlobals(LOperand* context) { inputs_[0] = context; @@ -1819,7 +1838,7 @@ class LDeclareGlobals: public LTemplateInstruction<0, 1, 0> { }; -class LGlobalObject: public LTemplateInstruction<1, 1, 0> { +class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGlobalObject(LOperand* context) { inputs_[0] = context; @@ -1831,7 +1850,7 @@ class LGlobalObject: public LTemplateInstruction<1, 1, 0> { }; -class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { +class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGlobalReceiver(LOperand* global_object) { inputs_[0] = global_object; @@ -1843,19 +1862,19 @@ class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { }; -class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { +class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle function() { return hydrogen()->function(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LInvokeFunction: public LTemplateInstruction<1, 2, 0> { +class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LInvokeFunction(LOperand* context, LOperand* function) { inputs_[0] = context; @@ -1868,13 +1887,13 @@ class LInvokeFunction: public LTemplateInstruction<1, 2, 0> { DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallKeyed: public LTemplateInstruction<1, 2, 0> { +class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LCallKeyed(LOperand* context, LOperand* key) { inputs_[0] = context; @@ -1887,13 +1906,13 @@ class LCallKeyed: public LTemplateInstruction<1, 2, 0> { DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") DECLARE_HYDROGEN_ACCESSOR(CallKeyed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNamed: public LTemplateInstruction<1, 1, 0> { +class LCallNamed V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallNamed(LOperand* context) { inputs_[0] = context; @@ -1904,14 +1923,14 @@ class LCallNamed: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") DECLARE_HYDROGEN_ACCESSOR(CallNamed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const { return hydrogen()->name(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallFunction: public LTemplateInstruction<1, 2, 0> { +class LCallFunction V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: explicit LCallFunction(LOperand* context, LOperand* function) { inputs_[0] = context; @@ -1928,7 +1947,7 @@ class LCallFunction: public LTemplateInstruction<1, 2, 0> { }; -class LCallGlobal: public LTemplateInstruction<1, 1, 0> { +class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallGlobal(LOperand* context) { inputs_[0] = context; @@ -1939,25 +1958,25 @@ class LCallGlobal: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") DECLARE_HYDROGEN_ACCESSOR(CallGlobal) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const {return hydrogen()->name(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { +class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNew: public LTemplateInstruction<1, 2, 0> { +class LCallNew V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LCallNew(LOperand* context, LOperand* constructor) { inputs_[0] = context; @@ -1970,13 +1989,13 @@ class LCallNew: public LTemplateInstruction<1, 2, 0> { DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") DECLARE_HYDROGEN_ACCESSOR(CallNew) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNewArray: public LTemplateInstruction<1, 2, 0> { +class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LCallNewArray(LOperand* context, LOperand* constructor) { inputs_[0] = context; @@ -1989,13 +2008,13 @@ class LCallNewArray: public LTemplateInstruction<1, 2, 0> { DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") DECLARE_HYDROGEN_ACCESSOR(CallNewArray) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallRuntime: public LTemplateInstruction<1, 1, 0> { +class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallRuntime(LOperand* context) { inputs_[0] = context; @@ -2011,7 +2030,7 @@ class LCallRuntime: public LTemplateInstruction<1, 1, 0> { }; -class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { +class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInteger32ToDouble(LOperand* value) { inputs_[0] = value; @@ -2023,7 +2042,7 @@ class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { }; -class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { +class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInteger32ToSmi(LOperand* value) { inputs_[0] = value; @@ -2036,7 +2055,7 @@ class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { }; -class LUint32ToDouble: public LTemplateInstruction<1, 1, 1> { +class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: explicit LUint32ToDouble(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -2050,7 +2069,7 @@ class LUint32ToDouble: public LTemplateInstruction<1, 1, 1> { }; -class LNumberTagI: public LTemplateInstruction<1, 1, 0> { +class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LNumberTagI(LOperand* value) { inputs_[0] = value; @@ -2062,7 +2081,7 @@ class LNumberTagI: public LTemplateInstruction<1, 1, 0> { }; -class LNumberTagU: public LTemplateInstruction<1, 1, 1> { +class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LNumberTagU(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -2076,7 +2095,7 @@ class LNumberTagU: public LTemplateInstruction<1, 1, 1> { }; -class LNumberTagD: public LTemplateInstruction<1, 1, 1> { +class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LNumberTagD(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -2092,7 +2111,7 @@ class LNumberTagD: public LTemplateInstruction<1, 1, 1> { // Sometimes truncating conversion from a tagged value to an int32. -class LDoubleToI: public LTemplateInstruction<1, 1, 1> { +class LDoubleToI V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LDoubleToI(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -2109,7 +2128,7 @@ class LDoubleToI: public LTemplateInstruction<1, 1, 1> { }; -class LDoubleToSmi: public LTemplateInstruction<1, 1, 0> { +class LDoubleToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LDoubleToSmi(LOperand* value) { inputs_[0] = value; @@ -2123,7 +2142,7 @@ class LDoubleToSmi: public LTemplateInstruction<1, 1, 0> { // Truncating conversion from a tagged value to an int32. -class LTaggedToI: public LTemplateInstruction<1, 1, 1> { +class LTaggedToI V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LTaggedToI(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -2141,7 +2160,7 @@ class LTaggedToI: public LTemplateInstruction<1, 1, 1> { // Truncating conversion from a tagged value to an int32. -class LTaggedToINoSSE2: public LTemplateInstruction<1, 1, 3> { +class LTaggedToINoSSE2 V8_FINAL : public LTemplateInstruction<1, 1, 3> { public: LTaggedToINoSSE2(LOperand* value, LOperand* temp1, @@ -2165,7 +2184,7 @@ class LTaggedToINoSSE2: public LTemplateInstruction<1, 1, 3> { }; -class LSmiTag: public LTemplateInstruction<1, 1, 0> { +class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LSmiTag(LOperand* value) { inputs_[0] = value; @@ -2177,7 +2196,7 @@ class LSmiTag: public LTemplateInstruction<1, 1, 0> { }; -class LNumberUntagD: public LTemplateInstruction<1, 1, 1> { +class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: explicit LNumberUntagD(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -2187,14 +2206,14 @@ class LNumberUntagD: public LTemplateInstruction<1, 1, 1> { LOperand* value() { return inputs_[0]; } LOperand* temp() { return temps_[0]; } - virtual bool ClobbersDoubleRegisters() const { return false; } + virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { return false; } DECLARE_CONCRETE_INSTRUCTION(NumberUntagD, "double-untag") DECLARE_HYDROGEN_ACCESSOR(Change); }; -class LSmiUntag: public LTemplateInstruction<1, 1, 0> { +class LSmiUntag V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: LSmiUntag(LOperand* value, bool needs_check) : needs_check_(needs_check) { @@ -2212,7 +2231,7 @@ class LSmiUntag: public LTemplateInstruction<1, 1, 0> { }; -class LStoreNamedField: public LTemplateInstruction<0, 2, 2> { +class LStoreNamedField V8_FINAL : public LTemplateInstruction<0, 2, 2> { public: LStoreNamedField(LOperand* obj, LOperand* val, @@ -2232,7 +2251,7 @@ class LStoreNamedField: public LTemplateInstruction<0, 2, 2> { DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle transition() const { return hydrogen()->transition_map(); } Representation representation() const { @@ -2241,7 +2260,7 @@ class LStoreNamedField: public LTemplateInstruction<0, 2, 2> { }; -class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { +class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: LStoreNamedGeneric(LOperand* context, LOperand* object, LOperand* value) { inputs_[0] = context; @@ -2256,13 +2275,13 @@ class LStoreNamedGeneric: public LTemplateInstruction<0, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const { return hydrogen()->name(); } StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } }; -class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { +class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { inputs_[0] = obj; @@ -2281,13 +2300,13 @@ class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; uint32_t additional_index() const { return hydrogen()->index_offset(); } bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } }; -class LStoreKeyedGeneric: public LTemplateInstruction<0, 4, 0> { +class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 4, 0> { public: LStoreKeyedGeneric(LOperand* context, LOperand* object, @@ -2307,13 +2326,13 @@ class LStoreKeyedGeneric: public LTemplateInstruction<0, 4, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } }; -class LTransitionElementsKind: public LTemplateInstruction<0, 2, 2> { +class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 2, 2> { public: LTransitionElementsKind(LOperand* object, LOperand* context, @@ -2334,7 +2353,7 @@ class LTransitionElementsKind: public LTemplateInstruction<0, 2, 2> { "transition-elements-kind") DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle original_map() { return hydrogen()->original_map(); } Handle transitioned_map() { return hydrogen()->transitioned_map(); } @@ -2343,7 +2362,7 @@ class LTransitionElementsKind: public LTemplateInstruction<0, 2, 2> { }; -class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { +class LTrapAllocationMemento V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: LTrapAllocationMemento(LOperand* object, LOperand* temp) { @@ -2359,7 +2378,7 @@ class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { }; -class LStringAdd: public LTemplateInstruction<1, 3, 0> { +class LStringAdd V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LStringAdd(LOperand* context, LOperand* left, LOperand* right) { inputs_[0] = context; @@ -2376,7 +2395,7 @@ class LStringAdd: public LTemplateInstruction<1, 3, 0> { }; -class LStringCharCodeAt: public LTemplateInstruction<1, 3, 0> { +class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LStringCharCodeAt(LOperand* context, LOperand* string, LOperand* index) { inputs_[0] = context; @@ -2393,7 +2412,7 @@ class LStringCharCodeAt: public LTemplateInstruction<1, 3, 0> { }; -class LStringCharFromCode: public LTemplateInstruction<1, 2, 0> { +class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LStringCharFromCode(LOperand* context, LOperand* char_code) { inputs_[0] = context; @@ -2408,7 +2427,7 @@ class LStringCharFromCode: public LTemplateInstruction<1, 2, 0> { }; -class LCheckFunction: public LTemplateInstruction<0, 1, 0> { +class LCheckFunction V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckFunction(LOperand* value) { inputs_[0] = value; @@ -2421,7 +2440,7 @@ class LCheckFunction: public LTemplateInstruction<0, 1, 0> { }; -class LCheckInstanceType: public LTemplateInstruction<0, 1, 1> { +class LCheckInstanceType V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: LCheckInstanceType(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -2436,7 +2455,7 @@ class LCheckInstanceType: public LTemplateInstruction<0, 1, 1> { }; -class LCheckMaps: public LTemplateInstruction<0, 1, 0> { +class LCheckMaps V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckMaps(LOperand* value) { inputs_[0] = value; @@ -2449,7 +2468,7 @@ class LCheckMaps: public LTemplateInstruction<0, 1, 0> { }; -class LCheckSmi: public LTemplateInstruction<1, 1, 0> { +class LCheckSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCheckSmi(LOperand* value) { inputs_[0] = value; @@ -2461,7 +2480,7 @@ class LCheckSmi: public LTemplateInstruction<1, 1, 0> { }; -class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { +class LClampDToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LClampDToUint8(LOperand* value) { inputs_[0] = value; @@ -2473,7 +2492,7 @@ class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { }; -class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { +class LClampIToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LClampIToUint8(LOperand* value) { inputs_[0] = value; @@ -2485,7 +2504,7 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { }; -class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { +class LClampTToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LClampTToUint8(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -2499,7 +2518,7 @@ class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { // Truncating conversion from a tagged value to an int32. -class LClampTToUint8NoSSE2: public LTemplateInstruction<1, 1, 3> { +class LClampTToUint8NoSSE2 V8_FINAL : public LTemplateInstruction<1, 1, 3> { public: LClampTToUint8NoSSE2(LOperand* unclamped, LOperand* temp1, @@ -2522,7 +2541,7 @@ class LClampTToUint8NoSSE2: public LTemplateInstruction<1, 1, 3> { }; -class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { +class LCheckNonSmi V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckNonSmi(LOperand* value) { inputs_[0] = value; @@ -2535,7 +2554,7 @@ class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { }; -class LAllocate: public LTemplateInstruction<1, 2, 1> { +class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LAllocate(LOperand* context, LOperand* size, LOperand* temp) { inputs_[0] = context; @@ -2552,7 +2571,7 @@ class LAllocate: public LTemplateInstruction<1, 2, 1> { }; -class LRegExpLiteral: public LTemplateInstruction<1, 1, 0> { +class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LRegExpLiteral(LOperand* context) { inputs_[0] = context; @@ -2565,7 +2584,7 @@ class LRegExpLiteral: public LTemplateInstruction<1, 1, 0> { }; -class LFunctionLiteral: public LTemplateInstruction<1, 1, 0> { +class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LFunctionLiteral(LOperand* context) { inputs_[0] = context; @@ -2578,7 +2597,7 @@ class LFunctionLiteral: public LTemplateInstruction<1, 1, 0> { }; -class LToFastProperties: public LTemplateInstruction<1, 1, 0> { +class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LToFastProperties(LOperand* value) { inputs_[0] = value; @@ -2591,7 +2610,7 @@ class LToFastProperties: public LTemplateInstruction<1, 1, 0> { }; -class LTypeof: public LTemplateInstruction<1, 2, 0> { +class LTypeof V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LTypeof(LOperand* context, LOperand* value) { inputs_[0] = context; @@ -2605,7 +2624,7 @@ class LTypeof: public LTemplateInstruction<1, 2, 0> { }; -class LTypeofIsAndBranch: public LControlInstruction<1, 0> { +class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LTypeofIsAndBranch(LOperand* value) { inputs_[0] = value; @@ -2618,20 +2637,20 @@ class LTypeofIsAndBranch: public LControlInstruction<1, 0> { Handle type_literal() { return hydrogen()->type_literal(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LOsrEntry: public LTemplateInstruction<0, 0, 0> { +class LOsrEntry V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: - LOsrEntry() {} - - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") }; -class LStackCheck: public LTemplateInstruction<0, 1, 0> { +class LStackCheck V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LStackCheck(LOperand* context) { inputs_[0] = context; @@ -2649,7 +2668,7 @@ class LStackCheck: public LTemplateInstruction<0, 1, 0> { }; -class LForInPrepareMap: public LTemplateInstruction<1, 2, 0> { +class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LForInPrepareMap(LOperand* context, LOperand* object) { inputs_[0] = context; @@ -2663,7 +2682,7 @@ class LForInPrepareMap: public LTemplateInstruction<1, 2, 0> { }; -class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { +class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LForInCacheArray(LOperand* map) { inputs_[0] = map; @@ -2679,7 +2698,7 @@ class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { }; -class LCheckMapValue: public LTemplateInstruction<0, 2, 0> { +class LCheckMapValue V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LCheckMapValue(LOperand* value, LOperand* map) { inputs_[0] = value; @@ -2693,7 +2712,7 @@ class LCheckMapValue: public LTemplateInstruction<0, 2, 0> { }; -class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { +class LLoadFieldByIndex V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadFieldByIndex(LOperand* object, LOperand* index) { inputs_[0] = object; @@ -2708,7 +2727,7 @@ class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { class LChunkBuilder; -class LPlatformChunk: public LChunk { +class LPlatformChunk V8_FINAL : public LChunk { public: LPlatformChunk(CompilationInfo* info, HGraph* graph) : LChunk(info, graph), @@ -2724,7 +2743,7 @@ class LPlatformChunk: public LChunk { }; -class LChunkBuilder BASE_EMBEDDED { +class LChunkBuilder V8_FINAL BASE_EMBEDDED { public: LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) : chunk_(NULL), diff --git a/src/lithium.h b/src/lithium.h index f773916485..fd50ee8f8b 100644 --- a/src/lithium.h +++ b/src/lithium.h @@ -43,7 +43,7 @@ namespace internal { V(DoubleRegister, DOUBLE_REGISTER) -class LOperand: public ZoneObject { +class LOperand : public ZoneObject { public: enum Kind { INVALID, @@ -90,7 +90,7 @@ class LOperand: public ZoneObject { }; -class LUnallocated: public LOperand { +class LUnallocated : public LOperand { public: enum BasicPolicy { FIXED_SLOT, @@ -271,7 +271,7 @@ class LUnallocated: public LOperand { }; -class LMoveOperands BASE_EMBEDDED { +class LMoveOperands V8_FINAL BASE_EMBEDDED { public: LMoveOperands(LOperand* source, LOperand* destination) : source_(source), destination_(destination) { @@ -317,7 +317,7 @@ class LMoveOperands BASE_EMBEDDED { }; -class LConstantOperand: public LOperand { +class LConstantOperand V8_FINAL : public LOperand { public: static LConstantOperand* Create(int index, Zone* zone) { ASSERT(index >= 0); @@ -342,7 +342,7 @@ class LConstantOperand: public LOperand { }; -class LArgument: public LOperand { +class LArgument V8_FINAL : public LOperand { public: explicit LArgument(int index) : LOperand(ARGUMENT, index) { } @@ -353,7 +353,7 @@ class LArgument: public LOperand { }; -class LStackSlot: public LOperand { +class LStackSlot V8_FINAL : public LOperand { public: static LStackSlot* Create(int index, Zone* zone) { ASSERT(index >= 0); @@ -378,7 +378,7 @@ class LStackSlot: public LOperand { }; -class LDoubleStackSlot: public LOperand { +class LDoubleStackSlot V8_FINAL : public LOperand { public: static LDoubleStackSlot* Create(int index, Zone* zone) { ASSERT(index >= 0); @@ -403,7 +403,7 @@ class LDoubleStackSlot: public LOperand { }; -class LRegister: public LOperand { +class LRegister V8_FINAL : public LOperand { public: static LRegister* Create(int index, Zone* zone) { ASSERT(index >= 0); @@ -428,7 +428,7 @@ class LRegister: public LOperand { }; -class LDoubleRegister: public LOperand { +class LDoubleRegister V8_FINAL : public LOperand { public: static LDoubleRegister* Create(int index, Zone* zone) { ASSERT(index >= 0); @@ -453,7 +453,7 @@ class LDoubleRegister: public LOperand { }; -class LParallelMove : public ZoneObject { +class LParallelMove V8_FINAL : public ZoneObject { public: explicit LParallelMove(Zone* zone) : move_operands_(4, zone) { } @@ -474,7 +474,7 @@ class LParallelMove : public ZoneObject { }; -class LPointerMap: public ZoneObject { +class LPointerMap V8_FINAL : public ZoneObject { public: explicit LPointerMap(int position, Zone* zone) : pointer_operands_(8, zone), @@ -510,7 +510,7 @@ class LPointerMap: public ZoneObject { }; -class LEnvironment: public ZoneObject { +class LEnvironment V8_FINAL : public ZoneObject { public: LEnvironment(Handle closure, FrameType frame_type, @@ -655,7 +655,7 @@ class LEnvironment: public ZoneObject { // Iterates over the non-null, non-constant operands in an environment. -class ShallowIterator BASE_EMBEDDED { +class ShallowIterator V8_FINAL BASE_EMBEDDED { public: explicit ShallowIterator(LEnvironment* env) : env_(env), @@ -699,7 +699,7 @@ class ShallowIterator BASE_EMBEDDED { // Iterator for non-null, non-constant operands incl. outer environments. -class DeepIterator BASE_EMBEDDED { +class DeepIterator V8_FINAL BASE_EMBEDDED { public: explicit DeepIterator(LEnvironment* env) : current_iterator_(env) { @@ -736,7 +736,7 @@ class LLabel; // Superclass providing data and behavior common to all the // arch-specific LPlatformChunk classes. -class LChunk: public ZoneObject { +class LChunk : public ZoneObject { public: static LChunk* NewChunk(HGraph* graph); diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index 7dd7fd93c3..aa56d7298e 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -36,7 +36,7 @@ namespace v8 { namespace internal { -class SafepointGenerator : public CallWrapper { +class SafepointGenerator V8_FINAL : public CallWrapper { public: SafepointGenerator(LCodeGen* codegen, LPointerMap* pointers, @@ -44,11 +44,11 @@ class SafepointGenerator : public CallWrapper { : codegen_(codegen), pointers_(pointers), deopt_mode_(mode) { } - virtual ~SafepointGenerator() { } + virtual ~SafepointGenerator() {} - virtual void BeforeCall(int call_size) const { } + virtual void BeforeCall(int call_size) const V8_OVERRIDE {} - virtual void AfterCall() const { + virtual void AfterCall() const V8_OVERRIDE { codegen_->RecordSafepoint(pointers_, deopt_mode_); } @@ -2605,15 +2605,15 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) { void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { - class DeferredInstanceOfKnownGlobal: public LDeferredCode { + class DeferredInstanceOfKnownGlobal V8_FINAL : public LDeferredCode { public: DeferredInstanceOfKnownGlobal(LCodeGen* codegen, LInstanceOfKnownGlobal* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } Label* map_check() { return &map_check_; } private: @@ -3599,14 +3599,14 @@ void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) { void LCodeGen::DoMathAbs(LMathAbs* instr) { // Class for deferred case. - class DeferredMathAbsTaggedHeapNumber: public LDeferredCode { + class DeferredMathAbsTaggedHeapNumber V8_FINAL : public LDeferredCode { public: DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LMathAbs* instr_; }; @@ -3801,12 +3801,12 @@ void LCodeGen::DoPower(LPower* instr) { void LCodeGen::DoRandom(LRandom* instr) { - class DeferredDoRandom: public LDeferredCode { + class DeferredDoRandom V8_FINAL : public LDeferredCode { public: DeferredDoRandom(LCodeGen* codegen, LRandom* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredRandom(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredRandom(instr_); } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LRandom* instr_; }; @@ -4461,12 +4461,14 @@ void LCodeGen::DoStringAdd(LStringAdd* instr) { void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { - class DeferredStringCharCodeAt: public LDeferredCode { + class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { public: DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStringCharCodeAt(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStringCharCodeAt* instr_; }; @@ -4513,12 +4515,14 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) { void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { - class DeferredStringCharFromCode: public LDeferredCode { + class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { public: DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStringCharFromCode(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStringCharFromCode(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStringCharFromCode* instr_; }; @@ -4604,16 +4608,16 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { void LCodeGen::DoNumberTagI(LNumberTagI* instr) { - class DeferredNumberTagI: public LDeferredCode { + class DeferredNumberTagI V8_FINAL : public LDeferredCode { public: DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredNumberTagI(instr_, instr_->value(), SIGNED_INT32); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagI* instr_; }; @@ -4630,16 +4634,16 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) { void LCodeGen::DoNumberTagU(LNumberTagU* instr) { - class DeferredNumberTagU: public LDeferredCode { + class DeferredNumberTagU V8_FINAL : public LDeferredCode { public: DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredNumberTagI(instr_, instr_->value(), UNSIGNED_INT32); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagU* instr_; }; @@ -4710,12 +4714,14 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr, void LCodeGen::DoNumberTagD(LNumberTagD* instr) { - class DeferredNumberTagD: public LDeferredCode { + class DeferredNumberTagD V8_FINAL : public LDeferredCode { public: DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredNumberTagD(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagD* instr_; }; @@ -4914,12 +4920,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) { void LCodeGen::DoTaggedToI(LTaggedToI* instr) { - class DeferredTaggedToI: public LDeferredCode { + class DeferredTaggedToI V8_FINAL : public LDeferredCode { public: DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredTaggedToI(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredTaggedToI(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LTaggedToI* instr_; }; @@ -5132,17 +5140,17 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { void LCodeGen::DoCheckMaps(LCheckMaps* instr) { - class DeferredCheckMaps: public LDeferredCode { + class DeferredCheckMaps V8_FINAL : public LDeferredCode { public: DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) : LDeferredCode(codegen), instr_(instr), object_(object) { SetExit(check_maps()); } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredInstanceMigration(instr_, object_); } Label* check_maps() { return &check_maps_; } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LCheckMaps* instr_; Label check_maps_; @@ -5231,12 +5239,14 @@ void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) { void LCodeGen::DoAllocate(LAllocate* instr) { - class DeferredAllocate: public LDeferredCode { + class DeferredAllocate V8_FINAL : public LDeferredCode { public: DeferredAllocate(LCodeGen* codegen, LAllocate* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredAllocate(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LAllocate* instr_; }; @@ -5633,12 +5643,14 @@ void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { void LCodeGen::DoStackCheck(LStackCheck* instr) { - class DeferredStackCheck: public LDeferredCode { + class DeferredStackCheck V8_FINAL : public LDeferredCode { public: DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStackCheck(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStackCheck(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStackCheck* instr_; }; diff --git a/src/mips/lithium-codegen-mips.h b/src/mips/lithium-codegen-mips.h index f0f44e7d53..13b58040bd 100644 --- a/src/mips/lithium-codegen-mips.h +++ b/src/mips/lithium-codegen-mips.h @@ -42,7 +42,7 @@ namespace internal { class LDeferredCode; class SafepointGenerator; -class LCodeGen BASE_EMBEDDED { +class LCodeGen V8_FINAL BASE_EMBEDDED { public: LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) : zone_(info->zone()), @@ -441,7 +441,7 @@ class LCodeGen BASE_EMBEDDED { int old_position_; - class PushSafepointRegistersScope BASE_EMBEDDED { + class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { public: PushSafepointRegistersScope(LCodeGen* codegen, Safepoint::Kind kind) @@ -489,7 +489,7 @@ class LCodeGen BASE_EMBEDDED { }; -class LDeferredCode: public ZoneObject { +class LDeferredCode : public ZoneObject { public: explicit LDeferredCode(LCodeGen* codegen) : codegen_(codegen), @@ -498,7 +498,7 @@ class LDeferredCode: public ZoneObject { codegen->AddDeferredCode(this); } - virtual ~LDeferredCode() { } + virtual ~LDeferredCode() {} virtual void Generate() = 0; virtual LInstruction* instr() = 0; diff --git a/src/mips/lithium-gap-resolver-mips.h b/src/mips/lithium-gap-resolver-mips.h index 2506e38c35..ea1ea3cbbf 100644 --- a/src/mips/lithium-gap-resolver-mips.h +++ b/src/mips/lithium-gap-resolver-mips.h @@ -38,7 +38,7 @@ namespace internal { class LCodeGen; class LGapResolver; -class LGapResolver BASE_EMBEDDED { +class LGapResolver V8_FINAL BASE_EMBEDDED { public: explicit LGapResolver(LCodeGen* owner); diff --git a/src/mips/lithium-mips.h b/src/mips/lithium-mips.h index 4bf904970e..479f75aff3 100644 --- a/src/mips/lithium-mips.h +++ b/src/mips/lithium-mips.h @@ -186,13 +186,17 @@ class LCodeGen; V(ValueOf) \ V(WrapReceiver) -#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ - virtual Opcode opcode() const { return LInstruction::k##type; } \ - virtual void CompileToNative(LCodeGen* generator); \ - virtual const char* Mnemonic() const { return mnemonic; } \ - static L##type* cast(LInstruction* instr) { \ - ASSERT(instr->Is##type()); \ - return reinterpret_cast(instr); \ +#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ + virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ + return LInstruction::k##type; \ + } \ + virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ + virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ + return mnemonic; \ + } \ + static L##type* cast(LInstruction* instr) { \ + ASSERT(instr->Is##type()); \ + return reinterpret_cast(instr); \ } @@ -202,7 +206,7 @@ class LCodeGen; } -class LInstruction: public ZoneObject { +class LInstruction : public ZoneObject { public: LInstruction() : environment_(NULL), @@ -211,7 +215,7 @@ class LInstruction: public ZoneObject { set_position(RelocInfo::kNoPosition); } - virtual ~LInstruction() { } + virtual ~LInstruction() {} virtual void CompileToNative(LCodeGen* generator) = 0; virtual const char* Mnemonic() const = 0; @@ -310,11 +314,13 @@ class LInstruction: public ZoneObject { // I = number of input operands. // T = number of temporary operands. template -class LTemplateInstruction: public LInstruction { +class LTemplateInstruction : public LInstruction { public: // Allow 0 or 1 output operands. STATIC_ASSERT(R == 0 || R == 1); - virtual bool HasResult() const { return R != 0 && result() != NULL; } + virtual bool HasResult() const V8_FINAL V8_OVERRIDE { + return R != 0 && result() != NULL; + } void set_result(LOperand* operand) { results_[0] = operand; } LOperand* result() const { return results_[0]; } @@ -324,15 +330,15 @@ class LTemplateInstruction: public LInstruction { EmbeddedContainer temps_; private: - virtual int InputCount() { return I; } - virtual LOperand* InputAt(int i) { return inputs_[i]; } + virtual int InputCount() V8_FINAL V8_OVERRIDE { return I; } + virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; } - virtual int TempCount() { return T; } - virtual LOperand* TempAt(int i) { return temps_[i]; } + virtual int TempCount() V8_FINAL V8_OVERRIDE { return T; } + virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return temps_[i]; } }; -class LGap: public LTemplateInstruction<0, 0, 0> { +class LGap : public LTemplateInstruction<0, 0, 0> { public: explicit LGap(HBasicBlock* block) : block_(block) { @@ -343,8 +349,8 @@ class LGap: public LTemplateInstruction<0, 0, 0> { } // Can't use the DECLARE-macro here because of sub-classes. - virtual bool IsGap() const { return true; } - virtual void PrintDataTo(StringStream* stream); + virtual bool IsGap() const V8_FINAL V8_OVERRIDE { return true; } + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; static LGap* cast(LInstruction* instr) { ASSERT(instr->IsGap()); return reinterpret_cast(instr); @@ -380,11 +386,11 @@ class LGap: public LTemplateInstruction<0, 0, 0> { }; -class LInstructionGap: public LGap { +class LInstructionGap V8_FINAL : public LGap { public: explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } - virtual bool HasInterestingComment(LCodeGen* gen) const { + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { return !IsRedundant(); } @@ -392,14 +398,14 @@ class LInstructionGap: public LGap { }; -class LGoto: public LTemplateInstruction<0, 0, 0> { +class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: explicit LGoto(int block_id) : block_id_(block_id) { } - virtual bool HasInterestingComment(LCodeGen* gen) const; + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") - virtual void PrintDataTo(StringStream* stream); - virtual bool IsControl() const { return true; } + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; + virtual bool IsControl() const V8_OVERRIDE { return true; } int block_id() const { return block_id_; } @@ -408,7 +414,7 @@ class LGoto: public LTemplateInstruction<0, 0, 0> { }; -class LLazyBailout: public LTemplateInstruction<0, 0, 0> { +class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: LLazyBailout() : gap_instructions_size_(0) { } @@ -424,7 +430,7 @@ class LLazyBailout: public LTemplateInstruction<0, 0, 0> { }; -class LDummyUse: public LTemplateInstruction<1, 1, 0> { +class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LDummyUse(LOperand* value) { inputs_[0] = value; @@ -433,22 +439,24 @@ class LDummyUse: public LTemplateInstruction<1, 1, 0> { }; -class LDeoptimize: public LTemplateInstruction<0, 0, 0> { +class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") DECLARE_HYDROGEN_ACCESSOR(Deoptimize) }; -class LLabel: public LGap { +class LLabel V8_FINAL : public LGap { public: explicit LLabel(HBasicBlock* block) : LGap(block), replacement_(NULL) { } - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(Label, "label") - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int block_id() const { return block()->block_id(); } bool is_loop_header() const { return block()->IsLoopHeader(); } @@ -464,14 +472,16 @@ class LLabel: public LGap { }; -class LParameter: public LTemplateInstruction<1, 0, 0> { +class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") }; -class LCallStub: public LTemplateInstruction<1, 0, 0> { +class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") DECLARE_HYDROGEN_ACCESSOR(CallStub) @@ -482,19 +492,21 @@ class LCallStub: public LTemplateInstruction<1, 0, 0> { }; -class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { +class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") }; template -class LControlInstruction: public LTemplateInstruction<0, I, T> { +class LControlInstruction : public LTemplateInstruction<0, I, T> { public: LControlInstruction() : false_label_(NULL), true_label_(NULL) { } - virtual bool IsControl() const { return true; } + virtual bool IsControl() const V8_FINAL V8_OVERRIDE { return true; } int SuccessorCount() { return hydrogen()->SuccessorCount(); } HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } @@ -533,7 +545,7 @@ class LControlInstruction: public LTemplateInstruction<0, I, T> { }; -class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { +class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LWrapReceiver(LOperand* receiver, LOperand* function) { inputs_[0] = receiver; @@ -547,7 +559,7 @@ class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { }; -class LApplyArguments: public LTemplateInstruction<1, 4, 0> { +class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { public: LApplyArguments(LOperand* function, LOperand* receiver, @@ -568,7 +580,7 @@ class LApplyArguments: public LTemplateInstruction<1, 4, 0> { }; -class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { +class LAccessArgumentsAt V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LAccessArgumentsAt(LOperand* arguments, LOperand* length, LOperand* index) { inputs_[0] = arguments; @@ -582,11 +594,11 @@ class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { LOperand* length() { return inputs_[1]; } LOperand* index() { return inputs_[2]; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { +class LArgumentsLength V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LArgumentsLength(LOperand* elements) { inputs_[0] = elements; @@ -598,14 +610,14 @@ class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { }; -class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { +class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) }; -class LModI: public LTemplateInstruction<1, 2, 3> { +class LModI V8_FINAL : public LTemplateInstruction<1, 2, 3> { public: // Used when the right hand is a constant power of 2. LModI(LOperand* left, @@ -641,7 +653,7 @@ class LModI: public LTemplateInstruction<1, 2, 3> { }; -class LDivI: public LTemplateInstruction<1, 2, 0> { +class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LDivI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -656,7 +668,7 @@ class LDivI: public LTemplateInstruction<1, 2, 0> { }; -class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { +class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LMathFloorOfDiv(LOperand* left, LOperand* right, @@ -675,7 +687,7 @@ class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { }; -class LMulI: public LTemplateInstruction<1, 2, 1> { +class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LMulI(LOperand* left, LOperand* right, LOperand* temp) { inputs_[0] = left; @@ -693,7 +705,7 @@ class LMulI: public LTemplateInstruction<1, 2, 1> { // Instruction for computing multiplier * multiplicand + addend. -class LMultiplyAddD: public LTemplateInstruction<1, 3, 0> { +class LMultiplyAddD V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LMultiplyAddD(LOperand* addend, LOperand* multiplier, LOperand* multiplicand) { @@ -710,13 +722,13 @@ class LMultiplyAddD: public LTemplateInstruction<1, 3, 0> { }; -class LDebugBreak: public LTemplateInstruction<0, 0, 0> { +class LDebugBreak V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") }; -class LCompareNumericAndBranch: public LControlInstruction<2, 0> { +class LCompareNumericAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LCompareNumericAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -735,11 +747,11 @@ class LCompareNumericAndBranch: public LControlInstruction<2, 0> { return hydrogen()->representation().IsDouble(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LMathFloor: public LTemplateInstruction<1, 1, 1> { +class LMathFloor V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LMathFloor(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -754,7 +766,7 @@ class LMathFloor: public LTemplateInstruction<1, 1, 1> { }; -class LMathRound: public LTemplateInstruction<1, 1, 1> { +class LMathRound V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LMathRound(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -769,7 +781,7 @@ class LMathRound: public LTemplateInstruction<1, 1, 1> { }; -class LMathAbs: public LTemplateInstruction<1, 1, 0> { +class LMathAbs V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathAbs(LOperand* value) { inputs_[0] = value; @@ -782,7 +794,7 @@ class LMathAbs: public LTemplateInstruction<1, 1, 0> { }; -class LMathLog: public LTemplateInstruction<1, 1, 0> { +class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathLog(LOperand* value) { inputs_[0] = value; @@ -794,7 +806,7 @@ class LMathLog: public LTemplateInstruction<1, 1, 0> { }; -class LMathSin: public LTemplateInstruction<1, 1, 0> { +class LMathSin V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathSin(LOperand* value) { inputs_[0] = value; @@ -806,7 +818,7 @@ class LMathSin: public LTemplateInstruction<1, 1, 0> { }; -class LMathCos: public LTemplateInstruction<1, 1, 0> { +class LMathCos V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathCos(LOperand* value) { inputs_[0] = value; @@ -818,7 +830,7 @@ class LMathCos: public LTemplateInstruction<1, 1, 0> { }; -class LMathTan: public LTemplateInstruction<1, 1, 0> { +class LMathTan V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathTan(LOperand* value) { inputs_[0] = value; @@ -830,7 +842,7 @@ class LMathTan: public LTemplateInstruction<1, 1, 0> { }; -class LMathExp: public LTemplateInstruction<1, 1, 3> { +class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 3> { public: LMathExp(LOperand* value, LOperand* double_temp, @@ -852,7 +864,7 @@ class LMathExp: public LTemplateInstruction<1, 1, 3> { }; -class LMathSqrt: public LTemplateInstruction<1, 1, 0> { +class LMathSqrt V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathSqrt(LOperand* value) { inputs_[0] = value; @@ -864,7 +876,7 @@ class LMathSqrt: public LTemplateInstruction<1, 1, 0> { }; -class LMathPowHalf: public LTemplateInstruction<1, 1, 1> { +class LMathPowHalf V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LMathPowHalf(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -878,7 +890,7 @@ class LMathPowHalf: public LTemplateInstruction<1, 1, 1> { }; -class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { +class LCmpObjectEqAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -893,7 +905,7 @@ class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { }; -class LCmpHoleAndBranch: public LControlInstruction<1, 0> { +class LCmpHoleAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LCmpHoleAndBranch(LOperand* object) { inputs_[0] = object; @@ -906,7 +918,7 @@ class LCmpHoleAndBranch: public LControlInstruction<1, 0> { }; -class LIsObjectAndBranch: public LControlInstruction<1, 1> { +class LIsObjectAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LIsObjectAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -923,7 +935,7 @@ class LIsObjectAndBranch: public LControlInstruction<1, 1> { }; -class LIsNumberAndBranch: public LControlInstruction<1, 0> { +class LIsNumberAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LIsNumberAndBranch(LOperand* value) { inputs_[0] = value; @@ -936,7 +948,7 @@ class LIsNumberAndBranch: public LControlInstruction<1, 0> { }; -class LIsStringAndBranch: public LControlInstruction<1, 1> { +class LIsStringAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LIsStringAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -949,11 +961,11 @@ class LIsStringAndBranch: public LControlInstruction<1, 1> { DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsSmiAndBranch: public LControlInstruction<1, 0> { +class LIsSmiAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LIsSmiAndBranch(LOperand* value) { inputs_[0] = value; @@ -964,11 +976,11 @@ class LIsSmiAndBranch: public LControlInstruction<1, 0> { DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { +class LIsUndetectableAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -982,11 +994,11 @@ class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { "is-undetectable-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LStringCompareAndBranch: public LControlInstruction<2, 0> { +class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LStringCompareAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1002,11 +1014,11 @@ class LStringCompareAndBranch: public LControlInstruction<2, 0> { Token::Value op() const { return hydrogen()->token(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { +class LHasInstanceTypeAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LHasInstanceTypeAndBranch(LOperand* value) { inputs_[0] = value; @@ -1018,11 +1030,11 @@ class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { "has-instance-type-and-branch") DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { +class LGetCachedArrayIndex V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGetCachedArrayIndex(LOperand* value) { inputs_[0] = value; @@ -1035,7 +1047,8 @@ class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { }; -class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { +class LHasCachedArrayIndexAndBranch V8_FINAL + : public LControlInstruction<1, 0> { public: explicit LHasCachedArrayIndexAndBranch(LOperand* value) { inputs_[0] = value; @@ -1047,11 +1060,11 @@ class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { "has-cached-array-index-and-branch") DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LClassOfTestAndBranch: public LControlInstruction<1, 1> { +class LClassOfTestAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LClassOfTestAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1065,11 +1078,11 @@ class LClassOfTestAndBranch: public LControlInstruction<1, 1> { "class-of-test-and-branch") DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LCmpT: public LTemplateInstruction<1, 2, 0> { +class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LCmpT(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1086,7 +1099,7 @@ class LCmpT: public LTemplateInstruction<1, 2, 0> { }; -class LInstanceOf: public LTemplateInstruction<1, 2, 0> { +class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LInstanceOf(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1100,7 +1113,7 @@ class LInstanceOf: public LTemplateInstruction<1, 2, 0> { }; -class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { +class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1118,7 +1131,8 @@ class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { return lazy_deopt_env_; } - virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { + virtual void SetDeferredLazyDeoptimizationEnvironment( + LEnvironment* env) V8_OVERRIDE { lazy_deopt_env_ = env; } @@ -1127,7 +1141,7 @@ class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { }; -class LInstanceSize: public LTemplateInstruction<1, 1, 0> { +class LInstanceSize V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInstanceSize(LOperand* object) { inputs_[0] = object; @@ -1140,7 +1154,7 @@ class LInstanceSize: public LTemplateInstruction<1, 1, 0> { }; -class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { +class LBoundsCheck V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LBoundsCheck(LOperand* index, LOperand* length) { inputs_[0] = index; @@ -1155,7 +1169,7 @@ class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { }; -class LBitI: public LTemplateInstruction<1, 2, 0> { +class LBitI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LBitI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1172,7 +1186,7 @@ class LBitI: public LTemplateInstruction<1, 2, 0> { }; -class LShiftI: public LTemplateInstruction<1, 2, 0> { +class LShiftI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) : op_(op), can_deopt_(can_deopt) { @@ -1193,7 +1207,7 @@ class LShiftI: public LTemplateInstruction<1, 2, 0> { }; -class LSubI: public LTemplateInstruction<1, 2, 0> { +class LSubI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LSubI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1208,7 +1222,7 @@ class LSubI: public LTemplateInstruction<1, 2, 0> { }; -class LConstantI: public LTemplateInstruction<1, 0, 0> { +class LConstantI V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1217,7 +1231,7 @@ class LConstantI: public LTemplateInstruction<1, 0, 0> { }; -class LConstantS: public LTemplateInstruction<1, 0, 0> { +class LConstantS V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1226,7 +1240,7 @@ class LConstantS: public LTemplateInstruction<1, 0, 0> { }; -class LConstantD: public LTemplateInstruction<1, 0, 0> { +class LConstantD V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1235,7 +1249,7 @@ class LConstantD: public LTemplateInstruction<1, 0, 0> { }; -class LConstantE: public LTemplateInstruction<1, 0, 0> { +class LConstantE V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1246,7 +1260,7 @@ class LConstantE: public LTemplateInstruction<1, 0, 0> { }; -class LConstantT: public LTemplateInstruction<1, 0, 0> { +class LConstantT V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1255,7 +1269,7 @@ class LConstantT: public LTemplateInstruction<1, 0, 0> { }; -class LBranch: public LControlInstruction<1, 0> { +class LBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LBranch(LOperand* value) { inputs_[0] = value; @@ -1266,11 +1280,11 @@ class LBranch: public LControlInstruction<1, 0> { DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") DECLARE_HYDROGEN_ACCESSOR(Branch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LCmpMapAndBranch: public LControlInstruction<1, 1> { +class LCmpMapAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: LCmpMapAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1287,7 +1301,7 @@ class LCmpMapAndBranch: public LControlInstruction<1, 1> { }; -class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { +class LMapEnumLength V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMapEnumLength(LOperand* value) { inputs_[0] = value; @@ -1299,7 +1313,7 @@ class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { }; -class LElementsKind: public LTemplateInstruction<1, 1, 0> { +class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LElementsKind(LOperand* value) { inputs_[0] = value; @@ -1312,7 +1326,7 @@ class LElementsKind: public LTemplateInstruction<1, 1, 0> { }; -class LValueOf: public LTemplateInstruction<1, 1, 1> { +class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LValueOf(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1327,7 +1341,7 @@ class LValueOf: public LTemplateInstruction<1, 1, 1> { }; -class LDateField: public LTemplateInstruction<1, 1, 1> { +class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LDateField(LOperand* date, LOperand* temp, Smi* index) : index_(index) { inputs_[0] = date; @@ -1346,7 +1360,7 @@ class LDateField: public LTemplateInstruction<1, 1, 1> { }; -class LSeqStringSetChar: public LTemplateInstruction<1, 3, 0> { +class LSeqStringSetChar V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LSeqStringSetChar(String::Encoding encoding, LOperand* string, @@ -1370,7 +1384,7 @@ class LSeqStringSetChar: public LTemplateInstruction<1, 3, 0> { }; -class LThrow: public LTemplateInstruction<0, 1, 0> { +class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LThrow(LOperand* value) { inputs_[0] = value; @@ -1382,7 +1396,7 @@ class LThrow: public LTemplateInstruction<0, 1, 0> { }; -class LAddI: public LTemplateInstruction<1, 2, 0> { +class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LAddI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1397,7 +1411,7 @@ class LAddI: public LTemplateInstruction<1, 2, 0> { }; -class LMathMinMax: public LTemplateInstruction<1, 2, 0> { +class LMathMinMax V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LMathMinMax(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1412,7 +1426,7 @@ class LMathMinMax: public LTemplateInstruction<1, 2, 0> { }; -class LPower: public LTemplateInstruction<1, 2, 0> { +class LPower V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LPower(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1427,7 +1441,7 @@ class LPower: public LTemplateInstruction<1, 2, 0> { }; -class LRandom: public LTemplateInstruction<1, 1, 0> { +class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LRandom(LOperand* global_object) { inputs_[0] = global_object; @@ -1440,7 +1454,7 @@ class LRandom: public LTemplateInstruction<1, 1, 0> { }; -class LArithmeticD: public LTemplateInstruction<1, 2, 0> { +class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LArithmeticD(Token::Value op, LOperand* left, LOperand* right) : op_(op) { @@ -1452,16 +1466,18 @@ class LArithmeticD: public LTemplateInstruction<1, 2, 0> { LOperand* left() { return inputs_[0]; } LOperand* right() { return inputs_[1]; } - virtual Opcode opcode() const { return LInstruction::kArithmeticD; } - virtual void CompileToNative(LCodeGen* generator); - virtual const char* Mnemonic() const; + virtual Opcode opcode() const V8_OVERRIDE { + return LInstruction::kArithmeticD; + } + virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; + virtual const char* Mnemonic() const V8_OVERRIDE; private: Token::Value op_; }; -class LArithmeticT: public LTemplateInstruction<1, 2, 0> { +class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LArithmeticT(Token::Value op, LOperand* left, LOperand* right) : op_(op) { @@ -1473,16 +1489,16 @@ class LArithmeticT: public LTemplateInstruction<1, 2, 0> { LOperand* right() { return inputs_[1]; } Token::Value op() const { return op_; } - virtual Opcode opcode() const { return LInstruction::kArithmeticT; } - virtual void CompileToNative(LCodeGen* generator); - virtual const char* Mnemonic() const; + virtual Opcode opcode() const V8_FINAL { return LInstruction::kArithmeticT; } + virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; + virtual const char* Mnemonic() const V8_OVERRIDE; private: Token::Value op_; }; -class LReturn: public LTemplateInstruction<0, 2, 0> { +class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: explicit LReturn(LOperand* value, LOperand* parameter_count) { inputs_[0] = value; @@ -1504,7 +1520,7 @@ class LReturn: public LTemplateInstruction<0, 2, 0> { }; -class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { +class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadNamedField(LOperand* object) { inputs_[0] = object; @@ -1517,7 +1533,7 @@ class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { }; -class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { +class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadNamedGeneric(LOperand* object) { inputs_[0] = object; @@ -1532,7 +1548,7 @@ class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { }; -class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> { +class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadFunctionPrototype(LOperand* function) { inputs_[0] = function; @@ -1545,7 +1561,8 @@ class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> { }; -class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { +class LLoadExternalArrayPointer V8_FINAL + : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadExternalArrayPointer(LOperand* object) { inputs_[0] = object; @@ -1558,7 +1575,7 @@ class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { }; -class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { +class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadKeyed(LOperand* elements, LOperand* key) { inputs_[0] = elements; @@ -1582,7 +1599,7 @@ class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { }; -class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { +class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadKeyedGeneric(LOperand* object, LOperand* key) { inputs_[0] = object; @@ -1596,14 +1613,14 @@ class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { }; -class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { +class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) }; -class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { +class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadGlobalGeneric(LOperand* global_object) { inputs_[0] = global_object; @@ -1619,7 +1636,7 @@ class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { }; -class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> { +class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: LStoreGlobalCell(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1634,7 +1651,7 @@ class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> { }; -class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { +class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: explicit LStoreGlobalGeneric(LOperand* global_object, LOperand* value) { @@ -1653,7 +1670,7 @@ class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { }; -class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { +class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadContextSlot(LOperand* context) { inputs_[0] = context; @@ -1670,7 +1687,7 @@ class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { }; -class LStoreContextSlot: public LTemplateInstruction<0, 2, 0> { +class LStoreContextSlot V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LStoreContextSlot(LOperand* context, LOperand* value) { inputs_[0] = context; @@ -1685,11 +1702,11 @@ class LStoreContextSlot: public LTemplateInstruction<0, 2, 0> { int slot_index() { return hydrogen()->slot_index(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LPushArgument: public LTemplateInstruction<0, 1, 0> { +class LPushArgument V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LPushArgument(LOperand* value) { inputs_[0] = value; @@ -1701,7 +1718,7 @@ class LPushArgument: public LTemplateInstruction<0, 1, 0> { }; -class LDrop: public LTemplateInstruction<0, 0, 0> { +class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: explicit LDrop(int count) : count_(count) { } @@ -1714,7 +1731,7 @@ class LDrop: public LTemplateInstruction<0, 0, 0> { }; -class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { +class LInnerAllocatedObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInnerAllocatedObject(LOperand* base_object) { inputs_[0] = base_object; @@ -1723,28 +1740,28 @@ class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { LOperand* base_object() { return inputs_[0]; } int offset() { return hydrogen()->offset(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object") DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject) }; -class LThisFunction: public LTemplateInstruction<1, 0, 0> { +class LThisFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") DECLARE_HYDROGEN_ACCESSOR(ThisFunction) }; -class LContext: public LTemplateInstruction<1, 0, 0> { +class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(Context, "context") DECLARE_HYDROGEN_ACCESSOR(Context) }; -class LOuterContext: public LTemplateInstruction<1, 1, 0> { +class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LOuterContext(LOperand* context) { inputs_[0] = context; @@ -1756,14 +1773,14 @@ class LOuterContext: public LTemplateInstruction<1, 1, 0> { }; -class LDeclareGlobals: public LTemplateInstruction<0, 0, 0> { +class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) }; -class LGlobalObject: public LTemplateInstruction<1, 1, 0> { +class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGlobalObject(LOperand* context) { inputs_[0] = context; @@ -1775,7 +1792,7 @@ class LGlobalObject: public LTemplateInstruction<1, 1, 0> { }; -class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { +class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGlobalReceiver(LOperand* global_object) { inputs_[0] = global_object; @@ -1787,19 +1804,19 @@ class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { }; -class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { +class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle function() { return hydrogen()->function(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { +class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInvokeFunction(LOperand* function) { inputs_[0] = function; @@ -1810,13 +1827,13 @@ class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallKeyed: public LTemplateInstruction<1, 1, 0> { +class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallKeyed(LOperand* key) { inputs_[0] = key; @@ -1827,26 +1844,26 @@ class LCallKeyed: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallKeyed, "call-keyed") DECLARE_HYDROGEN_ACCESSOR(CallKeyed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNamed: public LTemplateInstruction<1, 0, 0> { +class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") DECLARE_HYDROGEN_ACCESSOR(CallNamed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const { return hydrogen()->name(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallFunction: public LTemplateInstruction<1, 1, 0> { +class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallFunction(LOperand* function) { inputs_[0] = function; @@ -1861,7 +1878,7 @@ class LCallFunction: public LTemplateInstruction<1, 1, 0> { }; -class LCallGlobal: public LTemplateInstruction<1, 0, 0> { +class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") DECLARE_HYDROGEN_ACCESSOR(CallGlobal) @@ -1873,18 +1890,18 @@ class LCallGlobal: public LTemplateInstruction<1, 0, 0> { }; -class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { +class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNew: public LTemplateInstruction<1, 1, 0> { +class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallNew(LOperand* constructor) { inputs_[0] = constructor; @@ -1895,13 +1912,13 @@ class LCallNew: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") DECLARE_HYDROGEN_ACCESSOR(CallNew) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNewArray: public LTemplateInstruction<1, 1, 0> { +class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallNewArray(LOperand* constructor) { inputs_[0] = constructor; @@ -1912,13 +1929,13 @@ class LCallNewArray: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") DECLARE_HYDROGEN_ACCESSOR(CallNewArray) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallRuntime: public LTemplateInstruction<1, 0, 0> { +class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") DECLARE_HYDROGEN_ACCESSOR(CallRuntime) @@ -1928,7 +1945,7 @@ class LCallRuntime: public LTemplateInstruction<1, 0, 0> { }; -class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { +class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInteger32ToDouble(LOperand* value) { inputs_[0] = value; @@ -1940,7 +1957,7 @@ class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { }; -class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { +class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInteger32ToSmi(LOperand* value) { inputs_[0] = value; @@ -1953,7 +1970,7 @@ class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { }; -class LUint32ToDouble: public LTemplateInstruction<1, 1, 0> { +class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LUint32ToDouble(LOperand* value) { inputs_[0] = value; @@ -1965,7 +1982,7 @@ class LUint32ToDouble: public LTemplateInstruction<1, 1, 0> { }; -class LNumberTagI: public LTemplateInstruction<1, 1, 0> { +class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LNumberTagI(LOperand* value) { inputs_[0] = value; @@ -1977,7 +1994,7 @@ class LNumberTagI: public LTemplateInstruction<1, 1, 0> { }; -class LNumberTagU: public LTemplateInstruction<1, 1, 0> { +class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LNumberTagU(LOperand* value) { inputs_[0] = value; @@ -1989,7 +2006,7 @@ class LNumberTagU: public LTemplateInstruction<1, 1, 0> { }; -class LNumberTagD: public LTemplateInstruction<1, 1, 2> { +class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 2> { public: LNumberTagD(LOperand* value, LOperand* temp, LOperand* temp2) { inputs_[0] = value; @@ -2006,7 +2023,7 @@ class LNumberTagD: public LTemplateInstruction<1, 1, 2> { }; -class LDoubleToSmi: public LTemplateInstruction<1, 1, 2> { +class LDoubleToSmi V8_FINAL : public LTemplateInstruction<1, 1, 2> { public: LDoubleToSmi(LOperand* value, LOperand* temp, LOperand* temp2) { inputs_[0] = value; @@ -2026,7 +2043,7 @@ class LDoubleToSmi: public LTemplateInstruction<1, 1, 2> { // Sometimes truncating conversion from a tagged value to an int32. -class LDoubleToI: public LTemplateInstruction<1, 1, 2> { +class LDoubleToI V8_FINAL : public LTemplateInstruction<1, 1, 2> { public: LDoubleToI(LOperand* value, LOperand* temp, LOperand* temp2) { inputs_[0] = value; @@ -2046,7 +2063,7 @@ class LDoubleToI: public LTemplateInstruction<1, 1, 2> { // Truncating conversion from a tagged value to an int32. -class LTaggedToI: public LTemplateInstruction<1, 1, 3> { +class LTaggedToI V8_FINAL : public LTemplateInstruction<1, 1, 3> { public: LTaggedToI(LOperand* value, LOperand* temp, @@ -2070,7 +2087,7 @@ class LTaggedToI: public LTemplateInstruction<1, 1, 3> { }; -class LSmiTag: public LTemplateInstruction<1, 1, 0> { +class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LSmiTag(LOperand* value) { inputs_[0] = value; @@ -2082,7 +2099,7 @@ class LSmiTag: public LTemplateInstruction<1, 1, 0> { }; -class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { +class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LNumberUntagD(LOperand* value) { inputs_[0] = value; @@ -2095,7 +2112,7 @@ class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { }; -class LSmiUntag: public LTemplateInstruction<1, 1, 0> { +class LSmiUntag V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: LSmiUntag(LOperand* value, bool needs_check) : needs_check_(needs_check) { @@ -2112,7 +2129,7 @@ class LSmiUntag: public LTemplateInstruction<1, 1, 0> { }; -class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { +class LStoreNamedField V8_FINAL : public LTemplateInstruction<0, 2, 1> { public: LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp) { inputs_[0] = object; @@ -2127,7 +2144,7 @@ class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle transition() const { return hydrogen()->transition_map(); } Representation representation() const { @@ -2136,7 +2153,7 @@ class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { }; -class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { +class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LStoreNamedGeneric(LOperand* object, LOperand* value) { inputs_[0] = object; @@ -2149,14 +2166,14 @@ class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const { return hydrogen()->name(); } StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } }; -class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { +class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { inputs_[0] = object; @@ -2175,13 +2192,13 @@ class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } uint32_t additional_index() const { return hydrogen()->index_offset(); } }; -class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { +class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: LStoreKeyedGeneric(LOperand* obj, LOperand* key, LOperand* value) { inputs_[0] = obj; @@ -2196,13 +2213,13 @@ class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } }; -class LTransitionElementsKind: public LTemplateInstruction<0, 1, 1> { +class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: LTransitionElementsKind(LOperand* object, LOperand* new_map_temp) { @@ -2217,7 +2234,7 @@ class LTransitionElementsKind: public LTemplateInstruction<0, 1, 1> { "transition-elements-kind") DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle original_map() { return hydrogen()->original_map(); } Handle transitioned_map() { return hydrogen()->transitioned_map(); } @@ -2226,7 +2243,7 @@ class LTransitionElementsKind: public LTemplateInstruction<0, 1, 1> { }; -class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { +class LTrapAllocationMemento V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: LTrapAllocationMemento(LOperand* object, LOperand* temp) { @@ -2242,7 +2259,7 @@ class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { }; -class LStringAdd: public LTemplateInstruction<1, 2, 0> { +class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LStringAdd(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -2258,7 +2275,7 @@ class LStringAdd: public LTemplateInstruction<1, 2, 0> { -class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { +class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LStringCharCodeAt(LOperand* string, LOperand* index) { inputs_[0] = string; @@ -2273,7 +2290,7 @@ class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { }; -class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { +class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LStringCharFromCode(LOperand* char_code) { inputs_[0] = char_code; @@ -2286,7 +2303,7 @@ class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { }; -class LCheckFunction: public LTemplateInstruction<0, 1, 0> { +class LCheckFunction V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckFunction(LOperand* value) { inputs_[0] = value; @@ -2299,7 +2316,7 @@ class LCheckFunction: public LTemplateInstruction<0, 1, 0> { }; -class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> { +class LCheckInstanceType V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckInstanceType(LOperand* value) { inputs_[0] = value; @@ -2312,7 +2329,7 @@ class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> { }; -class LCheckMaps: public LTemplateInstruction<0, 1, 0> { +class LCheckMaps V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckMaps(LOperand* value) { inputs_[0] = value; @@ -2325,7 +2342,7 @@ class LCheckMaps: public LTemplateInstruction<0, 1, 0> { }; -class LCheckSmi: public LTemplateInstruction<1, 1, 0> { +class LCheckSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCheckSmi(LOperand* value) { inputs_[0] = value; @@ -2337,7 +2354,7 @@ class LCheckSmi: public LTemplateInstruction<1, 1, 0> { }; -class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { +class LCheckNonSmi V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckNonSmi(LOperand* value) { inputs_[0] = value; @@ -2350,7 +2367,7 @@ class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { }; -class LClampDToUint8: public LTemplateInstruction<1, 1, 1> { +class LClampDToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LClampDToUint8(LOperand* unclamped, LOperand* temp) { inputs_[0] = unclamped; @@ -2364,7 +2381,7 @@ class LClampDToUint8: public LTemplateInstruction<1, 1, 1> { }; -class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { +class LClampIToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LClampIToUint8(LOperand* unclamped) { inputs_[0] = unclamped; @@ -2376,7 +2393,7 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { }; -class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { +class LClampTToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LClampTToUint8(LOperand* unclamped, LOperand* temp) { inputs_[0] = unclamped; @@ -2390,7 +2407,7 @@ class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { }; -class LAllocate: public LTemplateInstruction<1, 2, 2> { +class LAllocate V8_FINAL : public LTemplateInstruction<1, 2, 2> { public: LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) { inputs_[1] = size; @@ -2407,21 +2424,21 @@ class LAllocate: public LTemplateInstruction<1, 2, 2> { }; -class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> { +class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) }; -class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { +class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) }; -class LToFastProperties: public LTemplateInstruction<1, 1, 0> { +class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LToFastProperties(LOperand* value) { inputs_[0] = value; @@ -2434,7 +2451,7 @@ class LToFastProperties: public LTemplateInstruction<1, 1, 0> { }; -class LTypeof: public LTemplateInstruction<1, 1, 0> { +class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LTypeof(LOperand* value) { inputs_[0] = value; @@ -2446,7 +2463,7 @@ class LTypeof: public LTemplateInstruction<1, 1, 0> { }; -class LTypeofIsAndBranch: public LControlInstruction<1, 0> { +class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LTypeofIsAndBranch(LOperand* value) { inputs_[0] = value; @@ -2459,11 +2476,11 @@ class LTypeofIsAndBranch: public LControlInstruction<1, 0> { Handle type_literal() { return hydrogen()->type_literal(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { +class LIsConstructCallAndBranch V8_FINAL : public LControlInstruction<0, 1> { public: explicit LIsConstructCallAndBranch(LOperand* temp) { temps_[0] = temp; @@ -2476,16 +2493,18 @@ class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { }; -class LOsrEntry: public LTemplateInstruction<0, 0, 0> { +class LOsrEntry V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: LOsrEntry() {} - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") }; -class LStackCheck: public LTemplateInstruction<0, 0, 0> { +class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") DECLARE_HYDROGEN_ACCESSOR(StackCheck) @@ -2497,7 +2516,7 @@ class LStackCheck: public LTemplateInstruction<0, 0, 0> { }; -class LForInPrepareMap: public LTemplateInstruction<1, 1, 0> { +class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LForInPrepareMap(LOperand* object) { inputs_[0] = object; @@ -2509,7 +2528,7 @@ class LForInPrepareMap: public LTemplateInstruction<1, 1, 0> { }; -class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { +class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LForInCacheArray(LOperand* map) { inputs_[0] = map; @@ -2525,7 +2544,7 @@ class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { }; -class LCheckMapValue: public LTemplateInstruction<0, 2, 0> { +class LCheckMapValue V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LCheckMapValue(LOperand* value, LOperand* map) { inputs_[0] = value; @@ -2539,7 +2558,7 @@ class LCheckMapValue: public LTemplateInstruction<0, 2, 0> { }; -class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { +class LLoadFieldByIndex V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadFieldByIndex(LOperand* object, LOperand* index) { inputs_[0] = object; @@ -2554,7 +2573,7 @@ class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { class LChunkBuilder; -class LPlatformChunk: public LChunk { +class LPlatformChunk V8_FINAL : public LChunk { public: LPlatformChunk(CompilationInfo* info, HGraph* graph) : LChunk(info, graph) { } @@ -2564,7 +2583,7 @@ class LPlatformChunk: public LChunk { }; -class LChunkBuilder BASE_EMBEDDED { +class LChunkBuilder V8_FINAL BASE_EMBEDDED { public: LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) : chunk_(NULL), diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc index abb8c77b5b..a1f4ad184b 100644 --- a/src/x64/lithium-codegen-x64.cc +++ b/src/x64/lithium-codegen-x64.cc @@ -39,7 +39,7 @@ namespace internal { // When invoking builtins, we need to record the safepoint in the middle of // the invoke instruction sequence generated by the macro assembler. -class SafepointGenerator : public CallWrapper { +class SafepointGenerator V8_FINAL : public CallWrapper { public: SafepointGenerator(LCodeGen* codegen, LPointerMap* pointers, @@ -47,13 +47,13 @@ class SafepointGenerator : public CallWrapper { : codegen_(codegen), pointers_(pointers), deopt_mode_(mode) { } - virtual ~SafepointGenerator() { } + virtual ~SafepointGenerator() {} - virtual void BeforeCall(int call_size) const { + virtual void BeforeCall(int call_size) const V8_OVERRIDE { codegen_->EnsureSpaceForLazyDeopt(Deoptimizer::patch_size() - call_size); } - virtual void AfterCall() const { + virtual void AfterCall() const V8_OVERRIDE { codegen_->RecordSafepoint(pointers_, deopt_mode_); } @@ -2466,15 +2466,15 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) { void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { - class DeferredInstanceOfKnownGlobal: public LDeferredCode { + class DeferredInstanceOfKnownGlobal V8_FINAL : public LDeferredCode { public: DeferredInstanceOfKnownGlobal(LCodeGen* codegen, LInstanceOfKnownGlobal* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } Label* map_check() { return &map_check_; } private: LInstanceOfKnownGlobal* instr_; @@ -3400,14 +3400,14 @@ void LCodeGen::EmitSmiMathAbs(LMathAbs* instr) { void LCodeGen::DoMathAbs(LMathAbs* instr) { // Class for deferred case. - class DeferredMathAbsTaggedHeapNumber: public LDeferredCode { + class DeferredMathAbsTaggedHeapNumber V8_FINAL : public LDeferredCode { public: DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LMathAbs* instr_; }; @@ -3632,12 +3632,12 @@ void LCodeGen::DoPower(LPower* instr) { void LCodeGen::DoRandom(LRandom* instr) { - class DeferredDoRandom: public LDeferredCode { + class DeferredDoRandom V8_FINAL : public LDeferredCode { public: DeferredDoRandom(LCodeGen* codegen, LRandom* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredRandom(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredRandom(instr_); } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LRandom* instr_; }; @@ -4322,12 +4322,14 @@ void LCodeGen::DoStringAdd(LStringAdd* instr) { void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { - class DeferredStringCharCodeAt: public LDeferredCode { + class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { public: DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStringCharCodeAt(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStringCharCodeAt* instr_; }; @@ -4374,12 +4376,14 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) { void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { - class DeferredStringCharFromCode: public LDeferredCode { + class DeferredStringCharFromCode V8_FINAL : public LDeferredCode { public: DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStringCharFromCode(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStringCharFromCode(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStringCharFromCode* instr_; }; @@ -4468,14 +4472,14 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) { void LCodeGen::DoNumberTagU(LNumberTagU* instr) { - class DeferredNumberTagU: public LDeferredCode { + class DeferredNumberTagU V8_FINAL : public LDeferredCode { public: DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredNumberTagU(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagU* instr_; }; @@ -4531,12 +4535,14 @@ void LCodeGen::DoDeferredNumberTagU(LNumberTagU* instr) { void LCodeGen::DoNumberTagD(LNumberTagD* instr) { - class DeferredNumberTagD: public LDeferredCode { + class DeferredNumberTagD V8_FINAL : public LDeferredCode { public: DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredNumberTagD(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LNumberTagD* instr_; }; @@ -4698,12 +4704,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) { void LCodeGen::DoTaggedToI(LTaggedToI* instr) { - class DeferredTaggedToI: public LDeferredCode { + class DeferredTaggedToI V8_FINAL : public LDeferredCode { public: DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredTaggedToI(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredTaggedToI(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LTaggedToI* instr_; }; @@ -4900,17 +4908,17 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { void LCodeGen::DoCheckMaps(LCheckMaps* instr) { - class DeferredCheckMaps: public LDeferredCode { + class DeferredCheckMaps V8_FINAL : public LDeferredCode { public: DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) : LDeferredCode(codegen), instr_(instr), object_(object) { SetExit(check_maps()); } - virtual void Generate() { + virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredInstanceMigration(instr_, object_); } Label* check_maps() { return &check_maps_; } - virtual LInstruction* instr() { return instr_; } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LCheckMaps* instr_; Label check_maps_; @@ -5000,12 +5008,14 @@ void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) { void LCodeGen::DoAllocate(LAllocate* instr) { - class DeferredAllocate: public LDeferredCode { + class DeferredAllocate V8_FINAL : public LDeferredCode { public: DeferredAllocate(LCodeGen* codegen, LAllocate* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredAllocate(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LAllocate* instr_; }; @@ -5361,12 +5371,14 @@ void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) { void LCodeGen::DoStackCheck(LStackCheck* instr) { - class DeferredStackCheck: public LDeferredCode { + class DeferredStackCheck V8_FINAL : public LDeferredCode { public: DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) : LDeferredCode(codegen), instr_(instr) { } - virtual void Generate() { codegen()->DoDeferredStackCheck(instr_); } - virtual LInstruction* instr() { return instr_; } + virtual void Generate() V8_OVERRIDE { + codegen()->DoDeferredStackCheck(instr_); + } + virtual LInstruction* instr() V8_OVERRIDE { return instr_; } private: LStackCheck* instr_; }; diff --git a/src/x64/lithium-codegen-x64.h b/src/x64/lithium-codegen-x64.h index a74ec7982c..65c6dcae1f 100644 --- a/src/x64/lithium-codegen-x64.h +++ b/src/x64/lithium-codegen-x64.h @@ -44,7 +44,7 @@ namespace internal { class LDeferredCode; class SafepointGenerator; -class LCodeGen BASE_EMBEDDED { +class LCodeGen V8_FINAL BASE_EMBEDDED { public: LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) : zone_(info->zone()), @@ -384,7 +384,7 @@ class LCodeGen BASE_EMBEDDED { int old_position_; - class PushSafepointRegistersScope BASE_EMBEDDED { + class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { public: explicit PushSafepointRegistersScope(LCodeGen* codegen) : codegen_(codegen) { @@ -420,7 +420,7 @@ class LDeferredCode: public ZoneObject { codegen->AddDeferredCode(this); } - virtual ~LDeferredCode() { } + virtual ~LDeferredCode() {} virtual void Generate() = 0; virtual LInstruction* instr() = 0; diff --git a/src/x64/lithium-gap-resolver-x64.h b/src/x64/lithium-gap-resolver-x64.h index d828455921..f218455b67 100644 --- a/src/x64/lithium-gap-resolver-x64.h +++ b/src/x64/lithium-gap-resolver-x64.h @@ -38,7 +38,7 @@ namespace internal { class LCodeGen; class LGapResolver; -class LGapResolver BASE_EMBEDDED { +class LGapResolver V8_FINAL BASE_EMBEDDED { public: explicit LGapResolver(LCodeGen* owner); diff --git a/src/x64/lithium-x64.h b/src/x64/lithium-x64.h index 77bebe64bd..b3a20cf691 100644 --- a/src/x64/lithium-x64.h +++ b/src/x64/lithium-x64.h @@ -186,13 +186,17 @@ class LCodeGen; V(WrapReceiver) -#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ - virtual Opcode opcode() const { return LInstruction::k##type; } \ - virtual void CompileToNative(LCodeGen* generator); \ - virtual const char* Mnemonic() const { return mnemonic; } \ - static L##type* cast(LInstruction* instr) { \ - ASSERT(instr->Is##type()); \ - return reinterpret_cast(instr); \ +#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ + virtual Opcode opcode() const V8_FINAL V8_OVERRIDE { \ + return LInstruction::k##type; \ + } \ + virtual void CompileToNative(LCodeGen* generator) V8_FINAL V8_OVERRIDE; \ + virtual const char* Mnemonic() const V8_FINAL V8_OVERRIDE { \ + return mnemonic; \ + } \ + static L##type* cast(LInstruction* instr) { \ + ASSERT(instr->Is##type()); \ + return reinterpret_cast(instr); \ } @@ -202,7 +206,7 @@ class LCodeGen; } -class LInstruction: public ZoneObject { +class LInstruction : public ZoneObject { public: LInstruction() : environment_(NULL), @@ -211,7 +215,7 @@ class LInstruction: public ZoneObject { set_position(RelocInfo::kNoPosition); } - virtual ~LInstruction() { } + virtual ~LInstruction() {} virtual void CompileToNative(LCodeGen* generator) = 0; virtual const char* Mnemonic() const = 0; @@ -310,11 +314,13 @@ class LInstruction: public ZoneObject { // I = number of input operands. // T = number of temporary operands. template -class LTemplateInstruction: public LInstruction { +class LTemplateInstruction : public LInstruction { public: // Allow 0 or 1 output operands. STATIC_ASSERT(R == 0 || R == 1); - virtual bool HasResult() const { return R != 0 && result() != NULL; } + virtual bool HasResult() const V8_FINAL V8_OVERRIDE { + return R != 0 && result() != NULL; + } void set_result(LOperand* operand) { results_[0] = operand; } LOperand* result() const { return results_[0]; } @@ -325,15 +331,15 @@ class LTemplateInstruction: public LInstruction { private: // Iterator support. - virtual int InputCount() { return I; } - virtual LOperand* InputAt(int i) { return inputs_[i]; } + virtual int InputCount() V8_FINAL V8_OVERRIDE { return I; } + virtual LOperand* InputAt(int i) V8_FINAL V8_OVERRIDE { return inputs_[i]; } - virtual int TempCount() { return T; } - virtual LOperand* TempAt(int i) { return temps_[i]; } + virtual int TempCount() V8_FINAL V8_OVERRIDE { return T; } + virtual LOperand* TempAt(int i) V8_FINAL V8_OVERRIDE { return temps_[i]; } }; -class LGap: public LTemplateInstruction<0, 0, 0> { +class LGap : public LTemplateInstruction<0, 0, 0> { public: explicit LGap(HBasicBlock* block) : block_(block) { @@ -344,8 +350,8 @@ class LGap: public LTemplateInstruction<0, 0, 0> { } // Can't use the DECLARE-macro here because of sub-classes. - virtual bool IsGap() const { return true; } - virtual void PrintDataTo(StringStream* stream); + virtual bool IsGap() const V8_FINAL V8_OVERRIDE { return true; } + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; static LGap* cast(LInstruction* instr) { ASSERT(instr->IsGap()); return reinterpret_cast(instr); @@ -382,11 +388,11 @@ class LGap: public LTemplateInstruction<0, 0, 0> { }; -class LInstructionGap: public LGap { +class LInstructionGap V8_FINAL : public LGap { public: explicit LInstructionGap(HBasicBlock* block) : LGap(block) { } - virtual bool HasInterestingComment(LCodeGen* gen) const { + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { return !IsRedundant(); } @@ -394,14 +400,14 @@ class LInstructionGap: public LGap { }; -class LGoto: public LTemplateInstruction<0, 0, 0> { +class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: explicit LGoto(int block_id) : block_id_(block_id) { } - virtual bool HasInterestingComment(LCodeGen* gen) const; + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") - virtual void PrintDataTo(StringStream* stream); - virtual bool IsControl() const { return true; } + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; + virtual bool IsControl() const V8_OVERRIDE { return true; } int block_id() const { return block_id_; } @@ -410,7 +416,7 @@ class LGoto: public LTemplateInstruction<0, 0, 0> { }; -class LLazyBailout: public LTemplateInstruction<0, 0, 0> { +class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: LLazyBailout() : gap_instructions_size_(0) { } @@ -426,7 +432,7 @@ class LLazyBailout: public LTemplateInstruction<0, 0, 0> { }; -class LDummyUse: public LTemplateInstruction<1, 1, 0> { +class LDummyUse V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LDummyUse(LOperand* value) { inputs_[0] = value; @@ -435,22 +441,24 @@ class LDummyUse: public LTemplateInstruction<1, 1, 0> { }; -class LDeoptimize: public LTemplateInstruction<0, 0, 0> { +class LDeoptimize V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") DECLARE_HYDROGEN_ACCESSOR(Deoptimize) }; -class LLabel: public LGap { +class LLabel V8_FINAL : public LGap { public: explicit LLabel(HBasicBlock* block) : LGap(block), replacement_(NULL) { } - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(Label, "label") - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int block_id() const { return block()->block_id(); } bool is_loop_header() const { return block()->IsLoopHeader(); } @@ -466,14 +474,16 @@ class LLabel: public LGap { }; -class LParameter: public LTemplateInstruction<1, 0, 0> { +class LParameter V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") }; -class LCallStub: public LTemplateInstruction<1, 0, 0> { +class LCallStub V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallStub, "call-stub") DECLARE_HYDROGEN_ACCESSOR(CallStub) @@ -484,19 +494,21 @@ class LCallStub: public LTemplateInstruction<1, 0, 0> { }; -class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { +class LUnknownOSRValue V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") }; template -class LControlInstruction: public LTemplateInstruction<0, I, T> { +class LControlInstruction : public LTemplateInstruction<0, I, T> { public: LControlInstruction() : false_label_(NULL), true_label_(NULL) { } - virtual bool IsControl() const { return true; } + virtual bool IsControl() const V8_FINAL V8_OVERRIDE { return true; } int SuccessorCount() { return hydrogen()->SuccessorCount(); } HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } @@ -535,7 +547,7 @@ class LControlInstruction: public LTemplateInstruction<0, I, T> { }; -class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { +class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LWrapReceiver(LOperand* receiver, LOperand* function) { inputs_[0] = receiver; @@ -549,7 +561,7 @@ class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { }; -class LApplyArguments: public LTemplateInstruction<1, 4, 0> { +class LApplyArguments V8_FINAL : public LTemplateInstruction<1, 4, 0> { public: LApplyArguments(LOperand* function, LOperand* receiver, @@ -570,7 +582,7 @@ class LApplyArguments: public LTemplateInstruction<1, 4, 0> { }; -class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { +class LAccessArgumentsAt V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LAccessArgumentsAt(LOperand* arguments, LOperand* length, LOperand* index) { inputs_[0] = arguments; @@ -584,11 +596,11 @@ class LAccessArgumentsAt: public LTemplateInstruction<1, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at") - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { +class LArgumentsLength V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LArgumentsLength(LOperand* elements) { inputs_[0] = elements; @@ -600,14 +612,14 @@ class LArgumentsLength: public LTemplateInstruction<1, 1, 0> { }; -class LArgumentsElements: public LTemplateInstruction<1, 0, 0> { +class LArgumentsElements V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments-elements") DECLARE_HYDROGEN_ACCESSOR(ArgumentsElements) }; -class LModI: public LTemplateInstruction<1, 2, 1> { +class LModI V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LModI(LOperand* left, LOperand* right, LOperand* temp) { inputs_[0] = left; @@ -624,7 +636,7 @@ class LModI: public LTemplateInstruction<1, 2, 1> { }; -class LDivI: public LTemplateInstruction<1, 2, 1> { +class LDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LDivI(LOperand* left, LOperand* right, LOperand* temp) { inputs_[0] = left; @@ -643,7 +655,7 @@ class LDivI: public LTemplateInstruction<1, 2, 1> { }; -class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { +class LMathFloorOfDiv V8_FINAL : public LTemplateInstruction<1, 2, 1> { public: LMathFloorOfDiv(LOperand* left, LOperand* right, @@ -662,7 +674,7 @@ class LMathFloorOfDiv: public LTemplateInstruction<1, 2, 1> { }; -class LMulI: public LTemplateInstruction<1, 2, 0> { +class LMulI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LMulI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -677,7 +689,7 @@ class LMulI: public LTemplateInstruction<1, 2, 0> { }; -class LCompareNumericAndBranch: public LControlInstruction<2, 0> { +class LCompareNumericAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LCompareNumericAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -696,11 +708,11 @@ class LCompareNumericAndBranch: public LControlInstruction<2, 0> { return hydrogen()->representation().IsDouble(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LMathFloor: public LTemplateInstruction<1, 1, 0> { +class LMathFloor V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathFloor(LOperand* value) { inputs_[0] = value; @@ -713,7 +725,7 @@ class LMathFloor: public LTemplateInstruction<1, 1, 0> { }; -class LMathRound: public LTemplateInstruction<1, 1, 0> { +class LMathRound V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathRound(LOperand* value) { inputs_[0] = value; @@ -726,7 +738,7 @@ class LMathRound: public LTemplateInstruction<1, 1, 0> { }; -class LMathAbs: public LTemplateInstruction<1, 1, 0> { +class LMathAbs V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathAbs(LOperand* value) { inputs_[0] = value; @@ -739,7 +751,7 @@ class LMathAbs: public LTemplateInstruction<1, 1, 0> { }; -class LMathLog: public LTemplateInstruction<1, 1, 0> { +class LMathLog V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathLog(LOperand* value) { inputs_[0] = value; @@ -751,7 +763,7 @@ class LMathLog: public LTemplateInstruction<1, 1, 0> { }; -class LMathSin: public LTemplateInstruction<1, 1, 0> { +class LMathSin V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathSin(LOperand* value) { inputs_[0] = value; @@ -763,7 +775,7 @@ class LMathSin: public LTemplateInstruction<1, 1, 0> { }; -class LMathCos: public LTemplateInstruction<1, 1, 0> { +class LMathCos V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathCos(LOperand* value) { inputs_[0] = value; @@ -775,7 +787,7 @@ class LMathCos: public LTemplateInstruction<1, 1, 0> { }; -class LMathTan: public LTemplateInstruction<1, 1, 0> { +class LMathTan V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathTan(LOperand* value) { inputs_[0] = value; @@ -787,7 +799,7 @@ class LMathTan: public LTemplateInstruction<1, 1, 0> { }; -class LMathExp: public LTemplateInstruction<1, 1, 2> { +class LMathExp V8_FINAL : public LTemplateInstruction<1, 1, 2> { public: LMathExp(LOperand* value, LOperand* temp1, LOperand* temp2) { inputs_[0] = value; @@ -804,7 +816,7 @@ class LMathExp: public LTemplateInstruction<1, 1, 2> { }; -class LMathSqrt: public LTemplateInstruction<1, 1, 0> { +class LMathSqrt V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathSqrt(LOperand* value) { inputs_[0] = value; @@ -816,7 +828,7 @@ class LMathSqrt: public LTemplateInstruction<1, 1, 0> { }; -class LMathPowHalf: public LTemplateInstruction<1, 1, 0> { +class LMathPowHalf V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMathPowHalf(LOperand* value) { inputs_[0] = value; @@ -828,7 +840,7 @@ class LMathPowHalf: public LTemplateInstruction<1, 1, 0> { }; -class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { +class LCmpObjectEqAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: LCmpObjectEqAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -842,7 +854,7 @@ class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> { }; -class LCmpHoleAndBranch: public LControlInstruction<1, 0> { +class LCmpHoleAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LCmpHoleAndBranch(LOperand* object) { inputs_[0] = object; @@ -855,7 +867,7 @@ class LCmpHoleAndBranch: public LControlInstruction<1, 0> { }; -class LIsObjectAndBranch: public LControlInstruction<1, 0> { +class LIsObjectAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LIsObjectAndBranch(LOperand* value) { inputs_[0] = value; @@ -866,11 +878,11 @@ class LIsObjectAndBranch: public LControlInstruction<1, 0> { DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsNumberAndBranch: public LControlInstruction<1, 0> { +class LIsNumberAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LIsNumberAndBranch(LOperand* value) { inputs_[0] = value; @@ -883,7 +895,7 @@ class LIsNumberAndBranch: public LControlInstruction<1, 0> { }; -class LIsStringAndBranch: public LControlInstruction<1, 1> { +class LIsStringAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: explicit LIsStringAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -896,11 +908,11 @@ class LIsStringAndBranch: public LControlInstruction<1, 1> { DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsSmiAndBranch: public LControlInstruction<1, 0> { +class LIsSmiAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LIsSmiAndBranch(LOperand* value) { inputs_[0] = value; @@ -911,11 +923,11 @@ class LIsSmiAndBranch: public LControlInstruction<1, 0> { DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { +class LIsUndetectableAndBranch V8_FINAL : public LControlInstruction<1, 1> { public: explicit LIsUndetectableAndBranch(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -929,11 +941,11 @@ class LIsUndetectableAndBranch: public LControlInstruction<1, 1> { "is-undetectable-and-branch") DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LStringCompareAndBranch: public LControlInstruction<2, 0> { +class LStringCompareAndBranch V8_FINAL : public LControlInstruction<2, 0> { public: explicit LStringCompareAndBranch(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -947,13 +959,13 @@ class LStringCompareAndBranch: public LControlInstruction<2, 0> { "string-compare-and-branch") DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Token::Value op() const { return hydrogen()->token(); } }; -class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { +class LHasInstanceTypeAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LHasInstanceTypeAndBranch(LOperand* value) { inputs_[0] = value; @@ -965,11 +977,11 @@ class LHasInstanceTypeAndBranch: public LControlInstruction<1, 0> { "has-instance-type-and-branch") DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { +class LGetCachedArrayIndex V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGetCachedArrayIndex(LOperand* value) { inputs_[0] = value; @@ -982,7 +994,8 @@ class LGetCachedArrayIndex: public LTemplateInstruction<1, 1, 0> { }; -class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { +class LHasCachedArrayIndexAndBranch V8_FINAL + : public LControlInstruction<1, 0> { public: explicit LHasCachedArrayIndexAndBranch(LOperand* value) { inputs_[0] = value; @@ -994,11 +1007,11 @@ class LHasCachedArrayIndexAndBranch: public LControlInstruction<1, 0> { "has-cached-array-index-and-branch") DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LClassOfTestAndBranch: public LControlInstruction<1, 2> { +class LClassOfTestAndBranch V8_FINAL : public LControlInstruction<1, 2> { public: LClassOfTestAndBranch(LOperand* value, LOperand* temp, LOperand* temp2) { inputs_[0] = value; @@ -1014,11 +1027,11 @@ class LClassOfTestAndBranch: public LControlInstruction<1, 2> { "class-of-test-and-branch") DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LCmpT: public LTemplateInstruction<1, 2, 0> { +class LCmpT V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LCmpT(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1035,7 +1048,7 @@ class LCmpT: public LTemplateInstruction<1, 2, 0> { }; -class LInstanceOf: public LTemplateInstruction<1, 2, 0> { +class LInstanceOf V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LInstanceOf(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1049,7 +1062,7 @@ class LInstanceOf: public LTemplateInstruction<1, 2, 0> { }; -class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { +class LInstanceOfKnownGlobal V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LInstanceOfKnownGlobal(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1067,7 +1080,8 @@ class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { LEnvironment* GetDeferredLazyDeoptimizationEnvironment() { return lazy_deopt_env_; } - virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { + virtual void SetDeferredLazyDeoptimizationEnvironment( + LEnvironment* env) V8_OVERRIDE { lazy_deopt_env_ = env; } @@ -1076,7 +1090,7 @@ class LInstanceOfKnownGlobal: public LTemplateInstruction<1, 1, 1> { }; -class LInstanceSize: public LTemplateInstruction<1, 1, 0> { +class LInstanceSize V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInstanceSize(LOperand* object) { inputs_[0] = object; @@ -1089,7 +1103,7 @@ class LInstanceSize: public LTemplateInstruction<1, 1, 0> { }; -class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { +class LBoundsCheck V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LBoundsCheck(LOperand* index, LOperand* length) { inputs_[0] = index; @@ -1104,7 +1118,7 @@ class LBoundsCheck: public LTemplateInstruction<0, 2, 0> { }; -class LBitI: public LTemplateInstruction<1, 2, 0> { +class LBitI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LBitI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1121,7 +1135,7 @@ class LBitI: public LTemplateInstruction<1, 2, 0> { }; -class LShiftI: public LTemplateInstruction<1, 2, 0> { +class LShiftI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LShiftI(Token::Value op, LOperand* left, LOperand* right, bool can_deopt) : op_(op), can_deopt_(can_deopt) { @@ -1142,7 +1156,7 @@ class LShiftI: public LTemplateInstruction<1, 2, 0> { }; -class LSubI: public LTemplateInstruction<1, 2, 0> { +class LSubI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LSubI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1157,7 +1171,7 @@ class LSubI: public LTemplateInstruction<1, 2, 0> { }; -class LConstantI: public LTemplateInstruction<1, 0, 0> { +class LConstantI V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1166,7 +1180,7 @@ class LConstantI: public LTemplateInstruction<1, 0, 0> { }; -class LConstantS: public LTemplateInstruction<1, 0, 0> { +class LConstantS V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantS, "constant-s") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1175,7 +1189,7 @@ class LConstantS: public LTemplateInstruction<1, 0, 0> { }; -class LConstantD: public LTemplateInstruction<1, 0, 1> { +class LConstantD V8_FINAL : public LTemplateInstruction<1, 0, 1> { public: explicit LConstantD(LOperand* temp) { temps_[0] = temp; @@ -1190,7 +1204,7 @@ class LConstantD: public LTemplateInstruction<1, 0, 1> { }; -class LConstantE: public LTemplateInstruction<1, 0, 0> { +class LConstantE V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1201,7 +1215,7 @@ class LConstantE: public LTemplateInstruction<1, 0, 0> { }; -class LConstantT: public LTemplateInstruction<1, 0, 0> { +class LConstantT V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") DECLARE_HYDROGEN_ACCESSOR(Constant) @@ -1210,7 +1224,7 @@ class LConstantT: public LTemplateInstruction<1, 0, 0> { }; -class LBranch: public LControlInstruction<1, 0> { +class LBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LBranch(LOperand* value) { inputs_[0] = value; @@ -1221,17 +1235,17 @@ class LBranch: public LControlInstruction<1, 0> { DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") DECLARE_HYDROGEN_ACCESSOR(Branch) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LDebugBreak: public LTemplateInstruction<0, 0, 0> { +class LDebugBreak V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(DebugBreak, "break") }; -class LCmpMapAndBranch: public LControlInstruction<1, 0> { +class LCmpMapAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LCmpMapAndBranch(LOperand* value) { inputs_[0] = value; @@ -1246,7 +1260,7 @@ class LCmpMapAndBranch: public LControlInstruction<1, 0> { }; -class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { +class LMapEnumLength V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LMapEnumLength(LOperand* value) { inputs_[0] = value; @@ -1258,7 +1272,7 @@ class LMapEnumLength: public LTemplateInstruction<1, 1, 0> { }; -class LElementsKind: public LTemplateInstruction<1, 1, 0> { +class LElementsKind V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LElementsKind(LOperand* value) { inputs_[0] = value; @@ -1271,7 +1285,7 @@ class LElementsKind: public LTemplateInstruction<1, 1, 0> { }; -class LValueOf: public LTemplateInstruction<1, 1, 0> { +class LValueOf V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LValueOf(LOperand* value) { inputs_[0] = value; @@ -1284,7 +1298,7 @@ class LValueOf: public LTemplateInstruction<1, 1, 0> { }; -class LDateField: public LTemplateInstruction<1, 1, 0> { +class LDateField V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: LDateField(LOperand* date, Smi* index) : index_(index) { inputs_[0] = date; @@ -1301,7 +1315,7 @@ class LDateField: public LTemplateInstruction<1, 1, 0> { }; -class LSeqStringSetChar: public LTemplateInstruction<1, 3, 0> { +class LSeqStringSetChar V8_FINAL : public LTemplateInstruction<1, 3, 0> { public: LSeqStringSetChar(String::Encoding encoding, LOperand* string, @@ -1325,7 +1339,7 @@ class LSeqStringSetChar: public LTemplateInstruction<1, 3, 0> { }; -class LThrow: public LTemplateInstruction<0, 1, 0> { +class LThrow V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LThrow(LOperand* value) { inputs_[0] = value; @@ -1337,7 +1351,7 @@ class LThrow: public LTemplateInstruction<0, 1, 0> { }; -class LAddI: public LTemplateInstruction<1, 2, 0> { +class LAddI V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LAddI(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1357,7 +1371,7 @@ class LAddI: public LTemplateInstruction<1, 2, 0> { }; -class LMathMinMax: public LTemplateInstruction<1, 2, 0> { +class LMathMinMax V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LMathMinMax(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1372,7 +1386,7 @@ class LMathMinMax: public LTemplateInstruction<1, 2, 0> { }; -class LPower: public LTemplateInstruction<1, 2, 0> { +class LPower V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LPower(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -1387,7 +1401,7 @@ class LPower: public LTemplateInstruction<1, 2, 0> { }; -class LRandom: public LTemplateInstruction<1, 1, 0> { +class LRandom V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LRandom(LOperand* global_object) { inputs_[0] = global_object; @@ -1400,7 +1414,7 @@ class LRandom: public LTemplateInstruction<1, 1, 0> { }; -class LArithmeticD: public LTemplateInstruction<1, 2, 0> { +class LArithmeticD V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LArithmeticD(Token::Value op, LOperand* left, LOperand* right) : op_(op) { @@ -1412,16 +1426,18 @@ class LArithmeticD: public LTemplateInstruction<1, 2, 0> { LOperand* left() { return inputs_[0]; } LOperand* right() { return inputs_[1]; } - virtual Opcode opcode() const { return LInstruction::kArithmeticD; } - virtual void CompileToNative(LCodeGen* generator); - virtual const char* Mnemonic() const; + virtual Opcode opcode() const V8_OVERRIDE { + return LInstruction::kArithmeticD; + } + virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; + virtual const char* Mnemonic() const V8_OVERRIDE; private: Token::Value op_; }; -class LArithmeticT: public LTemplateInstruction<1, 2, 0> { +class LArithmeticT V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LArithmeticT(Token::Value op, LOperand* left, LOperand* right) : op_(op) { @@ -1433,16 +1449,18 @@ class LArithmeticT: public LTemplateInstruction<1, 2, 0> { LOperand* left() { return inputs_[0]; } LOperand* right() { return inputs_[1]; } - virtual Opcode opcode() const { return LInstruction::kArithmeticT; } - virtual void CompileToNative(LCodeGen* generator); - virtual const char* Mnemonic() const; + virtual Opcode opcode() const V8_OVERRIDE { + return LInstruction::kArithmeticT; + } + virtual void CompileToNative(LCodeGen* generator) V8_OVERRIDE; + virtual const char* Mnemonic() const V8_OVERRIDE; private: Token::Value op_; }; -class LReturn: public LTemplateInstruction<0, 2, 0> { +class LReturn V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: explicit LReturn(LOperand* value, LOperand* parameter_count) { inputs_[0] = value; @@ -1465,7 +1483,7 @@ class LReturn: public LTemplateInstruction<0, 2, 0> { }; -class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { +class LLoadNamedField V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadNamedField(LOperand* object) { inputs_[0] = object; @@ -1478,7 +1496,7 @@ class LLoadNamedField: public LTemplateInstruction<1, 1, 0> { }; -class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { +class LLoadNamedGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadNamedGeneric(LOperand* object) { inputs_[0] = object; @@ -1492,7 +1510,7 @@ class LLoadNamedGeneric: public LTemplateInstruction<1, 1, 0> { }; -class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> { +class LLoadFunctionPrototype V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadFunctionPrototype(LOperand* function) { inputs_[0] = function; @@ -1505,7 +1523,8 @@ class LLoadFunctionPrototype: public LTemplateInstruction<1, 1, 0> { }; -class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { +class LLoadExternalArrayPointer V8_FINAL + : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadExternalArrayPointer(LOperand* object) { inputs_[0] = object; @@ -1518,7 +1537,7 @@ class LLoadExternalArrayPointer: public LTemplateInstruction<1, 1, 0> { }; -class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { +class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadKeyed(LOperand* elements, LOperand* key) { inputs_[0] = elements; @@ -1533,7 +1552,7 @@ class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { } LOperand* elements() { return inputs_[0]; } LOperand* key() { return inputs_[1]; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; uint32_t additional_index() const { return hydrogen()->index_offset(); } ElementsKind elements_kind() const { return hydrogen()->elements_kind(); @@ -1541,7 +1560,7 @@ class LLoadKeyed: public LTemplateInstruction<1, 2, 0> { }; -class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { +class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadKeyedGeneric(LOperand* obj, LOperand* key) { inputs_[0] = obj; @@ -1555,14 +1574,14 @@ class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { }; -class LLoadGlobalCell: public LTemplateInstruction<1, 0, 0> { +class LLoadGlobalCell V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(LoadGlobalCell, "load-global-cell") DECLARE_HYDROGEN_ACCESSOR(LoadGlobalCell) }; -class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { +class LLoadGlobalGeneric V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadGlobalGeneric(LOperand* global_object) { inputs_[0] = global_object; @@ -1577,7 +1596,7 @@ class LLoadGlobalGeneric: public LTemplateInstruction<1, 1, 0> { }; -class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> { +class LStoreGlobalCell V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: explicit LStoreGlobalCell(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1592,7 +1611,7 @@ class LStoreGlobalCell: public LTemplateInstruction<0, 1, 1> { }; -class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { +class LStoreGlobalGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: explicit LStoreGlobalGeneric(LOperand* global_object, LOperand* value) { @@ -1611,7 +1630,7 @@ class LStoreGlobalGeneric: public LTemplateInstruction<0, 2, 0> { }; -class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { +class LLoadContextSlot V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LLoadContextSlot(LOperand* context) { inputs_[0] = context; @@ -1624,11 +1643,11 @@ class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { int slot_index() { return hydrogen()->slot_index(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> { +class LStoreContextSlot V8_FINAL : public LTemplateInstruction<0, 2, 1> { public: LStoreContextSlot(LOperand* context, LOperand* value, LOperand* temp) { inputs_[0] = context; @@ -1645,11 +1664,11 @@ class LStoreContextSlot: public LTemplateInstruction<0, 2, 1> { int slot_index() { return hydrogen()->slot_index(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LPushArgument: public LTemplateInstruction<0, 1, 0> { +class LPushArgument V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LPushArgument(LOperand* value) { inputs_[0] = value; @@ -1661,7 +1680,7 @@ class LPushArgument: public LTemplateInstruction<0, 1, 0> { }; -class LDrop: public LTemplateInstruction<0, 0, 0> { +class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: explicit LDrop(int count) : count_(count) { } @@ -1674,7 +1693,7 @@ class LDrop: public LTemplateInstruction<0, 0, 0> { }; -class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { +class LInnerAllocatedObject V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInnerAllocatedObject(LOperand* base_object) { inputs_[0] = base_object; @@ -1683,28 +1702,28 @@ class LInnerAllocatedObject: public LTemplateInstruction<1, 1, 0> { LOperand* base_object() { return inputs_[0]; } int offset() { return hydrogen()->offset(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "sub-allocated-object") DECLARE_HYDROGEN_ACCESSOR(InnerAllocatedObject) }; -class LThisFunction: public LTemplateInstruction<1, 0, 0> { +class LThisFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(ThisFunction, "this-function") DECLARE_HYDROGEN_ACCESSOR(ThisFunction) }; -class LContext: public LTemplateInstruction<1, 0, 0> { +class LContext V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(Context, "context") DECLARE_HYDROGEN_ACCESSOR(Context) }; -class LOuterContext: public LTemplateInstruction<1, 1, 0> { +class LOuterContext V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LOuterContext(LOperand* context) { inputs_[0] = context; @@ -1716,20 +1735,20 @@ class LOuterContext: public LTemplateInstruction<1, 1, 0> { }; -class LDeclareGlobals: public LTemplateInstruction<0, 0, 0> { +class LDeclareGlobals V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(DeclareGlobals, "declare-globals") DECLARE_HYDROGEN_ACCESSOR(DeclareGlobals) }; -class LGlobalObject: public LTemplateInstruction<1, 0, 0> { +class LGlobalObject V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global-object") }; -class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { +class LGlobalReceiver V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LGlobalReceiver(LOperand* global_object) { inputs_[0] = global_object; @@ -1741,7 +1760,7 @@ class LGlobalReceiver: public LTemplateInstruction<1, 1, 0> { }; -class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { +class LCallConstantFunction V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call-constant-function") DECLARE_HYDROGEN_ACCESSOR(CallConstantFunction) @@ -1753,7 +1772,7 @@ class LCallConstantFunction: public LTemplateInstruction<1, 0, 0> { }; -class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { +class LInvokeFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInvokeFunction(LOperand* function) { inputs_[0] = function; @@ -1764,13 +1783,13 @@ class LInvokeFunction: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function") DECLARE_HYDROGEN_ACCESSOR(InvokeFunction) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallKeyed: public LTemplateInstruction<1, 1, 0> { +class LCallKeyed V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallKeyed(LOperand* key) { inputs_[0] = key; @@ -1781,25 +1800,25 @@ class LCallKeyed: public LTemplateInstruction<1, 1, 0> { LOperand* key() { return inputs_[0]; } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNamed: public LTemplateInstruction<1, 0, 0> { +class LCallNamed V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallNamed, "call-named") DECLARE_HYDROGEN_ACCESSOR(CallNamed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const { return hydrogen()->name(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallFunction: public LTemplateInstruction<1, 1, 0> { +class LCallFunction V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallFunction(LOperand* function) { inputs_[0] = function; @@ -1813,30 +1832,30 @@ class LCallFunction: public LTemplateInstruction<1, 1, 0> { }; -class LCallGlobal: public LTemplateInstruction<1, 0, 0> { +class LCallGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallGlobal, "call-global") DECLARE_HYDROGEN_ACCESSOR(CallGlobal) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const {return hydrogen()->name(); } int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallKnownGlobal: public LTemplateInstruction<1, 0, 0> { +class LCallKnownGlobal V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallKnownGlobal, "call-known-global") DECLARE_HYDROGEN_ACCESSOR(CallKnownGlobal) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNew: public LTemplateInstruction<1, 1, 0> { +class LCallNew V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallNew(LOperand* constructor) { inputs_[0] = constructor; @@ -1847,13 +1866,13 @@ class LCallNew: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new") DECLARE_HYDROGEN_ACCESSOR(CallNew) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallNewArray: public LTemplateInstruction<1, 1, 0> { +class LCallNewArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCallNewArray(LOperand* constructor) { inputs_[0] = constructor; @@ -1864,13 +1883,13 @@ class LCallNewArray: public LTemplateInstruction<1, 1, 0> { DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array") DECLARE_HYDROGEN_ACCESSOR(CallNewArray) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; int arity() const { return hydrogen()->argument_count() - 1; } }; -class LCallRuntime: public LTemplateInstruction<1, 0, 0> { +class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") DECLARE_HYDROGEN_ACCESSOR(CallRuntime) @@ -1880,7 +1899,7 @@ class LCallRuntime: public LTemplateInstruction<1, 0, 0> { }; -class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { +class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInteger32ToDouble(LOperand* value) { inputs_[0] = value; @@ -1892,7 +1911,7 @@ class LInteger32ToDouble: public LTemplateInstruction<1, 1, 0> { }; -class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { +class LInteger32ToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LInteger32ToSmi(LOperand* value) { inputs_[0] = value; @@ -1905,7 +1924,7 @@ class LInteger32ToSmi: public LTemplateInstruction<1, 1, 0> { }; -class LUint32ToDouble: public LTemplateInstruction<1, 1, 1> { +class LUint32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: explicit LUint32ToDouble(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1919,7 +1938,7 @@ class LUint32ToDouble: public LTemplateInstruction<1, 1, 1> { }; -class LNumberTagI: public LTemplateInstruction<1, 1, 0> { +class LNumberTagI V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LNumberTagI(LOperand* value) { inputs_[0] = value; @@ -1931,7 +1950,7 @@ class LNumberTagI: public LTemplateInstruction<1, 1, 0> { }; -class LNumberTagU: public LTemplateInstruction<1, 1, 1> { +class LNumberTagU V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: explicit LNumberTagU(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1945,7 +1964,7 @@ class LNumberTagU: public LTemplateInstruction<1, 1, 1> { }; -class LNumberTagD: public LTemplateInstruction<1, 1, 1> { +class LNumberTagD V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: explicit LNumberTagD(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -1961,7 +1980,7 @@ class LNumberTagD: public LTemplateInstruction<1, 1, 1> { // Sometimes truncating conversion from a tagged value to an int32. -class LDoubleToI: public LTemplateInstruction<1, 1, 0> { +class LDoubleToI V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LDoubleToI(LOperand* value) { inputs_[0] = value; @@ -1976,7 +1995,7 @@ class LDoubleToI: public LTemplateInstruction<1, 1, 0> { }; -class LDoubleToSmi: public LTemplateInstruction<1, 1, 0> { +class LDoubleToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LDoubleToSmi(LOperand* value) { inputs_[0] = value; @@ -1990,7 +2009,7 @@ class LDoubleToSmi: public LTemplateInstruction<1, 1, 0> { // Truncating conversion from a tagged value to an int32. -class LTaggedToI: public LTemplateInstruction<1, 1, 1> { +class LTaggedToI V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LTaggedToI(LOperand* value, LOperand* temp) { inputs_[0] = value; @@ -2007,7 +2026,7 @@ class LTaggedToI: public LTemplateInstruction<1, 1, 1> { }; -class LSmiTag: public LTemplateInstruction<1, 1, 0> { +class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LSmiTag(LOperand* value) { inputs_[0] = value; @@ -2019,7 +2038,7 @@ class LSmiTag: public LTemplateInstruction<1, 1, 0> { }; -class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { +class LNumberUntagD V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LNumberUntagD(LOperand* value) { inputs_[0] = value; @@ -2032,7 +2051,7 @@ class LNumberUntagD: public LTemplateInstruction<1, 1, 0> { }; -class LSmiUntag: public LTemplateInstruction<1, 1, 0> { +class LSmiUntag V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: LSmiUntag(LOperand* value, bool needs_check) : needs_check_(needs_check) { @@ -2049,7 +2068,7 @@ class LSmiUntag: public LTemplateInstruction<1, 1, 0> { }; -class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { +class LStoreNamedField V8_FINAL : public LTemplateInstruction<0, 2, 1> { public: LStoreNamedField(LOperand* object, LOperand* value, LOperand* temp) { inputs_[0] = object; @@ -2064,7 +2083,7 @@ class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field") DECLARE_HYDROGEN_ACCESSOR(StoreNamedField) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle transition() const { return hydrogen()->transition_map(); } Representation representation() const { @@ -2073,7 +2092,7 @@ class LStoreNamedField: public LTemplateInstruction<0, 2, 1> { }; -class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { +class LStoreNamedGeneric V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LStoreNamedGeneric(LOperand* object, LOperand* value) { inputs_[0] = object; @@ -2086,14 +2105,14 @@ class LStoreNamedGeneric: public LTemplateInstruction<0, 2, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic") DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle name() const { return hydrogen()->name(); } StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } }; -class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { +class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: LStoreKeyed(LOperand* object, LOperand* key, LOperand* value) { inputs_[0] = object; @@ -2110,13 +2129,13 @@ class LStoreKeyed: public LTemplateInstruction<0, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); } uint32_t additional_index() const { return hydrogen()->index_offset(); } }; -class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { +class LStoreKeyedGeneric V8_FINAL : public LTemplateInstruction<0, 3, 0> { public: LStoreKeyedGeneric(LOperand* object, LOperand* key, LOperand* value) { inputs_[0] = object; @@ -2131,13 +2150,13 @@ class LStoreKeyedGeneric: public LTemplateInstruction<0, 3, 0> { DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic") DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } }; -class LTransitionElementsKind: public LTemplateInstruction<0, 1, 2> { +class LTransitionElementsKind V8_FINAL : public LTemplateInstruction<0, 1, 2> { public: LTransitionElementsKind(LOperand* object, LOperand* new_map_temp, @@ -2155,7 +2174,7 @@ class LTransitionElementsKind: public LTemplateInstruction<0, 1, 2> { "transition-elements-kind") DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind) - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; Handle original_map() { return hydrogen()->original_map(); } Handle transitioned_map() { return hydrogen()->transitioned_map(); } @@ -2164,7 +2183,7 @@ class LTransitionElementsKind: public LTemplateInstruction<0, 1, 2> { }; -class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { +class LTrapAllocationMemento V8_FINAL : public LTemplateInstruction<0, 1, 1> { public: LTrapAllocationMemento(LOperand* object, LOperand* temp) { @@ -2180,7 +2199,7 @@ class LTrapAllocationMemento : public LTemplateInstruction<0, 1, 1> { }; -class LStringAdd: public LTemplateInstruction<1, 2, 0> { +class LStringAdd V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LStringAdd(LOperand* left, LOperand* right) { inputs_[0] = left; @@ -2195,7 +2214,7 @@ class LStringAdd: public LTemplateInstruction<1, 2, 0> { }; -class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { +class LStringCharCodeAt V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LStringCharCodeAt(LOperand* string, LOperand* index) { inputs_[0] = string; @@ -2210,7 +2229,7 @@ class LStringCharCodeAt: public LTemplateInstruction<1, 2, 0> { }; -class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { +class LStringCharFromCode V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LStringCharFromCode(LOperand* char_code) { inputs_[0] = char_code; @@ -2223,7 +2242,7 @@ class LStringCharFromCode: public LTemplateInstruction<1, 1, 0> { }; -class LCheckFunction: public LTemplateInstruction<0, 1, 0> { +class LCheckFunction V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckFunction(LOperand* value) { inputs_[0] = value; @@ -2236,7 +2255,7 @@ class LCheckFunction: public LTemplateInstruction<0, 1, 0> { }; -class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> { +class LCheckInstanceType V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckInstanceType(LOperand* value) { inputs_[0] = value; @@ -2249,7 +2268,7 @@ class LCheckInstanceType: public LTemplateInstruction<0, 1, 0> { }; -class LCheckMaps: public LTemplateInstruction<0, 1, 0> { +class LCheckMaps V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckMaps(LOperand* value) { inputs_[0] = value; @@ -2262,7 +2281,7 @@ class LCheckMaps: public LTemplateInstruction<0, 1, 0> { }; -class LCheckSmi: public LTemplateInstruction<1, 1, 0> { +class LCheckSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LCheckSmi(LOperand* value) { inputs_[0] = value; @@ -2274,7 +2293,7 @@ class LCheckSmi: public LTemplateInstruction<1, 1, 0> { }; -class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { +class LClampDToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LClampDToUint8(LOperand* unclamped) { inputs_[0] = unclamped; @@ -2286,7 +2305,7 @@ class LClampDToUint8: public LTemplateInstruction<1, 1, 0> { }; -class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { +class LClampIToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LClampIToUint8(LOperand* unclamped) { inputs_[0] = unclamped; @@ -2298,7 +2317,7 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { }; -class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { +class LClampTToUint8 V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LClampTToUint8(LOperand* unclamped, LOperand* temp_xmm) { @@ -2313,7 +2332,7 @@ class LClampTToUint8: public LTemplateInstruction<1, 1, 1> { }; -class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { +class LCheckNonSmi V8_FINAL : public LTemplateInstruction<0, 1, 0> { public: explicit LCheckNonSmi(LOperand* value) { inputs_[0] = value; @@ -2326,7 +2345,7 @@ class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { }; -class LAllocate: public LTemplateInstruction<1, 1, 1> { +class LAllocate V8_FINAL : public LTemplateInstruction<1, 1, 1> { public: LAllocate(LOperand* size, LOperand* temp) { inputs_[0] = size; @@ -2341,21 +2360,21 @@ class LAllocate: public LTemplateInstruction<1, 1, 1> { }; -class LRegExpLiteral: public LTemplateInstruction<1, 0, 0> { +class LRegExpLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(RegExpLiteral, "regexp-literal") DECLARE_HYDROGEN_ACCESSOR(RegExpLiteral) }; -class LFunctionLiteral: public LTemplateInstruction<1, 0, 0> { +class LFunctionLiteral V8_FINAL : public LTemplateInstruction<1, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(FunctionLiteral, "function-literal") DECLARE_HYDROGEN_ACCESSOR(FunctionLiteral) }; -class LToFastProperties: public LTemplateInstruction<1, 1, 0> { +class LToFastProperties V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LToFastProperties(LOperand* value) { inputs_[0] = value; @@ -2368,7 +2387,7 @@ class LToFastProperties: public LTemplateInstruction<1, 1, 0> { }; -class LTypeof: public LTemplateInstruction<1, 1, 0> { +class LTypeof V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LTypeof(LOperand* value) { inputs_[0] = value; @@ -2380,7 +2399,7 @@ class LTypeof: public LTemplateInstruction<1, 1, 0> { }; -class LTypeofIsAndBranch: public LControlInstruction<1, 0> { +class LTypeofIsAndBranch V8_FINAL : public LControlInstruction<1, 0> { public: explicit LTypeofIsAndBranch(LOperand* value) { inputs_[0] = value; @@ -2393,11 +2412,11 @@ class LTypeofIsAndBranch: public LControlInstruction<1, 0> { Handle type_literal() { return hydrogen()->type_literal(); } - virtual void PrintDataTo(StringStream* stream); + virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; }; -class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { +class LIsConstructCallAndBranch V8_FINAL : public LControlInstruction<0, 1> { public: explicit LIsConstructCallAndBranch(LOperand* temp) { temps_[0] = temp; @@ -2411,16 +2430,18 @@ class LIsConstructCallAndBranch: public LControlInstruction<0, 1> { }; -class LOsrEntry: public LTemplateInstruction<0, 0, 0> { +class LOsrEntry V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: LOsrEntry() {} - virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } + virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { + return false; + } DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") }; -class LStackCheck: public LTemplateInstruction<0, 0, 0> { +class LStackCheck V8_FINAL : public LTemplateInstruction<0, 0, 0> { public: DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") DECLARE_HYDROGEN_ACCESSOR(StackCheck) @@ -2432,7 +2453,7 @@ class LStackCheck: public LTemplateInstruction<0, 0, 0> { }; -class LForInPrepareMap: public LTemplateInstruction<1, 1, 0> { +class LForInPrepareMap V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LForInPrepareMap(LOperand* object) { inputs_[0] = object; @@ -2444,7 +2465,7 @@ class LForInPrepareMap: public LTemplateInstruction<1, 1, 0> { }; -class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { +class LForInCacheArray V8_FINAL : public LTemplateInstruction<1, 1, 0> { public: explicit LForInCacheArray(LOperand* map) { inputs_[0] = map; @@ -2460,7 +2481,7 @@ class LForInCacheArray: public LTemplateInstruction<1, 1, 0> { }; -class LCheckMapValue: public LTemplateInstruction<0, 2, 0> { +class LCheckMapValue V8_FINAL : public LTemplateInstruction<0, 2, 0> { public: LCheckMapValue(LOperand* value, LOperand* map) { inputs_[0] = value; @@ -2474,7 +2495,7 @@ class LCheckMapValue: public LTemplateInstruction<0, 2, 0> { }; -class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { +class LLoadFieldByIndex V8_FINAL : public LTemplateInstruction<1, 2, 0> { public: LLoadFieldByIndex(LOperand* object, LOperand* index) { inputs_[0] = object; @@ -2489,7 +2510,7 @@ class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> { class LChunkBuilder; -class LPlatformChunk: public LChunk { +class LPlatformChunk V8_FINAL : public LChunk { public: LPlatformChunk(CompilationInfo* info, HGraph* graph) : LChunk(info, graph) { } @@ -2499,7 +2520,7 @@ class LPlatformChunk: public LChunk { }; -class LChunkBuilder BASE_EMBEDDED { +class LChunkBuilder V8_FINAL BASE_EMBEDDED { public: LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) : chunk_(NULL),