| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index d7621d12cf2ff1af6c02c36abd4c626b418eb612..a16a8ad42dd66bba96efbd40f1c8e6d5746b589e 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -11639,6 +11639,7 @@ static void ExternalArrayTestHelper(v8::ExternalArrayType array_type,
|
| CHECK_EQ(true, result->BooleanValue());
|
| }
|
|
|
| + #if 0
|
| // Test crankshaft external array loads
|
| for (int i = 0; i < kElementCount; i++) {
|
| array->set(i, static_cast<ElementType>(i));
|
| @@ -11700,6 +11701,28 @@ static void ExternalArrayTestHelper(v8::ExternalArrayType array_type,
|
| "}"
|
| "sum;");
|
| CHECK_EQ(16000000, result->Int32Value());
|
| +#endif
|
| +
|
| + // Test assignment to non integer values in crankshaft
|
| + result = CompileRun("function ee_store_non_int(sum) {"
|
| + " for (var i = 0; i < 40; ++i) {"
|
| + " ext_array[i] = 2.523;"
|
| + " sum += ext_array[i];"
|
| + " }"
|
| + " return sum;"
|
| + "}"
|
| + "sum=0;"
|
| + "for (var i=0;i<1000000;++i) {"
|
| + " sum = ee_store_non_int(sum);"
|
| + "}"
|
| + "sum;");
|
| + if (array_type == v8::kExternalPixelArray) {
|
| + CHECK_EQ(120000000, result->Int32Value());
|
| + } else if (array_type == v8::kExternalFloatArray) {
|
| + CHECK_EQ(100920000, result->Int32Value());
|
| + } else {
|
| + CHECK_EQ(80000000, result->Int32Value());
|
| + }
|
|
|
| result = CompileRun("ext_array[3] = 33;"
|
| "delete ext_array[3];"
|
|
|