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

Unified Diff: src/objects.h

Issue 1182303004: All private symbols are own symbols (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Fix nits Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/messages.js ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 79a8fbafbe8769104feef8626efb7ff82b8db7ff..39cf787f22d94ad13d69a79ced86c0689f8feb81 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8568,8 +8568,8 @@ class Name: public HeapObject {
// Conversion.
inline bool AsArrayIndex(uint32_t* index);
- // Whether name can only name own properties.
- inline bool IsOwn();
+ // If the name is private, it can only name own properties.
+ inline bool IsPrivate();
DECLARE_CAST(Name)
@@ -8647,18 +8647,15 @@ class Name: public HeapObject {
// ES6 symbols.
class Symbol: public Name {
public:
- // [name]: the print name of a symbol, or undefined if none.
+ // [name]: The print name of a symbol, or undefined if none.
DECL_ACCESSORS(name, Object)
DECL_ACCESSORS(flags, Smi)
- // [is_private]: whether this is a private symbol.
+ // [is_private]: Whether this is a private symbol. Private symbols can only
+ // be used to designate own properties of objects.
DECL_BOOLEAN_ACCESSORS(is_private)
- // [is_own]: whether this is an own symbol, that is, only used to designate
- // own properties of objects.
- DECL_BOOLEAN_ACCESSORS(is_own)
-
DECLARE_CAST(Symbol)
// Dispatched behavior.
@@ -8676,7 +8673,6 @@ class Symbol: public Name {
private:
static const int kPrivateBit = 0;
- static const int kOwnBit = 1;
const char* PrivateSymbolToName() const;
« no previous file with comments | « src/messages.js ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698