Author Topic: Bug Reports  (Read 398085 times)

0 Members and 3 Guests are viewing this topic.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Bug Reports
« Reply #1575 on: November 10, 2011, 11:52:56 am »
somehow, the addition of SHMF?SHMF/256=Q?SHM xor 1->SHM
before and after an if statement makes the if statement not work when SHM=1. This is a bug w/peephole ops, as it works perfectly when I zoom through it.

Edit:fixed a typo.(phone keyboard) The erroneous SHMPE has now been replaced with the correct SHM=1
« Last Edit: November 10, 2011, 06:40:27 pm by Freyaday »
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Bug Reports
« Reply #1576 on: November 10, 2011, 04:55:12 pm »
Freyaday, can you give a concrete example of code that doesn't compile correctly? Because I lost you at "before and after an if statement makes the if statement not work when SHMPE." x.x

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Bug Reports
« Reply #1577 on: November 10, 2011, 06:21:55 pm »
I found the bug with peephole opts a while ago which happens in extremely rare cases when you use a data offset in your code followed or preceded by an actual constant that has the same value as the offset and they happen to be in a pattern that can peephole optimize.  An example of where I saw this was during a GetCalc(Str1,6) where the start of Str1 was the 6th byte of data and Axe erroneously optimized it to GetCalc(Str1,).  Adding junk data to the beginning such as Buff(1) or some other small number which pushes the offset is a temporarily workaround, or simply zooming.

What you're reporting though doesn't sound like that.  Are you sure that's what's causing it?
« Last Edit: November 10, 2011, 06:22:31 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Bug Reports
« Reply #1578 on: November 10, 2011, 06:54:17 pm »
here's the affected chunk of code (I think):
:SHMF?SHMF/256=Q?SHM xor 1->SHM
:If SHM?X3T>2?Y3T>2
:RectI(X2T+1,Y2T+1,X3T-2,Y3T-2)
:End
:SHMF?SHMF/256=Q?SHM xor 1->SHM
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Bug Reports
« Reply #1579 on: November 10, 2011, 07:57:46 pm »
Found the bug! The peephole optimizer normally works by simply examining the compiled code, which is fine and dandy for 99.9% of code. But if a potential jump point exists inside of the code that the peephole optimizer is trying to optimize, the optimization should not be performed. I see that Quigibo remembered this and coded an abort to optimizing if an End of an if statement or a Lbl is inside the matching code, but no such abort exists if the previous line ends in an inline conditional. However, this is effectively like the End of an if statement, and should not be optimized. This lapse may exist because Quigibo forgot about this case, or perhaps just because it's probably more of a pain to detect.
« Last Edit: November 10, 2011, 08:05:47 pm by Runer112 »

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Bug Reports
« Reply #1580 on: November 10, 2011, 08:10:10 pm »
What do X3T and Y3T do?

Is there documentation on variable tokens anywhere? Its not in the axe docs.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Bug Reports
« Reply #1581 on: November 10, 2011, 08:13:36 pm »
They're variables like any other variables, except they were intended to be used to interface with Axioms. But you don't have to use them for that, as Freyaday is probably doing.

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Bug Reports
« Reply #1582 on: November 10, 2011, 08:17:42 pm »
Thanks Runer, you wonderfully lucid ninja you!
Yeah. I am not using them for Axioms at all. Nymless doesn't even use any Axioms. I abuse code. And chairs. Abuse is good.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Bug Reports
« Reply #1583 on: November 10, 2011, 10:52:11 pm »
Ah yes, I did forget about this case.  Fixed.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Bug Reports
« Reply #1584 on: November 11, 2011, 10:12:26 pm »
But arent the y-vars for files?

Edit: And the matrix vars for the soon-to-be tables?
« Last Edit: November 11, 2011, 10:12:49 pm by C0deH4cker »

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Bug Reports
« Reply #1585 on: November 11, 2011, 11:26:36 pm »
I got some really weird bugs when I compiled nymless into an app on a pair of 83+s:
on one, it didn't even show up after it finished compiling and I had to compile it again. Then, on both of them, in the os, table entries showed up on the graph screen, and the plot selections didn't show up in the Y= screen. The one I had to compile twice on got fixed by, iirc, a garbage collect, and the other calc was fixed with a ram clear.
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Bug Reports
« Reply #1586 on: November 12, 2011, 05:27:30 pm »
I got a bug randomly in my source and my backup... they both got filled with LineReg(ax+b) 's. :(
I'm not sure what happened... ???

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Bug Reports
« Reply #1587 on: November 13, 2011, 12:03:06 am »
Bug report: ⁻{L1+9}r is compiled as {⁻L1+9}r.

EDIT:

Quote from: #omnimaga
[21:02:28]   Runer112   it also happens with one-byte variable reads
[21:02:48]   Runer112   but the address has to be a constant
« Last Edit: November 13, 2011, 12:04:41 am by Deep Thought »




Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Bug Reports
« Reply #1588 on: November 13, 2011, 02:17:21 pm »
Code: [Select]
:.TEST
:[FFFFFFFFFFFFFFFF]->Str1
:0->{L1}
:0->A
:Pt-on(8,8,8*{L1+A}+Str1
:DispGraph
This gives the "Wrong # of Args" err. Is this a bug, or am I just stupid?

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Bug Reports
« Reply #1589 on: November 13, 2011, 02:20:49 pm »
Code: [Select]
:.TEST
:[FFFFFFFFFFFFFFFF]->Str1
:0->{L1}
:0->A
:Pt-on(8,8,8*{L1+A}+Str1
:DispGraph
This gives the "Wrong # of Args" err. Is this a bug, or am I just stupid?

Yes, this is a bug:

{CONST} or {CONST + Var} produces a 'Wrong # of Args' error D:
Thanks, I just caught that.  A workaround for now is to just add the constant after the variable: Var + CONST, which is more optimized anyway.