2
0

WasmReaderPch.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. // Parser Includes
  7. #include "Common.h"
  8. #include "Runtime.h"
  9. #include "WasmReader.h"
  10. #ifdef ENABLE_WASM
  11. #if ENABLE_DEBUG_CONFIG_OPTIONS
  12. #define TRACE_WASM(condition, ...) \
  13. if (condition)\
  14. {\
  15. Output::Print(__VA_ARGS__); \
  16. Output::Print(_u("\n")); \
  17. Output::Flush(); \
  18. }
  19. // Level of tracing
  20. #define WASM_TRACE_BODY_CHECK(phase) (GetFunctionBody() ? PHASE_TRACE(phase, GetFunctionBody()) : PHASE_TRACE1(phase))
  21. #define DO_WASM_TRACE_BYTECODE WASM_TRACE_BODY_CHECK(Js::WasmBytecodePhase)
  22. #define DO_WASM_TRACE_DECODER WASM_TRACE_BODY_CHECK(Js::WasmReaderPhase)
  23. #define DO_WASM_TRACE_SECTION WASM_TRACE_BODY_CHECK(Js::WasmSectionPhase)
  24. #else
  25. #define TRACE_WASM(...)
  26. #define DO_WASM_TRACE_BYTECODE (false)
  27. #define DO_WASM_TRACE_DECODER (false)
  28. #define DO_WASM_TRACE_SECTION (false)
  29. #endif
  30. #define TRACE_WASM_BYTECODE(...) TRACE_WASM(DO_WASM_TRACE_BYTECODE, __VA_ARGS__)
  31. #define TRACE_WASM_DECODER(...) TRACE_WASM(DO_WASM_TRACE_DECODER, __VA_ARGS__)
  32. #define TRACE_WASM_SECTION(...) TRACE_WASM(DO_WASM_TRACE_SECTION, __VA_ARGS__)
  33. #include "WasmSection.h"
  34. #include "WasmReaderBase.h"
  35. #include "WasmBinaryReader.h"
  36. #include "WasmCustomReader.h"
  37. #include "WasmGlobal.h"
  38. #include "WasmDataSegment.h"
  39. #include "WasmElementSegment.h"
  40. #include "WasmByteCodeGenerator.h"
  41. #include "WasmSectionLimits.h"
  42. #endif