ctrump/analyzer/peel.h File Reference

解析用に演算の起こらない式を変換する More...

#include "ctrump/common/dll.h"

Include dependency graph for peel.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

CTRUMP_EXTDEF struct ctrump_exprctrump_peel_bitequality_cast_expr (struct ctrump_expr *expr, const struct ctrump_abi *abi)
 remove cast if cast expr not convert bit-expression. ex) (unsigned int32) -> (int32) : remove (_Bool32) -> (int32) : remove
CTRUMP_EXTDEF struct ctrump_exprctrump_peel_cast_to_pointer_from_array (struct ctrump_expr *expr)
 配列型からポインタ型への変換を取り除いた式を返す
CTRUMP_EXTDEF struct ctrump_exprctrump_peel_paren (struct ctrump_expr *expr)
 括弧を取り除いた式を返す
CTRUMP_EXTDEF struct ctrump_exprctrump_peel_sign (int *is_sign, struct ctrump_expr *expr)
 符号反転を取り除いた式を返す 符号反転している場合は is_sign に1を、それ以外は0を入れる


Detailed Description

解析用に演算の起こらない式を変換する

Definition in file peel.h.


Function Documentation

CTRUMP_EXTDEF struct ctrump_expr* ctrump_peel_bitequality_cast_expr ( struct ctrump_expr expr,
const struct ctrump_abi abi 
) [read]

remove cast if cast expr not convert bit-expression. ex) (unsigned int32) -> (int32) : remove (_Bool32) -> (int32) : remove

(int16) -> (int32) : not remove .. may cause sign extension (float32) -> (int32) : not remove (float64) -> (float32) : not remove (int32) -> (_Bool32) : not remove .. may cause boolean conversion (int32[4]) -> (int*) : not remove

Returns:
peeled expression

Definition at line 41 of file peel.c.

References ctrump_expr::cast, ctrump_cast_expr::cast_to, ctrump_implicit_cast_expr::cast_to, ctrump_expr::code, CTRUMP_EXPR_CAST, CTRUMP_EXPR_IMPLICIT_CAST, CTRUMP_EXPR_PAREN, ctrump_is_bitconvertion_on_type_conversion(), ctrump_paren_expr::expr, ctrump_cast_expr::expr, ctrump_implicit_cast_expr::expr, ctrump_expr::implicit_cast, ctrump_expr::paren, ctrump_expr::type, and ctrump_expr::u.

CTRUMP_EXTDEF struct ctrump_expr* ctrump_peel_cast_to_pointer_from_array ( struct ctrump_expr expr  )  [read]

CTRUMP_EXTDEF struct ctrump_expr* ctrump_peel_paren ( struct ctrump_expr expr  )  [read]

CTRUMP_EXTDEF struct ctrump_expr* ctrump_peel_sign ( int *  is_sign,
struct ctrump_expr expr 
) [read]

符号反転を取り除いた式を返す 符号反転している場合は is_sign に1を、それ以外は0を入れる

Definition at line 125 of file peel.c.

References ctrump_expr::code, CTRUMP_EXPR_PAREN, CTRUMP_EXPR_UNA_NEG, CTRUMP_EXPR_UNA_POS, ctrump_unary_expr::expr, ctrump_paren_expr::expr, ctrump_expr::paren, ctrump_expr::u, and ctrump_expr::unary.


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