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 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1851 StrictModeFlag strict_mode, | 1851 StrictModeFlag strict_mode, |
1852 KeyedAccessGrowMode grow_mode) { | 1852 KeyedAccessGrowMode grow_mode) { |
1853 // Collect MONOMORPHIC stubs for all target_receiver_maps. | 1853 // Collect MONOMORPHIC stubs for all target_receiver_maps. |
1854 CodeHandleList handler_ics(receiver_maps->length()); | 1854 CodeHandleList handler_ics(receiver_maps->length()); |
1855 MapHandleList transitioned_maps(receiver_maps->length()); | 1855 MapHandleList transitioned_maps(receiver_maps->length()); |
1856 for (int i = 0; i < receiver_maps->length(); ++i) { | 1856 for (int i = 0; i < receiver_maps->length(); ++i) { |
1857 Handle<Map> receiver_map(receiver_maps->at(i)); | 1857 Handle<Map> receiver_map(receiver_maps->at(i)); |
1858 Handle<Code> cached_stub; | 1858 Handle<Code> cached_stub; |
1859 Handle<Map> transitioned_map = | 1859 Handle<Map> transitioned_map = |
1860 receiver_map->FindTransitionedMap(receiver_maps); | 1860 receiver_map->FindTransitionedMap(receiver_maps); |
| 1861 |
| 1862 // TODO(mvstanton): we should set the transitioned map to always be |
| 1863 // null, and quit doing transitions on key stores. Right now though |
| 1864 // if I do this there are some serious performance issues. |
| 1865 |
1861 if (!transitioned_map.is_null()) { | 1866 if (!transitioned_map.is_null()) { |
1862 cached_stub = ElementsTransitionAndStoreStub( | 1867 cached_stub = ElementsTransitionAndStoreStub( |
1863 receiver_map->elements_kind(), // original elements_kind | 1868 receiver_map->elements_kind(), // original elements_kind |
1864 transitioned_map->elements_kind(), | 1869 transitioned_map->elements_kind(), |
1865 receiver_map->instance_type() == JS_ARRAY_TYPE, // is_js_array | 1870 receiver_map->instance_type() == JS_ARRAY_TYPE, // is_js_array |
1866 strict_mode, grow_mode).GetCode(); | 1871 strict_mode, grow_mode).GetCode(); |
1867 } else { | 1872 } else { |
1868 cached_stub = ComputeMonomorphicStubWithoutMapCheck(receiver_map, | 1873 cached_stub = ComputeMonomorphicStubWithoutMapCheck(receiver_map, |
1869 strict_mode, | 1874 strict_mode, |
1870 grow_mode); | 1875 grow_mode); |
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2864 #undef ADDR | 2869 #undef ADDR |
2865 }; | 2870 }; |
2866 | 2871 |
2867 | 2872 |
2868 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2873 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2869 return IC_utilities[id]; | 2874 return IC_utilities[id]; |
2870 } | 2875 } |
2871 | 2876 |
2872 | 2877 |
2873 } } // namespace v8::internal | 2878 } } // namespace v8::internal |
OLD | NEW |