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 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 StrictModeFlag strict_mode, | 1845 StrictModeFlag strict_mode, |
1846 KeyedAccessGrowMode grow_mode) { | 1846 KeyedAccessGrowMode grow_mode) { |
1847 // Collect MONOMORPHIC stubs for all target_receiver_maps. | 1847 // Collect MONOMORPHIC stubs for all target_receiver_maps. |
1848 CodeHandleList handler_ics(receiver_maps->length()); | 1848 CodeHandleList handler_ics(receiver_maps->length()); |
1849 MapHandleList transitioned_maps(receiver_maps->length()); | 1849 MapHandleList transitioned_maps(receiver_maps->length()); |
1850 for (int i = 0; i < receiver_maps->length(); ++i) { | 1850 for (int i = 0; i < receiver_maps->length(); ++i) { |
1851 Handle<Map> receiver_map(receiver_maps->at(i)); | 1851 Handle<Map> receiver_map(receiver_maps->at(i)); |
1852 Handle<Code> cached_stub; | 1852 Handle<Code> cached_stub; |
1853 Handle<Map> transitioned_map = | 1853 Handle<Map> transitioned_map = |
1854 receiver_map->FindTransitionedMap(receiver_maps); | 1854 receiver_map->FindTransitionedMap(receiver_maps); |
| 1855 |
| 1856 // TODO(mvstanton): The code below is doing pessimistic elements |
| 1857 // transitions. I would like to stop doing that and rely on Allocation Site |
| 1858 // Tracking to do a better job of ensuring the data types are what they need |
| 1859 // to be. Not all the elements are in place yet, pessimistic elements |
| 1860 // transitions are still important for performance. |
1855 if (!transitioned_map.is_null()) { | 1861 if (!transitioned_map.is_null()) { |
1856 cached_stub = ElementsTransitionAndStoreStub( | 1862 cached_stub = ElementsTransitionAndStoreStub( |
1857 receiver_map->elements_kind(), // original elements_kind | 1863 receiver_map->elements_kind(), // original elements_kind |
1858 transitioned_map->elements_kind(), | 1864 transitioned_map->elements_kind(), |
1859 receiver_map->instance_type() == JS_ARRAY_TYPE, // is_js_array | 1865 receiver_map->instance_type() == JS_ARRAY_TYPE, // is_js_array |
1860 strict_mode, grow_mode).GetCode(); | 1866 strict_mode, grow_mode).GetCode(); |
1861 } else { | 1867 } else { |
1862 cached_stub = ComputeMonomorphicStubWithoutMapCheck(receiver_map, | 1868 cached_stub = ComputeMonomorphicStubWithoutMapCheck(receiver_map, |
1863 strict_mode, | 1869 strict_mode, |
1864 grow_mode); | 1870 grow_mode); |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2860 #undef ADDR | 2866 #undef ADDR |
2861 }; | 2867 }; |
2862 | 2868 |
2863 | 2869 |
2864 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2870 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2865 return IC_utilities[id]; | 2871 return IC_utilities[id]; |
2866 } | 2872 } |
2867 | 2873 |
2868 | 2874 |
2869 } } // namespace v8::internal | 2875 } } // namespace v8::internal |
OLD | NEW |