-
Notifications
You must be signed in to change notification settings - Fork 0
/
function.h
40 lines (27 loc) · 1.05 KB
/
function.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Created by michal on 09.09.17.
//
#ifndef PROJECT_RUNNER_H
#define PROJECT_RUNNER_H
#include "executor.h"
class Function {
public:
explicit Function(Executor &executor, int code_length) : executor(executor), code_length(code_length) {}
explicit Function(Executor &executor, uint32_t call_address, uint32_t return_address) : executor(executor),
call_address(call_address),
return_address(
return_address) {}
void set_executed_bit(int executed_bit);
void process_function();
bool check_program_end();
bool check_function_end();
void set_function_end(bool);
private:
int executed_bit;
Executor &executor;
int code_length;
uint32_t call_address;
uint32_t return_address;
bool function_end = false;
};
#endif //PROJECT_RUNNER_H