v8/test/mjsunit/regress/regress-recurse-patch-binary-op.js
verwaest f1cc6e646f Check the state of the current binary op IC before patching smi code
Between the miss and patching, we run user code. That may already patch the same code. IC refactoring broke this (again), so including a regression test this time around.

BUG=chromium:601392
LOG=n

Review URL: https://codereview.chromium.org/1925583002

Cr-Commit-Position: refs/heads/master@{#35811}
2016-04-27 09:19:15 +00:00

11 lines
263 B
JavaScript

// Copyright 2016 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.
var i = 0
function valueOf() {
while (true) return i++ < 4 ? 1 + this : 2
}
1 + ({valueOf})