OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 break; | 1664 break; |
1665 } | 1665 } |
1666 Handle<Object> accessors = lookup->GetAccessors(); | 1666 Handle<Object> accessors = lookup->GetAccessors(); |
1667 if (accessors->IsExecutableAccessorInfo()) { | 1667 if (accessors->IsExecutableAccessorInfo()) { |
1668 Handle<ExecutableAccessorInfo> info = | 1668 Handle<ExecutableAccessorInfo> info = |
1669 Handle<ExecutableAccessorInfo>::cast(accessors); | 1669 Handle<ExecutableAccessorInfo>::cast(accessors); |
1670 if (v8::ToCData<Address>(info->setter()) == 0) { | 1670 if (v8::ToCData<Address>(info->setter()) == 0) { |
1671 TRACE_GENERIC_IC(isolate(), "StoreIC", "setter == 0"); | 1671 TRACE_GENERIC_IC(isolate(), "StoreIC", "setter == 0"); |
1672 break; | 1672 break; |
1673 } | 1673 } |
| 1674 if (AccessorInfo::cast(*accessors)->is_special_data_property() && |
| 1675 !lookup->HolderIsReceiverOrHiddenPrototype()) { |
| 1676 TRACE_GENERIC_IC(isolate(), "StoreIC", |
| 1677 "special data property in prototype chain"); |
| 1678 break; |
| 1679 } |
1674 if (!ExecutableAccessorInfo::IsCompatibleReceiverMap(isolate(), info, | 1680 if (!ExecutableAccessorInfo::IsCompatibleReceiverMap(isolate(), info, |
1675 receiver_map())) { | 1681 receiver_map())) { |
1676 TRACE_GENERIC_IC(isolate(), "StoreIC", "incompatible receiver type"); | 1682 TRACE_GENERIC_IC(isolate(), "StoreIC", "incompatible receiver type"); |
1677 break; | 1683 break; |
1678 } | 1684 } |
1679 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); | 1685 NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); |
1680 return compiler.CompileStoreCallback(receiver, lookup->name(), info); | 1686 return compiler.CompileStoreCallback(receiver, lookup->name(), info); |
1681 } else if (accessors->IsAccessorPair()) { | 1687 } else if (accessors->IsAccessorPair()) { |
1682 Handle<Object> setter(Handle<AccessorPair>::cast(accessors)->setter(), | 1688 Handle<Object> setter(Handle<AccessorPair>::cast(accessors)->setter(), |
1683 isolate()); | 1689 isolate()); |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2905 static const Address IC_utilities[] = { | 2911 static const Address IC_utilities[] = { |
2906 #define ADDR(name) FUNCTION_ADDR(name), | 2912 #define ADDR(name) FUNCTION_ADDR(name), |
2907 IC_UTIL_LIST(ADDR) NULL | 2913 IC_UTIL_LIST(ADDR) NULL |
2908 #undef ADDR | 2914 #undef ADDR |
2909 }; | 2915 }; |
2910 | 2916 |
2911 | 2917 |
2912 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 2918 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
2913 } | 2919 } |
2914 } // namespace v8::internal | 2920 } // namespace v8::internal |
OLD | NEW |