diff --git a/runtime/.gitignore b/runtime/.gitignore new file mode 100644 index 0000000..dc84959 --- /dev/null +++ b/runtime/.gitignore @@ -0,0 +1,2 @@ +build/ + diff --git a/runtime/Makefile b/runtime/Makefile index c591d85..6a7014a 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -8,9 +8,9 @@ CXX_FLAGS = \ OUT=build/sliger -CXX_HEADERS = $(shell find . -name *.hpp) +CXX_HEADERS = $(shell find . -name "*.hpp") -CXX_SOURCES = $(shell find . -name *.cpp) +CXX_SOURCES = $(shell find . -name "*.cpp") CXX_OBJECTS = $(patsubst %.cpp,build/%.o,$(CXX_SOURCES)) diff --git a/runtime/build/main.o b/runtime/build/main.o deleted file mode 100644 index 7547f02..0000000 Binary files a/runtime/build/main.o and /dev/null differ diff --git a/runtime/build/sliger b/runtime/build/sliger deleted file mode 100755 index 4124329..0000000 Binary files a/runtime/build/sliger and /dev/null differ diff --git a/runtime/rpc_server.cpp b/runtime/rpc_server.cpp new file mode 100644 index 0000000..18d9749 --- /dev/null +++ b/runtime/rpc_server.cpp @@ -0,0 +1 @@ +#include "rpc_server.hpp" diff --git a/runtime/rpc_server.hpp b/runtime/rpc_server.hpp new file mode 100644 index 0000000..478277f --- /dev/null +++ b/runtime/rpc_server.hpp @@ -0,0 +1,10 @@ +#pragma once + +namespace slige_rpc { + +class RpcServer { +public: +private: +}; + +} diff --git a/runtime/vm.cpp b/runtime/vm.cpp index e3c7f07..9dca2ad 100644 --- a/runtime/vm.cpp +++ b/runtime/vm.cpp @@ -81,8 +81,9 @@ void VM::run() } stack_push(Ptr { .value = this->pc }); stack_push(Ptr { .value = this->bp }); - for (auto i = arguments.size(); i >= 0; --i) { - auto argument = std::move(arguments.at(i)); + for (size_t i = 0; i < arguments.size(); ++i) { + auto argument + = std::move(arguments.at(arguments.size() - 1 - i)); arguments.pop_back(); stack_push(argument); }