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

Side by Side Diff: src/ic.cc

Issue 10809032: Merged r12088 into 3.11 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.11
Patch Set: Created 8 years, 5 months 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 | « no previous file | src/version.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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 // applicable. 985 // applicable.
986 if (!holder.is_identical_to(receiver)) return; 986 if (!holder.is_identical_to(receiver)) return;
987 code = isolate()->stub_cache()->ComputeLoadNormal(); 987 code = isolate()->stub_cache()->ComputeLoadNormal();
988 } 988 }
989 break; 989 break;
990 case CALLBACKS: { 990 case CALLBACKS: {
991 Handle<Object> callback(lookup->GetCallbackObject()); 991 Handle<Object> callback(lookup->GetCallbackObject());
992 if (callback->IsAccessorInfo()) { 992 if (callback->IsAccessorInfo()) {
993 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(callback); 993 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(callback);
994 if (v8::ToCData<Address>(info->getter()) == 0) return; 994 if (v8::ToCData<Address>(info->getter()) == 0) return;
995 if (!receiver->HasFastProperties()) return;
995 if (!info->IsCompatibleReceiver(*receiver)) return; 996 if (!info->IsCompatibleReceiver(*receiver)) return;
996 code = isolate()->stub_cache()->ComputeLoadCallback( 997 code = isolate()->stub_cache()->ComputeLoadCallback(
997 name, receiver, holder, info); 998 name, receiver, holder, info);
998 } else if (callback->IsAccessorPair()) { 999 } else if (callback->IsAccessorPair()) {
999 Handle<Object> getter(Handle<AccessorPair>::cast(callback)->getter()); 1000 Handle<Object> getter(Handle<AccessorPair>::cast(callback)->getter());
1000 if (!getter->IsJSFunction()) return; 1001 if (!getter->IsJSFunction()) return;
1001 if (holder->IsGlobalObject()) return; 1002 if (holder->IsGlobalObject()) return;
1002 if (!receiver->HasFastProperties()) return; 1003 if (!receiver->HasFastProperties()) return;
1003 code = isolate()->stub_cache()->ComputeLoadViaGetter( 1004 code = isolate()->stub_cache()->ComputeLoadViaGetter(
1004 name, receiver, holder, Handle<JSFunction>::cast(getter)); 1005 name, receiver, holder, Handle<JSFunction>::cast(getter));
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 code = isolate()->stub_cache()->ComputeKeyedLoadConstant( 1262 code = isolate()->stub_cache()->ComputeKeyedLoadConstant(
1262 name, receiver, holder, constant); 1263 name, receiver, holder, constant);
1263 break; 1264 break;
1264 } 1265 }
1265 case CALLBACKS: { 1266 case CALLBACKS: {
1266 Handle<Object> callback_object(lookup->GetCallbackObject()); 1267 Handle<Object> callback_object(lookup->GetCallbackObject());
1267 if (!callback_object->IsAccessorInfo()) return; 1268 if (!callback_object->IsAccessorInfo()) return;
1268 Handle<AccessorInfo> callback = 1269 Handle<AccessorInfo> callback =
1269 Handle<AccessorInfo>::cast(callback_object); 1270 Handle<AccessorInfo>::cast(callback_object);
1270 if (v8::ToCData<Address>(callback->getter()) == 0) return; 1271 if (v8::ToCData<Address>(callback->getter()) == 0) return;
1272 if (!receiver->HasFastProperties()) return;
1271 if (!callback->IsCompatibleReceiver(*receiver)) return; 1273 if (!callback->IsCompatibleReceiver(*receiver)) return;
1272 code = isolate()->stub_cache()->ComputeKeyedLoadCallback( 1274 code = isolate()->stub_cache()->ComputeKeyedLoadCallback(
1273 name, receiver, holder, callback); 1275 name, receiver, holder, callback);
1274 break; 1276 break;
1275 } 1277 }
1276 case INTERCEPTOR: 1278 case INTERCEPTOR:
1277 ASSERT(HasInterceptorGetter(lookup->holder())); 1279 ASSERT(HasInterceptorGetter(lookup->holder()));
1278 code = isolate()->stub_cache()->ComputeKeyedLoadInterceptor( 1280 code = isolate()->stub_cache()->ComputeKeyedLoadInterceptor(
1279 name, receiver, holder); 1281 name, receiver, holder);
1280 break; 1282 break;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 } else { 1482 } else {
1481 if (!holder.is_identical_to(receiver)) return; 1483 if (!holder.is_identical_to(receiver)) return;
1482 code = isolate()->stub_cache()->ComputeStoreNormal(strict_mode); 1484 code = isolate()->stub_cache()->ComputeStoreNormal(strict_mode);
1483 } 1485 }
1484 break; 1486 break;
1485 case CALLBACKS: { 1487 case CALLBACKS: {
1486 Handle<Object> callback(lookup->GetCallbackObject()); 1488 Handle<Object> callback(lookup->GetCallbackObject());
1487 if (callback->IsAccessorInfo()) { 1489 if (callback->IsAccessorInfo()) {
1488 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(callback); 1490 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(callback);
1489 if (v8::ToCData<Address>(info->setter()) == 0) return; 1491 if (v8::ToCData<Address>(info->setter()) == 0) return;
1492 if (!receiver->HasFastProperties()) return;
1490 ASSERT(info->IsCompatibleReceiver(*receiver)); 1493 ASSERT(info->IsCompatibleReceiver(*receiver));
1491 code = isolate()->stub_cache()->ComputeStoreCallback( 1494 code = isolate()->stub_cache()->ComputeStoreCallback(
1492 name, receiver, info, strict_mode); 1495 name, receiver, info, strict_mode);
1493 } else if (callback->IsAccessorPair()) { 1496 } else if (callback->IsAccessorPair()) {
1494 Handle<Object> setter(Handle<AccessorPair>::cast(callback)->setter()); 1497 Handle<Object> setter(Handle<AccessorPair>::cast(callback)->setter());
1495 if (!setter->IsJSFunction()) return; 1498 if (!setter->IsJSFunction()) return;
1496 if (holder->IsGlobalObject()) return; 1499 if (holder->IsGlobalObject()) return;
1497 if (!receiver->HasFastProperties()) return; 1500 if (!receiver->HasFastProperties()) return;
1498 code = isolate()->stub_cache()->ComputeStoreViaSetter( 1501 code = isolate()->stub_cache()->ComputeStoreViaSetter(
1499 name, receiver, Handle<JSFunction>::cast(setter), strict_mode); 1502 name, receiver, Handle<JSFunction>::cast(setter), strict_mode);
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 #undef ADDR 2675 #undef ADDR
2673 }; 2676 };
2674 2677
2675 2678
2676 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2679 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2677 return IC_utilities[id]; 2680 return IC_utilities[id];
2678 } 2681 }
2679 2682
2680 2683
2681 } } // namespace v8::internal 2684 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698