summaryrefslogtreecommitdiff
path: root/builtin.c
Commit message (Collapse)AuthorAgeFilesLines
* Ensure builtin::trim() has ($) prototypePaul "LeoNerd" Evans2022-07-201-1/+1
|
* Add builtin function `export_lexically()`Paul "LeoNerd" Evans2022-07-151-0/+74
| | | | As per RFC 0020
* Extract the code for performing lexical export out of builtin::import into ↵Paul "LeoNerd" Evans2022-07-151-12/+36
| | | | helper functions
* Add builtin::is_taintedJames Raspass2022-07-051-10/+15
| | | | | Also tweak the implementation of the other two boolean builtins (is_bool & is_weak) to be slightly more efficient.
* Initial implementation and unit-tests of created_as_{string,number}Paul "LeoNerd" Evans2022-04-011-2/+37
|
* Add builtin::trim()Karl Williamson2022-03-191-0/+95
| | | | Most of this code came from Paul Evans and Scott Chief Baker
* An initial implementation of builtin::indexedPaul "LeoNerd" Evans2022-03-141-0/+52
| | | | * Implementation, unit tests, documentation
* Add missing builtin diagnostic to perldiag.pod; rename 'compiletime' to ↵Paul "LeoNerd" Evans2022-03-141-1/+1
| | | | 'compile time' for consistency
* Rename is{bool,weak} to is_{bool,weak}Paul "LeoNerd" Evans2022-03-071-6/+6
|
* builtin.c: Fix up 730f927Karl Williamson2022-02-011-2/+3
| | | | That commit got pushed without a needed fix.
* builtin.c: Use correct 32bit printing formatKarl Williamson2022-02-011-2/+4
| | | | | | | | | | Perl has no convenient way to portably print values that are explicitly 32 bit: I32 and U32. This is because Configure for some platforms makes these longs (even if an int would do) and for others they end up being ints. The best we can do, without other changes, is use IVdf or UVdf and cast the values to IV or UV.
* Warn about experimental builtins at runtime as well as compile timeDagfinn Ilmari Mannsåker2022-01-251-6/+17
| | | | For when the functions are called via reference or perl4-style &foo syntax.
* Emit experimental::builtin warnings from the builtin function callcheckerPaul "LeoNerd" Evans2022-01-251-0/+8
|
* Add ceil & floor to builtinJames Raspass2022-01-241-0/+10
|
* Add builtin::blessed, refaddr and reftypePaul "LeoNerd" Evans2021-12-081-0/+15
|
* Add builtin:: funcs for handling weakrefsPaul "LeoNerd" Evans2021-12-041-15/+38
| | | | | Also, ensure that B::Deparse understands the OA_TARGMY optimisation of OP_ISBOOL
* Improvements to OP_ISBOOLPaul "LeoNerd" Evans2021-12-031-2/+2
| | | | | * Apply OA_RETSCALAR, OA_TARGLEX and OA_FOLDCONST flags * Handle both 'get' and 'set' magic
* Direct optree implementations of builtin:: functionsPaul "LeoNerd" Evans2021-12-011-11/+122
| | | | | | Turn builtin::true/false into OP_CONSTs Add a dedicated OP_ISBOOL, make an efficient op version of builtin::isbool()
* builtin.c: Fix C++ compilation errorsDagfinn Ilmari Mannsåker2021-11-301-7/+6
| | | | | | | | | C++ does not allow `goto` across initalisations of variables that are in scope at the label, so just get rid of the `goto`. An alternative would be to start a new scope after the first `goto`, so that the variables aren't in scope any more at the label, but I think this is neater.
* Add a builtin:: namespace, with true/false/isboolPaul "LeoNerd" Evans2021-11-291-0/+103
This finishes the perl-visible API required for RFC 0008 https://github.com/Perl/RFCs/blob/master/rfcs/rfc0008.md It also begins the "builtin::" namespace of RFC 0009 https://github.com/Perl/RFCs/blob/master/rfcs/rfc0009.md