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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 9015020: Make sure transitioned arrays efficiently call builtin Array functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename enum Created 8 years, 11 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
OLDNEW
1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 StringDictionary::kNotFound); 1012 StringDictionary::kNotFound);
1013 1013
1014 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, 1014 GenerateDictionaryNegativeLookup(masm(), miss, reg, name,
1015 scratch1, scratch2); 1015 scratch1, scratch2);
1016 1016
1017 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); 1017 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset));
1018 reg = holder_reg; // From now on the object will be in holder_reg. 1018 reg = holder_reg; // From now on the object will be in holder_reg.
1019 __ ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); 1019 __ ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset));
1020 } else { 1020 } else {
1021 Handle<Map> current_map(current->map()); 1021 Handle<Map> current_map(current->map());
1022 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); 1022 __ CheckMap(reg, scratch1, current_map, miss, DONT_DO_SMI_CHECK,
1023 __ cmp(scratch1, Operand(current_map)); 1023 ALLOW_ELEMENT_TRANSITION_MAPS);
1024 // Branch on the result of the map check. 1024
1025 __ b(ne, miss);
1026 // Check access rights to the global object. This has to happen after 1025 // Check access rights to the global object. This has to happen after
1027 // the map check so that we know that the object is actually a global 1026 // the map check so that we know that the object is actually a global
1028 // object. 1027 // object.
1029 if (current->IsJSGlobalProxy()) { 1028 if (current->IsJSGlobalProxy()) {
1030 __ CheckAccessGlobalProxy(reg, scratch2, miss); 1029 __ CheckAccessGlobalProxy(reg, scratch2, miss);
1031 } 1030 }
1032 reg = holder_reg; // From now on the object will be in holder_reg. 1031 reg = holder_reg; // From now on the object will be in holder_reg.
1033 1032
1034 if (heap()->InNewSpace(*prototype)) { 1033 if (heap()->InNewSpace(*prototype)) {
1035 // The prototype is in new space; we cannot store a reference to it 1034 // The prototype is in new space; we cannot store a reference to it
(...skipping 10 matching lines...) Expand all
1046 } 1045 }
1047 1046
1048 // Go to the next object in the prototype chain. 1047 // Go to the next object in the prototype chain.
1049 current = prototype; 1048 current = prototype;
1050 } 1049 }
1051 1050
1052 // Log the check depth. 1051 // Log the check depth.
1053 LOG(masm()->isolate(), IntEvent("check-maps-depth", depth + 1)); 1052 LOG(masm()->isolate(), IntEvent("check-maps-depth", depth + 1));
1054 1053
1055 // Check the holder map. 1054 // Check the holder map.
1056 __ ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); 1055 __ CheckMap(reg, scratch1, Handle<Map>(current->map()), miss,
1057 __ cmp(scratch1, Operand(Handle<Map>(current->map()))); 1056 DONT_DO_SMI_CHECK, ALLOW_ELEMENT_TRANSITION_MAPS);
1058 __ b(ne, miss);
1059 1057
1060 // Perform security check for access to the global object. 1058 // Perform security check for access to the global object.
1061 ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded()); 1059 ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded());
1062 if (holder->IsJSGlobalProxy()) { 1060 if (holder->IsJSGlobalProxy()) {
1063 __ CheckAccessGlobalProxy(reg, scratch1, miss); 1061 __ CheckAccessGlobalProxy(reg, scratch1, miss);
1064 } 1062 }
1065 1063
1066 // If we've skipped any global objects, it's not enough to verify that 1064 // If we've skipped any global objects, it's not enough to verify that
1067 // their maps haven't changed. We also need to check that the property 1065 // their maps haven't changed. We also need to check that the property
1068 // cell for the property is still empty. 1066 // cell for the property is still empty.
(...skipping 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after
4226 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); 4224 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
4227 __ Jump(ic_miss, RelocInfo::CODE_TARGET); 4225 __ Jump(ic_miss, RelocInfo::CODE_TARGET);
4228 } 4226 }
4229 4227
4230 4228
4231 #undef __ 4229 #undef __
4232 4230
4233 } } // namespace v8::internal 4231 } } // namespace v8::internal
4234 4232
4235 #endif // V8_TARGET_ARCH_ARM 4233 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698