stax icon indicating copy to clipboard operation
stax copied to clipboard

Function in a tuple breaks trace on Neko.

Open 0b1kn00b opened this issue 14 years ago • 6 comments
trafficstars

var a = Tuple2.create("A", function(x) { return x; } ); trace(a); neko, win 7 64bit, haxe r3821 nightly.

//really weird bug, but replicated 100%

Invalid call FilePos(null,Main::main,35) FilePos(null,haxe.data.collections.Map::$statics,1) FilePos(null,_Prelude.AbstractProduct::toString,349) FilePos(null,_Prelude.AbstractProduct::$init,332) FilePos(null,neko.Lib::print,48) FilePos(null,Main::main,30)

diff --git a/src/main/haxe/Prelude.hx b/src/main/haxe/Prelude.hx index 6aebb1f..45ff844 100644 --- a/src/main/haxe/Prelude.hx +++ b/src/main/haxe/Prelude.hx @@ -419,10 +419,10 @@ private class AbstractProduct implements Product { }

private function getShow(i : Int) {

  • return if(null == _shows[i]) {
  • if(null == _shows[i]) { _shows[i] = Stax.getShowFor(productElement(i));
  • } else
  •  _shows[i];
    
  • }
  •  return _shows[i];
    
    } }

0b1kn00b avatar Jun 15 '11 04:06 0b1kn00b

What's the diff below exactly?

On Wed, Jun 15, 2011 at 6:24 AM, 0b1kn00b < [email protected]>wrote:

var a = Tuple2.create("A", function(x) { return x; } ); trace(a); neko, win 7 64bit, haxe r3821 nightly.

//really weird bug, but replicated 100%

Invalid call FilePos(null,Main::main,35) FilePos(null,haxe.data.collections.Map::$statics,1) FilePos(null,_Prelude.AbstractProduct::toString,349) FilePos(null,_Prelude.AbstractProduct::$init,332) FilePos(null,neko.Lib::print,48) FilePos(null,Main::main,30)

diff --git a/src/main/haxe/Prelude.hx b/src/main/haxe/Prelude.hx index 6aebb1f..45ff844 100644 --- a/src/main/haxe/Prelude.hx +++ b/src/main/haxe/Prelude.hx @@ -419,10 +419,10 @@ private class AbstractProduct implements Product { }

private function getShow(i : Int) {

  • return if(null == _shows[i]) {
  • if(null == _shows[i]) { _shows[i] = Stax.getShowFor(productElement(i));
  • } else
  •  _shows[i];
    
  • }
  •  return _shows[i];
    
    } }

Reply to this email directly or view it on GitHub: https://github.com/jdegoes/stax/issues/3

Stphane Le Dorze

Tel: +33 (0) 6 08 76 70 15

sledorze avatar Jun 15 '11 06:06 sledorze

It's a patch

git diff --help

On Wed, Jun 15, 2011 at 8:52 AM, sledorze < [email protected]>wrote:

What's the diff below exactly?

On Wed, Jun 15, 2011 at 6:24 AM, 0b1kn00b < [email protected]>wrote:

var a = Tuple2.create("A", function(x) { return x; } ); trace(a); neko, win 7 64bit, haxe r3821 nightly.

//really weird bug, but replicated 100%

Invalid call FilePos(null,Main::main,35) FilePos(null,haxe.data.collections.Map::$statics,1) FilePos(null,_Prelude.AbstractProduct::toString,349) FilePos(null,_Prelude.AbstractProduct::$init,332) FilePos(null,neko.Lib::print,48) FilePos(null,Main::main,30)

diff --git a/src/main/haxe/Prelude.hx b/src/main/haxe/Prelude.hx index 6aebb1f..45ff844 100644 --- a/src/main/haxe/Prelude.hx +++ b/src/main/haxe/Prelude.hx @@ -419,10 +419,10 @@ private class AbstractProduct implements Product { }

private function getShow(i : Int) {

  • return if(null == _shows[i]) {
  • if(null == _shows[i]) { _shows[i] = Stax.getShowFor(productElement(i));
  • } else
  •  _shows[i];
    
  • }
  •  return _shows[i];
    
    } }

Reply to this email directly or view it on GitHub: https://github.com/jdegoes/stax/issues/3

Stphane Le Dorze

Tel: +33 (0) 6 08 76 70 15

Reply to this email directly or view it on GitHub: https://github.com/jdegoes/stax/issues/3#issuecomment-1371648

0b1kn00b avatar Jun 15 '11 11:06 0b1kn00b

Well, I mean, it fixes the crashing bug. Strange but true.

On Wed, Jun 15, 2011 at 1:49 PM, laurence taylor [email protected]:

It's a patch

git diff --help

On Wed, Jun 15, 2011 at 8:52 AM, sledorze < [email protected]>wrote:

What's the diff below exactly?

On Wed, Jun 15, 2011 at 6:24 AM, 0b1kn00b < [email protected]>wrote:

var a = Tuple2.create("A", function(x) { return x; } ); trace(a); neko, win 7 64bit, haxe r3821 nightly.

//really weird bug, but replicated 100%

Invalid call FilePos(null,Main::main,35) FilePos(null,haxe.data.collections.Map::$statics,1) FilePos(null,_Prelude.AbstractProduct::toString,349) FilePos(null,_Prelude.AbstractProduct::$init,332) FilePos(null,neko.Lib::print,48) FilePos(null,Main::main,30)

diff --git a/src/main/haxe/Prelude.hx b/src/main/haxe/Prelude.hx index 6aebb1f..45ff844 100644 --- a/src/main/haxe/Prelude.hx +++ b/src/main/haxe/Prelude.hx @@ -419,10 +419,10 @@ private class AbstractProduct implements Product { }

private function getShow(i : Int) {

  • return if(null == _shows[i]) {
  • if(null == _shows[i]) { _shows[i] = Stax.getShowFor(productElement(i));
  • } else
  •  _shows[i];
    
  • }
  •  return _shows[i];
    
    } }

Reply to this email directly or view it on GitHub: https://github.com/jdegoes/stax/issues/3

Stphane Le Dorze

Tel: +33 (0) 6 08 76 70 15

Reply to this email directly or view it on GitHub: https://github.com/jdegoes/stax/issues/3#issuecomment-1371648

0b1kn00b avatar Jun 15 '11 11:06 0b1kn00b

I think it's a compiler issue. You better report it to the Mailing List so that the real reason would be fixed. :) Are you a Stax commiter?

On Wed, Jun 15, 2011 at 1:51 PM, 0b1kn00b < [email protected]>wrote:

Well, I mean, it fixes the crashing bug. Strange but true.

On Wed, Jun 15, 2011 at 1:49 PM, laurence taylor <[email protected]

wrote:

It's a patch

git diff --help

On Wed, Jun 15, 2011 at 8:52 AM, sledorze < [email protected]>wrote:

What's the diff below exactly?

On Wed, Jun 15, 2011 at 6:24 AM, 0b1kn00b < [email protected]>wrote:

var a = Tuple2.create("A", function(x) { return x; } ); trace(a); neko, win 7 64bit, haxe r3821 nightly.

//really weird bug, but replicated 100%

Invalid call FilePos(null,Main::main,35) FilePos(null,haxe.data.collections.Map::$statics,1) FilePos(null,_Prelude.AbstractProduct::toString,349) FilePos(null,_Prelude.AbstractProduct::$init,332) FilePos(null,neko.Lib::print,48) FilePos(null,Main::main,30)

diff --git a/src/main/haxe/Prelude.hx b/src/main/haxe/Prelude.hx index 6aebb1f..45ff844 100644 --- a/src/main/haxe/Prelude.hx +++ b/src/main/haxe/Prelude.hx @@ -419,10 +419,10 @@ private class AbstractProduct implements Product { }

private function getShow(i : Int) {

  • return if(null == _shows[i]) {
  • if(null == _shows[i]) { _shows[i] = Stax.getShowFor(productElement(i));
  • } else
  •  _shows[i];
    
  • }
  •  return _shows[i];
    
    } }

Reply to this email directly or view it on GitHub: https://github.com/jdegoes/stax/issues/3

Stphane Le Dorze

Tel: +33 (0) 6 08 76 70 15

Reply to this email directly or view it on GitHub: https://github.com/jdegoes/stax/issues/3#issuecomment-1371648

Reply to this email directly or view it on GitHub: https://github.com/jdegoes/stax/issues/3#issuecomment-1372976

Stphane Le Dorze

Tel: +33 (0) 6 08 76 70 15

sledorze avatar Jun 15 '11 12:06 sledorze

I can fix it in Stax but since it seems to be a haxe/neko issue you should report it on the issue list.

fponticelli avatar Jun 15 '11 14:06 fponticelli

CC'ing Franco who will be able to provide more insight.

Regards,

John A. De Goes Twitter: @jdegoes LinkedIn: http://linkedin.com/in/jdegoes

On Jun 14, 2011, at 10:24 PM, 0b1kn00b wrote:

var a = Tuple2.create("A", function(x) { return x; } ); trace(a); neko, win 7 64bit, haxe r3821 nightly.

//really weird bug, but replicated 100%

Invalid call FilePos(null,Main::main,35) FilePos(null,haxe.data.collections.Map::$statics,1) FilePos(null,_Prelude.AbstractProduct::toString,349) FilePos(null,_Prelude.AbstractProduct::$init,332) FilePos(null,neko.Lib::print,48) FilePos(null,Main::main,30)

diff --git a/src/main/haxe/Prelude.hx b/src/main/haxe/Prelude.hx index 6aebb1f..45ff844 100644 --- a/src/main/haxe/Prelude.hx +++ b/src/main/haxe/Prelude.hx @@ -419,10 +419,10 @@ private class AbstractProduct implements Product { }

private function getShow(i : Int) {

  • return if(null == _shows[i]) {
  • if(null == _shows[i]) { _shows[i] = Stax.getShowFor(productElement(i));
  • } else
  •  _shows[i];
    
  • }
  •  return _shows[i];
    
    } }

Reply to this email directly or view it on GitHub: https://github.com/jdegoes/stax/issues/3

jdegoes avatar Jun 15 '11 14:06 jdegoes