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

Side by Side Diff: src/property.h

Issue 1700: Do not shortcut cons string symbols during garbage collection.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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/parser.cc ('k') | no next file » | 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 26 matching lines...) Expand all
37 // property index (in the actual instance-descriptor array) and 37 // property index (in the actual instance-descriptor array) and
38 // optionally a piece of data. 38 // optionally a piece of data.
39 // 39 //
40 40
41 class Descriptor BASE_EMBEDDED { 41 class Descriptor BASE_EMBEDDED {
42 public: 42 public:
43 static int IndexFromValue(Object* value) { 43 static int IndexFromValue(Object* value) {
44 return Smi::cast(value)->value(); 44 return Smi::cast(value)->value();
45 } 45 }
46 46
47 String* key() { return key_; }
48
49 Object* KeyToSymbol() { 47 Object* KeyToSymbol() {
50 if (!key_->IsSymbol()) { 48 if (!key_->IsSymbol()) {
51 Object* result = Heap::LookupSymbol(key_); 49 Object* result = Heap::LookupSymbol(key_);
52 if (result->IsFailure()) return result; 50 if (result->IsFailure()) return result;
53 key_ = String::cast(result); 51 key_ = String::cast(result);
54 } 52 }
55 return key_; 53 return key_;
56 } 54 }
57 55
58 String* GetKey() { return key_; } 56 String* GetKey() { return key_; }
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 381
384 // Append a descriptor to this stream. 382 // Append a descriptor to this stream.
385 void Write(Descriptor* desc); 383 void Write(Descriptor* desc);
386 // Read a descriptor from the reader and append it to this stream. 384 // Read a descriptor from the reader and append it to this stream.
387 void WriteFrom(DescriptorReader* reader); 385 void WriteFrom(DescriptorReader* reader);
388 }; 386 };
389 387
390 } } // namespace v8::internal 388 } } // namespace v8::internal
391 389
392 #endif // V8_PROPERTY_H_ 390 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698