mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-19 14:29:13 +02:00
* WebAssembly: micro optimization in the invoke helper - omit the last 'return' instruction
This commit is contained in:
parent
8790c4303a
commit
55aa5ac129
@ -6001,7 +6001,7 @@ implementation
|
|||||||
Sec: TObjSection;
|
Sec: TObjSection;
|
||||||
IndirectFunctionTableMap: array of Integer;
|
IndirectFunctionTableMap: array of Integer;
|
||||||
|
|
||||||
procedure InvokeFuncType(typidx: Integer);
|
procedure InvokeFuncType(typidx: Integer; islast: Boolean);
|
||||||
var
|
var
|
||||||
ft: TWasmFuncType;
|
ft: TWasmFuncType;
|
||||||
i, nextofs: Integer;
|
i, nextofs: Integer;
|
||||||
@ -6118,8 +6118,9 @@ implementation
|
|||||||
internalerror(2025012501);
|
internalerror(2025012501);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{ return }
|
if not islast then
|
||||||
Sec.writeUInt8($0F);
|
{ return }
|
||||||
|
Sec.writeUInt8($0F);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function FuncIdx2TypeIdx(fi: Integer): Integer;
|
function FuncIdx2TypeIdx(fi: Integer): Integer;
|
||||||
@ -6252,7 +6253,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ end }
|
{ end }
|
||||||
Sec.writeUInt8($0B);
|
Sec.writeUInt8($0B);
|
||||||
InvokeFuncType(InvokableTypeIndices[i]);
|
InvokeFuncType(InvokableTypeIndices[i],i=(Length(InvokableTypeIndices)-1));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ end }
|
{ end }
|
||||||
|
Loading…
Reference in New Issue
Block a user