-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bugfix] multiple definiton error for logging fixed
- Loading branch information
Showing
6 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef __CVM_EXECUTE_HPP__ | ||
#define __CVM_EXECUTE_HPP__ | ||
|
||
#include <iostream> | ||
#include <stack> | ||
#include <vector> | ||
|
||
#include "../classfile/classfile.hpp" | ||
#include "../log.hpp" | ||
|
||
class CVM | ||
{ | ||
public: | ||
CVM() = default; | ||
void execute(const Classfile& cf, const std::string& methodName); | ||
|
||
private: | ||
std::string getUtf8FromConstantPool(const Classfile& cf, uint16_t index); | ||
const method_info* findMehodByName(const Classfile& cf, const std::string& methodName); | ||
const uint8_t* getByteCode(const method_info* methodInfo); | ||
}; | ||
|
||
#endif //__CVM_EXECUTE_HPP__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "../../include/cvm/execute_engine/cvm_execute.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "../include/cvm/log.hpp" | ||
|
||
void setLevel() | ||
{ | ||
if (DEBUG_ENABLED) | ||
{ | ||
spdlog::set_level(spdlog::level::debug); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters