Fix polymorphic array test
authordanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 8 Jul 2011 10:59:20 +0000 (10:59 +0000)
committerdanno@chromium.org <danno@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 8 Jul 2011 10:59:20 +0000 (10:59 +0000)
R=jkummerow@chromium.org
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7326009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/mjsunit/polymorph-arrays.js

index 76fd89853c5a65a7c465b4926724fc03a40524bf..ff0c433bd76a398b1679ebe51437365735495074 100644 (file)
@@ -56,6 +56,11 @@ function testPolymorphicLoads() {
     init_sparse_array(sparse_object_array);
     init_sparse_array(sparse_js_array);
 
+    assertEquals(1, load(object_array, 1));
+    assertEquals(1, load(js_array, 1));
+    assertEquals(1, load(sparse_object_array, 1));
+    assertEquals(1, load(sparse_js_array, 1));
+
     return load;
   }
 
@@ -69,16 +74,6 @@ function testPolymorphicLoads() {
   init_sparse_array(sparse_object_array);
   init_sparse_array(sparse_js_array);
 
-  // load() should now use polymorphic element loads.
-  load = make_polymorphic_load_function();
-  assertEquals(1, load(object_array, 1));
-  load = make_polymorphic_load_function();
-  assertEquals(1, load(js_array, 1));
-  load = make_polymorphic_load_function();
-  assertEquals(1, load(sparse_object_array, 1));
-  load = make_polymorphic_load_function();
-  assertEquals(1, load(sparse_js_array, 1));
-
   load = make_polymorphic_load_function();
   assertEquals(undefined, load(js_array, new Object()));
   load = make_polymorphic_load_function();