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

Side by Side Diff: src/property.h

Issue 5998001: 1. Added support for object printing for release mode using the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years 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/platform-win32.cc ('k') | src/property.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 key_ = String::cast(result); 54 key_ = String::cast(result);
55 } 55 }
56 return key_; 56 return key_;
57 } 57 }
58 58
59 String* GetKey() { return key_; } 59 String* GetKey() { return key_; }
60 Object* GetValue() { return value_; } 60 Object* GetValue() { return value_; }
61 PropertyDetails GetDetails() { return details_; } 61 PropertyDetails GetDetails() { return details_; }
62 62
63 #ifdef DEBUG 63 #ifdef OBJECT_PRINT
64 void Print(); 64 void Print(FILE* out);
65 #endif 65 #endif
66 66
67 void SetEnumerationIndex(int index) { 67 void SetEnumerationIndex(int index) {
68 ASSERT(PropertyDetails::IsValidIndex(index)); 68 ASSERT(PropertyDetails::IsValidIndex(index));
69 details_ = PropertyDetails(details_.attributes(), details_.type(), index); 69 details_ = PropertyDetails(details_.attributes(), details_.type(), index);
70 } 70 }
71 71
72 private: 72 private:
73 String* key_; 73 String* key_;
74 Object* value_; 74 Object* value_;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 } 303 }
304 304
305 Object* GetCallbackObject() { 305 Object* GetCallbackObject() {
306 if (lookup_type_ == CONSTANT_TYPE) { 306 if (lookup_type_ == CONSTANT_TYPE) {
307 // For now we only have the __proto__ as constant type. 307 // For now we only have the __proto__ as constant type.
308 return Heap::prototype_accessors(); 308 return Heap::prototype_accessors();
309 } 309 }
310 return GetValue(); 310 return GetValue();
311 } 311 }
312 312
313 #ifdef DEBUG 313 #ifdef OBJECT_PRINT
314 void Print(); 314 void Print(FILE* out);
315 #endif 315 #endif
316 316
317 Object* GetValue() { 317 Object* GetValue() {
318 if (lookup_type_ == DESCRIPTOR_TYPE) { 318 if (lookup_type_ == DESCRIPTOR_TYPE) {
319 DescriptorArray* descriptors = holder()->map()->instance_descriptors(); 319 DescriptorArray* descriptors = holder()->map()->instance_descriptors();
320 return descriptors->GetValue(number_); 320 return descriptors->GetValue(number_);
321 } 321 }
322 // In the dictionary case, the data is held in the value field. 322 // In the dictionary case, the data is held in the value field.
323 ASSERT(lookup_type_ == DICTIONARY_TYPE); 323 ASSERT(lookup_type_ == DICTIONARY_TYPE);
324 return holder()->GetNormalizedProperty(this); 324 return holder()->GetNormalizedProperty(this);
325 } 325 }
326 326
327 private: 327 private:
328 JSObject* holder_; 328 JSObject* holder_;
329 int number_; 329 int number_;
330 bool cacheable_; 330 bool cacheable_;
331 PropertyDetails details_; 331 PropertyDetails details_;
332 }; 332 };
333 333
334 334
335 } } // namespace v8::internal 335 } } // namespace v8::internal
336 336
337 #endif // V8_PROPERTY_H_ 337 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/platform-win32.cc ('k') | src/property.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698