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

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

Issue 7210057: ARM: Reduce amount of code generated for LoadIC_Megamorphic.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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
« src/ia32/stub-cache-ia32.cc ('K') | « src/stub-cache.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 return result; 133 return result;
134 } 134 }
135 135
136 136
137 void StubCache::GenerateProbe(MacroAssembler* masm, 137 void StubCache::GenerateProbe(MacroAssembler* masm,
138 Code::Flags flags, 138 Code::Flags flags,
139 Register receiver, 139 Register receiver,
140 Register name, 140 Register name,
141 Register scratch, 141 Register scratch,
142 Register extra, 142 Register extra,
143 Register extra2) { 143 Register extra2,
144 Register extra3) {
144 Isolate* isolate = masm->isolate(); 145 Isolate* isolate = masm->isolate();
145 Label miss; 146 Label miss;
146 USE(extra); // The register extra is not used on the X64 platform. 147 USE(extra); // The register extra is not used on the X64 platform.
147 USE(extra2); // The register extra2 is not used on the X64 platform. 148 USE(extra2); // The register extra2 is not used on the X64 platform.
149 USE(extra3); // The register extra3 is not used on the X64 platform.
148 // Make sure that code is valid. The shifting code relies on the 150 // Make sure that code is valid. The shifting code relies on the
149 // entry size being 16. 151 // entry size being 16.
150 ASSERT(sizeof(Entry) == 16); 152 ASSERT(sizeof(Entry) == 16);
151 153
152 // Make sure the flags do not name a specific type. 154 // Make sure the flags do not name a specific type.
153 ASSERT(Code::ExtractTypeFromFlags(flags) == 0); 155 ASSERT(Code::ExtractTypeFromFlags(flags) == 0);
154 156
155 // Make sure that there are no register conflicts. 157 // Make sure that there are no register conflicts.
156 ASSERT(!scratch.is(receiver)); 158 ASSERT(!scratch.is(receiver));
157 ASSERT(!scratch.is(name)); 159 ASSERT(!scratch.is(name));
158 160
159 // Check scratch register is valid, extra and extra2 are unused. 161 // Check scratch register is valid, extra, extra2 and extra3 are unused.
160 ASSERT(!scratch.is(no_reg)); 162 ASSERT(!scratch.is(no_reg));
Søren Thygesen Gjesse 2011/07/04 07:21:19 Also assert that extra is no_reg?
m.m.capewell 2011/07/14 15:00:18 extra can be no_reg here, eg. ic-x64.cc:765.
161 ASSERT(extra2.is(no_reg)); 163 ASSERT(extra2.is(no_reg));
164 ASSERT(extra3.is(no_reg));
162 165
163 // Check that the receiver isn't a smi. 166 // Check that the receiver isn't a smi.
164 __ JumpIfSmi(receiver, &miss); 167 __ JumpIfSmi(receiver, &miss);
165 168
166 // Get the map of the receiver and compute the hash. 169 // Get the map of the receiver and compute the hash.
167 __ movl(scratch, FieldOperand(name, String::kHashFieldOffset)); 170 __ movl(scratch, FieldOperand(name, String::kHashFieldOffset));
168 // Use only the low 32 bits of the map pointer. 171 // Use only the low 32 bits of the map pointer.
169 __ addl(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); 172 __ addl(scratch, FieldOperand(receiver, HeapObject::kMapOffset));
170 __ xor_(scratch, Immediate(flags)); 173 __ xor_(scratch, Immediate(flags));
171 __ and_(scratch, Immediate((kPrimaryTableSize - 1) << kHeapObjectTagSize)); 174 __ and_(scratch, Immediate((kPrimaryTableSize - 1) << kHeapObjectTagSize));
(...skipping 3411 matching lines...) Expand 10 before | Expand all | Expand 10 after
3583 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 3586 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
3584 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); 3587 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET);
3585 } 3588 }
3586 3589
3587 3590
3588 #undef __ 3591 #undef __
3589 3592
3590 } } // namespace v8::internal 3593 } } // namespace v8::internal
3591 3594
3592 #endif // V8_TARGET_ARCH_X64 3595 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/ia32/stub-cache-ia32.cc ('K') | « src/stub-cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698