Skip to content
This repository has been archived by the owner on Jun 13, 2020. It is now read-only.

Nondeterministic compilation and errors. #710

Open
kiljacken opened this issue Feb 28, 2016 · 5 comments
Open

Nondeterministic compilation and errors. #710

kiljacken opened this issue Feb 28, 2016 · 5 comments

Comments

@kiljacken
Copy link
Member

Currently a bug exists in ark-vm which changes behavior opon recompilation. I have no idea what is causing it or why, but it is clear that we should strive for deterministic compilation. The main offender is probably go maps, because randomizing map order is a great idea. So we have to revamp all uses of map iteration in the codegen.

@MovingtoMars
Copy link
Member

I figured out the problem. The backing array for []s32 in the virtual machine is stack allocated. VirtualMachine holds a pointer to it, which we return from a function.

@MovingtoMars
Copy link
Member

I think we may need to just remove non-fixed arrays altogether and use List instead.

@kiljacken
Copy link
Member Author

No, that would remove all options of doing static bounds checking

On Mon, 29 Feb 2016 05:10 Liam, [email protected] wrote:

I think we may need to just remove non-fixed arrays altogether and use
List instead.


Reply to this email directly or view it on GitHub
#710 (comment).

@MovingtoMars
Copy link
Member

The only other way I can see is disallowing non-fixed array literals. But, then how would strings work?

@kiljacken
Copy link
Member Author

We just gotta make that "return address to something on the stack" semantic
pass

On Mon, Feb 29, 2016, 08:36 Liam [email protected] wrote:

The only other way I can see is disallowing non-fixed array literals. But,
then how would strings work?


Reply to this email directly or view it on GitHub
#710 (comment).

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

No branches or pull requests

2 participants