[compiler] Simplify handling of OSR source frame.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/1961843002
Cr-Commit-Position: refs/heads/master@{#36127}
This commit is contained in:
mstarzinger 2016-05-10 02:47:50 -07:00 committed by Commit bot
parent 11efb976fa
commit 7e8f248b9b
2 changed files with 4 additions and 9 deletions

View File

@ -727,7 +727,7 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
CompilationInfo* info = job->info();
ParseInfo* parse_info = info->parse_info();
info->SetOptimizingForOsr(osr_ast_id);
info->SetOptimizingForOsr(osr_ast_id, osr_frame);
// Do not use Crankshaft/TurboFan if we need to be able to set break points.
if (info->shared_info()->HasDebugInfo()) {
@ -774,7 +774,6 @@ MaybeHandle<Code> GetOptimizedCode(Handle<JSFunction> function,
return isolate->builtins()->InOptimizationQueue();
}
} else {
info->set_osr_frame(osr_frame);
if (GetOptimizedCodeNow(job.get())) return info->code();
}

View File

@ -191,6 +191,7 @@ class CompilationInfo final {
Handle<Code> code() const { return code_; }
Code::Flags code_flags() const { return code_flags_; }
BailoutId osr_ast_id() const { return osr_ast_id_; }
JavaScriptFrame* osr_frame() const { return osr_frame_; }
int num_parameters() const;
int num_parameters_including_this() const;
bool is_this_defined() const;
@ -340,9 +341,10 @@ class CompilationInfo final {
code_flags_ =
Code::KindField::update(code_flags_, Code::OPTIMIZED_FUNCTION);
}
void SetOptimizingForOsr(BailoutId osr_ast_id) {
void SetOptimizingForOsr(BailoutId osr_ast_id, JavaScriptFrame* osr_frame) {
SetOptimizing();
osr_ast_id_ = osr_ast_id;
osr_frame_ = osr_frame;
}
// Deoptimization support.
@ -399,10 +401,6 @@ class CompilationInfo final {
CompilationDependencies* dependencies() { return &dependencies_; }
bool HasSameOsrEntry(Handle<JSFunction> function, BailoutId osr_ast_id) {
return osr_ast_id_ == osr_ast_id && function.is_identical_to(closure());
}
int optimization_id() const { return optimization_id_; }
int osr_expr_stack_height() { return osr_expr_stack_height_; }
@ -410,8 +408,6 @@ class CompilationInfo final {
DCHECK(height >= 0);
osr_expr_stack_height_ = height;
}
JavaScriptFrame* osr_frame() const { return osr_frame_; }
void set_osr_frame(JavaScriptFrame* osr_frame) { osr_frame_ = osr_frame; }
#if DEBUG
void PrintAstForTesting();