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

Side by Side Diff: src/objects.h

Issue 8491016: Refactoring only: Make the handling of PropertyType more explicit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Unified our 2 UpdateCaches implementations, making some assumptions more explicit Created 9 years, 1 month 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/ic.cc ('k') | src/objects.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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 // Conversion for storing details as Object*. 201 // Conversion for storing details as Object*.
202 explicit inline PropertyDetails(Smi* smi); 202 explicit inline PropertyDetails(Smi* smi);
203 inline Smi* AsSmi(); 203 inline Smi* AsSmi();
204 204
205 PropertyType type() { return TypeField::decode(value_); } 205 PropertyType type() { return TypeField::decode(value_); }
206 206
207 bool IsTransition() { 207 bool IsTransition() {
208 PropertyType t = type(); 208 PropertyType t = type();
209 ASSERT(t != INTERCEPTOR); 209 ASSERT(t != INTERCEPTOR);
210 return t == MAP_TRANSITION || t == CONSTANT_TRANSITION || 210 return IsTransitionType(t);
211 t == ELEMENTS_TRANSITION;
212 } 211 }
213 212
214 bool IsProperty() { 213 bool IsProperty() {
215 return type() < FIRST_PHANTOM_PROPERTY_TYPE; 214 return type() < FIRST_PHANTOM_PROPERTY_TYPE;
216 } 215 }
217 216
218 PropertyAttributes attributes() { return AttributesField::decode(value_); } 217 PropertyAttributes attributes() { return AttributesField::decode(value_); }
219 218
220 int index() { return StorageField::decode(value_); } 219 int index() { return StorageField::decode(value_); }
221 220
(...skipping 7716 matching lines...) Expand 10 before | Expand all | Expand 10 after
7938 } else { 7937 } else {
7939 value &= ~(1 << bit_position); 7938 value &= ~(1 << bit_position);
7940 } 7939 }
7941 return value; 7940 return value;
7942 } 7941 }
7943 }; 7942 };
7944 7943
7945 } } // namespace v8::internal 7944 } } // namespace v8::internal
7946 7945
7947 #endif // V8_OBJECTS_H_ 7946 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698