WONKY



LOG | FILES | OVERVIEW


#ifndef WONKY_OBJECT_H
#define WONKY_OBJECT_H WONKY_OBJECT_H

#include <object.hh>
#include <type.h>
#include <memory_location.h>
#include <common.h>
#include <lexer.h>

/*
	todo : delete this if nothing subtle breaks
	enum Storage_Class_Specifier;
*/

struct Object
{
	enum Object_Kind kind;
	struct Type *type;
	struct Memory_Location *location;
	enum Storage_Class_Specifier storage_class;
};
struct Object_Bitfield
{
	enum Object_Kind kind;
	struct Type *type;
	struct Memory_Location *location;
	enum Storage_Class_Specifier storage_class;
	size_t number_of_bits;
};

void delete_object(struct Object *object);
struct Object* get_object(struct Type *type,enum Storage_Class_Specifier storage_class);
struct Object* retype_object(struct Object *object,struct Type *new_type);
struct Object* get_temp_object(struct Type *type);
struct Object* convert_object_to_bitfield(struct Object *object,struct AST_Expression* number_of_bits_expression,struct Translation_Data *translation_data);
struct Object_String* get_wide_string_object(struct token *token,struct Translation_Data *translation_data);
#endif