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 |
|
1425 |
void gwi_body(const Gwi gwi, const Ast body) { |
14 |
|
1425 |
const Class_Def cdef = gwi->gwion->env->class_def->e->def; |
15 |
✓✓ |
1425 |
if(!cdef->body) |
16 |
|
1423 |
cdef->body = body; |
17 |
|
|
else |
18 |
|
2 |
gwi->body->next = body; |
19 |
|
1425 |
gwi->body = body; |
20 |
|
1425 |
} |
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 |
} |