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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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)); |
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 3597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3769 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 3772 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
3770 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); | 3773 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); |
3771 } | 3774 } |
3772 | 3775 |
3773 | 3776 |
3774 #undef __ | 3777 #undef __ |
3775 | 3778 |
3776 } } // namespace v8::internal | 3779 } } // namespace v8::internal |
3777 | 3780 |
3778 #endif // V8_TARGET_ARCH_X64 | 3781 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |