OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --allow-natives-syntax | 5 // Flags: --allow-natives-syntax |
6 | 6 |
7 function Migrator(o) { | 7 function Migrator(o) { |
8 return o.foo; | 8 return o.foo; |
9 } | 9 } |
10 function Loader(o) { | 10 function Loader(o) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 for (var i = 0; i < 3; i++) Loader(second_smi_array); | 47 for (var i = 0; i < 3; i++) Loader(second_smi_array); |
48 %OptimizeFunctionOnNextCall(Loader); | 48 %OptimizeFunctionOnNextCall(Loader); |
49 assertEquals("string", Loader(second_object_array)); | 49 assertEquals("string", Loader(second_object_array)); |
50 | 50 |
51 // Any of the following checks will also fail: | 51 // Any of the following checks will also fail: |
52 assertTrue(%HasFastObjectElements(second_object_array)); | 52 assertTrue(%HasFastObjectElements(second_object_array)); |
53 assertFalse(%HasFastSmiElements(second_object_array)); | 53 assertFalse(%HasFastSmiElements(second_object_array)); |
54 assertTrue(%HaveSameMap(first_object_array, second_object_array)); | 54 assertTrue(%HaveSameMap(first_object_array, second_object_array)); |
55 assertFalse(%HaveSameMap(first_smi_array, second_object_array)); | 55 assertFalse(%HaveSameMap(first_smi_array, second_object_array)); |
| 56 |
| 57 %ClearFunctionTypeFeedback(Loader); |
| 58 %ClearFunctionTypeFeedback(Migrator); |
OLD | NEW |