List Info

Thread: Bug?: nekoc -link




Bug?: nekoc -link
user name
2007-06-14 19:25:20
Hi Nicolas,

I think I found a bug in nekoc when nekoc is used with -link option.

Situation #1 (error reproduce):
$ neko dummy.neko loader.neko
$ nekoc -link a.n loader
loader
dummy
Called from neko/Main.nml line 135
Called from neko/Linker.nml line 176
Called from core/Array.nml line 112
Called from neko/Bytecode.nml line 321
Called from core/Core.nml line 172
Called from core/Core.nml line 205
Called from core/Core.nml line 197
Exception : Invalid_argument( Array.get)


Situation #2 (no errors): remove (or comment) last line in loader.neko ("Foo.zoo = function () {}")
$ neko dummy.neko loader.neko
$ nekoc -link a.n loader
loader
dummy


What is wrong? I use latest CVS sources of NekoVM.

--

BR,
Vitali Falileev
http://blog.insideable.com
ICQ: 75008864
  
  
Re: Bug?: nekoc -link
country flaguser name
France
2007-06-16 05:31:58
> Hi Nicolas,
> 
> I think I found a bug in nekoc when nekoc is used with
-link option.

Hi,

Yes, there is some kind of limitation with current -link
implementation.

In fact, the newest VM version now requires functions to be
"ordered" in 
the bytecode, which is guaranteed by the compiler. But the
linker does 
not yet do this "order" automatically. That can
cause some problems when 
you declare methods at the "wrong place" and use
-link. I'll have a look 
at fixing that problem, that's a bit tricky.

Best,
Nicolas

-- 
Neko : One VM to run them all
(http://nekovm.org)

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )