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

Side by Side Diff: src/ic.cc

Issue 2870018: Add "has fast elements" bit to maps and use it in inlined keyed loads. (Closed)
Patch Set: More ARM fixes. Created 10 years, 6 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/ia32/codegen-ia32.cc ('k') | src/objects.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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 stub = string_stub(); 985 stub = string_stub();
986 } else if (object->IsJSObject()) { 986 } else if (object->IsJSObject()) {
987 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 987 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
988 if (receiver->HasExternalArrayElements()) { 988 if (receiver->HasExternalArrayElements()) {
989 stub = external_array_stub(receiver->GetElementsKind()); 989 stub = external_array_stub(receiver->GetElementsKind());
990 } else if (receiver->HasIndexedInterceptor()) { 990 } else if (receiver->HasIndexedInterceptor()) {
991 stub = indexed_interceptor_stub(); 991 stub = indexed_interceptor_stub();
992 } 992 }
993 } 993 }
994 set_target(stub); 994 set_target(stub);
995 // For JSObjects that are not value wrappers and that do not have 995 // For JSObjects with fast elements that are not value wrappers
996 // indexed interceptors, we initialize the inlined fast case (if 996 // and that do not have indexed interceptors, we initialize the
997 // present) by patching the inlined map check. 997 // inlined fast case (if present) by patching the inlined map
998 // check.
998 if (object->IsJSObject() && 999 if (object->IsJSObject() &&
999 !object->IsJSValue() && 1000 !object->IsJSValue() &&
1000 !JSObject::cast(*object)->HasIndexedInterceptor()) { 1001 !JSObject::cast(*object)->HasIndexedInterceptor() &&
1002 JSObject::cast(*object)->HasFastElements()) {
1001 Map* map = JSObject::cast(*object)->map(); 1003 Map* map = JSObject::cast(*object)->map();
1002 PatchInlinedLoad(address(), map); 1004 PatchInlinedLoad(address(), map);
1003 } 1005 }
1004 } 1006 }
1005 1007
1006 // Get the property. 1008 // Get the property.
1007 return Runtime::GetObjectProperty(object, key); 1009 return Runtime::GetObjectProperty(object, key);
1008 } 1010 }
1009 1011
1010 1012
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 #undef ADDR 1619 #undef ADDR
1618 }; 1620 };
1619 1621
1620 1622
1621 Address IC::AddressFromUtilityId(IC::UtilityId id) { 1623 Address IC::AddressFromUtilityId(IC::UtilityId id) {
1622 return IC_utilities[id]; 1624 return IC_utilities[id];
1623 } 1625 }
1624 1626
1625 1627
1626 } } // namespace v8::internal 1628 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698