Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some AOT Issues. #244

Closed
An0nyMooUS opened this issue Jun 11, 2022 · 4 comments
Closed

Some AOT Issues. #244

An0nyMooUS opened this issue Jun 11, 2022 · 4 comments
Labels

Comments

@An0nyMooUS
Copy link

An0nyMooUS commented Jun 11, 2022

I really liked this AOT system, I intend to use it in my project.

For this, I will collaborate with some issues that I am discovering :)

function test()
  
  local myPlayer = getMyPlayer()
  
  -- if ( myPlayer:Alive() ) then <-- fail (Unexpected pseudo: T(0[0..]))
  -- if ( myPlayer:Alive() == true (or expression like (number, string))) ) then <-- works 

  if ( myPlayer:Alive() == true ) then -- works
  
  end 
  
end
  • Unexpected pseudo: T(0[0..]) on if expression. (maybe cannot determine bool value 🤔 )
  • On large files assert(reg < MAXBIT); failed. pseudo_gen_free(PseudoGenerator *generator, unsigned reg)
@dibyendumajumdar
Copy link
Owner

Okay thank you for the report - I will look at what's happening.

@dibyendumajumdar
Copy link
Owner

dibyendumajumdar commented Jun 12, 2022

I couldn't reproduce the issue.

This test works

function test()
  local myPlayer = getMyPlayer()
  if ( myPlayer:Alive() ) then
    return true
  end
  return false
end

function getMyPlayer()
    local player = {}
    function player:Alive()
        print 'called'
        return true
    end
    return player
end

assert(test())

Perhaps you get the failure in a wider context?

Ignore - I do see the issue

@dibyendumajumdar
Copy link
Owner

hi @An0nyMooUS I fixed the first issue.
Re the second issue, I will need to have a look at a test case I can try out - hope you are able to provide.

Thank you for the bug report

@An0nyMooUS
Copy link
Author

Unexpected pseudo:

if test:GetIsRight() then -- only works if ``== true`` explicitly.
   -- emit_op_cbr: Unexpected pseudo: T(1..)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants