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

Side by Side Diff: src/objects.h

Issue 12459026: ES6 symbols: implement name property (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 9 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/log.cc ('k') | src/objects.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 7380 matching lines...) Expand 10 before | Expand all | Expand 10 after
7391 static inline bool IsHashFieldComputed(uint32_t field); 7391 static inline bool IsHashFieldComputed(uint32_t field);
7392 7392
7393 private: 7393 private:
7394 DISALLOW_IMPLICIT_CONSTRUCTORS(Name); 7394 DISALLOW_IMPLICIT_CONSTRUCTORS(Name);
7395 }; 7395 };
7396 7396
7397 7397
7398 // ES6 symbols. 7398 // ES6 symbols.
7399 class Symbol: public Name { 7399 class Symbol: public Name {
7400 public: 7400 public:
7401 // [name]: the print name of a symbol, or undefined if none.
7402 DECL_ACCESSORS(name, Object)
7403
7401 // Casting. 7404 // Casting.
7402 static inline Symbol* cast(Object* obj); 7405 static inline Symbol* cast(Object* obj);
7403 7406
7404 // Dispatched behavior. 7407 // Dispatched behavior.
7405 DECLARE_PRINTER(Symbol) 7408 DECLARE_PRINTER(Symbol)
7406 DECLARE_VERIFIER(Symbol) 7409 DECLARE_VERIFIER(Symbol)
7407 7410
7408 // Layout description. 7411 // Layout description.
7409 static const int kSize = Name::kSize; 7412 static const int kNameOffset = Name::kSize;
7413 static const int kSize = kNameOffset + kPointerSize;
7414
7415 typedef FixedBodyDescriptor<kNameOffset, kNameOffset + kPointerSize, kSize>
7416 BodyDescriptor;
7410 7417
7411 private: 7418 private:
7412 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); 7419 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol);
7413 }; 7420 };
7414 7421
7415 7422
7416 class ConsString; 7423 class ConsString;
7417 7424
7418 // The String abstract class captures JavaScript string values: 7425 // The String abstract class captures JavaScript string values:
7419 // 7426 //
(...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after
9258 } else { 9265 } else {
9259 value &= ~(1 << bit_position); 9266 value &= ~(1 << bit_position);
9260 } 9267 }
9261 return value; 9268 return value;
9262 } 9269 }
9263 }; 9270 };
9264 9271
9265 } } // namespace v8::internal 9272 } } // namespace v8::internal
9266 9273
9267 #endif // V8_OBJECTS_H_ 9274 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698