e56faa9909
This is a cutdown version of https://codereview.chromium.org/346473002/, which aimed to fix f.call and f.apply. Optimized f.call was removed by r21887, this is what was left. BUG=386034 LOG=N R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/348623002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
20 lines
409 B
JavaScript
20 lines
409 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
|
|
|
|
function f(x) {
|
|
var v = x;
|
|
for (i = 0; i < 1; i++) {
|
|
v.apply(this, arguments);
|
|
}
|
|
}
|
|
|
|
function g() {}
|
|
|
|
f(g);
|
|
f(g);
|
|
%OptimizeFunctionOnNextCall(f);
|
|
assertThrows(function() { f('----'); }, TypeError);
|