[deoptimizer] Add missing HeapNumber allocation
This caused a CHECK failure after my recent CL. Bug: chromium:1084820, chromium:1092650 Change-Id: Icdc2a755c6b30ad01dccc908e0e5e137fedf8918 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2237145 Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#68263}
This commit is contained in:
parent
7f69e7f907
commit
ebfb8771d1
@ -3991,6 +3991,9 @@ void TranslatedState::StoreMaterializedValuesAndDeopt(JavaScriptFrame* frame) {
|
||||
|
||||
if (!value.is_identical_to(marker)) {
|
||||
if (previously_materialized_objects->get(i) == *marker) {
|
||||
if (value->IsSmi()) {
|
||||
value = isolate()->factory()->NewHeapNumber(value->Number());
|
||||
}
|
||||
previously_materialized_objects->set(i, *value);
|
||||
value_changed = true;
|
||||
} else {
|
||||
|
23
test/mjsunit/compiler/regress-1092650.js
Normal file
23
test/mjsunit/compiler/regress-1092650.js
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2020 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
|
||||
|
||||
// Create map with HeapNumber in field 'a'
|
||||
({a: 2**30});
|
||||
|
||||
function foo() {
|
||||
return foo.arguments[0];
|
||||
}
|
||||
|
||||
function main() {
|
||||
foo({a: 42});
|
||||
}
|
||||
|
||||
%PrepareFunctionForOptimization(foo);
|
||||
%PrepareFunctionForOptimization(main);
|
||||
main();
|
||||
main();
|
||||
%OptimizeFunctionOnNextCall(main);
|
||||
main();
|
Loading…
Reference in New Issue
Block a user