Reland "Use V8_FINAL and V8_OVERRIDE in various places, fixing bugs revealed by them.".

- Use V8_FINAL and V8_OVERRIDE in Ast classes.
- Use V8_FINAL and V8_OVERRIDE in Lithium mips backend.
- Use V8_FINAL and V8_OVERRIDE in Lithium arm backend.
- Use V8_FINAL and V8_OVERRIDE in Lithium x64 backend.
- Use V8_FINAL and V8_OVERRIDE in Lithium ia32 backend.
- Use V8_FINAL and V8_OVERRIDE in Lithium classes.
- Use V8_FINAL and V8_OVERRIDE in Hydrogen classes.

TBR=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
bmeurer@chromium.org 2013-08-20 11:10:24 +00:00
parent 60e7d4b1e3
commit c2c6b2813d
22 changed files with 2065 additions and 1896 deletions

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,7 @@ namespace v8 {
namespace internal { namespace internal {
class SafepointGenerator : public CallWrapper { class SafepointGenerator V8_FINAL : public CallWrapper {
public: public:
SafepointGenerator(LCodeGen* codegen, SafepointGenerator(LCodeGen* codegen,
LPointerMap* pointers, LPointerMap* pointers,
@ -44,11 +44,11 @@ class SafepointGenerator : public CallWrapper {
: codegen_(codegen), : codegen_(codegen),
pointers_(pointers), pointers_(pointers),
deopt_mode_(mode) { } deopt_mode_(mode) { }
virtual ~SafepointGenerator() { } virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const { } virtual void BeforeCall(int call_size) const V8_OVERRIDE {}
virtual void AfterCall() const { virtual void AfterCall() const V8_OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_); codegen_->RecordSafepoint(pointers_, deopt_mode_);
} }
@ -2734,15 +2734,15 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
class DeferredInstanceOfKnownGlobal: public LDeferredCode { class DeferredInstanceOfKnownGlobal V8_FINAL : public LDeferredCode {
public: public:
DeferredInstanceOfKnownGlobal(LCodeGen* codegen, DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr) LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; } Label* map_check() { return &map_check_; }
private: private:
LInstanceOfKnownGlobal* instr_; LInstanceOfKnownGlobal* instr_;
@ -3721,14 +3721,14 @@ void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) {
void LCodeGen::DoMathAbs(LMathAbs* instr) { void LCodeGen::DoMathAbs(LMathAbs* instr) {
// Class for deferred case. // Class for deferred case.
class DeferredMathAbsTaggedHeapNumber: public LDeferredCode { class DeferredMathAbsTaggedHeapNumber V8_FINAL : public LDeferredCode {
public: public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LMathAbs* instr_; LMathAbs* instr_;
}; };
@ -3877,12 +3877,12 @@ void LCodeGen::DoPower(LPower* instr) {
void LCodeGen::DoRandom(LRandom* instr) { void LCodeGen::DoRandom(LRandom* instr) {
class DeferredDoRandom: public LDeferredCode { class DeferredDoRandom V8_FINAL : public LDeferredCode {
public: public:
DeferredDoRandom(LCodeGen* codegen, LRandom* instr) DeferredDoRandom(LCodeGen* codegen, LRandom* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredRandom(instr_); } virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredRandom(instr_); }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LRandom* instr_; LRandom* instr_;
}; };
@ -4519,12 +4519,14 @@ void LCodeGen::DoStringAdd(LStringAdd* instr) {
void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
class DeferredStringCharCodeAt: public LDeferredCode { class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode {
public: public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStringCharCodeAt* instr_; LStringCharCodeAt* instr_;
}; };
@ -4572,12 +4574,14 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) {
void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
class DeferredStringCharFromCode: public LDeferredCode { class DeferredStringCharFromCode V8_FINAL : public LDeferredCode {
public: public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStringCharFromCode(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStringCharFromCode* instr_; LStringCharFromCode* instr_;
}; };
@ -4660,16 +4664,16 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
void LCodeGen::DoNumberTagI(LNumberTagI* instr) { void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
class DeferredNumberTagI: public LDeferredCode { class DeferredNumberTagI V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredNumberTagI(instr_, codegen()->DoDeferredNumberTagI(instr_,
instr_->value(), instr_->value(),
SIGNED_INT32); SIGNED_INT32);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagI* instr_; LNumberTagI* instr_;
}; };
@ -4685,16 +4689,16 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
void LCodeGen::DoNumberTagU(LNumberTagU* instr) { void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
class DeferredNumberTagU: public LDeferredCode { class DeferredNumberTagU V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredNumberTagI(instr_, codegen()->DoDeferredNumberTagI(instr_,
instr_->value(), instr_->value(),
UNSIGNED_INT32); UNSIGNED_INT32);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagU* instr_; LNumberTagU* instr_;
}; };
@ -4767,12 +4771,14 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr,
void LCodeGen::DoNumberTagD(LNumberTagD* instr) { void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
class DeferredNumberTagD: public LDeferredCode { class DeferredNumberTagD V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagD* instr_; LNumberTagD* instr_;
}; };
@ -4965,12 +4971,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) {
void LCodeGen::DoTaggedToI(LTaggedToI* instr) { void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
class DeferredTaggedToI: public LDeferredCode { class DeferredTaggedToI V8_FINAL : public LDeferredCode {
public: public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredTaggedToI(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredTaggedToI(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LTaggedToI* instr_; LTaggedToI* instr_;
}; };
@ -5161,17 +5169,17 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
void LCodeGen::DoCheckMaps(LCheckMaps* instr) { void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
class DeferredCheckMaps: public LDeferredCode { class DeferredCheckMaps V8_FINAL : public LDeferredCode {
public: public:
DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object)
: LDeferredCode(codegen), instr_(instr), object_(object) { : LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps()); SetExit(check_maps());
} }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_); codegen()->DoDeferredInstanceMigration(instr_, object_);
} }
Label* check_maps() { return &check_maps_; } Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LCheckMaps* instr_; LCheckMaps* instr_;
Label check_maps_; Label check_maps_;
@ -5264,12 +5272,14 @@ void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
void LCodeGen::DoAllocate(LAllocate* instr) { void LCodeGen::DoAllocate(LAllocate* instr) {
class DeferredAllocate: public LDeferredCode { class DeferredAllocate V8_FINAL : public LDeferredCode {
public: public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr) DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LAllocate* instr_; LAllocate* instr_;
}; };
@ -5620,12 +5630,14 @@ void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
void LCodeGen::DoStackCheck(LStackCheck* instr) { void LCodeGen::DoStackCheck(LStackCheck* instr) {
class DeferredStackCheck: public LDeferredCode { class DeferredStackCheck V8_FINAL : public LDeferredCode {
public: public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStackCheck(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStackCheck* instr_; LStackCheck* instr_;
}; };

View File

@ -43,7 +43,7 @@ namespace internal {
class LDeferredCode; class LDeferredCode;
class SafepointGenerator; class SafepointGenerator;
class LCodeGen BASE_EMBEDDED { class LCodeGen V8_FINAL BASE_EMBEDDED {
public: public:
LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
: zone_(info->zone()), : zone_(info->zone()),
@ -420,7 +420,7 @@ class LCodeGen BASE_EMBEDDED {
int old_position_; int old_position_;
class PushSafepointRegistersScope BASE_EMBEDDED { class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
public: public:
PushSafepointRegistersScope(LCodeGen* codegen, PushSafepointRegistersScope(LCodeGen* codegen,
Safepoint::Kind kind) Safepoint::Kind kind)
@ -468,7 +468,7 @@ class LCodeGen BASE_EMBEDDED {
}; };
class LDeferredCode: public ZoneObject { class LDeferredCode : public ZoneObject {
public: public:
explicit LDeferredCode(LCodeGen* codegen) explicit LDeferredCode(LCodeGen* codegen)
: codegen_(codegen), : codegen_(codegen),
@ -477,7 +477,7 @@ class LDeferredCode: public ZoneObject {
codegen->AddDeferredCode(this); codegen->AddDeferredCode(this);
} }
virtual ~LDeferredCode() { } virtual ~LDeferredCode() {}
virtual void Generate() = 0; virtual void Generate() = 0;
virtual LInstruction* instr() = 0; virtual LInstruction* instr() = 0;

View File

@ -38,7 +38,7 @@ namespace internal {
class LCodeGen; class LCodeGen;
class LGapResolver; class LGapResolver;
class LGapResolver BASE_EMBEDDED { class LGapResolver V8_FINAL BASE_EMBEDDED {
public: public:
explicit LGapResolver(LCodeGen* owner); explicit LGapResolver(LCodeGen* owner);

View File

@ -858,12 +858,13 @@ bool RegExpCapture::IsAnchoredAtEnd() {
// in as many cases as possible, to make it more difficult for incorrect // in as many cases as possible, to make it more difficult for incorrect
// parses to look as correct ones which is likely if the input and // parses to look as correct ones which is likely if the input and
// output formats are alike. // output formats are alike.
class RegExpUnparser: public RegExpVisitor { class RegExpUnparser V8_FINAL : public RegExpVisitor {
public: public:
explicit RegExpUnparser(Zone* zone); explicit RegExpUnparser(Zone* zone);
void VisitCharacterRange(CharacterRange that); void VisitCharacterRange(CharacterRange that);
SmartArrayPointer<const char> ToString() { return stream_.ToCString(); } SmartArrayPointer<const char> ToString() { return stream_.ToCString(); }
#define MAKE_CASE(Name) virtual void* Visit##Name(RegExp##Name*, void* data); #define MAKE_CASE(Name) virtual void* Visit##Name(RegExp##Name*, \
void* data) V8_OVERRIDE;
FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE) FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE)
#undef MAKE_CASE #undef MAKE_CASE
private: private:

470
src/ast.h

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7279,7 +7279,7 @@ void HOptimizedGraphBuilder::VisitCallNew(CallNew* expr) {
CHECK_ALIVE(VisitArgument(expr->expression())); CHECK_ALIVE(VisitArgument(expr->expression()));
HValue* constructor = HPushArgument::cast(Top())->argument(); HValue* constructor = HPushArgument::cast(Top())->argument();
CHECK_ALIVE(VisitArgumentList(expr->arguments())); CHECK_ALIVE(VisitArgumentList(expr->arguments()));
HCallNew* call; HBinaryCall* call;
if (expr->target().is_identical_to(array_function)) { if (expr->target().is_identical_to(array_function)) {
Handle<Cell> cell = expr->allocation_info_cell(); Handle<Cell> cell = expr->allocation_info_cell();
Add<HCheckFunction>(constructor, array_function); Add<HCheckFunction>(constructor, array_function);

View File

@ -53,10 +53,10 @@ class LChunk;
class LiveRange; class LiveRange;
class HBasicBlock: public ZoneObject { class HBasicBlock V8_FINAL : public ZoneObject {
public: public:
explicit HBasicBlock(HGraph* graph); explicit HBasicBlock(HGraph* graph);
virtual ~HBasicBlock() { } ~HBasicBlock() { }
// Simple accessors. // Simple accessors.
int block_id() const { return block_id_; } int block_id() const { return block_id_; }
@ -220,7 +220,7 @@ class HBasicBlock: public ZoneObject {
}; };
class HPredecessorIterator BASE_EMBEDDED { class HPredecessorIterator V8_FINAL BASE_EMBEDDED {
public: public:
explicit HPredecessorIterator(HBasicBlock* block) explicit HPredecessorIterator(HBasicBlock* block)
: predecessor_list_(block->predecessors()), current_(0) { } : predecessor_list_(block->predecessors()), current_(0) { }
@ -235,7 +235,7 @@ class HPredecessorIterator BASE_EMBEDDED {
}; };
class HInstructionIterator BASE_EMBEDDED { class HInstructionIterator V8_FINAL BASE_EMBEDDED {
public: public:
explicit HInstructionIterator(HBasicBlock* block) explicit HInstructionIterator(HBasicBlock* block)
: instr_(block->first()) { : instr_(block->first()) {
@ -255,7 +255,7 @@ class HInstructionIterator BASE_EMBEDDED {
}; };
class HLoopInformation: public ZoneObject { class HLoopInformation V8_FINAL : public ZoneObject {
public: public:
HLoopInformation(HBasicBlock* loop_header, Zone* zone) HLoopInformation(HBasicBlock* loop_header, Zone* zone)
: back_edges_(4, zone), : back_edges_(4, zone),
@ -264,7 +264,7 @@ class HLoopInformation: public ZoneObject {
stack_check_(NULL) { stack_check_(NULL) {
blocks_.Add(loop_header, zone); blocks_.Add(loop_header, zone);
} }
virtual ~HLoopInformation() {} ~HLoopInformation() {}
const ZoneList<HBasicBlock*>* back_edges() const { return &back_edges_; } const ZoneList<HBasicBlock*>* back_edges() const { return &back_edges_; }
const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; } const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; }
@ -303,7 +303,7 @@ class HLoopInformation: public ZoneObject {
class BoundsCheckTable; class BoundsCheckTable;
class InductionVariableBlocksTable; class InductionVariableBlocksTable;
class HGraph: public ZoneObject { class HGraph V8_FINAL : public ZoneObject {
public: public:
explicit HGraph(CompilationInfo* info); explicit HGraph(CompilationInfo* info);
@ -523,7 +523,7 @@ enum FrameType {
}; };
class HEnvironment: public ZoneObject { class HEnvironment V8_FINAL : public ZoneObject {
public: public:
HEnvironment(HEnvironment* outer, HEnvironment(HEnvironment* outer,
Scope* scope, Scope* scope,
@ -793,33 +793,37 @@ class AstContext {
}; };
class EffectContext: public AstContext { class EffectContext V8_FINAL : public AstContext {
public: public:
explicit EffectContext(HOptimizedGraphBuilder* owner) explicit EffectContext(HOptimizedGraphBuilder* owner)
: AstContext(owner, Expression::kEffect) { : AstContext(owner, Expression::kEffect) {
} }
virtual ~EffectContext(); virtual ~EffectContext();
virtual void ReturnValue(HValue* value); virtual void ReturnValue(HValue* value) V8_OVERRIDE;
virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); virtual void ReturnInstruction(HInstruction* instr,
virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); BailoutId ast_id) V8_OVERRIDE;
virtual void ReturnControl(HControlInstruction* instr,
BailoutId ast_id) V8_OVERRIDE;
virtual void ReturnContinuation(HIfContinuation* continuation, virtual void ReturnContinuation(HIfContinuation* continuation,
BailoutId ast_id); BailoutId ast_id) V8_OVERRIDE;
}; };
class ValueContext: public AstContext { class ValueContext V8_FINAL : public AstContext {
public: public:
ValueContext(HOptimizedGraphBuilder* owner, ArgumentsAllowedFlag flag) ValueContext(HOptimizedGraphBuilder* owner, ArgumentsAllowedFlag flag)
: AstContext(owner, Expression::kValue), flag_(flag) { : AstContext(owner, Expression::kValue), flag_(flag) {
} }
virtual ~ValueContext(); virtual ~ValueContext();
virtual void ReturnValue(HValue* value); virtual void ReturnValue(HValue* value) V8_OVERRIDE;
virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); virtual void ReturnInstruction(HInstruction* instr,
virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); BailoutId ast_id) V8_OVERRIDE;
virtual void ReturnControl(HControlInstruction* instr,
BailoutId ast_id) V8_OVERRIDE;
virtual void ReturnContinuation(HIfContinuation* continuation, virtual void ReturnContinuation(HIfContinuation* continuation,
BailoutId ast_id); BailoutId ast_id) V8_OVERRIDE;
bool arguments_allowed() { return flag_ == ARGUMENTS_ALLOWED; } bool arguments_allowed() { return flag_ == ARGUMENTS_ALLOWED; }
@ -828,7 +832,7 @@ class ValueContext: public AstContext {
}; };
class TestContext: public AstContext { class TestContext V8_FINAL : public AstContext {
public: public:
TestContext(HOptimizedGraphBuilder* owner, TestContext(HOptimizedGraphBuilder* owner,
Expression* condition, Expression* condition,
@ -840,11 +844,13 @@ class TestContext: public AstContext {
if_false_(if_false) { if_false_(if_false) {
} }
virtual void ReturnValue(HValue* value); virtual void ReturnValue(HValue* value) V8_OVERRIDE;
virtual void ReturnInstruction(HInstruction* instr, BailoutId ast_id); virtual void ReturnInstruction(HInstruction* instr,
virtual void ReturnControl(HControlInstruction* instr, BailoutId ast_id); BailoutId ast_id) V8_OVERRIDE;
virtual void ReturnControl(HControlInstruction* instr,
BailoutId ast_id) V8_OVERRIDE;
virtual void ReturnContinuation(HIfContinuation* continuation, virtual void ReturnContinuation(HIfContinuation* continuation,
BailoutId ast_id); BailoutId ast_id) V8_OVERRIDE;
static TestContext* cast(AstContext* context) { static TestContext* cast(AstContext* context) {
ASSERT(context->IsTest()); ASSERT(context->IsTest());
@ -866,7 +872,7 @@ class TestContext: public AstContext {
}; };
class FunctionState { class FunctionState V8_FINAL {
public: public:
FunctionState(HOptimizedGraphBuilder* owner, FunctionState(HOptimizedGraphBuilder* owner,
CompilationInfo* info, CompilationInfo* info,
@ -933,7 +939,7 @@ class FunctionState {
}; };
class HIfContinuation { class HIfContinuation V8_FINAL {
public: public:
HIfContinuation() { continuation_captured_ = false; } HIfContinuation() { continuation_captured_ = false; }
~HIfContinuation() { ASSERT(!continuation_captured_); } ~HIfContinuation() { ASSERT(!continuation_captured_); }
@ -1272,7 +1278,7 @@ class HGraphBuilder {
void AddIncrementCounter(StatsCounter* counter, void AddIncrementCounter(StatsCounter* counter,
HValue* context); HValue* context);
class IfBuilder { class IfBuilder V8_FINAL {
public: public:
explicit IfBuilder(HGraphBuilder* builder, explicit IfBuilder(HGraphBuilder* builder,
int position = RelocInfo::kNoPosition); int position = RelocInfo::kNoPosition);
@ -1402,7 +1408,7 @@ class HGraphBuilder {
HBasicBlock* merge_block_; HBasicBlock* merge_block_;
}; };
class LoopBuilder { class LoopBuilder V8_FINAL {
public: public:
enum Direction { enum Direction {
kPreIncrement, kPreIncrement,
@ -1443,7 +1449,7 @@ class HGraphBuilder {
void BuildNewSpaceArrayCheck(HValue* length, void BuildNewSpaceArrayCheck(HValue* length,
ElementsKind kind); ElementsKind kind);
class JSArrayBuilder { class JSArrayBuilder V8_FINAL {
public: public:
JSArrayBuilder(HGraphBuilder* builder, JSArrayBuilder(HGraphBuilder* builder,
ElementsKind kind, ElementsKind kind,
@ -1642,12 +1648,13 @@ inline HInstruction* HGraphBuilder::NewUncasted<HContext>() {
} }
class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { class HOptimizedGraphBuilder V8_FINAL
: public HGraphBuilder, public AstVisitor {
public: public:
// A class encapsulating (lazily-allocated) break and continue blocks for // A class encapsulating (lazily-allocated) break and continue blocks for
// a breakable statement. Separated from BreakAndContinueScope so that it // a breakable statement. Separated from BreakAndContinueScope so that it
// can have a separate lifetime. // can have a separate lifetime.
class BreakAndContinueInfo BASE_EMBEDDED { class BreakAndContinueInfo V8_FINAL BASE_EMBEDDED {
public: public:
explicit BreakAndContinueInfo(BreakableStatement* target, explicit BreakAndContinueInfo(BreakableStatement* target,
int drop_extra = 0) int drop_extra = 0)
@ -1673,7 +1680,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
// A helper class to maintain a stack of current BreakAndContinueInfo // A helper class to maintain a stack of current BreakAndContinueInfo
// structures mirroring BreakableStatement nesting. // structures mirroring BreakableStatement nesting.
class BreakAndContinueScope BASE_EMBEDDED { class BreakAndContinueScope V8_FINAL BASE_EMBEDDED {
public: public:
BreakAndContinueScope(BreakAndContinueInfo* info, BreakAndContinueScope(BreakAndContinueInfo* info,
HOptimizedGraphBuilder* owner) HOptimizedGraphBuilder* owner)
@ -1699,7 +1706,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
explicit HOptimizedGraphBuilder(CompilationInfo* info); explicit HOptimizedGraphBuilder(CompilationInfo* info);
virtual bool BuildGraph(); virtual bool BuildGraph() V8_OVERRIDE;
// Simple accessors. // Simple accessors.
BreakAndContinueScope* break_scope() const { return break_scope_; } BreakAndContinueScope* break_scope() const { return break_scope_; }
@ -1885,9 +1892,9 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
template <class Instruction> HInstruction* PreProcessCall(Instruction* call); template <class Instruction> HInstruction* PreProcessCall(Instruction* call);
void SetUpScope(Scope* scope); void SetUpScope(Scope* scope);
virtual void VisitStatements(ZoneList<Statement*>* statements); virtual void VisitStatements(ZoneList<Statement*>* statements) V8_OVERRIDE;
#define DECLARE_VISIT(type) virtual void Visit##type(type* node); #define DECLARE_VISIT(type) virtual void Visit##type(type* node) V8_OVERRIDE;
AST_NODE_LIST(DECLARE_VISIT) AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT #undef DECLARE_VISIT
@ -2166,7 +2173,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
Zone* AstContext::zone() const { return owner_->zone(); } Zone* AstContext::zone() const { return owner_->zone(); }
class HStatistics: public Malloced { class HStatistics V8_FINAL: public Malloced {
public: public:
HStatistics() HStatistics()
: timing_(5), : timing_(5),
@ -2225,7 +2232,7 @@ class HPhase : public CompilationPhase {
}; };
class HTracer: public Malloced { class HTracer V8_FINAL : public Malloced {
public: public:
explicit HTracer(int isolate_id) explicit HTracer(int isolate_id)
: trace_(&string_allocator_), indent_(0) { : trace_(&string_allocator_), indent_(0) {
@ -2246,7 +2253,7 @@ class HTracer: public Malloced {
void TraceLiveRanges(const char* name, LAllocator* allocator); void TraceLiveRanges(const char* name, LAllocator* allocator);
private: private:
class Tag BASE_EMBEDDED { class Tag V8_FINAL BASE_EMBEDDED {
public: public:
Tag(HTracer* tracer, const char* name) { Tag(HTracer* tracer, const char* name) {
name_ = name; name_ = name;
@ -2311,7 +2318,7 @@ class HTracer: public Malloced {
}; };
class NoObservableSideEffectsScope { class NoObservableSideEffectsScope V8_FINAL {
public: public:
explicit NoObservableSideEffectsScope(HGraphBuilder* builder) : explicit NoObservableSideEffectsScope(HGraphBuilder* builder) :
builder_(builder) { builder_(builder) {

View File

@ -48,7 +48,7 @@ static SaveFPRegsMode GetSaveFPRegsMode() {
// When invoking builtins, we need to record the safepoint in the middle of // When invoking builtins, we need to record the safepoint in the middle of
// the invoke instruction sequence generated by the macro assembler. // the invoke instruction sequence generated by the macro assembler.
class SafepointGenerator : public CallWrapper { class SafepointGenerator V8_FINAL : public CallWrapper {
public: public:
SafepointGenerator(LCodeGen* codegen, SafepointGenerator(LCodeGen* codegen,
LPointerMap* pointers, LPointerMap* pointers,
@ -56,11 +56,11 @@ class SafepointGenerator : public CallWrapper {
: codegen_(codegen), : codegen_(codegen),
pointers_(pointers), pointers_(pointers),
deopt_mode_(mode) {} deopt_mode_(mode) {}
virtual ~SafepointGenerator() { } virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const {} virtual void BeforeCall(int call_size) const V8_OVERRIDE {}
virtual void AfterCall() const { virtual void AfterCall() const V8_OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_); codegen_->RecordSafepoint(pointers_, deopt_mode_);
} }
@ -2816,15 +2816,15 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
class DeferredInstanceOfKnownGlobal: public LDeferredCode { class DeferredInstanceOfKnownGlobal V8_FINAL : public LDeferredCode {
public: public:
DeferredInstanceOfKnownGlobal(LCodeGen* codegen, DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr) LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; } Label* map_check() { return &map_check_; }
private: private:
LInstanceOfKnownGlobal* instr_; LInstanceOfKnownGlobal* instr_;
@ -3784,14 +3784,14 @@ void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) {
void LCodeGen::DoMathAbs(LMathAbs* instr) { void LCodeGen::DoMathAbs(LMathAbs* instr) {
// Class for deferred case. // Class for deferred case.
class DeferredMathAbsTaggedHeapNumber: public LDeferredCode { class DeferredMathAbsTaggedHeapNumber V8_FINAL : public LDeferredCode {
public: public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LMathAbs* instr_; LMathAbs* instr_;
}; };
@ -4024,12 +4024,12 @@ void LCodeGen::DoPower(LPower* instr) {
void LCodeGen::DoRandom(LRandom* instr) { void LCodeGen::DoRandom(LRandom* instr) {
class DeferredDoRandom: public LDeferredCode { class DeferredDoRandom V8_FINAL : public LDeferredCode {
public: public:
DeferredDoRandom(LCodeGen* codegen, LRandom* instr) DeferredDoRandom(LCodeGen* codegen, LRandom* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredRandom(instr_); } virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredRandom(instr_); }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LRandom* instr_; LRandom* instr_;
}; };
@ -4759,12 +4759,14 @@ void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) {
void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
class DeferredStringCharCodeAt: public LDeferredCode { class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode {
public: public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStringCharCodeAt* instr_; LStringCharCodeAt* instr_;
}; };
@ -4814,12 +4816,14 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) {
void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
class DeferredStringCharFromCode: public LDeferredCode { class DeferredStringCharFromCode V8_FINAL : public LDeferredCode {
public: public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStringCharFromCode(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStringCharFromCode* instr_; LStringCharFromCode* instr_;
}; };
@ -4906,14 +4910,14 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
void LCodeGen::DoNumberTagI(LNumberTagI* instr) { void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
class DeferredNumberTagI: public LDeferredCode { class DeferredNumberTagI V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredNumberTagI(instr_, instr_->value(), SIGNED_INT32); codegen()->DoDeferredNumberTagI(instr_, instr_->value(), SIGNED_INT32);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagI* instr_; LNumberTagI* instr_;
}; };
@ -4930,14 +4934,14 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
void LCodeGen::DoNumberTagU(LNumberTagU* instr) { void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
class DeferredNumberTagU: public LDeferredCode { class DeferredNumberTagU V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredNumberTagI(instr_, instr_->value(), UNSIGNED_INT32); codegen()->DoDeferredNumberTagI(instr_, instr_->value(), UNSIGNED_INT32);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagU* instr_; LNumberTagU* instr_;
}; };
@ -5033,12 +5037,14 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr,
void LCodeGen::DoNumberTagD(LNumberTagD* instr) { void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
class DeferredNumberTagD: public LDeferredCode { class DeferredNumberTagD V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagD* instr_; LNumberTagD* instr_;
}; };
@ -5332,12 +5338,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) {
void LCodeGen::DoTaggedToI(LTaggedToI* instr) { void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
class DeferredTaggedToI: public LDeferredCode { class DeferredTaggedToI V8_FINAL : public LDeferredCode {
public: public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredTaggedToI(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredTaggedToI(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LTaggedToI* instr_; LTaggedToI* instr_;
}; };
@ -5491,12 +5499,14 @@ void LCodeGen::DoDeferredTaggedToINoSSE2(LTaggedToINoSSE2* instr) {
void LCodeGen::DoTaggedToINoSSE2(LTaggedToINoSSE2* instr) { void LCodeGen::DoTaggedToINoSSE2(LTaggedToINoSSE2* instr) {
class DeferredTaggedToINoSSE2: public LDeferredCode { class DeferredTaggedToINoSSE2 V8_FINAL : public LDeferredCode {
public: public:
DeferredTaggedToINoSSE2(LCodeGen* codegen, LTaggedToINoSSE2* instr) DeferredTaggedToINoSSE2(LCodeGen* codegen, LTaggedToINoSSE2* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredTaggedToINoSSE2(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredTaggedToINoSSE2(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LTaggedToINoSSE2* instr_; LTaggedToINoSSE2* instr_;
}; };
@ -5728,17 +5738,17 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
void LCodeGen::DoCheckMaps(LCheckMaps* instr) { void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
class DeferredCheckMaps: public LDeferredCode { class DeferredCheckMaps V8_FINAL : public LDeferredCode {
public: public:
DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object)
: LDeferredCode(codegen), instr_(instr), object_(object) { : LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps()); SetExit(check_maps());
} }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_); codegen()->DoDeferredInstanceMigration(instr_, object_);
} }
Label* check_maps() { return &check_maps_; } Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LCheckMaps* instr_; LCheckMaps* instr_;
Label check_maps_; Label check_maps_;
@ -5951,12 +5961,14 @@ void LCodeGen::DoClampTToUint8NoSSE2(LClampTToUint8NoSSE2* instr) {
void LCodeGen::DoAllocate(LAllocate* instr) { void LCodeGen::DoAllocate(LAllocate* instr) {
class DeferredAllocate: public LDeferredCode { class DeferredAllocate V8_FINAL : public LDeferredCode {
public: public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr) DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LAllocate* instr_; LAllocate* instr_;
}; };
@ -6300,12 +6312,14 @@ void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
void LCodeGen::DoStackCheck(LStackCheck* instr) { void LCodeGen::DoStackCheck(LStackCheck* instr) {
class DeferredStackCheck: public LDeferredCode { class DeferredStackCheck V8_FINAL : public LDeferredCode {
public: public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStackCheck(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStackCheck* instr_; LStackCheck* instr_;
}; };

View File

@ -45,7 +45,7 @@ class LDeferredCode;
class LGapNode; class LGapNode;
class SafepointGenerator; class SafepointGenerator;
class LCodeGen BASE_EMBEDDED { class LCodeGen V8_FINAL BASE_EMBEDDED {
public: public:
LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
: zone_(info->zone()), : zone_(info->zone()),
@ -452,7 +452,7 @@ class LCodeGen BASE_EMBEDDED {
int old_position_; int old_position_;
class PushSafepointRegistersScope BASE_EMBEDDED { class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
public: public:
explicit PushSafepointRegistersScope(LCodeGen* codegen) explicit PushSafepointRegistersScope(LCodeGen* codegen)
: codegen_(codegen) { : codegen_(codegen) {
@ -479,7 +479,7 @@ class LCodeGen BASE_EMBEDDED {
}; };
class LDeferredCode: public ZoneObject { class LDeferredCode : public ZoneObject {
public: public:
explicit LDeferredCode(LCodeGen* codegen) explicit LDeferredCode(LCodeGen* codegen)
: codegen_(codegen), : codegen_(codegen),
@ -488,7 +488,7 @@ class LDeferredCode: public ZoneObject {
codegen->AddDeferredCode(this); codegen->AddDeferredCode(this);
} }
virtual ~LDeferredCode() { } virtual ~LDeferredCode() {}
virtual void Generate() = 0; virtual void Generate() = 0;
virtual LInstruction* instr() = 0; virtual LInstruction* instr() = 0;

View File

@ -38,7 +38,7 @@ namespace internal {
class LCodeGen; class LCodeGen;
class LGapResolver; class LGapResolver;
class LGapResolver BASE_EMBEDDED { class LGapResolver V8_FINAL BASE_EMBEDDED {
public: public:
explicit LGapResolver(LCodeGen* owner); explicit LGapResolver(LCodeGen* owner);

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@ namespace internal {
V(DoubleRegister, DOUBLE_REGISTER) V(DoubleRegister, DOUBLE_REGISTER)
class LOperand: public ZoneObject { class LOperand : public ZoneObject {
public: public:
enum Kind { enum Kind {
INVALID, INVALID,
@ -90,7 +90,7 @@ class LOperand: public ZoneObject {
}; };
class LUnallocated: public LOperand { class LUnallocated : public LOperand {
public: public:
enum BasicPolicy { enum BasicPolicy {
FIXED_SLOT, FIXED_SLOT,
@ -271,7 +271,7 @@ class LUnallocated: public LOperand {
}; };
class LMoveOperands BASE_EMBEDDED { class LMoveOperands V8_FINAL BASE_EMBEDDED {
public: public:
LMoveOperands(LOperand* source, LOperand* destination) LMoveOperands(LOperand* source, LOperand* destination)
: source_(source), destination_(destination) { : source_(source), destination_(destination) {
@ -317,7 +317,7 @@ class LMoveOperands BASE_EMBEDDED {
}; };
class LConstantOperand: public LOperand { class LConstantOperand V8_FINAL : public LOperand {
public: public:
static LConstantOperand* Create(int index, Zone* zone) { static LConstantOperand* Create(int index, Zone* zone) {
ASSERT(index >= 0); ASSERT(index >= 0);
@ -342,7 +342,7 @@ class LConstantOperand: public LOperand {
}; };
class LArgument: public LOperand { class LArgument V8_FINAL : public LOperand {
public: public:
explicit LArgument(int index) : LOperand(ARGUMENT, index) { } explicit LArgument(int index) : LOperand(ARGUMENT, index) { }
@ -353,7 +353,7 @@ class LArgument: public LOperand {
}; };
class LStackSlot: public LOperand { class LStackSlot V8_FINAL : public LOperand {
public: public:
static LStackSlot* Create(int index, Zone* zone) { static LStackSlot* Create(int index, Zone* zone) {
ASSERT(index >= 0); ASSERT(index >= 0);
@ -378,7 +378,7 @@ class LStackSlot: public LOperand {
}; };
class LDoubleStackSlot: public LOperand { class LDoubleStackSlot V8_FINAL : public LOperand {
public: public:
static LDoubleStackSlot* Create(int index, Zone* zone) { static LDoubleStackSlot* Create(int index, Zone* zone) {
ASSERT(index >= 0); ASSERT(index >= 0);
@ -403,7 +403,7 @@ class LDoubleStackSlot: public LOperand {
}; };
class LRegister: public LOperand { class LRegister V8_FINAL : public LOperand {
public: public:
static LRegister* Create(int index, Zone* zone) { static LRegister* Create(int index, Zone* zone) {
ASSERT(index >= 0); ASSERT(index >= 0);
@ -428,7 +428,7 @@ class LRegister: public LOperand {
}; };
class LDoubleRegister: public LOperand { class LDoubleRegister V8_FINAL : public LOperand {
public: public:
static LDoubleRegister* Create(int index, Zone* zone) { static LDoubleRegister* Create(int index, Zone* zone) {
ASSERT(index >= 0); ASSERT(index >= 0);
@ -453,7 +453,7 @@ class LDoubleRegister: public LOperand {
}; };
class LParallelMove : public ZoneObject { class LParallelMove V8_FINAL : public ZoneObject {
public: public:
explicit LParallelMove(Zone* zone) : move_operands_(4, zone) { } explicit LParallelMove(Zone* zone) : move_operands_(4, zone) { }
@ -474,7 +474,7 @@ class LParallelMove : public ZoneObject {
}; };
class LPointerMap: public ZoneObject { class LPointerMap V8_FINAL : public ZoneObject {
public: public:
explicit LPointerMap(int position, Zone* zone) explicit LPointerMap(int position, Zone* zone)
: pointer_operands_(8, zone), : pointer_operands_(8, zone),
@ -510,7 +510,7 @@ class LPointerMap: public ZoneObject {
}; };
class LEnvironment: public ZoneObject { class LEnvironment V8_FINAL : public ZoneObject {
public: public:
LEnvironment(Handle<JSFunction> closure, LEnvironment(Handle<JSFunction> closure,
FrameType frame_type, FrameType frame_type,
@ -655,7 +655,7 @@ class LEnvironment: public ZoneObject {
// Iterates over the non-null, non-constant operands in an environment. // Iterates over the non-null, non-constant operands in an environment.
class ShallowIterator BASE_EMBEDDED { class ShallowIterator V8_FINAL BASE_EMBEDDED {
public: public:
explicit ShallowIterator(LEnvironment* env) explicit ShallowIterator(LEnvironment* env)
: env_(env), : env_(env),
@ -699,7 +699,7 @@ class ShallowIterator BASE_EMBEDDED {
// Iterator for non-null, non-constant operands incl. outer environments. // Iterator for non-null, non-constant operands incl. outer environments.
class DeepIterator BASE_EMBEDDED { class DeepIterator V8_FINAL BASE_EMBEDDED {
public: public:
explicit DeepIterator(LEnvironment* env) explicit DeepIterator(LEnvironment* env)
: current_iterator_(env) { : current_iterator_(env) {
@ -736,7 +736,7 @@ class LLabel;
// Superclass providing data and behavior common to all the // Superclass providing data and behavior common to all the
// arch-specific LPlatformChunk classes. // arch-specific LPlatformChunk classes.
class LChunk: public ZoneObject { class LChunk : public ZoneObject {
public: public:
static LChunk* NewChunk(HGraph* graph); static LChunk* NewChunk(HGraph* graph);

View File

@ -36,7 +36,7 @@ namespace v8 {
namespace internal { namespace internal {
class SafepointGenerator : public CallWrapper { class SafepointGenerator V8_FINAL : public CallWrapper {
public: public:
SafepointGenerator(LCodeGen* codegen, SafepointGenerator(LCodeGen* codegen,
LPointerMap* pointers, LPointerMap* pointers,
@ -44,11 +44,11 @@ class SafepointGenerator : public CallWrapper {
: codegen_(codegen), : codegen_(codegen),
pointers_(pointers), pointers_(pointers),
deopt_mode_(mode) { } deopt_mode_(mode) { }
virtual ~SafepointGenerator() { } virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const { } virtual void BeforeCall(int call_size) const V8_OVERRIDE {}
virtual void AfterCall() const { virtual void AfterCall() const V8_OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_); codegen_->RecordSafepoint(pointers_, deopt_mode_);
} }
@ -2605,15 +2605,15 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
class DeferredInstanceOfKnownGlobal: public LDeferredCode { class DeferredInstanceOfKnownGlobal V8_FINAL : public LDeferredCode {
public: public:
DeferredInstanceOfKnownGlobal(LCodeGen* codegen, DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr) LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; } Label* map_check() { return &map_check_; }
private: private:
@ -3599,14 +3599,14 @@ void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) {
void LCodeGen::DoMathAbs(LMathAbs* instr) { void LCodeGen::DoMathAbs(LMathAbs* instr) {
// Class for deferred case. // Class for deferred case.
class DeferredMathAbsTaggedHeapNumber: public LDeferredCode { class DeferredMathAbsTaggedHeapNumber V8_FINAL : public LDeferredCode {
public: public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LMathAbs* instr_; LMathAbs* instr_;
}; };
@ -3801,12 +3801,12 @@ void LCodeGen::DoPower(LPower* instr) {
void LCodeGen::DoRandom(LRandom* instr) { void LCodeGen::DoRandom(LRandom* instr) {
class DeferredDoRandom: public LDeferredCode { class DeferredDoRandom V8_FINAL : public LDeferredCode {
public: public:
DeferredDoRandom(LCodeGen* codegen, LRandom* instr) DeferredDoRandom(LCodeGen* codegen, LRandom* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredRandom(instr_); } virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredRandom(instr_); }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LRandom* instr_; LRandom* instr_;
}; };
@ -4461,12 +4461,14 @@ void LCodeGen::DoStringAdd(LStringAdd* instr) {
void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
class DeferredStringCharCodeAt: public LDeferredCode { class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode {
public: public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStringCharCodeAt* instr_; LStringCharCodeAt* instr_;
}; };
@ -4513,12 +4515,14 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) {
void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
class DeferredStringCharFromCode: public LDeferredCode { class DeferredStringCharFromCode V8_FINAL : public LDeferredCode {
public: public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStringCharFromCode(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStringCharFromCode* instr_; LStringCharFromCode* instr_;
}; };
@ -4604,16 +4608,16 @@ void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
void LCodeGen::DoNumberTagI(LNumberTagI* instr) { void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
class DeferredNumberTagI: public LDeferredCode { class DeferredNumberTagI V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredNumberTagI(instr_, codegen()->DoDeferredNumberTagI(instr_,
instr_->value(), instr_->value(),
SIGNED_INT32); SIGNED_INT32);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagI* instr_; LNumberTagI* instr_;
}; };
@ -4630,16 +4634,16 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
void LCodeGen::DoNumberTagU(LNumberTagU* instr) { void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
class DeferredNumberTagU: public LDeferredCode { class DeferredNumberTagU V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredNumberTagI(instr_, codegen()->DoDeferredNumberTagI(instr_,
instr_->value(), instr_->value(),
UNSIGNED_INT32); UNSIGNED_INT32);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagU* instr_; LNumberTagU* instr_;
}; };
@ -4710,12 +4714,14 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr,
void LCodeGen::DoNumberTagD(LNumberTagD* instr) { void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
class DeferredNumberTagD: public LDeferredCode { class DeferredNumberTagD V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagD* instr_; LNumberTagD* instr_;
}; };
@ -4914,12 +4920,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) {
void LCodeGen::DoTaggedToI(LTaggedToI* instr) { void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
class DeferredTaggedToI: public LDeferredCode { class DeferredTaggedToI V8_FINAL : public LDeferredCode {
public: public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredTaggedToI(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredTaggedToI(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LTaggedToI* instr_; LTaggedToI* instr_;
}; };
@ -5132,17 +5140,17 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
void LCodeGen::DoCheckMaps(LCheckMaps* instr) { void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
class DeferredCheckMaps: public LDeferredCode { class DeferredCheckMaps V8_FINAL : public LDeferredCode {
public: public:
DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object)
: LDeferredCode(codegen), instr_(instr), object_(object) { : LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps()); SetExit(check_maps());
} }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_); codegen()->DoDeferredInstanceMigration(instr_, object_);
} }
Label* check_maps() { return &check_maps_; } Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LCheckMaps* instr_; LCheckMaps* instr_;
Label check_maps_; Label check_maps_;
@ -5231,12 +5239,14 @@ void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
void LCodeGen::DoAllocate(LAllocate* instr) { void LCodeGen::DoAllocate(LAllocate* instr) {
class DeferredAllocate: public LDeferredCode { class DeferredAllocate V8_FINAL : public LDeferredCode {
public: public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr) DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LAllocate* instr_; LAllocate* instr_;
}; };
@ -5633,12 +5643,14 @@ void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
void LCodeGen::DoStackCheck(LStackCheck* instr) { void LCodeGen::DoStackCheck(LStackCheck* instr) {
class DeferredStackCheck: public LDeferredCode { class DeferredStackCheck V8_FINAL : public LDeferredCode {
public: public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStackCheck(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStackCheck* instr_; LStackCheck* instr_;
}; };

View File

@ -42,7 +42,7 @@ namespace internal {
class LDeferredCode; class LDeferredCode;
class SafepointGenerator; class SafepointGenerator;
class LCodeGen BASE_EMBEDDED { class LCodeGen V8_FINAL BASE_EMBEDDED {
public: public:
LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
: zone_(info->zone()), : zone_(info->zone()),
@ -441,7 +441,7 @@ class LCodeGen BASE_EMBEDDED {
int old_position_; int old_position_;
class PushSafepointRegistersScope BASE_EMBEDDED { class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
public: public:
PushSafepointRegistersScope(LCodeGen* codegen, PushSafepointRegistersScope(LCodeGen* codegen,
Safepoint::Kind kind) Safepoint::Kind kind)
@ -489,7 +489,7 @@ class LCodeGen BASE_EMBEDDED {
}; };
class LDeferredCode: public ZoneObject { class LDeferredCode : public ZoneObject {
public: public:
explicit LDeferredCode(LCodeGen* codegen) explicit LDeferredCode(LCodeGen* codegen)
: codegen_(codegen), : codegen_(codegen),
@ -498,7 +498,7 @@ class LDeferredCode: public ZoneObject {
codegen->AddDeferredCode(this); codegen->AddDeferredCode(this);
} }
virtual ~LDeferredCode() { } virtual ~LDeferredCode() {}
virtual void Generate() = 0; virtual void Generate() = 0;
virtual LInstruction* instr() = 0; virtual LInstruction* instr() = 0;

View File

@ -38,7 +38,7 @@ namespace internal {
class LCodeGen; class LCodeGen;
class LGapResolver; class LGapResolver;
class LGapResolver BASE_EMBEDDED { class LGapResolver V8_FINAL BASE_EMBEDDED {
public: public:
explicit LGapResolver(LCodeGen* owner); explicit LGapResolver(LCodeGen* owner);

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@ namespace internal {
// When invoking builtins, we need to record the safepoint in the middle of // When invoking builtins, we need to record the safepoint in the middle of
// the invoke instruction sequence generated by the macro assembler. // the invoke instruction sequence generated by the macro assembler.
class SafepointGenerator : public CallWrapper { class SafepointGenerator V8_FINAL : public CallWrapper {
public: public:
SafepointGenerator(LCodeGen* codegen, SafepointGenerator(LCodeGen* codegen,
LPointerMap* pointers, LPointerMap* pointers,
@ -47,13 +47,13 @@ class SafepointGenerator : public CallWrapper {
: codegen_(codegen), : codegen_(codegen),
pointers_(pointers), pointers_(pointers),
deopt_mode_(mode) { } deopt_mode_(mode) { }
virtual ~SafepointGenerator() { } virtual ~SafepointGenerator() {}
virtual void BeforeCall(int call_size) const { virtual void BeforeCall(int call_size) const V8_OVERRIDE {
codegen_->EnsureSpaceForLazyDeopt(Deoptimizer::patch_size() - call_size); codegen_->EnsureSpaceForLazyDeopt(Deoptimizer::patch_size() - call_size);
} }
virtual void AfterCall() const { virtual void AfterCall() const V8_OVERRIDE {
codegen_->RecordSafepoint(pointers_, deopt_mode_); codegen_->RecordSafepoint(pointers_, deopt_mode_);
} }
@ -2466,15 +2466,15 @@ void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
class DeferredInstanceOfKnownGlobal: public LDeferredCode { class DeferredInstanceOfKnownGlobal V8_FINAL : public LDeferredCode {
public: public:
DeferredInstanceOfKnownGlobal(LCodeGen* codegen, DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
LInstanceOfKnownGlobal* instr) LInstanceOfKnownGlobal* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
Label* map_check() { return &map_check_; } Label* map_check() { return &map_check_; }
private: private:
LInstanceOfKnownGlobal* instr_; LInstanceOfKnownGlobal* instr_;
@ -3400,14 +3400,14 @@ void LCodeGen::EmitSmiMathAbs(LMathAbs* instr) {
void LCodeGen::DoMathAbs(LMathAbs* instr) { void LCodeGen::DoMathAbs(LMathAbs* instr) {
// Class for deferred case. // Class for deferred case.
class DeferredMathAbsTaggedHeapNumber: public LDeferredCode { class DeferredMathAbsTaggedHeapNumber V8_FINAL : public LDeferredCode {
public: public:
DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LMathAbs* instr_; LMathAbs* instr_;
}; };
@ -3632,12 +3632,12 @@ void LCodeGen::DoPower(LPower* instr) {
void LCodeGen::DoRandom(LRandom* instr) { void LCodeGen::DoRandom(LRandom* instr) {
class DeferredDoRandom: public LDeferredCode { class DeferredDoRandom V8_FINAL : public LDeferredCode {
public: public:
DeferredDoRandom(LCodeGen* codegen, LRandom* instr) DeferredDoRandom(LCodeGen* codegen, LRandom* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredRandom(instr_); } virtual void Generate() V8_OVERRIDE { codegen()->DoDeferredRandom(instr_); }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LRandom* instr_; LRandom* instr_;
}; };
@ -4322,12 +4322,14 @@ void LCodeGen::DoStringAdd(LStringAdd* instr) {
void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
class DeferredStringCharCodeAt: public LDeferredCode { class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode {
public: public:
DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStringCharCodeAt(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStringCharCodeAt* instr_; LStringCharCodeAt* instr_;
}; };
@ -4374,12 +4376,14 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) {
void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
class DeferredStringCharFromCode: public LDeferredCode { class DeferredStringCharFromCode V8_FINAL : public LDeferredCode {
public: public:
DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStringCharFromCode(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStringCharFromCode(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStringCharFromCode* instr_; LStringCharFromCode* instr_;
}; };
@ -4468,14 +4472,14 @@ void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
void LCodeGen::DoNumberTagU(LNumberTagU* instr) { void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
class DeferredNumberTagU: public LDeferredCode { class DeferredNumberTagU V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredNumberTagU(instr_); codegen()->DoDeferredNumberTagU(instr_);
} }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagU* instr_; LNumberTagU* instr_;
}; };
@ -4531,12 +4535,14 @@ void LCodeGen::DoDeferredNumberTagU(LNumberTagU* instr) {
void LCodeGen::DoNumberTagD(LNumberTagD* instr) { void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
class DeferredNumberTagD: public LDeferredCode { class DeferredNumberTagD V8_FINAL : public LDeferredCode {
public: public:
DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredNumberTagD(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredNumberTagD(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LNumberTagD* instr_; LNumberTagD* instr_;
}; };
@ -4698,12 +4704,14 @@ void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) {
void LCodeGen::DoTaggedToI(LTaggedToI* instr) { void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
class DeferredTaggedToI: public LDeferredCode { class DeferredTaggedToI V8_FINAL : public LDeferredCode {
public: public:
DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredTaggedToI(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredTaggedToI(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LTaggedToI* instr_; LTaggedToI* instr_;
}; };
@ -4900,17 +4908,17 @@ void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) {
void LCodeGen::DoCheckMaps(LCheckMaps* instr) { void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
class DeferredCheckMaps: public LDeferredCode { class DeferredCheckMaps V8_FINAL : public LDeferredCode {
public: public:
DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object)
: LDeferredCode(codegen), instr_(instr), object_(object) { : LDeferredCode(codegen), instr_(instr), object_(object) {
SetExit(check_maps()); SetExit(check_maps());
} }
virtual void Generate() { virtual void Generate() V8_OVERRIDE {
codegen()->DoDeferredInstanceMigration(instr_, object_); codegen()->DoDeferredInstanceMigration(instr_, object_);
} }
Label* check_maps() { return &check_maps_; } Label* check_maps() { return &check_maps_; }
virtual LInstruction* instr() { return instr_; } virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LCheckMaps* instr_; LCheckMaps* instr_;
Label check_maps_; Label check_maps_;
@ -5000,12 +5008,14 @@ void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
void LCodeGen::DoAllocate(LAllocate* instr) { void LCodeGen::DoAllocate(LAllocate* instr) {
class DeferredAllocate: public LDeferredCode { class DeferredAllocate V8_FINAL : public LDeferredCode {
public: public:
DeferredAllocate(LCodeGen* codegen, LAllocate* instr) DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredAllocate(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LAllocate* instr_; LAllocate* instr_;
}; };
@ -5361,12 +5371,14 @@ void LCodeGen::DoDeferredStackCheck(LStackCheck* instr) {
void LCodeGen::DoStackCheck(LStackCheck* instr) { void LCodeGen::DoStackCheck(LStackCheck* instr) {
class DeferredStackCheck: public LDeferredCode { class DeferredStackCheck V8_FINAL : public LDeferredCode {
public: public:
DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
: LDeferredCode(codegen), instr_(instr) { } : LDeferredCode(codegen), instr_(instr) { }
virtual void Generate() { codegen()->DoDeferredStackCheck(instr_); } virtual void Generate() V8_OVERRIDE {
virtual LInstruction* instr() { return instr_; } codegen()->DoDeferredStackCheck(instr_);
}
virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
private: private:
LStackCheck* instr_; LStackCheck* instr_;
}; };

View File

@ -44,7 +44,7 @@ namespace internal {
class LDeferredCode; class LDeferredCode;
class SafepointGenerator; class SafepointGenerator;
class LCodeGen BASE_EMBEDDED { class LCodeGen V8_FINAL BASE_EMBEDDED {
public: public:
LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info) LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
: zone_(info->zone()), : zone_(info->zone()),
@ -384,7 +384,7 @@ class LCodeGen BASE_EMBEDDED {
int old_position_; int old_position_;
class PushSafepointRegistersScope BASE_EMBEDDED { class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
public: public:
explicit PushSafepointRegistersScope(LCodeGen* codegen) explicit PushSafepointRegistersScope(LCodeGen* codegen)
: codegen_(codegen) { : codegen_(codegen) {
@ -420,7 +420,7 @@ class LDeferredCode: public ZoneObject {
codegen->AddDeferredCode(this); codegen->AddDeferredCode(this);
} }
virtual ~LDeferredCode() { } virtual ~LDeferredCode() {}
virtual void Generate() = 0; virtual void Generate() = 0;
virtual LInstruction* instr() = 0; virtual LInstruction* instr() = 0;

View File

@ -38,7 +38,7 @@ namespace internal {
class LCodeGen; class LCodeGen;
class LGapResolver; class LGapResolver;
class LGapResolver BASE_EMBEDDED { class LGapResolver V8_FINAL BASE_EMBEDDED {
public: public:
explicit LGapResolver(LCodeGen* owner); explicit LGapResolver(LCodeGen* owner);

File diff suppressed because it is too large Load Diff