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

Side by Side Diff: src/ic.cc

Issue 23549019: store ics for js api accessors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: no snprintf Created 7 years, 3 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/ia32/stub-cache-ia32.cc ('k') | src/stub-cache.h » ('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 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 if (!holder->HasFastProperties()) break; 1824 if (!holder->HasFastProperties()) break;
1825 if (!info->IsCompatibleReceiver(*receiver)) break; 1825 if (!info->IsCompatibleReceiver(*receiver)) break;
1826 return isolate()->stub_cache()->ComputeStoreCallback( 1826 return isolate()->stub_cache()->ComputeStoreCallback(
1827 name, receiver, holder, info, strict_mode); 1827 name, receiver, holder, info, strict_mode);
1828 } else if (callback->IsAccessorPair()) { 1828 } else if (callback->IsAccessorPair()) {
1829 Handle<Object> setter( 1829 Handle<Object> setter(
1830 Handle<AccessorPair>::cast(callback)->setter(), isolate()); 1830 Handle<AccessorPair>::cast(callback)->setter(), isolate());
1831 if (!setter->IsJSFunction()) break; 1831 if (!setter->IsJSFunction()) break;
1832 if (holder->IsGlobalObject()) break; 1832 if (holder->IsGlobalObject()) break;
1833 if (!holder->HasFastProperties()) break; 1833 if (!holder->HasFastProperties()) break;
1834 Handle<JSFunction> function = Handle<JSFunction>::cast(setter);
1835 CallOptimization call_optimization(function);
1836 if (call_optimization.is_simple_api_call() &&
1837 call_optimization.IsCompatibleReceiver(*receiver)) {
1838 return isolate()->stub_cache()->ComputeStoreCallback(
1839 name, receiver, holder, call_optimization, strict_mode);
1840 }
1834 return isolate()->stub_cache()->ComputeStoreViaSetter( 1841 return isolate()->stub_cache()->ComputeStoreViaSetter(
1835 name, receiver, holder, Handle<JSFunction>::cast(setter), 1842 name, receiver, holder, Handle<JSFunction>::cast(setter),
1836 strict_mode); 1843 strict_mode);
1837 } 1844 }
1838 // TODO(dcarney): Handle correctly. 1845 // TODO(dcarney): Handle correctly.
1839 if (callback->IsDeclaredAccessorInfo()) break; 1846 if (callback->IsDeclaredAccessorInfo()) break;
1840 ASSERT(callback->IsForeign()); 1847 ASSERT(callback->IsForeign());
1841 // No IC support for old-style native accessors. 1848 // No IC support for old-style native accessors.
1842 break; 1849 break;
1843 } 1850 }
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
3129 #undef ADDR 3136 #undef ADDR
3130 }; 3137 };
3131 3138
3132 3139
3133 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3140 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3134 return IC_utilities[id]; 3141 return IC_utilities[id];
3135 } 3142 }
3136 3143
3137 3144
3138 } } // namespace v8::internal 3145 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698