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