Commit 9984d6f6 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[deoptimizer] Support materialization of ContextExtension.

This adds support to the deoptimizer to materialize ContextExtension
objects that have been de-materialized by escape analysis. This is
follow-up to the inline allocation of such objects during the create
lowering phase (i.e. JSCreateWithContext and JSCreateCatchContext).

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-crbug-644245
BUG=chromium:644245

Review-Url: https://codereview.chromium.org/2317353003
Cr-Commit-Position: refs/heads/master@{#39270}
parent 45fe9019
......@@ -3802,6 +3802,18 @@ Handle<Object> TranslatedState::MaterializeAt(int frame_index,
CHECK(next_link->IsUndefined(isolate_));
return object;
}
case CONTEXT_EXTENSION_TYPE: {
Handle<ContextExtension> object =
isolate_->factory()->NewContextExtension(
isolate_->factory()->NewScopeInfo(1),
isolate_->factory()->undefined_value());
slot->value_ = object;
Handle<Object> scope_info = MaterializeAt(frame_index, value_index);
Handle<Object> extension = MaterializeAt(frame_index, value_index);
object->set_scope_info(ScopeInfo::cast(*scope_info));
object->set_extension(*extension);
return object;
}
case FIXED_ARRAY_TYPE: {
Handle<Object> lengthObject = MaterializeAt(frame_index, value_index);
int32_t length = 0;
......
// Copyright 2016 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: --allow-natives-syntax --turbo --turbo-escape
function f() {
try {
throw "boom";
} catch(e) {
%_DeoptimizeNow();
}
}
f();
f();
%OptimizeFunctionOnNextCall(f);
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