| 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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 // There is only one shared stub for loading normalized | 1201 // There is only one shared stub for loading normalized |
| 1202 // properties. It does not traverse the prototype chain, so the | 1202 // properties. It does not traverse the prototype chain, so the |
| 1203 // property must be found in the object for the stub to be | 1203 // property must be found in the object for the stub to be |
| 1204 // applicable. | 1204 // applicable. |
| 1205 if (!object.is_identical_to(holder)) break; | 1205 if (!object.is_identical_to(holder)) break; |
| 1206 return isolate()->builtins()->LoadIC_Normal(); | 1206 return isolate()->builtins()->LoadIC_Normal(); |
| 1207 case CALLBACKS: { | 1207 case CALLBACKS: { |
| 1208 // Use simple field loads for some well-known callback properties. | 1208 // Use simple field loads for some well-known callback properties. |
| 1209 if (object->IsJSObject()) { | 1209 if (object->IsJSObject()) { |
| 1210 Handle<JSObject> receiver = Handle<JSObject>::cast(object); | 1210 Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
| 1211 Handle<Map> map(receiver->map()); | 1211 Handle<HeapType> type = IC::MapToType(handle(receiver->map())); |
| 1212 int object_offset; | 1212 int object_offset; |
| 1213 if (Accessors::IsJSObjectFieldAccessor(map, name, &object_offset)) { | 1213 if (Accessors::IsJSObjectFieldAccessor(type, name, &object_offset)) { |
| 1214 return SimpleFieldLoad(object_offset / kPointerSize); | 1214 return SimpleFieldLoad(object_offset / kPointerSize); |
| 1215 } | 1215 } |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 Handle<Object> callback(lookup->GetCallbackObject(), isolate()); | 1218 Handle<Object> callback(lookup->GetCallbackObject(), isolate()); |
| 1219 if (callback->IsExecutableAccessorInfo()) { | 1219 if (callback->IsExecutableAccessorInfo()) { |
| 1220 Handle<ExecutableAccessorInfo> info = | 1220 Handle<ExecutableAccessorInfo> info = |
| 1221 Handle<ExecutableAccessorInfo>::cast(callback); | 1221 Handle<ExecutableAccessorInfo>::cast(callback); |
| 1222 if (v8::ToCData<Address>(info->getter()) == 0) break; | 1222 if (v8::ToCData<Address>(info->getter()) == 0) break; |
| 1223 if (!info->IsCompatibleReceiver(*object)) break; | 1223 if (!info->IsCompatibleReceiver(*object)) break; |
| (...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3172 #undef ADDR | 3172 #undef ADDR |
| 3173 }; | 3173 }; |
| 3174 | 3174 |
| 3175 | 3175 |
| 3176 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3176 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 3177 return IC_utilities[id]; | 3177 return IC_utilities[id]; |
| 3178 } | 3178 } |
| 3179 | 3179 |
| 3180 | 3180 |
| 3181 } } // namespace v8::internal | 3181 } } // namespace v8::internal |
| OLD | NEW |