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

Unified Diff: tests/standalone/float_array_test.dart

Issue 11092090: Inline indexed load and store of typed array float64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/float_array_test.dart
===================================================================
--- tests/standalone/float_array_test.dart (revision 13666)
+++ tests/standalone/float_array_test.dart (working copy)
@@ -177,20 +177,39 @@
});
}
+storeIt32(Float32List a, int index, value) {
+ a[index] = value;
+}
+
+storeIt64(Float64List a, int index, value) {
+ a[index] = value;
+}
+
main() {
+ var a32 = new Float32List(5);
for (int i = 0; i < 2000; i++) {
testCreateFloat32Array();
testSetRange32();
testIndexOutOfRange32();
testIndexOf32();
+ storeIt32(a32, 1, 2.0);
}
+ var a64 = new Float64List(5);
for (int i = 0; i < 2000; i++) {
testCreateFloat64Array();
testSetRange64();
testIndexOutOfRange64();
testIndexOf64();
+ storeIt64(a64, 1, 2.0);
}
// These two take a long time in checked mode.
testBadValues32();
testBadValues64();
+ // Check optimized (inlined) version of []=
+ Expect.throws(() {
+ storeIt32(a32, 1, 2);
+ });
+ Expect.throws(() {
+ storeIt64(a64, 1, 2);
+ });
}
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698