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

Side by Side Diff: src/property.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/objects-printer.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 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 return value; 286 return value;
287 } 287 }
288 case CONSTANT_FUNCTION: 288 case CONSTANT_FUNCTION:
289 return GetConstantFunction(); 289 return GetConstantFunction();
290 default: 290 default:
291 return Smi::FromInt(0); 291 return Smi::FromInt(0);
292 } 292 }
293 } 293 }
294 294
295
295 Map* GetTransitionMap() { 296 Map* GetTransitionMap() {
296 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); 297 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
297 ASSERT(type() == MAP_TRANSITION || type() == CONSTANT_TRANSITION || 298 ASSERT(IsTransitionType(type()));
298 type() == ELEMENTS_TRANSITION);
299 return Map::cast(GetValue()); 299 return Map::cast(GetValue());
300 } 300 }
301 301
302 Map* GetTransitionMapFromMap(Map* map) { 302 Map* GetTransitionMapFromMap(Map* map) {
303 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); 303 ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
304 ASSERT(type() == MAP_TRANSITION); 304 ASSERT(type() == MAP_TRANSITION);
305 return Map::cast(map->instance_descriptors()->GetValue(number_)); 305 return Map::cast(map->instance_descriptors()->GetValue(number_));
306 } 306 }
307 307
308 int GetFieldIndex() { 308 int GetFieldIndex() {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 JSReceiver* holder_; 376 JSReceiver* holder_;
377 int number_; 377 int number_;
378 bool cacheable_; 378 bool cacheable_;
379 PropertyDetails details_; 379 PropertyDetails details_;
380 }; 380 };
381 381
382 382
383 } } // namespace v8::internal 383 } } // namespace v8::internal
384 384
385 #endif // V8_PROPERTY_H_ 385 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698