d7a8170d2d
Bug: v8:8801,v8:8394,v8:9183 Change-Id: If482c6a14f389d54c6ca3891aa7b8475f7a1fce1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1660617 Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Mythri Alle <mythria@chromium.org> Auto-Submit: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#62192}
34 lines
746 B
JavaScript
34 lines
746 B
JavaScript
// Copyright 2015 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
|
|
|
|
function k() { throw "e"; }
|
|
var a = true;
|
|
var a = false;
|
|
function foo(a) {
|
|
var i, j;
|
|
if (a) {
|
|
for (i = 0; i < 1; j++) ;
|
|
for (i = 0; i < 1; k()) ;
|
|
for (i = 0; i < 1; i++) ;
|
|
}
|
|
}
|
|
%PrepareFunctionForOptimization(foo);
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo();
|
|
|
|
function bar() {
|
|
var __v_45;
|
|
for (__v_45 = 0; __v_45 < 64; __v_63++) {
|
|
}
|
|
for (__v_45 = 0; __v_45 < 128; __v_36++) {
|
|
}
|
|
for (__v_45 = 128; __v_45 < 256; __v_45++) {
|
|
}
|
|
}
|
|
%PrepareFunctionForOptimization(bar);
|
|
%OptimizeFunctionOnNextCall(bar);
|
|
assertThrows(bar);
|