add rpc_server

This commit is contained in:
SimonFJ20 2024-11-12 09:52:55 +01:00
parent 161ea947d7
commit fc65c193c3
7 changed files with 18 additions and 4 deletions

2
runtime/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
build/

View File

@ -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))

Binary file not shown.

Binary file not shown.

1
runtime/rpc_server.cpp Normal file
View File

@ -0,0 +1 @@
#include "rpc_server.hpp"

10
runtime/rpc_server.hpp Normal file
View File

@ -0,0 +1,10 @@
#pragma once
namespace slige_rpc {
class RpcServer {
public:
private:
};
}

View File

@ -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);
}