7dcd046699
Bug: chromium:734162, chromium:734051, v8:6211 Change-Id: I5c3e7578e9278b8f19ff16ad4d963f490dcc6c8c Reviewed-on: https://chromium-review.googlesource.com/541415 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#46033}
49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
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.
|
|
|
|
|
|
(function TestSmi() {
|
|
var v_0 = {};
|
|
function f_0(constructor, closure) {
|
|
var v_2 = { value: 0 };
|
|
v_4 = closure(constructor, 1073741823, v_0, v_2);
|
|
assertEquals(1, v_2.value);
|
|
}
|
|
function f_1(constructor, val, deopt, v_2) {
|
|
if (!new constructor(val, deopt, v_2)) {
|
|
}
|
|
}
|
|
function f_10(constructor) {
|
|
f_0(constructor, f_1);
|
|
f_0(constructor, f_1);
|
|
f_0(constructor, f_1);
|
|
}
|
|
function f_12(val, deopt, v_2) {
|
|
v_2.value++;
|
|
}
|
|
f_10(f_12);
|
|
})();
|
|
|
|
(function TestHeapNumber() {
|
|
var v_0 = {};
|
|
function f_0(constructor, closure) {
|
|
var v_2 = { value: 1.5 };
|
|
v_4 = closure(constructor, 1073741823, v_0, v_2);
|
|
assertEquals(2.5, v_2.value);
|
|
}
|
|
function f_1(constructor, val, deopt, v_2) {
|
|
if (!new constructor(val, deopt, v_2)) {
|
|
}
|
|
}
|
|
function f_10(constructor) {
|
|
f_0(constructor, f_1);
|
|
f_0(constructor, f_1);
|
|
f_0(constructor, f_1);
|
|
}
|
|
function f_12(val, deopt, v_2) {
|
|
v_2.value++;
|
|
}
|
|
f_10(f_12);
|
|
})();
|