| 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 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1274 } | 1274 } |
| 1275 | 1275 |
| 1276 return true; | 1276 return true; |
| 1277 } | 1277 } |
| 1278 | 1278 |
| 1279 | 1279 |
| 1280 MaybeHandle<Object> StoreIC::Store(Handle<Object> object, | 1280 MaybeHandle<Object> StoreIC::Store(Handle<Object> object, |
| 1281 Handle<String> name, | 1281 Handle<String> name, |
| 1282 Handle<Object> value, | 1282 Handle<Object> value, |
| 1283 JSReceiver::StoreFromKeyed store_mode) { | 1283 JSReceiver::StoreFromKeyed store_mode) { |
| 1284 // TODO(verwaest): Let SetProperty do the migration, since storing a property |
| 1285 // might deprecate the current map again, if value does not fit. |
| 1284 if (MigrateDeprecated(object) || object->IsJSProxy()) { | 1286 if (MigrateDeprecated(object) || object->IsJSProxy()) { |
| 1285 Handle<JSReceiver> receiver = Handle<JSReceiver>::cast(object); | 1287 Handle<JSReceiver> receiver = Handle<JSReceiver>::cast(object); |
| 1286 Handle<Object> result; | 1288 Handle<Object> result; |
| 1287 ASSIGN_RETURN_ON_EXCEPTION( | 1289 ASSIGN_RETURN_ON_EXCEPTION( |
| 1288 isolate(), result, | 1290 isolate(), result, |
| 1289 JSReceiver::SetProperty(receiver, name, value, strict_mode()), Object); | 1291 JSReceiver::SetProperty(receiver, name, value, strict_mode()), Object); |
| 1290 return result; | 1292 return result; |
| 1291 } | 1293 } |
| 1292 | 1294 |
| 1293 // If the object is undefined or null it's illegal to try to set any | 1295 // If the object is undefined or null it's illegal to try to set any |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1750 } else { | 1752 } else { |
| 1751 return STANDARD_STORE; | 1753 return STANDARD_STORE; |
| 1752 } | 1754 } |
| 1753 } | 1755 } |
| 1754 } | 1756 } |
| 1755 | 1757 |
| 1756 | 1758 |
| 1757 MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object, | 1759 MaybeHandle<Object> KeyedStoreIC::Store(Handle<Object> object, |
| 1758 Handle<Object> key, | 1760 Handle<Object> key, |
| 1759 Handle<Object> value) { | 1761 Handle<Object> value) { |
| 1762 // TODO(verwaest): Let SetProperty do the migration, since storing a property |
| 1763 // might deprecate the current map again, if value does not fit. |
| 1760 if (MigrateDeprecated(object)) { | 1764 if (MigrateDeprecated(object)) { |
| 1761 Handle<Object> result; | 1765 Handle<Object> result; |
| 1762 ASSIGN_RETURN_ON_EXCEPTION( | 1766 ASSIGN_RETURN_ON_EXCEPTION( |
| 1763 isolate(), | 1767 isolate(), |
| 1764 result, | 1768 result, |
| 1765 Runtime::SetObjectProperty( | 1769 Runtime::SetObjectProperty( |
| 1766 isolate(), object, key, value, strict_mode()), | 1770 isolate(), object, key, value, strict_mode()), |
| 1767 Object); | 1771 Object); |
| 1768 return result; | 1772 return result; |
| 1769 } | 1773 } |
| (...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3077 #undef ADDR | 3081 #undef ADDR |
| 3078 }; | 3082 }; |
| 3079 | 3083 |
| 3080 | 3084 |
| 3081 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3085 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 3082 return IC_utilities[id]; | 3086 return IC_utilities[id]; |
| 3083 } | 3087 } |
| 3084 | 3088 |
| 3085 | 3089 |
| 3086 } } // namespace v8::internal | 3090 } } // namespace v8::internal |
| OLD | NEW |