mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 23:47:51 +01:00
accept also AnyType as block type
This commit is contained in:
parent
85386f4191
commit
442b582dfc
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2017 - 2019 Volker Berlin (i-net software)
|
* Copyright 2017 - 2020 Volker Berlin (i-net software)
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -1202,7 +1202,7 @@ public class BinaryModuleWriter extends ModuleWriter implements InstructionOpcod
|
|||||||
break;
|
break;
|
||||||
case IF:
|
case IF:
|
||||||
codeStream.writeOpCode( IF );
|
codeStream.writeOpCode( IF );
|
||||||
codeStream.writeValueType( ((ValueType)data) );
|
codeStream.writeValueType( ((AnyType)data) );
|
||||||
break;
|
break;
|
||||||
case ELSE:
|
case ELSE:
|
||||||
codeStream.writeOpCode( ELSE );
|
codeStream.writeOpCode( ELSE );
|
||||||
@ -1215,7 +1215,7 @@ public class BinaryModuleWriter extends ModuleWriter implements InstructionOpcod
|
|||||||
break;
|
break;
|
||||||
case BLOCK:
|
case BLOCK:
|
||||||
codeStream.writeOpCode( BLOCK );
|
codeStream.writeOpCode( BLOCK );
|
||||||
codeStream.writeValueType( data == null ? ValueType.empty : (ValueType)data ); // void; the return type of the block.
|
codeStream.writeValueType( data == null ? ValueType.empty : (AnyType)data ); // void; the return type of the block.
|
||||||
break;
|
break;
|
||||||
case BR:
|
case BR:
|
||||||
codeStream.writeOpCode( BR );
|
codeStream.writeOpCode( BR );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user