summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/regress/regress-3741.js
blob: fe5bc05f17221a93b9617a33136b4fb33d036911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 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({});