mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
returns type SyntheticFunctionName for instanceof and cast function
This commit is contained in:
parent
0109c9e2af
commit
63c7d09cdc
@ -31,39 +31,39 @@ import de.inetsoftware.jwebassembly.wasm.ValueType;
|
|||||||
*/
|
*/
|
||||||
public class WasmOptions {
|
public class WasmOptions {
|
||||||
|
|
||||||
final FunctionManager functions = new FunctionManager();
|
final FunctionManager functions = new FunctionManager();
|
||||||
|
|
||||||
public final TypeManager types = new TypeManager( this );
|
public final TypeManager types = new TypeManager( this );
|
||||||
|
|
||||||
public final StringManager strings = new StringManager( this );
|
public final StringManager strings = new StringManager( this );
|
||||||
|
|
||||||
final CodeOptimizer optimizer = new CodeOptimizer();
|
final CodeOptimizer optimizer = new CodeOptimizer();
|
||||||
|
|
||||||
private final boolean debugNames;
|
private final boolean debugNames;
|
||||||
|
|
||||||
private final boolean useGC;
|
private final boolean useGC;
|
||||||
|
|
||||||
private final boolean useEH;
|
private final boolean useEH;
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
private final String sourceMapBase;
|
private final String sourceMapBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NonGC function for ref_eq polyfill.
|
* NonGC function for ref_eq polyfill.
|
||||||
*/
|
*/
|
||||||
public FunctionName ref_eq;
|
public FunctionName ref_eq;
|
||||||
|
|
||||||
private FunctionName get_i32;
|
private FunctionName get_i32;
|
||||||
|
|
||||||
private FunctionName callVirtual;
|
private FunctionName callVirtual;
|
||||||
|
|
||||||
private FunctionName callInterface;
|
private FunctionName callInterface;
|
||||||
|
|
||||||
private FunctionName instanceOf;
|
|
||||||
|
|
||||||
private FunctionName cast;
|
private SyntheticFunctionName instanceOf;
|
||||||
|
|
||||||
private int catchTypeCode;
|
private SyntheticFunctionName cast;
|
||||||
|
|
||||||
|
private int catchTypeCode;
|
||||||
|
|
||||||
private AnyType catchType = new AnyType() {
|
private AnyType catchType = new AnyType() {
|
||||||
@Override
|
@Override
|
||||||
@ -197,8 +197,8 @@ public class WasmOptions {
|
|||||||
* @return the name
|
* @return the name
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
FunctionName getInstanceOf() {
|
SyntheticFunctionName getInstanceOf() {
|
||||||
FunctionName name = instanceOf;
|
SyntheticFunctionName name = instanceOf;
|
||||||
if( name == null ) {
|
if( name == null ) {
|
||||||
instanceOf = name = types.createInstanceOf();
|
instanceOf = name = types.createInstanceOf();
|
||||||
functions.markAsNeeded( name );
|
functions.markAsNeeded( name );
|
||||||
@ -214,8 +214,8 @@ public class WasmOptions {
|
|||||||
* @return the name
|
* @return the name
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
FunctionName getCast() {
|
SyntheticFunctionName getCast() {
|
||||||
FunctionName name = cast;
|
SyntheticFunctionName name = cast;
|
||||||
if( name == null ) {
|
if( name == null ) {
|
||||||
cast = name = types.createCast();
|
cast = name = types.createCast();
|
||||||
functions.markAsNeeded( name );
|
functions.markAsNeeded( name );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user