1 |
|
|
#include "gwion_util.h" |
2 |
|
|
#include "gwion_ast.h" |
3 |
|
|
#include "gwion_env.h" |
4 |
|
|
#include "vm.h" |
5 |
|
|
#include "traverse.h" |
6 |
|
|
#include "instr.h" |
7 |
|
|
#include "object.h" |
8 |
|
|
#include "gwion.h" |
9 |
|
|
#include "operator.h" |
10 |
|
|
#include "import.h" |
11 |
|
|
#include "gwi.h" |
12 |
|
|
|
13 |
|
1429 |
void gwi_body(const Gwi gwi, const Ast body) { |
14 |
|
1429 |
const Class_Def cdef = gwi->gwion->env->class_def->e->def; |
15 |
✓✓ |
1429 |
if(!cdef->body) |
16 |
|
1425 |
cdef->body = body; |
17 |
|
|
else |
18 |
|
4 |
gwi->body->next = body; |
19 |
|
1429 |
gwi->body = body; |
20 |
|
1429 |
} |
21 |
|
|
|
22 |
|
35 |
ANN void gwi_reset(const Gwi gwi) { |
23 |
✓✓ |
35 |
if(gwi->ck) { |
24 |
|
23 |
ck_clean(gwi); |
25 |
|
23 |
mp_free2(gwi->gwion->mp, sizeof(ImportCK), gwi->ck); |
26 |
|
23 |
gwi->ck = NULL; |
27 |
|
|
} |
28 |
|
35 |
env_reset(gwi->gwion->env); |
29 |
|
35 |
} |