Cleanup deoptimizer relocation slot preparation.
R=titzer@chromium.org Review URL: https://codereview.chromium.org/782703002 Cr-Commit-Position: refs/heads/master@{#25680}
This commit is contained in:
parent
ab16c8a3a5
commit
aae8fe7550
@ -21,6 +21,12 @@ int Deoptimizer::patch_size() {
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
|
||||
// Empty because there is no need for relocation information for the code
|
||||
// patching in Deoptimizer::PatchCodeForDeoptimization below.
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
|
||||
Address code_start_address = code->instruction_start();
|
||||
// Invalidate the relocation information, as it will become invalid by the
|
||||
|
@ -21,6 +21,11 @@ int Deoptimizer::patch_size() {
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
|
||||
// Empty because there is no need for relocation information for the code
|
||||
// patching in Deoptimizer::PatchCodeForDeoptimization below.
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
|
||||
// Invalidate the relocation information, as it will become invalid by the
|
||||
|
@ -1104,9 +1104,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
|
||||
MarkLazyDeoptSite();
|
||||
}
|
||||
|
||||
|
||||
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace compiler
|
||||
|
@ -1159,9 +1159,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
|
||||
MarkLazyDeoptSite();
|
||||
}
|
||||
|
||||
|
||||
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace compiler
|
||||
|
@ -84,7 +84,7 @@ Handle<Code> CodeGenerator::GenerateCode() {
|
||||
|
||||
FinishCode(masm());
|
||||
|
||||
// Ensure there is space for lazy deopt.
|
||||
// Ensure there is space for lazy deoptimization in the code.
|
||||
if (!info->IsStub()) {
|
||||
int target_offset = masm()->pc_offset() + Deoptimizer::patch_size();
|
||||
while (masm()->pc_offset() < target_offset) {
|
||||
@ -107,7 +107,10 @@ Handle<Code> CodeGenerator::GenerateCode() {
|
||||
|
||||
PopulateDeoptimizationData(result);
|
||||
|
||||
EnsureRelocSpaceForLazyDeopt(result);
|
||||
// Ensure there is space for lazy deoptimization in the relocation info.
|
||||
if (!info->IsStub()) {
|
||||
Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(result);
|
||||
}
|
||||
|
||||
// Emit a code line info recording stop event.
|
||||
void* line_info = recorder->DetachJITHandlerData();
|
||||
|
@ -109,7 +109,6 @@ class CodeGenerator FINAL : public GapResolver::Assembler {
|
||||
InstructionOperand* op, MachineType type);
|
||||
void AddNopForSmiCodeInlining();
|
||||
void EnsureSpaceForLazyDeopt();
|
||||
void EnsureRelocSpaceForLazyDeopt(Handle<Code> code);
|
||||
void MarkLazyDeoptSite();
|
||||
|
||||
// ===========================================================================
|
||||
|
@ -1215,11 +1215,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
|
||||
MarkLazyDeoptSite();
|
||||
}
|
||||
|
||||
|
||||
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {
|
||||
Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code);
|
||||
}
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace compiler
|
||||
|
@ -1105,9 +1105,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
|
||||
MarkLazyDeoptSite();
|
||||
}
|
||||
|
||||
|
||||
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace compiler
|
||||
|
@ -1380,9 +1380,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
|
||||
MarkLazyDeoptSite();
|
||||
}
|
||||
|
||||
|
||||
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace compiler
|
||||
|
@ -1249,9 +1249,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
|
||||
MarkLazyDeoptSite();
|
||||
}
|
||||
|
||||
|
||||
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
|
||||
|
||||
#undef __
|
||||
|
||||
} // namespace internal
|
||||
|
@ -27,7 +27,7 @@ void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
// Compute the size of relocation information needed for the code
|
||||
// patching in Deoptimizer::DeoptimizeFunction.
|
||||
// patching in Deoptimizer::PatchCodeForDeoptimization below.
|
||||
int min_reloc_size = 0;
|
||||
int prev_pc_offset = 0;
|
||||
DeoptimizationInputData* deopt_data =
|
||||
|
@ -20,6 +20,12 @@ int Deoptimizer::patch_size() {
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
|
||||
// Empty because there is no need for relocation information for the code
|
||||
// patching in Deoptimizer::PatchCodeForDeoptimization below.
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
|
||||
Address code_start_address = code->instruction_start();
|
||||
// Invalidate the relocation information, as it will become invalid by the
|
||||
|
@ -19,6 +19,12 @@ int Deoptimizer::patch_size() {
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
|
||||
// Empty because there is no need for relocation information for the code
|
||||
// patching in Deoptimizer::PatchCodeForDeoptimization below.
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
|
||||
Address code_start_address = code->instruction_start();
|
||||
// Invalidate the relocation information, as it will become invalid by the
|
||||
|
@ -23,6 +23,12 @@ int Deoptimizer::patch_size() {
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
|
||||
// Empty because there is no need for relocation information for the code
|
||||
// patching in Deoptimizer::PatchCodeForDeoptimization below.
|
||||
}
|
||||
|
||||
|
||||
void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) {
|
||||
// Invalidate the relocation information, as it will become invalid by the
|
||||
// code patching below, and is not needed any more.
|
||||
|
@ -27,7 +27,7 @@ void Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(Handle<Code> code) {
|
||||
HandleScope scope(isolate);
|
||||
|
||||
// Compute the size of relocation information needed for the code
|
||||
// patching in Deoptimizer::DeoptimizeFunction.
|
||||
// patching in Deoptimizer::PatchCodeForDeoptimization below.
|
||||
int min_reloc_size = 0;
|
||||
int prev_pc_offset = 0;
|
||||
DeoptimizationInputData* deopt_data =
|
||||
|
Loading…
Reference in New Issue
Block a user