ctrump/ast/env.c File Reference

declaratorの処理 More...

#include "ctrump/ast/env.h"
#include "ctrump/common/varray.h"
#include <stdlib.h>

Include dependency graph for env.c:

Go to the source code of this file.

Functions

static struct ctrump_texprhandle_type_spec (struct ctrump_typespec *spec)
static void ctrump_env_handle_decl (const struct ctrump_symbol **ret_name, struct ctrump_texpr **ret_type, struct ctrump_type_env *type_env, const struct ctrump_declarator *decl, struct ctrump_decl_specifier *declspec)
 ctrump_declarator を処理する
static void ctrump_env_handle_decl_node (const struct ctrump_symbol **ret_name, struct ctrump_texpr **ret_type, struct ctrump_type_env *type_env, const struct ctrump_declarator_node *cur_node, struct ctrump_decl_specifier *declspec)
 ctrump_declarator_node を処理する
void ctrump_env_handle_record_decls (struct ctrump_record_type *record_type, struct ctrump_type_env *type_env, struct ctrump_struct_decl *decls, int num_decl, int num_field, struct ctrump_gccext_attribute *attr, struct ctrump_location *loc, struct ctrump_mempool *tree_pool)
 フィールドの宣言列(decls)からrecord_typeをつくる incomplete struct のrecord_type をわたすと complete struct になる


Detailed Description

declaratorの処理

Definition in file env.c.


Function Documentation

static void ctrump_env_handle_decl ( const struct ctrump_symbol **  ret_name,
struct ctrump_texpr **  ret_type,
struct ctrump_type_env type_env,
const struct ctrump_declarator decl,
struct ctrump_decl_specifier declspec 
) [static]

static void ctrump_env_handle_decl_node ( const struct ctrump_symbol **  ret_name,
struct ctrump_texpr **  ret_type,
struct ctrump_type_env type_env,
const struct ctrump_declarator_node cur_node,
struct ctrump_decl_specifier declspec 
) [static]

void ctrump_env_handle_record_decls ( struct ctrump_record_type record_type,
struct ctrump_type_env type_env,
struct ctrump_struct_decl decls,
int  num_decl,
int  num_field,
struct ctrump_gccext_attribute attr,
struct ctrump_location loc,
struct ctrump_mempool tree_pool 
)

フィールドの宣言列(decls)からrecord_typeをつくる incomplete struct のrecord_type をわたすと complete struct になる

Parameters:
record_type 構造体型(incomplete struct)
type_env 型環境
decls フィールド宣言列
num_decl 宣言(declarator)の数
num_field フィールド(declaration)の数
attr この構造体のGCC attribute
loc 宣言位置
tree_pool メモリプール

Definition at line 194 of file env.c.

References ctrump_gccext_attribute::aligned, ctrump_record_type_field::attr, ctrump_record_type_field::bitfield_width, ctrump_struct_decl::code, CTRUMP_ALIGN_UNSPECIFIED, CTRUMP_BITFIELD_UNSPECIFIED, ctrump_complete_struct_type(), ctrump_env_handle_decl(), ctrump_mempool_alloc, CTRUMP_STRUCT_DECL_FIELDS, ctrump_struct_decl::decl, ctrump_struct_decl_decl::decls, ctrump_gccext_attribute::flags, ctrump_record_type_field::name, ctrump_struct_decl_decl::num_decls, ctrump_struct_decl_decl::spec, ctrump_record_type_field::type, and ctrump_struct_decl::u.

Referenced by build_struct().

static struct ctrump_texpr* handle_type_spec ( struct ctrump_typespec spec  )  [static, read]


Generated on Tue Mar 31 20:19:24 2009 for ctrump by  doxygen 1.5.6