OLD | NEW |
1 // Copyright 2012 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 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 // Probe the dictionary. | 129 // Probe the dictionary. |
130 StringDictionaryLookupStub::GeneratePositiveLookup(masm, | 130 StringDictionaryLookupStub::GeneratePositiveLookup(masm, |
131 miss_label, | 131 miss_label, |
132 &done, | 132 &done, |
133 elements, | 133 elements, |
134 name, | 134 name, |
135 r0, | 135 r0, |
136 r1); | 136 r1); |
137 | 137 |
138 // If probing finds an entry in the dictionary, r0 contains the | 138 // If probing finds an entry in the dictionary, r1 contains the |
139 // index into the dictionary. Check that the value is a normal | 139 // index into the dictionary. Check that the value is a normal |
140 // property. | 140 // property. |
141 __ bind(&done); | 141 __ bind(&done); |
142 const int kElementsStartOffset = | 142 const int kElementsStartOffset = |
143 StringDictionary::kHeaderSize + | 143 StringDictionary::kHeaderSize + |
144 StringDictionary::kElementsStartIndex * kPointerSize; | 144 StringDictionary::kElementsStartIndex * kPointerSize; |
145 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; | 145 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; |
146 __ Test(Operand(elements, r1, times_pointer_size, | 146 __ Test(Operand(elements, r1, times_pointer_size, |
147 kDetailsOffset - kHeapObjectTag), | 147 kDetailsOffset - kHeapObjectTag), |
148 Smi::FromInt(PropertyDetails::TypeField::kMask)); | 148 Smi::FromInt(PropertyDetails::TypeField::kMask)); |
(...skipping 22 matching lines...) Expand all Loading... |
171 Register scratch0, | 171 Register scratch0, |
172 Register scratch1) { | 172 Register scratch1) { |
173 // Register use: | 173 // Register use: |
174 // | 174 // |
175 // elements - holds the property dictionary on entry and is clobbered. | 175 // elements - holds the property dictionary on entry and is clobbered. |
176 // | 176 // |
177 // name - holds the name of the property on entry and is unchanged. | 177 // name - holds the name of the property on entry and is unchanged. |
178 // | 178 // |
179 // value - holds the value to store and is unchanged. | 179 // value - holds the value to store and is unchanged. |
180 // | 180 // |
181 // scratch0 - used for index into the property dictionary and is clobbered. | 181 // scratch0 - used during the positive dictionary lookup and is clobbered. |
182 // | 182 // |
183 // scratch1 - used to hold the capacity of the property dictionary and is | 183 // scratch1 - used for index into the property dictionary and is clobbered. |
184 // clobbered. | |
185 Label done; | 184 Label done; |
186 | 185 |
187 // Probe the dictionary. | 186 // Probe the dictionary. |
188 StringDictionaryLookupStub::GeneratePositiveLookup(masm, | 187 StringDictionaryLookupStub::GeneratePositiveLookup(masm, |
189 miss_label, | 188 miss_label, |
190 &done, | 189 &done, |
191 elements, | 190 elements, |
192 name, | 191 name, |
193 scratch0, | 192 scratch0, |
194 scratch1); | 193 scratch1); |
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1778 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1777 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
1779 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1778 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
1780 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1779 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
1781 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1780 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1782 } | 1781 } |
1783 | 1782 |
1784 | 1783 |
1785 } } // namespace v8::internal | 1784 } } // namespace v8::internal |
1786 | 1785 |
1787 #endif // V8_TARGET_ARCH_X64 | 1786 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |