OLD | NEW |
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 return result; | 157 return result; |
158 } | 158 } |
159 | 159 |
160 | 160 |
161 void StubCache::GenerateProbe(MacroAssembler* masm, | 161 void StubCache::GenerateProbe(MacroAssembler* masm, |
162 Code::Flags flags, | 162 Code::Flags flags, |
163 Register receiver, | 163 Register receiver, |
164 Register name, | 164 Register name, |
165 Register scratch, | 165 Register scratch, |
166 Register extra, | 166 Register extra, |
167 Register extra2) { | 167 Register extra2, |
| 168 Register extra3) { |
168 Isolate* isolate = Isolate::Current(); | 169 Isolate* isolate = Isolate::Current(); |
169 Label miss; | 170 Label miss; |
170 USE(extra2); // The register extra2 is not used on the ia32 platform. | 171 USE(extra2); // The register extra2 is not used on the ia32 platform. |
| 172 USE(extra3); // The register extra3 is not used on the ia32 platform. |
171 | 173 |
172 // Make sure that code is valid. The shifting code relies on the | 174 // Make sure that code is valid. The shifting code relies on the |
173 // entry size being 8. | 175 // entry size being 8. |
174 ASSERT(sizeof(Entry) == 8); | 176 ASSERT(sizeof(Entry) == 8); |
175 | 177 |
176 // Make sure the flags does not name a specific type. | 178 // Make sure the flags does not name a specific type. |
177 ASSERT(Code::ExtractTypeFromFlags(flags) == 0); | 179 ASSERT(Code::ExtractTypeFromFlags(flags) == 0); |
178 | 180 |
179 // Make sure that there are no register conflicts. | 181 // Make sure that there are no register conflicts. |
180 ASSERT(!scratch.is(receiver)); | 182 ASSERT(!scratch.is(receiver)); |
181 ASSERT(!scratch.is(name)); | 183 ASSERT(!scratch.is(name)); |
182 ASSERT(!extra.is(receiver)); | 184 ASSERT(!extra.is(receiver)); |
183 ASSERT(!extra.is(name)); | 185 ASSERT(!extra.is(name)); |
184 ASSERT(!extra.is(scratch)); | 186 ASSERT(!extra.is(scratch)); |
185 | 187 |
186 // Check scratch and extra registers are valid, and extra2 is unused. | 188 // Check scratch is valid, extra2 and extra3 are unused. |
187 ASSERT(!scratch.is(no_reg)); | 189 ASSERT(!scratch.is(no_reg)); |
188 ASSERT(extra2.is(no_reg)); | 190 ASSERT(extra2.is(no_reg)); |
| 191 ASSERT(extra3.is(no_reg)); |
189 | 192 |
190 // Check that the receiver isn't a smi. | 193 // Check that the receiver isn't a smi. |
191 __ JumpIfSmi(receiver, &miss); | 194 __ JumpIfSmi(receiver, &miss); |
192 | 195 |
193 // Get the map of the receiver and compute the hash. | 196 // Get the map of the receiver and compute the hash. |
194 __ mov(scratch, FieldOperand(name, String::kHashFieldOffset)); | 197 __ mov(scratch, FieldOperand(name, String::kHashFieldOffset)); |
195 __ add(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); | 198 __ add(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); |
196 __ xor_(scratch, flags); | 199 __ xor_(scratch, flags); |
197 __ and_(scratch, (kPrimaryTableSize - 1) << kHeapObjectTagSize); | 200 __ and_(scratch, (kPrimaryTableSize - 1) << kHeapObjectTagSize); |
198 | 201 |
(...skipping 3795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3994 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 3997 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
3995 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); | 3998 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); |
3996 } | 3999 } |
3997 | 4000 |
3998 | 4001 |
3999 #undef __ | 4002 #undef __ |
4000 | 4003 |
4001 } } // namespace v8::internal | 4004 } } // namespace v8::internal |
4002 | 4005 |
4003 #endif // V8_TARGET_ARCH_IA32 | 4006 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |