| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 // Flags: --allow-natives-syntax --expose-gc | 28 // Flags: --allow-natives-syntax --expose-gc |
| 29 // Flags: --noalways-opt | 29 // Flags: --noalways-opt |
| 30 | 30 |
| 31 // Test element kind of objects. | 31 // Test element kind of objects. |
| 32 | 32 |
| 33 if (!%HasAllocationSiteTransitioning()) { |
| 34 quit(); |
| 35 } |
| 36 |
| 33 var elements_kind = { | 37 var elements_kind = { |
| 34 fast_smi_only : 'fast smi only elements', | 38 fast_smi_only : 'fast smi only elements', |
| 35 fast : 'fast elements', | 39 fast : 'fast elements', |
| 36 fast_double : 'fast double elements', | 40 fast_double : 'fast double elements', |
| 37 dictionary : 'dictionary elements', | 41 dictionary : 'dictionary elements', |
| 38 external_byte : 'external byte elements', | 42 external_byte : 'external byte elements', |
| 39 external_unsigned_byte : 'external unsigned byte elements', | 43 external_unsigned_byte : 'external unsigned byte elements', |
| 40 external_short : 'external short elements', | 44 external_short : 'external short elements', |
| 41 external_unsigned_short : 'external unsigned short elements', | 45 external_unsigned_short : 'external unsigned short elements', |
| 42 external_int : 'external int elements', | 46 external_int : 'external int elements', |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 a = bar(100); | 214 a = bar(100); |
| 211 assertTrue(isHoley(a)); | 215 assertTrue(isHoley(a)); |
| 212 a = bar(0); | 216 a = bar(0); |
| 213 assertOptimized(bar); | 217 assertOptimized(bar); |
| 214 // Crankshafted functions don't use mementos, so feedback still | 218 // Crankshafted functions don't use mementos, so feedback still |
| 215 // indicates a packed array is desired. (unless --nocrankshaft is in use). | 219 // indicates a packed array is desired. (unless --nocrankshaft is in use). |
| 216 if (4 != %GetOptimizationStatus(bar)) { | 220 if (4 != %GetOptimizationStatus(bar)) { |
| 217 assertFalse(isHoley(a)); | 221 assertFalse(isHoley(a)); |
| 218 } | 222 } |
| 219 })(); | 223 })(); |
| OLD | NEW |