xref: /netbsd-src/external/gpl3/gcc/dist/gcc/d/dmd/builtin.d (revision b1e838363e3c6fc78a55519254d99869742dd33c)
1 /**
2  * Implement CTFE for intrinsic (builtin) functions.
3  *
4  * Currently includes functions from `std.math`, `core.math` and `core.bitop`.
5  *
6  * Copyright:   Copyright (C) 1999-2022 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
12  */
13 
14 module dmd.builtin;
15 
16 import dmd.arraytypes;
17 import dmd.expression;
18 import dmd.func;
19 import dmd.globals;
20 
21 /**********************************
22  * Determine if function is a builtin one that we can
23  * evaluate at compile time.
24  */
25 public extern (C++) BUILTIN isBuiltin(FuncDeclaration fd);
26 
27 /**************************************
28  * Evaluate builtin function.
29  * Return result; NULL if cannot evaluate it.
30  */
31 public extern (C++) Expression eval_builtin(const ref Loc loc, FuncDeclaration fd, Expressions* arguments);
32