WasmReaderBase.h 873 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. #ifdef ENABLE_WASM
  7. namespace Wasm
  8. {
  9. struct FunctionBodyReaderInfo
  10. {
  11. Field(uint32) size;
  12. Field(intptr_t) startOffset;
  13. };
  14. class WasmReaderBase
  15. {
  16. public:
  17. virtual void SeekToFunctionBody(class WasmFunctionInfo* funcInfo) = 0;
  18. virtual bool IsCurrentFunctionCompleted() const = 0;
  19. virtual WasmOp ReadExpr() = 0;
  20. virtual void FunctionEnd() = 0;
  21. WasmNode m_currentNode;
  22. };
  23. } // namespace Wasm
  24. #endif // ENABLE_WASM