Consistently use only one of virtual/OVERRIDE/FINAL.

FINAL implies OVERRIDE, which in turn implies virtual, so there's no need to use
more than one of these. The Google C++ style guide even requires this, see
http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Inheritance.

While we're here, port r24662 to x87.

The net result is that v8 compiles again with a current clang.

BUG=v8:3753
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#25792}
This commit is contained in:
svenpanne 2014-12-12 02:44:12 -08:00 committed by Commit bot
parent 0d8fb5dc0b
commit 71bb00e261
64 changed files with 1664 additions and 1989 deletions

View File

@ -238,13 +238,6 @@
],
},
}],
['clang==1', {
'target_defaults': {
# Remove once issue 3753 is fixed.
'cflags_cc': [ '-Wno-inconsistent-missing-override',
'-Wno-unknown-warning-option', ],
},
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
or OS=="netbsd"', {
'target_defaults': {

View File

@ -74,7 +74,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
static void PatchBranchIntoNop(MacroAssembler* masm, int pos) {
masm->instr_at_put(pos, (masm->instr_at(pos) & ~B27) | (B24 | B20));
@ -197,9 +197,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; }
inline Major MajorKey() const FINAL { return RecordWrite; }
virtual void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) OVERRIDE;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
@ -207,7 +207,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
void Activate(Code* code) {
void Activate(Code* code) OVERRIDE {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}
@ -255,7 +255,7 @@ class DirectCEntryStub: public PlatformCodeStub {
void GenerateCall(MacroAssembler* masm, Register target);
private:
bool NeedsImmovableCode() { return true; }
bool NeedsImmovableCode() OVERRIDE { return true; }
DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
@ -287,7 +287,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register r0,
Register r1);
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
private:
static const int kInlinedProbes = 4;

View File

@ -166,17 +166,13 @@ class LCodeGen;
V(WrapReceiver)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
virtual Opcode opcode() const FINAL OVERRIDE { \
return LInstruction::k##type; \
} \
virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
virtual const char* Mnemonic() const FINAL OVERRIDE { \
return mnemonic; \
} \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
Opcode opcode() const FINAL { return LInstruction::k##type; } \
void CompileToNative(LCodeGen* generator) FINAL; \
const char* Mnemonic() const FINAL { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
}
@ -291,11 +287,9 @@ class LTemplateResultInstruction : public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
virtual bool HasResult() const FINAL OVERRIDE {
return R != 0 && result() != NULL;
}
bool HasResult() const FINAL { return R != 0 && result() != NULL; }
void set_result(LOperand* operand) { results_[0] = operand; }
LOperand* result() const { return results_[0]; }
LOperand* result() const OVERRIDE { return results_[0]; }
protected:
EmbeddedContainer<LOperand*, R> results_;
@ -313,11 +307,11 @@ class LTemplateInstruction : public LTemplateResultInstruction<R> {
private:
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return I; }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return I; }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return T; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; }
int TempCount() FINAL { return T; }
LOperand* TempAt(int i) FINAL { return temps_[i]; }
};
@ -332,8 +326,8 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
}
// Can't use the DECLARE-macro here because of sub-classes.
virtual bool IsGap() const OVERRIDE { return true; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsGap() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
static LGap* cast(LInstruction* instr) {
DCHECK(instr->IsGap());
return reinterpret_cast<LGap*>(instr);
@ -373,7 +367,7 @@ class LInstructionGap FINAL : public LGap {
public:
explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return !IsRedundant();
}
@ -385,10 +379,10 @@ class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
public:
explicit LGoto(HBasicBlock* block) : block_(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
virtual bool IsControl() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsControl() const OVERRIDE { return true; }
int block_id() const { return block_->block_id(); }
@ -431,7 +425,7 @@ class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> {
class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool IsControl() const OVERRIDE { return true; }
bool IsControl() const OVERRIDE { return true; }
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
};
@ -442,12 +436,10 @@ class LLabel FINAL : public LGap {
explicit LLabel(HBasicBlock* block)
: LGap(block), replacement_(NULL) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Label, "label")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int block_id() const { return block()->block_id(); }
bool is_loop_header() const { return block()->IsLoopHeader(); }
@ -465,7 +457,7 @@ class LLabel FINAL : public LGap {
class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
};
@ -505,9 +497,7 @@ class LTailCallThroughMegamorphicCache FINAL
class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
@ -517,7 +507,7 @@ class LControlInstruction : public LTemplateInstruction<0, I, T> {
public:
LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
virtual bool IsControl() const FINAL OVERRIDE { return true; }
bool IsControl() const FINAL { return true; }
int SuccessorCount() { return hydrogen()->SuccessorCount(); }
HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
@ -606,7 +596,7 @@ class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* length() { return inputs_[1]; }
LOperand* index() { return inputs_[2]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -869,7 +859,7 @@ class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
return hydrogen()->representation().IsDouble();
}
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1053,7 +1043,7 @@ class LIsObjectAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1070,7 +1060,7 @@ class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1085,7 +1075,7 @@ class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1103,7 +1093,7 @@ class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
"is-undetectable-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1125,7 +1115,7 @@ class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
Token::Value op() const { return hydrogen()->token(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1141,7 +1131,7 @@ class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> {
"has-instance-type-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1171,7 +1161,7 @@ class LHasCachedArrayIndexAndBranch FINAL
"has-cached-array-index-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1189,7 +1179,7 @@ class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> {
"class-of-test-and-branch")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1401,7 +1391,7 @@ class LBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
DECLARE_HYDROGEN_ACCESSOR(Branch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1546,11 +1536,9 @@ class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* left() { return inputs_[0]; }
LOperand* right() { return inputs_[1]; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticD;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1574,11 +1562,9 @@ class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* right() { return inputs_[2]; }
Token::Value op() const { return op_; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticT;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1687,7 +1673,7 @@ class LLoadKeyed FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
uint32_t base_offset() const { return hydrogen()->base_offset(); }
};
@ -1768,7 +1754,7 @@ class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1787,7 +1773,7 @@ class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1826,7 +1812,7 @@ class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> {
LOperand* function() { return inputs_[0]; }
LOperand* code_object() { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
@ -1843,7 +1829,7 @@ class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> {
LOperand* base_object() const { return inputs_[0]; }
LOperand* offset() const { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
};
@ -1887,7 +1873,7 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1911,7 +1897,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
@ -1919,11 +1905,11 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
ZoneList<LOperand*> inputs_;
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return inputs_.length(); }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return 0; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; }
int TempCount() FINAL { return 0; }
LOperand* TempAt(int i) FINAL { return NULL; }
};
@ -1940,7 +1926,7 @@ class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1976,7 +1962,7 @@ class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1995,7 +1981,7 @@ class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -2012,7 +1998,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return save_doubles() == kDontSaveFPRegs;
}
@ -2206,7 +2192,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 1> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Representation representation() const {
return hydrogen()->field_representation();
@ -2229,7 +2215,7 @@ class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Object> name() const { return hydrogen()->name(); }
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
@ -2261,7 +2247,7 @@ class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
bool NeedsCanonicalization() {
if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() ||
hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) {
@ -2293,7 +2279,7 @@ class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2317,7 +2303,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> {
"transition-elements-kind")
DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
Handle<Map> transitioned_map() {
@ -2611,7 +2597,7 @@ class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 0> {
Handle<String> type_literal() { return hydrogen()->type_literal(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2632,9 +2618,7 @@ class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
public:
LOsrEntry() {}
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
};
@ -2839,7 +2823,7 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
// An input operand in register, stack slot or a constant operand.
// Will not be moved to a register even if one is freely available.
virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
// Temporary operand that must be in a register.
MUST_USE_RESULT LUnallocated* TempRegister();

View File

@ -27,9 +27,9 @@ class SafepointGenerator FINAL : public CallWrapper {
deopt_mode_(mode) { }
virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const OVERRIDE {}
void BeforeCall(int call_size) const OVERRIDE {}
virtual void AfterCall() const OVERRIDE {
void AfterCall() const OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_);
}
@ -2785,11 +2785,11 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_,
&load_bool_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; }
Label* load_bool() { return &load_bool_; }
@ -3761,10 +3761,11 @@ void LCodeGen::DoMathAbs(LMathAbs* instr) {
public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LMathAbs* instr_;
};
@ -4530,10 +4531,9 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharCodeAt* instr_;
};
@ -4586,10 +4586,11 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharFromCode* instr_;
};
@ -4663,14 +4664,15 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
public:
DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_,
instr_->value(),
instr_->temp1(),
instr_->temp2(),
SIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagI* instr_;
};
@ -4690,14 +4692,15 @@ void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_,
instr_->value(),
instr_->temp1(),
instr_->temp2(),
UNSIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagU* instr_;
};
@ -4784,10 +4787,9 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagD* instr_;
};
@ -5003,10 +5005,9 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredTaggedToI(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LTaggedToI* instr_;
};
@ -5200,11 +5201,12 @@ void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
: LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps());
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_);
}
Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LCheckMaps* instr_;
Label check_maps_;
@ -5328,10 +5330,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LAllocate* instr_;
};
@ -5693,10 +5694,9 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStackCheck* instr_;
};
@ -5849,10 +5849,11 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LLoadFieldByIndex* instr_;
Register result_;

View File

@ -97,7 +97,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
static Mode GetMode(Code* stub) {
// Find the mode depending on the first two instructions.
@ -275,9 +275,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; }
inline Major MajorKey() const FINAL { return RecordWrite; }
virtual void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) OVERRIDE;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
@ -285,7 +285,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
void Activate(Code* code) {
void Activate(Code* code) OVERRIDE {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}
@ -328,7 +328,7 @@ class DirectCEntryStub: public PlatformCodeStub {
void GenerateCall(MacroAssembler* masm, Register target);
private:
bool NeedsImmovableCode() { return true; }
bool NeedsImmovableCode() OVERRIDE { return true; }
DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
@ -360,7 +360,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register scratch1,
Register scratch2);
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
private:
static const int kInlinedProbes = 4;

View File

@ -178,17 +178,13 @@ class LCodeGen;
V(WrapReceiver)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
virtual Opcode opcode() const FINAL OVERRIDE { \
return LInstruction::k##type; \
} \
virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
virtual const char* Mnemonic() const FINAL OVERRIDE { \
return mnemonic; \
} \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
Opcode opcode() const FINAL { return LInstruction::k##type; } \
void CompileToNative(LCodeGen* generator) FINAL; \
const char* Mnemonic() const FINAL { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
}
@ -295,11 +291,9 @@ class LTemplateResultInstruction : public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
virtual bool HasResult() const FINAL OVERRIDE {
return (R != 0) && (result() != NULL);
}
bool HasResult() const FINAL { return (R != 0) && (result() != NULL); }
void set_result(LOperand* operand) { results_[0] = operand; }
LOperand* result() const { return results_[0]; }
LOperand* result() const OVERRIDE { return results_[0]; }
protected:
EmbeddedContainer<LOperand*, R> results_;
@ -317,11 +311,11 @@ class LTemplateInstruction : public LTemplateResultInstruction<R> {
private:
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return I; }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return I; }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return T; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; }
int TempCount() FINAL { return T; }
LOperand* TempAt(int i) FINAL { return temps_[i]; }
};
@ -348,9 +342,7 @@ class LTailCallThroughMegamorphicCache FINAL
class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
@ -360,7 +352,7 @@ class LControlInstruction : public LTemplateInstruction<0, I, T> {
public:
LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
virtual bool IsControl() const FINAL OVERRIDE { return true; }
bool IsControl() const FINAL { return true; }
int SuccessorCount() { return hydrogen()->SuccessorCount(); }
HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
@ -410,8 +402,8 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
}
// Can't use the DECLARE-macro here because of sub-classes.
virtual bool IsGap() const OVERRIDE { return true; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsGap() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
static LGap* cast(LInstruction* instr) {
DCHECK(instr->IsGap());
return reinterpret_cast<LGap*>(instr);
@ -451,7 +443,7 @@ class LInstructionGap FINAL : public LGap {
public:
explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return !IsRedundant();
}
@ -492,10 +484,10 @@ class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
public:
explicit LGoto(HBasicBlock* block) : block_(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
virtual bool IsControl() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsControl() const OVERRIDE { return true; }
int block_id() const { return block_->block_id(); }
@ -525,12 +517,10 @@ class LLabel FINAL : public LGap {
explicit LLabel(HBasicBlock* block)
: LGap(block), replacement_(NULL) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Label, "label")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int block_id() const { return block()->block_id(); }
bool is_loop_header() const { return block()->IsLoopHeader(); }
@ -550,9 +540,7 @@ class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
public:
LOsrEntry() {}
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
};
@ -573,7 +561,7 @@ class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* length() { return inputs_[1]; }
LOperand* index() { return inputs_[2]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -721,11 +709,9 @@ class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* left() { return inputs_[0]; }
LOperand* right() { return inputs_[1]; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticD;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -749,11 +735,9 @@ class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* right() { return inputs_[2]; }
Token::Value op() const { return op_; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticT;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -838,7 +822,7 @@ class LBranch FINAL : public LControlInstruction<1, 2> {
DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
DECLARE_HYDROGEN_ACCESSOR(Branch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -853,7 +837,7 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -889,7 +873,7 @@ class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -908,7 +892,7 @@ class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -925,7 +909,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return save_doubles() == kDontSaveFPRegs;
}
@ -1097,7 +1081,7 @@ class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 2> {
"class-of-test-and-branch")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1215,7 +1199,7 @@ class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
return hydrogen()->representation().IsDouble();
}
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1313,7 +1297,7 @@ class LDeclareGlobals FINAL : public LTemplateInstruction<0, 1, 0> {
class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool IsControl() const OVERRIDE { return true; }
bool IsControl() const OVERRIDE { return true; }
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
};
@ -1447,7 +1431,7 @@ class LHasCachedArrayIndexAndBranch FINAL
"has-cached-array-index-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1465,7 +1449,7 @@ class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 1> {
"has-instance-type-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1479,7 +1463,7 @@ class LInnerAllocatedObject FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* base_object() const { return inputs_[0]; }
LOperand* offset() const { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
};
@ -1559,7 +1543,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
@ -1567,11 +1551,11 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
ZoneList<LOperand*> inputs_;
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return inputs_.length(); }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return 0; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; }
int TempCount() FINAL { return 0; }
LOperand* TempAt(int i) FINAL { return NULL; }
};
@ -1588,7 +1572,7 @@ class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1624,7 +1608,7 @@ class LIsObjectAndBranch FINAL : public LControlInstruction<1, 2> {
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1641,7 +1625,7 @@ class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1656,7 +1640,7 @@ class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1674,7 +1658,7 @@ class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
"is-undetectable-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1691,7 +1675,7 @@ class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
int slot_index() const { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2272,7 +2256,7 @@ class LNumberUntagD FINAL : public LTemplateInstruction<1, 1, 1> {
class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
};
@ -2331,11 +2315,11 @@ class LPushArguments FINAL : public LTemplateResultInstruction<0> {
private:
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return inputs_.length(); }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return 0; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; }
int TempCount() FINAL { return 0; }
LOperand* TempAt(int i) FINAL { return NULL; }
};
@ -2585,7 +2569,7 @@ class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2609,7 +2593,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 2> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Representation representation() const {
return hydrogen()->field_representation();
@ -2632,7 +2616,7 @@ class LStoreNamedGeneric FINAL: public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Object> name() const { return hydrogen()->name(); }
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
@ -2707,7 +2691,7 @@ class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
Token::Value op() const { return hydrogen()->token(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2786,7 +2770,7 @@ class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 1> {
LOperand* code_object() { return inputs_[1]; }
LOperand* temp() { return temps_[0]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
@ -2810,7 +2794,7 @@ class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 1> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2916,7 +2900,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> {
"transition-elements-kind")
DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
Handle<Map> transitioned_map() {
@ -2991,7 +2975,7 @@ class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 2> {
Handle<String> type_literal() const { return hydrogen()->type_literal(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};

View File

@ -5986,10 +5986,11 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LLoadFieldByIndex* instr_;
Register result_;

View File

@ -15,7 +15,7 @@ class AstThisAccessVisitor : public AstVisitor {
bool UsesThis() { return uses_this_; }
#define DECLARE_VISIT(type) virtual void Visit##type(type* node);
#define DECLARE_VISIT(type) void Visit##type(type* node) OVERRIDE;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT

View File

@ -56,22 +56,20 @@ class AstRawStringInternalizationKey : public HashTableKey {
explicit AstRawStringInternalizationKey(const AstRawString* string)
: string_(string) {}
virtual bool IsMatch(Object* other) OVERRIDE {
bool IsMatch(Object* other) OVERRIDE {
if (string_->is_one_byte_)
return String::cast(other)->IsOneByteEqualTo(string_->literal_bytes_);
return String::cast(other)->IsTwoByteEqualTo(
Vector<const uint16_t>::cast(string_->literal_bytes_));
}
virtual uint32_t Hash() OVERRIDE {
return string_->hash() >> Name::kHashShift;
}
uint32_t Hash() OVERRIDE { return string_->hash() >> Name::kHashShift; }
virtual uint32_t HashForObject(Object* key) OVERRIDE {
uint32_t HashForObject(Object* key) OVERRIDE {
return String::cast(key)->Hash();
}
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
if (string_->is_one_byte_)
return isolate->factory()->NewOneByteInternalizedString(
string_->literal_bytes_, string_->hash());

View File

@ -64,13 +64,13 @@ class AstString : public ZoneObject {
class AstRawString : public AstString {
public:
virtual int length() const OVERRIDE {
int length() const OVERRIDE {
if (is_one_byte_)
return literal_bytes_.length();
return literal_bytes_.length() / 2;
}
virtual void Internalize(Isolate* isolate) OVERRIDE;
void Internalize(Isolate* isolate) OVERRIDE;
bool AsArrayIndex(uint32_t* index) const;
@ -124,11 +124,9 @@ class AstConsString : public AstString {
: left_(left),
right_(right) {}
virtual int length() const OVERRIDE {
return left_->length() + right_->length();
}
int length() const OVERRIDE { return left_->length() + right_->length(); }
virtual void Internalize(Isolate* isolate) OVERRIDE;
void Internalize(Isolate* isolate) OVERRIDE;
private:
friend class AstValueFactory;

366
src/ast.h
View File

@ -141,11 +141,9 @@ typedef ZoneList<Handle<String> > ZoneStringList;
typedef ZoneList<Handle<Object> > ZoneObjectList;
#define DECLARE_NODE_TYPE(type) \
virtual void Accept(AstVisitor* v) OVERRIDE; \
virtual AstNode::NodeType node_type() const FINAL OVERRIDE { \
return AstNode::k##type; \
} \
#define DECLARE_NODE_TYPE(type) \
void Accept(AstVisitor* v) OVERRIDE; \
AstNode::NodeType node_type() const FINAL { return AstNode::k##type; } \
friend class AstNodeFactory;
@ -446,9 +444,7 @@ class BreakableStatement : public Statement {
ZoneList<const AstRawString*>* labels() const { return labels_; }
// Type testing & conversion.
virtual BreakableStatement* AsBreakableStatement() FINAL OVERRIDE {
return this;
}
BreakableStatement* AsBreakableStatement() FINAL { return this; }
// Code generation
Label* break_target() { return &break_target_; }
@ -503,7 +499,7 @@ class Block FINAL : public BreakableStatement {
static int num_ids() { return parent_num_ids() + 1; }
BailoutId DeclsId() const { return BailoutId(local_id(0)); }
virtual bool IsJump() const OVERRIDE {
bool IsJump() const OVERRIDE {
return !statements_.is_empty() && statements_.last()->IsJump()
&& labels() == NULL; // Good enough as an approximation...
}
@ -557,7 +553,7 @@ class VariableDeclaration FINAL : public Declaration {
public:
DECLARE_NODE_TYPE(VariableDeclaration)
virtual InitializationFlag initialization() const OVERRIDE {
InitializationFlag initialization() const OVERRIDE {
return mode() == VAR ? kCreatedInitialized : kNeedsInitialization;
}
@ -577,10 +573,10 @@ class FunctionDeclaration FINAL : public Declaration {
DECLARE_NODE_TYPE(FunctionDeclaration)
FunctionLiteral* fun() const { return fun_; }
virtual InitializationFlag initialization() const OVERRIDE {
InitializationFlag initialization() const OVERRIDE {
return kCreatedInitialized;
}
virtual bool IsInlineable() const OVERRIDE;
bool IsInlineable() const OVERRIDE;
protected:
FunctionDeclaration(Zone* zone,
@ -606,7 +602,7 @@ class ModuleDeclaration FINAL : public Declaration {
DECLARE_NODE_TYPE(ModuleDeclaration)
Module* module() const { return module_; }
virtual InitializationFlag initialization() const OVERRIDE {
InitializationFlag initialization() const OVERRIDE {
return kCreatedInitialized;
}
@ -630,7 +626,7 @@ class ImportDeclaration FINAL : public Declaration {
DECLARE_NODE_TYPE(ImportDeclaration)
Module* module() const { return module_; }
virtual InitializationFlag initialization() const OVERRIDE {
InitializationFlag initialization() const OVERRIDE {
return kCreatedInitialized;
}
@ -653,7 +649,7 @@ class ExportDeclaration FINAL : public Declaration {
public:
DECLARE_NODE_TYPE(ExportDeclaration)
virtual InitializationFlag initialization() const OVERRIDE {
InitializationFlag initialization() const OVERRIDE {
return kCreatedInitialized;
}
@ -764,9 +760,7 @@ class ModuleStatement FINAL : public Statement {
class IterationStatement : public BreakableStatement {
public:
// Type testing & conversion.
virtual IterationStatement* AsIterationStatement() FINAL OVERRIDE {
return this;
}
IterationStatement* AsIterationStatement() FINAL { return this; }
Statement* body() const { return body_; }
@ -805,10 +799,8 @@ class DoWhileStatement FINAL : public IterationStatement {
Expression* cond() const { return cond_; }
static int num_ids() { return parent_num_ids() + 2; }
virtual BailoutId ContinueId() const OVERRIDE {
return BailoutId(local_id(0));
}
virtual BailoutId StackCheckId() const OVERRIDE { return BackEdgeId(); }
BailoutId ContinueId() const OVERRIDE { return BailoutId(local_id(0)); }
BailoutId StackCheckId() const OVERRIDE { return BackEdgeId(); }
BailoutId BackEdgeId() const { return BailoutId(local_id(1)); }
protected:
@ -835,8 +827,8 @@ class WhileStatement FINAL : public IterationStatement {
Expression* cond() const { return cond_; }
static int num_ids() { return parent_num_ids() + 1; }
virtual BailoutId ContinueId() const OVERRIDE { return EntryId(); }
virtual BailoutId StackCheckId() const OVERRIDE { return BodyId(); }
BailoutId ContinueId() const OVERRIDE { return EntryId(); }
BailoutId StackCheckId() const OVERRIDE { return BodyId(); }
BailoutId BodyId() const { return BailoutId(local_id(0)); }
protected:
@ -870,10 +862,8 @@ class ForStatement FINAL : public IterationStatement {
Statement* next() const { return next_; }
static int num_ids() { return parent_num_ids() + 2; }
virtual BailoutId ContinueId() const OVERRIDE {
return BailoutId(local_id(0));
}
virtual BailoutId StackCheckId() const OVERRIDE { return BodyId(); }
BailoutId ContinueId() const OVERRIDE { return BailoutId(local_id(0)); }
BailoutId StackCheckId() const OVERRIDE { return BodyId(); }
BailoutId BodyId() const { return BailoutId(local_id(1)); }
protected:
@ -932,7 +922,7 @@ class ForInStatement FINAL : public ForEachStatement {
Isolate* isolate) OVERRIDE {
return FeedbackVectorRequirements(1, 0);
}
virtual void SetFirstFeedbackSlot(FeedbackVectorSlot slot) OVERRIDE {
void SetFirstFeedbackSlot(FeedbackVectorSlot slot) OVERRIDE {
for_in_feedback_slot_ = slot;
}
@ -950,8 +940,8 @@ class ForInStatement FINAL : public ForEachStatement {
BailoutId PrepareId() const { return BailoutId(local_id(1)); }
BailoutId EnumId() const { return BailoutId(local_id(2)); }
BailoutId ToObjectId() const { return BailoutId(local_id(3)); }
virtual BailoutId ContinueId() const OVERRIDE { return EntryId(); }
virtual BailoutId StackCheckId() const OVERRIDE { return BodyId(); }
BailoutId ContinueId() const OVERRIDE { return EntryId(); }
BailoutId StackCheckId() const OVERRIDE { return BodyId(); }
protected:
ForInStatement(Zone* zone, ZoneList<const AstRawString*>* labels, int pos)
@ -1010,8 +1000,8 @@ class ForOfStatement FINAL : public ForEachStatement {
return assign_each_;
}
virtual BailoutId ContinueId() const OVERRIDE { return EntryId(); }
virtual BailoutId StackCheckId() const OVERRIDE { return BackEdgeId(); }
BailoutId ContinueId() const OVERRIDE { return EntryId(); }
BailoutId StackCheckId() const OVERRIDE { return BackEdgeId(); }
static int num_ids() { return parent_num_ids() + 1; }
BailoutId BackEdgeId() const { return BailoutId(local_id(0)); }
@ -1041,7 +1031,7 @@ class ExpressionStatement FINAL : public Statement {
void set_expression(Expression* e) { expression_ = e; }
Expression* expression() const { return expression_; }
virtual bool IsJump() const OVERRIDE { return expression_->IsThrow(); }
bool IsJump() const OVERRIDE { return expression_->IsThrow(); }
protected:
ExpressionStatement(Zone* zone, Expression* expression, int pos)
@ -1054,7 +1044,7 @@ class ExpressionStatement FINAL : public Statement {
class JumpStatement : public Statement {
public:
virtual bool IsJump() const FINAL OVERRIDE { return true; }
bool IsJump() const FINAL { return true; }
protected:
explicit JumpStatement(Zone* zone, int pos) : Statement(zone, pos) {}
@ -1204,7 +1194,7 @@ class IfStatement FINAL : public Statement {
Statement* then_statement() const { return then_statement_; }
Statement* else_statement() const { return else_statement_; }
virtual bool IsJump() const OVERRIDE {
bool IsJump() const OVERRIDE {
return HasThenStatement() && then_statement()->IsJump()
&& HasElseStatement() && else_statement()->IsJump();
}
@ -1253,9 +1243,9 @@ class TargetCollector FINAL : public AstNode {
void AddTarget(Label* target, Zone* zone);
// Virtual behaviour. TargetCollectors are never part of the AST.
virtual void Accept(AstVisitor* v) OVERRIDE { UNREACHABLE(); }
virtual NodeType node_type() const OVERRIDE { return kInvalid; }
virtual TargetCollector* AsTargetCollector() OVERRIDE { return this; }
void Accept(AstVisitor* v) OVERRIDE { UNREACHABLE(); }
NodeType node_type() const OVERRIDE { return kInvalid; }
TargetCollector* AsTargetCollector() OVERRIDE { return this; }
ZoneList<Label*>* targets() { return &targets_; }
@ -1374,9 +1364,7 @@ class Literal FINAL : public Expression {
public:
DECLARE_NODE_TYPE(Literal)
virtual bool IsPropertyName() const OVERRIDE {
return value_->IsPropertyName();
}
bool IsPropertyName() const OVERRIDE { return value_->IsPropertyName(); }
Handle<String> AsPropertyName() {
DCHECK(IsPropertyName());
@ -1388,12 +1376,8 @@ class Literal FINAL : public Expression {
return value_->AsString();
}
virtual bool ToBooleanIsTrue() const OVERRIDE {
return value()->BooleanValue();
}
virtual bool ToBooleanIsFalse() const OVERRIDE {
return !value()->BooleanValue();
}
bool ToBooleanIsTrue() const OVERRIDE { return value()->BooleanValue(); }
bool ToBooleanIsFalse() const OVERRIDE { return !value()->BooleanValue(); }
Handle<Object> value() const { return value_->value(); }
const AstValue* raw_value() const { return value_; }
@ -1664,7 +1648,7 @@ class VariableProxy FINAL : public Expression {
public:
DECLARE_NODE_TYPE(VariableProxy)
virtual bool IsValidReferenceExpression() const OVERRIDE {
bool IsValidReferenceExpression() const OVERRIDE {
return !is_resolved() || var()->IsValidReference();
}
@ -1711,12 +1695,10 @@ class VariableProxy FINAL : public Expression {
return FeedbackVectorRequirements(0, UsesVariableFeedbackSlot() ? 1 : 0);
}
virtual void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
variable_feedback_slot_ = slot;
}
virtual Code::Kind FeedbackICSlotKind(int index) OVERRIDE {
return Code::LOAD_IC;
}
Code::Kind FeedbackICSlotKind(int index) OVERRIDE { return Code::LOAD_IC; }
FeedbackVectorICSlot VariableFeedbackSlot() {
DCHECK(!UsesVariableFeedbackSlot() || !variable_feedback_slot_.IsInvalid());
return variable_feedback_slot_;
@ -1748,7 +1730,7 @@ class Property FINAL : public Expression {
public:
DECLARE_NODE_TYPE(Property)
virtual bool IsValidReferenceExpression() const OVERRIDE { return true; }
bool IsValidReferenceExpression() const OVERRIDE { return true; }
Expression* obj() const { return obj_; }
Expression* key() const { return key_; }
@ -1762,16 +1744,10 @@ class Property FINAL : public Expression {
}
// Type feedback information.
virtual bool IsMonomorphic() OVERRIDE {
return receiver_types_.length() == 1;
}
virtual SmallMapList* GetReceiverTypes() OVERRIDE {
return &receiver_types_;
}
virtual KeyedAccessStoreMode GetStoreMode() const OVERRIDE {
return STANDARD_STORE;
}
virtual IcCheckType GetKeyType() const OVERRIDE {
bool IsMonomorphic() OVERRIDE { return receiver_types_.length() == 1; }
SmallMapList* GetReceiverTypes() OVERRIDE { return &receiver_types_; }
KeyedAccessStoreMode GetStoreMode() const OVERRIDE { return STANDARD_STORE; }
IcCheckType GetKeyType() const OVERRIDE {
// PROPERTY key types currently aren't implemented for KeyedLoadICs.
return ELEMENT;
}
@ -1800,10 +1776,10 @@ class Property FINAL : public Expression {
Isolate* isolate) OVERRIDE {
return FeedbackVectorRequirements(0, FLAG_vector_ics ? 1 : 0);
}
virtual void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
property_feedback_slot_ = slot;
}
virtual Code::Kind FeedbackICSlotKind(int index) OVERRIDE {
Code::Kind FeedbackICSlotKind(int index) OVERRIDE {
return key()->IsPropertyName() ? Code::LOAD_IC : Code::KEYED_LOAD_IC;
}
@ -1847,12 +1823,10 @@ class Call FINAL : public Expression {
// Type feedback information.
virtual FeedbackVectorRequirements ComputeFeedbackRequirements(
Isolate* isolate) OVERRIDE;
virtual void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
call_feedback_slot_ = slot;
}
virtual Code::Kind FeedbackICSlotKind(int index) OVERRIDE {
return Code::CALL_IC;
}
Code::Kind FeedbackICSlotKind(int index) OVERRIDE { return Code::CALL_IC; }
bool HasCallFeedbackSlot() const { return !call_feedback_slot_.IsInvalid(); }
FeedbackVectorICSlot CallFeedbackSlot() const {
@ -1860,14 +1834,14 @@ class Call FINAL : public Expression {
return call_feedback_slot_;
}
virtual SmallMapList* GetReceiverTypes() OVERRIDE {
SmallMapList* GetReceiverTypes() OVERRIDE {
if (expression()->IsProperty()) {
return expression()->AsProperty()->GetReceiverTypes();
}
return NULL;
}
virtual bool IsMonomorphic() OVERRIDE {
bool IsMonomorphic() OVERRIDE {
if (expression()->IsProperty()) {
return expression()->AsProperty()->IsMonomorphic();
}
@ -1964,7 +1938,7 @@ class CallNew FINAL : public Expression {
Isolate* isolate) OVERRIDE {
return FeedbackVectorRequirements(FLAG_pretenuring_call_new ? 2 : 1, 0);
}
virtual void SetFirstFeedbackSlot(FeedbackVectorSlot slot) OVERRIDE {
void SetFirstFeedbackSlot(FeedbackVectorSlot slot) OVERRIDE {
callnew_feedback_slot_ = slot;
}
@ -1978,7 +1952,7 @@ class CallNew FINAL : public Expression {
}
void RecordTypeFeedback(TypeFeedbackOracle* oracle);
virtual bool IsMonomorphic() OVERRIDE { return is_monomorphic_; }
bool IsMonomorphic() OVERRIDE { return is_monomorphic_; }
Handle<JSFunction> target() const { return target_; }
Handle<AllocationSite> allocation_site() const {
return allocation_site_;
@ -2033,12 +2007,10 @@ class CallRuntime FINAL : public Expression {
Isolate* isolate) OVERRIDE {
return FeedbackVectorRequirements(0, HasCallRuntimeFeedbackSlot() ? 1 : 0);
}
virtual void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
callruntime_feedback_slot_ = slot;
}
virtual Code::Kind FeedbackICSlotKind(int index) OVERRIDE {
return Code::LOAD_IC;
}
Code::Kind FeedbackICSlotKind(int index) OVERRIDE { return Code::LOAD_IC; }
FeedbackVectorICSlot CallRuntimeFeedbackSlot() {
DCHECK(!HasCallRuntimeFeedbackSlot() ||
@ -2107,7 +2079,7 @@ class BinaryOperation FINAL : public Expression {
public:
DECLARE_NODE_TYPE(BinaryOperation)
virtual bool ResultOverwriteAllowed() const OVERRIDE;
bool ResultOverwriteAllowed() const OVERRIDE;
Token::Value op() const { return static_cast<Token::Value>(op_); }
Expression* left() const { return left_; }
@ -2178,16 +2150,12 @@ class CountOperation FINAL : public Expression {
Expression* expression() const { return expression_; }
virtual bool IsMonomorphic() OVERRIDE {
return receiver_types_.length() == 1;
}
virtual SmallMapList* GetReceiverTypes() OVERRIDE {
return &receiver_types_;
}
virtual IcCheckType GetKeyType() const OVERRIDE {
bool IsMonomorphic() OVERRIDE { return receiver_types_.length() == 1; }
SmallMapList* GetReceiverTypes() OVERRIDE { return &receiver_types_; }
IcCheckType GetKeyType() const OVERRIDE {
return KeyTypeField::decode(bit_field_);
}
virtual KeyedAccessStoreMode GetStoreMode() const OVERRIDE {
KeyedAccessStoreMode GetStoreMode() const OVERRIDE {
return StoreModeField::decode(bit_field_);
}
Type* type() const { return type_; }
@ -2332,22 +2300,18 @@ class Assignment FINAL : public Expression {
// Type feedback information.
TypeFeedbackId AssignmentFeedbackId() { return TypeFeedbackId(local_id(1)); }
virtual bool IsMonomorphic() OVERRIDE {
return receiver_types_.length() == 1;
}
bool IsMonomorphic() OVERRIDE { return receiver_types_.length() == 1; }
bool IsUninitialized() const {
return IsUninitializedField::decode(bit_field_);
}
bool HasNoTypeInformation() {
return IsUninitializedField::decode(bit_field_);
}
virtual SmallMapList* GetReceiverTypes() OVERRIDE {
return &receiver_types_;
}
virtual IcCheckType GetKeyType() const OVERRIDE {
SmallMapList* GetReceiverTypes() OVERRIDE { return &receiver_types_; }
IcCheckType GetKeyType() const OVERRIDE {
return KeyTypeField::decode(bit_field_);
}
virtual KeyedAccessStoreMode GetStoreMode() const OVERRIDE {
KeyedAccessStoreMode GetStoreMode() const OVERRIDE {
return StoreModeField::decode(bit_field_);
}
void set_is_uninitialized(bool b) {
@ -2418,10 +2382,10 @@ class Yield FINAL : public Expression {
Isolate* isolate) OVERRIDE {
return FeedbackVectorRequirements(0, HasFeedbackSlots() ? 3 : 0);
}
virtual void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
yield_first_feedback_slot_ = slot;
}
virtual Code::Kind FeedbackICSlotKind(int index) OVERRIDE {
Code::Kind FeedbackICSlotKind(int index) OVERRIDE {
return index == 0 ? Code::KEYED_LOAD_IC : Code::LOAD_IC;
}
@ -2758,12 +2722,10 @@ class SuperReference FINAL : public Expression {
Isolate* isolate) OVERRIDE {
return FeedbackVectorRequirements(0, FLAG_vector_ics ? 1 : 0);
}
virtual void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
void SetFirstFeedbackICSlot(FeedbackVectorICSlot slot) OVERRIDE {
homeobject_feedback_slot_ = slot;
}
virtual Code::Kind FeedbackICSlotKind(int index) OVERRIDE {
return Code::LOAD_IC;
}
Code::Kind FeedbackICSlotKind(int index) OVERRIDE { return Code::LOAD_IC; }
FeedbackVectorICSlot HomeObjectFeedbackSlot() {
DCHECK(!FLAG_vector_ics || !homeobject_feedback_slot_.IsInvalid());
@ -2832,16 +2794,16 @@ class RegExpTree : public ZoneObject {
class RegExpDisjunction FINAL : public RegExpTree {
public:
explicit RegExpDisjunction(ZoneList<RegExpTree*>* alternatives);
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
virtual RegExpDisjunction* AsDisjunction() OVERRIDE;
virtual Interval CaptureRegisters() OVERRIDE;
virtual bool IsDisjunction() OVERRIDE;
virtual bool IsAnchoredAtStart() OVERRIDE;
virtual bool IsAnchoredAtEnd() OVERRIDE;
virtual int min_match() OVERRIDE { return min_match_; }
virtual int max_match() OVERRIDE { return max_match_; }
RegExpDisjunction* AsDisjunction() OVERRIDE;
Interval CaptureRegisters() OVERRIDE;
bool IsDisjunction() OVERRIDE;
bool IsAnchoredAtStart() OVERRIDE;
bool IsAnchoredAtEnd() OVERRIDE;
int min_match() OVERRIDE { return min_match_; }
int max_match() OVERRIDE { return max_match_; }
ZoneList<RegExpTree*>* alternatives() { return alternatives_; }
private:
ZoneList<RegExpTree*>* alternatives_;
@ -2853,16 +2815,16 @@ class RegExpDisjunction FINAL : public RegExpTree {
class RegExpAlternative FINAL : public RegExpTree {
public:
explicit RegExpAlternative(ZoneList<RegExpTree*>* nodes);
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
virtual RegExpAlternative* AsAlternative() OVERRIDE;
virtual Interval CaptureRegisters() OVERRIDE;
virtual bool IsAlternative() OVERRIDE;
virtual bool IsAnchoredAtStart() OVERRIDE;
virtual bool IsAnchoredAtEnd() OVERRIDE;
virtual int min_match() OVERRIDE { return min_match_; }
virtual int max_match() OVERRIDE { return max_match_; }
RegExpAlternative* AsAlternative() OVERRIDE;
Interval CaptureRegisters() OVERRIDE;
bool IsAlternative() OVERRIDE;
bool IsAnchoredAtStart() OVERRIDE;
bool IsAnchoredAtEnd() OVERRIDE;
int min_match() OVERRIDE { return min_match_; }
int max_match() OVERRIDE { return max_match_; }
ZoneList<RegExpTree*>* nodes() { return nodes_; }
private:
ZoneList<RegExpTree*>* nodes_;
@ -2882,15 +2844,15 @@ class RegExpAssertion FINAL : public RegExpTree {
NON_BOUNDARY
};
explicit RegExpAssertion(AssertionType type) : assertion_type_(type) { }
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
virtual RegExpAssertion* AsAssertion() OVERRIDE;
virtual bool IsAssertion() OVERRIDE;
virtual bool IsAnchoredAtStart() OVERRIDE;
virtual bool IsAnchoredAtEnd() OVERRIDE;
virtual int min_match() OVERRIDE { return 0; }
virtual int max_match() OVERRIDE { return 0; }
RegExpAssertion* AsAssertion() OVERRIDE;
bool IsAssertion() OVERRIDE;
bool IsAnchoredAtStart() OVERRIDE;
bool IsAnchoredAtEnd() OVERRIDE;
int min_match() OVERRIDE { return 0; }
int max_match() OVERRIDE { return 0; }
AssertionType assertion_type() { return assertion_type_; }
private:
AssertionType assertion_type_;
@ -2928,15 +2890,15 @@ class RegExpCharacterClass FINAL : public RegExpTree {
explicit RegExpCharacterClass(uc16 type)
: set_(type),
is_negated_(false) { }
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
virtual RegExpCharacterClass* AsCharacterClass() OVERRIDE;
virtual bool IsCharacterClass() OVERRIDE;
virtual bool IsTextElement() OVERRIDE { return true; }
virtual int min_match() OVERRIDE { return 1; }
virtual int max_match() OVERRIDE { return 1; }
virtual void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
RegExpCharacterClass* AsCharacterClass() OVERRIDE;
bool IsCharacterClass() OVERRIDE;
bool IsTextElement() OVERRIDE { return true; }
int min_match() OVERRIDE { return 1; }
int max_match() OVERRIDE { return 1; }
void AppendToText(RegExpText* text, Zone* zone) 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(); }
@ -2965,15 +2927,15 @@ class RegExpCharacterClass FINAL : public RegExpTree {
class RegExpAtom FINAL : public RegExpTree {
public:
explicit RegExpAtom(Vector<const uc16> data) : data_(data) { }
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
virtual RegExpAtom* AsAtom() OVERRIDE;
virtual bool IsAtom() OVERRIDE;
virtual bool IsTextElement() OVERRIDE { return true; }
virtual int min_match() OVERRIDE { return data_.length(); }
virtual int max_match() OVERRIDE { return data_.length(); }
virtual void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
RegExpAtom* AsAtom() OVERRIDE;
bool IsAtom() OVERRIDE;
bool IsTextElement() OVERRIDE { return true; }
int min_match() OVERRIDE { return data_.length(); }
int max_match() OVERRIDE { return data_.length(); }
void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
Vector<const uc16> data() { return data_; }
int length() { return data_.length(); }
private:
@ -2984,15 +2946,15 @@ class RegExpAtom FINAL : public RegExpTree {
class RegExpText FINAL : public RegExpTree {
public:
explicit RegExpText(Zone* zone) : elements_(2, zone), length_(0) {}
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
virtual RegExpText* AsText() OVERRIDE;
virtual bool IsText() OVERRIDE;
virtual bool IsTextElement() OVERRIDE { return true; }
virtual int min_match() OVERRIDE { return length_; }
virtual int max_match() OVERRIDE { return length_; }
virtual void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
RegExpText* AsText() OVERRIDE;
bool IsText() OVERRIDE;
bool IsTextElement() OVERRIDE { return true; }
int min_match() OVERRIDE { return length_; }
int max_match() OVERRIDE { return length_; }
void AppendToText(RegExpText* text, Zone* zone) OVERRIDE;
void AddElement(TextElement elm, Zone* zone) {
elements_.Add(elm, zone);
length_ += elm.length();
@ -3019,7 +2981,7 @@ class RegExpQuantifier FINAL : public RegExpTree {
max_match_ = max * body->max_match();
}
}
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
static RegExpNode* ToNode(int min,
@ -3029,11 +2991,11 @@ class RegExpQuantifier FINAL : public RegExpTree {
RegExpCompiler* compiler,
RegExpNode* on_success,
bool not_at_start = false);
virtual RegExpQuantifier* AsQuantifier() OVERRIDE;
virtual Interval CaptureRegisters() OVERRIDE;
virtual bool IsQuantifier() OVERRIDE;
virtual int min_match() OVERRIDE { return min_match_; }
virtual int max_match() OVERRIDE { return max_match_; }
RegExpQuantifier* AsQuantifier() OVERRIDE;
Interval CaptureRegisters() OVERRIDE;
bool IsQuantifier() OVERRIDE;
int min_match() OVERRIDE { return min_match_; }
int max_match() OVERRIDE { return max_match_; }
int min() { return min_; }
int max() { return max_; }
bool is_possessive() { return quantifier_type_ == POSSESSIVE; }
@ -3055,20 +3017,20 @@ class RegExpCapture FINAL : public RegExpTree {
public:
explicit RegExpCapture(RegExpTree* body, int index)
: body_(body), index_(index) { }
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
static RegExpNode* ToNode(RegExpTree* body,
int index,
RegExpCompiler* compiler,
RegExpNode* on_success);
virtual RegExpCapture* AsCapture() OVERRIDE;
virtual bool IsAnchoredAtStart() OVERRIDE;
virtual bool IsAnchoredAtEnd() OVERRIDE;
virtual Interval CaptureRegisters() OVERRIDE;
virtual bool IsCapture() OVERRIDE;
virtual int min_match() OVERRIDE { return body_->min_match(); }
virtual int max_match() OVERRIDE { return body_->max_match(); }
RegExpCapture* AsCapture() OVERRIDE;
bool IsAnchoredAtStart() OVERRIDE;
bool IsAnchoredAtEnd() OVERRIDE;
Interval CaptureRegisters() OVERRIDE;
bool IsCapture() OVERRIDE;
int min_match() OVERRIDE { return body_->min_match(); }
int max_match() OVERRIDE { return body_->max_match(); }
RegExpTree* body() { return body_; }
int index() { return index_; }
static int StartRegister(int index) { return index * 2; }
@ -3091,15 +3053,15 @@ class RegExpLookahead FINAL : public RegExpTree {
capture_count_(capture_count),
capture_from_(capture_from) { }
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
virtual RegExpLookahead* AsLookahead() OVERRIDE;
virtual Interval CaptureRegisters() OVERRIDE;
virtual bool IsLookahead() OVERRIDE;
virtual bool IsAnchoredAtStart() OVERRIDE;
virtual int min_match() OVERRIDE { return 0; }
virtual int max_match() OVERRIDE { return 0; }
RegExpLookahead* AsLookahead() OVERRIDE;
Interval CaptureRegisters() OVERRIDE;
bool IsLookahead() OVERRIDE;
bool IsAnchoredAtStart() OVERRIDE;
int min_match() OVERRIDE { return 0; }
int max_match() OVERRIDE { return 0; }
RegExpTree* body() { return body_; }
bool is_positive() { return is_positive_; }
int capture_count() { return capture_count_; }
@ -3117,13 +3079,13 @@ class RegExpBackReference FINAL : public RegExpTree {
public:
explicit RegExpBackReference(RegExpCapture* capture)
: capture_(capture) { }
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
virtual RegExpBackReference* AsBackReference() OVERRIDE;
virtual bool IsBackReference() OVERRIDE;
virtual int min_match() OVERRIDE { return 0; }
virtual int max_match() OVERRIDE { return capture_->max_match(); }
RegExpBackReference* AsBackReference() OVERRIDE;
bool IsBackReference() OVERRIDE;
int min_match() OVERRIDE { return 0; }
int max_match() OVERRIDE { return capture_->max_match(); }
int index() { return capture_->index(); }
RegExpCapture* capture() { return capture_; }
private:
@ -3134,13 +3096,13 @@ class RegExpBackReference FINAL : public RegExpTree {
class RegExpEmpty FINAL : public RegExpTree {
public:
RegExpEmpty() { }
virtual void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
void* Accept(RegExpVisitor* visitor, void* data) OVERRIDE;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) OVERRIDE;
virtual RegExpEmpty* AsEmpty() OVERRIDE;
virtual bool IsEmpty() OVERRIDE;
virtual int min_match() OVERRIDE { return 0; }
virtual int max_match() OVERRIDE { return 0; }
RegExpEmpty* AsEmpty() OVERRIDE;
bool IsEmpty() OVERRIDE;
int min_match() OVERRIDE { return 0; }
int max_match() OVERRIDE { return 0; }
};
@ -3178,32 +3140,32 @@ class AstVisitor BASE_EMBEDDED {
};
#define DEFINE_AST_VISITOR_SUBCLASS_MEMBERS() \
public: \
virtual void Visit(AstNode* node) FINAL OVERRIDE { \
if (!CheckStackOverflow()) node->Accept(this); \
} \
\
void SetStackOverflow() { stack_overflow_ = true; } \
void ClearStackOverflow() { stack_overflow_ = false; } \
bool HasStackOverflow() const { return stack_overflow_; } \
\
bool CheckStackOverflow() { \
if (stack_overflow_) return true; \
StackLimitCheck check(zone_->isolate()); \
if (!check.HasOverflowed()) return false; \
return (stack_overflow_ = true); \
} \
\
private: \
void InitializeAstVisitor(Zone* zone) { \
zone_ = zone; \
stack_overflow_ = false; \
} \
Zone* zone() { return zone_; } \
Isolate* isolate() { return zone_->isolate(); } \
\
Zone* zone_; \
#define DEFINE_AST_VISITOR_SUBCLASS_MEMBERS() \
public: \
void Visit(AstNode* node) FINAL { \
if (!CheckStackOverflow()) node->Accept(this); \
} \
\
void SetStackOverflow() { stack_overflow_ = true; } \
void ClearStackOverflow() { stack_overflow_ = false; } \
bool HasStackOverflow() const { return stack_overflow_; } \
\
bool CheckStackOverflow() { \
if (stack_overflow_) return true; \
StackLimitCheck check(zone_->isolate()); \
if (!check.HasOverflowed()) return false; \
return (stack_overflow_ = true); \
} \
\
private: \
void InitializeAstVisitor(Zone* zone) { \
zone_ = zone; \
stack_overflow_ = false; \
} \
Zone* zone() { return zone_; } \
Isolate* isolate() { return zone_->isolate(); } \
\
Zone* zone_; \
bool stack_overflow_

View File

@ -401,7 +401,7 @@ class HighResolutionTickClock FINAL : public TickClock {
}
virtual ~HighResolutionTickClock() {}
virtual int64_t Now() OVERRIDE {
int64_t Now() OVERRIDE {
LARGE_INTEGER now;
BOOL result = QueryPerformanceCounter(&now);
DCHECK(result);
@ -419,9 +419,7 @@ class HighResolutionTickClock FINAL : public TickClock {
return ticks + 1;
}
virtual bool IsHighResolution() OVERRIDE {
return true;
}
bool IsHighResolution() OVERRIDE { return true; }
private:
int64_t ticks_per_second_;
@ -435,7 +433,7 @@ class RolloverProtectedTickClock FINAL : public TickClock {
RolloverProtectedTickClock() : last_seen_now_(0), rollover_ms_(1) {}
virtual ~RolloverProtectedTickClock() {}
virtual int64_t Now() OVERRIDE {
int64_t Now() OVERRIDE {
LockGuard<Mutex> lock_guard(&mutex_);
// We use timeGetTime() to implement TimeTicks::Now(), which rolls over
// every ~49.7 days. We try to track rollover ourselves, which works if
@ -454,9 +452,7 @@ class RolloverProtectedTickClock FINAL : public TickClock {
return (now + rollover_ms_) * Time::kMicrosecondsPerMillisecond;
}
virtual bool IsHighResolution() OVERRIDE {
return false;
}
bool IsHighResolution() OVERRIDE { return false; }
private:
Mutex mutex_;

View File

@ -158,8 +158,8 @@ class NativesExternalStringResource FINAL
NativesExternalStringResource(Bootstrapper* bootstrapper,
const char* source,
size_t length);
virtual const char* data() const OVERRIDE { return data_; }
virtual size_t length() const OVERRIDE { return length_; }
const char* data() const OVERRIDE { return data_; }
size_t length() const OVERRIDE { return length_; }
private:
const char* data_;

View File

@ -289,54 +289,52 @@ class CodeStub BASE_EMBEDDED {
DISALLOW_COPY_AND_ASSIGN(NAME)
#define DEFINE_CODE_STUB(NAME, SUPER) \
protected: \
virtual inline Major MajorKey() const OVERRIDE { \
return NAME; \
}; \
#define DEFINE_CODE_STUB(NAME, SUPER) \
protected: \
inline Major MajorKey() const OVERRIDE { return NAME; }; \
DEFINE_CODE_STUB_BASE(NAME##Stub, SUPER)
#define DEFINE_PLATFORM_CODE_STUB(NAME, SUPER) \
private: \
virtual void Generate(MacroAssembler* masm) OVERRIDE; \
#define DEFINE_PLATFORM_CODE_STUB(NAME, SUPER) \
private: \
void Generate(MacroAssembler* masm) OVERRIDE; \
DEFINE_CODE_STUB(NAME, SUPER)
#define DEFINE_HYDROGEN_CODE_STUB(NAME, SUPER) \
public: \
virtual void InitializeDescriptor(CodeStubDescriptor* descriptor) OVERRIDE; \
virtual Handle<Code> GenerateCode() OVERRIDE; \
#define DEFINE_HYDROGEN_CODE_STUB(NAME, SUPER) \
public: \
void InitializeDescriptor(CodeStubDescriptor* descriptor) OVERRIDE; \
Handle<Code> GenerateCode() OVERRIDE; \
DEFINE_CODE_STUB(NAME, SUPER)
#define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \
public: \
virtual Handle<Code> GenerateCode() OVERRIDE; \
#define DEFINE_HANDLER_CODE_STUB(NAME, SUPER) \
public: \
Handle<Code> GenerateCode() OVERRIDE; \
DEFINE_CODE_STUB(NAME, SUPER)
#define DEFINE_CALL_INTERFACE_DESCRIPTOR(NAME) \
public: \
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE { \
return NAME##Descriptor(isolate()); \
#define DEFINE_CALL_INTERFACE_DESCRIPTOR(NAME) \
public: \
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE { \
return NAME##Descriptor(isolate()); \
}
// There are some code stubs we just can't describe right now with a
// CallInterfaceDescriptor. Isolate behavior for those cases with this macro.
// An attempt to retrieve a descriptor will fail.
#define DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR() \
public: \
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE { \
UNREACHABLE(); \
return CallInterfaceDescriptor(); \
#define DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR() \
public: \
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE { \
UNREACHABLE(); \
return CallInterfaceDescriptor(); \
}
class PlatformCodeStub : public CodeStub {
public:
// Retrieve the code for the stub. Generate the code if needed.
virtual Handle<Code> GenerateCode() OVERRIDE;
Handle<Code> GenerateCode() OVERRIDE;
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::STUB; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::STUB; }
protected:
explicit PlatformCodeStub(Isolate* isolate) : CodeStub(isolate) {}
@ -436,7 +434,7 @@ class HydrogenCodeStub : public CodeStub {
INITIALIZED
};
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::STUB; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::STUB; }
template<class SubClass>
static Handle<Code> GetUninitialized(Isolate* isolate) {
@ -445,7 +443,7 @@ class HydrogenCodeStub : public CodeStub {
}
// Retrieve the code for the stub. Generate the code if needed.
virtual Handle<Code> GenerateCode() = 0;
Handle<Code> GenerateCode() OVERRIDE = 0;
bool IsUninitialized() const { return IsMissBits::decode(minor_key_); }
@ -678,7 +676,7 @@ class InstanceofStub: public PlatformCodeStub {
static Register left() { return InstanceofDescriptor::left(); }
static Register right() { return InstanceofDescriptor::right(); }
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
if (HasArgsInRegisters()) {
return InstanceofDescriptor(isolate());
}
@ -698,7 +696,7 @@ class InstanceofStub: public PlatformCodeStub {
return (flags() & kReturnTrueFalseObject) != 0;
}
virtual void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
class FlagBits : public BitField<Flags, 0, 3> {};
@ -729,7 +727,7 @@ class ArrayConstructorStub: public PlatformCodeStub {
void GenerateDispatchToArrayStub(MacroAssembler* masm,
AllocationSiteOverrideMode mode);
virtual void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
class ArgumentCountBits : public BitField<ArgumentCountKey, 0, 2> {};
@ -759,7 +757,7 @@ class MathPowStub: public PlatformCodeStub {
minor_key_ = ExponentTypeBits::encode(exponent_type);
}
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
if (exponent_type() == TAGGED) {
return MathPowTaggedDescriptor(isolate());
} else if (exponent_type() == INTEGER) {
@ -792,11 +790,11 @@ class CallICStub: public PlatformCodeStub {
return state.arg_count();
}
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::CALL_IC; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::CALL_IC; }
virtual InlineCacheState GetICState() const OVERRIDE { return DEFAULT; }
InlineCacheState GetICState() const OVERRIDE { return DEFAULT; }
virtual ExtraICState GetExtraICState() const FINAL OVERRIDE {
ExtraICState GetExtraICState() const FINAL {
return static_cast<ExtraICState>(minor_key_);
}
@ -815,7 +813,7 @@ class CallICStub: public PlatformCodeStub {
void GenerateMiss(MacroAssembler* masm);
private:
virtual void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
DEFINE_CALL_INTERFACE_DESCRIPTOR(CallFunctionWithFeedback);
DEFINE_PLATFORM_CODE_STUB(CallIC, PlatformCodeStub);
@ -827,12 +825,10 @@ class CallIC_ArrayStub: public CallICStub {
CallIC_ArrayStub(Isolate* isolate, const CallICState& state_in)
: CallICStub(isolate, state_in) {}
virtual InlineCacheState GetICState() const FINAL OVERRIDE {
return MONOMORPHIC;
}
InlineCacheState GetICState() const FINAL { return MONOMORPHIC; }
private:
virtual void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
DEFINE_PLATFORM_CODE_STUB(CallIC_Array, CallICStub);
};
@ -844,12 +840,12 @@ class FunctionPrototypeStub : public PlatformCodeStub {
explicit FunctionPrototypeStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
// TODO(mvstanton): only the receiver register is accessed. When this is
// translated to a hydrogen code stub, a new CallInterfaceDescriptor
// should be created that just uses that register for more efficient code.
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
if (FLAG_vector_ics) {
return VectorLoadICDescriptor(isolate());
}
@ -866,8 +862,8 @@ class LoadIndexedInterceptorStub : public PlatformCodeStub {
explicit LoadIndexedInterceptorStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
DEFINE_PLATFORM_CODE_STUB(LoadIndexedInterceptor, PlatformCodeStub);
@ -879,8 +875,8 @@ class LoadIndexedStringStub : public PlatformCodeStub {
explicit LoadIndexedStringStub(Isolate* isolate)
: PlatformCodeStub(isolate) {}
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
DEFINE_PLATFORM_CODE_STUB(LoadIndexedString, PlatformCodeStub);
@ -889,13 +885,13 @@ class LoadIndexedStringStub : public PlatformCodeStub {
class HandlerStub : public HydrogenCodeStub {
public:
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
virtual ExtraICState GetExtraICState() const OVERRIDE { return kind(); }
virtual InlineCacheState GetICState() const OVERRIDE { return MONOMORPHIC; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::HANDLER; }
ExtraICState GetExtraICState() const OVERRIDE { return kind(); }
InlineCacheState GetICState() const OVERRIDE { return MONOMORPHIC; }
virtual void InitializeDescriptor(CodeStubDescriptor* descriptor) OVERRIDE;
void InitializeDescriptor(CodeStubDescriptor* descriptor) OVERRIDE;
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE;
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE;
protected:
explicit HandlerStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
@ -919,8 +915,8 @@ class LoadFieldStub: public HandlerStub {
}
protected:
virtual Code::Kind kind() const { return Code::LOAD_IC; }
virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
private:
class LoadFieldByIndexBits : public BitField<int, 0, 13> {};
@ -935,8 +931,8 @@ class KeyedLoadSloppyArgumentsStub : public HandlerStub {
: HandlerStub(isolate) {}
protected:
virtual Code::Kind kind() const OVERRIDE { return Code::KEYED_LOAD_IC; }
virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
Code::Kind kind() const OVERRIDE { return Code::KEYED_LOAD_IC; }
Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
private:
DEFINE_HANDLER_CODE_STUB(KeyedLoadSloppyArguments, HandlerStub);
@ -955,8 +951,8 @@ class LoadConstantStub : public HandlerStub {
}
protected:
virtual Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
private:
class ConstantIndexBits : public BitField<int, 0, kSubMinorKeyBits> {};
@ -970,8 +966,8 @@ class StringLengthStub: public HandlerStub {
explicit StringLengthStub(Isolate* isolate) : HandlerStub(isolate) {}
protected:
virtual Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
DEFINE_HANDLER_CODE_STUB(StringLength, HandlerStub);
};
@ -999,8 +995,8 @@ class StoreFieldStub : public HandlerStub {
}
protected:
virtual Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
private:
class StoreFieldByIndexBits : public BitField<int, 0, 13> {};
@ -1049,11 +1045,11 @@ class StoreTransitionStub : public HandlerStub {
return StoreModeBits::decode(sub_minor_key());
}
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE;
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE;
protected:
virtual Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
private:
class StoreFieldByIndexBits : public BitField<int, 0, 13> {};
@ -1091,7 +1087,7 @@ class StoreGlobalStub : public HandlerStub {
}
}
virtual Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
bool is_constant() const { return IsConstantBits::decode(sub_minor_key()); }
@ -1173,15 +1169,11 @@ class BinaryOpICStub : public HydrogenCodeStub {
static void GenerateAheadOfTime(Isolate* isolate);
virtual Code::Kind GetCodeKind() const OVERRIDE {
return Code::BINARY_OP_IC;
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::BINARY_OP_IC; }
virtual InlineCacheState GetICState() const FINAL OVERRIDE {
return state().GetICState();
}
InlineCacheState GetICState() const FINAL { return state().GetICState(); }
virtual ExtraICState GetExtraICState() const FINAL OVERRIDE {
ExtraICState GetExtraICState() const FINAL {
return static_cast<ExtraICState>(sub_minor_key());
}
@ -1189,7 +1181,7 @@ class BinaryOpICStub : public HydrogenCodeStub {
return BinaryOpICState(isolate(), GetExtraICState());
}
virtual void PrintState(std::ostream& os) const FINAL OVERRIDE; // NOLINT
void PrintState(std::ostream& os) const FINAL; // NOLINT
// Parameters accessed via CodeStubGraphBuilder::GetParameter()
static const int kLeft = 0;
@ -1222,19 +1214,15 @@ class BinaryOpICWithAllocationSiteStub FINAL : public PlatformCodeStub {
return CodeStub::GetCodeCopy(pattern);
}
virtual Code::Kind GetCodeKind() const OVERRIDE {
return Code::BINARY_OP_IC;
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::BINARY_OP_IC; }
virtual InlineCacheState GetICState() const OVERRIDE {
return state().GetICState();
}
InlineCacheState GetICState() const OVERRIDE { return state().GetICState(); }
virtual ExtraICState GetExtraICState() const OVERRIDE {
ExtraICState GetExtraICState() const OVERRIDE {
return static_cast<ExtraICState>(minor_key_);
}
virtual void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
private:
BinaryOpICState state() const {
@ -1259,9 +1247,7 @@ class BinaryOpWithAllocationSiteStub FINAL : public BinaryOpICStub {
BinaryOpWithAllocationSiteStub(Isolate* isolate, const BinaryOpICState& state)
: BinaryOpICStub(isolate, state) {}
virtual Code::Kind GetCodeKind() const FINAL OVERRIDE {
return Code::STUB;
}
Code::Kind GetCodeKind() const FINAL { return Code::STUB; }
// Parameters accessed via CodeStubGraphBuilder::GetParameter()
static const int kAllocationSite = 0;
@ -1310,7 +1296,7 @@ class StringAddStub FINAL : public HydrogenCodeStub {
class StringAddFlagsBits: public BitField<StringAddFlags, 0, 2> {};
class PretenureFlagBits: public BitField<PretenureFlag, 2, 1> {};
virtual void PrintBaseName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintBaseName(std::ostream& os) const OVERRIDE; // NOLINT
DEFINE_CALL_INTERFACE_DESCRIPTOR(StringAdd);
DEFINE_HYDROGEN_CODE_STUB(StringAdd, HydrogenCodeStub);
@ -1329,7 +1315,7 @@ class CompareICStub : public PlatformCodeStub {
void set_known_map(Handle<Map> map) { known_map_ = map; }
virtual InlineCacheState GetICState() const OVERRIDE;
InlineCacheState GetICState() const OVERRIDE;
Token::Value op() const {
return static_cast<Token::Value>(Token::EQ + OpBits::decode(minor_key_));
@ -1344,7 +1330,7 @@ class CompareICStub : public PlatformCodeStub {
CompareICState::State state() const { return StateBits::decode(minor_key_); }
private:
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::COMPARE_IC; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::COMPARE_IC; }
void GenerateSmis(MacroAssembler* masm);
void GenerateNumbers(MacroAssembler* masm);
@ -1359,9 +1345,9 @@ class CompareICStub : public PlatformCodeStub {
bool strict() const { return op() == Token::EQ_STRICT; }
Condition GetCondition() const;
virtual void AddToSpecialCache(Handle<Code> new_object) OVERRIDE;
virtual bool FindCodeInSpecialCache(Code** code_out) OVERRIDE;
virtual bool UseSpecialCache() OVERRIDE {
void AddToSpecialCache(Handle<Code> new_object) OVERRIDE;
bool FindCodeInSpecialCache(Code** code_out) OVERRIDE;
bool UseSpecialCache() OVERRIDE {
return state() == CompareICState::KNOWN_OBJECT;
}
@ -1397,7 +1383,7 @@ class CompareNilICStub : public HydrogenCodeStub {
return CompareNilICStub(isolate, nil, UNINITIALIZED).GetCode();
}
virtual InlineCacheState GetICState() const OVERRIDE {
InlineCacheState GetICState() const OVERRIDE {
State state = this->state();
if (state.Contains(GENERIC)) {
return MEGAMORPHIC;
@ -1408,13 +1394,9 @@ class CompareNilICStub : public HydrogenCodeStub {
}
}
virtual Code::Kind GetCodeKind() const OVERRIDE {
return Code::COMPARE_NIL_IC;
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::COMPARE_NIL_IC; }
virtual ExtraICState GetExtraICState() const OVERRIDE {
return sub_minor_key();
}
ExtraICState GetExtraICState() const OVERRIDE { return sub_minor_key(); }
void UpdateStatus(Handle<Object> object);
@ -1426,8 +1408,8 @@ class CompareNilICStub : public HydrogenCodeStub {
set_sub_minor_key(TypesBits::update(sub_minor_key(), 0));
}
virtual void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
virtual void PrintBaseName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
void PrintBaseName(std::ostream& os) const OVERRIDE; // NOLINT
private:
CompareNilICStub(Isolate* isolate, NilValue nil,
@ -1514,9 +1496,9 @@ class JSEntryStub : public PlatformCodeStub {
}
private:
virtual void FinishCode(Handle<Code> code) OVERRIDE;
void FinishCode(Handle<Code> code) OVERRIDE;
virtual void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
os << (type() == StackFrame::ENTRY ? "JSEntryStub"
: "JSConstructEntryStub");
}
@ -1547,7 +1529,7 @@ class ArgumentsAccessStub: public PlatformCodeStub {
minor_key_ = TypeBits::encode(type);
}
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
if (type() == READ_ELEMENT) {
return ArgumentsAccessReadDescriptor(isolate());
}
@ -1562,7 +1544,7 @@ class ArgumentsAccessStub: public PlatformCodeStub {
void GenerateNewSloppyFast(MacroAssembler* masm);
void GenerateNewSloppySlow(MacroAssembler* masm);
virtual void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
class TypeBits : public BitField<Type, 0, 2> {};
@ -1616,7 +1598,7 @@ class CallFunctionStub: public PlatformCodeStub {
bool NeedsChecks() const { return flags() != WRAP_AND_CALL; }
virtual void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
// Minor key encoding in 32 bits with Bitfield <Type, shift, size>.
class FlagBits : public BitField<CallFunctionFlags, 0, 2> {};
@ -1635,7 +1617,7 @@ class CallConstructStub: public PlatformCodeStub {
minor_key_ = FlagBits::encode(flags);
}
virtual void FinishCode(Handle<Code> code) OVERRIDE {
void FinishCode(Handle<Code> code) OVERRIDE {
code->set_has_function_cache(RecordCallTarget());
}
@ -1646,7 +1628,7 @@ class CallConstructStub: public PlatformCodeStub {
return (flags() & RECORD_CONSTRUCTOR_TARGET) != 0;
}
virtual void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
void PrintName(std::ostream& os) const OVERRIDE; // NOLINT
class FlagBits : public BitField<CallConstructorFlags, 0, 1> {};
@ -1836,7 +1818,7 @@ class LoadDictionaryElementStub : public HydrogenCodeStub {
explicit LoadDictionaryElementStub(Isolate* isolate)
: HydrogenCodeStub(isolate) {}
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
if (FLAG_vector_ics) {
return VectorLoadICDescriptor(isolate());
}
@ -1851,10 +1833,8 @@ class KeyedLoadGenericStub : public HydrogenCodeStub {
public:
explicit KeyedLoadGenericStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
virtual Code::Kind GetCodeKind() const OVERRIDE {
return Code::KEYED_LOAD_IC;
}
virtual InlineCacheState GetICState() const OVERRIDE { return GENERIC; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::KEYED_LOAD_IC; }
InlineCacheState GetICState() const OVERRIDE { return GENERIC; }
// Since KeyedLoadGeneric stub doesn't miss (simply calls runtime), it
// doesn't need to use the VectorLoadICDescriptor for the case when
@ -1872,11 +1852,11 @@ class LoadICTrampolineStub : public PlatformCodeStub {
minor_key_ = state.GetExtraICState();
}
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; }
virtual InlineCacheState GetICState() const FINAL OVERRIDE { return DEFAULT; }
InlineCacheState GetICState() const FINAL { return DEFAULT; }
virtual ExtraICState GetExtraICState() const FINAL OVERRIDE {
ExtraICState GetExtraICState() const FINAL {
return static_cast<ExtraICState>(minor_key_);
}
@ -1895,9 +1875,7 @@ class KeyedLoadICTrampolineStub : public LoadICTrampolineStub {
explicit KeyedLoadICTrampolineStub(Isolate* isolate)
: LoadICTrampolineStub(isolate, LoadICState(0)) {}
virtual Code::Kind GetCodeKind() const OVERRIDE {
return Code::KEYED_LOAD_IC;
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::KEYED_LOAD_IC; }
DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub);
};
@ -1910,17 +1888,15 @@ class MegamorphicLoadStub : public HydrogenCodeStub {
set_sub_minor_key(state.GetExtraICState());
}
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; }
virtual InlineCacheState GetICState() const FINAL OVERRIDE {
return MEGAMORPHIC;
}
InlineCacheState GetICState() const FINAL { return MEGAMORPHIC; }
virtual ExtraICState GetExtraICState() const FINAL OVERRIDE {
ExtraICState GetExtraICState() const FINAL {
return static_cast<ExtraICState>(sub_minor_key());
}
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
if (FLAG_vector_ics) {
return VectorLoadICDescriptor(isolate());
}
@ -1938,11 +1914,11 @@ class VectorLoadStub : public HydrogenCodeStub {
set_sub_minor_key(state.GetExtraICState());
}
virtual Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; }
Code::Kind GetCodeKind() const OVERRIDE { return Code::LOAD_IC; }
virtual InlineCacheState GetICState() const FINAL OVERRIDE { return DEFAULT; }
InlineCacheState GetICState() const FINAL { return DEFAULT; }
virtual ExtraICState GetExtraICState() const FINAL OVERRIDE {
ExtraICState GetExtraICState() const FINAL {
return static_cast<ExtraICState>(sub_minor_key());
}
@ -1959,9 +1935,7 @@ class VectorKeyedLoadStub : public VectorLoadStub {
explicit VectorKeyedLoadStub(Isolate* isolate)
: VectorLoadStub(isolate, LoadICState(0)) {}
virtual Code::Kind GetCodeKind() const OVERRIDE {
return Code::KEYED_LOAD_IC;
}
Code::Kind GetCodeKind() const OVERRIDE { return Code::KEYED_LOAD_IC; }
DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorLoadIC);
DEFINE_HYDROGEN_CODE_STUB(VectorKeyedLoad, VectorLoadStub);
@ -1981,7 +1955,7 @@ class DoubleToIStub : public PlatformCodeStub {
SSE3Bits::encode(CpuFeatures::IsSupported(SSE3) ? 1 : 0);
}
virtual bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
private:
Register source() const {
@ -2043,7 +2017,7 @@ class ScriptContextFieldStub : public HandlerStub {
class SlotIndexBits
: public BitField<int, kContextIndexBits, kSlotIndexBits> {};
virtual Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
Code::StubType GetStubType() OVERRIDE { return Code::FAST; }
DEFINE_CODE_STUB_BASE(ScriptContextFieldStub, HandlerStub);
};
@ -2056,7 +2030,7 @@ class LoadScriptContextFieldStub : public ScriptContextFieldStub {
: ScriptContextFieldStub(isolate, lookup_result) {}
private:
virtual Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
Code::Kind kind() const OVERRIDE { return Code::LOAD_IC; }
DEFINE_HANDLER_CODE_STUB(LoadScriptContextField, ScriptContextFieldStub);
};
@ -2069,7 +2043,7 @@ class StoreScriptContextFieldStub : public ScriptContextFieldStub {
: ScriptContextFieldStub(isolate, lookup_result) {}
private:
virtual Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
Code::Kind kind() const OVERRIDE { return Code::STORE_IC; }
DEFINE_HANDLER_CODE_STUB(StoreScriptContextField, ScriptContextFieldStub);
};
@ -2094,7 +2068,7 @@ class LoadFastElementStub : public HydrogenCodeStub {
class ElementsKindBits: public BitField<ElementsKind, 0, 8> {};
class IsJSArrayBits: public BitField<bool, 8, 1> {};
virtual CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
CallInterfaceDescriptor GetCallInterfaceDescriptor() OVERRIDE {
if (FLAG_vector_ics) {
return VectorLoadICDescriptor(isolate());
}
@ -2230,7 +2204,7 @@ class ArrayNoArgumentConstructorStub : public ArrayConstructorStubBase {
}
private:
virtual void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
BasePrintName(os, "ArrayNoArgumentConstructorStub");
}
@ -2250,7 +2224,7 @@ class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase {
}
private:
virtual void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
BasePrintName(os, "ArraySingleArgumentConstructorStub");
}
@ -2270,7 +2244,7 @@ class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase {
}
private:
virtual void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
void PrintName(std::ostream& os) const OVERRIDE { // NOLINT
BasePrintName(os, "ArrayNArgumentsConstructorStub");
}
@ -2414,22 +2388,18 @@ class ToBooleanStub: public HydrogenCodeStub {
Types types() const { return Types(TypesBits::decode(sub_minor_key())); }
ResultMode mode() const { return ResultModeBits::decode(sub_minor_key()); }
virtual Code::Kind GetCodeKind() const OVERRIDE {
return Code::TO_BOOLEAN_IC;
}
virtual void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
Code::Kind GetCodeKind() const OVERRIDE { return Code::TO_BOOLEAN_IC; }
void PrintState(std::ostream& os) const OVERRIDE; // NOLINT
virtual bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
static Handle<Code> GetUninitialized(Isolate* isolate) {
return ToBooleanStub(isolate, UNINITIALIZED).GetCode();
}
virtual ExtraICState GetExtraICState() const OVERRIDE {
return types().ToIntegral();
}
ExtraICState GetExtraICState() const OVERRIDE { return types().ToIntegral(); }
virtual InlineCacheState GetICState() const OVERRIDE {
InlineCacheState GetICState() const OVERRIDE {
if (types().IsEmpty()) {
return ::v8::internal::UNINITIALIZED;
} else {
@ -2541,7 +2511,7 @@ class ProfileEntryHookStub : public PlatformCodeStub {
explicit ProfileEntryHookStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
// The profile entry hook function is not allowed to cause a GC.
virtual bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
// Generates a call to the entry hook if it's enabled.
static void MaybeCallEntryHook(MacroAssembler* masm);
@ -2566,7 +2536,7 @@ class StoreBufferOverflowStub : public PlatformCodeStub {
}
static void GenerateFixedRegStubsAheadOfTime(Isolate* isolate);
virtual bool SometimesSetsUpAFrame() OVERRIDE { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
private:
bool save_doubles() const { return SaveDoublesBits::decode(minor_key_); }

View File

@ -310,29 +310,29 @@ class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
: HOptimizedGraphBuilder(info) {
}
#define DEF_VISIT(type) \
virtual void Visit##type(type* node) OVERRIDE { \
if (node->position() != RelocInfo::kNoPosition) { \
SetSourcePosition(node->position()); \
} \
HOptimizedGraphBuilder::Visit##type(node); \
#define DEF_VISIT(type) \
void Visit##type(type* node) OVERRIDE { \
if (node->position() != RelocInfo::kNoPosition) { \
SetSourcePosition(node->position()); \
} \
HOptimizedGraphBuilder::Visit##type(node); \
}
EXPRESSION_NODE_LIST(DEF_VISIT)
#undef DEF_VISIT
#define DEF_VISIT(type) \
virtual void Visit##type(type* node) OVERRIDE { \
if (node->position() != RelocInfo::kNoPosition) { \
SetSourcePosition(node->position()); \
} \
HOptimizedGraphBuilder::Visit##type(node); \
#define DEF_VISIT(type) \
void Visit##type(type* node) OVERRIDE { \
if (node->position() != RelocInfo::kNoPosition) { \
SetSourcePosition(node->position()); \
} \
HOptimizedGraphBuilder::Visit##type(node); \
}
STATEMENT_NODE_LIST(DEF_VISIT)
#undef DEF_VISIT
#define DEF_VISIT(type) \
virtual void Visit##type(type* node) OVERRIDE { \
HOptimizedGraphBuilder::Visit##type(node); \
#define DEF_VISIT(type) \
void Visit##type(type* node) OVERRIDE { \
HOptimizedGraphBuilder::Visit##type(node); \
}
MODULE_NODE_LIST(DEF_VISIT)
DECLARATION_NODE_LIST(DEF_VISIT)

View File

@ -57,7 +57,7 @@ class AstGraphBuilder : public StructuredGraphBuilder, public AstVisitor {
// Support for control flow builders. The concrete type of the environment
// depends on the graph builder, but environments themselves are not virtual.
typedef StructuredGraphBuilder::Environment BaseEnvironment;
virtual BaseEnvironment* CopyEnvironment(BaseEnvironment* env) OVERRIDE;
BaseEnvironment* CopyEnvironment(BaseEnvironment* env) OVERRIDE;
// Getters for values in the activation record.
Node* GetFunctionClosure();
@ -120,7 +120,7 @@ class AstGraphBuilder : public StructuredGraphBuilder, public AstVisitor {
#undef DECLARE_VISIT
// Visiting function for declarations list is overridden.
virtual void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE;
void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE;
private:
CompilationInfo* info_;
@ -348,8 +348,8 @@ class AstGraphBuilder::AstEffectContext FINAL : public AstContext {
explicit AstEffectContext(AstGraphBuilder* owner)
: AstContext(owner, Expression::kEffect) {}
virtual ~AstEffectContext();
virtual void ProduceValue(Node* value) OVERRIDE;
virtual Node* ConsumeValue() OVERRIDE;
void ProduceValue(Node* value) OVERRIDE;
Node* ConsumeValue() OVERRIDE;
};
@ -359,8 +359,8 @@ class AstGraphBuilder::AstValueContext FINAL : public AstContext {
explicit AstValueContext(AstGraphBuilder* owner)
: AstContext(owner, Expression::kValue) {}
virtual ~AstValueContext();
virtual void ProduceValue(Node* value) OVERRIDE;
virtual Node* ConsumeValue() OVERRIDE;
void ProduceValue(Node* value) OVERRIDE;
Node* ConsumeValue() OVERRIDE;
};
@ -370,8 +370,8 @@ class AstGraphBuilder::AstTestContext FINAL : public AstContext {
explicit AstTestContext(AstGraphBuilder* owner)
: AstContext(owner, Expression::kTest) {}
virtual ~AstTestContext();
virtual void ProduceValue(Node* value) OVERRIDE;
virtual Node* ConsumeValue() OVERRIDE;
void ProduceValue(Node* value) OVERRIDE;
Node* ConsumeValue() OVERRIDE;
};

View File

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

View File

@ -23,7 +23,7 @@ class ChangeLowering FINAL : public Reducer {
: jsgraph_(jsgraph), linkage_(linkage) {}
virtual ~ChangeLowering();
virtual Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) OVERRIDE;
private:
Node* HeapNumberValueIndexConstant();

View File

@ -360,7 +360,7 @@ const Operator* CommonOperatorBuilder::Call(const CallDescriptor* descriptor) {
descriptor->ReturnCount(),
Operator::ZeroIfPure(descriptor->properties()), 0, descriptor) {}
virtual void PrintParameter(std::ostream& os) const OVERRIDE {
void PrintParameter(std::ostream& os) const OVERRIDE {
os << "[" << *parameter() << "]";
}
};

View File

@ -21,7 +21,7 @@ class JSContextSpecializer : public Reducer {
JSContextSpecializer(CompilationInfo* info, JSGraph* jsgraph, Node* context)
: info_(info), jsgraph_(jsgraph), context_(context) {}
virtual Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) OVERRIDE;
// Visible for unit testing.
Reduction ReduceJSLoadContext(Node* node);

View File

@ -24,7 +24,7 @@ class MachineOperatorReducer FINAL : public Reducer {
explicit MachineOperatorReducer(JSGraph* jsgraph);
~MachineOperatorReducer();
virtual Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) OVERRIDE;
private:
Node* Float32Constant(volatile float value);

View File

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

View File

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

View File

@ -25,7 +25,7 @@ class SimplifiedOperatorReducer FINAL : public Reducer {
explicit SimplifiedOperatorReducer(JSGraph* jsgraph);
virtual ~SimplifiedOperatorReducer();
virtual Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) OVERRIDE;
private:
Reduction Change(Node* node, const Operator* op, Node* a);

View File

@ -223,7 +223,7 @@ class Typer::Visitor : public Reducer {
public:
explicit Visitor(Typer* typer) : typer_(typer) {}
virtual Reduction Reduce(Node* node) OVERRIDE {
Reduction Reduce(Node* node) OVERRIDE {
if (node->op()->ValueOutputCount() == 0) return NoChange();
switch (node->opcode()) {
#define DECLARE_CASE(x) \

View File

@ -16,7 +16,7 @@ class ValueNumberingReducer FINAL : public Reducer {
explicit ValueNumberingReducer(Zone* zone);
~ValueNumberingReducer();
virtual Reduction Reduce(Node* node) OVERRIDE;
Reduction Reduce(Node* node) OVERRIDE;
private:
enum { kInitialCapacity = 256u, kCapacityToSizeRatio = 2u };

View File

@ -1539,15 +1539,9 @@ class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
public:
virtual void* Allocate(size_t) OVERRIDE {
return malloc(0);
}
virtual void* AllocateUninitialized(size_t length) OVERRIDE {
return malloc(0);
}
virtual void Free(void* p, size_t) OVERRIDE {
free(p);
}
void* Allocate(size_t) OVERRIDE { return malloc(0); }
void* AllocateUninitialized(size_t length) OVERRIDE { return malloc(0); }
void Free(void* p, size_t) OVERRIDE { free(p); }
};

View File

@ -560,9 +560,7 @@ class ElementsAccessorBase : public ElementsAccessor {
typedef ElementsTraitsParam ElementsTraits;
typedef typename ElementsTraitsParam::BackingStore BackingStore;
virtual ElementsKind kind() const FINAL OVERRIDE {
return ElementsTraits::Kind;
}
ElementsKind kind() const FINAL { return ElementsTraits::Kind; }
static void ValidateContents(Handle<JSObject> holder, int length) {
}
@ -584,7 +582,7 @@ class ElementsAccessorBase : public ElementsAccessor {
ElementsAccessorSubclass::ValidateContents(holder, length);
}
virtual void Validate(Handle<JSObject> holder) FINAL OVERRIDE {
void Validate(Handle<JSObject> holder) FINAL {
DisallowHeapAllocation no_gc;
ElementsAccessorSubclass::ValidateImpl(holder);
}
@ -597,20 +595,16 @@ class ElementsAccessorBase : public ElementsAccessor {
receiver, holder, key, backing_store) != ABSENT;
}
virtual bool HasElement(
Handle<Object> receiver,
Handle<JSObject> holder,
uint32_t key,
Handle<FixedArrayBase> backing_store) FINAL OVERRIDE {
virtual bool HasElement(Handle<Object> receiver, Handle<JSObject> holder,
uint32_t key,
Handle<FixedArrayBase> backing_store) FINAL {
return ElementsAccessorSubclass::HasElementImpl(
receiver, holder, key, backing_store);
}
MUST_USE_RESULT virtual MaybeHandle<Object> Get(
Handle<Object> receiver,
Handle<JSObject> holder,
uint32_t key,
Handle<FixedArrayBase> backing_store) FINAL OVERRIDE {
Handle<Object> receiver, Handle<JSObject> holder, uint32_t key,
Handle<FixedArrayBase> backing_store) FINAL {
if (!IsExternalArrayElementsKind(ElementsTraits::Kind) &&
FLAG_trace_js_array_abuse) {
CheckArrayAbuse(holder, "elements read", key);
@ -638,10 +632,8 @@ class ElementsAccessorBase : public ElementsAccessor {
}
MUST_USE_RESULT virtual PropertyAttributes GetAttributes(
Handle<Object> receiver,
Handle<JSObject> holder,
uint32_t key,
Handle<FixedArrayBase> backing_store) FINAL OVERRIDE {
Handle<Object> receiver, Handle<JSObject> holder, uint32_t key,
Handle<FixedArrayBase> backing_store) FINAL {
return ElementsAccessorSubclass::GetAttributesImpl(
receiver, holder, key, backing_store);
}
@ -660,10 +652,8 @@ class ElementsAccessorBase : public ElementsAccessor {
}
MUST_USE_RESULT virtual MaybeHandle<AccessorPair> GetAccessorPair(
Handle<Object> receiver,
Handle<JSObject> holder,
uint32_t key,
Handle<FixedArrayBase> backing_store) FINAL OVERRIDE {
Handle<Object> receiver, Handle<JSObject> holder, uint32_t key,
Handle<FixedArrayBase> backing_store) FINAL {
return ElementsAccessorSubclass::GetAccessorPairImpl(
receiver, holder, key, backing_store);
}
@ -677,8 +667,7 @@ class ElementsAccessorBase : public ElementsAccessor {
}
MUST_USE_RESULT virtual MaybeHandle<Object> SetLength(
Handle<JSArray> array,
Handle<Object> length) FINAL OVERRIDE {
Handle<JSArray> array, Handle<Object> length) FINAL {
return ElementsAccessorSubclass::SetLengthImpl(
array, length, handle(array->elements()));
}
@ -688,10 +677,8 @@ class ElementsAccessorBase : public ElementsAccessor {
Handle<Object> length,
Handle<FixedArrayBase> backing_store);
virtual void SetCapacityAndLength(
Handle<JSArray> array,
int capacity,
int length) FINAL OVERRIDE {
virtual void SetCapacityAndLength(Handle<JSArray> array, int capacity,
int length) FINAL {
ElementsAccessorSubclass::
SetFastElementsCapacityAndLength(array, capacity, length);
}
@ -715,13 +702,9 @@ class ElementsAccessorBase : public ElementsAccessor {
UNREACHABLE();
}
virtual void CopyElements(
Handle<FixedArrayBase> from,
uint32_t from_start,
ElementsKind from_kind,
Handle<FixedArrayBase> to,
uint32_t to_start,
int copy_size) FINAL OVERRIDE {
virtual void CopyElements(Handle<FixedArrayBase> from, uint32_t from_start,
ElementsKind from_kind, Handle<FixedArrayBase> to,
uint32_t to_start, int copy_size) FINAL {
DCHECK(!from.is_null());
// NOTE: the ElementsAccessorSubclass::CopyElementsImpl() methods
// violate the handlified function signature convention:
@ -734,13 +717,9 @@ class ElementsAccessorBase : public ElementsAccessor {
kPackedSizeNotKnown, copy_size);
}
virtual void CopyElements(
JSObject* from_holder,
uint32_t from_start,
ElementsKind from_kind,
Handle<FixedArrayBase> to,
uint32_t to_start,
int copy_size) FINAL OVERRIDE {
virtual void CopyElements(JSObject* from_holder, uint32_t from_start,
ElementsKind from_kind, Handle<FixedArrayBase> to,
uint32_t to_start, int copy_size) FINAL {
int packed_size = kPackedSizeNotKnown;
bool is_packed = IsFastPackedElementsKind(from_kind) &&
from_holder->IsJSArray();
@ -767,8 +746,7 @@ class ElementsAccessorBase : public ElementsAccessor {
virtual MaybeHandle<FixedArray> AddElementsToFixedArray(
Handle<Object> receiver, Handle<JSObject> holder, Handle<FixedArray> to,
Handle<FixedArrayBase> from,
FixedArray::KeyFilter filter) FINAL OVERRIDE {
Handle<FixedArrayBase> from, FixedArray::KeyFilter filter) FINAL {
int len0 = to->length();
#ifdef ENABLE_SLOW_DCHECKS
if (FLAG_enable_slow_asserts) {
@ -852,8 +830,7 @@ class ElementsAccessorBase : public ElementsAccessor {
return backing_store->length();
}
virtual uint32_t GetCapacity(Handle<FixedArrayBase> backing_store)
FINAL OVERRIDE {
uint32_t GetCapacity(Handle<FixedArrayBase> backing_store) FINAL {
return ElementsAccessorSubclass::GetCapacityImpl(backing_store);
}
@ -863,7 +840,7 @@ class ElementsAccessorBase : public ElementsAccessor {
}
virtual uint32_t GetKeyForIndex(Handle<FixedArrayBase> backing_store,
uint32_t index) FINAL OVERRIDE {
uint32_t index) FINAL {
return ElementsAccessorSubclass::GetKeyForIndexImpl(backing_store, index);
}
@ -997,10 +974,8 @@ class FastElementsAccessor
return isolate->factory()->true_value();
}
virtual MaybeHandle<Object> Delete(
Handle<JSObject> obj,
uint32_t key,
JSReceiver::DeleteMode mode) FINAL OVERRIDE {
virtual MaybeHandle<Object> Delete(Handle<JSObject> obj, uint32_t key,
JSReceiver::DeleteMode mode) FINAL {
return DeleteCommon(obj, key, mode);
}
@ -1323,9 +1298,7 @@ class TypedElementsAccessor
}
MUST_USE_RESULT virtual MaybeHandle<Object> Delete(
Handle<JSObject> obj,
uint32_t key,
JSReceiver::DeleteMode mode) FINAL OVERRIDE {
Handle<JSObject> obj, uint32_t key, JSReceiver::DeleteMode mode) FINAL {
// External arrays always ignore deletes.
return obj->GetIsolate()->factory()->true_value();
}
@ -1477,9 +1450,7 @@ class DictionaryElementsAccessor
ElementsKindTraits<DICTIONARY_ELEMENTS> >;
MUST_USE_RESULT virtual MaybeHandle<Object> Delete(
Handle<JSObject> obj,
uint32_t key,
JSReceiver::DeleteMode mode) FINAL OVERRIDE {
Handle<JSObject> obj, uint32_t key, JSReceiver::DeleteMode mode) FINAL {
return DeleteCommon(obj, key, mode);
}
@ -1651,9 +1622,7 @@ class SloppyArgumentsElementsAccessor : public ElementsAccessorBase<
}
MUST_USE_RESULT virtual MaybeHandle<Object> Delete(
Handle<JSObject> obj,
uint32_t key,
JSReceiver::DeleteMode mode) FINAL OVERRIDE {
Handle<JSObject> obj, uint32_t key, JSReceiver::DeleteMode mode) FINAL {
Isolate* isolate = obj->GetIsolate();
Handle<FixedArray> parameter_map(FixedArray::cast(obj->elements()));
Handle<Object> probe = GetParameterMapArg(obj, parameter_map, key);

View File

@ -446,7 +446,7 @@ class MarkCompactCollector::SweeperTask : public v8::Task {
private:
// v8::Task overrides.
virtual void Run() OVERRIDE {
void Run() OVERRIDE {
heap_->mark_compact_collector()->SweepInParallel(space_, 0);
heap_->mark_compact_collector()->pending_sweeper_jobs_semaphore_.Signal();
}

File diff suppressed because it is too large Load Diff

View File

@ -819,7 +819,7 @@ class EffectContext FINAL : public AstContext {
}
virtual ~EffectContext();
virtual void ReturnValue(HValue* value) OVERRIDE;
void ReturnValue(HValue* value) OVERRIDE;
virtual void ReturnInstruction(HInstruction* instr,
BailoutId ast_id) OVERRIDE;
virtual void ReturnControl(HControlInstruction* instr,
@ -836,7 +836,7 @@ class ValueContext FINAL : public AstContext {
}
virtual ~ValueContext();
virtual void ReturnValue(HValue* value) OVERRIDE;
void ReturnValue(HValue* value) OVERRIDE;
virtual void ReturnInstruction(HInstruction* instr,
BailoutId ast_id) OVERRIDE;
virtual void ReturnControl(HControlInstruction* instr,
@ -863,7 +863,7 @@ class TestContext FINAL : public AstContext {
if_false_(if_false) {
}
virtual void ReturnValue(HValue* value) OVERRIDE;
void ReturnValue(HValue* value) OVERRIDE;
virtual void ReturnInstruction(HInstruction* instr,
BailoutId ast_id) OVERRIDE;
virtual void ReturnControl(HControlInstruction* instr,
@ -2108,13 +2108,13 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
explicit HOptimizedGraphBuilder(CompilationInfo* info);
virtual bool BuildGraph() OVERRIDE;
bool BuildGraph() OVERRIDE;
// Simple accessors.
BreakAndContinueScope* break_scope() const { return break_scope_; }
void set_break_scope(BreakAndContinueScope* head) { break_scope_ = head; }
HValue* context() { return environment()->context(); }
HValue* context() OVERRIDE { return environment()->context(); }
HOsrBuilder* osr() const { return osr_; }
@ -2126,7 +2126,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
FunctionState* function_state() const { return function_state_; }
void VisitDeclarations(ZoneList<Declaration*>* declarations);
void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE;
void* operator new(size_t size, Zone* zone) {
return zone->New(static_cast<int>(size));
@ -2285,7 +2285,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
HBasicBlock* false_block);
// Visit a list of expressions from left to right, each in a value context.
void VisitExpressions(ZoneList<Expression*>* exprs);
void VisitExpressions(ZoneList<Expression*>* exprs) OVERRIDE;
void VisitExpressions(ZoneList<Expression*>* exprs,
ArgumentsAllowedFlag flag);
@ -2295,7 +2295,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
void PushArgumentsFromEnvironment(int count);
void SetUpScope(Scope* scope);
virtual void VisitStatements(ZoneList<Statement*>* statements) OVERRIDE;
void VisitStatements(ZoneList<Statement*>* statements) OVERRIDE;
#define DECLARE_VISIT(type) virtual void Visit##type(type* node) OVERRIDE;
AST_NODE_LIST(DECLARE_VISIT)

View File

@ -76,7 +76,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register r0,
Register r1);
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
private:
static const int kInlinedProbes = 4;
@ -142,7 +142,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8.
static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8.
@ -339,9 +339,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; }
inline Major MajorKey() const FINAL { return RecordWrite; }
virtual void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) OVERRIDE;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
@ -349,7 +349,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
void Activate(Code* code) {
void Activate(Code* code) OVERRIDE {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}

View File

@ -31,9 +31,9 @@ class SafepointGenerator FINAL : public CallWrapper {
deopt_mode_(mode) {}
virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const OVERRIDE {}
void BeforeCall(int call_size) const OVERRIDE {}
virtual void AfterCall() const OVERRIDE {
void AfterCall() const OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_);
}
@ -2627,10 +2627,10 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; }
private:
LInstanceOfKnownGlobal* instr_;
@ -3586,10 +3586,11 @@ void LCodeGen::DoMathAbs(LMathAbs* instr) {
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen,
LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LMathAbs* instr_;
};
@ -4340,10 +4341,9 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
DeferredStringCharCodeAt(LCodeGen* codegen,
LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharCodeAt* instr_;
};
@ -4398,10 +4398,11 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
DeferredStringCharFromCode(LCodeGen* codegen,
LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharFromCode* instr_;
};
@ -4476,11 +4477,12 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
DeferredNumberTagI(LCodeGen* codegen,
LNumberTagI* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(
instr_, instr_->value(), instr_->temp(), SIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagI* instr_;
};
@ -4502,11 +4504,12 @@ void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(
instr_, instr_->value(), instr_->temp(), UNSIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagU* instr_;
};
@ -4584,10 +4587,9 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagD* instr_;
};
@ -4784,10 +4786,9 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredTaggedToI(instr_, done());
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_, done()); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LTaggedToI* instr_;
};
@ -4988,11 +4989,12 @@ void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
: LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps());
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_);
}
Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LCheckMaps* instr_;
Label check_maps_;
@ -5129,10 +5131,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LAllocate* instr_;
};
@ -5495,10 +5496,9 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStackCheck* instr_;
};
@ -5645,10 +5645,11 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredLoadMutableDouble(instr_, object_, index_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LLoadFieldByIndex* instr_;
Register object_;

View File

@ -167,17 +167,13 @@ class LCodeGen;
V(WrapReceiver)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
virtual Opcode opcode() const FINAL OVERRIDE { \
return LInstruction::k##type; \
} \
virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
virtual const char* Mnemonic() const FINAL OVERRIDE { \
return mnemonic; \
} \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
Opcode opcode() const FINAL { return LInstruction::k##type; } \
void CompileToNative(LCodeGen* generator) FINAL; \
const char* Mnemonic() const FINAL { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
}
@ -292,11 +288,9 @@ class LTemplateResultInstruction : public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
virtual bool HasResult() const FINAL OVERRIDE {
return R != 0 && result() != NULL;
}
bool HasResult() const FINAL { return R != 0 && result() != NULL; }
void set_result(LOperand* operand) { results_[0] = operand; }
LOperand* result() const { return results_[0]; }
LOperand* result() const OVERRIDE { return results_[0]; }
protected:
EmbeddedContainer<LOperand*, R> results_;
@ -314,11 +308,11 @@ class LTemplateInstruction : public LTemplateResultInstruction<R> {
private:
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return I; }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return I; }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return T; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; }
int TempCount() FINAL { return T; }
LOperand* TempAt(int i) FINAL { return temps_[i]; }
};
@ -332,8 +326,8 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
}
// Can't use the DECLARE-macro here because of sub-classes.
virtual bool IsGap() const FINAL OVERRIDE { return true; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsGap() const FINAL { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
static LGap* cast(LInstruction* instr) {
DCHECK(instr->IsGap());
return reinterpret_cast<LGap*>(instr);
@ -373,7 +367,7 @@ class LInstructionGap FINAL : public LGap {
public:
explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return !IsRedundant();
}
@ -385,13 +379,13 @@ class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
public:
explicit LGoto(HBasicBlock* block) : block_(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
virtual bool IsControl() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsControl() const OVERRIDE { return true; }
int block_id() const { return block_->block_id(); }
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return false;
}
@ -426,7 +420,7 @@ class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> {
class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool IsControl() const OVERRIDE { return true; }
bool IsControl() const OVERRIDE { return true; }
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
};
@ -437,12 +431,10 @@ class LLabel FINAL : public LGap {
explicit LLabel(HBasicBlock* block)
: LGap(block), replacement_(NULL) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Label, "label")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int block_id() const { return block()->block_id(); }
bool is_loop_header() const { return block()->IsLoopHeader(); }
@ -460,9 +452,7 @@ class LLabel FINAL : public LGap {
class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
};
@ -503,9 +493,7 @@ class LTailCallThroughMegamorphicCache FINAL
class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
@ -515,7 +503,7 @@ class LControlInstruction: public LTemplateInstruction<0, I, T> {
public:
LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
virtual bool IsControl() const FINAL OVERRIDE { return true; }
bool IsControl() const FINAL { return true; }
int SuccessorCount() { return hydrogen()->SuccessorCount(); }
HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
@ -608,7 +596,7 @@ class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -857,7 +845,7 @@ class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
return hydrogen()->representation().IsDouble();
}
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1038,7 +1026,7 @@ class LIsObjectAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1055,7 +1043,7 @@ class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1070,7 +1058,7 @@ class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1088,7 +1076,7 @@ class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
"is-undetectable-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1108,7 +1096,7 @@ class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
"string-compare-and-branch")
DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Token::Value op() const { return hydrogen()->token(); }
};
@ -1128,7 +1116,7 @@ class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 1> {
"has-instance-type-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1157,7 +1145,7 @@ class LHasCachedArrayIndexAndBranch FINAL
DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
"has-cached-array-index-and-branch")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1190,7 +1178,7 @@ class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 2> {
"class-of-test-and-branch")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1391,7 +1379,7 @@ class LBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
DECLARE_HYDROGEN_ACCESSOR(Branch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1542,11 +1530,9 @@ class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
Token::Value op() const { return op_; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticD;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1569,11 +1555,9 @@ class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* left() { return inputs_[1]; }
LOperand* right() { return inputs_[2]; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticT;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
Token::Value op() const { return op_; }
@ -1686,7 +1670,7 @@ class LLoadKeyed FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
uint32_t base_offset() const { return hydrogen()->base_offset(); }
bool key_is_smi() {
return hydrogen()->key()->representation().IsTagged();
@ -1784,7 +1768,7 @@ class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1805,7 +1789,7 @@ class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 1> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1844,7 +1828,7 @@ class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> {
LOperand* function() { return inputs_[0]; }
LOperand* code_object() { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
@ -1861,7 +1845,7 @@ class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> {
LOperand* base_object() const { return inputs_[0]; }
LOperand* offset() const { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
};
@ -1905,7 +1889,7 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1927,18 +1911,18 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
ZoneList<LOperand*> inputs_;
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return inputs_.length(); }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return 0; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; }
int TempCount() FINAL { return 0; }
LOperand* TempAt(int i) FINAL { return NULL; }
};
@ -1955,7 +1939,7 @@ class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1991,7 +1975,7 @@ class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -2010,7 +1994,7 @@ class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -2027,7 +2011,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return save_doubles() == kDontSaveFPRegs;
}
@ -2219,7 +2203,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 2> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2238,7 +2222,7 @@ class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Object> name() const { return hydrogen()->name(); }
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2269,7 +2253,7 @@ class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
uint32_t base_offset() const { return hydrogen()->base_offset(); }
bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
};
@ -2295,7 +2279,7 @@ class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2322,7 +2306,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> {
"transition-elements-kind")
DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
Handle<Map> transitioned_map() {
@ -2612,15 +2596,13 @@ class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 0> {
Handle<String> type_literal() { return hydrogen()->type_literal(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
};
@ -2829,7 +2811,7 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
// An input operand in register, stack slot or a constant operand.
// Will not be moved to a register even if one is freely available.
virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
// Temporary operand that must be in a register.
MUST_USE_RESULT LUnallocated* TempRegister();

View File

@ -433,7 +433,7 @@ class LoadIC : public IC {
}
}
virtual Handle<Code> megamorphic_stub() OVERRIDE;
Handle<Code> megamorphic_stub() OVERRIDE;
// Update the inline cache and the global stub cache based on the
// lookup result.
@ -554,7 +554,7 @@ class StoreIC : public IC {
JSReceiver::StoreFromKeyed store_mode);
protected:
virtual Handle<Code> megamorphic_stub() OVERRIDE;
Handle<Code> megamorphic_stub() OVERRIDE;
// Stub accessors.
Handle<Code> generic_stub() const;

View File

@ -37,7 +37,7 @@ class DefaultPlatform : public Platform {
Task* task, ExpectedRuntime expected_runtime) OVERRIDE;
virtual void CallOnForegroundThread(v8::Isolate* isolate,
Task* task) OVERRIDE;
virtual double MonotonicallyIncreasingTime() OVERRIDE;
double MonotonicallyIncreasingTime() OVERRIDE;
private:
static const int kMaxThreadPoolSize;

View File

@ -22,7 +22,7 @@ class WorkerThread : public base::Thread {
virtual ~WorkerThread();
// Thread implementation.
virtual void Run() OVERRIDE;
void Run() OVERRIDE;
private:
friend class QuitTask;

View File

@ -101,7 +101,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
static void PatchBranchIntoNop(MacroAssembler* masm, int pos) {
const unsigned offset = masm->instr_at(pos) & kImm16Mask;
@ -228,9 +228,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; }
inline Major MajorKey() const FINAL { return RecordWrite; }
virtual void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) OVERRIDE;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
@ -238,7 +238,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
void Activate(Code* code) {
void Activate(Code* code) OVERRIDE {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}
@ -286,7 +286,7 @@ class DirectCEntryStub: public PlatformCodeStub {
void GenerateCall(MacroAssembler* masm, Register target);
private:
bool NeedsImmovableCode() { return true; }
bool NeedsImmovableCode() OVERRIDE { return true; }
DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
@ -318,7 +318,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register r0,
Register r1);
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
private:
static const int kInlinedProbes = 4;

View File

@ -51,9 +51,9 @@ class SafepointGenerator FINAL : public CallWrapper {
deopt_mode_(mode) { }
virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const OVERRIDE {}
void BeforeCall(int call_size) const OVERRIDE {}
virtual void AfterCall() const OVERRIDE {
void AfterCall() const OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_);
}
@ -2695,10 +2695,10 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; }
private:
@ -3677,10 +3677,11 @@ void LCodeGen::DoMathAbs(LMathAbs* instr) {
public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LMathAbs* instr_;
};
@ -4493,10 +4494,9 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharCodeAt* instr_;
};
@ -4548,10 +4548,11 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharFromCode* instr_;
};
@ -4626,14 +4627,15 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
public:
DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_,
instr_->value(),
instr_->temp1(),
instr_->temp2(),
SIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagI* instr_;
};
@ -4654,14 +4656,15 @@ void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_,
instr_->value(),
instr_->temp1(),
instr_->temp2(),
UNSIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagU* instr_;
};
@ -4748,10 +4751,9 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagD* instr_;
};
@ -4974,10 +4976,9 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredTaggedToI(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LTaggedToI* instr_;
};
@ -5183,11 +5184,12 @@ void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
: LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps());
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_);
}
Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LCheckMaps* instr_;
Label check_maps_;
@ -5306,10 +5308,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LAllocate* instr_;
};
@ -5719,10 +5720,9 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStackCheck* instr_;
};
@ -5870,10 +5870,11 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LLoadFieldByIndex* instr_;
Register result_;

View File

@ -163,17 +163,13 @@ class LCodeGen;
V(UnknownOSRValue) \
V(WrapReceiver)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
virtual Opcode opcode() const FINAL OVERRIDE { \
return LInstruction::k##type; \
} \
virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
virtual const char* Mnemonic() const FINAL OVERRIDE { \
return mnemonic; \
} \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
Opcode opcode() const FINAL { return LInstruction::k##type; } \
void CompileToNative(LCodeGen* generator) FINAL; \
const char* Mnemonic() const FINAL { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
}
@ -288,11 +284,9 @@ class LTemplateResultInstruction : public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
virtual bool HasResult() const FINAL OVERRIDE {
return R != 0 && result() != NULL;
}
bool HasResult() const FINAL { return R != 0 && result() != NULL; }
void set_result(LOperand* operand) { results_[0] = operand; }
LOperand* result() const { return results_[0]; }
LOperand* result() const OVERRIDE { return results_[0]; }
protected:
EmbeddedContainer<LOperand*, R> results_;
@ -310,11 +304,11 @@ class LTemplateInstruction : public LTemplateResultInstruction<R> {
private:
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return I; }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return I; }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return T; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; }
int TempCount() FINAL { return T; }
LOperand* TempAt(int i) FINAL { return temps_[i]; }
};
@ -329,8 +323,8 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
}
// Can't use the DECLARE-macro here because of sub-classes.
virtual bool IsGap() const FINAL OVERRIDE { return true; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsGap() const FINAL { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
static LGap* cast(LInstruction* instr) {
DCHECK(instr->IsGap());
return reinterpret_cast<LGap*>(instr);
@ -370,7 +364,7 @@ class LInstructionGap FINAL : public LGap {
public:
explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return !IsRedundant();
}
@ -382,10 +376,10 @@ class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
public:
explicit LGoto(HBasicBlock* block) : block_(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
virtual bool IsControl() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsControl() const OVERRIDE { return true; }
int block_id() const { return block_->block_id(); }
@ -428,7 +422,7 @@ class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> {
class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool IsControl() const OVERRIDE { return true; }
bool IsControl() const OVERRIDE { return true; }
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
};
@ -439,12 +433,10 @@ class LLabel FINAL : public LGap {
explicit LLabel(HBasicBlock* block)
: LGap(block), replacement_(NULL) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Label, "label")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int block_id() const { return block()->block_id(); }
bool is_loop_header() const { return block()->IsLoopHeader(); }
@ -462,9 +454,7 @@ class LLabel FINAL : public LGap {
class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
};
@ -505,9 +495,7 @@ class LTailCallThroughMegamorphicCache FINAL
class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
@ -517,7 +505,7 @@ class LControlInstruction : public LTemplateInstruction<0, I, T> {
public:
LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
virtual bool IsControl() const FINAL OVERRIDE { return true; }
bool IsControl() const FINAL { return true; }
int SuccessorCount() { return hydrogen()->SuccessorCount(); }
HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
@ -606,7 +594,7 @@ class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* length() { return inputs_[1]; }
LOperand* index() { return inputs_[2]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -846,7 +834,7 @@ class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
return hydrogen()->representation().IsDouble();
}
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1034,7 +1022,7 @@ class LIsObjectAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1051,7 +1039,7 @@ class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1066,7 +1054,7 @@ class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1084,7 +1072,7 @@ class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
"is-undetectable-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1106,7 +1094,7 @@ class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
Token::Value op() const { return hydrogen()->token(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1122,7 +1110,7 @@ class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> {
"has-instance-type-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1152,7 +1140,7 @@ class LHasCachedArrayIndexAndBranch FINAL
"has-cached-array-index-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1170,7 +1158,7 @@ class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> {
"class-of-test-and-branch")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1367,7 +1355,7 @@ class LBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
DECLARE_HYDROGEN_ACCESSOR(Branch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1512,11 +1500,9 @@ class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* left() { return inputs_[0]; }
LOperand* right() { return inputs_[1]; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticD;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1540,9 +1526,9 @@ class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* right() { return inputs_[2]; }
Token::Value op() const { return op_; }
virtual Opcode opcode() const FINAL { return LInstruction::kArithmeticT; }
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const FINAL { return LInstruction::kArithmeticT; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1651,7 +1637,7 @@ class LLoadKeyed FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
uint32_t base_offset() const { return hydrogen()->base_offset(); }
};
@ -1732,7 +1718,7 @@ class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1751,7 +1737,7 @@ class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1790,7 +1776,7 @@ class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> {
LOperand* function() { return inputs_[0]; }
LOperand* code_object() { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
@ -1807,7 +1793,7 @@ class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> {
LOperand* base_object() const { return inputs_[0]; }
LOperand* offset() const { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
};
@ -1851,7 +1837,7 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1875,7 +1861,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
@ -1883,11 +1869,11 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
ZoneList<LOperand*> inputs_;
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return inputs_.length(); }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return 0; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; }
int TempCount() FINAL { return 0; }
LOperand* TempAt(int i) FINAL { return NULL; }
};
@ -1904,7 +1890,7 @@ class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1940,7 +1926,7 @@ class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1959,7 +1945,7 @@ class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1976,7 +1962,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return save_doubles() == kDontSaveFPRegs;
}
@ -2170,7 +2156,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 1> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Representation representation() const {
return hydrogen()->field_representation();
@ -2193,7 +2179,7 @@ class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Object> name() const { return hydrogen()->name(); }
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
@ -2225,7 +2211,7 @@ class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
uint32_t base_offset() const { return hydrogen()->base_offset(); }
};
@ -2251,7 +2237,7 @@ class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2275,7 +2261,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> {
"transition-elements-kind")
DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
Handle<Map> transitioned_map() {
@ -2571,7 +2557,7 @@ class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 0> {
Handle<String> type_literal() { return hydrogen()->type_literal(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2592,9 +2578,7 @@ class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
public:
LOsrEntry() {}
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
};
@ -2797,7 +2781,7 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
// An input operand in register, stack slot or a constant operand.
// Will not be moved to a register even if one is freely available.
virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
// Temporary operand that must be in a register.
MUST_USE_RESULT LUnallocated* TempRegister();

View File

@ -102,7 +102,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
static void PatchBranchIntoNop(MacroAssembler* masm, int pos) {
const unsigned offset = masm->instr_at(pos) & kImm16Mask;
@ -229,9 +229,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; }
inline Major MajorKey() const FINAL { return RecordWrite; }
virtual void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) OVERRIDE;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
@ -239,7 +239,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
void Activate(Code* code) {
void Activate(Code* code) OVERRIDE {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}
@ -287,7 +287,7 @@ class DirectCEntryStub: public PlatformCodeStub {
void GenerateCall(MacroAssembler* masm, Register target);
private:
bool NeedsImmovableCode() { return true; }
bool NeedsImmovableCode() OVERRIDE { return true; }
DEFINE_NULL_CALL_INTERFACE_DESCRIPTOR();
DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
@ -319,7 +319,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register r0,
Register r1);
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
private:
static const int kInlinedProbes = 4;

View File

@ -26,9 +26,9 @@ class SafepointGenerator FINAL : public CallWrapper {
deopt_mode_(mode) { }
virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const OVERRIDE {}
void BeforeCall(int call_size) const OVERRIDE {}
virtual void AfterCall() const OVERRIDE {
void AfterCall() const OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_);
}
@ -2665,10 +2665,10 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; }
private:
@ -3706,10 +3706,11 @@ void LCodeGen::DoMathAbs(LMathAbs* instr) {
public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LMathAbs* instr_;
};
@ -4557,10 +4558,9 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharCodeAt* instr_;
};
@ -4612,10 +4612,11 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharFromCode* instr_;
};
@ -4690,14 +4691,15 @@ void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_,
instr_->value(),
instr_->temp1(),
instr_->temp2(),
UNSIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagU* instr_;
};
@ -4780,10 +4782,9 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagD* instr_;
};
@ -5006,10 +5007,9 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredTaggedToI(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LTaggedToI* instr_;
};
@ -5214,11 +5214,12 @@ void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
: LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps());
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_);
}
Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LCheckMaps* instr_;
Label check_maps_;
@ -5337,10 +5338,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LAllocate* instr_;
};
@ -5752,10 +5752,9 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStackCheck* instr_;
};
@ -5903,10 +5902,11 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LLoadFieldByIndex* instr_;
Register result_;

View File

@ -162,17 +162,13 @@ class LCodeGen;
V(UnknownOSRValue) \
V(WrapReceiver)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
virtual Opcode opcode() const FINAL OVERRIDE { \
return LInstruction::k##type; \
} \
virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
virtual const char* Mnemonic() const FINAL OVERRIDE { \
return mnemonic; \
} \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
Opcode opcode() const FINAL { return LInstruction::k##type; } \
void CompileToNative(LCodeGen* generator) FINAL; \
const char* Mnemonic() const FINAL { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
}
@ -287,11 +283,9 @@ class LTemplateResultInstruction : public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
virtual bool HasResult() const FINAL OVERRIDE {
return R != 0 && result() != NULL;
}
bool HasResult() const FINAL { return R != 0 && result() != NULL; }
void set_result(LOperand* operand) { results_[0] = operand; }
LOperand* result() const { return results_[0]; }
LOperand* result() const OVERRIDE { return results_[0]; }
protected:
EmbeddedContainer<LOperand*, R> results_;
@ -309,11 +303,11 @@ class LTemplateInstruction : public LTemplateResultInstruction<R> {
private:
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return I; }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return I; }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return T; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; }
int TempCount() FINAL { return T; }
LOperand* TempAt(int i) FINAL { return temps_[i]; }
};
@ -328,8 +322,8 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
}
// Can't use the DECLARE-macro here because of sub-classes.
virtual bool IsGap() const FINAL OVERRIDE { return true; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsGap() const FINAL { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
static LGap* cast(LInstruction* instr) {
DCHECK(instr->IsGap());
return reinterpret_cast<LGap*>(instr);
@ -369,7 +363,7 @@ class LInstructionGap FINAL : public LGap {
public:
explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return !IsRedundant();
}
@ -381,10 +375,10 @@ class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
public:
explicit LGoto(HBasicBlock* block) : block_(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
virtual bool IsControl() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsControl() const OVERRIDE { return true; }
int block_id() const { return block_->block_id(); }
@ -427,7 +421,7 @@ class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> {
class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool IsControl() const OVERRIDE { return true; }
bool IsControl() const OVERRIDE { return true; }
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
};
@ -438,12 +432,10 @@ class LLabel FINAL : public LGap {
explicit LLabel(HBasicBlock* block)
: LGap(block), replacement_(NULL) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Label, "label")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int block_id() const { return block()->block_id(); }
bool is_loop_header() const { return block()->IsLoopHeader(); }
@ -461,9 +453,7 @@ class LLabel FINAL : public LGap {
class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
};
@ -504,9 +494,7 @@ class LTailCallThroughMegamorphicCache FINAL
class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
@ -516,7 +504,7 @@ class LControlInstruction : public LTemplateInstruction<0, I, T> {
public:
LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
virtual bool IsControl() const FINAL OVERRIDE { return true; }
bool IsControl() const FINAL { return true; }
int SuccessorCount() { return hydrogen()->SuccessorCount(); }
HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
@ -605,7 +593,7 @@ class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* length() { return inputs_[1]; }
LOperand* index() { return inputs_[2]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -845,7 +833,7 @@ class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
return hydrogen()->representation().IsDouble();
}
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1033,7 +1021,7 @@ class LIsObjectAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1050,7 +1038,7 @@ class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1065,7 +1053,7 @@ class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1083,7 +1071,7 @@ class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
"is-undetectable-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1105,7 +1093,7 @@ class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
Token::Value op() const { return hydrogen()->token(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1121,7 +1109,7 @@ class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> {
"has-instance-type-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1151,7 +1139,7 @@ class LHasCachedArrayIndexAndBranch FINAL
"has-cached-array-index-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1169,7 +1157,7 @@ class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> {
"class-of-test-and-branch")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1366,7 +1354,7 @@ class LBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
DECLARE_HYDROGEN_ACCESSOR(Branch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1511,11 +1499,9 @@ class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* left() { return inputs_[0]; }
LOperand* right() { return inputs_[1]; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticD;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1539,9 +1525,9 @@ class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* right() { return inputs_[2]; }
Token::Value op() const { return op_; }
virtual Opcode opcode() const FINAL { return LInstruction::kArithmeticT; }
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const FINAL { return LInstruction::kArithmeticT; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1650,7 +1636,7 @@ class LLoadKeyed FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
uint32_t base_offset() const { return hydrogen()->base_offset(); }
};
@ -1731,7 +1717,7 @@ class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1750,7 +1736,7 @@ class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1789,7 +1775,7 @@ class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> {
LOperand* function() { return inputs_[0]; }
LOperand* code_object() { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
@ -1806,7 +1792,7 @@ class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> {
LOperand* base_object() const { return inputs_[0]; }
LOperand* offset() const { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
};
@ -1850,7 +1836,7 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1874,7 +1860,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
@ -1882,11 +1868,11 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
ZoneList<LOperand*> inputs_;
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return inputs_.length(); }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return 0; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; }
int TempCount() FINAL { return 0; }
LOperand* TempAt(int i) FINAL { return NULL; }
};
@ -1904,7 +1890,7 @@ class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1940,7 +1926,7 @@ class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1959,7 +1945,7 @@ class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1976,7 +1962,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return save_doubles() == kDontSaveFPRegs;
}
@ -2154,7 +2140,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 1> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Representation representation() const {
return hydrogen()->field_representation();
@ -2177,7 +2163,7 @@ class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Object> name() const { return hydrogen()->name(); }
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
@ -2209,7 +2195,7 @@ class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
uint32_t base_offset() const { return hydrogen()->base_offset(); }
};
@ -2235,7 +2221,7 @@ class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2259,7 +2245,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> {
"transition-elements-kind")
DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
Handle<Map> transitioned_map() {
@ -2555,7 +2541,7 @@ class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 0> {
Handle<String> type_literal() { return hydrogen()->type_literal(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2576,9 +2562,7 @@ class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
public:
LOsrEntry() {}
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
};
@ -2781,7 +2765,7 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
// An input operand in register, stack slot or a constant operand.
// Will not be moved to a register even if one is freely available.
virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
// Temporary operand that must be in a register.
MUST_USE_RESULT LUnallocated* TempRegister();

View File

@ -517,7 +517,7 @@ class SequentialStringKey : public HashTableKey {
explicit SequentialStringKey(Vector<const Char> string, uint32_t seed)
: string_(string), hash_field_(0), seed_(seed) { }
virtual uint32_t Hash() OVERRIDE {
uint32_t Hash() OVERRIDE {
hash_field_ = StringHasher::HashSequentialString<Char>(string_.start(),
string_.length(),
seed_);
@ -528,7 +528,7 @@ class SequentialStringKey : public HashTableKey {
}
virtual uint32_t HashForObject(Object* other) OVERRIDE {
uint32_t HashForObject(Object* other) OVERRIDE {
return String::cast(other)->Hash();
}
@ -543,11 +543,11 @@ class OneByteStringKey : public SequentialStringKey<uint8_t> {
OneByteStringKey(Vector<const uint8_t> str, uint32_t seed)
: SequentialStringKey<uint8_t>(str, seed) { }
virtual bool IsMatch(Object* string) OVERRIDE {
bool IsMatch(Object* string) OVERRIDE {
return String::cast(string)->IsOneByteEqualTo(string_);
}
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE;
Handle<Object> AsHandle(Isolate* isolate) OVERRIDE;
};
@ -558,7 +558,7 @@ class SeqOneByteSubStringKey : public HashTableKey {
DCHECK(string_->IsSeqOneByteString());
}
virtual uint32_t Hash() OVERRIDE {
uint32_t Hash() OVERRIDE {
DCHECK(length_ >= 0);
DCHECK(from_ + length_ <= string_->length());
const uint8_t* chars = string_->GetChars() + from_;
@ -569,12 +569,12 @@ class SeqOneByteSubStringKey : public HashTableKey {
return result;
}
virtual uint32_t HashForObject(Object* other) OVERRIDE {
uint32_t HashForObject(Object* other) OVERRIDE {
return String::cast(other)->Hash();
}
virtual bool IsMatch(Object* string) OVERRIDE;
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE;
bool IsMatch(Object* string) OVERRIDE;
Handle<Object> AsHandle(Isolate* isolate) OVERRIDE;
private:
Handle<SeqOneByteString> string_;
@ -589,11 +589,11 @@ class TwoByteStringKey : public SequentialStringKey<uc16> {
explicit TwoByteStringKey(Vector<const uc16> str, uint32_t seed)
: SequentialStringKey<uc16>(str, seed) { }
virtual bool IsMatch(Object* string) OVERRIDE {
bool IsMatch(Object* string) OVERRIDE {
return String::cast(string)->IsTwoByteEqualTo(string_);
}
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE;
Handle<Object> AsHandle(Isolate* isolate) OVERRIDE;
};
@ -603,11 +603,11 @@ class Utf8StringKey : public HashTableKey {
explicit Utf8StringKey(Vector<const char> string, uint32_t seed)
: string_(string), hash_field_(0), seed_(seed) { }
virtual bool IsMatch(Object* string) OVERRIDE {
bool IsMatch(Object* string) OVERRIDE {
return String::cast(string)->IsUtf8EqualTo(string_);
}
virtual uint32_t Hash() OVERRIDE {
uint32_t Hash() OVERRIDE {
if (hash_field_ != 0) return hash_field_ >> String::kHashShift;
hash_field_ = StringHasher::ComputeUtf8Hash(string_, seed_, &chars_);
uint32_t result = hash_field_ >> String::kHashShift;
@ -615,11 +615,11 @@ class Utf8StringKey : public HashTableKey {
return result;
}
virtual uint32_t HashForObject(Object* other) OVERRIDE {
uint32_t HashForObject(Object* other) OVERRIDE {
return String::cast(other)->Hash();
}
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
if (hash_field_ == 0) Hash();
return isolate->factory()->NewInternalizedStringFromUtf8(
string_, chars_, hash_field_);

View File

@ -14167,17 +14167,17 @@ class InternalizedStringKey : public HashTableKey {
explicit InternalizedStringKey(Handle<String> string)
: string_(string) { }
virtual bool IsMatch(Object* string) OVERRIDE {
bool IsMatch(Object* string) OVERRIDE {
return String::cast(string)->Equals(*string_);
}
virtual uint32_t Hash() OVERRIDE { return string_->Hash(); }
uint32_t Hash() OVERRIDE { return string_->Hash(); }
virtual uint32_t HashForObject(Object* other) OVERRIDE {
uint32_t HashForObject(Object* other) OVERRIDE {
return String::cast(other)->Hash();
}
virtual Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
Handle<Object> AsHandle(Isolate* isolate) OVERRIDE {
// Internalize the string if possible.
MaybeHandle<Map> maybe_map =
isolate->factory()->InternalizedStringMapForString(string_);

View File

@ -24,7 +24,7 @@ class OptimizingCompilerThread::CompileTask : public v8::Task {
private:
// v8::Task overrides.
virtual void Run() OVERRIDE {
void Run() OVERRIDE {
DisallowHeapAllocation no_allocation;
DisallowHandleAllocation no_handles;
DisallowHandleDereference no_deref;

View File

@ -22,8 +22,8 @@ class OFStreamBase : public std::streambuf {
explicit OFStreamBase(FILE* f);
virtual ~OFStreamBase();
virtual int_type sync() FINAL;
virtual int_type overflow(int_type c) FINAL;
int_type sync() FINAL;
int_type overflow(int_type c) FINAL;
private:
FILE* const f_;

View File

@ -215,9 +215,9 @@ class RecordWriteStub : public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; }
inline Major MajorKey() const FINAL { return RecordWrite; }
virtual void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) OVERRIDE;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm, OnNoNeedToInformIncrementalMarker on_no_need,

View File

@ -24,9 +24,9 @@ class SafepointGenerator FINAL : public CallWrapper {
: codegen_(codegen), pointers_(pointers), deopt_mode_(mode) {}
virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const OVERRIDE {}
void BeforeCall(int call_size) const OVERRIDE {}
virtual void AfterCall() const OVERRIDE {
void AfterCall() const OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_);
}
@ -2833,10 +2833,10 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; }
private:
@ -3904,10 +3904,10 @@ void LCodeGen::DoMathAbs(LMathAbs* instr) {
public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LMathAbs* instr_;
@ -4745,10 +4745,8 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharCodeAt* instr_;
@ -4800,10 +4798,10 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharFromCode* instr_;
@ -4874,11 +4872,11 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
public:
DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp1(),
instr_->temp2(), SIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagI* instr_;
@ -4903,11 +4901,11 @@ void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp1(),
instr_->temp2(), UNSIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagU* instr_;
@ -4989,10 +4987,8 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagD* instr_;
@ -5219,8 +5215,8 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); }
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LTaggedToI* instr_;
@ -5428,11 +5424,11 @@ void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
: LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps());
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_);
}
Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LCheckMaps* instr_;
@ -5561,8 +5557,8 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); }
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LAllocate* instr_;
@ -5927,10 +5923,8 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) {}
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStackCheck* instr_;
@ -6074,10 +6068,10 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
result_(result),
object_(object),
index_(index) {}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LLoadFieldByIndex* instr_;

View File

@ -166,15 +166,13 @@ class LCodeGen;
V(WrapReceiver)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
virtual Opcode opcode() const FINAL OVERRIDE { \
return LInstruction::k##type; \
} \
virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
virtual const char* Mnemonic() const FINAL OVERRIDE { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
Opcode opcode() const FINAL { return LInstruction::k##type; } \
void CompileToNative(LCodeGen* generator) FINAL; \
const char* Mnemonic() const FINAL { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
}
@ -285,9 +283,7 @@ class LTemplateResultInstruction : public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
virtual bool HasResult() const FINAL OVERRIDE {
return R != 0 && result() != NULL;
}
bool HasResult() const FINAL { return R != 0 && result() != NULL; }
void set_result(LOperand* operand) { results_[0] = operand; }
LOperand* result() const { return results_[0]; }
@ -307,11 +303,11 @@ class LTemplateInstruction : public LTemplateResultInstruction<R> {
private:
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return I; }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return I; }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return T; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; }
int TempCount() FINAL { return T; }
LOperand* TempAt(int i) FINAL { return temps_[i]; }
};
@ -325,8 +321,8 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
}
// Can't use the DECLARE-macro here because of sub-classes.
virtual bool IsGap() const OVERRIDE { return true; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsGap() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
static LGap* cast(LInstruction* instr) {
DCHECK(instr->IsGap());
return reinterpret_cast<LGap*>(instr);
@ -366,7 +362,7 @@ class LInstructionGap FINAL : public LGap {
public:
explicit LInstructionGap(HBasicBlock* block) : LGap(block) {}
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return !IsRedundant();
}
@ -378,10 +374,10 @@ class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
public:
explicit LGoto(HBasicBlock* block) : block_(block) {}
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
virtual bool IsControl() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsControl() const OVERRIDE { return true; }
int block_id() const { return block_->block_id(); }
@ -422,7 +418,7 @@ class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> {
class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool IsControl() const OVERRIDE { return true; }
bool IsControl() const OVERRIDE { return true; }
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
};
@ -432,12 +428,10 @@ class LLabel FINAL : public LGap {
public:
explicit LLabel(HBasicBlock* block) : LGap(block), replacement_(NULL) {}
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Label, "label")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int block_id() const { return block()->block_id(); }
bool is_loop_header() const { return block()->IsLoopHeader(); }
@ -493,9 +487,7 @@ class LTailCallThroughMegamorphicCache FINAL
class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
@ -505,7 +497,7 @@ class LControlInstruction : public LTemplateInstruction<0, I, T> {
public:
LControlInstruction() : false_label_(NULL), true_label_(NULL) {}
virtual bool IsControl() const FINAL OVERRIDE { return true; }
bool IsControl() const FINAL { return true; }
int SuccessorCount() { return hydrogen()->SuccessorCount(); }
HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
@ -592,7 +584,7 @@ class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* length() { return inputs_[1]; }
LOperand* index() { return inputs_[2]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -843,7 +835,7 @@ class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
Token::Value op() const { return hydrogen()->token(); }
bool is_double() const { return hydrogen()->representation().IsDouble(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1013,7 +1005,7 @@ class LIsObjectAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1030,7 +1022,7 @@ class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1043,7 +1035,7 @@ class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1061,7 +1053,7 @@ class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
"is-undetectable-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1083,7 +1075,7 @@ class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
Token::Value op() const { return hydrogen()->token(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1097,7 +1089,7 @@ class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> {
"has-instance-type-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1124,7 +1116,7 @@ class LHasCachedArrayIndexAndBranch FINAL : public LControlInstruction<1, 0> {
"has-cached-array-index-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1141,7 +1133,7 @@ class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch, "class-of-test-and-branch")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1351,7 +1343,7 @@ class LBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
DECLARE_HYDROGEN_ACCESSOR(Branch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1491,9 +1483,9 @@ class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* left() { return inputs_[0]; }
LOperand* right() { return inputs_[1]; }
virtual Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1515,9 +1507,9 @@ class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* right() { return inputs_[2]; }
Token::Value op() const { return op_; }
virtual Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; }
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1618,7 +1610,7 @@ class LLoadKeyed FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
uint32_t base_offset() const { return hydrogen()->base_offset(); }
};
@ -1697,7 +1689,7 @@ class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1716,7 +1708,7 @@ class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1770,7 +1762,7 @@ class LInnerAllocatedObject FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* base_object() const { return inputs_[0]; }
LOperand* offset() const { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
};
@ -1810,7 +1802,7 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1834,7 +1826,7 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
DECLARE_HYDROGEN_ACCESSOR(CallWithDescriptor)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
@ -1842,11 +1834,11 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
ZoneList<LOperand*> inputs_;
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return inputs_.length(); }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return 0; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; }
int TempCount() FINAL { return 0; }
LOperand* TempAt(int i) FINAL { return NULL; }
};
@ -1863,7 +1855,7 @@ class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1899,7 +1891,7 @@ class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1918,7 +1910,7 @@ class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1933,7 +1925,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return save_doubles() == kDontSaveFPRegs;
}
@ -2112,7 +2104,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 1> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Representation representation() const {
return hydrogen()->field_representation();
@ -2135,7 +2127,7 @@ class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Object> name() const { return hydrogen()->name(); }
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
@ -2165,7 +2157,7 @@ class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
bool NeedsCanonicalization() {
if (hydrogen()->value()->IsAdd() || hydrogen()->value()->IsSub() ||
hydrogen()->value()->IsMul() || hydrogen()->value()->IsDiv()) {
@ -2195,7 +2187,7 @@ class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2218,7 +2210,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 1> {
"transition-elements-kind")
DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
Handle<Map> transitioned_map() {
@ -2483,7 +2475,7 @@ class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 0> {
Handle<String> type_literal() { return hydrogen()->type_literal(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2502,9 +2494,7 @@ class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
public:
LOsrEntry() {}
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
};
@ -2700,7 +2690,7 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
// An input operand in register, stack slot or a constant operand.
// Will not be moved to a register even if one is freely available.
virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
// Temporary operand that must be in a register.
MUST_USE_RESULT LUnallocated* TempRegister();

View File

@ -30,7 +30,7 @@ class PrettyPrinter: public AstVisitor {
static void PrintOut(Zone* zone, AstNode* node);
// Individual nodes
#define DECLARE_VISIT(type) virtual void Visit##type(type* node);
#define DECLARE_VISIT(type) void Visit##type(type* node) OVERRIDE;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT

View File

@ -91,7 +91,7 @@ class ExternalStreamingStream : public BufferedUtf16CharacterStream {
virtual ~ExternalStreamingStream() { delete[] current_data_; }
virtual unsigned BufferSeekForward(unsigned delta) OVERRIDE {
unsigned BufferSeekForward(unsigned delta) OVERRIDE {
// We never need to seek forward when streaming scripts. We only seek
// forward when we want to parse a function whose location we already know,
// and when streaming, we don't know the locations of anything we haven't
@ -100,7 +100,7 @@ class ExternalStreamingStream : public BufferedUtf16CharacterStream {
return 0;
}
virtual unsigned FillBuffer(unsigned position) OVERRIDE;
unsigned FillBuffer(unsigned position) OVERRIDE;
private:
void HandleUtf8SplitCharacters(unsigned* data_in_buffer);

View File

@ -758,7 +758,7 @@ class StringTableInsertionKey : public HashTableKey {
DCHECK(string->IsInternalizedString());
}
virtual bool IsMatch(Object* string) OVERRIDE {
bool IsMatch(Object* string) OVERRIDE {
// We know that all entries in a hash table had their hash keys created.
// Use that knowledge to have fast failure.
if (hash_ != HashForObject(string)) return false;
@ -766,9 +766,9 @@ class StringTableInsertionKey : public HashTableKey {
return string_->SlowEquals(String::cast(string));
}
virtual uint32_t Hash() OVERRIDE { return hash_; }
uint32_t Hash() OVERRIDE { return hash_; }
virtual uint32_t HashForObject(Object* key) OVERRIDE {
uint32_t HashForObject(Object* key) OVERRIDE {
return String::cast(key)->Hash();
}

View File

@ -595,7 +595,7 @@ class Serializer : public SerializerDeserializer {
public:
Serializer(Isolate* isolate, SnapshotByteSink* sink);
~Serializer();
virtual void VisitPointers(Object** start, Object** end) OVERRIDE;
void VisitPointers(Object** start, Object** end) OVERRIDE;
void EncodeReservations(List<SerializedData::Reservation>* out) const;
@ -780,7 +780,7 @@ class StartupSerializer : public Serializer {
// The StartupSerializer has to serialize the root array, which is slightly
// different.
virtual void VisitPointers(Object** start, Object** end) OVERRIDE;
void VisitPointers(Object** start, Object** end) OVERRIDE;
// Serialize the current state of the heap. The order is:
// 1) Strong references.

View File

@ -27,8 +27,8 @@ class StringAllocator {
class HeapStringAllocator FINAL : public StringAllocator {
public:
~HeapStringAllocator() { DeleteArray(space_); }
virtual char* allocate(unsigned bytes) OVERRIDE;
virtual char* grow(unsigned* bytes) OVERRIDE;
char* allocate(unsigned bytes) OVERRIDE;
char* grow(unsigned* bytes) OVERRIDE;
private:
char* space_;

View File

@ -292,13 +292,13 @@ class CallICNexus : public FeedbackNexus {
void ConfigureMonomorphicArray();
void ConfigureMonomorphic(Handle<JSFunction> function);
virtual InlineCacheState StateFromFeedback() const OVERRIDE;
InlineCacheState StateFromFeedback() const OVERRIDE;
virtual int ExtractMaps(MapHandleList* maps) const OVERRIDE {
int ExtractMaps(MapHandleList* maps) const OVERRIDE {
// CallICs don't record map feedback.
return 0;
}
virtual MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE {
MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE {
return MaybeHandle<Code>();
}
virtual bool FindHandlers(CodeHandleList* code_list,
@ -327,9 +327,9 @@ class LoadICNexus : public FeedbackNexus {
void ConfigurePolymorphic(TypeHandleList* types, CodeHandleList* handlers);
virtual InlineCacheState StateFromFeedback() const OVERRIDE;
virtual int ExtractMaps(MapHandleList* maps) const OVERRIDE;
virtual MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE;
InlineCacheState StateFromFeedback() const OVERRIDE;
int ExtractMaps(MapHandleList* maps) const OVERRIDE;
MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE;
virtual bool FindHandlers(CodeHandleList* code_list,
int length = -1) const OVERRIDE;
};
@ -358,12 +358,12 @@ class KeyedLoadICNexus : public FeedbackNexus {
void ConfigurePolymorphic(Handle<Name> name, TypeHandleList* types,
CodeHandleList* handlers);
virtual InlineCacheState StateFromFeedback() const OVERRIDE;
virtual int ExtractMaps(MapHandleList* maps) const OVERRIDE;
virtual MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE;
InlineCacheState StateFromFeedback() const OVERRIDE;
int ExtractMaps(MapHandleList* maps) const OVERRIDE;
MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const OVERRIDE;
virtual bool FindHandlers(CodeHandleList* code_list,
int length = -1) const OVERRIDE;
virtual Name* FindFirstName() const OVERRIDE;
Name* FindFirstName() const OVERRIDE;
};
}
} // namespace v8::internal

View File

@ -71,7 +71,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register r0,
Register r1);
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
private:
static const int kInlinedProbes = 4;
@ -134,7 +134,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8.
static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8.
@ -313,9 +313,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
virtual Major MajorKey() const FINAL OVERRIDE { return RecordWrite; }
Major MajorKey() const FINAL { return RecordWrite; }
virtual void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) OVERRIDE;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
@ -323,7 +323,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
void Activate(Code* code) {
void Activate(Code* code) OVERRIDE {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}

View File

@ -30,9 +30,9 @@ class SafepointGenerator FINAL : public CallWrapper {
deopt_mode_(mode) { }
virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const OVERRIDE {}
void BeforeCall(int call_size) const OVERRIDE {}
virtual void AfterCall() const OVERRIDE {
void AfterCall() const OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_);
}
@ -2676,10 +2676,10 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; }
private:
LInstanceOfKnownGlobal* instr_;
@ -3684,10 +3684,11 @@ void LCodeGen::DoMathAbs(LMathAbs* instr) {
public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LMathAbs* instr_;
};
@ -4552,10 +4553,9 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharCodeAt* instr_;
};
@ -4607,10 +4607,11 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharFromCode* instr_;
};
@ -4679,11 +4680,12 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
public:
DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp1(),
instr_->temp2(), SIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagI* instr_;
};
@ -4709,11 +4711,12 @@ void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp1(),
instr_->temp2(), UNSIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagU* instr_;
};
@ -4796,10 +4799,9 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagD* instr_;
};
@ -4992,10 +4994,9 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredTaggedToI(instr_, done());
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_, done()); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LTaggedToI* instr_;
};
@ -5182,11 +5183,12 @@ void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
: LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps());
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_);
}
Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LCheckMaps* instr_;
Label check_maps_;
@ -5311,10 +5313,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LAllocate* instr_;
};
@ -5684,10 +5685,9 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStackCheck* instr_;
};
@ -5831,10 +5831,11 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredLoadMutableDouble(instr_, object_, index_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LLoadFieldByIndex* instr_;
Register object_;

View File

@ -163,17 +163,13 @@ class LCodeGen;
V(WrapReceiver)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
virtual Opcode opcode() const FINAL OVERRIDE { \
return LInstruction::k##type; \
} \
virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
virtual const char* Mnemonic() const FINAL OVERRIDE { \
return mnemonic; \
} \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
Opcode opcode() const FINAL { return LInstruction::k##type; } \
void CompileToNative(LCodeGen* generator) FINAL; \
const char* Mnemonic() const FINAL { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
}
@ -292,14 +288,11 @@ class LTemplateResultInstruction : public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
virtual bool HasResult() const FINAL OVERRIDE {
return R != 0 && result() != NULL;
}
bool HasResult() const FINAL { return R != 0 && result() != NULL; }
void set_result(LOperand* operand) { results_[0] = operand; }
LOperand* result() const { return results_[0]; }
LOperand* result() const OVERRIDE { return results_[0]; }
virtual bool MustSignExtendResult(
LPlatformChunk* chunk) const FINAL OVERRIDE;
bool MustSignExtendResult(LPlatformChunk* chunk) const FINAL;
protected:
EmbeddedContainer<LOperand*, R> results_;
@ -317,11 +310,11 @@ class LTemplateInstruction : public LTemplateResultInstruction<R> {
private:
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return I; }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return I; }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return T; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; }
int TempCount() FINAL { return T; }
LOperand* TempAt(int i) FINAL { return temps_[i]; }
};
@ -336,8 +329,8 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
}
// Can't use the DECLARE-macro here because of sub-classes.
virtual bool IsGap() const FINAL OVERRIDE { return true; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsGap() const FINAL { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
static LGap* cast(LInstruction* instr) {
DCHECK(instr->IsGap());
return reinterpret_cast<LGap*>(instr);
@ -378,7 +371,7 @@ class LInstructionGap FINAL : public LGap {
public:
explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return !IsRedundant();
}
@ -390,10 +383,10 @@ class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
public:
explicit LGoto(HBasicBlock* block) : block_(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
virtual bool IsControl() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsControl() const OVERRIDE { return true; }
int block_id() const { return block_->block_id(); }
@ -436,7 +429,7 @@ class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> {
class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool IsControl() const OVERRIDE { return true; }
bool IsControl() const OVERRIDE { return true; }
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
};
@ -447,12 +440,10 @@ class LLabel FINAL : public LGap {
explicit LLabel(HBasicBlock* block)
: LGap(block), replacement_(NULL) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Label, "label")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int block_id() const { return block()->block_id(); }
bool is_loop_header() const { return block()->IsLoopHeader(); }
@ -470,9 +461,7 @@ class LLabel FINAL : public LGap {
class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
};
@ -513,9 +502,7 @@ class LTailCallThroughMegamorphicCache FINAL
class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
@ -525,7 +512,7 @@ class LControlInstruction : public LTemplateInstruction<0, I, T> {
public:
LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
virtual bool IsControl() const FINAL OVERRIDE { return true; }
bool IsControl() const FINAL { return true; }
int SuccessorCount() { return hydrogen()->SuccessorCount(); }
HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
@ -614,7 +601,7 @@ class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -855,7 +842,7 @@ class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
return hydrogen()->representation().IsDouble();
}
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1030,7 +1017,7 @@ class LIsObjectAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1047,7 +1034,7 @@ class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1062,7 +1049,7 @@ class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1080,7 +1067,7 @@ class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
"is-undetectable-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1102,7 +1089,7 @@ class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
"string-compare-and-branch")
DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Token::Value op() const { return hydrogen()->token(); }
};
@ -1120,7 +1107,7 @@ class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 0> {
"has-instance-type-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1150,7 +1137,7 @@ class LHasCachedArrayIndexAndBranch FINAL
"has-cached-array-index-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasCachedArrayIndexAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1170,7 +1157,7 @@ class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 2> {
"class-of-test-and-branch")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1376,7 +1363,7 @@ class LBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
DECLARE_HYDROGEN_ACCESSOR(Branch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1528,11 +1515,9 @@ class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
LOperand* left() { return inputs_[0]; }
LOperand* right() { return inputs_[1]; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticD;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1556,11 +1541,9 @@ class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* left() { return inputs_[1]; }
LOperand* right() { return inputs_[2]; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticT;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1686,7 +1669,7 @@ class LLoadKeyed FINAL : public LTemplateInstruction<1, 2, 0> {
}
LOperand* elements() { return inputs_[0]; }
LOperand* key() { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
uint32_t base_offset() const { return hydrogen()->base_offset(); }
ElementsKind elements_kind() const {
return hydrogen()->elements_kind();
@ -1770,7 +1753,7 @@ class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1791,7 +1774,7 @@ class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 1> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1830,7 +1813,7 @@ class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> {
LOperand* function() { return inputs_[0]; }
LOperand* code_object() { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
@ -1847,7 +1830,7 @@ class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> {
LOperand* base_object() const { return inputs_[0]; }
LOperand* offset() const { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
};
@ -1891,7 +1874,7 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1913,18 +1896,18 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
ZoneList<LOperand*> inputs_;
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return inputs_.length(); }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return 0; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; }
int TempCount() FINAL { return 0; }
LOperand* TempAt(int i) FINAL { return NULL; }
};
@ -1941,7 +1924,7 @@ class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1976,7 +1959,7 @@ class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1995,7 +1978,7 @@ class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -2012,7 +1995,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return save_doubles() == kDontSaveFPRegs;
}
@ -2198,7 +2181,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 1> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Representation representation() const {
return hydrogen()->field_representation();
@ -2221,7 +2204,7 @@ class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Object> name() const { return hydrogen()->name(); }
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
@ -2251,7 +2234,7 @@ class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
uint32_t base_offset() const { return hydrogen()->base_offset(); }
};
@ -2277,7 +2260,7 @@ class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2304,7 +2287,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> {
"transition-elements-kind")
DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
Handle<Map> transitioned_map() {
@ -2593,7 +2576,7 @@ class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 0> {
Handle<String> type_literal() { return hydrogen()->type_literal(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2615,9 +2598,7 @@ class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
public:
LOsrEntry() {}
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
};
@ -2827,7 +2808,7 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
// An input operand in register, stack slot or a constant operand.
// Will not be moved to a register even if one is freely available.
virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
// Temporary operand that must be in a register.
MUST_USE_RESULT LUnallocated* TempRegister();

View File

@ -2508,18 +2508,18 @@ void InstanceofStub::Generate(MacroAssembler* masm) {
void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) {
// If the receiver is a smi trigger the non-string case.
STATIC_ASSERT(kSmiTag == 0);
__ JumpIfSmi(object_, receiver_not_string_);
if (check_mode_ == RECEIVER_IS_UNKNOWN) {
__ JumpIfSmi(object_, receiver_not_string_);
// Fetch the instance type of the receiver into result register.
__ mov(result_, FieldOperand(object_, HeapObject::kMapOffset));
__ movzx_b(result_, FieldOperand(result_, Map::kInstanceTypeOffset));
// If the receiver is not a string trigger the non-string case.
__ test(result_, Immediate(kIsNotStringMask));
__ j(not_zero, receiver_not_string_);
// Fetch the instance type of the receiver into result register.
__ mov(result_, FieldOperand(object_, HeapObject::kMapOffset));
__ movzx_b(result_, FieldOperand(result_, Map::kInstanceTypeOffset));
// If the receiver is not a string trigger the non-string case.
__ test(result_, Immediate(kIsNotStringMask));
__ j(not_zero, receiver_not_string_);
}
// If the index is non-smi trigger the non-smi case.
STATIC_ASSERT(kSmiTag == 0);
__ JumpIfNotSmi(index_, &index_not_smi_);
__ bind(&got_smi_index_);

View File

@ -76,7 +76,7 @@ class NameDictionaryLookupStub: public PlatformCodeStub {
Register r0,
Register r1);
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
private:
static const int kInlinedProbes = 4;
@ -139,7 +139,7 @@ class RecordWriteStub: public PlatformCodeStub {
INCREMENTAL_COMPACTION
};
virtual bool SometimesSetsUpAFrame() { return false; }
bool SometimesSetsUpAFrame() OVERRIDE { return false; }
static const byte kTwoByteNopInstruction = 0x3c; // Cmpb al, #imm8.
static const byte kTwoByteJumpInstruction = 0xeb; // Jmp #imm8.
@ -328,9 +328,9 @@ class RecordWriteStub: public PlatformCodeStub {
kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
};
virtual inline Major MajorKey() const FINAL OVERRIDE { return RecordWrite; }
inline Major MajorKey() const FINAL { return RecordWrite; }
virtual void Generate(MacroAssembler* masm) OVERRIDE;
void Generate(MacroAssembler* masm) OVERRIDE;
void GenerateIncremental(MacroAssembler* masm, Mode mode);
void CheckNeedsToInformIncrementalMarker(
MacroAssembler* masm,
@ -338,7 +338,7 @@ class RecordWriteStub: public PlatformCodeStub {
Mode mode);
void InformIncrementalMarker(MacroAssembler* masm);
void Activate(Code* code) {
void Activate(Code* code) OVERRIDE {
code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code);
}

View File

@ -32,9 +32,9 @@ class SafepointGenerator FINAL : public CallWrapper {
deopt_mode_(mode) {}
virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const OVERRIDE {}
void BeforeCall(int call_size) const OVERRIDE {}
virtual void AfterCall() const OVERRIDE {
void AfterCall() const OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_);
}
@ -2924,10 +2924,10 @@ void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
LInstanceOfKnownGlobal* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; }
private:
LInstanceOfKnownGlobal* instr_;
@ -3873,10 +3873,11 @@ void LCodeGen::DoMathAbs(LMathAbs* instr) {
LMathAbs* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LMathAbs* instr_;
};
@ -4781,10 +4782,9 @@ void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
LStringCharCodeAt* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharCodeAt* instr_;
};
@ -4840,10 +4840,11 @@ void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
LStringCharFromCode* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStringCharFromCode* instr_;
};
@ -4929,11 +4930,12 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
LNumberTagI* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp(),
SIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagI* instr_;
};
@ -4957,11 +4959,12 @@ void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
LNumberTagU* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp(),
UNSIGNED_INT32);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagU* instr_;
};
@ -5046,10 +5049,9 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
LNumberTagD* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LNumberTagD* instr_;
};
@ -5292,10 +5294,9 @@ void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
LTaggedToI* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredTaggedToI(instr_, done());
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_, done()); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LTaggedToI* instr_;
};
@ -5498,11 +5499,12 @@ void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
: LDeferredCode(codegen, x87_stack), instr_(instr), object_(object) {
SetExit(check_maps());
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_);
}
Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LCheckMaps* instr_;
Label check_maps_;
@ -5721,10 +5723,9 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
LAllocate* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LAllocate* instr_;
};
@ -6090,10 +6091,9 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
LStackCheck* instr,
const X87Stack& x87_stack)
: LDeferredCode(codegen, x87_stack), instr_(instr) { }
virtual void Generate() OVERRIDE {
codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LStackCheck* instr_;
};
@ -6241,10 +6241,11 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
object_(object),
index_(index) {
}
virtual void Generate() OVERRIDE {
void Generate() OVERRIDE {
codegen()->DoDeferredLoadMutableDouble(instr_, object_, index_);
}
virtual LInstruction* instr() OVERRIDE { return instr_; }
LInstruction* instr() OVERRIDE { return instr_; }
private:
LLoadFieldByIndex* instr_;
Register object_;

View File

@ -168,17 +168,13 @@ class LCodeGen;
V(WrapReceiver)
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
virtual Opcode opcode() const FINAL OVERRIDE { \
return LInstruction::k##type; \
} \
virtual void CompileToNative(LCodeGen* generator) FINAL OVERRIDE; \
virtual const char* Mnemonic() const FINAL OVERRIDE { \
return mnemonic; \
} \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
#define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
Opcode opcode() const FINAL { return LInstruction::k##type; } \
void CompileToNative(LCodeGen* generator) FINAL; \
const char* Mnemonic() const FINAL { return mnemonic; } \
static L##type* cast(LInstruction* instr) { \
DCHECK(instr->Is##type()); \
return reinterpret_cast<L##type*>(instr); \
}
@ -297,11 +293,9 @@ class LTemplateResultInstruction : public LInstruction {
public:
// Allow 0 or 1 output operands.
STATIC_ASSERT(R == 0 || R == 1);
virtual bool HasResult() const FINAL OVERRIDE {
return R != 0 && result() != NULL;
}
bool HasResult() const FINAL { return R != 0 && result() != NULL; }
void set_result(LOperand* operand) { results_[0] = operand; }
LOperand* result() const { return results_[0]; }
LOperand* result() const OVERRIDE { return results_[0]; }
protected:
EmbeddedContainer<LOperand*, R> results_;
@ -319,11 +313,11 @@ class LTemplateInstruction : public LTemplateResultInstruction<R> {
private:
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return I; }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return I; }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return T; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return temps_[i]; }
int TempCount() FINAL { return T; }
LOperand* TempAt(int i) FINAL { return temps_[i]; }
};
@ -337,8 +331,8 @@ class LGap : public LTemplateInstruction<0, 0, 0> {
}
// Can't use the DECLARE-macro here because of sub-classes.
virtual bool IsGap() const FINAL OVERRIDE { return true; }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsGap() const FINAL { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
static LGap* cast(LInstruction* instr) {
DCHECK(instr->IsGap());
return reinterpret_cast<LGap*>(instr);
@ -378,7 +372,7 @@ class LInstructionGap FINAL : public LGap {
public:
explicit LInstructionGap(HBasicBlock* block) : LGap(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return !IsRedundant();
}
@ -390,9 +384,7 @@ class LClobberDoubles FINAL : public LTemplateInstruction<0, 0, 0> {
public:
explicit LClobberDoubles(Isolate* isolate) { }
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return true;
}
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE { return true; }
DECLARE_CONCRETE_INSTRUCTION(ClobberDoubles, "clobber-d")
};
@ -402,13 +394,13 @@ class LGoto FINAL : public LTemplateInstruction<0, 0, 0> {
public:
explicit LGoto(HBasicBlock* block) : block_(block) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
virtual bool IsControl() const OVERRIDE { return true; }
void PrintDataTo(StringStream* stream) OVERRIDE;
bool IsControl() const OVERRIDE { return true; }
int block_id() const { return block_->block_id(); }
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return false;
}
@ -444,7 +436,7 @@ class LDummyUse FINAL : public LTemplateInstruction<1, 1, 0> {
class LDeoptimize FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool IsControl() const OVERRIDE { return true; }
bool IsControl() const OVERRIDE { return true; }
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
};
@ -455,12 +447,10 @@ class LLabel FINAL : public LGap {
explicit LLabel(HBasicBlock* block)
: LGap(block), replacement_(NULL) { }
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Label, "label")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int block_id() const { return block()->block_id(); }
bool is_loop_header() const { return block()->IsLoopHeader(); }
@ -478,9 +468,7 @@ class LLabel FINAL : public LGap {
class LParameter FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
};
@ -521,9 +509,7 @@ class LTailCallThroughMegamorphicCache FINAL
class LUnknownOSRValue FINAL : public LTemplateInstruction<1, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
};
@ -533,7 +519,7 @@ class LControlInstruction: public LTemplateInstruction<0, I, T> {
public:
LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
virtual bool IsControl() const FINAL OVERRIDE { return true; }
bool IsControl() const FINAL { return true; }
int SuccessorCount() { return hydrogen()->SuccessorCount(); }
HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
@ -626,7 +612,7 @@ class LAccessArgumentsAt FINAL : public LTemplateInstruction<1, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt, "access-arguments-at")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -875,7 +861,7 @@ class LCompareNumericAndBranch FINAL : public LControlInstruction<2, 0> {
return hydrogen()->representation().IsDouble();
}
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1052,7 +1038,7 @@ class LIsObjectAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1069,7 +1055,7 @@ class LIsStringAndBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(IsStringAndBranch, "is-string-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsStringAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1084,7 +1070,7 @@ class LIsSmiAndBranch FINAL : public LControlInstruction<1, 0> {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch, "is-smi-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsSmiAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1102,7 +1088,7 @@ class LIsUndetectableAndBranch FINAL : public LControlInstruction<1, 1> {
"is-undetectable-and-branch")
DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1122,7 +1108,7 @@ class LStringCompareAndBranch FINAL : public LControlInstruction<3, 0> {
"string-compare-and-branch")
DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Token::Value op() const { return hydrogen()->token(); }
};
@ -1142,7 +1128,7 @@ class LHasInstanceTypeAndBranch FINAL : public LControlInstruction<1, 1> {
"has-instance-type-and-branch")
DECLARE_HYDROGEN_ACCESSOR(HasInstanceTypeAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1171,7 +1157,7 @@ class LHasCachedArrayIndexAndBranch FINAL
DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch,
"has-cached-array-index-and-branch")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1204,7 +1190,7 @@ class LClassOfTestAndBranch FINAL : public LControlInstruction<1, 2> {
"class-of-test-and-branch")
DECLARE_HYDROGEN_ACCESSOR(ClassOfTestAndBranch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1399,7 +1385,7 @@ class LBranch FINAL : public LControlInstruction<1, 1> {
DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
DECLARE_HYDROGEN_ACCESSOR(Branch)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1552,11 +1538,9 @@ class LArithmeticD FINAL : public LTemplateInstruction<1, 2, 0> {
Token::Value op() const { return op_; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticD;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticD; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
private:
Token::Value op_;
@ -1579,11 +1563,9 @@ class LArithmeticT FINAL : public LTemplateInstruction<1, 3, 0> {
LOperand* left() { return inputs_[1]; }
LOperand* right() { return inputs_[2]; }
virtual Opcode opcode() const OVERRIDE {
return LInstruction::kArithmeticT;
}
virtual void CompileToNative(LCodeGen* generator) OVERRIDE;
virtual const char* Mnemonic() const OVERRIDE;
Opcode opcode() const OVERRIDE { return LInstruction::kArithmeticT; }
void CompileToNative(LCodeGen* generator) OVERRIDE;
const char* Mnemonic() const OVERRIDE;
Token::Value op() const { return op_; }
@ -1696,7 +1678,7 @@ class LLoadKeyed FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
uint32_t base_offset() const { return hydrogen()->base_offset(); }
bool key_is_smi() {
return hydrogen()->key()->representation().IsTagged();
@ -1794,7 +1776,7 @@ class LLoadContextSlot FINAL : public LTemplateInstruction<1, 1, 0> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1815,7 +1797,7 @@ class LStoreContextSlot FINAL : public LTemplateInstruction<0, 2, 1> {
int slot_index() { return hydrogen()->slot_index(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -1854,7 +1836,7 @@ class LStoreCodeEntry FINAL: public LTemplateInstruction<0, 2, 0> {
LOperand* function() { return inputs_[0]; }
LOperand* code_object() { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(StoreCodeEntry, "store-code-entry")
DECLARE_HYDROGEN_ACCESSOR(StoreCodeEntry)
@ -1871,7 +1853,7 @@ class LInnerAllocatedObject FINAL: public LTemplateInstruction<1, 2, 0> {
LOperand* base_object() const { return inputs_[0]; }
LOperand* offset() const { return inputs_[1]; }
virtual void PrintDataTo(StringStream* stream);
void PrintDataTo(StringStream* stream) OVERRIDE;
DECLARE_CONCRETE_INSTRUCTION(InnerAllocatedObject, "inner-allocated-object")
};
@ -1915,7 +1897,7 @@ class LCallJSFunction FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallJSFunction, "call-js-function")
DECLARE_HYDROGEN_ACCESSOR(CallJSFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -1937,18 +1919,18 @@ class LCallWithDescriptor FINAL : public LTemplateResultInstruction<1> {
private:
DECLARE_CONCRETE_INSTRUCTION(CallWithDescriptor, "call-with-descriptor")
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
ZoneList<LOperand*> inputs_;
// Iterator support.
virtual int InputCount() FINAL OVERRIDE { return inputs_.length(); }
virtual LOperand* InputAt(int i) FINAL OVERRIDE { return inputs_[i]; }
int InputCount() FINAL { return inputs_.length(); }
LOperand* InputAt(int i) FINAL { return inputs_[i]; }
virtual int TempCount() FINAL OVERRIDE { return 0; }
virtual LOperand* TempAt(int i) FINAL OVERRIDE { return NULL; }
int TempCount() FINAL { return 0; }
LOperand* TempAt(int i) FINAL { return NULL; }
};
@ -1965,7 +1947,7 @@ class LInvokeFunction FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(InvokeFunction, "invoke-function")
DECLARE_HYDROGEN_ACCESSOR(InvokeFunction)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -2001,7 +1983,7 @@ class LCallNew FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNew, "call-new")
DECLARE_HYDROGEN_ACCESSOR(CallNew)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -2020,7 +2002,7 @@ class LCallNewArray FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallNewArray, "call-new-array")
DECLARE_HYDROGEN_ACCESSOR(CallNewArray)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
int arity() const { return hydrogen()->argument_count() - 1; }
};
@ -2037,7 +2019,7 @@ class LCallRuntime FINAL : public LTemplateInstruction<1, 1, 0> {
DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
virtual bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
bool ClobbersDoubleRegisters(Isolate* isolate) const OVERRIDE {
return save_doubles() == kDontSaveFPRegs;
}
@ -2225,7 +2207,7 @@ class LStoreNamedField FINAL : public LTemplateInstruction<0, 2, 2> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField, "store-named-field")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedField)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
@ -2244,7 +2226,7 @@ class LStoreNamedGeneric FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric, "store-named-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreNamedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Object> name() const { return hydrogen()->name(); }
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2275,7 +2257,7 @@ class LStoreKeyed FINAL : public LTemplateInstruction<0, 3, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
uint32_t base_offset() const { return hydrogen()->base_offset(); }
bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
};
@ -2301,7 +2283,7 @@ class LStoreKeyedGeneric FINAL : public LTemplateInstruction<0, 4, 0> {
DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric, "store-keyed-generic")
DECLARE_HYDROGEN_ACCESSOR(StoreKeyedGeneric)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
StrictMode strict_mode() { return hydrogen()->strict_mode(); }
};
@ -2328,7 +2310,7 @@ class LTransitionElementsKind FINAL : public LTemplateInstruction<0, 2, 2> {
"transition-elements-kind")
DECLARE_HYDROGEN_ACCESSOR(TransitionElementsKind)
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
Handle<Map> original_map() { return hydrogen()->original_map().handle(); }
Handle<Map> transitioned_map() {
@ -2628,15 +2610,13 @@ class LTypeofIsAndBranch FINAL : public LControlInstruction<1, 0> {
Handle<String> type_literal() { return hydrogen()->type_literal(); }
virtual void PrintDataTo(StringStream* stream) OVERRIDE;
void PrintDataTo(StringStream* stream) OVERRIDE;
};
class LOsrEntry FINAL : public LTemplateInstruction<0, 0, 0> {
public:
virtual bool HasInterestingComment(LCodeGen* gen) const OVERRIDE {
return false;
}
bool HasInterestingComment(LCodeGen* gen) const OVERRIDE { return false; }
DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
};
@ -2843,7 +2823,7 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
// An input operand in register, stack slot or a constant operand.
// Will not be moved to a register even if one is freely available.
virtual MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
MUST_USE_RESULT LOperand* UseAny(HValue* value) OVERRIDE;
// Temporary operand that must be in a register.
MUST_USE_RESULT LUnallocated* TempRegister();

View File

@ -113,9 +113,7 @@ class ChangeLoweringCommonTest
public:
virtual ~ChangeLoweringCommonTest() {}
virtual MachineType WordRepresentation() const FINAL OVERRIDE {
return GetParam();
}
virtual MachineType WordRepresentation() const FINAL { return GetParam(); }
};
@ -179,9 +177,7 @@ INSTANTIATE_TEST_CASE_P(ChangeLoweringTest, ChangeLoweringCommonTest,
class ChangeLowering32Test : public ChangeLoweringTest {
public:
virtual ~ChangeLowering32Test() {}
virtual MachineType WordRepresentation() const FINAL OVERRIDE {
return kRepWord32;
}
virtual MachineType WordRepresentation() const FINAL { return kRepWord32; }
};
@ -339,9 +335,7 @@ TARGET_TEST_F(ChangeLowering32Test, ChangeUint32ToTagged) {
class ChangeLowering64Test : public ChangeLoweringTest {
public:
virtual ~ChangeLowering64Test() {}
virtual MachineType WordRepresentation() const FINAL OVERRIDE {
return kRepWord64;
}
virtual MachineType WordRepresentation() const FINAL { return kRepWord64; }
};