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

Side by Side Diff: src/objects.h

Issue 606063: Make class BitField able to use 32 bits of a uint32.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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/frame-element.h ('k') | src/register-allocator.h » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 bool IsReadOnly() { return (attributes() & READ_ONLY) != 0; } 172 bool IsReadOnly() { return (attributes() & READ_ONLY) != 0; }
173 bool IsDontDelete() { return (attributes() & DONT_DELETE) != 0; } 173 bool IsDontDelete() { return (attributes() & DONT_DELETE) != 0; }
174 bool IsDontEnum() { return (attributes() & DONT_ENUM) != 0; } 174 bool IsDontEnum() { return (attributes() & DONT_ENUM) != 0; }
175 bool IsDeleted() { return DeletedField::decode(value_) != 0;} 175 bool IsDeleted() { return DeletedField::decode(value_) != 0;}
176 176
177 // Bit fields in value_ (type, shift, size). Must be public so the 177 // Bit fields in value_ (type, shift, size). Must be public so the
178 // constants can be embedded in generated code. 178 // constants can be embedded in generated code.
179 class TypeField: public BitField<PropertyType, 0, 3> {}; 179 class TypeField: public BitField<PropertyType, 0, 3> {};
180 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; 180 class AttributesField: public BitField<PropertyAttributes, 3, 3> {};
181 class DeletedField: public BitField<uint32_t, 6, 1> {}; 181 class DeletedField: public BitField<uint32_t, 6, 1> {};
182 class IndexField: public BitField<uint32_t, 7, 31-7> {}; 182 class IndexField: public BitField<uint32_t, 7, 32-7> {};
183 183
184 static const int kInitialIndex = 1; 184 static const int kInitialIndex = 1;
185 private: 185 private:
186 uint32_t value_; 186 uint32_t value_;
187 }; 187 };
188 188
189 189
190 // Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER. 190 // Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER.
191 enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER }; 191 enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER };
192 192
(...skipping 4782 matching lines...) Expand 10 before | Expand all | Expand 10 after
4975 } else { 4975 } else {
4976 value &= ~(1 << bit_position); 4976 value &= ~(1 << bit_position);
4977 } 4977 }
4978 return value; 4978 return value;
4979 } 4979 }
4980 }; 4980 };
4981 4981
4982 } } // namespace v8::internal 4982 } } // namespace v8::internal
4983 4983
4984 #endif // V8_OBJECTS_H_ 4984 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/frame-element.h ('k') | src/register-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698