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

Unified Diff: test/cctest/test-api.cc

Issue 6528013: Implement crankshaft support for pixel array stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 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 | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index ded42b4b2ece73b907a841540d58665152ec3079..41cdb4c9c73b617a464ded994fb4a8151e2cca03 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -10790,6 +10790,24 @@ THREADED_TEST(PixelArray) {
"result");
CHECK_EQ(32640, result->Int32Value());
+ // Make sure that pixel array stores are optimized by crankshaft.
+ result = CompileRun("function pa_init(p) {"
+ "for (var i = 0; i < 256; ++i) { p[i] = i; }"
+ "}"
+ "function pa_load(p) {"
+ " var sum = 0;"
+ " for (var i=0; i<256; ++i) {"
+ " sum += p[i];"
+ " }"
+ " return sum; "
+ "}"
+ "for (var i = 0; i < 100000; ++i) {"
+ " pa_init(pixels);"
+ "}"
+ "result = pa_load(pixels);"
+ "result");
+ CHECK_EQ(32640, result->Int32Value());
+
free(pixel_data);
}
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698