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

Side by Side Diff: src/property-descriptor.h

Issue 1408163005: [es6] Partially implement Reflect.getOwnPropertyDescriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « src/objects.cc ('k') | src/property-descriptor.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PROPERTY_DESCRIPTOR_H_ 5 #ifndef V8_PROPERTY_DESCRIPTOR_H_
6 #define V8_PROPERTY_DESCRIPTOR_H_ 6 #define V8_PROPERTY_DESCRIPTOR_H_
7 7
8 8
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/property-details.h" 10 #include "src/property-details.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 Handle<Object> name() const { return name_; } 82 Handle<Object> name() const { return name_; }
83 void set_name(Handle<Object> name) { name_ = name; } 83 void set_name(Handle<Object> name) { name_ = name; }
84 84
85 PropertyAttributes ToAttributes() { 85 PropertyAttributes ToAttributes() {
86 return static_cast<PropertyAttributes>( 86 return static_cast<PropertyAttributes>(
87 (has_enumerable() && !enumerable() ? DONT_ENUM : NONE) | 87 (has_enumerable() && !enumerable() ? DONT_ENUM : NONE) |
88 (has_configurable() && !configurable() ? DONT_DELETE : NONE) | 88 (has_configurable() && !configurable() ? DONT_DELETE : NONE) |
89 (has_writable() && !writable() ? READ_ONLY : NONE)); 89 (has_writable() && !writable() ? READ_ONLY : NONE));
90 } 90 }
91 91
92 Handle<Object> ToObject(Isolate* isolate);
93
92 static bool ToPropertyDescriptor(Isolate* isolate, Handle<Object> obj, 94 static bool ToPropertyDescriptor(Isolate* isolate, Handle<Object> obj,
93 PropertyDescriptor* desc); 95 PropertyDescriptor* desc);
94 96
95 private: 97 private:
96 bool enumerable_ : 1; 98 bool enumerable_ : 1;
97 bool has_enumerable_ : 1; 99 bool has_enumerable_ : 1;
98 bool configurable_ : 1; 100 bool configurable_ : 1;
99 bool has_configurable_ : 1; 101 bool has_configurable_ : 1;
100 bool writable_ : 1; 102 bool writable_ : 1;
101 bool has_writable_ : 1; 103 bool has_writable_ : 1;
102 Handle<Object> value_; 104 Handle<Object> value_;
103 Handle<Object> get_; 105 Handle<Object> get_;
104 Handle<Object> set_; 106 Handle<Object> set_;
105 Handle<Object> name_; 107 Handle<Object> name_;
106 108
107 // Some compilers (Xcode 5.1, ARM GCC 4.9) insist on having a copy 109 // Some compilers (Xcode 5.1, ARM GCC 4.9) insist on having a copy
108 // constructor for std::vector<PropertyDescriptor>, so we can't 110 // constructor for std::vector<PropertyDescriptor>, so we can't
109 // DISALLOW_COPY_AND_ASSIGN(PropertyDescriptor); here. 111 // DISALLOW_COPY_AND_ASSIGN(PropertyDescriptor); here.
110 }; 112 };
111 113
112 } // namespace internal 114 } // namespace internal
113 } // namespace v8 115 } // namespace v8
114 116
115 #endif // V8_PROPERTY_DESCRIPTOR_H_ 117 #endif // V8_PROPERTY_DESCRIPTOR_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/property-descriptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698