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

Side by Side Diff: src/ia32/ic-ia32.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 | « src/compiler.h ('k') | src/ia32/macro-assembler-ia32.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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // If probing finds an entry in the dictionary, r0 contains the 138 // If probing finds an entry in the dictionary, r0 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, r0, times_4, kDetailsOffset - kHeapObjectTag), 146 __ test(Operand(elements, r0, times_4, kDetailsOffset - kHeapObjectTag),
147 Immediate(PropertyDetails::TypeField::mask() << kSmiTagSize)); 147 Immediate(PropertyDetails::TypeField::kMask << kSmiTagSize));
148 __ j(not_zero, miss_label); 148 __ j(not_zero, miss_label);
149 149
150 // Get the value at the masked, scaled index. 150 // Get the value at the masked, scaled index.
151 const int kValueOffset = kElementsStartOffset + kPointerSize; 151 const int kValueOffset = kElementsStartOffset + kPointerSize;
152 __ mov(result, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag)); 152 __ mov(result, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag));
153 } 153 }
154 154
155 155
156 // Helper function used to store a property to a dictionary backing 156 // Helper function used to store a property to a dictionary backing
157 // storage. This function may fail to store a property eventhough it 157 // storage. This function may fail to store a property eventhough it
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 r1); 191 r1);
192 192
193 // If probing finds an entry in the dictionary, r0 contains the 193 // If probing finds an entry in the dictionary, r0 contains the
194 // index into the dictionary. Check that the value is a normal 194 // index into the dictionary. Check that the value is a normal
195 // property that is not read only. 195 // property that is not read only.
196 __ bind(&done); 196 __ bind(&done);
197 const int kElementsStartOffset = 197 const int kElementsStartOffset =
198 StringDictionary::kHeaderSize + 198 StringDictionary::kHeaderSize +
199 StringDictionary::kElementsStartIndex * kPointerSize; 199 StringDictionary::kElementsStartIndex * kPointerSize;
200 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; 200 const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize;
201 const int kTypeAndReadOnlyMask 201 const int kTypeAndReadOnlyMask =
202 = (PropertyDetails::TypeField::mask() | 202 (PropertyDetails::TypeField::kMask |
203 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize; 203 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize;
204 __ test(Operand(elements, r0, times_4, kDetailsOffset - kHeapObjectTag), 204 __ test(Operand(elements, r0, times_4, kDetailsOffset - kHeapObjectTag),
205 Immediate(kTypeAndReadOnlyMask)); 205 Immediate(kTypeAndReadOnlyMask));
206 __ j(not_zero, miss_label); 206 __ j(not_zero, miss_label);
207 207
208 // Store the value at the masked, scaled index. 208 // Store the value at the masked, scaled index.
209 const int kValueOffset = kElementsStartOffset + kPointerSize; 209 const int kValueOffset = kElementsStartOffset + kPointerSize;
210 __ lea(r0, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag)); 210 __ lea(r0, Operand(elements, r0, times_4, kValueOffset - kHeapObjectTag));
211 __ mov(Operand(r0, 0), value); 211 __ mov(Operand(r0, 0), value);
212 212
213 // Update write barrier. Make sure not to clobber the value. 213 // Update write barrier. Make sure not to clobber the value.
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 Condition cc = *jmp_address == Assembler::kJncShortOpcode 1637 Condition cc = *jmp_address == Assembler::kJncShortOpcode
1638 ? not_zero 1638 ? not_zero
1639 : zero; 1639 : zero;
1640 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1640 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1641 } 1641 }
1642 1642
1643 1643
1644 } } // namespace v8::internal 1644 } } // namespace v8::internal
1645 1645
1646 #endif // V8_TARGET_ARCH_IA32 1646 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698