| 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 Infinity, | 345 Infinity, |
| 346 -Infinity, | 346 -Infinity, |
| 347 expected_array_value(7)); | 347 expected_array_value(7)); |
| 348 | 348 |
| 349 assertTrue(%GetOptimizationStatus(test_various_stores) != 2); | 349 assertTrue(%GetOptimizationStatus(test_various_stores) != 2); |
| 350 | 350 |
| 351 // Make sure that we haven't converted from fast double. | 351 // Make sure that we haven't converted from fast double. |
| 352 assertTrue(%HasFastDoubleElements(large_array)); | 352 assertTrue(%HasFastDoubleElements(large_array)); |
| 353 } | 353 } |
| 354 | 354 |
| 355 // Force gc here to start with a clean heap if we repeat this test multiple |
| 356 // times. |
| 357 gc(); |
| 355 testOneArrayType(make_object_like_array); | 358 testOneArrayType(make_object_like_array); |
| 356 testOneArrayType(Array); | 359 testOneArrayType(Array); |
| 357 | 360 |
| 358 var large_array = new Array(large_array_size); | 361 var large_array = new Array(large_array_size); |
| 359 force_to_fast_double_array(large_array); | 362 force_to_fast_double_array(large_array); |
| 360 assertTrue(%HasFastDoubleElements(large_array)); | 363 assertTrue(%HasFastDoubleElements(large_array)); |
| 361 | 364 |
| 362 // Cause the array to grow beyond it's JSArray length. This will double the | 365 // Cause the array to grow beyond it's JSArray length. This will double the |
| 363 // size of the capacity and force the array into "slow" dictionary case. | 366 // size of the capacity and force the array into "slow" dictionary case. |
| 364 large_array[5] = Infinity; | 367 large_array[5] = Infinity; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 assertEquals(expected_array_value(2), large_array4[2]); | 543 assertEquals(expected_array_value(2), large_array4[2]); |
| 541 } | 544 } |
| 542 | 545 |
| 543 test_setter(); | 546 test_setter(); |
| 544 test_setter(); | 547 test_setter(); |
| 545 test_setter(); | 548 test_setter(); |
| 546 %OptimizeFunctionOnNextCall(test_setter); | 549 %OptimizeFunctionOnNextCall(test_setter); |
| 547 test_setter(); | 550 test_setter(); |
| 548 test_setter(); | 551 test_setter(); |
| 549 test_setter(); | 552 test_setter(); |
| OLD | NEW |