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

Unified Diff: test/mjsunit/osr-elements-kind.js

Issue 19776006: Fix %NeverOptimizeFunction runtime call. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add assert for safety. Created 7 years, 5 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 | « test/mjsunit/opt-elements-kind.js ('k') | test/mjsunit/regress/regress-1713b.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/osr-elements-kind.js
diff --git a/test/mjsunit/osr-elements-kind.js b/test/mjsunit/osr-elements-kind.js
index e59262e9754bb11c03f6767a3458450a97aa532b..6d3c8176afc91333ec354c0565d894f4ec342b3c 100644
--- a/test/mjsunit/osr-elements-kind.js
+++ b/test/mjsunit/osr-elements-kind.js
@@ -109,18 +109,19 @@ function assertKind(expected, obj, name_opt) {
}
// long-running loop forces OSR.
+%NeverOptimizeFunction(construct_smis);
+%NeverOptimizeFunction(construct_doubles);
+%NeverOptimizeFunction(convert_mixed);
for (var i = 0; i < 1000000; i++) { }
if (support_smi_only_arrays) {
function construct_smis() {
- %NeverOptimize();
var a = [0, 0, 0];
a[0] = 0; // Send the COW array map to the steak house.
assertKind(elements_kind.fast_smi_only, a);
return a;
}
function construct_doubles() {
- %NeverOptimize();
var a = construct_smis();
a[0] = 1.5;
assertKind(elements_kind.fast_double, a);
@@ -130,7 +131,6 @@ if (support_smi_only_arrays) {
// Test transition chain SMI->DOUBLE->FAST (crankshafted function will
// transition to FAST directly).
function convert_mixed(array, value, kind) {
- %NeverOptimize();
array[1] = value;
assertKind(kind, array);
assertEquals(value, array[1]);
« no previous file with comments | « test/mjsunit/opt-elements-kind.js ('k') | test/mjsunit/regress/regress-1713b.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698