Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: src/stub-cache.cc

Issue 19367003: Reland "Turn ElementsTransitionAndStore stub into a HydrogenCodeStub". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test case. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 receiver_map->FindTransitionedMap(receiver_maps); 1986 receiver_map->FindTransitionedMap(receiver_maps);
1987 1987
1988 // TODO(mvstanton): The code below is doing pessimistic elements 1988 // TODO(mvstanton): The code below is doing pessimistic elements
1989 // transitions. I would like to stop doing that and rely on Allocation Site 1989 // transitions. I would like to stop doing that and rely on Allocation Site
1990 // Tracking to do a better job of ensuring the data types are what they need 1990 // Tracking to do a better job of ensuring the data types are what they need
1991 // to be. Not all the elements are in place yet, pessimistic elements 1991 // to be. Not all the elements are in place yet, pessimistic elements
1992 // transitions are still important for performance. 1992 // transitions are still important for performance.
1993 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 1993 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
1994 ElementsKind elements_kind = receiver_map->elements_kind(); 1994 ElementsKind elements_kind = receiver_map->elements_kind();
1995 if (!transitioned_map.is_null()) { 1995 if (!transitioned_map.is_null()) {
1996 cached_stub = ElementsTransitionAndStoreStub( 1996 if (FLAG_compiled_transitions) {
1997 elements_kind, 1997 cached_stub = ElementsTransitionAndStoreStub(
1998 transitioned_map->elements_kind(), 1998 elements_kind,
1999 is_js_array, 1999 transitioned_map->elements_kind(),
2000 strict_mode(), 2000 is_js_array,
2001 store_mode_).GetCode(isolate()); 2001 store_mode_).GetCode(isolate());
2002 } else {
2003 // TODO(bmeurer) Remove this when compiled transitions is enabled
2004 cached_stub = ElementsTransitionAndStorePlatformStub(
2005 elements_kind,
2006 transitioned_map->elements_kind(),
2007 is_js_array,
2008 strict_mode(),
2009 store_mode_).GetCode(isolate());
2010 }
2002 } else { 2011 } else {
2003 if (FLAG_compiled_keyed_stores && 2012 if (FLAG_compiled_keyed_stores &&
2004 (receiver_map->has_fast_elements() || 2013 (receiver_map->has_fast_elements() ||
2005 receiver_map->has_external_array_elements())) { 2014 receiver_map->has_external_array_elements())) {
2006 cached_stub = KeyedStoreFastElementStub( 2015 cached_stub = KeyedStoreFastElementStub(
2007 is_js_array, 2016 is_js_array,
2008 elements_kind, 2017 elements_kind,
2009 store_mode_).GetCode(isolate()); 2018 store_mode_).GetCode(isolate());
2010 } else { 2019 } else {
2011 cached_stub = KeyedStoreElementStub( 2020 cached_stub = KeyedStoreElementStub(
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 Handle<FunctionTemplateInfo>( 2202 Handle<FunctionTemplateInfo>(
2194 FunctionTemplateInfo::cast(signature->receiver())); 2203 FunctionTemplateInfo::cast(signature->receiver()));
2195 } 2204 }
2196 } 2205 }
2197 2206
2198 is_simple_api_call_ = true; 2207 is_simple_api_call_ = true;
2199 } 2208 }
2200 2209
2201 2210
2202 } } // namespace v8::internal 2211 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698