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 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |