lvntky / CVM

A toy JVM coded in C/C++
MIT License
19 stars 0 forks source link

Class based global logger #2

Open lvntky opened 3 months ago

lvntky commented 3 months ago

Im using spdlog for logger, ive already created a log.cpp file that configures the global logger. Need to add this logger to the classfile.cpp

jbytecode commented 3 months ago

Although it is not really related to the issue here but I want to express my thoughts.

Great project, good luck! I'am daily pulling the latest changes and waiting to run my Hello.class to get work!

I also added the magic int add(int x, int y) method to end up with the working example.

The code is also educative for those who want to learn internals of a JVM just becacuse the others are too big to follow up what is going on there.

Thank you for your work!

lvntky commented 3 months ago

Hello Profesor @jbytecode ! I am actually more than happy to see such comment like a scientist like you. Now, with the latest changes we are able to run AddMain.java but i think i need to implement method invocation mechanism to run Hello.class. This was a one weekend project actually but i can implement more if there is a change/feature request. I will be honored if this one could be use in a educational tool for students (event its written quite sloppy 😁).

Ps: Sir, if you change the log level on log.hpp and take it to the debug level you can see a more detailed logs that shows actually whats going on.

jbytecode commented 3 months ago

CVM successfully terminated program: sample/AddMain.class with return value : 29

Nice, good luck again!