mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-14 18:43:27 +01:00
Let compiler fail if unsafe field was not resolve instead to produce corrupt output.
This commit is contained in:
parent
bc16b18083
commit
e485e149bd
@ -201,6 +201,14 @@ class FunctionManager {
|
||||
return state.alias == null ? name : state.alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the function manager is finish
|
||||
* @return the finish flag
|
||||
*/
|
||||
boolean isFinish() {
|
||||
return isFinish;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark the a function as scanned in the prepare phase. This should only occur with needed functions.
|
||||
*
|
||||
|
@ -472,6 +472,9 @@ class UnsafeManager {
|
||||
}
|
||||
}
|
||||
if( state == null ) {
|
||||
if( functions.isFinish() ) {
|
||||
throw new RuntimeException( name.signatureName );
|
||||
}
|
||||
// we are in the scan phase. The static code was not scanned yet.
|
||||
return "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user