Chromium Code Reviews| 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. |
|
Søren Thygesen Gjesse
2011/07/04 07:21:19
Will a USE(extra3) be needed to compile in release
m.m.capewell
2011/07/14 15:00:18
Done.
| |
| 171 | 172 |
| 172 // Make sure that code is valid. The shifting code relies on the | 173 // Make sure that code is valid. The shifting code relies on the |
| 173 // entry size being 8. | 174 // entry size being 8. |
| 174 ASSERT(sizeof(Entry) == 8); | 175 ASSERT(sizeof(Entry) == 8); |
| 175 | 176 |
| 176 // Make sure the flags does not name a specific type. | 177 // Make sure the flags does not name a specific type. |
| 177 ASSERT(Code::ExtractTypeFromFlags(flags) == 0); | 178 ASSERT(Code::ExtractTypeFromFlags(flags) == 0); |
| 178 | 179 |
| 179 // Make sure that there are no register conflicts. | 180 // Make sure that there are no register conflicts. |
| 180 ASSERT(!scratch.is(receiver)); | 181 ASSERT(!scratch.is(receiver)); |
| 181 ASSERT(!scratch.is(name)); | 182 ASSERT(!scratch.is(name)); |
| 182 ASSERT(!extra.is(receiver)); | 183 ASSERT(!extra.is(receiver)); |
| 183 ASSERT(!extra.is(name)); | 184 ASSERT(!extra.is(name)); |
| 184 ASSERT(!extra.is(scratch)); | 185 ASSERT(!extra.is(scratch)); |
| 185 | 186 |
| 186 // Check scratch and extra registers are valid, and extra2 is unused. | 187 // Check scratch is valid, extra2 and extra3 are unused. |
| 187 ASSERT(!scratch.is(no_reg)); | 188 ASSERT(!scratch.is(no_reg)); |
|
Søren Thygesen Gjesse
2011/07/04 07:21:19
Also assert that extra is not no_reg?
m.m.capewell
2011/07/14 15:00:18
extra can be no_reg here, eg. ic-ia32.cc:877.
| |
| 188 ASSERT(extra2.is(no_reg)); | 189 ASSERT(extra2.is(no_reg)); |
| 190 ASSERT(extra3.is(no_reg)); | |
| 189 | 191 |
| 190 // Check that the receiver isn't a smi. | 192 // Check that the receiver isn't a smi. |
| 191 __ JumpIfSmi(receiver, &miss); | 193 __ JumpIfSmi(receiver, &miss); |
| 192 | 194 |
| 193 // Get the map of the receiver and compute the hash. | 195 // Get the map of the receiver and compute the hash. |
| 194 __ mov(scratch, FieldOperand(name, String::kHashFieldOffset)); | 196 __ mov(scratch, FieldOperand(name, String::kHashFieldOffset)); |
| 195 __ add(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); | 197 __ add(scratch, FieldOperand(receiver, HeapObject::kMapOffset)); |
| 196 __ xor_(scratch, flags); | 198 __ xor_(scratch, flags); |
| 197 __ and_(scratch, (kPrimaryTableSize - 1) << kHeapObjectTagSize); | 199 __ and_(scratch, (kPrimaryTableSize - 1) << kHeapObjectTagSize); |
| 198 | 200 |
| (...skipping 3575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3774 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 3776 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
| 3775 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); | 3777 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); |
| 3776 } | 3778 } |
| 3777 | 3779 |
| 3778 | 3780 |
| 3779 #undef __ | 3781 #undef __ |
| 3780 | 3782 |
| 3781 } } // namespace v8::internal | 3783 } } // namespace v8::internal |
| 3782 | 3784 |
| 3783 #endif // V8_TARGET_ARCH_IA32 | 3785 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |