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 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2250 ic.UpdateState(receiver, key); | 2250 ic.UpdateState(receiver, key); |
2251 return ic.Store(receiver, key, args.at<Object>(2), MISS_FORCE_GENERIC); | 2251 return ic.Store(receiver, key, args.at<Object>(2), MISS_FORCE_GENERIC); |
2252 } | 2252 } |
2253 | 2253 |
2254 | 2254 |
2255 RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss) { | 2255 RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss) { |
2256 HandleScope scope(isolate); | 2256 HandleScope scope(isolate); |
2257 ASSERT(args.length() == 4); | 2257 ASSERT(args.length() == 4); |
2258 KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate); | 2258 KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate); |
2259 Handle<Object> value = args.at<Object>(0); | 2259 Handle<Object> value = args.at<Object>(0); |
| 2260 Handle<Map> map = args.at<Map>(1); |
2260 Handle<Object> key = args.at<Object>(2); | 2261 Handle<Object> key = args.at<Object>(2); |
2261 Handle<Object> object = args.at<Object>(3); | 2262 Handle<Object> object = args.at<Object>(3); |
2262 StrictModeFlag strict_mode = ic.strict_mode(); | 2263 StrictModeFlag strict_mode = ic.strict_mode(); |
| 2264 if (object->IsJSObject()) { |
| 2265 JSObject::TransitionElementsKind(Handle<JSObject>::cast(object), |
| 2266 map->elements_kind()); |
| 2267 } |
2263 return Runtime::SetObjectProperty(isolate, | 2268 return Runtime::SetObjectProperty(isolate, |
2264 object, | 2269 object, |
2265 key, | 2270 key, |
2266 value, | 2271 value, |
2267 NONE, | 2272 NONE, |
2268 strict_mode); | 2273 strict_mode); |
2269 } | 2274 } |
2270 | 2275 |
2271 | 2276 |
2272 const char* BinaryOpIC::GetName(TypeInfo type_info) { | 2277 const char* BinaryOpIC::GetName(TypeInfo type_info) { |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2713 #undef ADDR | 2718 #undef ADDR |
2714 }; | 2719 }; |
2715 | 2720 |
2716 | 2721 |
2717 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2722 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2718 return IC_utilities[id]; | 2723 return IC_utilities[id]; |
2719 } | 2724 } |
2720 | 2725 |
2721 | 2726 |
2722 } } // namespace v8::internal | 2727 } } // namespace v8::internal |
OLD | NEW |