Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Unified Diff: test/mjsunit/compiler/osr-alignment.js

Issue 913463002: Reduce the number of iterations in some OSR tests by using an explicit %OptimizeOsr(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/osr-nested2.js » ('j') | test/mjsunit/regress/regress-1145.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/osr-alignment.js
diff --git a/test/mjsunit/compiler/osr-alignment.js b/test/mjsunit/compiler/osr-alignment.js
index b1fd702aa3a7dd038413cb4967437cb15d823c46..085d6c4d689b5d93b442c7ff5feba9eccf77d92f 100644
--- a/test/mjsunit/compiler/osr-alignment.js
+++ b/test/mjsunit/compiler/osr-alignment.js
@@ -25,37 +25,40 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --use-osr --turbo-osr
+// Flags: --allow-natives-syntax --use-osr --turbo-osr
function f1() {
var sum = 0;
- for (var i = 0; i < 1000000; i++) {
+ for (var i = 0; i < 1000; i++) {
var x = i + 2;
var y = x + 5;
var z = y + 3;
sum += z;
+ if (i == 18) %OptimizeOsr();
}
return sum;
}
function f2() {
var sum = 0;
- for (var i = 0; i < 1000000; i++) {
+ for (var i = 0; i < 1000; i++) {
var x = i + 2;
var y = x + 5;
var z = y + 3;
sum += z;
+ if (i == 19) %OptimizeOsr();
}
return sum;
}
function f3() {
var sum = 0;
- for (var i = 0; i < 1000000; i++) {
+ for (var i = 0; i < 1000; i++) {
var x = i + 2;
var y = x + 5;
var z = y + 3;
sum += z;
+ if (i == 20) %OptimizeOsr();
}
return sum;
}
@@ -63,21 +66,21 @@ function f3() {
function test1() {
var j = 11;
for (var i = 0; i < 2; i++) {
- assertEquals(500009500000, f1());
+ assertEquals(509500, f1());
}
}
function test2() {
for (var i = 0; i < 2; i++) {
var j = 11, k = 12;
- assertEquals(500009500000, f2());
+ assertEquals(509500, f2());
}
}
function test3() {
for (var i = 0; i < 2; i++) {
var j = 11, k = 13, m = 14;
- assertEquals(500009500000, f3());
+ assertEquals(509500, f3());
}
}
« no previous file with comments | « no previous file | test/mjsunit/compiler/osr-nested2.js » ('j') | test/mjsunit/regress/regress-1145.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698