 Chromium Code Reviews
 Chromium Code Reviews Issue 11817017:
  Additional work to get array literal allocation tracking working, even with --always-opt  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 11817017:
  Additional work to get array literal allocation tracking working, even with --always-opt  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| 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): we should set the transitioned map to always be | |
| 
Toon Verwaest
2013/01/16 10:53:42
Should probably clarify that we are talking about
 
mvstanton
2013/01/16 13:01:56
Done.
 | |
| 1857 // null, and quit doing transitions on key stores. Right now though | |
| 1858 // if I do this there are some serious performance issues. | |
| 1859 | |
| 1855 if (!transitioned_map.is_null()) { | 1860 if (!transitioned_map.is_null()) { | 
| 1856 cached_stub = ElementsTransitionAndStoreStub( | 1861 cached_stub = ElementsTransitionAndStoreStub( | 
| 1857 receiver_map->elements_kind(), // original elements_kind | 1862 receiver_map->elements_kind(), // original elements_kind | 
| 1858 transitioned_map->elements_kind(), | 1863 transitioned_map->elements_kind(), | 
| 1859 receiver_map->instance_type() == JS_ARRAY_TYPE, // is_js_array | 1864 receiver_map->instance_type() == JS_ARRAY_TYPE, // is_js_array | 
| 1860 strict_mode, grow_mode).GetCode(); | 1865 strict_mode, grow_mode).GetCode(); | 
| 1861 } else { | 1866 } else { | 
| 1862 cached_stub = ComputeMonomorphicStubWithoutMapCheck(receiver_map, | 1867 cached_stub = ComputeMonomorphicStubWithoutMapCheck(receiver_map, | 
| 1863 strict_mode, | 1868 strict_mode, | 
| 1864 grow_mode); | 1869 grow_mode); | 
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2860 #undef ADDR | 2865 #undef ADDR | 
| 2861 }; | 2866 }; | 
| 2862 | 2867 | 
| 2863 | 2868 | 
| 2864 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2869 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 
| 2865 return IC_utilities[id]; | 2870 return IC_utilities[id]; | 
| 2866 } | 2871 } | 
| 2867 | 2872 | 
| 2868 | 2873 | 
| 2869 } } // namespace v8::internal | 2874 } } // namespace v8::internal | 
| OLD | NEW |