mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-09-12 17:09:03 +02:00
wasi: fixed typo
This commit is contained in:
parent
20d320edf0
commit
3369ec279d
@ -96,7 +96,6 @@ begin
|
|||||||
CreateWebAssembly('canvasdraw.wasm',ImportObj)._then(@initEnv)
|
CreateWebAssembly('canvasdraw.wasm',ImportObj)._then(@initEnv)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
destructor TMyApplication.Destroy;
|
destructor TMyApplication.Destroy;
|
||||||
begin
|
begin
|
||||||
FreeAndNil(FWasiEnv);
|
FreeAndNil(FWasiEnv);
|
||||||
|
@ -302,9 +302,9 @@ type
|
|||||||
// Standard FPC exports.
|
// Standard FPC exports.
|
||||||
TWASIExports = Class External name 'Object' (TJSModulesExports)
|
TWASIExports = Class External name 'Object' (TJSModulesExports)
|
||||||
Public
|
Public
|
||||||
Procedure start; external name '_start';
|
Procedure start; external name '_start';
|
||||||
function AllocMem(aSize : Integer) : Integer; external name 'wasiAlloc';
|
function AllocMem(aSize : Integer) : Integer; external name 'wasiAlloc';
|
||||||
function freeMem(aLocation : Integer) : Integer; external name 'wasiFree';
|
function freeMem(aLocation : Integer) : Integer; external name 'wasiFree';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TGetConsoleInputBufferEvent = Reference to Procedure(Sender : TObject; Var AInput : TJSUint8Array);
|
TGetConsoleInputBufferEvent = Reference to Procedure(Sender : TObject; Var AInput : TJSUint8Array);
|
||||||
@ -342,11 +342,10 @@ type
|
|||||||
function getModuleMemoryDataView : TJSDataView;
|
function getModuleMemoryDataView : TJSDataView;
|
||||||
procedure AddExtension(aExtension : TImportExtension); virtual;
|
procedure AddExtension(aExtension : TImportExtension); virtual;
|
||||||
procedure RemoveExtension(aExtension : TImportExtension); virtual;
|
procedure RemoveExtension(aExtension : TImportExtension); virtual;
|
||||||
|
|
||||||
// IWASI calls
|
// IWASI calls
|
||||||
// !! Please keep these sorted !!
|
// !! Please keep these sorted !!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function args_get(argv, argvBuf : NativeInt) : NativeInt; virtual;
|
function args_get(argv, argvBuf : NativeInt) : NativeInt; virtual;
|
||||||
function args_sizes_get(argc, argvBufSize : NativeInt) : NativeInt; virtual;
|
function args_sizes_get(argc, argvBufSize : NativeInt) : NativeInt; virtual;
|
||||||
function clock_res_get(clockId, resolution: NativeInt): NativeInt; virtual;
|
function clock_res_get(clockId, resolution: NativeInt): NativeInt; virtual;
|
||||||
@ -357,7 +356,6 @@ type
|
|||||||
function fd_allocate (fd, offset, len : NativeInt) : NativeInt; virtual;
|
function fd_allocate (fd, offset, len : NativeInt) : NativeInt; virtual;
|
||||||
function fd_close(fd : NativeInt) : NativeInt; virtual;
|
function fd_close(fd : NativeInt) : NativeInt; virtual;
|
||||||
function fd_datasync (fd : NativeInt) : NativeInt; virtual;
|
function fd_datasync (fd : NativeInt) : NativeInt; virtual;
|
||||||
|
|
||||||
function fd_fdstat_get(fd,bufPtr : NativeInt) : NativeInt; virtual;
|
function fd_fdstat_get(fd,bufPtr : NativeInt) : NativeInt; virtual;
|
||||||
function fd_fdstat_set_flags (fd, flags: NativeInt) : NativeInt; virtual;
|
function fd_fdstat_set_flags (fd, flags: NativeInt) : NativeInt; virtual;
|
||||||
function fd_fdstat_set_rights (fd, fsRightsBase, fsRightsInheriting: NativeInt) : NativeInt; virtual;
|
function fd_fdstat_set_rights (fd, fsRightsBase, fsRightsInheriting: NativeInt) : NativeInt; virtual;
|
||||||
@ -467,12 +465,12 @@ type
|
|||||||
Function CreateWasiEnvironment : TPas2JSWASIEnvironment; virtual;
|
Function CreateWasiEnvironment : TPas2JSWASIEnvironment; virtual;
|
||||||
function GetTable: TJSWebAssemblyTable; virtual;
|
function GetTable: TJSWebAssemblyTable; virtual;
|
||||||
function GetMemory: TJSWebAssemblyMemory; virtual;
|
function GetMemory: TJSWebAssemblyMemory; virtual;
|
||||||
public
|
public
|
||||||
Constructor Create(aOwner : TComponent); override;
|
Constructor Create(aOwner : TComponent); override;
|
||||||
Destructor Destroy; override;
|
Destructor Destroy; override;
|
||||||
// Load and start webassembly. If DoRun is true, then Webassembly entry point is called.
|
// Load and start webassembly. If DoRun is true, then Webassembly entry point is called.
|
||||||
// If aBeforeStart is specified, then it is called prior to calling run, and can disable running.
|
// If aBeforeStart is specified, then it is called prior to calling run, and can disable running.
|
||||||
// If aAfterStart is specified, then it is called after calling run. It is not called is running was disabled.
|
// If aAfterStart is specified, then it is called after calling run. It is not called if running was disabled.
|
||||||
Procedure StartWebAssembly(aPath: string; DoRun : Boolean = True; aBeforeStart : TBeforeStartCallback = Nil; aAfterStart : TAfterStartCallback = Nil);
|
Procedure StartWebAssembly(aPath: string; DoRun : Boolean = True; aBeforeStart : TBeforeStartCallback = Nil; aAfterStart : TAfterStartCallback = Nil);
|
||||||
// Initial memory descriptor
|
// Initial memory descriptor
|
||||||
Property MemoryDescriptor : TJSWebAssemblyMemoryDescriptor Read FMemoryDescriptor Write FMemoryDescriptor;
|
Property MemoryDescriptor : TJSWebAssemblyMemoryDescriptor Read FMemoryDescriptor Write FMemoryDescriptor;
|
||||||
|
Loading…
Reference in New Issue
Block a user