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 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 MaybeObject* maybe_object = NULL; | 1680 MaybeObject* maybe_object = NULL; |
1681 Handle<Code> stub = generic_stub(); | 1681 Handle<Code> stub = generic_stub(); |
1682 | 1682 |
1683 if (key->IsInternalizedString()) { | 1683 if (key->IsInternalizedString()) { |
1684 maybe_object = StoreIC::Store(object, | 1684 maybe_object = StoreIC::Store(object, |
1685 Handle<String>::cast(key), | 1685 Handle<String>::cast(key), |
1686 value, | 1686 value, |
1687 JSReceiver::MAY_BE_STORE_FROM_KEYED); | 1687 JSReceiver::MAY_BE_STORE_FROM_KEYED); |
1688 if (maybe_object->IsFailure()) return maybe_object; | 1688 if (maybe_object->IsFailure()) return maybe_object; |
1689 } else { | 1689 } else { |
1690 bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded() && | 1690 bool use_ic = FLAG_use_ic && |
| 1691 !object->IsAccessCheckNeeded() && |
| 1692 !object->IsJSGlobalProxy() && |
1691 !(object->IsJSObject() && | 1693 !(object->IsJSObject() && |
1692 JSObject::cast(*object)->map()->is_observed()); | 1694 JSObject::cast(*object)->map()->is_observed()); |
1693 if (use_ic && !object->IsSmi()) { | 1695 if (use_ic && !object->IsSmi()) { |
1694 // Don't use ICs for maps of the objects in Array's prototype chain. We | 1696 // Don't use ICs for maps of the objects in Array's prototype chain. We |
1695 // expect to be able to trap element sets to objects with those maps in | 1697 // expect to be able to trap element sets to objects with those maps in |
1696 // the runtime to enable optimization of element hole access. | 1698 // the runtime to enable optimization of element hole access. |
1697 Handle<HeapObject> heap_object = Handle<HeapObject>::cast(object); | 1699 Handle<HeapObject> heap_object = Handle<HeapObject>::cast(object); |
1698 if (heap_object->map()->IsMapInArrayPrototypeChain()) use_ic = false; | 1700 if (heap_object->map()->IsMapInArrayPrototypeChain()) use_ic = false; |
1699 } | 1701 } |
1700 | 1702 |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2835 #undef ADDR | 2837 #undef ADDR |
2836 }; | 2838 }; |
2837 | 2839 |
2838 | 2840 |
2839 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2841 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2840 return IC_utilities[id]; | 2842 return IC_utilities[id]; |
2841 } | 2843 } |
2842 | 2844 |
2843 | 2845 |
2844 } } // namespace v8::internal | 2846 } } // namespace v8::internal |
OLD | NEW |