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

Side by Side Diff: src/property.h

Issue 12210083: Renamed "symbols" to "internalized strings" throughout the code base, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Yang's comments Created 7 years, 10 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/rewriter.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 30 matching lines...) Expand all
41 // property index (in the actual instance-descriptor array) and 41 // property index (in the actual instance-descriptor array) and
42 // optionally a piece of data. 42 // optionally a piece of data.
43 // 43 //
44 44
45 class Descriptor BASE_EMBEDDED { 45 class Descriptor BASE_EMBEDDED {
46 public: 46 public:
47 static int IndexFromValue(Object* value) { 47 static int IndexFromValue(Object* value) {
48 return Smi::cast(value)->value(); 48 return Smi::cast(value)->value();
49 } 49 }
50 50
51 MUST_USE_RESULT MaybeObject* KeyToSymbol() { 51 MUST_USE_RESULT MaybeObject* KeyToInternalizedString() {
52 if (!StringShape(key_).IsSymbol()) { 52 if (!StringShape(key_).IsInternalized()) {
53 MaybeObject* maybe_result = HEAP->LookupSymbol(key_); 53 MaybeObject* maybe_result = HEAP->InternalizeString(key_);
54 if (!maybe_result->To(&key_)) return maybe_result; 54 if (!maybe_result->To(&key_)) return maybe_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 OBJECT_PRINT 63 #ifdef OBJECT_PRINT
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 JSReceiver* holder_; 473 JSReceiver* holder_;
474 int number_; 474 int number_;
475 bool cacheable_; 475 bool cacheable_;
476 PropertyDetails details_; 476 PropertyDetails details_;
477 }; 477 };
478 478
479 479
480 } } // namespace v8::internal 480 } } // namespace v8::internal
481 481
482 #endif // V8_PROPERTY_H_ 482 #endif // V8_PROPERTY_H_
OLDNEW
« no previous file with comments | « src/profile-generator.cc ('k') | src/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698