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

Unified Diff: test/mjsunit/regress/external-and-normal-array-polymorphim.js

Issue 12987014: Fix store_mode bug involving polymorphism with external and JS arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/ic.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/external-and-normal-array-polymorphim.js
diff --git a/test/mjsunit/copy-on-write-assert.js b/test/mjsunit/regress/external-and-normal-array-polymorphim.js
similarity index 81%
copy from test/mjsunit/copy-on-write-assert.js
copy to test/mjsunit/regress/external-and-normal-array-polymorphim.js
index 0e78c77befe4c4794446923c0bcf45df27c6fbac..59fada413c6f4c0e489b13d746a768d5cdac3d9e 100644
--- a/test/mjsunit/copy-on-write-assert.js
+++ b/test/mjsunit/regress/external-and-normal-array-polymorphim.js
@@ -25,18 +25,26 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-function createLargeCOWArray() {
- var s = "[0";
- // The constant below depends on the max object size in new space.
- for (var i = 0; i < (128 << 10); i++) {
- s += ",0";
+// Flags: --compiled_keyed_stores --compiled_transitions
+
+function store_generator(compare) {
+ return function(a,i,v) {
+ a[i] = v;
+ assertEquals(compare, a[i]);
+ assertEquals(compare, a[i]);
}
- s += "]";
- return eval(s);
}
-var large_cow_array = createLargeCOWArray();
+f = store_generator(5);
+a = [0,0,0];
+f(a,0,5);
+a = [0,0,0];
+f(a,1,5);
+a = [0,0,0];
+f(a,2,5);
-// Force copy. Because the array is large it will test the slow array
-// cloning in large object space.
-large_cow_array[17] = 42;
+f = store_generator(5.5);
+a = new Float32Array(5);
+f(a,0,5.5);
+f(a,1,5.5);
+f(a,2,5.5);
« no previous file with comments | « src/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698