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 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1924 Heap* heap = receiver->GetHeap(); | 1924 Heap* heap = receiver->GetHeap(); |
1925 if (receiver->elements()->map() == heap->fixed_cow_array_map()) { | 1925 if (receiver->elements()->map() == heap->fixed_cow_array_map()) { |
1926 return STORE_NO_TRANSITION_HANDLE_COW; | 1926 return STORE_NO_TRANSITION_HANDLE_COW; |
1927 } else { | 1927 } else { |
1928 return STANDARD_STORE; | 1928 return STANDARD_STORE; |
1929 } | 1929 } |
1930 } | 1930 } |
1931 } | 1931 } |
1932 | 1932 |
1933 | 1933 |
1934 MaybeObject* KeyedStoreIC::StoreForceGeneric(Handle<Object> object, | |
1935 Handle<Object> key, | |
1936 Handle<Object> value) { | |
1937 set_target(*generic_stub()); | |
1938 Handle<Object> result = Runtime::SetObjectProperty(isolate(), object, | |
1939 key, | |
1940 value, | |
1941 NONE, | |
1942 strict_mode()); | |
1943 RETURN_IF_EMPTY_HANDLE(isolate(), result); | |
1944 return *result; | |
1945 } | |
1946 | |
1947 | |
1948 MaybeObject* KeyedStoreIC::Store(Handle<Object> object, | 1934 MaybeObject* KeyedStoreIC::Store(Handle<Object> object, |
1949 Handle<Object> key, | 1935 Handle<Object> key, |
1950 Handle<Object> value) { | 1936 Handle<Object> value) { |
1951 if (MigrateDeprecated(object)) { | 1937 if (MigrateDeprecated(object)) { |
1952 Handle<Object> result = Runtime::SetObjectProperty(isolate(), object, | 1938 Handle<Object> result = Runtime::SetObjectProperty(isolate(), object, |
1953 key, | 1939 key, |
1954 value, | 1940 value, |
1955 NONE, | 1941 NONE, |
1956 strict_mode()); | 1942 strict_mode()); |
1957 RETURN_IF_EMPTY_HANDLE(isolate(), result); | 1943 RETURN_IF_EMPTY_HANDLE(isolate(), result); |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2273 StrictModeFlag strict_mode = ic.strict_mode(); | 2259 StrictModeFlag strict_mode = ic.strict_mode(); |
2274 Handle<Object> result = Runtime::SetObjectProperty(isolate, object, key, | 2260 Handle<Object> result = Runtime::SetObjectProperty(isolate, object, key, |
2275 value, | 2261 value, |
2276 NONE, | 2262 NONE, |
2277 strict_mode); | 2263 strict_mode); |
2278 RETURN_IF_EMPTY_HANDLE(isolate, result); | 2264 RETURN_IF_EMPTY_HANDLE(isolate, result); |
2279 return *result; | 2265 return *result; |
2280 } | 2266 } |
2281 | 2267 |
2282 | 2268 |
2283 RUNTIME_FUNCTION(MaybeObject*, KeyedStoreIC_MissForceGeneric) { | |
2284 HandleScope scope(isolate); | |
2285 ASSERT(args.length() == 3); | |
2286 KeyedStoreIC ic(IC::NO_EXTRA_FRAME, isolate); | |
2287 Handle<Object> receiver = args.at<Object>(0); | |
2288 Handle<Object> key = args.at<Object>(1); | |
2289 ic.UpdateState(receiver, key); | |
2290 return ic.StoreForceGeneric(receiver, key, args.at<Object>(2)); | |
2291 } | |
2292 | |
2293 | |
2294 RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss) { | 2269 RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss) { |
2295 HandleScope scope(isolate); | 2270 HandleScope scope(isolate); |
2296 ASSERT(args.length() == 4); | 2271 ASSERT(args.length() == 4); |
2297 KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate); | 2272 KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate); |
2298 Handle<Object> value = args.at<Object>(0); | 2273 Handle<Object> value = args.at<Object>(0); |
2299 Handle<Map> map = args.at<Map>(1); | 2274 Handle<Map> map = args.at<Map>(1); |
2300 Handle<Object> key = args.at<Object>(2); | 2275 Handle<Object> key = args.at<Object>(2); |
2301 Handle<Object> object = args.at<Object>(3); | 2276 Handle<Object> object = args.at<Object>(3); |
2302 StrictModeFlag strict_mode = ic.strict_mode(); | 2277 StrictModeFlag strict_mode = ic.strict_mode(); |
2303 if (object->IsJSObject()) { | 2278 if (object->IsJSObject()) { |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2757 #undef ADDR | 2732 #undef ADDR |
2758 }; | 2733 }; |
2759 | 2734 |
2760 | 2735 |
2761 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2736 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2762 return IC_utilities[id]; | 2737 return IC_utilities[id]; |
2763 } | 2738 } |
2764 | 2739 |
2765 | 2740 |
2766 } } // namespace v8::internal | 2741 } } // namespace v8::internal |
OLD | NEW |