英語版
このページの英語版を見る

dmd.ctfeexpr

ポインタ、スライス、配列連結などを含む記号の基本はピリオドに相当するものです。
Authors:

ソース ctfeexpr.d

struct UnionExp;
pure nothrow @safe int findFieldIndexByName(const StructDeclaration sd, const VarDeclaration v);
getFieldIndex と同じだが、VarDeclaration との直接一致をチェックする。
Returns:
インデックスと直接一致するかどうかをチェックする。
nothrow bool needToCopyLiteral(const Expression expr);
集約リテラル (AA/string/array/struct)
Expression resolveSlice(Expression e, UnionExp* pue = null);
eがSliceExpの場合、定数折りたたむ。
Parameters:
Expression e 解決する式
UnionExp* pue nullでない場合、結果の式をここに格納する。
Returns:
結果の式
ArrayLiteralExp createBlockDuplicatedArrayLiteral(UnionExp* pue, const ref Loc loc, Type type, Expression elem, size_t dim);
NewExpのヘルパー elem'が'dim'回複製された配列リテラルを作成する。
Parameters:
UnionExp* pue 結果を格納する場所
Loc loc 解釈が発生するソース位置
Type type 結果のターゲット型
Expression elem 結果によって所有される配列要素のソース
size_t dim 結果の要素番号
Returns:
構築された ArrayLiteralExp
StringExp createBlockDuplicatedStringLiteral(UnionExp* pue, const ref Loc loc, Type type, dchar value, size_t dim, ubyte sz);
NewExpのヘルパー "値"を"dim"回複製した文字列リテラルを作成する。
nothrow bool isTypeInfo_Class(const Type type);
TypeInfo 操作
bool isPointer(Type t);
ポインタ操作
bool pointToSameMemoryBlock(Expression agg1, Expression agg2);
agg1とagg2が同じメモリブロックへのポインタであれば真を返す。
bool isCtfeComparable(Expression e);
定数折りたたみ(CTFEをサポートする 非ポインタ式eを>,is,==等で比較できる場合、真を返す。 ctfeCmp、ctfeEqual、ctfeIdentity を使用して、>、is、== などと比較できる場合に真を返す。
nothrow @safe bool specificCmp(EXP op, int rawCmp);
cmp OP 0; OPは==, !=, <, >=などである。結果は0または1
nothrow @safe bool intUnsignedCmp(EXP op, dinteger_t n1, dinteger_t n2);
OP は ==, !=, <, >= などである。結果は0または1である。
nothrow @safe bool intSignedCmp(EXP op, sinteger_t n1, sinteger_t n2);
ここでOPは==, !=, <, >=などである。結果は0または1である。
nothrow @safe bool realCmp(EXP op, real_t r1, real_t r2);
ここでOPは==, !=, <, >=などである。結果は0または1である。
bool ctfeEqual(const ref Loc loc, EXP op, Expression e1, Expression e2);
比較の前にスライスを解決する。0または1を返す。
bool ctfeIdentity(const ref Loc loc, EXP op, Expression e1, Expression e2);
is、!=を評価する。 比較する前にスライスを解決する。0または1を返す。
bool ctfeCmp(const ref Loc loc, EXP op, Expression e1, Expression e2);
を評価する。比較する前にスライスを解決する。0または1を返す。
void assignInPlace(Expression dest, Expression src);
代入ヘルパー関数
Expression changeArrayLiteralLength(UnionExp* pue, const ref Loc loc, TypeArray arrayType, Expression oldval, size_t oldlen, size_t newlen);
配列リテラルoldval(ArrayLiteralExp型またはStringExp型、長さ oldlenである場合、その長さをnewlenに変更する。newlenがoldlenより長い場合、すべての新しい要素がoldlenに設定される、 新しい要素はすべて、その要素型のデフォルトのイニシャライザに設定される。
bool isCtfeValueValid(Expression newval);
CTFE サニティ・チェック
UnionExp voidInitLiteral(Type t, VarDeclaration var);
Void 初期化