[ nice-Bugs-798317 ] linker problem?
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #798317, was opened at 2003-09-01 02:06
Message generated for change (Comment added) made by bonniot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=798317&group_id=12788
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Isaac Gouy (igouy)
Assigned to: Nobody/Anonymous (nobody)
Summary: linker problem?
Initial Comment:
Refer to SieveBeginnerExample.
I moved the 'var count' declaration inside the loop like
this:
let stop = 8192;
let isPrime = new boolean[stop+1];
while (n-- > 0){
var count = 0;
and this happened:
I:\pls\Nice\bench 2\sieve>nicec --sourcepath=.. -d=. -a
sieve.jar sieve
nice.lang: parsing
sieve: parsing
sieve: typechecking
sieve: generating code
sieve: linking
<unknown>:0: Literals: Internal error:java.lang.Error:
gnu.expr.PrimProcedure does not implement
Externalizable
java.lang.Error: gnu.expr.PrimProcedure does not
implement Externalizable
at gnu.expr.LitTable.error(LitTable.java:72)
at gnu.expr.LitTable.writeObject(LitTable.java:207)
at gnu.expr.LitTable.emit(LitTable.java:35)
at gnu.expr.Literal.emit(Literal.java:118)
at gnu.expr.LambdaExp.generateClassInit
(LambdaExp.java:1125)
at gnu.expr.Compilation.compileAll
(Compilation.java:1604)
at gnu.expr.Compilation.generate
(Compilation.java:1571)
at gnu.expr.Compilation.compile
(Compilation.java:1539)
at gnu.expr.Package.compileToFiles
(Package.java:100)
at bossa.modules.Package.finishCompilation
(Package.java:362)
at bossa.modules.Package.link(Package.java:341)
at mlsub.compilation.fun.lambda23
(~/Nice/src/mlsub/compilation:47)
at mlsub.compilation.fun.apply1
(~/Nice/src/mlsub/compilation)
at gnu.expr.ModuleMethod.apply1
(ModuleMethod.java:89)
at nice.lang.fun.foreach
(~/Nice/stdlib/nice/lang:116)
at nice.lang.dispatch.foreach
(~/Nice/classes/nice/lang)
at mlsub.compilation.fun.compileComponent
(~/Nice/src/mlsub/compilation:47)
at mlsub.compilation.fun$make.lambda16(Unknown
Source)
at mlsub.compilation.fun$make.apply1(Unknown
Source)
at gnu.expr.ModuleMethod.apply1
(ModuleMethod.java:89)
at nice.lang.fun.foreach
(~/Nice/stdlib/nice/lang:116)
at nice.lang.dispatch.foreach
(~/Nice/classes/nice/lang)
at mlsub.compilation.fun.make
(~/Nice/src/mlsub/compilation:60)
at nice.tools.compiler.fun.compile
(~/Nice/src/nice/tools/compiler:40)
at nice.tools.compiler.console.fun.compile
(~/Nice/src/nice/tools/compiler/console:168)
at nice.tools.compiler.console.fun.main
(~/Nice/src/nice/tools/compiler/console:184)
sieve: writing in archive
nice.lang: writing in archive
----------------------------------------------------------------------
>Comment By: Daniel Bonniot (bonniot)
Date: 2003-09-01 20:15
Message:
Logged In: YES
user_id=88952
Yes, it can be surprising to have the power of first-class
functions ;-)
That said, I agree this is a bit problematic. Not tragic,
because more or less the only thing you can that will not
find out the type mismatch is toString, and you will the
result is strange... Still, I think the solution in the long
term is to restrict the type of toString to "printable"
types (the ones that define a meaningful toString method).
This needs some improvements in the type system, so it will
take some time...
----------------------------------------------------------------------
Comment By: Isaac Gouy (igouy)
Date: 2003-09-01 16:12
Message:
Logged In: YES
user_id=536291
> Could you please send a self-contained bug report?
Sorry
>count method ... the code is valid
Gosh!
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2003-09-01 13:00
Message:
Logged In: YES
user_id=88952
The local variable count is not visible at the println, but
there is a count method defined in nice.lang collections,
which is the one is refered to. Since anything can be
converted to a String (even methods), the code is valid.
----------------------------------------------------------------------
Comment By: Arjan Boeijink (arjanb)
Date: 2003-09-01 12:46
Message:
Logged In: YES
user_id=688815
Simplified testcase:
void main(String[] args){
var n = 1;
while (n-- > 0){
var count = 0;
}
println("Count: " + count);
}
This code should give a user error at checking but doesn't.
----------------------------------------------------------------------
Comment By: Daniel Bonniot (bonniot)
Date: 2003-09-01 10:19
Message:
Logged In: YES
user_id=88952
Could you please send a self-contained bug report?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=798317&group_id=12788
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf