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

Side by Side Diff: src/property.h

Issue 10575032: In-place shrinking of descriptor arrays with non-live transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments Created 8 years, 5 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 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 Object* callback_object = desc->GetCallbackObject(); 166 Object* callback_object = desc->GetCallbackObject();
167 // Non-JavaScript (i.e. native) accessors are always a property, otherwise 167 // Non-JavaScript (i.e. native) accessors are always a property, otherwise
168 // either the getter or the setter must be an accessor. Put another way: 168 // either the getter or the setter must be an accessor. Put another way:
169 // If we only see map transitions and holes in a pair, this is not a 169 // If we only see map transitions and holes in a pair, this is not a
170 // property. 170 // property.
171 return (!callback_object->IsAccessorPair() || 171 return (!callback_object->IsAccessorPair() ||
172 AccessorPair::cast(callback_object)->ContainsAccessor()); 172 AccessorPair::cast(callback_object)->ContainsAccessor());
173 } 173 }
174 case MAP_TRANSITION: 174 case MAP_TRANSITION:
175 case CONSTANT_TRANSITION: 175 case CONSTANT_TRANSITION:
176 case NULL_DESCRIPTOR:
177 return false; 176 return false;
177 case NONEXISTENT:
178 UNREACHABLE();
179 break;
178 } 180 }
179 UNREACHABLE(); // keep the compiler happy 181 UNREACHABLE(); // keep the compiler happy
180 return false; 182 return false;
181 } 183 }
182 184
183 185
184 class LookupResult BASE_EMBEDDED { 186 class LookupResult BASE_EMBEDDED {
185 public: 187 public:
186 explicit LookupResult(Isolate* isolate) 188 explicit LookupResult(Isolate* isolate)
187 : isolate_(isolate), 189 : isolate_(isolate),
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 JSReceiver* holder_; 385 JSReceiver* holder_;
384 int number_; 386 int number_;
385 bool cacheable_; 387 bool cacheable_;
386 PropertyDetails details_; 388 PropertyDetails details_;
387 }; 389 };
388 390
389 391
390 } } // namespace v8::internal 392 } } // namespace v8::internal
391 393
392 #endif // V8_PROPERTY_H_ 394 #endif // V8_PROPERTY_H_
OLDNEW
« src/objects.cc ('K') | « src/profile-generator.cc ('k') | src/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698