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 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 | 1219 |
1220 // Ignore other stores where the receiver is not a JSObject. | 1220 // Ignore other stores where the receiver is not a JSObject. |
1221 // TODO(1475): Must check prototype chains of object wrappers. | 1221 // TODO(1475): Must check prototype chains of object wrappers. |
1222 if (!object->IsJSObject()) return *value; | 1222 if (!object->IsJSObject()) return *value; |
1223 | 1223 |
1224 Handle<JSObject> receiver = Handle<JSObject>::cast(object); | 1224 Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
1225 | 1225 |
1226 // Check if the given name is an array index. | 1226 // Check if the given name is an array index. |
1227 uint32_t index; | 1227 uint32_t index; |
1228 if (name->AsArrayIndex(&index)) { | 1228 if (name->AsArrayIndex(&index)) { |
1229 Handle<Object> result = | 1229 Handle<Object> result; |
1230 JSObject::SetElement(receiver, index, value, NONE, strict_mode()); | 1230 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
1231 RETURN_IF_EMPTY_HANDLE(isolate(), result); | 1231 isolate(), result, |
| 1232 JSObject::SetElement(receiver, index, value, NONE, strict_mode())); |
1232 return *value; | 1233 return *value; |
1233 } | 1234 } |
1234 | 1235 |
1235 // Observed objects are always modified through the runtime. | 1236 // Observed objects are always modified through the runtime. |
1236 if (receiver->map()->is_observed()) { | 1237 if (receiver->map()->is_observed()) { |
1237 Handle<Object> result; | 1238 Handle<Object> result; |
1238 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 1239 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
1239 isolate(), result, | 1240 isolate(), result, |
1240 JSReceiver::SetProperty( | 1241 JSReceiver::SetProperty( |
1241 receiver, name, value, NONE, strict_mode(), store_mode)); | 1242 receiver, name, value, NONE, strict_mode(), store_mode)); |
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2838 #undef ADDR | 2839 #undef ADDR |
2839 }; | 2840 }; |
2840 | 2841 |
2841 | 2842 |
2842 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2843 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2843 return IC_utilities[id]; | 2844 return IC_utilities[id]; |
2844 } | 2845 } |
2845 | 2846 |
2846 | 2847 |
2847 } } // namespace v8::internal | 2848 } } // namespace v8::internal |
OLD | NEW |