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

Unified Diff: test/mjsunit/external-array.js

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 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/error-constructors.js ('k') | test/mjsunit/function-bind.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/external-array.js
===================================================================
--- test/mjsunit/external-array.js (revision 8618)
+++ test/mjsunit/external-array.js (working copy)
@@ -87,8 +87,10 @@
test_result_nan = [NaN, 0, 0, 0, 0, 0, 0, 0, NaN, NaN];
test_result_low_int = [-1, -1, 255, -1, 65535, -1, 0xFFFFFFFF, 0, -1, -1];
+test_result_low_double = [-1.25, -1, 255, -1, 65535, -1, 0xFFFFFFFF, 0, -1.25, -1.25];
test_result_middle = [253.75, -3, 253, 253, 253, 253, 253, 254, 253.75, 253.75];
test_result_high_int = [256, 0, 0, 256, 256, 256, 256, 255, 256, 256];
+test_result_high_double = [256.25, 0, 0, 256, 256, 256, 256, 255, 256.25, 256.25];
const kElementCount = 40;
@@ -120,15 +122,27 @@
return sum;
}
+function zero() {
+ return 0.0;
+}
-function test_store_middle_double(array, sum) {
+function test_store_middle_tagged(array, sum) {
array[0] = 253.75;
return array[0];
}
+function test_store_high_tagged(array, sum) {
+ array[0] = 256.25;
+ return array[0];
+}
+function test_store_middle_double(array, sum) {
+ array[0] = 253.75 + zero(); // + forces double type feedback
+ return array[0];
+}
+
function test_store_high_double(array, sum) {
- array[0] = 256.25;
+ array[0] = 256.25 + zero(); // + forces double type feedback
return array[0];
}
@@ -142,6 +156,16 @@
return array[0];
}
+function test_store_low_tagged(array, sum) {
+ array[0] = -1.25;
+ return array[0];
+}
+
+function test_store_low_double(array, sum) {
+ array[0] = -1.25 + zero(); // + forces double type feedback
+ return array[0];
+}
+
function test_store_high_int(array, sum) {
array[0] = 256;
return array[0];
@@ -168,7 +192,6 @@
for (var t = 0; t < types.length; t++) {
var type = types[t];
- print ("type = " + t);
var a = new type(kElementCount);
for (var i = 0; i < kElementCount; i++) {
a[i] = i;
@@ -180,9 +203,14 @@
run_test(test_store, a, 820 * kRuns);
run_test(test_store_const_key, a, 6 * kRuns);
run_test(test_store_low_int, a, test_result_low_int[t]);
+ run_test(test_store_low_double, a, test_result_low_double[t]);
+ run_test(test_store_low_tagged, a, test_result_low_double[t]);
run_test(test_store_high_int, a, test_result_high_int[t]);
run_test(test_store_nan, a, test_result_nan[t]);
run_test(test_store_middle_double, a, test_result_middle[t]);
+ run_test(test_store_middle_tagged, a, test_result_middle[t]);
+ run_test(test_store_high_double, a, test_result_high_double[t]);
+ run_test(test_store_high_tagged, a, test_result_high_double[t]);
// Test the correct behavior of the |length| property (which is read-only).
if (t != 0) {
« no previous file with comments | « test/mjsunit/error-constructors.js ('k') | test/mjsunit/function-bind.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698