[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}
This commit is contained in:
parent
45fe9019bf
commit
9984d6f689
@ -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;
|
||||
|
18
test/mjsunit/regress/regress-crbug-644245.js
Normal file
18
test/mjsunit/regress/regress-crbug-644245.js
Normal file
@ -0,0 +1,18 @@
|
||||
// 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();
|
Loading…
Reference in New Issue
Block a user