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

Side by Side Diff: src/property.h

Issue 11072014: Reverting sharing of descriptor arrays: (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Bump version Created 8 years, 2 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/profile-generator.cc ('k') | src/runtime.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 PropertyDetails GetDetails() { return details_; } 61 PropertyDetails GetDetails() { return details_; }
62 62
63 #ifdef OBJECT_PRINT 63 #ifdef OBJECT_PRINT
64 void Print(FILE* out); 64 void Print(FILE* out);
65 #endif 65 #endif
66 66
67 void SetEnumerationIndex(int index) { 67 void SetEnumerationIndex(int index) {
68 details_ = PropertyDetails(details_.attributes(), details_.type(), index); 68 details_ = PropertyDetails(details_.attributes(), details_.type(), index);
69 } 69 }
70 70
71 void SetSortedKeyIndex(int index) { details_ = details_.set_pointer(index); } 71 void SetSortedKey(int index) { details_ = details_.set_pointer(index); }
72 72
73 private: 73 private:
74 String* key_; 74 String* key_;
75 Object* value_; 75 Object* value_;
76 PropertyDetails details_; 76 PropertyDetails details_;
77 77
78 protected: 78 protected:
79 Descriptor() : details_(Smi::FromInt(0)) {} 79 Descriptor() : details_(Smi::FromInt(0)) {}
80 80
81 void Init(String* key, Object* value, PropertyDetails details) { 81 void Init(String* key, Object* value, PropertyDetails details) {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 if (lookup_type_ == DESCRIPTOR_TYPE) { 377 if (lookup_type_ == DESCRIPTOR_TYPE) {
378 return GetValueFromMap(holder()->map()); 378 return GetValueFromMap(holder()->map());
379 } 379 }
380 // In the dictionary case, the data is held in the value field. 380 // In the dictionary case, the data is held in the value field.
381 ASSERT(lookup_type_ == DICTIONARY_TYPE); 381 ASSERT(lookup_type_ == DICTIONARY_TYPE);
382 return holder()->GetNormalizedProperty(this); 382 return holder()->GetNormalizedProperty(this);
383 } 383 }
384 384
385 Object* GetValueFromMap(Map* map) const { 385 Object* GetValueFromMap(Map* map) const {
386 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); 386 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
387 ASSERT(number_ < map->NumberOfOwnDescriptors());
388 return map->instance_descriptors()->GetValue(number_); 387 return map->instance_descriptors()->GetValue(number_);
389 } 388 }
390 389
391 void Iterate(ObjectVisitor* visitor); 390 void Iterate(ObjectVisitor* visitor);
392 391
393 private: 392 private:
394 Isolate* isolate_; 393 Isolate* isolate_;
395 LookupResult* next_; 394 LookupResult* next_;
396 395
397 // Where did we find the result; 396 // Where did we find the result;
(...skipping 10 matching lines...) Expand all
408 JSReceiver* holder_; 407 JSReceiver* holder_;
409 int number_; 408 int number_;
410 bool cacheable_; 409 bool cacheable_;
411 PropertyDetails details_; 410 PropertyDetails details_;
412 }; 411 };
413 412
414 413
415 } } // namespace v8::internal 414 } } // namespace v8::internal
416 415
417 #endif // V8_PROPERTY_H_ 416 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/profile-generator.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698