Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: src/arm/ic-arm.cc

Issue 7787028: Use the BitField class for Code::Flags. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
139 scratch1, 139 scratch1,
140 scratch2); 140 scratch2);
141 141
142 // If probing finds an entry check that the value is a normal 142 // If probing finds an entry check that the value is a normal
143 // property. 143 // property.
144 __ bind(&done); // scratch2 == elements + 4 * index 144 __ bind(&done); // scratch2 == elements + 4 * index
145 const int kElementsStartOffset = StringDictionary::kHeaderSize + 145 const int kElementsStartOffset = StringDictionary::kHeaderSize +
146 StringDictionary::kElementsStartIndex * kPointerSize; 146 StringDictionary::kElementsStartIndex * kPointerSize;
147 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; 147 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize;
148 __ ldr(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); 148 __ ldr(scratch1, FieldMemOperand(scratch2, kDetailsOffset));
149 __ tst(scratch1, Operand(PropertyDetails::TypeField::mask() << kSmiTagSize)); 149 __ tst(scratch1, Operand(PropertyDetails::TypeField::kMask << kSmiTagSize));
150 __ b(ne, miss); 150 __ b(ne, miss);
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 __ ldr(result, 153 __ ldr(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 27 matching lines...) Expand all
187 name, 187 name,
188 scratch1, 188 scratch1,
189 scratch2); 189 scratch2);
190 190
191 // If probing finds an entry in the dictionary check that the value 191 // If probing finds an entry in the dictionary check that the value
192 // is a normal property that is not read only. 192 // is a normal property that is not read only.
193 __ bind(&done); // scratch2 == elements + 4 * index 193 __ bind(&done); // scratch2 == elements + 4 * index
194 const int kElementsStartOffset = StringDictionary::kHeaderSize + 194 const int kElementsStartOffset = StringDictionary::kHeaderSize +
195 StringDictionary::kElementsStartIndex * kPointerSize; 195 StringDictionary::kElementsStartIndex * kPointerSize;
196 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; 196 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize;
197 const int kTypeAndReadOnlyMask 197 const int kTypeAndReadOnlyMask =
198 = (PropertyDetails::TypeField::mask() | 198 (PropertyDetails::TypeField::kMask |
199 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize; 199 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize;
200 __ ldr(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); 200 __ ldr(scratch1, FieldMemOperand(scratch2, kDetailsOffset));
201 __ tst(scratch1, Operand(kTypeAndReadOnlyMask)); 201 __ tst(scratch1, Operand(kTypeAndReadOnlyMask));
202 __ b(ne, miss); 202 __ b(ne, miss);
203 203
204 // Store the value at the masked, scaled index and return. 204 // Store the value at the masked, scaled index and return.
205 const int kValueOffset = kElementsStartOffset + kPointerSize; 205 const int kValueOffset = kElementsStartOffset + kPointerSize;
206 __ add(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag)); 206 __ add(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag));
207 __ str(value, MemOperand(scratch2)); 207 __ str(value, MemOperand(scratch2));
208 208
209 // Update the write barrier. Make sure not to clobber the value. 209 // Update the write barrier. Make sure not to clobber the value.
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 Register reg = Assembler::GetRn(instr_at_patch); 1621 Register reg = Assembler::GetRn(instr_at_patch);
1622 patcher.masm()->tst(reg, Operand(kSmiTagMask)); 1622 patcher.masm()->tst(reg, Operand(kSmiTagMask));
1623 patcher.EmitCondition(eq); 1623 patcher.EmitCondition(eq);
1624 } 1624 }
1625 } 1625 }
1626 1626
1627 1627
1628 } } // namespace v8::internal 1628 } } // namespace v8::internal
1629 1629
1630 #endif // V8_TARGET_ARCH_ARM 1630 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698