| OLD | NEW |
| 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 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2005 // Retrieves a permanent object identity hash code. The undefined value might | 2005 // Retrieves a permanent object identity hash code. The undefined value might |
| 2006 // be returned in case no hash was created yet and OMIT_CREATION was used. | 2006 // be returned in case no hash was created yet and OMIT_CREATION was used. |
| 2007 inline MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag); | 2007 inline MUST_USE_RESULT MaybeObject* GetIdentityHash(CreationFlag flag); |
| 2008 | 2008 |
| 2009 // Lookup a property. If found, the result is valid and has | 2009 // Lookup a property. If found, the result is valid and has |
| 2010 // detailed information. | 2010 // detailed information. |
| 2011 void LocalLookup(Name* name, LookupResult* result, | 2011 void LocalLookup(Name* name, LookupResult* result, |
| 2012 bool search_hidden_prototypes = false); | 2012 bool search_hidden_prototypes = false); |
| 2013 void Lookup(Name* name, LookupResult* result); | 2013 void Lookup(Name* name, LookupResult* result); |
| 2014 | 2014 |
| 2015 bool MayHaveIndexedCallbacksInPrototypeChain(); |
| 2016 |
| 2015 protected: | 2017 protected: |
| 2016 Smi* GenerateIdentityHash(); | 2018 Smi* GenerateIdentityHash(); |
| 2017 | 2019 |
| 2018 static Handle<Object> SetPropertyWithDefinedSetter(Handle<JSReceiver> object, | 2020 static Handle<Object> SetPropertyWithDefinedSetter(Handle<JSReceiver> object, |
| 2019 Handle<JSReceiver> setter, | 2021 Handle<JSReceiver> setter, |
| 2020 Handle<Object> value); | 2022 Handle<Object> value); |
| 2021 | 2023 |
| 2022 private: | 2024 private: |
| 2023 PropertyAttributes GetPropertyAttributeForResult(JSReceiver* receiver, | 2025 PropertyAttributes GetPropertyAttributeForResult(JSReceiver* receiver, |
| 2024 LookupResult* result, | 2026 LookupResult* result, |
| (...skipping 3259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5284 int CodeSize() { return SizeFor(body_size()); } | 5286 int CodeSize() { return SizeFor(body_size()); } |
| 5285 inline void CodeIterateBody(ObjectVisitor* v); | 5287 inline void CodeIterateBody(ObjectVisitor* v); |
| 5286 | 5288 |
| 5287 template<typename StaticVisitor> | 5289 template<typename StaticVisitor> |
| 5288 inline void CodeIterateBody(Heap* heap); | 5290 inline void CodeIterateBody(Heap* heap); |
| 5289 | 5291 |
| 5290 DECLARE_PRINTER(Code) | 5292 DECLARE_PRINTER(Code) |
| 5291 DECLARE_VERIFIER(Code) | 5293 DECLARE_VERIFIER(Code) |
| 5292 | 5294 |
| 5293 void ClearInlineCaches(); | 5295 void ClearInlineCaches(); |
| 5296 void ClearInlineCaches(Kind* kind); |
| 5297 void ClearInlineCaches(Kind kind); |
| 5298 |
| 5294 void ClearTypeFeedbackCells(Heap* heap); | 5299 void ClearTypeFeedbackCells(Heap* heap); |
| 5295 | 5300 |
| 5296 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); | 5301 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); |
| 5297 | 5302 |
| 5298 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, | 5303 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, |
| 5299 enum Age { | 5304 enum Age { |
| 5300 kNoAge = 0, | 5305 kNoAge = 0, |
| 5301 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) | 5306 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) |
| 5302 kAfterLastCodeAge, | 5307 kAfterLastCodeAge, |
| 5303 kLastCodeAge = kAfterLastCodeAge - 1, | 5308 kLastCodeAge = kAfterLastCodeAge - 1, |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5608 class IsShared: public BitField<bool, 22, 1> {}; | 5613 class IsShared: public BitField<bool, 22, 1> {}; |
| 5609 class FunctionWithPrototype: public BitField<bool, 23, 1> {}; | 5614 class FunctionWithPrototype: public BitField<bool, 23, 1> {}; |
| 5610 class DictionaryMap: public BitField<bool, 24, 1> {}; | 5615 class DictionaryMap: public BitField<bool, 24, 1> {}; |
| 5611 class OwnsDescriptors: public BitField<bool, 25, 1> {}; | 5616 class OwnsDescriptors: public BitField<bool, 25, 1> {}; |
| 5612 class IsObserved: public BitField<bool, 26, 1> {}; | 5617 class IsObserved: public BitField<bool, 26, 1> {}; |
| 5613 class Deprecated: public BitField<bool, 27, 1> {}; | 5618 class Deprecated: public BitField<bool, 27, 1> {}; |
| 5614 class IsFrozen: public BitField<bool, 28, 1> {}; | 5619 class IsFrozen: public BitField<bool, 28, 1> {}; |
| 5615 class IsUnstable: public BitField<bool, 29, 1> {}; | 5620 class IsUnstable: public BitField<bool, 29, 1> {}; |
| 5616 class IsMigrationTarget: public BitField<bool, 30, 1> {}; | 5621 class IsMigrationTarget: public BitField<bool, 30, 1> {}; |
| 5617 | 5622 |
| 5623 // Bit field 4. |
| 5624 inline uint32_t bit_field4(); |
| 5625 inline void set_bit_field4(uint32_t bits); |
| 5626 |
| 5627 class HasElementCallbacks: public BitField<int, 0, 1> {}; |
| 5628 |
| 5629 inline void set_has_element_callbacks(bool value); |
| 5630 inline bool has_element_callbacks(); |
| 5631 |
| 5618 // Tells whether the object in the prototype property will be used | 5632 // Tells whether the object in the prototype property will be used |
| 5619 // for instances created from this function. If the prototype | 5633 // for instances created from this function. If the prototype |
| 5620 // property is set to a value that is not a JSObject, the prototype | 5634 // property is set to a value that is not a JSObject, the prototype |
| 5621 // property will not be used to create instances of the function. | 5635 // property will not be used to create instances of the function. |
| 5622 // See ECMA-262, 13.2.2. | 5636 // See ECMA-262, 13.2.2. |
| 5623 inline void set_non_instance_prototype(bool value); | 5637 inline void set_non_instance_prototype(bool value); |
| 5624 inline bool has_non_instance_prototype(); | 5638 inline bool has_non_instance_prototype(); |
| 5625 | 5639 |
| 5626 // Tells whether function has special prototype property. If not, prototype | 5640 // Tells whether function has special prototype property. If not, prototype |
| 5627 // property will not be created when accessed (will return undefined), | 5641 // property will not be created when accessed (will return undefined), |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6162 // pointer if unused. When the map has transitions, the back pointer is | 6176 // pointer if unused. When the map has transitions, the back pointer is |
| 6163 // transferred to the transition array and accessed through an extra | 6177 // transferred to the transition array and accessed through an extra |
| 6164 // indirection. | 6178 // indirection. |
| 6165 static const int kTransitionsOrBackPointerOffset = | 6179 static const int kTransitionsOrBackPointerOffset = |
| 6166 kConstructorOffset + kPointerSize; | 6180 kConstructorOffset + kPointerSize; |
| 6167 static const int kDescriptorsOffset = | 6181 static const int kDescriptorsOffset = |
| 6168 kTransitionsOrBackPointerOffset + kPointerSize; | 6182 kTransitionsOrBackPointerOffset + kPointerSize; |
| 6169 static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize; | 6183 static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize; |
| 6170 static const int kDependentCodeOffset = kCodeCacheOffset + kPointerSize; | 6184 static const int kDependentCodeOffset = kCodeCacheOffset + kPointerSize; |
| 6171 static const int kBitField3Offset = kDependentCodeOffset + kPointerSize; | 6185 static const int kBitField3Offset = kDependentCodeOffset + kPointerSize; |
| 6172 static const int kSize = kBitField3Offset + kPointerSize; | 6186 static const int kBitField4Offset = kBitField3Offset + kPointerSize; |
| 6187 static const int kSize = kBitField4Offset + kPointerSize; |
| 6173 | 6188 |
| 6174 // Layout of pointer fields. Heap iteration code relies on them | 6189 // Layout of pointer fields. Heap iteration code relies on them |
| 6175 // being continuously allocated. | 6190 // being continuously allocated. |
| 6176 static const int kPointerFieldsBeginOffset = Map::kPrototypeOffset; | 6191 static const int kPointerFieldsBeginOffset = Map::kPrototypeOffset; |
| 6177 static const int kPointerFieldsEndOffset = kBitField3Offset + kPointerSize; | 6192 static const int kPointerFieldsEndOffset = kBitField3Offset + kPointerSize; |
| 6178 | 6193 |
| 6179 // Byte offsets within kInstanceSizesOffset. | 6194 // Byte offsets within kInstanceSizesOffset. |
| 6180 static const int kInstanceSizeOffset = kInstanceSizesOffset + 0; | 6195 static const int kInstanceSizeOffset = kInstanceSizesOffset + 0; |
| 6181 static const int kInObjectPropertiesByte = 1; | 6196 static const int kInObjectPropertiesByte = 1; |
| 6182 static const int kInObjectPropertiesOffset = | 6197 static const int kInObjectPropertiesOffset = |
| (...skipping 4238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10421 } else { | 10436 } else { |
| 10422 value &= ~(1 << bit_position); | 10437 value &= ~(1 << bit_position); |
| 10423 } | 10438 } |
| 10424 return value; | 10439 return value; |
| 10425 } | 10440 } |
| 10426 }; | 10441 }; |
| 10427 | 10442 |
| 10428 } } // namespace v8::internal | 10443 } } // namespace v8::internal |
| 10429 | 10444 |
| 10430 #endif // V8_OBJECTS_H_ | 10445 #endif // V8_OBJECTS_H_ |
| OLD | NEW |