GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/import/import_internals.c Lines: 14 14 100.0 %
Date: 2020-10-03 10:30:04 Branches: 4 4 100.0 %

Line Branch Exec Source
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
1427
    cdef->body = body;
17
  else
18
2
    gwi->body->next = body;
19
1429
  gwi->body = body;
20
1429
}
21
22
37
ANN void gwi_reset(const Gwi gwi) {
23
37
  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
37
  env_reset(gwi->gwion->env);
29
37
}