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

Side by Side Diff: src/ic.cc

Issue 603028: Compile very thin code to access objects on which indexed interceptor is set. (Closed)
Patch Set: Created 10 years, 10 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
« no previous file with comments | « src/ic.h ('k') | src/stub-cache.h » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded(); 889 bool use_ic = FLAG_use_ic && !object->IsAccessCheckNeeded();
890 890
891 if (use_ic) { 891 if (use_ic) {
892 Code* stub = generic_stub(); 892 Code* stub = generic_stub();
893 if (object->IsString() && key->IsNumber()) { 893 if (object->IsString() && key->IsNumber()) {
894 stub = string_stub(); 894 stub = string_stub();
895 } else if (object->IsJSObject()) { 895 } else if (object->IsJSObject()) {
896 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 896 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
897 if (receiver->HasExternalArrayElements()) { 897 if (receiver->HasExternalArrayElements()) {
898 stub = external_array_stub(receiver->GetElementsKind()); 898 stub = external_array_stub(receiver->GetElementsKind());
899 } else if (receiver->HasIndexedInterceptor()) {
900 stub = indexed_interceptor_stub();
899 } 901 }
900 } 902 }
901 set_target(stub); 903 set_target(stub);
902 // For JSObjects that are not value wrappers and that do not have 904 // For JSObjects that are not value wrappers and that do not have
903 // indexed interceptors, we initialize the inlined fast case (if 905 // indexed interceptors, we initialize the inlined fast case (if
904 // present) by patching the inlined map check. 906 // present) by patching the inlined map check.
905 if (object->IsJSObject() && 907 if (object->IsJSObject() &&
906 !object->IsJSValue() && 908 !object->IsJSValue() &&
907 !JSObject::cast(*object)->HasIndexedInterceptor()) { 909 !JSObject::cast(*object)->HasIndexedInterceptor()) {
908 Map* map = JSObject::cast(*object)->map(); 910 Map* map = JSObject::cast(*object)->map();
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 #undef ADDR 1395 #undef ADDR
1394 }; 1396 };
1395 1397
1396 1398
1397 Address IC::AddressFromUtilityId(IC::UtilityId id) { 1399 Address IC::AddressFromUtilityId(IC::UtilityId id) {
1398 return IC_utilities[id]; 1400 return IC_utilities[id];
1399 } 1401 }
1400 1402
1401 1403
1402 } } // namespace v8::internal 1404 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.h ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698