CodeCleanup: eliminate unnecessary base class and make the children unvirtual.
I found some strange split in deopt entry points generator. The code for table entry generator had two classes. It is safe to join these classes together and drop virtual. BUG= LOG=n Review URL: https://codereview.chromium.org/1010413003 Cr-Commit-Position: refs/heads/master@{#27264}
This commit is contained in:
parent
15f8213809
commit
9f91fde045
@ -135,7 +135,7 @@ bool Deoptimizer::HasAlignmentPadding(JSFunction* function) {
|
||||
|
||||
// This code tries to be close to ia32 code so that any changes can be
|
||||
// easily ported.
|
||||
void Deoptimizer::EntryGenerator::Generate() {
|
||||
void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
GeneratePrologue();
|
||||
|
||||
// Save all general purpose registers before messing with them.
|
||||
|
@ -115,7 +115,7 @@ void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) {
|
||||
|
||||
#define __ masm()->
|
||||
|
||||
void Deoptimizer::EntryGenerator::Generate() {
|
||||
void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
GeneratePrologue();
|
||||
|
||||
// TODO(all): This code needs to be revisited. We probably only need to save
|
||||
|
@ -322,11 +322,10 @@ class Deoptimizer : public Malloced {
|
||||
static const int kNotDeoptimizationEntry = -1;
|
||||
|
||||
// Generators for the deoptimization entry code.
|
||||
class EntryGenerator BASE_EMBEDDED {
|
||||
class TableEntryGenerator BASE_EMBEDDED {
|
||||
public:
|
||||
EntryGenerator(MacroAssembler* masm, BailoutType type)
|
||||
: masm_(masm), type_(type) { }
|
||||
virtual ~EntryGenerator() { }
|
||||
TableEntryGenerator(MacroAssembler* masm, BailoutType type, int count)
|
||||
: masm_(masm), type_(type), count_(count) {}
|
||||
|
||||
void Generate();
|
||||
|
||||
@ -335,24 +334,13 @@ class Deoptimizer : public Malloced {
|
||||
BailoutType type() const { return type_; }
|
||||
Isolate* isolate() const { return masm_->isolate(); }
|
||||
|
||||
virtual void GeneratePrologue() { }
|
||||
|
||||
private:
|
||||
MacroAssembler* masm_;
|
||||
Deoptimizer::BailoutType type_;
|
||||
};
|
||||
|
||||
class TableEntryGenerator : public EntryGenerator {
|
||||
public:
|
||||
TableEntryGenerator(MacroAssembler* masm, BailoutType type, int count)
|
||||
: EntryGenerator(masm, type), count_(count) { }
|
||||
|
||||
protected:
|
||||
virtual void GeneratePrologue();
|
||||
void GeneratePrologue();
|
||||
|
||||
private:
|
||||
int count() const { return count_; }
|
||||
|
||||
MacroAssembler* masm_;
|
||||
Deoptimizer::BailoutType type_;
|
||||
int count_;
|
||||
};
|
||||
|
||||
|
@ -228,7 +228,7 @@ bool Deoptimizer::HasAlignmentPadding(JSFunction* function) {
|
||||
|
||||
#define __ masm()->
|
||||
|
||||
void Deoptimizer::EntryGenerator::Generate() {
|
||||
void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
GeneratePrologue();
|
||||
|
||||
// Save all general purpose registers before messing with them.
|
||||
|
@ -132,7 +132,7 @@ bool Deoptimizer::HasAlignmentPadding(JSFunction* function) {
|
||||
|
||||
// This code tries to be close to ia32 code so that any changes can be
|
||||
// easily ported.
|
||||
void Deoptimizer::EntryGenerator::Generate() {
|
||||
void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
GeneratePrologue();
|
||||
|
||||
// Unlike on ARM we don't save all the registers, just the useful ones.
|
||||
|
@ -131,7 +131,7 @@ bool Deoptimizer::HasAlignmentPadding(JSFunction* function) {
|
||||
|
||||
// This code tries to be close to ia32 code so that any changes can be
|
||||
// easily ported.
|
||||
void Deoptimizer::EntryGenerator::Generate() {
|
||||
void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
GeneratePrologue();
|
||||
|
||||
// Unlike on ARM we don't save all the registers, just the useful ones.
|
||||
|
@ -142,7 +142,7 @@ bool Deoptimizer::HasAlignmentPadding(JSFunction* function) {
|
||||
|
||||
// This code tries to be close to ia32 code so that any changes can be
|
||||
// easily ported.
|
||||
void Deoptimizer::EntryGenerator::Generate() {
|
||||
void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
GeneratePrologue();
|
||||
|
||||
// Unlike on ARM we don't save all the registers, just the useful ones.
|
||||
|
@ -134,7 +134,7 @@ bool Deoptimizer::HasAlignmentPadding(JSFunction* function) {
|
||||
|
||||
#define __ masm()->
|
||||
|
||||
void Deoptimizer::EntryGenerator::Generate() {
|
||||
void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
GeneratePrologue();
|
||||
|
||||
// Save all general purpose registers before messing with them.
|
||||
|
@ -228,7 +228,7 @@ bool Deoptimizer::HasAlignmentPadding(JSFunction* function) {
|
||||
|
||||
#define __ masm()->
|
||||
|
||||
void Deoptimizer::EntryGenerator::Generate() {
|
||||
void Deoptimizer::TableEntryGenerator::Generate() {
|
||||
GeneratePrologue();
|
||||
|
||||
// Save all general purpose registers before messing with them.
|
||||
|
Loading…
Reference in New Issue
Block a user