WasmDataSegment.h 797 B

1234567891011121314151617181920212223242526
  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 Wasm
  7. {
  8. class WasmDataSegment
  9. {
  10. public:
  11. WasmDataSegment(ArenaAllocator* alloc, WasmNode initExpr, uint32 _source_size, const byte* _data);
  12. WasmNode GetOffsetExpr() const { return m_initExpr; }
  13. uint32 GetSourceSize() const;
  14. const byte* GetData() const;
  15. private:
  16. ArenaAllocator* m_alloc;
  17. WasmNode m_initExpr;
  18. uint32 m_sourceSize;
  19. const byte* m_data;
  20. };
  21. } // namespace Wasm