Chromium Code Reviews| Index: test/mjsunit/elements-kind.js |
| diff --git a/test/mjsunit/elements-kind.js b/test/mjsunit/elements-kind.js |
| index e5b5a66c44eba60951c683717d71577b796717e3..40a8d69f77258aff397d13692127b6a115da8bed 100644 |
| --- a/test/mjsunit/elements-kind.js |
| +++ b/test/mjsunit/elements-kind.js |
| @@ -39,9 +39,19 @@ support_smi_only_arrays = %HasFastSmiOnlyElements([1,2,3,4,5,6,7,8,9,10]); |
| if (support_smi_only_arrays) { |
| print("Tests include smi-only arrays."); |
| } else { |
| - print("Tests do NOT include smi-only arrays."); |
|
Jakob Kummerow
2012/01/04 20:55:17
intentional removal?
|
| + print("Tests do NOT include smi-only."); |
| } |
| +// Ensure that there is a global bais for not aggressively transitioning Arrays |
|
Jakob Kummerow
2012/01/04 20:55:17
suggestion: "Ensure that Arrays default to SMI_ONL
|
| +// to FAST_ELEMENTs. |
| +// TODO(danno): Remove this code when bias for early ElementsKind transition is |
| +// tracked per allocation site and not globally. |
| +[1,2,3][0] = 1.5; |
| +[1,2,3][0] = 1.5; |
| +[1,2,3][0] = 1.5; |
| +[1,2,3][0] = 1.5; |
| +[1,2,3][0] = 1.5; |
| + |
| var elements_kind = { |
| fast_smi_only : 'fast smi only elements', |
| fast : 'fast elements', |
| @@ -115,7 +125,7 @@ too.drink = 0xC0C0A; |
| assertKind(elements_kind.fast_smi_only, too); |
| // Make sure the element kind transitions from smionly when a non-smi is stored. |
| -var you = new Array(); |
| +var you = new Array(1); |
| assertKind(elements_kind.fast_smi_only, you); |
| for (var i = 0; i < 1337; i++) { |
| var val = i; |