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:
mstarzinger 2014-12-05 05:01:58 -08:00 committed by Commit bot
parent ab16c8a3a5
commit aae8fe7550
15 changed files with 36 additions and 25 deletions

View File

@ -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

View File

@ -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

View File

@ -1104,9 +1104,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
MarkLazyDeoptSite();
}
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
#undef __
} // namespace compiler

View File

@ -1159,9 +1159,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
MarkLazyDeoptSite();
}
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
#undef __
} // namespace compiler

View File

@ -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();

View File

@ -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();
// ===========================================================================

View File

@ -1215,11 +1215,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
MarkLazyDeoptSite();
}
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {
Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code);
}
#undef __
} // namespace compiler

View File

@ -1105,9 +1105,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
MarkLazyDeoptSite();
}
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
#undef __
} // namespace compiler

View File

@ -1380,9 +1380,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
MarkLazyDeoptSite();
}
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
#undef __
} // namespace compiler

View File

@ -1249,9 +1249,6 @@ void CodeGenerator::EnsureSpaceForLazyDeopt() {
MarkLazyDeoptSite();
}
void CodeGenerator::EnsureRelocSpaceForLazyDeopt(Handle<Code> code) {}
#undef __
} // namespace internal

View File

@ -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 =

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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 =