Enable --smi-only-arrays flag in test case for no-snapshot build.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 29 Sep 2011 14:00:53 +0000 (14:00 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 29 Sep 2011 14:00:53 +0000 (14:00 +0000)
TEST=element-kind.js

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

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

test/mjsunit/element-kind.js

index 8c51210..d61e26a 100644 (file)
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// Flags: --allow-natives-syntax
-// Test element kind of objects
+// Flags: --allow-natives-syntax --smi-only-arrays
+// Test element kind of objects.
+// Since --smi-only-arrays affects builtins, its default setting at compile
+// time sticks if built with snapshot.  If --smi-only-arrays is deactivated
+// by default, only a no-snapshot build actually has smi-only arrays enabled
+// in this test case.  Depending on whether smi-only arrays are actually
+// enabled, this test takes the appropriate code path to check smi-only arrays.
+
 
 support_smi_only_arrays = %HasFastSmiOnlyElements([]);
 
+if (support_smi_only_arrays) {
+  print("Tests include smi-only arrays.");
+} else {
+  print("Tests do NOT include smi-only arrays.");
+}
+
 var element_kind = {
   fast_smi_only_elements            :  0,
   fast_elements                     :  1,