[ nice-Bugs-1834802 ] random function compiler error
"SourceForge.net" <[email protected]> Mon, 19 Nov 2007 13:49:51 -0800
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1834802, was opened at 2007-11-19 13:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1834802&group_id=12788
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Isaac Gouy (igouy)
Assigned to: Nobody/Anonymous (nobody)
Summary: random function compiler error
Initial Comment:
I've probably reported this before, but now I've managed to isolate the problem to a few lines of code:
let int IM = 139968;
let int IA = 3877;
let int IC = 29573;
var int seed = 42;
double random(double max) {
seed = (seed * IA + IC) % IM;
return( max * seed / IM );
}
Nice compiler version 0.9.12 prerelease (build 2005.10.24, 05:01:51 UTC)
Compiled using JDK 1.4.2
$ /opt/nice-0.9.12/bin/nicec --sourcepath .. -a t.jar error
nice.lang: parsing
error: parsing
error: typechecking
error: generating code
error: linking
An exception has occured in the compiler
Please fill-in a bug report at the following webpage:
http://sourceforge.net/tracker/?func=add&group_id=12788&atid=112788
Stack trace:
Exception in thread "main" java.lang.Error: missing void type on stack
at gnu.bytecode.CodeAttr.popType(CodeAttr.java:215)
at gnu.bytecode.CodeAttr.emitPop(CodeAttr.java:240)
at nice.lang.inline.ReferenceOp.compilePrimitive(ReferenceOp.java:135)
at nice.lang.inline.ReferenceOp.compile(ReferenceOp.java:70)
at nice.lang.inline.ReferenceOp.compileJump(ReferenceOp.java:161)
at nice.lang.inline.ReferenceOp.compileJump(ReferenceOp.java:142)
at nice.lang.inline.BoolNotOp.compileJumpNot(BoolNotOp.java:90)
at gnu.expr.SimpleIfExp.compile(SimpleIfExp.java:44)
at gnu.expr.SimpleIfExp.compile(SimpleIfExp.java:29)
at gnu.expr.Expression.compileWithPosition(Expression.java:72)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1565)
at gnu.expr.LambdaExp.compileAsMethod(LambdaExp.java:1536)
at gnu.expr.LambdaExp.compileChildMethods(LambdaExp.java:1422)
at gnu.expr.ClassExp.compileChildMethods(ClassExp.java:573)
at gnu.expr.Compilation.compileAll(Compilation.java:1614)
at gnu.expr.Compilation.generate(Compilation.java:1588)
at gnu.expr.Compilation.compile(Compilation.java:1556)
at gnu.expr.Package.compileToFiles(Package.java:100)
at bossa.modules.Package.finishCompilation(Package.java:411)
at bossa.modules.Package.link(Package.java:388)
at mlsub.compilation.fun.lambda27(Unknown Source)
at mlsub.compilation.fun.apply1(Unknown Source)
at gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at nice.lang.fun.foreach(collections.nice:141)
at nice.lang.dispatch.foreach(Unknown Source)
at mlsub.compilation.fun.compileComponent(make.nice:33)
at mlsub.compilation.dispatch.compileComponent(Unknown Source)
at mlsub.compilation.fun$make.lambda24(Unknown Source)
at mlsub.compilation.fun$make.apply1(Unknown Source)
at gnu.expr.ModuleMethod.apply1(ModuleMethod.java:89)
at nice.lang.fun.foreach(collections.nice:141)
at nice.lang.dispatch.foreach(Unknown Source)
at mlsub.compilation.fun.make(make.nice:44)
at mlsub.compilation.dispatch.make(Unknown Source)
at nice.tools.compiler.fun.compile(interface.nice:40)
at nice.tools.compiler.dispatch.compile(Unknown Source)
at nice.tools.compiler.console.fun.compile(main.nice:170)
at nice.tools.compiler.console.dispatch.compile(Unknown Source)
at nice.tools.compiler.console.fun.main(main.nice:204)
at nice.tools.compiler.console.dispatch.main(Unknown Source)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1834802&group_id=12788
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/