Skip to content

Adding objects, user defined function calling, and basic dynamic allocation#1

Open
JakeEhrlich wants to merge 3 commits into
mainfrom
add_objects_and_alloc
Open

Adding objects, user defined function calling, and basic dynamic allocation#1
JakeEhrlich wants to merge 3 commits into
mainfrom
add_objects_and_alloc

Conversation

@JakeEhrlich

Copy link
Copy Markdown
Owner

This is a work in progress but I don't have anymore time this weekend to do anymore serious work on it.

I figured out that it would be ideal to drop the cffi dep which I didn't realize was not a standard library and has some strange limitations to it that I don't like. Python ctypes seems to be a lot more robust but more picky so going through the process de-cffi-ing this code and a using ctypes instead.

@JakeEhrlich

Copy link
Copy Markdown
Owner Author

Ok update:

  • cffi is gone and previous tests are passing
  • test_gravler is not currently finishing the trace compiler
  • the issue is that GetFieldInstruction and SetFieldInstruction are not yet being compiled
  • I'm seeing some odd code generated and also I'd like to see more information about how phi nodes are being handled in the tracing SSA in the print out, currently its not there
  • I think I need to perhaps work on making the SSA a bit more robust

@JakeEhrlich

Copy link
Copy Markdown
Owner Author

Bugs I see in the trace:

  • Too many guards are being emitted for certain IntBinOps
  • For EqInstruction there's both a GuardNil and a GuardBool but it should have neither!
  • CopyInstructions look wrong to me?

@JakeEhrlich

Copy link
Copy Markdown
Owner Author

The GuardNil bug was another mixup between type indexes for nil and bool

@JakeEhrlich

Copy link
Copy Markdown
Owner Author

cool updates: I can debug the jit using lldb if I insert a 'brk' instruction and I can step through assembly after that. I'm not very curious if I can script this using python so I can make a debugger for traces.

@JakeEhrlich

Copy link
Copy Markdown
Owner Author

Cleanup:

I've also drastically simplified the interpreter (I think?) and am going to try to keep making it simpler, more robust, and to fail faster.

Also I'm going to go on a test adding rampage soon-ish for pure interpreter stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant