d: Merge dmd, druntime d8e3976a58, phobos 7a6e95688
[official-gcc.git] / gcc / d / dmd / builtin.d
blobd29092b6903efe9d7b2eebd915e4fd249dc7aa03
1 /**
2 * Implement CTFE for intrinsic (builtin) functions.
4 * Currently includes functions from `std.math`, `core.math` and `core.bitop`.
6 * Copyright: Copyright (C) 1999-2024 by The D Language Foundation, All Rights Reserved
7 * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright)
8 * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
9 * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/builtin.d, _builtin.d)
10 * Documentation: https://dlang.org/phobos/dmd_builtin.html
11 * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/builtin.d
14 module dmd.builtin;
16 import dmd.arraytypes;
17 import dmd.expression;
18 import dmd.func;
19 import dmd.location;
21 /**********************************
22 * Determine if function is a builtin one that we can
23 * evaluate at compile time.
25 public extern (C++) BUILTIN isBuiltin(FuncDeclaration fd);
27 /**************************************
28 * Evaluate builtin function.
29 * Return result; NULL if cannot evaluate it.
31 public extern (C++) Expression eval_builtin(const ref Loc loc, FuncDeclaration fd, Expressions* arguments);