mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 16:01:52 +00:00

This commit applies some secondary changes in order to make `make test` pass cleanly: * disable broken postmortem debugging in common.gypi * drop obsolete strict mode test in parallel/test-repl * drop obsolete test parallel/test-v8-features PR-URL: https://github.com/iojs/io.js/pull/1232 Reviewed-By: Fedor Indutny <fedor@indutny.com>
58 lines
1.2 KiB
JavaScript
58 lines
1.2 KiB
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: --use-osr
|
|
// TODO(titzer): enable --turbo-osr when nested OSR works.
|
|
|
|
function f1(a,b,c) {
|
|
var x = 0;
|
|
var y = 0;
|
|
var z = 0;
|
|
for (var i = 0; i < 2; i++) {
|
|
for (var j = 0; j < 2; j++) {
|
|
while (a > 0) { x += 19; a--; }
|
|
while (b > 0) { y += 23; b--; }
|
|
while (c > 0) { z += 29; c--; }
|
|
}
|
|
}
|
|
return x + y + z;
|
|
}
|
|
|
|
function f2(a,b,c) {
|
|
var x = 0;
|
|
var y = 0;
|
|
var z = 0;
|
|
for (var i = 0; i < 2; i++) {
|
|
for (var j = 0; j < 2; j++) {
|
|
while (a > 0) { x += 19; a--; }
|
|
while (b > 0) { y += 23; b--; }
|
|
while (c > 0) { z += 29; c--; }
|
|
}
|
|
}
|
|
return x + y + z;
|
|
}
|
|
|
|
|
|
function f3(a,b,c) {
|
|
var x = 0;
|
|
var y = 0;
|
|
var z = 0;
|
|
for (var i = 0; i < 2; i++) {
|
|
for (var j = 0; j < 2; j++) {
|
|
while (a > 0) { x += 19; a--; }
|
|
while (b > 0) { y += 23; b--; }
|
|
while (c > 0) { z += 29; c--; }
|
|
}
|
|
}
|
|
return x + y + z;
|
|
}
|
|
|
|
function check(f,a,b,c) {
|
|
assertEquals(a * 19 + b * 23 + c * 29, f(a,b,c));
|
|
}
|
|
|
|
check(f1, 50000, 5, 6);
|
|
check(f2, 4, 50000, 6);
|
|
check(f3, 11, 12, 50000);
|