| 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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 return generic_stub(); | 1078 return generic_stub(); |
| 1079 } | 1079 } |
| 1080 | 1080 |
| 1081 return isolate()->stub_cache()->ComputeLoadElementPolymorphic( | 1081 return isolate()->stub_cache()->ComputeLoadElementPolymorphic( |
| 1082 &target_receiver_maps); | 1082 &target_receiver_maps); |
| 1083 } | 1083 } |
| 1084 | 1084 |
| 1085 | 1085 |
| 1086 MaybeObject* KeyedLoadIC::Load(Handle<Object> object, Handle<Object> key) { | 1086 MaybeObject* KeyedLoadIC::Load(Handle<Object> object, Handle<Object> key) { |
| 1087 if (MigrateDeprecated(object)) { | 1087 if (MigrateDeprecated(object)) { |
| 1088 return Runtime::GetObjectPropertyOrFail(isolate(), object, key); | 1088 Handle<Object> result = Runtime::GetObjectProperty(isolate(), object, key); |
| 1089 RETURN_IF_EMPTY_HANDLE(isolate(), result); |
| 1090 return *result; |
| 1089 } | 1091 } |
| 1090 | 1092 |
| 1091 MaybeObject* maybe_object = NULL; | 1093 MaybeObject* maybe_object = NULL; |
| 1092 Handle<Code> stub = generic_stub(); | 1094 Handle<Code> stub = generic_stub(); |
| 1093 | 1095 |
| 1094 // Check for non-string values that can be converted into an | 1096 // Check for non-string values that can be converted into an |
| 1095 // internalized string directly or is representable as a smi. | 1097 // internalized string directly or is representable as a smi. |
| 1096 key = TryConvertKey(key, isolate()); | 1098 key = TryConvertKey(key, isolate()); |
| 1097 | 1099 |
| 1098 if (key->IsInternalizedString()) { | 1100 if (key->IsInternalizedString()) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1117 | 1119 |
| 1118 if (!is_target_set()) { | 1120 if (!is_target_set()) { |
| 1119 if (*stub == *generic_stub()) { | 1121 if (*stub == *generic_stub()) { |
| 1120 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic"); | 1122 TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic"); |
| 1121 } | 1123 } |
| 1122 set_target(*stub); | 1124 set_target(*stub); |
| 1123 TRACE_IC("LoadIC", key); | 1125 TRACE_IC("LoadIC", key); |
| 1124 } | 1126 } |
| 1125 | 1127 |
| 1126 if (maybe_object != NULL) return maybe_object; | 1128 if (maybe_object != NULL) return maybe_object; |
| 1127 return Runtime::GetObjectPropertyOrFail(isolate(), object, key); | 1129 Handle<Object> result = Runtime::GetObjectProperty(isolate(), object, key); |
| 1130 RETURN_IF_EMPTY_HANDLE(isolate(), result); |
| 1131 return *result; |
| 1128 } | 1132 } |
| 1129 | 1133 |
| 1130 | 1134 |
| 1131 static bool LookupForWrite(Handle<JSObject> receiver, | 1135 static bool LookupForWrite(Handle<JSObject> receiver, |
| 1132 Handle<String> name, | 1136 Handle<String> name, |
| 1133 Handle<Object> value, | 1137 Handle<Object> value, |
| 1134 LookupResult* lookup, | 1138 LookupResult* lookup, |
| 1135 IC* ic) { | 1139 IC* ic) { |
| 1136 Handle<JSObject> holder = receiver; | 1140 Handle<JSObject> holder = receiver; |
| 1137 receiver->Lookup(*name, lookup); | 1141 receiver->Lookup(*name, lookup); |
| (...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2837 #undef ADDR | 2841 #undef ADDR |
| 2838 }; | 2842 }; |
| 2839 | 2843 |
| 2840 | 2844 |
| 2841 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2845 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 2842 return IC_utilities[id]; | 2846 return IC_utilities[id]; |
| 2843 } | 2847 } |
| 2844 | 2848 |
| 2845 | 2849 |
| 2846 } } // namespace v8::internal | 2850 } } // namespace v8::internal |
| OLD | NEW |