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

Side by Side Diff: src/property.h

Issue 9320066: Removed IsTransitionType predicate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
Jakob Kummerow 2012/02/03 13:17:14 nit: 2012
Sven Panne 2012/02/03 13:33:14 Done.
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
11 // with the distribution. 11 // with the distribution.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 #ifdef OBJECT_PRINT 65 #ifdef OBJECT_PRINT
66 void Print(FILE* out); 66 void Print(FILE* out);
67 #endif 67 #endif
68 68
69 void SetEnumerationIndex(int index) { 69 void SetEnumerationIndex(int index) {
70 ASSERT(PropertyDetails::IsValidIndex(index)); 70 ASSERT(PropertyDetails::IsValidIndex(index));
71 details_ = PropertyDetails(details_.attributes(), details_.type(), index); 71 details_ = PropertyDetails(details_.attributes(), details_.type(), index);
72 } 72 }
73 73
74 bool ContainsTransition();
75
74 private: 76 private:
75 String* key_; 77 String* key_;
76 Object* value_; 78 Object* value_;
77 PropertyDetails details_; 79 PropertyDetails details_;
78 80
79 protected: 81 protected:
80 Descriptor() : details_(Smi::FromInt(0)) {} 82 Descriptor() : details_(Smi::FromInt(0)) {}
81 83
82 void Init(String* key, Object* value, PropertyDetails details) { 84 void Init(String* key, Object* value, PropertyDetails details) {
83 key_ = key; 85 key_ = key;
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 case CONSTANT_FUNCTION: 285 case CONSTANT_FUNCTION:
284 return GetConstantFunction(); 286 return GetConstantFunction();
285 default: 287 default:
286 return Smi::FromInt(0); 288 return Smi::FromInt(0);
287 } 289 }
288 } 290 }
289 291
290 292
291 Map* GetTransitionMap() { 293 Map* GetTransitionMap() {
292 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); 294 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
293 ASSERT(IsTransitionType(type())); 295 ASSERT(type() == MAP_TRANSITION ||
296 type() == ELEMENTS_TRANSITION ||
297 type() == CONSTANT_TRANSITION);
294 return Map::cast(GetValue()); 298 return Map::cast(GetValue());
295 } 299 }
296 300
297 Map* GetTransitionMapFromMap(Map* map) { 301 Map* GetTransitionMapFromMap(Map* map) {
298 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); 302 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
299 ASSERT(type() == MAP_TRANSITION); 303 ASSERT(type() == MAP_TRANSITION);
300 return Map::cast(map->instance_descriptors()->GetValue(number_)); 304 return Map::cast(map->instance_descriptors()->GetValue(number_));
301 } 305 }
302 306
303 int GetFieldIndex() { 307 int GetFieldIndex() {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 JSReceiver* holder_; 375 JSReceiver* holder_;
372 int number_; 376 int number_;
373 bool cacheable_; 377 bool cacheable_;
374 PropertyDetails details_; 378 PropertyDetails details_;
375 }; 379 };
376 380
377 381
378 } } // namespace v8::internal 382 } } // namespace v8::internal
379 383
380 #endif // V8_PROPERTY_H_ 384 #endif // V8_PROPERTY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698