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 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 }; | 1744 }; |
1745 | 1745 |
1746 | 1746 |
1747 class ArrayConstructorStubBase : public HydrogenCodeStub { | 1747 class ArrayConstructorStubBase : public HydrogenCodeStub { |
1748 public: | 1748 public: |
1749 ArrayConstructorStubBase(ElementsKind kind, bool disable_allocation_sites) { | 1749 ArrayConstructorStubBase(ElementsKind kind, bool disable_allocation_sites) { |
1750 // It only makes sense to override local allocation site behavior | 1750 // It only makes sense to override local allocation site behavior |
1751 // if there is a difference between the global allocation site policy | 1751 // if there is a difference between the global allocation site policy |
1752 // for an ElementsKind and the desired usage of the stub. | 1752 // for an ElementsKind and the desired usage of the stub. |
1753 ASSERT(!disable_allocation_sites || | 1753 ASSERT(!disable_allocation_sites || |
1754 AllocationSiteInfo::GetMode(kind) == TRACK_ALLOCATION_SITE); | 1754 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE); |
1755 bit_field_ = ElementsKindBits::encode(kind) | | 1755 bit_field_ = ElementsKindBits::encode(kind) | |
1756 DisableAllocationSitesBits::encode(disable_allocation_sites); | 1756 DisableAllocationSitesBits::encode(disable_allocation_sites); |
1757 } | 1757 } |
1758 | 1758 |
1759 ElementsKind elements_kind() const { | 1759 ElementsKind elements_kind() const { |
1760 return ElementsKindBits::decode(bit_field_); | 1760 return ElementsKindBits::decode(bit_field_); |
1761 } | 1761 } |
1762 | 1762 |
1763 bool disable_allocation_sites() const { | 1763 bool disable_allocation_sites() const { |
1764 return DisableAllocationSitesBits::decode(bit_field_); | 1764 return DisableAllocationSitesBits::decode(bit_field_); |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2164 | 2164 |
2165 // The current function entry hook. | 2165 // The current function entry hook. |
2166 static FunctionEntryHook entry_hook_; | 2166 static FunctionEntryHook entry_hook_; |
2167 | 2167 |
2168 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2168 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
2169 }; | 2169 }; |
2170 | 2170 |
2171 } } // namespace v8::internal | 2171 } } // namespace v8::internal |
2172 | 2172 |
2173 #endif // V8_CODE_STUBS_H_ | 2173 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |