[Nice-commit] Nice/src/bossa/syntax NiceClass.java,1.42,1.43
Brought to you by:
bonniot
|
From: <bo...@us...> - 2003-04-19 13:35:54
|
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv24555/src/bossa/syntax
Modified Files:
NiceClass.java
Log Message:
Makes sure that class constructors are generated in the bytecode,
even when they are not used, and even in a client package regenerating
the class.
This is important, since Java code could rely on them.
Index: NiceClass.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceClass.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** NiceClass.java 18 Apr 2003 14:50:21 -0000 1.42
--- NiceClass.java 19 Apr 2003 13:35:50 -0000 1.43
***************
*** 441,444 ****
--- 441,450 ----
// but before compilation.
createFields();
+
+ // This needs to be done even if we don't recompile,
+ // since classes are always regenerated.
+ if (constructorMethod != null)
+ for (int i = 0; i < constructorMethod.length; i++)
+ constructorMethod[i].getCode();
}
***************
*** 452,459 ****
((ToplevelFunction) child).compile();
}
-
- if (constructorMethod != null)
- for (int i = 0; i < constructorMethod.length; i++)
- constructorMethod[i].getCode();
}
--- 458,461 ----
|