| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1605 | 1605 |
| 1606 MaybeObject* KeyedStoreIC::Store(State state, | 1606 MaybeObject* KeyedStoreIC::Store(State state, |
| 1607 StrictModeFlag strict_mode, | 1607 StrictModeFlag strict_mode, |
| 1608 Handle<Object> object, | 1608 Handle<Object> object, |
| 1609 Handle<Object> key, | 1609 Handle<Object> key, |
| 1610 Handle<Object> value, | 1610 Handle<Object> value, |
| 1611 bool force_generic) { | 1611 bool force_generic) { |
| 1612 if (key->IsSymbol()) { | 1612 if (key->IsSymbol()) { |
| 1613 Handle<String> name = Handle<String>::cast(key); | 1613 Handle<String> name = Handle<String>::cast(key); |
| 1614 | 1614 |
| 1615 // Handle proxies. |
| 1616 if (object->IsJSProxy()) { |
| 1617 return JSProxy::cast(*object)->SetProperty( |
| 1618 *name, *value, NONE, strict_mode); |
| 1619 } |
| 1620 |
| 1615 // If the object is undefined or null it's illegal to try to set any | 1621 // If the object is undefined or null it's illegal to try to set any |
| 1616 // properties on it; throw a TypeError in that case. | 1622 // properties on it; throw a TypeError in that case. |
| 1617 if (object->IsUndefined() || object->IsNull()) { | 1623 if (object->IsUndefined() || object->IsNull()) { |
| 1618 return TypeError("non_object_property_store", object, name); | 1624 return TypeError("non_object_property_store", object, name); |
| 1619 } | 1625 } |
| 1620 | 1626 |
| 1621 // Ignore stores where the receiver is not a JSObject. | 1627 // Ignore stores where the receiver is not a JSObject. |
| 1622 if (!object->IsJSObject()) return *value; | 1628 if (!object->IsJSObject()) return *value; |
| 1623 Handle<JSObject> receiver = Handle<JSObject>::cast(object); | 1629 Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
| 1624 | 1630 |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2371 #undef ADDR | 2377 #undef ADDR |
| 2372 }; | 2378 }; |
| 2373 | 2379 |
| 2374 | 2380 |
| 2375 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2381 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 2376 return IC_utilities[id]; | 2382 return IC_utilities[id]; |
| 2377 } | 2383 } |
| 2378 | 2384 |
| 2379 | 2385 |
| 2380 } } // namespace v8::internal | 2386 } } // namespace v8::internal |
| OLD | NEW |