31 lines
554 B
C
31 lines
554 B
C
|
|
#include <debug.h>
|
|
|
|
#include "../struct.h"
|
|
#include "../new.h"
|
|
#include "../kind.h"
|
|
|
|
#include "struct.h"
|
|
#include "inheritance.h"
|
|
#include "new.h"
|
|
|
|
struct value* new_list_value(
|
|
struct gc* gc,
|
|
struct value* first)
|
|
{
|
|
ENTER;
|
|
|
|
struct value* super = new_value(
|
|
/* garbage collector/allocator: */ gc,
|
|
/* kind: */ vk_list,
|
|
/* inheritance: */ &list_value_inheritance);
|
|
|
|
struct list_value* this = &super->subclass.list;
|
|
|
|
this->first = first;
|
|
this->rest = NULL;
|
|
|
|
EXIT;
|
|
return super;
|
|
}
|
|
|