WasmDataSegment.cpp 857 B

123456789101112131415161718192021222324252627282930313233
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #include "WasmReaderPch.h"
  6. #ifdef ENABLE_WASM
  7. namespace Wasm
  8. {
  9. WasmDataSegment::WasmDataSegment(ArenaAllocator* alloc, WasmNode ie, uint32 _source_size, const byte* _data) :
  10. m_alloc(alloc),
  11. m_initExpr(ie),
  12. m_sourceSize(_source_size),
  13. m_data(_data)
  14. {
  15. }
  16. uint32 WasmDataSegment::GetSourceSize() const
  17. {
  18. return m_sourceSize;
  19. }
  20. const byte* WasmDataSegment::GetData() const
  21. {
  22. return m_data;
  23. }
  24. } // namespace Wasm
  25. #endif // ENABLE_WASM