d2bf7ea55b
OSR for functions which use arguments no longer needs to be disabled, since TurboFan handles the case. Bug: Change-Id: I121f1190a142c18f113bd5f875e258812645c43f Reviewed-on: https://chromium-review.googlesource.com/721661 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#48631}
18 lines
449 B
JavaScript
18 lines
449 B
JavaScript
// Copyright 2017 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 f1() {
|
|
var sum = 0;
|
|
for (var i = 0; i < 1000; i++) {
|
|
sum += arguments[0] + arguments[1] + arguments[2] + arguments[3];
|
|
if (i == 18) %OptimizeOsr();
|
|
}
|
|
return sum;
|
|
}
|
|
|
|
let result = f1(1, 1, 2, 3);
|
|
assertEquals(7000, result);
|