PropertyIdArray.h 1010 B

12345678910111213141516171819202122
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. namespace Js
  7. {
  8. struct PropertyIdArray
  9. {
  10. uint32 count;
  11. bool hadDuplicates;
  12. bool has__proto__; // Only used for object literal
  13. bool hasNonSimpleParams;
  14. PropertyId elements[];
  15. PropertyIdArray(uint32 count, bool hadDuplicates = false, bool has__proto__ = false, bool hasNonSimpleParams = false) : count(count), hadDuplicates(hadDuplicates), has__proto__(has__proto__), hasNonSimpleParams(hasNonSimpleParams)
  16. {
  17. }
  18. size_t GetDataSize(uint32 extraSlots) const { return sizeof(PropertyIdArray) + sizeof(PropertyId) * (count + extraSlots); }
  19. };
  20. };