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 1974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1985 receiver_map->FindTransitionedMap(receiver_maps); | 1985 receiver_map->FindTransitionedMap(receiver_maps); |
1986 | 1986 |
1987 // TODO(mvstanton): The code below is doing pessimistic elements | 1987 // TODO(mvstanton): The code below is doing pessimistic elements |
1988 // transitions. I would like to stop doing that and rely on Allocation Site | 1988 // transitions. I would like to stop doing that and rely on Allocation Site |
1989 // Tracking to do a better job of ensuring the data types are what they need | 1989 // Tracking to do a better job of ensuring the data types are what they need |
1990 // to be. Not all the elements are in place yet, pessimistic elements | 1990 // to be. Not all the elements are in place yet, pessimistic elements |
1991 // transitions are still important for performance. | 1991 // transitions are still important for performance. |
1992 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; | 1992 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; |
1993 ElementsKind elements_kind = receiver_map->elements_kind(); | 1993 ElementsKind elements_kind = receiver_map->elements_kind(); |
1994 if (!transitioned_map.is_null()) { | 1994 if (!transitioned_map.is_null()) { |
1995 if (FLAG_compiled_transitions) { | 1995 cached_stub = ElementsTransitionAndStoreStub( |
1996 cached_stub = ElementsTransitionAndStoreStub( | 1996 elements_kind, |
1997 elements_kind, | 1997 transitioned_map->elements_kind(), |
1998 transitioned_map->elements_kind(), | 1998 is_js_array, |
1999 is_js_array, | 1999 store_mode_).GetCode(isolate()); |
2000 store_mode_).GetCode(isolate()); | |
2001 } else { | |
2002 // TODO(bmeurer) Remove this when compiled transitions is enabled | |
2003 cached_stub = ElementsTransitionAndStorePlatformStub( | |
2004 elements_kind, | |
2005 transitioned_map->elements_kind(), | |
2006 is_js_array, | |
2007 strict_mode(), | |
2008 store_mode_).GetCode(isolate()); | |
2009 } | |
2010 } else { | 2000 } else { |
2011 if (FLAG_compiled_keyed_stores && | 2001 if (FLAG_compiled_keyed_stores && |
2012 (receiver_map->has_fast_elements() || | 2002 (receiver_map->has_fast_elements() || |
2013 receiver_map->has_external_array_elements())) { | 2003 receiver_map->has_external_array_elements())) { |
2014 cached_stub = KeyedStoreFastElementStub( | 2004 cached_stub = KeyedStoreFastElementStub( |
2015 is_js_array, | 2005 is_js_array, |
2016 elements_kind, | 2006 elements_kind, |
2017 store_mode_).GetCode(isolate()); | 2007 store_mode_).GetCode(isolate()); |
2018 } else { | 2008 } else { |
2019 cached_stub = KeyedStoreElementStub( | 2009 cached_stub = KeyedStoreElementStub( |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2201 Handle<FunctionTemplateInfo>( | 2191 Handle<FunctionTemplateInfo>( |
2202 FunctionTemplateInfo::cast(signature->receiver())); | 2192 FunctionTemplateInfo::cast(signature->receiver())); |
2203 } | 2193 } |
2204 } | 2194 } |
2205 | 2195 |
2206 is_simple_api_call_ = true; | 2196 is_simple_api_call_ = true; |
2207 } | 2197 } |
2208 | 2198 |
2209 | 2199 |
2210 } } // namespace v8::internal | 2200 } } // namespace v8::internal |
OLD | NEW |