Commit 503103eb authored by bbudge's avatar bbudge Committed by Commit bot

[Compiler] Move static FinishCode function into CodeGenerator.

- Adds a FinishCode method to CodeGenerator, and implements it for all
  platforms. ARM and ARM64 flush constants, all other platforms do nothing.
- Remove old static free function.

LOG=N
BUG=none

Review-Url: https://codereview.chromium.org/2748383004
Cr-Commit-Position: refs/heads/master@{#43990}
parent 17a32074
......@@ -2473,6 +2473,8 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
__ Ret();
}
void CodeGenerator::FinishCode() { masm()->CheckConstPool(true, false); }
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
ArmOperandConverter g(this, nullptr);
......
......@@ -2065,6 +2065,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
__ Ret();
}
void CodeGenerator::FinishCode() { masm()->CheckConstPool(true, false); }
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
......
......@@ -214,15 +214,6 @@ class OutOfLineCode : public ZoneObject {
OutOfLineCode* const next_;
};
// TODO(dcarney): generify this on bleeding_edge and replace this call
// when merged.
static inline void FinishCode(MacroAssembler* masm) {
#if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM
masm->CheckConstPool(true, false);
#endif
}
} // namespace compiler
} // namespace internal
} // namespace v8
......
......@@ -209,7 +209,7 @@ Handle<Code> CodeGenerator::GenerateCode() {
}
}
FinishCode(masm());
FinishCode();
// Emit the jump tables.
if (jump_tables_) {
......
......@@ -178,6 +178,8 @@ class CodeGenerator final : public GapResolver::Assembler {
void AssembleTailCallAfterGap(Instruction* instr,
int first_unused_stack_slot);
void FinishCode();
// ===========================================================================
// ============== Architecture-specific gap resolver methods. ================
// ===========================================================================
......
......@@ -2489,6 +2489,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
}
}
void CodeGenerator::FinishCode() {}
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
......
......@@ -2137,6 +2137,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
}
}
void CodeGenerator::FinishCode() {}
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
......
......@@ -2479,6 +2479,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
}
}
void CodeGenerator::FinishCode() {}
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
......
......@@ -2351,6 +2351,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
__ Ret();
}
void CodeGenerator::FinishCode() {}
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
......
......@@ -2734,6 +2734,8 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
__ Ret();
}
void CodeGenerator::FinishCode() {}
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
S390OperandConverter g(this, nullptr);
......
......@@ -2706,6 +2706,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
}
}
void CodeGenerator::FinishCode() {}
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
......
......@@ -2540,6 +2540,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* pop) {
}
}
void CodeGenerator::FinishCode() {}
void CodeGenerator::AssembleMove(InstructionOperand* source,
InstructionOperand* destination) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment