| 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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 EXTERNAL_BYTE_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE | 716 EXTERNAL_BYTE_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE |
| 717 EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE, | 717 EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE, |
| 718 EXTERNAL_SHORT_ARRAY_TYPE, | 718 EXTERNAL_SHORT_ARRAY_TYPE, |
| 719 EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE, | 719 EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE, |
| 720 EXTERNAL_INT_ARRAY_TYPE, | 720 EXTERNAL_INT_ARRAY_TYPE, |
| 721 EXTERNAL_UNSIGNED_INT_ARRAY_TYPE, | 721 EXTERNAL_UNSIGNED_INT_ARRAY_TYPE, |
| 722 EXTERNAL_FLOAT_ARRAY_TYPE, | 722 EXTERNAL_FLOAT_ARRAY_TYPE, |
| 723 EXTERNAL_DOUBLE_ARRAY_TYPE, | 723 EXTERNAL_DOUBLE_ARRAY_TYPE, |
| 724 EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE | 724 EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE |
| 725 FIXED_DOUBLE_ARRAY_TYPE, | 725 FIXED_DOUBLE_ARRAY_TYPE, |
| 726 CONSTANT_POOL_ARRAY_TYPE, | |
| 727 FILLER_TYPE, // LAST_DATA_TYPE | 726 FILLER_TYPE, // LAST_DATA_TYPE |
| 728 | 727 |
| 729 // Structs. | 728 // Structs. |
| 730 DECLARED_ACCESSOR_DESCRIPTOR_TYPE, | 729 DECLARED_ACCESSOR_DESCRIPTOR_TYPE, |
| 731 DECLARED_ACCESSOR_INFO_TYPE, | 730 DECLARED_ACCESSOR_INFO_TYPE, |
| 732 EXECUTABLE_ACCESSOR_INFO_TYPE, | 731 EXECUTABLE_ACCESSOR_INFO_TYPE, |
| 733 ACCESSOR_PAIR_TYPE, | 732 ACCESSOR_PAIR_TYPE, |
| 734 ACCESS_CHECK_INFO_TYPE, | 733 ACCESS_CHECK_INFO_TYPE, |
| 735 INTERCEPTOR_INFO_TYPE, | 734 INTERCEPTOR_INFO_TYPE, |
| 736 CALL_HANDLER_INFO_TYPE, | 735 CALL_HANDLER_INFO_TYPE, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 747 ALIASED_ARGUMENTS_ENTRY_TYPE, | 746 ALIASED_ARGUMENTS_ENTRY_TYPE, |
| 748 BOX_TYPE, | 747 BOX_TYPE, |
| 749 // The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT | 748 // The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT |
| 750 // is defined. However as include/v8.h contain some of the instance type | 749 // is defined. However as include/v8.h contain some of the instance type |
| 751 // constants always having them avoids them getting different numbers | 750 // constants always having them avoids them getting different numbers |
| 752 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not. | 751 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not. |
| 753 DEBUG_INFO_TYPE, | 752 DEBUG_INFO_TYPE, |
| 754 BREAK_POINT_INFO_TYPE, | 753 BREAK_POINT_INFO_TYPE, |
| 755 | 754 |
| 756 FIXED_ARRAY_TYPE, | 755 FIXED_ARRAY_TYPE, |
| 756 CONSTANT_POOL_ARRAY_TYPE, |
| 757 SHARED_FUNCTION_INFO_TYPE, | 757 SHARED_FUNCTION_INFO_TYPE, |
| 758 | 758 |
| 759 JS_MESSAGE_OBJECT_TYPE, | 759 JS_MESSAGE_OBJECT_TYPE, |
| 760 | 760 |
| 761 // All the following types are subtypes of JSReceiver, which corresponds to | 761 // All the following types are subtypes of JSReceiver, which corresponds to |
| 762 // objects in the JS sense. The first and the last type in this range are | 762 // objects in the JS sense. The first and the last type in this range are |
| 763 // the two forms of function. This organization enables using the same | 763 // the two forms of function. This organization enables using the same |
| 764 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the | 764 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the |
| 765 // NONCALLABLE_JS_OBJECT range. | 765 // NONCALLABLE_JS_OBJECT range. |
| 766 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE | 766 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 class AllocationSite; | 876 class AllocationSite; |
| 877 class AllocationSiteCreationContext; | 877 class AllocationSiteCreationContext; |
| 878 class AllocationSiteUsageContext; | 878 class AllocationSiteUsageContext; |
| 879 class DictionaryElementsAccessor; | 879 class DictionaryElementsAccessor; |
| 880 class ElementsAccessor; | 880 class ElementsAccessor; |
| 881 class Failure; | 881 class Failure; |
| 882 class FixedArrayBase; | 882 class FixedArrayBase; |
| 883 class GlobalObject; | 883 class GlobalObject; |
| 884 class ObjectVisitor; | 884 class ObjectVisitor; |
| 885 class StringStream; | 885 class StringStream; |
| 886 class Type; | 886 // We cannot just say "class Type;" if it is created from a template... =8-? |
| 887 template<class> class TypeImpl; |
| 888 struct HeapTypeConfig; |
| 889 typedef TypeImpl<HeapTypeConfig> Type; |
| 887 | 890 |
| 888 | 891 |
| 889 // A template-ized version of the IsXXX functions. | 892 // A template-ized version of the IsXXX functions. |
| 890 template <class C> inline bool Is(Object* obj); | 893 template <class C> inline bool Is(Object* obj); |
| 891 | 894 |
| 892 #ifdef VERIFY_HEAP | 895 #ifdef VERIFY_HEAP |
| 893 #define DECLARE_VERIFIER(Name) void Name##Verify(); | 896 #define DECLARE_VERIFIER(Name) void Name##Verify(); |
| 894 #else | 897 #else |
| 895 #define DECLARE_VERIFIER(Name) | 898 #define DECLARE_VERIFIER(Name) |
| 896 #endif | 899 #endif |
| (...skipping 4274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5171 inline ExtraICState extended_extra_ic_state(); // Only valid for | 5174 inline ExtraICState extended_extra_ic_state(); // Only valid for |
| 5172 // non-call IC stubs. | 5175 // non-call IC stubs. |
| 5173 static bool needs_extended_extra_ic_state(Kind kind) { | 5176 static bool needs_extended_extra_ic_state(Kind kind) { |
| 5174 // TODO(danno): This is a bit of a hack right now since there are still | 5177 // TODO(danno): This is a bit of a hack right now since there are still |
| 5175 // clients of this API that pass "extra" values in for argc. These clients | 5178 // clients of this API that pass "extra" values in for argc. These clients |
| 5176 // should be retrofitted to used ExtendedExtraICState. | 5179 // should be retrofitted to used ExtendedExtraICState. |
| 5177 return kind == COMPARE_NIL_IC || kind == TO_BOOLEAN_IC || | 5180 return kind == COMPARE_NIL_IC || kind == TO_BOOLEAN_IC || |
| 5178 kind == BINARY_OP_IC; | 5181 kind == BINARY_OP_IC; |
| 5179 } | 5182 } |
| 5180 | 5183 |
| 5184 bool IsContextual(); // Only valid for IC stubs. |
| 5181 inline StubType type(); // Only valid for monomorphic IC stubs. | 5185 inline StubType type(); // Only valid for monomorphic IC stubs. |
| 5182 inline int arguments_count(); // Only valid for call IC stubs. | 5186 inline int arguments_count(); // Only valid for call IC stubs. |
| 5183 | 5187 |
| 5184 // Testers for IC stub kinds. | 5188 // Testers for IC stub kinds. |
| 5185 inline bool is_inline_cache_stub(); | 5189 inline bool is_inline_cache_stub(); |
| 5186 inline bool is_debug_stub(); | 5190 inline bool is_debug_stub(); |
| 5187 inline bool is_handler() { return kind() == HANDLER; } | 5191 inline bool is_handler() { return kind() == HANDLER; } |
| 5188 inline bool is_load_stub() { return kind() == LOAD_IC; } | 5192 inline bool is_load_stub() { return kind() == LOAD_IC; } |
| 5189 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } | 5193 inline bool is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } |
| 5190 inline bool is_store_stub() { return kind() == STORE_IC; } | 5194 inline bool is_store_stub() { return kind() == STORE_IC; } |
| (...skipping 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8155 }; | 8159 }; |
| 8156 | 8160 |
| 8157 | 8161 |
| 8158 class AllocationSite: public Struct { | 8162 class AllocationSite: public Struct { |
| 8159 public: | 8163 public: |
| 8160 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; | 8164 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; |
| 8161 static const double kPretenureRatio; | 8165 static const double kPretenureRatio; |
| 8162 static const int kPretenureMinimumCreated = 100; | 8166 static const int kPretenureMinimumCreated = 100; |
| 8163 | 8167 |
| 8164 // Values for pretenure decision field. | 8168 // Values for pretenure decision field. |
| 8165 enum { | 8169 enum PretenureDecision { |
| 8166 kUndecided = 0, | 8170 kUndecided = 0, |
| 8167 kDontTenure = 1, | 8171 kDontTenure = 1, |
| 8168 kTenure = 2, | 8172 kTenure = 2, |
| 8169 kZombie = 3 | 8173 kZombie = 3, |
| 8174 kLastPretenureDecisionValue = kZombie |
| 8170 }; | 8175 }; |
| 8171 | 8176 |
| 8172 DECL_ACCESSORS(transition_info, Object) | 8177 DECL_ACCESSORS(transition_info, Object) |
| 8173 // nested_site threads a list of sites that represent nested literals | 8178 // nested_site threads a list of sites that represent nested literals |
| 8174 // walked in a particular order. So [[1, 2], 1, 2] will have one | 8179 // walked in a particular order. So [[1, 2], 1, 2] will have one |
| 8175 // nested_site, but [[1, 2], 3, [4]] will have a list of two. | 8180 // nested_site, but [[1, 2], 3, [4]] will have a list of two. |
| 8176 DECL_ACCESSORS(nested_site, Object) | 8181 DECL_ACCESSORS(nested_site, Object) |
| 8177 DECL_ACCESSORS(memento_found_count, Smi) | 8182 DECL_ACCESSORS(pretenure_data, Smi) |
| 8178 DECL_ACCESSORS(memento_create_count, Smi) | 8183 DECL_ACCESSORS(pretenure_create_count, Smi) |
| 8179 // TODO(mvstanton): we don't need a whole integer to record pretenure | |
| 8180 // decision. Consider sharing space with memento_found_count. | |
| 8181 DECL_ACCESSORS(pretenure_decision, Smi) | |
| 8182 DECL_ACCESSORS(dependent_code, DependentCode) | 8184 DECL_ACCESSORS(dependent_code, DependentCode) |
| 8183 DECL_ACCESSORS(weak_next, Object) | 8185 DECL_ACCESSORS(weak_next, Object) |
| 8184 | 8186 |
| 8185 inline void Initialize(); | 8187 inline void Initialize(); |
| 8186 | 8188 |
| 8187 // This method is expensive, it should only be called for reporting. | 8189 // This method is expensive, it should only be called for reporting. |
| 8188 bool IsNestedSite(); | 8190 bool IsNestedSite(); |
| 8189 | 8191 |
| 8192 // transition_info bitfields, for constructed array transition info. |
| 8190 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; | 8193 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; |
| 8191 class UnusedBits: public BitField<int, 15, 14> {}; | 8194 class UnusedBits: public BitField<int, 15, 14> {}; |
| 8192 class DoNotInlineBit: public BitField<bool, 29, 1> {}; | 8195 class DoNotInlineBit: public BitField<bool, 29, 1> {}; |
| 8193 | 8196 |
| 8197 // Bitfields for pretenure_data |
| 8198 class MementoFoundCountBits: public BitField<int, 0, 28> {}; |
| 8199 class PretenureDecisionBits: public BitField<PretenureDecision, 28, 2> {}; |
| 8200 STATIC_ASSERT(PretenureDecisionBits::kMax >= kLastPretenureDecisionValue); |
| 8201 |
| 8194 // Increments the mementos found counter and returns true when the first | 8202 // Increments the mementos found counter and returns true when the first |
| 8195 // memento was found for a given allocation site. | 8203 // memento was found for a given allocation site. |
| 8196 inline bool IncrementMementoFoundCount(); | 8204 inline bool IncrementMementoFoundCount(); |
| 8197 | 8205 |
| 8198 inline void IncrementMementoCreateCount(); | 8206 inline void IncrementMementoCreateCount(); |
| 8199 | 8207 |
| 8200 PretenureFlag GetPretenureMode() { | 8208 PretenureFlag GetPretenureMode(); |
| 8201 int mode = pretenure_decision()->value(); | 8209 |
| 8202 // Zombie objects "decide" to be untenured. | 8210 void ResetPretenureDecision(); |
| 8203 return (mode == kTenure) ? TENURED : NOT_TENURED; | 8211 |
| 8212 PretenureDecision pretenure_decision() { |
| 8213 int value = pretenure_data()->value(); |
| 8214 return PretenureDecisionBits::decode(value); |
| 8215 } |
| 8216 |
| 8217 void set_pretenure_decision(PretenureDecision decision) { |
| 8218 int value = pretenure_data()->value(); |
| 8219 set_pretenure_data( |
| 8220 Smi::FromInt(PretenureDecisionBits::update(value, decision)), |
| 8221 SKIP_WRITE_BARRIER); |
| 8222 } |
| 8223 |
| 8224 int memento_found_count() { |
| 8225 int value = pretenure_data()->value(); |
| 8226 return MementoFoundCountBits::decode(value); |
| 8227 } |
| 8228 |
| 8229 inline void set_memento_found_count(int count); |
| 8230 |
| 8231 int memento_create_count() { |
| 8232 return pretenure_create_count()->value(); |
| 8233 } |
| 8234 |
| 8235 void set_memento_create_count(int count) { |
| 8236 set_pretenure_create_count(Smi::FromInt(count), SKIP_WRITE_BARRIER); |
| 8204 } | 8237 } |
| 8205 | 8238 |
| 8206 // The pretenuring decision is made during gc, and the zombie state allows | 8239 // The pretenuring decision is made during gc, and the zombie state allows |
| 8207 // us to recognize when an allocation site is just being kept alive because | 8240 // us to recognize when an allocation site is just being kept alive because |
| 8208 // a later traversal of new space may discover AllocationMementos that point | 8241 // a later traversal of new space may discover AllocationMementos that point |
| 8209 // to this AllocationSite. | 8242 // to this AllocationSite. |
| 8210 bool IsZombie() { | 8243 bool IsZombie() { |
| 8211 return pretenure_decision()->value() == kZombie; | 8244 return pretenure_decision() == kZombie; |
| 8212 } | 8245 } |
| 8213 | 8246 |
| 8214 inline void MarkZombie(); | 8247 inline void MarkZombie(); |
| 8215 | 8248 |
| 8216 inline bool DigestPretenuringFeedback(); | 8249 inline bool DigestPretenuringFeedback(); |
| 8217 | 8250 |
| 8218 ElementsKind GetElementsKind() { | 8251 ElementsKind GetElementsKind() { |
| 8219 ASSERT(!SitePointsToLiteral()); | 8252 ASSERT(!SitePointsToLiteral()); |
| 8220 int value = Smi::cast(transition_info())->value(); | 8253 int value = Smi::cast(transition_info())->value(); |
| 8221 return ElementsKindBits::decode(value); | 8254 return ElementsKindBits::decode(value); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 8245 return transition_info()->IsJSArray() || transition_info()->IsJSObject(); | 8278 return transition_info()->IsJSArray() || transition_info()->IsJSObject(); |
| 8246 } | 8279 } |
| 8247 | 8280 |
| 8248 MaybeObject* DigestTransitionFeedback(ElementsKind to_kind); | 8281 MaybeObject* DigestTransitionFeedback(ElementsKind to_kind); |
| 8249 | 8282 |
| 8250 enum Reason { | 8283 enum Reason { |
| 8251 TENURING, | 8284 TENURING, |
| 8252 TRANSITIONS | 8285 TRANSITIONS |
| 8253 }; | 8286 }; |
| 8254 | 8287 |
| 8255 void AddDependentCompilationInfo(Reason reason, CompilationInfo* info); | 8288 static void AddDependentCompilationInfo(Handle<AllocationSite> site, |
| 8256 void AddDependentCode(Reason reason, Handle<Code> code); | 8289 Reason reason, |
| 8290 CompilationInfo* info); |
| 8257 | 8291 |
| 8258 DECLARE_PRINTER(AllocationSite) | 8292 DECLARE_PRINTER(AllocationSite) |
| 8259 DECLARE_VERIFIER(AllocationSite) | 8293 DECLARE_VERIFIER(AllocationSite) |
| 8260 | 8294 |
| 8261 static inline AllocationSite* cast(Object* obj); | 8295 static inline AllocationSite* cast(Object* obj); |
| 8262 static inline AllocationSiteMode GetMode( | 8296 static inline AllocationSiteMode GetMode( |
| 8263 ElementsKind boilerplate_elements_kind); | 8297 ElementsKind boilerplate_elements_kind); |
| 8264 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); | 8298 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); |
| 8265 static inline bool CanTrack(InstanceType type); | 8299 static inline bool CanTrack(InstanceType type); |
| 8266 | 8300 |
| 8267 static const int kTransitionInfoOffset = HeapObject::kHeaderSize; | 8301 static const int kTransitionInfoOffset = HeapObject::kHeaderSize; |
| 8268 static const int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize; | 8302 static const int kNestedSiteOffset = kTransitionInfoOffset + kPointerSize; |
| 8269 static const int kMementoFoundCountOffset = kNestedSiteOffset + kPointerSize; | 8303 static const int kPretenureDataOffset = kNestedSiteOffset + kPointerSize; |
| 8270 static const int kMementoCreateCountOffset = | 8304 static const int kPretenureCreateCountOffset = |
| 8271 kMementoFoundCountOffset + kPointerSize; | 8305 kPretenureDataOffset + kPointerSize; |
| 8272 static const int kPretenureDecisionOffset = | |
| 8273 kMementoCreateCountOffset + kPointerSize; | |
| 8274 static const int kDependentCodeOffset = | 8306 static const int kDependentCodeOffset = |
| 8275 kPretenureDecisionOffset + kPointerSize; | 8307 kPretenureCreateCountOffset + kPointerSize; |
| 8276 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize; | 8308 static const int kWeakNextOffset = kDependentCodeOffset + kPointerSize; |
| 8277 static const int kSize = kWeakNextOffset + kPointerSize; | 8309 static const int kSize = kWeakNextOffset + kPointerSize; |
| 8278 | 8310 |
| 8279 // During mark compact we need to take special care for the dependent code | 8311 // During mark compact we need to take special care for the dependent code |
| 8280 // field. | 8312 // field. |
| 8281 static const int kPointerFieldsBeginOffset = kTransitionInfoOffset; | 8313 static const int kPointerFieldsBeginOffset = kTransitionInfoOffset; |
| 8282 static const int kPointerFieldsEndOffset = kDependentCodeOffset; | 8314 static const int kPointerFieldsEndOffset = kDependentCodeOffset; |
| 8283 | 8315 |
| 8284 // For other visitors, use the fixed body descriptor below. | 8316 // For other visitors, use the fixed body descriptor below. |
| 8285 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, | 8317 typedef FixedBodyDescriptor<HeapObject::kHeaderSize, |
| 8286 kDependentCodeOffset + kPointerSize, | 8318 kDependentCodeOffset + kPointerSize, |
| 8287 kSize> BodyDescriptor; | 8319 kSize> BodyDescriptor; |
| 8288 | 8320 |
| 8289 private: | 8321 private: |
| 8290 inline DependentCode::DependencyGroup ToDependencyGroup(Reason reason); | 8322 inline DependentCode::DependencyGroup ToDependencyGroup(Reason reason); |
| 8291 bool PretenuringDecisionMade() { | 8323 bool PretenuringDecisionMade() { |
| 8292 return pretenure_decision()->value() != kUndecided; | 8324 return pretenure_decision() != kUndecided; |
| 8293 } | 8325 } |
| 8294 | 8326 |
| 8295 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); | 8327 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); |
| 8296 }; | 8328 }; |
| 8297 | 8329 |
| 8298 | 8330 |
| 8299 class AllocationMemento: public Struct { | 8331 class AllocationMemento: public Struct { |
| 8300 public: | 8332 public: |
| 8301 static const int kAllocationSiteOffset = HeapObject::kHeaderSize; | 8333 static const int kAllocationSiteOffset = HeapObject::kHeaderSize; |
| 8302 static const int kSize = kAllocationSiteOffset + kPointerSize; | 8334 static const int kSize = kAllocationSiteOffset + kPointerSize; |
| 8303 | 8335 |
| 8304 DECL_ACCESSORS(allocation_site, Object) | 8336 DECL_ACCESSORS(allocation_site, Object) |
| 8305 | 8337 |
| 8306 bool IsValid() { | 8338 bool IsValid() { |
| 8307 return allocation_site()->IsAllocationSite() && | 8339 return allocation_site()->IsAllocationSite() && |
| 8308 !AllocationSite::cast(allocation_site())->IsZombie(); | 8340 !AllocationSite::cast(allocation_site())->IsZombie(); |
| 8309 } | 8341 } |
| 8310 AllocationSite* GetAllocationSite() { | 8342 AllocationSite* GetAllocationSite() { |
| 8311 ASSERT(IsValid()); | 8343 ASSERT(IsValid()); |
| 8312 return AllocationSite::cast(allocation_site()); | 8344 return AllocationSite::cast(allocation_site()); |
| 8313 } | 8345 } |
| 8314 | 8346 |
| 8315 DECLARE_PRINTER(AllocationMemento) | 8347 DECLARE_PRINTER(AllocationMemento) |
| 8316 DECLARE_VERIFIER(AllocationMemento) | 8348 DECLARE_VERIFIER(AllocationMemento) |
| 8317 | 8349 |
| 8318 // Returns NULL if no AllocationMemento is available for object. | |
| 8319 static AllocationMemento* FindForHeapObject(HeapObject* object, | |
| 8320 bool in_GC = false); | |
| 8321 static inline AllocationMemento* cast(Object* obj); | 8350 static inline AllocationMemento* cast(Object* obj); |
| 8322 | 8351 |
| 8323 private: | 8352 private: |
| 8324 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento); | 8353 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento); |
| 8325 }; | 8354 }; |
| 8326 | 8355 |
| 8327 | 8356 |
| 8328 // Representation of a slow alias as part of a non-strict arguments objects. | 8357 // Representation of a slow alias as part of a non-strict arguments objects. |
| 8329 // For fast aliases (if HasNonStrictArgumentsElements()): | 8358 // For fast aliases (if HasNonStrictArgumentsElements()): |
| 8330 // - the parameter map contains an index into the context | 8359 // - the parameter map contains an index into the context |
| (...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10667 } else { | 10696 } else { |
| 10668 value &= ~(1 << bit_position); | 10697 value &= ~(1 << bit_position); |
| 10669 } | 10698 } |
| 10670 return value; | 10699 return value; |
| 10671 } | 10700 } |
| 10672 }; | 10701 }; |
| 10673 | 10702 |
| 10674 } } // namespace v8::internal | 10703 } } // namespace v8::internal |
| 10675 | 10704 |
| 10676 #endif // V8_OBJECTS_H_ | 10705 #endif // V8_OBJECTS_H_ |
| OLD | NEW |