Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiaojx committed Oct 3, 2023
1 parent 0e4518b commit b35dcb3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

namespace wvm
{
Instance::Instance()
Instance::Instance(std::shared_ptr<Module> module_ptr) : module_ptr(module_ptr)
{
}

Instance::~Instance()
{
}

void Instance::instantiate(){

};
}
8 changes: 7 additions & 1 deletion src/instance.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#ifndef SRC_INSTANCE_H_
#define SRC_INSTANCE_H_

#include "module.h"

namespace wvm
{
class Instance
{
public:
Instance();
Instance(std::shared_ptr<Module>);
~Instance();

void instantiate();

std::shared_ptr<Module> module_ptr;
};
}

Expand Down
3 changes: 3 additions & 0 deletions src/wvm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "parser.h"
#include "module.h"
#include "decoder.h"
#include "instance.h"

int main(int argc, char *argv[])
{
Expand All @@ -12,5 +13,7 @@ int main(int argc, char *argv[])
std::shared_ptr<wvm::Module> module_ptr = parser_ptr->parse();

/** instantiate module */
std::shared_ptr<wvm::Instance> instance_ptr = std::make_shared<wvm::Instance>(module_ptr);

return 0;
}

0 comments on commit b35dcb3

Please sign in to comment.