-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathWasmCustomReader.h
26 lines (24 loc) · 1.01 KB
/
WasmCustomReader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
#ifdef ENABLE_WASM
namespace Wasm
{
class WasmCustomReader : public WasmReaderBase
{
public:
WasmCustomReader(ArenaAllocator* alloc);
virtual void SeekToFunctionBody(class WasmFunctionInfo* funcInfo) override;
virtual bool IsCurrentFunctionCompleted() const override;
virtual WasmOp ReadExpr() override;
virtual void FunctionEnd() override;
virtual uint32 EstimateCurrentFunctionBytecodeSize() const override;
void AddNode(WasmNode node);
private:
JsUtil::List<WasmNode, ArenaAllocator> m_nodes;
uint32 m_state = 0;
};
} // namespace Wasm
#endif // ENABLE_WASM