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

Side by Side Diff: src/objects-inl.h

Issue 834443004: remove declarative accessors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.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 // 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 155
156 // External objects are not extensible, so the map check is enough. 156 // External objects are not extensible, so the map check is enough.
157 bool Object::IsExternal() const { 157 bool Object::IsExternal() const {
158 return Object::IsHeapObject() && 158 return Object::IsHeapObject() &&
159 HeapObject::cast(this)->map() == 159 HeapObject::cast(this)->map() ==
160 HeapObject::cast(this)->GetHeap()->external_map(); 160 HeapObject::cast(this)->GetHeap()->external_map();
161 } 161 }
162 162
163 163
164 bool Object::IsAccessorInfo() const { 164 bool Object::IsAccessorInfo() const { return IsExecutableAccessorInfo(); }
165 return IsExecutableAccessorInfo() || IsDeclaredAccessorInfo();
166 }
167 165
168 166
169 bool Object::IsSmi() const { 167 bool Object::IsSmi() const {
170 return HAS_SMI_TAG(this); 168 return HAS_SMI_TAG(this);
171 } 169 }
172 170
173 171
174 bool Object::IsHeapObject() const { 172 bool Object::IsHeapObject() const {
175 return Internals::HasHeapObjectTag(this); 173 return Internals::HasHeapObjectTag(this);
176 } 174 }
(...skipping 5305 matching lines...) Expand 10 before | Expand all | Expand 10 after
5482 ACCESSORS(GlobalObject, global_proxy, JSObject, kGlobalProxyOffset) 5480 ACCESSORS(GlobalObject, global_proxy, JSObject, kGlobalProxyOffset)
5483 5481
5484 ACCESSORS(JSGlobalProxy, native_context, Object, kNativeContextOffset) 5482 ACCESSORS(JSGlobalProxy, native_context, Object, kNativeContextOffset)
5485 ACCESSORS(JSGlobalProxy, hash, Object, kHashOffset) 5483 ACCESSORS(JSGlobalProxy, hash, Object, kHashOffset)
5486 5484
5487 ACCESSORS(AccessorInfo, name, Object, kNameOffset) 5485 ACCESSORS(AccessorInfo, name, Object, kNameOffset)
5488 ACCESSORS_TO_SMI(AccessorInfo, flag, kFlagOffset) 5486 ACCESSORS_TO_SMI(AccessorInfo, flag, kFlagOffset)
5489 ACCESSORS(AccessorInfo, expected_receiver_type, Object, 5487 ACCESSORS(AccessorInfo, expected_receiver_type, Object,
5490 kExpectedReceiverTypeOffset) 5488 kExpectedReceiverTypeOffset)
5491 5489
5492 ACCESSORS(DeclaredAccessorDescriptor, serialized_data, ByteArray,
5493 kSerializedDataOffset)
5494
5495 ACCESSORS(DeclaredAccessorInfo, descriptor, DeclaredAccessorDescriptor,
5496 kDescriptorOffset)
5497
5498 ACCESSORS(ExecutableAccessorInfo, getter, Object, kGetterOffset) 5490 ACCESSORS(ExecutableAccessorInfo, getter, Object, kGetterOffset)
5499 ACCESSORS(ExecutableAccessorInfo, setter, Object, kSetterOffset) 5491 ACCESSORS(ExecutableAccessorInfo, setter, Object, kSetterOffset)
5500 ACCESSORS(ExecutableAccessorInfo, data, Object, kDataOffset) 5492 ACCESSORS(ExecutableAccessorInfo, data, Object, kDataOffset)
5501 5493
5502 ACCESSORS(Box, value, Object, kValueOffset) 5494 ACCESSORS(Box, value, Object, kValueOffset)
5503 5495
5504 ACCESSORS(AccessorPair, getter, Object, kGetterOffset) 5496 ACCESSORS(AccessorPair, getter, Object, kGetterOffset)
5505 ACCESSORS(AccessorPair, setter, Object, kSetterOffset) 5497 ACCESSORS(AccessorPair, setter, Object, kSetterOffset)
5506 5498
5507 ACCESSORS(AccessCheckInfo, named_callback, Object, kNamedCallbackOffset) 5499 ACCESSORS(AccessCheckInfo, named_callback, Object, kNamedCallbackOffset)
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
7518 #undef READ_SHORT_FIELD 7510 #undef READ_SHORT_FIELD
7519 #undef WRITE_SHORT_FIELD 7511 #undef WRITE_SHORT_FIELD
7520 #undef READ_BYTE_FIELD 7512 #undef READ_BYTE_FIELD
7521 #undef WRITE_BYTE_FIELD 7513 #undef WRITE_BYTE_FIELD
7522 #undef NOBARRIER_READ_BYTE_FIELD 7514 #undef NOBARRIER_READ_BYTE_FIELD
7523 #undef NOBARRIER_WRITE_BYTE_FIELD 7515 #undef NOBARRIER_WRITE_BYTE_FIELD
7524 7516
7525 } } // namespace v8::internal 7517 } } // namespace v8::internal
7526 7518
7527 #endif // V8_OBJECTS_INL_H_ 7519 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698