Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Side by Side Diff: src/ic.cc

Issue 68213024: Remove keyed load "force generic" miss case. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ic.h ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 if (target_receiver_maps.length() > kMaxKeyedPolymorphism) { 1357 if (target_receiver_maps.length() > kMaxKeyedPolymorphism) {
1358 TRACE_GENERIC_IC(isolate(), "KeyedIC", "max polymorph exceeded"); 1358 TRACE_GENERIC_IC(isolate(), "KeyedIC", "max polymorph exceeded");
1359 return generic_stub(); 1359 return generic_stub();
1360 } 1360 }
1361 1361
1362 return isolate()->stub_cache()->ComputeLoadElementPolymorphic( 1362 return isolate()->stub_cache()->ComputeLoadElementPolymorphic(
1363 &target_receiver_maps); 1363 &target_receiver_maps);
1364 } 1364 }
1365 1365
1366 1366
1367 MaybeObject* KeyedLoadIC::LoadForceGeneric(Handle<Object> object,
1368 Handle<Object> key) {
1369 set_target(*generic_stub());
1370 return Runtime::GetObjectPropertyOrFail(isolate(), object, key);
1371 }
1372
1373
1374 MaybeObject* KeyedLoadIC::Load(Handle<Object> object, Handle<Object> key) { 1367 MaybeObject* KeyedLoadIC::Load(Handle<Object> object, Handle<Object> key) {
1375 if (MigrateDeprecated(object)) { 1368 if (MigrateDeprecated(object)) {
1376 return Runtime::GetObjectPropertyOrFail(isolate(), object, key); 1369 return Runtime::GetObjectPropertyOrFail(isolate(), object, key);
1377 } 1370 }
1378 1371
1379 MaybeObject* maybe_object = NULL; 1372 MaybeObject* maybe_object = NULL;
1380 Handle<Code> stub = generic_stub(); 1373 Handle<Code> stub = generic_stub();
1381 1374
1382 // Check for values that can be converted into an internalized string directly 1375 // Check for values that can be converted into an internalized string directly
1383 // or is representable as a smi. 1376 // or is representable as a smi.
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
2112 HandleScope scope(isolate); 2105 HandleScope scope(isolate);
2113 ASSERT(args.length() == 2); 2106 ASSERT(args.length() == 2);
2114 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate); 2107 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate);
2115 Handle<Object> receiver = args.at<Object>(0); 2108 Handle<Object> receiver = args.at<Object>(0);
2116 Handle<Object> key = args.at<Object>(1); 2109 Handle<Object> key = args.at<Object>(1);
2117 ic.UpdateState(receiver, key); 2110 ic.UpdateState(receiver, key);
2118 return ic.Load(receiver, key); 2111 return ic.Load(receiver, key);
2119 } 2112 }
2120 2113
2121 2114
2122 RUNTIME_FUNCTION(MaybeObject*, KeyedLoadIC_MissForceGeneric) {
2123 HandleScope scope(isolate);
2124 ASSERT(args.length() == 2);
2125 KeyedLoadIC ic(IC::NO_EXTRA_FRAME, isolate);
2126 Handle<Object> receiver = args.at<Object>(0);
2127 Handle<Object> key = args.at<Object>(1);
2128 ic.UpdateState(receiver, key);
2129 return ic.LoadForceGeneric(receiver, key);
2130 }
2131
2132
2133 // Used from ic-<arch>.cc. 2115 // Used from ic-<arch>.cc.
2134 RUNTIME_FUNCTION(MaybeObject*, StoreIC_Miss) { 2116 RUNTIME_FUNCTION(MaybeObject*, StoreIC_Miss) {
2135 HandleScope scope(isolate); 2117 HandleScope scope(isolate);
2136 ASSERT(args.length() == 3); 2118 ASSERT(args.length() == 3);
2137 StoreIC ic(IC::NO_EXTRA_FRAME, isolate); 2119 StoreIC ic(IC::NO_EXTRA_FRAME, isolate);
2138 Handle<Object> receiver = args.at<Object>(0); 2120 Handle<Object> receiver = args.at<Object>(0);
2139 Handle<String> key = args.at<String>(1); 2121 Handle<String> key = args.at<String>(1);
2140 ic.UpdateState(receiver, key); 2122 ic.UpdateState(receiver, key);
2141 return ic.Store(receiver, key, args.at<Object>(2)); 2123 return ic.Store(receiver, key, args.at<Object>(2));
2142 } 2124 }
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 #undef ADDR 2754 #undef ADDR
2773 }; 2755 };
2774 2756
2775 2757
2776 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2758 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2777 return IC_utilities[id]; 2759 return IC_utilities[id];
2778 } 2760 }
2779 2761
2780 2762
2781 } } // namespace v8::internal 2763 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.h ('k') | src/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698