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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 // If probing finds an entry check that the value is a normal | 140 // If probing finds an entry check that the value is a normal |
141 // property. | 141 // property. |
142 __ bind(&done); // scratch2 == elements + 4 * index. | 142 __ bind(&done); // scratch2 == elements + 4 * index. |
143 const int kElementsStartOffset = StringDictionary::kHeaderSize + | 143 const int kElementsStartOffset = 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 __ lw(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); | 146 __ lw(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); |
147 __ And(at, | 147 __ And(at, |
148 scratch1, | 148 scratch1, |
149 Operand(PropertyDetails::TypeField::mask() << kSmiTagSize)); | 149 Operand(PropertyDetails::TypeField::kMask << kSmiTagSize)); |
150 __ Branch(miss, ne, at, Operand(zero_reg)); | 150 __ Branch(miss, ne, at, Operand(zero_reg)); |
151 | 151 |
152 // Get the value at the masked, scaled index and return. | 152 // Get the value at the masked, scaled index and return. |
153 __ lw(result, | 153 __ lw(result, |
154 FieldMemOperand(scratch2, kElementsStartOffset + 1 * kPointerSize)); | 154 FieldMemOperand(scratch2, kElementsStartOffset + 1 * kPointerSize)); |
155 } | 155 } |
156 | 156 |
157 | 157 |
158 // Helper function used from StoreIC::GenerateNormal. | 158 // Helper function used from StoreIC::GenerateNormal. |
159 // | 159 // |
(...skipping 29 matching lines...) Expand all Loading... |
189 name, | 189 name, |
190 scratch1, | 190 scratch1, |
191 scratch2); | 191 scratch2); |
192 | 192 |
193 // If probing finds an entry in the dictionary check that the value | 193 // If probing finds an entry in the dictionary check that the value |
194 // is a normal property that is not read only. | 194 // is a normal property that is not read only. |
195 __ bind(&done); // scratch2 == elements + 4 * index. | 195 __ bind(&done); // scratch2 == elements + 4 * index. |
196 const int kElementsStartOffset = StringDictionary::kHeaderSize + | 196 const int kElementsStartOffset = StringDictionary::kHeaderSize + |
197 StringDictionary::kElementsStartIndex * kPointerSize; | 197 StringDictionary::kElementsStartIndex * kPointerSize; |
198 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; | 198 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; |
199 const int kTypeAndReadOnlyMask | 199 const int kTypeAndReadOnlyMask = |
200 = (PropertyDetails::TypeField::mask() | | 200 (PropertyDetails::TypeField::kMask | |
201 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize; | 201 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize; |
202 __ lw(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); | 202 __ lw(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); |
203 __ And(at, scratch1, Operand(kTypeAndReadOnlyMask)); | 203 __ And(at, scratch1, Operand(kTypeAndReadOnlyMask)); |
204 __ Branch(miss, ne, at, Operand(zero_reg)); | 204 __ Branch(miss, ne, at, Operand(zero_reg)); |
205 | 205 |
206 // Store the value at the masked, scaled index and return. | 206 // Store the value at the masked, scaled index and return. |
207 const int kValueOffset = kElementsStartOffset + kPointerSize; | 207 const int kValueOffset = kElementsStartOffset + kPointerSize; |
208 __ Addu(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag)); | 208 __ Addu(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag)); |
209 __ sw(value, MemOperand(scratch2)); | 209 __ sw(value, MemOperand(scratch2)); |
210 | 210 |
211 // Update the write barrier. Make sure not to clobber the value. | 211 // Update the write barrier. Make sure not to clobber the value. |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1631 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 1631 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
1632 patcher.masm()->andi(at, reg, kSmiTagMask); | 1632 patcher.masm()->andi(at, reg, kSmiTagMask); |
1633 patcher.ChangeBranchCondition(eq); | 1633 patcher.ChangeBranchCondition(eq); |
1634 } | 1634 } |
1635 } | 1635 } |
1636 | 1636 |
1637 | 1637 |
1638 } } // namespace v8::internal | 1638 } } // namespace v8::internal |
1639 | 1639 |
1640 #endif // V8_TARGET_ARCH_MIPS | 1640 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |