mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
correct sourceFile and className on writing
This commit is contained in:
parent
ff6de221f8
commit
77be20ed57
@ -298,6 +298,8 @@ public class ModuleGenerator {
|
|||||||
*/
|
*/
|
||||||
public void finish() throws IOException {
|
public void finish() throws IOException {
|
||||||
for( Iterator<FunctionName> it = functions.getWriteLater(); it.hasNext(); ) {
|
for( Iterator<FunctionName> it = functions.getWriteLater(); it.hasNext(); ) {
|
||||||
|
sourceFile = null; // clear previous value for the case an IO exception occur
|
||||||
|
className = null;
|
||||||
FunctionName next = it.next();
|
FunctionName next = it.next();
|
||||||
if( next instanceof SyntheticFunctionName ) {
|
if( next instanceof SyntheticFunctionName ) {
|
||||||
writeMethodImpl( next, true, ((SyntheticFunctionName)next).getCodeBuilder( watParser ) );
|
writeMethodImpl( next, true, ((SyntheticFunctionName)next).getCodeBuilder( watParser ) );
|
||||||
@ -306,6 +308,8 @@ public class ModuleGenerator {
|
|||||||
if( classFile == null ) {
|
if( classFile == null ) {
|
||||||
throw new WasmException( "Missing function: " + next.signatureName, -1 );
|
throw new WasmException( "Missing function: " + next.signatureName, -1 );
|
||||||
} else {
|
} else {
|
||||||
|
sourceFile = classFile.getSourceFile();
|
||||||
|
className = classFile.getThisClass().getName();
|
||||||
MethodInfo method = classFile.getMethod( next.methodName, next.signature );
|
MethodInfo method = classFile.getMethod( next.methodName, next.signature );
|
||||||
if( method != null ) {
|
if( method != null ) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user