WebAssembly.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  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. namespace Js
  7. {
  8. class WebAssembly
  9. {
  10. #ifdef ENABLE_WASM
  11. public:
  12. // WebAssembly spec internal definition for page size
  13. static const uint PageSize = 64 * 1024;
  14. class EntryInfo
  15. {
  16. public:
  17. static FunctionInfo Compile;
  18. static FunctionInfo Validate;
  19. static FunctionInfo Instantiate;
  20. };
  21. static Var EntryCompile(RecyclableObject* function, CallInfo callInfo, ...);
  22. static Var EntryValidate(RecyclableObject* function, CallInfo callInfo, ...);
  23. static Var EntryInstantiate(RecyclableObject* function, CallInfo callInfo, ...);
  24. static uint32 ToNonWrappingUint32(Var val, ScriptContext * ctx);
  25. static void ReadBufferSource(Var val, ScriptContext * ctx, _Out_ BYTE** buffer, _Out_ uint *byteLength);
  26. static void CheckSignature(ScriptContext * scriptContext, Wasm::WasmSignature * sig1, Wasm::WasmSignature * sig2);
  27. static uint GetSignatureSize();
  28. #endif
  29. };
  30. }