Use ShouldEnsureSpaceForLazyDeopt more.
R=mcilroy@chromium.org BUG= Review URL: https://codereview.chromium.org/1310283005 Cr-Commit-Position: refs/heads/master@{#30439}
This commit is contained in:
parent
cde62571a4
commit
9a20cb152d
@ -806,7 +806,6 @@ void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
|
||||
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
||||
DCHECK(environment->HasBeenRegistered());
|
||||
int id = environment->deoptimization_index();
|
||||
DCHECK(info()->IsOptimizing() || info()->IsStub());
|
||||
Address entry =
|
||||
Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
||||
if (entry == NULL) {
|
||||
@ -5596,7 +5595,7 @@ void LCodeGen::EmitIsConstructCall(Register temp1, Register temp2) {
|
||||
|
||||
|
||||
void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// Ensure that we have enough space after the previous lazy-bailout
|
||||
// instruction for patching the code here.
|
||||
int current_pc = masm()->pc_offset();
|
||||
|
@ -980,7 +980,6 @@ void LCodeGen::DeoptimizeBranch(
|
||||
}
|
||||
|
||||
DCHECK(environment->HasBeenRegistered());
|
||||
DCHECK(info()->IsOptimizing() || info()->IsStub());
|
||||
int id = environment->deoptimization_index();
|
||||
Address entry =
|
||||
Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
||||
@ -1131,7 +1130,7 @@ void LCodeGen::DeoptimizeIfBitClear(Register rt, int bit, LInstruction* instr,
|
||||
|
||||
|
||||
void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// Ensure that we have enough space after the previous lazy-bailout
|
||||
// instruction for patching the code here.
|
||||
intptr_t current_pc = masm()->pc_offset();
|
||||
|
@ -76,7 +76,7 @@ void LCodeGen::FinishCode(Handle<Code> code) {
|
||||
code->set_stack_slots(GetStackSlotCount());
|
||||
code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
|
||||
PopulateDeoptimizationData(code);
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code);
|
||||
}
|
||||
}
|
||||
@ -495,7 +495,7 @@ bool LCodeGen::GenerateDeferredCode() {
|
||||
|
||||
bool LCodeGen::GenerateSafepointTable() {
|
||||
DCHECK(is_done());
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// For lazy deoptimization we need space to patch a call after every call.
|
||||
// Ensure there is always space for such patching, even if the code ends
|
||||
// in a call.
|
||||
@ -824,7 +824,6 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
|
||||
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
||||
DCHECK(environment->HasBeenRegistered());
|
||||
int id = environment->deoptimization_index();
|
||||
DCHECK(info()->IsOptimizing() || info()->IsStub());
|
||||
Address entry =
|
||||
Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
||||
if (entry == NULL) {
|
||||
@ -5485,7 +5484,7 @@ void LCodeGen::EmitIsConstructCall(Register temp) {
|
||||
|
||||
|
||||
void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// Ensure that we have enough space after the previous lazy-bailout
|
||||
// instruction for patching the code here.
|
||||
int current_pc = masm()->pc_offset();
|
||||
|
@ -783,7 +783,6 @@ void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
|
||||
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
||||
DCHECK(environment->HasBeenRegistered());
|
||||
int id = environment->deoptimization_index();
|
||||
DCHECK(info()->IsOptimizing() || info()->IsStub());
|
||||
Address entry =
|
||||
Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
||||
if (entry == NULL) {
|
||||
@ -5654,7 +5653,7 @@ void LCodeGen::EmitIsConstructCall(Register temp1, Register temp2) {
|
||||
|
||||
|
||||
void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// Ensure that we have enough space after the previous lazy-bailout
|
||||
// instruction for patching the code here.
|
||||
int current_pc = masm()->pc_offset();
|
||||
|
@ -771,7 +771,6 @@ void LCodeGen::DeoptimizeIf(Condition condition, LInstruction* instr,
|
||||
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
||||
DCHECK(environment->HasBeenRegistered());
|
||||
int id = environment->deoptimization_index();
|
||||
DCHECK(info()->IsOptimizing() || info()->IsStub());
|
||||
Address entry =
|
||||
Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
||||
if (entry == NULL) {
|
||||
@ -5842,7 +5841,7 @@ void LCodeGen::EmitIsConstructCall(Register temp1, Register temp2) {
|
||||
|
||||
|
||||
void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// Ensure that we have enough space after the previous lazy-bailout
|
||||
// instruction for patching the code here.
|
||||
int current_pc = masm()->pc_offset();
|
||||
|
@ -749,7 +749,6 @@ void LCodeGen::DeoptimizeIf(Condition cond, LInstruction* instr,
|
||||
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
||||
DCHECK(environment->HasBeenRegistered());
|
||||
int id = environment->deoptimization_index();
|
||||
DCHECK(info()->IsOptimizing() || info()->IsStub());
|
||||
Address entry =
|
||||
Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
||||
if (entry == NULL) {
|
||||
@ -5892,7 +5891,7 @@ void LCodeGen::EmitIsConstructCall(Register temp1, Register temp2) {
|
||||
|
||||
|
||||
void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// Ensure that we have enough space after the previous lazy-bailout
|
||||
// instruction for patching the code here.
|
||||
int current_pc = masm()->pc_offset();
|
||||
|
@ -742,7 +742,6 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
|
||||
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
||||
DCHECK(environment->HasBeenRegistered());
|
||||
int id = environment->deoptimization_index();
|
||||
DCHECK(info()->IsOptimizing() || info()->IsStub());
|
||||
Address entry =
|
||||
Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
||||
if (entry == NULL) {
|
||||
@ -5676,7 +5675,7 @@ void LCodeGen::EmitIsConstructCall(Register temp) {
|
||||
|
||||
|
||||
void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// Ensure that we have enough space after the previous lazy-bailout
|
||||
// instruction for patching the code here.
|
||||
int current_pc = masm()->pc_offset();
|
||||
|
@ -77,7 +77,7 @@ void LCodeGen::FinishCode(Handle<Code> code) {
|
||||
code->set_stack_slots(GetStackSlotCount());
|
||||
code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
|
||||
PopulateDeoptimizationData(code);
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code);
|
||||
}
|
||||
}
|
||||
@ -496,7 +496,7 @@ bool LCodeGen::GenerateDeferredCode() {
|
||||
|
||||
bool LCodeGen::GenerateSafepointTable() {
|
||||
DCHECK(is_done());
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// For lazy deoptimization we need space to patch a call after every call.
|
||||
// Ensure there is always space for such patching, even if the code ends
|
||||
// in a call.
|
||||
@ -1092,7 +1092,6 @@ void LCodeGen::DeoptimizeIf(Condition cc, LInstruction* instr,
|
||||
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
||||
DCHECK(environment->HasBeenRegistered());
|
||||
int id = environment->deoptimization_index();
|
||||
DCHECK(info()->IsOptimizing() || info()->IsStub());
|
||||
Address entry =
|
||||
Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
||||
if (entry == NULL) {
|
||||
@ -6095,7 +6094,7 @@ void LCodeGen::EmitIsConstructCall(Register temp) {
|
||||
|
||||
|
||||
void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
|
||||
if (!info()->IsStub()) {
|
||||
if (info()->ShouldEnsureSpaceForLazyDeopt()) {
|
||||
// Ensure that we have enough space after the previous lazy-bailout
|
||||
// instruction for patching the code here.
|
||||
int current_pc = masm()->pc_offset();
|
||||
|
Loading…
Reference in New Issue
Block a user