Commit a4b163a9 authored by jarin's avatar jarin Committed by Commit bot

[turbofan] Make sure there is space for lazy deopt patching before the constant pool.

BUG=chromium:446647
LOG=n
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/874863003

Cr-Commit-Position: refs/heads/master@{#26327}
parent 23866a6f
......@@ -85,8 +85,6 @@ Handle<Code> CodeGenerator::GenerateCode() {
}
}
FinishCode(masm());
// Ensure there is space for lazy deoptimization in the code.
if (!info->IsStub()) {
int target_offset = masm()->pc_offset() + Deoptimizer::patch_size();
......@@ -95,6 +93,8 @@ Handle<Code> CodeGenerator::GenerateCode() {
}
}
FinishCode(masm());
safepoints()->Emit(masm(), frame()->GetSpillSlotCount());
// TODO(titzer): what are the right code flags here?
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --always-opt --turbo-filter=* --turbo-deoptimization --allow-natives-syntax
function f(a,b) {
a%b
};
f({ toString : function() { %DeoptimizeFunction(f); }});
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