mirror of
https://github.com/nodejs/node.git
synced 2025-05-21 10:42:18 +00:00

PR-URL: https://github.com/nodejs/node/pull/28016 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
28 lines
520 B
JavaScript
28 lines
520 B
JavaScript
// Copyright 2014 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
|
|
'use strict';
|
|
function f24(deopt) {
|
|
let x = 1;
|
|
{
|
|
let x = 2;
|
|
{
|
|
let x = 3;
|
|
assertEquals(3, x);
|
|
}
|
|
deopt + 1;
|
|
assertEquals(2, x);
|
|
}
|
|
assertEquals(1, x);
|
|
}
|
|
|
|
|
|
%PrepareFunctionForOptimization(f24);
|
|
for (var j = 0; j < 10; ++j) {
|
|
f24(12);
|
|
}
|
|
%OptimizeFunctionOnNextCall(f24);
|
|
f24({});
|