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/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 Handle<JSObject> holder = receiver; | 1199 Handle<JSObject> holder = receiver; |
1200 receiver->Lookup(name, lookup); | 1200 receiver->Lookup(name, lookup); |
1201 if (lookup->IsFound()) { | 1201 if (lookup->IsFound()) { |
1202 if (lookup->IsInterceptor() && !HasInterceptorSetter(lookup->holder())) { | 1202 if (lookup->IsInterceptor() && !HasInterceptorSetter(lookup->holder())) { |
1203 receiver->LookupOwnRealNamedProperty(name, lookup); | 1203 receiver->LookupOwnRealNamedProperty(name, lookup); |
1204 if (!lookup->IsFound()) return false; | 1204 if (!lookup->IsFound()) return false; |
1205 } | 1205 } |
1206 | 1206 |
1207 if (lookup->IsReadOnly() || !lookup->IsCacheable()) return false; | 1207 if (lookup->IsReadOnly() || !lookup->IsCacheable()) return false; |
1208 if (lookup->holder() == *receiver) return lookup->CanHoldValue(value); | 1208 if (lookup->holder() == *receiver) return lookup->CanHoldValue(value); |
1209 if (lookup->IsPropertyCallbacks() && | 1209 if (lookup->IsPropertyCallbacks()) return true; |
1210 !lookup->GetCallbackObject()->IsExecutableAccessorInfo()) | |
1211 return true; | |
1212 // JSGlobalProxy either stores on the global object in the prototype, or | 1210 // JSGlobalProxy either stores on the global object in the prototype, or |
1213 // goes into the runtime if access checks are needed, so this is always | 1211 // goes into the runtime if access checks are needed, so this is always |
1214 // safe. | 1212 // safe. |
1215 if (receiver->IsJSGlobalProxy()) { | 1213 if (receiver->IsJSGlobalProxy()) { |
1216 return lookup->holder() == receiver->GetPrototype(); | 1214 return lookup->holder() == receiver->GetPrototype(); |
1217 } | 1215 } |
1218 // Currently normal holders in the prototype chain are not supported. They | 1216 // Currently normal holders in the prototype chain are not supported. They |
1219 // would require a runtime positive lookup and verification that the details | 1217 // would require a runtime positive lookup and verification that the details |
1220 // have not changed. | 1218 // have not changed. |
1221 if (lookup->IsInterceptor() || lookup->IsNormal()) return false; | 1219 if (lookup->IsInterceptor() || lookup->IsNormal()) return false; |
(...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3076 #undef ADDR | 3074 #undef ADDR |
3077 }; | 3075 }; |
3078 | 3076 |
3079 | 3077 |
3080 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3078 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
3081 return IC_utilities[id]; | 3079 return IC_utilities[id]; |
3082 } | 3080 } |
3083 | 3081 |
3084 | 3082 |
3085 } } // namespace v8::internal | 3083 } } // namespace v8::internal |
OLD | NEW |