WasmSection.cpp 871 B

1234567891011121314151617181920212223
  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. #include "WasmReaderPch.h"
  6. #ifdef ENABLE_WASM
  7. namespace Wasm
  8. {
  9. SectionInfo::SectionInfo(
  10. SectionFlag flag,
  11. SectionCode precedent,
  12. const char16* name,
  13. const uint32 nameLength
  14. ): flag(flag), precedent(precedent), name(name), nameLength(nameLength) {}
  15. SectionInfo SectionInfo::All[bSectLimit] = {
  16. #define WASM_SECTION(_, id, flag, precedent) {flag, bSect ## precedent, static_cast<const char16*>(_u(id)), sizeof(id)},
  17. #include "WasmSections.h"
  18. };
  19. }
  20. #endif