=>> Building lang/v build started at Thu Apr 4 21:59:04 BST 2024 port directory: /usr/ports/lang/v package name: v-0.4.3 building for: FreeBSD pkg-builder.dan.net.uk 13.2-RELEASE-p10 FreeBSD 13.2-RELEASE-p10 amd64 maintained by: sunpoet@FreeBSD.org Makefile datestamp: -rw-r--r-- 1 root wheel 2070 Dec 2 20:29 /usr/ports/lang/v/Makefile Ports top last git commit: c2c35d895e Ports top unclean checkout: yes Port dir last git commit: bdff10f8d7 Port dir unclean checkout: no Poudriere version: poudriere-git-3.4.99.20240122_1 Host OSVERSION: 1400097 Jail OSVERSION: 1302001 Job Id: 18 ---Begin Environment--- SHELL=/bin/csh OSVERSION=1302001 UNAME_v=FreeBSD 13.2-RELEASE-p10 UNAME_r=13.2-RELEASE-p10 BLOCKSIZE=K MAIL=/var/mail/root MM_CHARSET=UTF-8 LANG=C.UTF-8 STATUS=1 HOME=/root PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin MAKE_OBJDIR_CHECK_WRITABLE=0 LOCALBASE=/usr/local USER=root POUDRIERE_NAME=poudriere-git LIBEXECPREFIX=/usr/local/libexec/poudriere POUDRIERE_VERSION=3.4.99.20240122_1 MASTERMNT=/usr/local/poudriere/data/.m/13-amd64-default-dan/ref LC_COLLATE=C POUDRIERE_BUILD_TYPE=bulk PACKAGE_BUILDING=yes SAVED_TERM=screen OUTPUT_REDIRECTED_STDERR=4 OUTPUT_REDIRECTED=1 PWD=/usr/local/poudriere/data/.m/13-amd64-default-dan/18/.p OUTPUT_REDIRECTED_STDOUT=3 P_PORTS_FEATURES=FLAVORS SUBPACKAGES SELECTED_OPTIONS MASTERNAME=13-amd64-default-dan SCRIPTPREFIX=/usr/local/share/poudriere SCRIPTNAME=bulk.sh OLDPWD=/usr/local/poudriere/data/.m/13-amd64-default-dan/ref/.p/pool POUDRIERE_PKGNAME=poudriere-git-3.4.99.20240122_1 SCRIPTPATH=/usr/local/share/poudriere/bulk.sh POUDRIEREPATH=/usr/local/bin/poudriere ---End Environment--- ---Begin Poudriere Port Flags/Env--- PORT_FLAGS= PKGENV= FLAVOR= MAKE_ARGS= ---End Poudriere Port Flags/Env--- ---Begin OPTIONS List--- ===> The following configuration options are available for v-0.4.3: DOCS=on: Build and/or install documentation EXAMPLES=on: Build and/or install examples ===> Use 'make config' to modify these settings ---End OPTIONS List--- --MAINTAINER-- sunpoet@FreeBSD.org --End MAINTAINER-- --CONFIGURE_ARGS-- --End CONFIGURE_ARGS-- --CONFIGURE_ENV-- MAKE=gmake XDG_DATA_HOME=/wrkdirs/usr/ports/lang/v/work XDG_CONFIG_HOME=/wrkdirs/usr/ports/lang/v/work XDG_CACHE_HOME=/wrkdirs/usr/ports/lang/v/work/.cache HOME=/wrkdirs/usr/ports/lang/v/work TMPDIR="/tmp" PATH=/ccache/libexec/ccache:/wrkdirs/usr/ports/lang/v/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/lang/v/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig SHELL=/bin/sh CONFIG_SHELL=/bin/sh CCACHE_DIR="/root/.ccache" --End CONFIGURE_ENV-- --MAKE_ENV-- XDG_DATA_HOME=/wrkdirs/usr/ports/lang/v/work XDG_CONFIG_HOME=/wrkdirs/usr/ports/lang/v/work XDG_CACHE_HOME=/wrkdirs/usr/ports/lang/v/work/.cache HOME=/wrkdirs/usr/ports/lang/v/work TMPDIR="/tmp" PATH=/ccache/libexec/ccache:/wrkdirs/usr/ports/lang/v/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/lang/v/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="" LDFLAGS=" -lm -fstack-protector-strong " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " CCACHE_DIR="/root/.ccache" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" --End MAKE_ENV-- --PLIST_SUB-- PORTDOCS="" PORTEXAMPLES="" OSREL=13.2 PREFIX=%D LOCALBASE=/usr/local RESETPREFIX=/usr/local LIB32DIR=lib DOCSDIR="share/doc/v" EXAMPLESDIR="share/examples/v" DATADIR="share/v" WWWDIR="www/v" ETCDIR="etc/v" --End PLIST_SUB-- --SUB_LIST-- PREFIX=/usr/local LOCALBASE=/usr/local DATADIR=/usr/local/share/v DOCSDIR=/usr/local/share/doc/v EXAMPLESDIR=/usr/local/share/examples/v WWWDIR=/usr/local/www/v ETCDIR=/usr/local/etc/v --End SUB_LIST-- ---Begin make.conf--- USE_PACKAGE_DEPENDS=yes BATCH=yes WRKDIRPREFIX=/wrkdirs PORTSDIR=/usr/ports PACKAGES=/packages DISTDIR=/distfiles FORCE_PACKAGE=yes PACKAGE_BUILDING=yes PACKAGE_BUILDING_FLAVORS=yes #### #### CCACHE_CPP2=1 WITH_SSP_PORTS=yes WITH_SSP=yes #WITH_LTO=yes DISABLE_LICENSES=yes LICENSES_ACCEPTED=AGPLv3 APACHE10 APACHE11 APACHE20 ART10 ARTPERL10 ART20 BSD BSD2CLAUSE BSD3CLAUSE BSD4CLAUSE BSL CC0-1.0 CDDL ClArtistic EPL GFDL GMGPL GPLv1 GPLv2 GPLv3 GPLv3RLE ISCL LGPL20 LGPL21 LGPL3 LPPL10 LPPL11 LPPL12 LPPL13 LPPL13a LPPL13b LPPL13c MIT MPL OpenSSL OFL10 OFL11 OWL PostgreSQL PHP202 PHP30 PHP301 PSFL RUBY ZLIB ZPL21 SVM-Light EULA ALASIR Microsoft-exFAT SIMIAN UDEVGAME unknown MTA COMMERCIAL teamspeak NO_LICENSES_DIALOGS=yes #### #### NO_IGNORE=yes DEFAULT_VERSIONS+=ssl=openssl mysql=8.0 imagemagick=7 samba=4.13 java=18 WITH_SETID_MODE=force PHP_ZTS=enabled OPTIONS_UNSET+=OPENJPEG OPTIONS_UNSET+=GSSAPI_BASE OPTIONS_SET+=ZTS OPTIONS_SET+=GSSAPI_NONE WITH_CCACHE_BUILD=yes CCACHE_DIR=/root/.ccache NO_CCACHE_DEPEND=1 CCACHE_WRAPPER_PATH= /ccache/libexec/ccache #### Misc Poudriere #### .include "/etc/make.conf.ports_env" GID=0 UID=0 DISABLE_MAKE_JOBS=poudriere ---End make.conf--- --Resource limits-- cpu time (seconds, -t) unlimited file size (512-blocks, -f) unlimited data seg size (kbytes, -d) 33554432 stack size (kbytes, -s) 524288 core file size (512-blocks, -c) unlimited max memory size (kbytes, -m) unlimited locked memory (kbytes, -l) unlimited max user processes (-u) 89999 open files (-n) 8192 virtual mem size (kbytes, -v) unlimited swap limit (kbytes, -w) unlimited socket buffer size (bytes, -b) unlimited pseudo-terminals (-p) unlimited kqueues (-k) unlimited umtx shared locks (-o) unlimited --End resource limits-- =================================================== ===== env: NO_DEPENDS=yes USER=root UID=0 GID=0 =========================================================================== =================================================== ===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0 ===> v-0.4.3 depends on file: /usr/local/sbin/pkg - not found ===> Installing existing package /packages/All/pkg-1.20.9_1.pkg [pkg-builder.dan.net.uk] Installing pkg-1.20.9_1... [pkg-builder.dan.net.uk] Extracting pkg-1.20.9_1: .......... done ===> v-0.4.3 depends on file: /usr/local/sbin/pkg - found ===> Returning to build of v-0.4.3 =========================================================================== =================================================== ===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0 =========================================================================== =================================================== ===== env: NO_DEPENDS=yes USER=root UID=0 GID=0 ===> Fetching all distfiles required by v-0.4.3 for building =========================================================================== =================================================== ===== env: NO_DEPENDS=yes USER=root UID=0 GID=0 ===> Fetching all distfiles required by v-0.4.3 for building => SHA256 Checksum OK for vlang-v-0.4.3_GH0.tar.gz. => SHA256 Checksum OK for vlang-vc-760acca_GH0.tar.gz. =========================================================================== =================================================== ===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0 =========================================================================== =================================================== ===== env: NO_DEPENDS=yes USER=root UID=0 GID=0 ===> Fetching all distfiles required by v-0.4.3 for building ===> Extracting for v-0.4.3 => SHA256 Checksum OK for vlang-v-0.4.3_GH0.tar.gz. => SHA256 Checksum OK for vlang-vc-760acca_GH0.tar.gz. =========================================================================== =================================================== ===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0 =========================================================================== =================================================== ===== env: NO_DEPENDS=yes USER=root UID=0 GID=0 ===> Patching for v-0.4.3 =========================================================================== =================================================== ===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0 ===> v-0.4.3 depends on package: gmake>=4.4.1 - not found ===> Installing existing package /packages/All/gmake-4.4.1.pkg [pkg-builder.dan.net.uk] Installing gmake-4.4.1... [pkg-builder.dan.net.uk] `-- Installing gettext-runtime-0.22.3_1... [pkg-builder.dan.net.uk] | `-- Installing indexinfo-0.3.1... [pkg-builder.dan.net.uk] | `-- Extracting indexinfo-0.3.1: . done [pkg-builder.dan.net.uk] `-- Extracting gettext-runtime-0.22.3_1: .......... done [pkg-builder.dan.net.uk] Extracting gmake-4.4.1: .......... done ===> v-0.4.3 depends on package: gmake>=4.4.1 - found ===> Returning to build of v-0.4.3 =========================================================================== =================================================== ===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0 =========================================================================== =================================================== ===== env: NO_DEPENDS=yes USER=root UID=0 GID=0 ===> Configuring for v-0.4.3 =========================================================================== =================================================== ===== env: NO_DEPENDS=yes USER=root UID=0 GID=0 ===> Building for v-0.4.3 cc -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=gnu11 -w -o v1 vc/v.c -lm -lexecinfo -lpthread -lm -fstack-protector-strong ./v1 -no-parallel -o v2 cmd/v vlib/builtin/array.v:23:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 21 | } 22 | 23 | [flag] | ^ 24 | pub enum ArrayFlags { 25 | noslices // when <<, `.noslices` will free the old data block immediately (you have to be sure, that there are *no slices* to that specific array). TODO: integrate with reference counting/compiler support for the static cases. vlib/builtin/array.v:218:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 216 | // 217 | // It is `unsafe` to call directly because `depth` is not checked 218 | [direct_array_access; unsafe] | ^ 219 | pub fn (a array) repeat_to_depth(count int, depth int) array { 220 | if count < 0 { vlib/builtin/array.v:290:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 288 | // insert_many is used internally to implement inserting many values 289 | // into an the array beginning at `i`. 290 | [unsafe] | ^ 291 | fn (mut a array) insert_many(i int, val voidptr, size int) { 292 | $if !no_bounds_checking { vlib/builtin/array.v:316:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 314 | // NOTE: `.prepend` is probably all you need. 315 | // NOTE: This code is never called in all of vlib 316 | [unsafe] | ^ 317 | fn (mut a array) prepend_many(val voidptr, size int) { 318 | unsafe { a.insert_many(0, val, size) } vlib/builtin/array.v:397:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 395 | // like structs, maps, pointers etc, since setting them to 0, 396 | // can later lead to hard to find bugs. 397 | [unsafe] | ^ 398 | pub fn (mut a array) reset() { 399 | unsafe { vmemset(a.data, 0, a.len * a.element_size) } vlib/builtin/array.v:434:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 432 | 433 | // we manually inline this for single operations for performance without -prod 434 | [inline; unsafe] | ^ 435 | fn (a array) get_unsafe(i int) voidptr { 436 | unsafe { vlib/builtin/array.v:637:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 635 | 636 | // recursively clone given array - `unsafe` when called directly because depth is not checked 637 | [unsafe] | ^ 638 | pub fn (a &array) clone_to_depth(depth int) array { 639 | mut arr := array{ vlib/builtin/array.v:663:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 661 | 662 | // we manually inline this for single operations for performance without -prod 663 | [inline; unsafe] | ^ 664 | fn (mut a array) set_unsafe(i int, val voidptr) { 665 | unsafe { vmemcpy(&u8(a.data) + u64(a.element_size) * u64(i), val, a.element_size) } vlib/builtin/array.v:688:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 686 | // push_many implements the functionality for pushing another array. 687 | // `val` is array.data and user facing usage is `a << [1,2,3]` 688 | [unsafe] | ^ 689 | pub fn (mut a3 array) push_many(val voidptr, size int) { 690 | if size <= 0 || val == unsafe { nil } { vlib/builtin/array.v:744:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 742 | 743 | // free frees all memory occupied by the array. 744 | [unsafe] | ^ 745 | pub fn (a &array) free() { 746 | $if prealloc { vlib/builtin/array.v:897:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 895 | pub fn (a array) index(value voidptr) int 896 | 897 | [direct_array_access; unsafe] | ^ 898 | pub fn (mut a []string) free() { 899 | $if prealloc { vlib/builtin/array.v:913:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 911 | // str returns a string representation of an array of strings 912 | // Example: ['a', 'b', 'c'].str() // => "['a', 'b', 'c']". 913 | [direct_array_access; manualfree] | ^ 914 | pub fn (a []string) str() string { 915 | mut sb_len := 4 // 2x" + 1x, + 1xspace vlib/builtin/array.v:986:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 984 | // a new memory location (creating a clone) unless the array.cap 985 | // is already large enough. 986 | [unsafe] | ^ 987 | pub fn (mut a array) grow_len(amount int) { 988 | a.ensure_cap(a.len + amount) vlib/builtin/array.v:994:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 992 | // pointers returns a new array, where each element 993 | // is the address of the corresponding element in the array. 994 | [unsafe] | ^ 995 | pub fn (a array) pointers() []voidptr { 996 | mut res := []voidptr{} vlib/builtin/array.v:1005:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1003 | // vbytes on`voidptr` makes a V []u8 structure from a C style memory buffer. 1004 | // NOTE: the data is reused, NOT copied! 1005 | [unsafe] | ^ 1006 | pub fn (data voidptr) vbytes(len int) []u8 { 1007 | res := array{ vlib/builtin/array.v:1018:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1016 | // vbytes on `&u8` makes a V []u8 structure from a C style memory buffer. 1017 | // NOTE: the data is reused, NOT copied! 1018 | [unsafe] | ^ 1019 | pub fn (data &u8) vbytes(len int) []u8 { 1020 | return unsafe { voidptr(data).vbytes(len) } vlib/builtin/builtin.c.v:1:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1 | [has_globals] | ^ 2 | module builtin 3 | vlib/builtin/builtin.c.v:9:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 7 | fn C.strerror(int) &char 8 | 9 | [noreturn] | ^ 10 | fn vhalt() { 11 | for {} vlib/builtin/builtin.c.v:14:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 12 | } 13 | 14 | [markused] | ^ 15 | fn v_segmentation_fault_handler(signal_number int) { 16 | $if freestanding { vlib/builtin/builtin.c.v:30:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 28 | 29 | // exit terminates execution immediately and returns exit `code` to the shell. 30 | [noreturn] | ^ 31 | pub fn exit(code int) { 32 | C.exit(code) vlib/builtin/builtin.c.v:39:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 37 | // Note: the duplication here is because tcc_backtrace should be called directly 38 | // inside the panic functions. 39 | [noreturn] | ^ 40 | fn panic_debug(line_no int, file string, mod string, fn_name string, s string) { 41 | // Note: the order here is important for a stabler test output vlib/builtin/builtin.c.v:86:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 84 | // panic_option_not_set is called by V, when you use option error propagation in your main function. 85 | // It ends the program with a panic. 86 | [noreturn] | ^ 87 | pub fn panic_option_not_set(s string) { 88 | panic('option not set (${s})') vlib/builtin/builtin.c.v:93:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 91 | // panic_result_not_set is called by V, when you use result error propagation in your main function 92 | // It ends the program with a panic. 93 | [noreturn] | ^ 94 | pub fn panic_result_not_set(s string) { 95 | panic('result not set (${s})') vlib/builtin/builtin.c.v:100:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 98 | // panic prints a nice error message, then exits the process with exit code of 1. 99 | // It also shows a backtrace on most platforms. 100 | [noreturn] | ^ 101 | pub fn panic(s string) { 102 | $if freestanding { vlib/builtin/builtin.c.v:156:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 154 | 155 | // panic with a C-API error message matching `errnum` 156 | [noreturn] | ^ 157 | pub fn panic_error_number(basestr string, errnum int) { 158 | panic(basestr + c_error_number_str(errnum)) vlib/builtin/builtin.c.v:227:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 225 | 226 | // print prints a message to stdout. Note that unlike `eprint`, stdout is not automatically flushed. 227 | [manualfree] | ^ 228 | pub fn print(s string) { 229 | $if android && !termux { vlib/builtin/builtin.c.v:242:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 240 | 241 | // println prints a message with a line end, to stdout. Note that unlike `eprintln`, stdout is not automatically flushed. 242 | [manualfree] | ^ 243 | pub fn println(s string) { 244 | if s.str == 0 { vlib/builtin/builtin.c.v:263:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 261 | } 262 | 263 | [manualfree] | ^ 264 | fn _writeln_to_fd(fd int, s string) { 265 | $if !builtin_writeln_should_write_at_once ? { vlib/builtin/builtin.c.v:283:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 281 | } 282 | 283 | [manualfree] | ^ 284 | fn _write_buf_to_fd(fd int, buf &u8, buf_len int) { 285 | if buf_len <= 0 { vlib/builtin/builtin.c.v:318:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 316 | // malloc returns a `byteptr` pointing to the memory address of the allocated space. 317 | // unlike the `calloc` family of functions - malloc will not zero the memory block. 318 | [unsafe] | ^ 319 | pub fn malloc(n isize) &u8 { 320 | $if trace_malloc ? { vlib/builtin/builtin.c.v:361:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 359 | } 360 | 361 | [unsafe] | ^ 362 | pub fn malloc_noscan(n isize) &u8 { 363 | $if trace_malloc ? { vlib/builtin/builtin.c.v:408:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 406 | } 407 | 408 | [inline] | ^ 409 | fn __at_least_one(how_many u64) u64 { 410 | // handle the case for allocating memory for empty structs, which have sizeof(EmptyStruct) == 0 vlib/builtin/builtin.c.v:420:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 418 | // malloc_uncollectable dynamically allocates a `n` bytes block of memory 419 | // on the heap, which will NOT be garbage-collected (but its contents will). 420 | [unsafe] | ^ 421 | pub fn malloc_uncollectable(n isize) &u8 { 422 | $if trace_malloc ? { vlib/builtin/builtin.c.v:465:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 463 | // previously allocated with `malloc`, `v_calloc` or `vcalloc`. 464 | // Please, see also realloc_data, and use it instead if possible. 465 | [unsafe] | ^ 466 | pub fn v_realloc(b &u8, n isize) &u8 { 467 | $if trace_realloc ? { vlib/builtin/builtin.c.v:496:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 494 | // can make debugging easier, when you compile your program with 495 | // `-d debug_realloc`. 496 | [unsafe] | ^ 497 | pub fn realloc_data(old_data &u8, old_size int, new_size int) &u8 { 498 | $if trace_realloc ? { vlib/builtin/builtin.c.v:585:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 583 | 584 | // free allows for manually freeing memory allocated at the address `ptr`. 585 | [unsafe] | ^ 586 | pub fn free(ptr voidptr) { 587 | $if prealloc { vlib/builtin/builtin.c.v:607:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 605 | // returns a pointer to the newly allocated space. 606 | 607 | [unsafe] | ^ 608 | pub fn memdup(src voidptr, sz isize) voidptr { 609 | $if trace_memdup ? { vlib/builtin/builtin.c.v:621:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 619 | } 620 | 621 | [unsafe] | ^ 622 | pub fn memdup_noscan(src voidptr, sz isize) voidptr { 623 | $if trace_memdup ? { vlib/builtin/builtin.c.v:639:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 637 | // memdup_uncollectable then copies the contents of `src` into the allocated 638 | // space and returns a pointer to the newly allocated space. 639 | [unsafe] | ^ 640 | pub fn memdup_uncollectable(src voidptr, sz isize) voidptr { 641 | $if trace_memdup ? { vlib/builtin/builtin.c.v:683:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 681 | } 682 | 683 | [inline] | ^ 684 | fn v_fixed_index(i int, len int) int { 685 | $if !no_bounds_checking { vlib/builtin/builtin.c.v:698:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 696 | // more convenient to just use `os.args` instead. 697 | 698 | [markused] | ^ 699 | __global g_main_argc = int(0) 700 | vlib/builtin/builtin.c.v:701:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 699 | __global g_main_argc = int(0) 700 | 701 | [markused] | ^ 702 | __global g_main_argv = unsafe { nil } vlib/builtin/builtin.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | [has_globals] | ^ 5 | module builtin 6 | vlib/builtin/builtin.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6 | 7 | // isnil returns true if an object is nil (only for C objects). 8 | [inline] | ^ 9 | pub fn isnil(v voidptr) bool { 10 | return v == 0 vlib/builtin/builtin.v:63:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 61 | // free frees the memory occupied by the assertion meta data. It is called automatically by 62 | // the code, that V's test framework generates, after all other callbacks have been called. 63 | [manualfree; unsafe] | ^ 64 | pub fn (ami &VAssertMetaInfo) free() { 65 | unsafe { vlib/builtin/builtin_nix.c.v:17:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 15 | } 16 | 17 | [markused; noreturn] | ^ 18 | pub fn panic_lasterr(base string) { 19 | // TODO: use strerror_r and errno vlib/builtin/builtin_notd_use_libbacktrace.c.v:6:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4 | } 5 | 6 | [noinline] | ^ 7 | fn eprint_libbacktrace(frames_to_skip int) { 8 | } vlib/builtin/cfns.c.v:3:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1 | module builtin 2 | 3 | [typedef] | ^ 4 | pub struct C.FILE {} 5 | vlib/builtin/cfns.c.v:15:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 13 | fn C.memset(str voidptr, c int, n usize) voidptr 14 | 15 | [trusted] | ^ 16 | fn C.calloc(int, int) &u8 17 | vlib/builtin/cfns.c.v:26:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 24 | fn C.free(ptr voidptr) 25 | 26 | [noreturn; trusted] | ^ 27 | fn C.exit(code int) 28 | vlib/builtin/cfns.c.v:37:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 35 | fn C.sscanf(&u8, &u8, ...&u8) int 36 | 37 | [trusted] | ^ 38 | fn C.isdigit(c int) bool 39 | vlib/builtin/cfns.c.v:81:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 79 | 80 | // process execution, os.process: 81 | [trusted] | ^ 82 | fn C.getpid() int 83 | vlib/builtin/cfns.c.v:104:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 102 | fn C.strcmp(s1 &char, s2 &char) int 103 | 104 | [trusted] | ^ 105 | fn C.fork() int 106 | vlib/builtin/cfns.c.v:111:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 109 | fn C.waitpid(pid int, status &int, options int) int 110 | 111 | [trusted] | ^ 112 | fn C.kill(pid int, sig int) int 113 | vlib/builtin/cfns.c.v:138:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 136 | fn C.fgets(str &char, n int, stream &C.FILE) int 137 | 138 | [trusted] | ^ 139 | fn C.sigemptyset() int 140 | vlib/builtin/cfns.c.v:143:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 141 | fn C.getcwd(buf &char, size usize) &char 142 | 143 | [trusted] | ^ 144 | fn C.mktime() int 145 | vlib/builtin/cfns.c.v:148:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 146 | fn C.gettimeofday(tv &C.timeval, tz &C.timezone) int 147 | 148 | [trusted] | ^ 149 | fn C.sleep(seconds u32) u32 150 | vlib/builtin/cfns.c.v:152:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 150 | 151 | // fn C.usleep(usec useconds_t) int 152 | [trusted] | ^ 153 | fn C.usleep(usec u32) int 154 | vlib/builtin/cfns.c.v:155:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 153 | fn C.usleep(usec u32) int 154 | 155 | [typedef] | ^ 156 | pub struct C.DIR { 157 | } vlib/builtin/cfns.c.v:167:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 165 | 166 | // C.rand returns a pseudorandom integer from 0 (inclusive) to C.RAND_MAX (exclusive) 167 | [trusted] | ^ 168 | fn C.rand() int 169 | vlib/builtin/cfns.c.v:171:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 169 | 170 | // C.srand seeds the internal PRNG with the given value. 171 | [trusted] | ^ 172 | fn C.srand(seed u32) 173 | vlib/builtin/cfns.c.v:176:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 174 | fn C.atof(str &char) f64 175 | 176 | [trusted] | ^ 177 | fn C.tolower(c int) int 178 | vlib/builtin/cfns.c.v:179:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 177 | fn C.tolower(c int) int 178 | 179 | [trusted] | ^ 180 | fn C.toupper(c int) int 181 | vlib/builtin/cfns.c.v:182:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 180 | fn C.toupper(c int) int 181 | 182 | [trusted] | ^ 183 | fn C.isspace(c int) int 184 | vlib/builtin/cfns.c.v:187:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 185 | fn C.strchr(s &char, c int) &char 186 | 187 | [trusted] | ^ 188 | fn C.getchar() int 189 | vlib/builtin/cfns.c.v:190:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 188 | fn C.getchar() int 189 | 190 | [trusted] | ^ 191 | fn C.putchar(int) int 192 | vlib/builtin/cfns.c.v:201:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 199 | fn C.strncmp(s &char, s2 &char, n int) int 200 | 201 | [trusted] | ^ 202 | fn C.strerror(int) &char 203 | vlib/builtin/cfns.c.v:208:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 206 | fn C.fprintf(voidptr, &char, ...voidptr) 207 | 208 | [trusted] | ^ 209 | fn C.WIFEXITED(status int) bool 210 | vlib/builtin/cfns.c.v:211:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 209 | fn C.WIFEXITED(status int) bool 210 | 211 | [trusted] | ^ 212 | fn C.WEXITSTATUS(status int) int 213 | vlib/builtin/cfns.c.v:214:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 212 | fn C.WEXITSTATUS(status int) int 213 | 214 | [trusted] | ^ 215 | fn C.WIFSIGNALED(status int) bool 216 | vlib/builtin/cfns.c.v:217:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 215 | fn C.WIFSIGNALED(status int) bool 216 | 217 | [trusted] | ^ 218 | fn C.WTERMSIG(status int) int 219 | vlib/builtin/cfns.c.v:220:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 218 | fn C.WTERMSIG(status int) int 219 | 220 | [trusted] | ^ 221 | fn C.isatty(fd int) int 222 | vlib/builtin/cfns.c.v:227:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 225 | fn C.sysctl(name &int, namelen u32, oldp voidptr, oldlenp voidptr, newp voidptr, newlen usize) int 226 | 227 | [trusted] | ^ 228 | fn C._fileno(int) int 229 | vlib/builtin/cfns.c.v:254:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 252 | fn C.GetUserNameW(&u16, &u32) bool 253 | 254 | [trusted] | ^ 255 | fn C.SendMessageTimeout() isize 256 | vlib/builtin/cfns.c.v:289:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 287 | fn C.GetConsoleMode(voidptr, &u32) bool 288 | 289 | [trusted] | ^ 290 | fn C.GetCurrentProcessId() u32 291 | vlib/builtin/cfns.c.v:339:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 337 | fn C.GetFullPathName(voidptr, u32, voidptr, voidptr) u32 338 | 339 | [trusted] | ^ 340 | fn C.GetCommandLine() voidptr 341 | vlib/builtin/cfns.c.v:361:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 359 | fn C.GetExitCodeProcess(hProcess voidptr, lpExitCode &u32) 360 | 361 | [trusted] | ^ 362 | fn C.GetTickCount() i64 363 | vlib/builtin/cfns.c.v:364:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 362 | fn C.GetTickCount() i64 363 | 364 | [trusted] | ^ 365 | fn C.Sleep(dwMilliseconds u32) 366 | vlib/builtin/cfns.c.v:369:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 367 | fn C.WSAStartup(u16, &voidptr) int 368 | 369 | [trusted] | ^ 370 | fn C.WSAGetLastError() int 371 | vlib/builtin/cfns.c.v:382:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 380 | fn C.URLDownloadToFile(int, &u16, &u16, int, int) 381 | 382 | [trusted] | ^ 383 | fn C.GetLastError() u32 384 | vlib/builtin/cfns.c.v:467:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 465 | 466 | // MacOS semaphore functions 467 | [trusted] | ^ 468 | fn C.dispatch_semaphore_create(i64) voidptr 469 | vlib/builtin/cfns.c.v:474:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 472 | fn C.dispatch_semaphore_wait(voidptr, u64) i64 473 | 474 | [trusted] | ^ 475 | fn C.dispatch_time(u64, i64) u64 476 | vlib/builtin/cfns_wrapper.c.v:5:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 3 | // vstrlen returns the V length of the C string `s` (0 terminator is not counted). 4 | // The C string is expected to be a &byte pointer. 5 | [inline; unsafe] | ^ 6 | pub fn vstrlen(s &u8) int { 7 | return unsafe { C.strlen(&char(s)) } vlib/builtin/cfns_wrapper.c.v:12:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 10 | // vstrlen_char returns the V length of the C string `s` (0 terminator is not counted). 11 | // The C string is expected to be a &char pointer. 12 | [inline; unsafe] | ^ 13 | pub fn vstrlen_char(s &char) int { 14 | return unsafe { C.strlen(s) } vlib/builtin/cfns_wrapper.c.v:20:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 18 | // The memory areas *MUST NOT OVERLAP*. Use vmemmove, if the memory 19 | // areas do overlap. vmemcpy returns a pointer to `dest`. 20 | [inline; unsafe] | ^ 21 | pub fn vmemcpy(dest voidptr, const_src voidptr, n isize) voidptr { 22 | $if trace_vmemcpy ? { vlib/builtin/cfns_wrapper.c.v:35:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 33 | // `src` or `dest`, and the bytes are then copied from the temporary array 34 | // to `dest`. vmemmove returns a pointer to `dest`. 35 | [inline; unsafe] | ^ 36 | pub fn vmemmove(dest voidptr, const_src voidptr, n isize) voidptr { 37 | $if trace_vmemmove ? { vlib/builtin/cfns_wrapper.c.v:57:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 55 | // You should use a function that performs comparisons in constant time for 56 | // this. 57 | [inline; unsafe] | ^ 58 | pub fn vmemcmp(const_s1 voidptr, const_s2 voidptr, n isize) int { 59 | $if trace_vmemcmp ? { vlib/builtin/cfns_wrapper.c.v:69:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 67 | // vmemset fills the first `n` bytes of the memory area pointed to by `s`, 68 | // with the constant byte `c`. It returns a pointer to the memory area `s`. 69 | [inline; unsafe] | ^ 70 | pub fn vmemset(s voidptr, c int, n isize) voidptr { 71 | $if trace_vmemset ? { vlib/builtin/cfns_wrapper.c.v:81:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 79 | type FnSortCB = fn (const_a voidptr, const_b voidptr) int 80 | 81 | [inline; unsafe] | ^ 82 | fn vqsort(base voidptr, nmemb usize, size usize, sort_cb FnSortCB) { 83 | C.qsort(base, nmemb, size, voidptr(sort_cb)) vlib/builtin/float.c.v:18:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 16 | */ 17 | // str return a `f64` as `string` in suitable notation. 18 | [inline] | ^ 19 | pub fn (x f64) str() string { 20 | unsafe { vlib/builtin/float.c.v:40:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 38 | 39 | // strg return a `f64` as `string` in "g" printf format 40 | [inline] | ^ 41 | pub fn (x f64) strg() string { 42 | if x == 0 { vlib/builtin/float.c.v:54:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 52 | 53 | // str returns the value of the `float_literal` as a `string`. 54 | [inline] | ^ 55 | pub fn (d float_literal) str() string { 56 | return f64(d).str() vlib/builtin/float.c.v:61:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 59 | // strsci returns the `f64` as a `string` in scientific notation with `digit_num` decimals displayed, max 17 digits. 60 | // Example: assert f64(1.234).strsci(3) == '1.234e+00' 61 | [inline] | ^ 62 | pub fn (x f64) strsci(digit_num int) string { 63 | mut n_digit := digit_num vlib/builtin/float.c.v:74:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 72 | // strlong returns a decimal notation of the `f64` as a `string`. 73 | // Example: assert f64(1.23456).strlong() == '1.23456' 74 | [inline] | ^ 75 | pub fn (x f64) strlong() string { 76 | return strconv.f64_to_str_l(x) vlib/builtin/float.c.v:84:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 82 | */ 83 | // str returns a `f32` as `string` in suitable notation. 84 | [inline] | ^ 85 | pub fn (x f32) str() string { 86 | unsafe { vlib/builtin/float.c.v:106:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 104 | 105 | // strg return a `f32` as `string` in "g" printf format 106 | [inline] | ^ 107 | pub fn (x f32) strg() string { 108 | if x == 0 { vlib/builtin/float.c.v:121:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 119 | // strsci returns the `f32` as a `string` in scientific notation with `digit_num` decimals displayed, max 8 digits. 120 | // Example: assert f32(1.234).strsci(3) == '1.234e+00' 121 | [inline] | ^ 122 | pub fn (x f32) strsci(digit_num int) string { 123 | mut n_digit := digit_num vlib/builtin/float.c.v:133:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 131 | 132 | // strlong returns a decimal notation of the `f32` as a `string`. 133 | [inline] | ^ 134 | pub fn (x f32) strlong() string { 135 | return strconv.f32_to_str_l(x) vlib/builtin/float.c.v:144:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 142 | // f32_abs returns the absolute value of `a` as a `f32` value. 143 | // Example: assert f32_abs(-2.0) == 2.0 144 | [inline] | ^ 145 | pub fn f32_abs(a f32) f32 { 146 | return if a < 0 { -a } else { a } vlib/builtin/float.c.v:151:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 149 | // f64_abs returns the absolute value of `a` as a `f64` value. 150 | // Example: assert f64_abs(-2.0) == f64(2.0) 151 | [inline] | ^ 152 | fn f64_abs(a f64) f64 { 153 | return if a < 0 { -a } else { a } vlib/builtin/float.c.v:158:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 156 | // f32_max returns the largest `f32` of input `a` and `b`. 157 | // Example: assert f32_max(2.0,3.0) == 3.0 158 | [inline] | ^ 159 | pub fn f32_max(a f32, b f32) f32 { 160 | return if a > b { a } else { b } vlib/builtin/float.c.v:165:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 163 | // f32_min returns the smallest `f32` of input `a` and `b`. 164 | // Example: assert f32_min(2.0,3.0) == 2.0 165 | [inline] | ^ 166 | pub fn f32_min(a f32, b f32) f32 { 167 | return if a < b { a } else { b } vlib/builtin/float.c.v:172:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 170 | // f64_max returns the largest `f64` of input `a` and `b`. 171 | // Example: assert f64_max(2.0,3.0) == 3.0 172 | [inline] | ^ 173 | pub fn f64_max(a f64, b f64) f64 { 174 | return if a > b { a } else { b } vlib/builtin/float.c.v:179:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 177 | // f64_min returns the smallest `f64` of input `a` and `b`. 178 | // Example: assert f64_min(2.0,3.0) == 2.0 179 | [inline] | ^ 180 | fn f64_min(a f64, b f64) f64 { 181 | return if a < b { a } else { b } vlib/builtin/float.c.v:187:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 185 | // using an epsilon of typically 1E-5 or higher (backend/compiler dependent). 186 | // Example: assert f32(2.0).eq_epsilon(2.0) 187 | [inline] | ^ 188 | pub fn (a f32) eq_epsilon(b f32) bool { 189 | hi := f32_max(f32_abs(a), f32_abs(b)) vlib/builtin/float.c.v:209:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 207 | // using an epsilon of typically 1E-9 or higher (backend/compiler dependent). 208 | // Example: assert f64(2.0).eq_epsilon(2.0) 209 | [inline] | ^ 210 | pub fn (a f64) eq_epsilon(b f64) bool { 211 | hi := f64_max(f64_abs(a), f64_abs(b)) vlib/builtin/int.v:79:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 77 | // This implementation is the quickest with gcc -O2 78 | // str_l returns the string representation of the integer nn with max chars. 79 | [direct_array_access; inline] | ^ 80 | fn (nn int) str_l(max int) string { 81 | unsafe { vlib/builtin/int.v:178:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 176 | // str returns the value of the `u32` as a `string`. 177 | // Example: assert u32(20000).str() == '20000' 178 | [direct_array_access; inline] | ^ 179 | pub fn (nn u32) str() string { 180 | unsafe { vlib/builtin/int.v:215:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 213 | 214 | // str returns the value of the `int_literal` as a `string`. 215 | [inline] | ^ 216 | pub fn (n int_literal) str() string { 217 | return i64(n).str() vlib/builtin/int.v:222:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 220 | // str returns the value of the `i64` as a `string`. 221 | // Example: assert i64(-200000).str() == '-200000' 222 | [direct_array_access; inline] | ^ 223 | pub fn (nn i64) str() string { 224 | unsafe { vlib/builtin/int.v:271:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 269 | // str returns the value of the `u64` as a `string`. 270 | // Example: assert u64(2000000).str() == '2000000' 271 | [direct_array_access; inline] | ^ 272 | pub fn (nn u64) str() string { 273 | unsafe { vlib/builtin/int.v:320:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 318 | 319 | // u64_to_hex converts the number `nn` to a (zero padded if necessary) hexadecimal `string`. 320 | [direct_array_access; inline] | ^ 321 | fn u64_to_hex(nn u64, len u8) string { 322 | mut n := nn vlib/builtin/int.v:335:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 333 | 334 | // u64_to_hex_no_leading_zeros converts the number `nn` to hexadecimal `string`. 335 | [direct_array_access; inline] | ^ 336 | fn u64_to_hex_no_leading_zeros(nn u64, len u8) string { 337 | mut n := nn vlib/builtin/int.v:530:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 528 | // str_escaped returns the contents of `byte` as an escaped `string`. 529 | // Example: assert u8(0).str_escaped() == r'`\0`' 530 | [manualfree] | ^ 531 | pub fn (b u8) str_escaped() string { 532 | str := match b { vlib/builtin/int.v:576:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 574 | // Example: assert `H`.is_capital() == true 575 | // Example: assert `h`.is_capital() == false 576 | [inline] | ^ 577 | pub fn (c u8) is_capital() bool { 578 | return c >= `A` && c <= `Z` vlib/builtin/map.c.v:10:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 8 | // the strings are very likely to be equal 9 | // TODO: add branch prediction hints 10 | [inline] | ^ 11 | fn fast_string_eq(a string, b string) bool { 12 | if a.len != b.len { vlib/builtin/map.v:93:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 91 | } 92 | 93 | [inline] | ^ 94 | fn new_dense_array(key_bytes int, value_bytes int) DenseArray { 95 | cap := 8 vlib/builtin/map.v:108:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 106 | } 107 | 108 | [inline] | ^ 109 | fn (d &DenseArray) key(i int) voidptr { 110 | return unsafe { voidptr(d.keys + i * d.key_bytes) } vlib/builtin/map.v:114:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 112 | 113 | // for cgen 114 | [inline] | ^ 115 | fn (d &DenseArray) value(i int) voidptr { 116 | return unsafe { voidptr(d.values + i * d.value_bytes) } vlib/builtin/map.v:119:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 117 | } 118 | 119 | [inline] | ^ 120 | fn (d &DenseArray) has_index(i int) bool { 121 | return d.deletes == 0 || unsafe { d.all_deleted[i] } == 0 vlib/builtin/map.v:126:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 124 | // Make space to append an element and return index 125 | // The growth-factor is roughly 1.125 `(x + (x >> 3))` 126 | [inline] | ^ 127 | fn (mut d DenseArray) expand() int { 128 | old_cap := d.cap vlib/builtin/map.v:309:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 307 | } 308 | 309 | [inline] | ^ 310 | fn (m &map) key_to_index(pkey voidptr) (u32, u32) { 311 | hash := m.hash_fn(pkey) vlib/builtin/map.v:317:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 315 | } 316 | 317 | [inline] | ^ 318 | fn (m &map) meta_less(_index u32, _metas u32) (u32, u32) { 319 | mut index := _index vlib/builtin/map.v:328:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 326 | } 327 | 328 | [inline] | ^ 329 | fn (mut m map) meta_greater(_index u32, _metas u32, kvi u32) { 330 | mut meta := _metas vlib/builtin/map.v:355:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 353 | } 354 | 355 | [inline] | ^ 356 | fn (mut m map) ensure_extra_metas(probe_count u32) { 357 | if (probe_count << 1) == m.extra_metas { vlib/builtin/map.v:570:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 568 | } 569 | 570 | [inline] | ^ 571 | fn (mut d DenseArray) delete(i int) { 572 | if d.deletes == 0 { vlib/builtin/map.v:582:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 580 | 581 | // delete removes the mapping of a particular key from the map. 582 | [unsafe] | ^ 583 | pub fn (mut m map) delete(key voidptr) { 584 | mut index, mut meta := m.key_to_index(key) vlib/builtin/map.v:674:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 672 | 673 | // warning: only copies keys, does not clone 674 | [unsafe] | ^ 675 | fn (d &DenseArray) clone() DenseArray { 676 | res := DenseArray{ vlib/builtin/map.v:697:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 695 | 696 | // clone returns a clone of the `map`. 697 | [unsafe] | ^ 698 | pub fn (m &map) clone() map { 699 | metasize := int(sizeof(u32) * (m.even_index + 2 + m.extra_metas)) vlib/builtin/map.v:731:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 729 | 730 | // free releases all memory resources occupied by the `map`. 731 | [unsafe] | ^ 732 | pub fn (m &map) free() { 733 | unsafe { free(m.metas) } vlib/builtin/option.c.v:3:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1 | module builtin 2 | 3 | [typedef] | ^ 4 | pub struct C.IError { 5 | _object voidptr vlib/builtin/option.c.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6 | } 7 | 8 | [unsafe] | ^ 9 | pub fn (ie &IError) free() { 10 | unsafe { vlib/builtin/option.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 22 | } 23 | 24 | [markused] | ^ 25 | fn _option_none(data voidptr, mut option _option, size int) { 26 | unsafe { vlib/builtin/option.v:35:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 33 | } 34 | 35 | [markused] | ^ 36 | fn _option_ok(data voidptr, mut option _option, size int) { 37 | unsafe { vlib/builtin/result.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 22 | } 23 | 24 | [markused] | ^ 25 | fn _result_ok(data voidptr, mut res _result, size int) { 26 | unsafe { vlib/builtin/result.v:86:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 84 | } 85 | 86 | [unsafe] | ^ 87 | pub fn (err &MessageError) free() { 88 | unsafe { err.msg.free() } vlib/builtin/result.v:91:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 89 | } 90 | 91 | [if trace_error ?] | ^ 92 | fn trace_error(x string) { 93 | eprintln('> ${@FN} | ${x}') vlib/builtin/result.v:98:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 96 | // error returns a default error instance containing the error given in `message`. 97 | // Example: if ouch { return error('an error occurred') } 98 | [inline] | ^ 99 | pub fn error(message string) IError { 100 | trace_error(message) vlib/builtin/result.v:108:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 106 | // error_with_code returns a default error instance containing the given `message` and error `code`. 107 | // Example: if ouch { return error_with_code('an error occurred', 1) } 108 | [inline] | ^ 109 | pub fn error_with_code(message string, code int) IError { 110 | trace_error('${message} | code: ${code}') vlib/builtin/rune.v:35:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 33 | 34 | // string converts a rune array to a string 35 | [manualfree] | ^ 36 | pub fn (ra []rune) string() string { 37 | mut sb := strings.new_builder(ra.len) vlib/builtin/rune.v:59:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 57 | 58 | // bytes converts a rune to an array of bytes 59 | [manualfree] | ^ 60 | pub fn (c rune) bytes() []u8 { 61 | mut res := []u8{cap: 5} vlib/builtin/string.v:60:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 58 | // runes returns an array of all the utf runes in the string `s` 59 | // which is useful if you want random access to them 60 | [direct_array_access] | ^ 61 | pub fn (s string) runes() []rune { 62 | mut runes := []rune{cap: s.len} vlib/builtin/string.v:84:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 82 | // -autofree and `[manualfree]`. 83 | // It will panic, if the pointer `s` is 0. 84 | [unsafe] | ^ 85 | pub fn cstring_to_vstring(s &char) string { 86 | return unsafe { tos2(&u8(s)) }.clone() vlib/builtin/string.v:93:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 91 | // that tos_clone expects `&byte`, while cstring_to_vstring expects &char). 92 | // It will panic, if the pointer `s` is 0. 93 | [unsafe] | ^ 94 | pub fn tos_clone(s &u8) string { 95 | return unsafe { tos2(s) }.clone() vlib/builtin/string.v:102:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 100 | // It will panic, when the pointer `s` is 0. 101 | // See also `tos_clone`. 102 | [unsafe] | ^ 103 | pub fn tos(s &u8, len int) string { 104 | if s == 0 { vlib/builtin/string.v:119:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 117 | // It is the same as `tos3`, but for &byte pointers, avoiding callsite casts. 118 | // See also `tos_clone`. 119 | [unsafe] | ^ 120 | pub fn tos2(s &u8) string { 121 | if s == 0 { vlib/builtin/string.v:136:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 134 | // It is the same as `tos2`, but for &char pointers, avoiding callsite casts. 135 | // See also `tos_clone`. 136 | [unsafe] | ^ 137 | pub fn tos3(s &char) string { 138 | if s == 0 { vlib/builtin/string.v:153:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 151 | // It is the same as `tos5`, but for &byte pointers, avoiding callsite casts. 152 | // See also `tos_clone`. 153 | [unsafe] | ^ 154 | pub fn tos4(s &u8) string { 155 | if s == 0 { vlib/builtin/string.v:170:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 168 | // It is the same as `tos4`, but for &char pointers, avoiding callsite casts. 169 | // See also `tos_clone`. 170 | [unsafe] | ^ 171 | pub fn tos5(s &char) string { 172 | if s == 0 { vlib/builtin/string.v:187:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 185 | // (i.e. they would be freed by V's -autofree mechanism, when they are no longer used). 186 | // See also `tos_clone`. 187 | [unsafe] | ^ 188 | pub fn (bp &u8) vstring() string { 189 | return string{ vlib/builtin/string.v:200:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 198 | // does not need to calculate the length of the 0 terminated string. 199 | // See also `tos_clone`. 200 | [unsafe] | ^ 201 | pub fn (bp &u8) vstring_with_len(len int) string { 202 | return string{ vlib/builtin/string.v:216:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 214 | // Note: instead of `&u8(a.data).vstring()`, use `tos_clone(&u8(a.data))`. 215 | // See also `tos_clone`. 216 | [unsafe] | ^ 217 | pub fn (cp &char) vstring() string { 218 | return string{ vlib/builtin/string.v:230:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 228 | // does not calculate the length of the 0 terminated string. 229 | // See also `tos_clone`. 230 | [unsafe] | ^ 231 | pub fn (cp &char) vstring_with_len(len int) string { 232 | return string{ vlib/builtin/string.v:247:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 245 | // managed/freed by it, for example `os.args` is implemented using it. 246 | // See also `tos_clone`. 247 | [unsafe] | ^ 248 | pub fn (bp &u8) vstring_literal() string { 249 | return string{ vlib/builtin/string.v:261:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 259 | // does not need to calculate the length of the 0 terminated string. 260 | // See also `tos_clone`. 261 | [unsafe] | ^ 262 | pub fn (bp &u8) vstring_literal_with_len(len int) string { 263 | return string{ vlib/builtin/string.v:274:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 272 | // See also `byteptr.vstring_literal` for more details. 273 | // See also `tos_clone`. 274 | [unsafe] | ^ 275 | pub fn (cp &char) vstring_literal() string { 276 | return string{ vlib/builtin/string.v:289:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 287 | // does not need to calculate the length of the 0 terminated string. 288 | // See also `tos_clone`. 289 | [unsafe] | ^ 290 | pub fn (cp &char) vstring_literal_with_len(len int) string { 291 | return string{ vlib/builtin/string.v:311:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 309 | // clone_static returns an independent copy of a given array. 310 | // It should be used only in -autofree generated code. 311 | [inline] | ^ 312 | fn (a string) clone_static() string { 313 | return a.clone() vlib/builtin/string.v:342:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 340 | 341 | // replace replaces all occurrences of `rep` with the string passed in `with`. 342 | [direct_array_access] | ^ 343 | pub fn (s string) replace(rep string, with string) string { 344 | if s.len == 0 || rep.len == 0 || rep.len > s.len { vlib/builtin/string.v:411:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 409 | // replace_each replaces all occurrences of the string pairs given in `vals`. 410 | // Example: assert 'ABCD'.replace_each(['B','C/','C','D','D','C']) == 'AC/DC' 411 | [direct_array_access] | ^ 412 | pub fn (s string) replace_each(vals []string) string { 413 | if s.len == 0 || vals.len == 0 { vlib/builtin/string.v:501:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 499 | // replace_char replaces all occurrences of the character `rep` multiple occurrences of the character passed in `with` with respect to `repeat`. 500 | // Example: assert '\tHello!'.replace_char(`\t`,` `,8) == ' Hello!' 501 | [direct_array_access] | ^ 502 | pub fn (s string) replace_char(rep u8, with u8, repeat int) string { 503 | $if !no_bounds_checking { vlib/builtin/string.v:563:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 561 | // normalize_tabs replaces all tab characters with `tab_len` amount of spaces 562 | // Example: assert '\t\tpop rax\t; pop rax'.normalize_tabs(2) == ' pop rax ; pop rax' 563 | [inline] | ^ 564 | pub fn (s string) normalize_tabs(tab_len int) string { 565 | return s.replace_char(`\t`, ` `, tab_len) vlib/builtin/string.v:569:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 567 | 568 | // bool returns `true` if the string equals the word "true" it will return `false` otherwise. 569 | [inline] | ^ 570 | pub fn (s string) bool() bool { 571 | return s == 'true' || s == 't' // TODO t for pg, remove vlib/builtin/string.v:575:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 573 | 574 | // int returns the value of the string as an integer `'1'.int() == 1`. 575 | [inline] | ^ 576 | pub fn (s string) int() int { 577 | return int(strconv.common_parse_int(s, 0, 32, false, false) or { 0 }) vlib/builtin/string.v:581:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 579 | 580 | // i64 returns the value of the string as i64 `'1'.i64() == i64(1)`. 581 | [inline] | ^ 582 | pub fn (s string) i64() i64 { 583 | return strconv.common_parse_int(s, 0, 64, false, false) or { 0 } vlib/builtin/string.v:587:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 585 | 586 | // i8 returns the value of the string as i8 `'1'.i8() == i8(1)`. 587 | [inline] | ^ 588 | pub fn (s string) i8() i8 { 589 | return i8(strconv.common_parse_int(s, 0, 8, false, false) or { 0 }) vlib/builtin/string.v:593:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 591 | 592 | // i16 returns the value of the string as i16 `'1'.i16() == i16(1)`. 593 | [inline] | ^ 594 | pub fn (s string) i16() i16 { 595 | return i16(strconv.common_parse_int(s, 0, 16, false, false) or { 0 }) vlib/builtin/string.v:599:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 597 | 598 | // f32 returns the value of the string as f32 `'1.0'.f32() == f32(1)`. 599 | [inline] | ^ 600 | pub fn (s string) f32() f32 { 601 | return f32(strconv.atof64(s) or { 0 }) vlib/builtin/string.v:605:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 603 | 604 | // f64 returns the value of the string as f64 `'1.0'.f64() == f64(1)`. 605 | [inline] | ^ 606 | pub fn (s string) f64() f64 { 607 | return strconv.atof64(s) or { 0 } vlib/builtin/string.v:611:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 609 | 610 | // u8 returns the value of the string as u8 `'1'.u8() == u8(1)`. 611 | [inline] | ^ 612 | pub fn (s string) u8() u8 { 613 | return u8(strconv.common_parse_uint(s, 0, 8, false, false) or { 0 }) vlib/builtin/string.v:617:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 615 | 616 | // u16 returns the value of the string as u16 `'1'.u16() == u16(1)`. 617 | [inline] | ^ 618 | pub fn (s string) u16() u16 { 619 | return u16(strconv.common_parse_uint(s, 0, 16, false, false) or { 0 }) vlib/builtin/string.v:623:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 621 | 622 | // u32 returns the value of the string as u32 `'1'.u32() == u32(1)`. 623 | [inline] | ^ 624 | pub fn (s string) u32() u32 { 625 | return u32(strconv.common_parse_uint(s, 0, 32, false, false) or { 0 }) vlib/builtin/string.v:629:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 627 | 628 | // u64 returns the value of the string as u64 `'1'.u64() == u64(1)`. 629 | [inline] | ^ 630 | pub fn (s string) u64() u64 { 631 | return strconv.common_parse_uint(s, 0, 64, false, false) or { 0 } vlib/builtin/string.v:639:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 637 | // as a method on `string`. For more advanced features, 638 | // consider calling `strconv.common_parse_uint` directly. 639 | [inline] | ^ 640 | pub fn (s string) parse_uint(_base int, _bit_size int) !u64 { 641 | return strconv.parse_uint(s, _base, _bit_size) vlib/builtin/string.v:660:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 658 | // as a method on `string`. For more advanced features, 659 | // consider calling `strconv.common_parse_int` directly. 660 | [inline] | ^ 661 | pub fn (s string) parse_int(_base int, _bit_size int) !i64 { 662 | return strconv.parse_int(s, _base, _bit_size) vlib/builtin/string.v:665:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 663 | } 664 | 665 | [direct_array_access] | ^ 666 | fn (s string) == (a string) bool { 667 | if s.str == 0 { vlib/builtin/string.v:686:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 684 | 685 | // compare returns -1 if `s` < `a`, 0 if `s` == `a`, and 1 if `s` > `a` 686 | [direct_array_access] | ^ 687 | pub fn (s string) compare(a string) int { 688 | min_len := if s.len < a.len { s.len } else { a.len } vlib/builtin/string.v:706:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 704 | } 705 | 706 | [direct_array_access] | ^ 707 | fn (s string) < (a string) bool { 708 | for i in 0 .. s.len { vlib/builtin/string.v:721:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 719 | } 720 | 721 | [direct_array_access] | ^ 722 | fn (s string) + (a string) string { 723 | new_len := a.len + s.len vlib/builtin/string.v:742:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 740 | // Split a string using the chars in the delimiter string as delimiters chars. 741 | // If the delimiter string is empty then `.split()` is used. 742 | [direct_array_access] | ^ 743 | pub fn (s string) split_any(delim string) []string { 744 | mut res := []string{} vlib/builtin/string.v:772:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 770 | // Split a string using the chars in the delimiter string as delimiters chars. 771 | // If the delimiter string is empty then `.rsplit()` is used. 772 | [direct_array_access] | ^ 773 | pub fn (s string) rsplit_any(delim string) []string { 774 | mut res := []string{} vlib/builtin/string.v:802:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 800 | // If `delim` is empty the string is split by it's characters. 801 | // Example: assert 'DEF'.split('') == ['D','E','F'] 802 | [inline] | ^ 803 | pub fn (s string) split(delim string) []string { 804 | return s.split_nth(delim, 0) vlib/builtin/string.v:811:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 809 | // If `delim` is empty the string is split by it's characters. 810 | // Example: assert 'DEF'.rsplit('') == ['F','E','D'] 811 | [inline] | ^ 812 | pub fn (s string) rsplit(delim string) []string { 813 | return s.rsplit_nth(delim, 0) vlib/builtin/string.v:854:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 852 | // The last returned element has the remainder of the string, even if 853 | // the remainder contains more `delim` substrings. 854 | [direct_array_access] | ^ 855 | pub fn (s string) split_nth(delim string, nth int) []string { 856 | mut res := []string{} vlib/builtin/string.v:928:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 926 | // The last returned element has the remainder of the string, even if 927 | // the remainder contains more `delim` substrings. 928 | [direct_array_access] | ^ 929 | pub fn (s string) rsplit_nth(delim string, nth int) []string { 930 | mut res := []string{} vlib/builtin/string.v:996:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 994 | // `\r` (MacOS), `\n` (POSIX), and `\r\n` (WinOS) line endings are all supported (including mixed line endings). 995 | // NOTE: algorithm is "greedy", consuming '\r\n' as a single line ending with higher priority than '\r' and '\n' as multiple endings 996 | [direct_array_access] | ^ 997 | pub fn (s string) split_into_lines() []string { 998 | mut res := []string{} vlib/builtin/string.v:1028:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1026 | // substr returns the string between index positions `start` and `end`. 1027 | // Example: assert 'ABCD'.substr(1,3) == 'BC' 1028 | [direct_array_access] | ^ 1029 | pub fn (s string) substr(start int, _end int) string { 1030 | end := if _end == max_int { s.len } else { _end } // max_int vlib/builtin/string.v:1052:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1050 | 1051 | // substr_unsafe works like substr(), but doesn't copy (allocate) the substring 1052 | [direct_array_access] | ^ 1053 | pub fn (s string) substr_unsafe(start int, _end int) string { 1054 | end := if _end == 2147483647 { s.len } else { _end } // max_int vlib/builtin/string.v:1067:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1065 | // version of `substr()` that is used in `a[start..end] or {` 1066 | // return an error when the index is out of range 1067 | [direct_array_access] | ^ 1068 | pub fn (s string) substr_with_check(start int, _end int) !string { 1069 | end := if _end == max_int { s.len } else { _end } // max_int vlib/builtin/string.v:1090:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1088 | // substr_ni returns the string between index positions `start` and `end` allowing negative indexes 1089 | // This function always return a valid string. 1090 | [direct_array_access] | ^ 1091 | pub fn (s string) substr_ni(_start int, _end int) string { 1092 | mut start := _start vlib/builtin/string.v:1133:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1131 | // index returns the position of the first character of the input string. 1132 | // It will return `-1` if the input string can't be found. 1133 | [direct_array_access] | ^ 1134 | fn (s string) index_(p string) int { 1135 | if p.len > s.len || p.len == 0 { vlib/builtin/string.v:1166:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1164 | 1165 | // index_kmp does KMP search. 1166 | [direct_array_access; manualfree] | ^ 1167 | fn (s string) index_kmp(p string) int { 1168 | if p.len > s.len { vlib/builtin/string.v:1213:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1211 | 1212 | // last_index returns the position of the last occurrence of the input string. 1213 | [direct_array_access] | ^ 1214 | fn (s string) last_index_(p string) int { 1215 | if p.len > s.len || p.len == 0 { vlib/builtin/string.v:1242:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1240 | 1241 | // index_after returns the position of the input string, starting search from `start` position. 1242 | [direct_array_access] | ^ 1243 | pub fn (s string) index_after(p string, start int) int { 1244 | if p.len > s.len { vlib/builtin/string.v:1272:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1270 | // index_u8 returns the index of byte `c` if found in the string. 1271 | // index_u8 returns -1 if the byte can not be found. 1272 | [direct_array_access] | ^ 1273 | pub fn (s string) index_u8(c u8) int { 1274 | for i, b in s { vlib/builtin/string.v:1284:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1282 | // last_index_byte returns the index of the last occurrence of byte `c` if found in the string. 1283 | // last_index_byte returns -1 if the byte is not found. 1284 | [direct_array_access] | ^ 1285 | pub fn (s string) last_index_u8(c u8) int { 1286 | for i := s.len - 1; i >= 0; i-- { vlib/builtin/string.v:1296:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1294 | // count returns the number of occurrences of `substr` in the string. 1295 | // count returns -1 if no `substr` could be found. 1296 | [direct_array_access] | ^ 1297 | pub fn (s string) count(substr string) int { 1298 | if s.len == 0 || substr.len == 0 { vlib/builtin/string.v:1395:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1393 | 1394 | // starts_with returns `true` if the string starts with `p`. 1395 | [direct_array_access] | ^ 1396 | pub fn (s string) starts_with(p string) bool { 1397 | if p.len > s.len { vlib/builtin/string.v:1409:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1407 | 1408 | // ends_with returns `true` if the string ends with `p`. 1409 | [direct_array_access] | ^ 1410 | pub fn (s string) ends_with(p string) bool { 1411 | if p.len > s.len { vlib/builtin/string.v:1424:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1422 | // to_lower returns the string in all lowercase characters. 1423 | // TODO only works with ASCII 1424 | [direct_array_access] | ^ 1425 | pub fn (s string) to_lower() string { 1426 | unsafe { vlib/builtin/string.v:1442:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1440 | // is_lower returns `true` if all characters in the string is lowercase. 1441 | // Example: assert 'hello developer'.is_lower() == true 1442 | [direct_array_access] | ^ 1443 | pub fn (s string) is_lower() bool { 1444 | for i in 0 .. s.len { vlib/builtin/string.v:1454:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1452 | // to_upper returns the string in all uppercase characters. 1453 | // Example: assert 'Hello V'.to_upper() == 'HELLO V' 1454 | [direct_array_access] | ^ 1455 | pub fn (s string) to_upper() string { 1456 | unsafe { vlib/builtin/string.v:1473:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1471 | // See also: [`byte.is_capital`](#byte.is_capital) 1472 | // Example: assert 'HELLO V'.is_upper() == true 1473 | [direct_array_access] | ^ 1474 | pub fn (s string) is_upper() bool { 1475 | for i in 0 .. s.len { vlib/builtin/string.v:1485:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1483 | // capitalize returns the string with the first character capitalized. 1484 | // Example: assert 'hello'.capitalize() == 'Hello' 1485 | [direct_array_access] | ^ 1486 | pub fn (s string) capitalize() string { 1487 | if s.len == 0 { vlib/builtin/string.v:1503:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1501 | // uncapitalize returns the string with the first character uncapitalized. 1502 | // Example: assert 'Hello, Bob!'.uncapitalize() == 'hello, Bob!' 1503 | [direct_array_access] | ^ 1504 | pub fn (s string) uncapitalize() string { 1505 | if s.len == 0 { vlib/builtin/string.v:1523:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1521 | // Example: assert 'Hello'.is_capital() == true 1522 | // Example: assert 'HelloWorld'.is_capital() == false 1523 | [direct_array_access] | ^ 1524 | pub fn (s string) is_capital() bool { 1525 | if s.len == 0 || !(s[0] >= `A` && s[0] <= `Z`) { vlib/builtin/string.v:1540:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1538 | // Example: assert 'Hello'.starts_with_capital() == true 1539 | // Example: assert 'Hello. World.'.starts_with_capital() == true 1540 | [direct_array_access] | ^ 1541 | pub fn (s string) starts_with_capital() bool { 1542 | if s.len == 0 || !(s[0] >= `A` && s[0] <= `Z`) { vlib/builtin/string.v:1590:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1588 | // trim_space strips any of ` `, `\n`, `\t`, `\v`, `\f`, `\r` from the start and end of the string. 1589 | // Example: assert ' Hello V '.trim_space() == 'Hello V' 1590 | [inline] | ^ 1591 | pub fn (s string) trim_space() string { 1592 | return s.trim(' \n\t\v\f\r') vlib/builtin/string.v:1607:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1605 | // trim_indexes gets the new start and end indices of a string when any of the characters given in `cutset` were stripped from the start and end of the string. Should be used as an input to `substr()`. If the string contains only the characters in `cutset`, both values returned are zero. 1606 | // Example: left, right := '-hi-'.trim_indexes('-') 1607 | [direct_array_access] | ^ 1608 | pub fn (s string) trim_indexes(cutset string) (int, int) { 1609 | mut pos_left := 0 vlib/builtin/string.v:1637:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1635 | // trim_left strips any of the characters given in `cutset` from the left of the string. 1636 | // Example: assert 'd Hello V developer'.trim_left(' d') == 'Hello V developer' 1637 | [direct_array_access] | ^ 1638 | pub fn (s string) trim_left(cutset string) string { 1639 | if s.len < 1 || cutset.len < 1 { vlib/builtin/string.v:1661:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1659 | // trim_right strips any of the characters given in `cutset` from the right of the string. 1660 | // Example: assert ' Hello V d'.trim_right(' d') == ' Hello V' 1661 | [direct_array_access] | ^ 1662 | pub fn (s string) trim_right(cutset string) string { 1663 | if s.len < 1 || cutset.len < 1 { vlib/builtin/string.v:1733:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1731 | 1732 | // sort_ignore_case sorts the string array using case insensitive comparing. 1733 | [inline] | ^ 1734 | pub fn (mut s []string) sort_ignore_case() { 1735 | s.sort_with_compare(compare_lower_strings) vlib/builtin/string.v:1739:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1737 | 1738 | // sort_by_len sorts the the string array by each string's `.len` length. 1739 | [inline] | ^ 1740 | pub fn (mut s []string) sort_by_len() { 1741 | s.sort_with_compare(compare_strings_by_len) vlib/builtin/string.v:1745:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1743 | 1744 | // str returns a copy of the string 1745 | [inline] | ^ 1746 | pub fn (s string) str() string { 1747 | return s.clone() vlib/builtin/string.v:1775:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1773 | // The following list is considered white space characters: ` `, `\t`, `\n`, `\v`, `\f`, `\r`, 0x85, 0xa0 1774 | // Example: assert u8(` `).is_space() == true 1775 | [inline] | ^ 1776 | pub fn (c u8) is_space() bool { 1777 | // 0x85 is NEXT LINE (NEL) vlib/builtin/string.v:1784:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1782 | // is_digit returns `true` if the byte is in range 0-9 and `false` otherwise. 1783 | // Example: assert u8(`9`).is_digit() == true 1784 | [inline] | ^ 1785 | pub fn (c u8) is_digit() bool { 1786 | return c >= `0` && c <= `9` vlib/builtin/string.v:1791:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1789 | // is_hex_digit returns `true` if the byte is either in range 0-9, a-f or A-F and `false` otherwise. 1790 | // Example: assert u8(`F`).is_hex_digit() == true 1791 | [inline] | ^ 1792 | pub fn (c u8) is_hex_digit() bool { 1793 | return (c >= `0` && c <= `9`) || (c >= `a` && c <= `f`) || (c >= `A` && c <= `F`) vlib/builtin/string.v:1798:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1796 | // is_oct_digit returns `true` if the byte is in range 0-7 and `false` otherwise. 1797 | // Example: assert u8(`7`).is_oct_digit() == true 1798 | [inline] | ^ 1799 | pub fn (c u8) is_oct_digit() bool { 1800 | return c >= `0` && c <= `7` vlib/builtin/string.v:1805:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1803 | // is_bin_digit returns `true` if the byte is a binary digit (0 or 1) and `false` otherwise. 1804 | // Example: assert u8(`0`).is_bin_digit() == true 1805 | [inline] | ^ 1806 | pub fn (c u8) is_bin_digit() bool { 1807 | return c == `0` || c == `1` vlib/builtin/string.v:1812:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1810 | // is_letter returns `true` if the byte is in range a-z or A-Z and `false` otherwise. 1811 | // Example: assert u8(`V`).is_letter() == true 1812 | [inline] | ^ 1813 | pub fn (c u8) is_letter() bool { 1814 | return (c >= `a` && c <= `z`) || (c >= `A` && c <= `Z`) vlib/builtin/string.v:1819:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1817 | // is_alnum returns `true` if the byte is in range a-z, A-Z, 0-9 and `false` otherwise. 1818 | // Example: assert u8(`V`).is_alnum() == true 1819 | [inline] | ^ 1820 | pub fn (c u8) is_alnum() bool { 1821 | return (c >= `a` && c <= `z`) || (c >= `A` && c <= `Z`) || (c >= `0` && c <= `9`) vlib/builtin/string.v:1825:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1823 | 1824 | // free allows for manually freeing the memory occupied by the string 1825 | [manualfree; unsafe] | ^ 1826 | pub fn (s &string) free() { 1827 | $if prealloc { vlib/builtin/string.v:1930:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1928 | // Example: assert 'abcd'.after('z') == 'abcd' 1929 | // TODO: deprecate either .all_after_last or .after 1930 | [inline] | ^ 1931 | pub fn (s string) after(sub string) string { 1932 | return s.all_after_last(sub) vlib/builtin/string.v:1990:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1988 | 1989 | // join joins a string array into a string using a `\n` newline delimiter. 1990 | [inline] | ^ 1991 | pub fn (s []string) join_lines() string { 1992 | return s.join('\n') vlib/builtin/string.v:1997:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1995 | // reverse returns a reversed string. 1996 | // Example: assert 'Hello V'.reverse() == 'V olleH' 1997 | [direct_array_access] | ^ 1998 | pub fn (s string) reverse() string { 1999 | if s.len == 0 || s.len == 1 { vlib/builtin/string.v:2050:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2048 | 2049 | // repeat returns a new string with `count` number of copies of the string it was called on. 2050 | [direct_array_access] | ^ 2051 | pub fn (s string) repeat(count int) string { 2052 | if count < 0 { vlib/builtin/string.v:2123:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2121 | // Everything before the first | is removed' 2122 | // ``` 2123 | [inline] | ^ 2124 | pub fn (s string) strip_margin() string { 2125 | return s.strip_margin_custom(`|`) vlib/builtin/string.v:2129:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2127 | 2128 | // strip_margin_custom does the same as `strip_margin` but will use `del` as delimiter instead of `|` 2129 | [direct_array_access] | ^ 2130 | pub fn (s string) strip_margin_custom(del u8) string { 2131 | mut sep := del vlib/builtin/string.v:2283:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2281 | // Example: assert 'ABCD'.match_glob('*B*') 2282 | // Example: assert !'ABCD'.match_glob('AB') 2283 | [direct_array_access] | ^ 2284 | pub fn (name string) match_glob(pattern string) bool { 2285 | // Initial port based on https://research.swtch.com/glob.go vlib/builtin/string.v:2377:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2375 | 2376 | // is_ascii returns true if all characters belong to the US-ASCII set ([` `..`~`]) 2377 | [inline] | ^ 2378 | pub fn (s string) is_ascii() bool { 2379 | return !s.bytes().any(it < u8(` `) || it > u8(`~`)) vlib/builtin/string_charptr_byteptr_helpers.v:6:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4 | 5 | // byteptr.vbytes() - makes a V []u8 structure from a C style memory buffer. Note: the data is reused, NOT copied! 6 | [unsafe] | ^ 7 | pub fn (data byteptr) vbytes(len int) []u8 { 8 | return unsafe { voidptr(data).vbytes(len) } vlib/builtin/string_charptr_byteptr_helpers.v:14:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 12 | // strings returned from this function will be normal V strings beside that (i.e. they would be 13 | // freed by V's -autofree mechanism, when they are no longer used). 14 | [unsafe] | ^ 15 | pub fn (bp byteptr) vstring() string { 16 | return string{ vlib/builtin/string_charptr_byteptr_helpers.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 22 | // vstring_with_len converts a C style string to a V string. 23 | // Note: the string data is reused, NOT copied. 24 | [unsafe] | ^ 25 | pub fn (bp byteptr) vstring_with_len(len int) string { 26 | return string{ vlib/builtin/string_charptr_byteptr_helpers.v:35:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 33 | // vstring converts C char* to V string. 34 | // Note: the string data is reused, NOT copied. 35 | [unsafe] | ^ 36 | pub fn (cp charptr) vstring() string { 37 | return string{ vlib/builtin/string_charptr_byteptr_helpers.v:46:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 44 | // vstring_with_len converts C char* to V string. 45 | // Note: the string data is reused, NOT copied. 46 | [unsafe] | ^ 47 | pub fn (cp charptr) vstring_with_len(len int) string { 48 | return string{ vlib/builtin/string_charptr_byteptr_helpers.v:62:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 60 | // that can be read by the V program, but that should not be 61 | // managed by it, for example `os.args` is implemented using it. 62 | [unsafe] | ^ 63 | pub fn (bp byteptr) vstring_literal() string { 64 | return string{ vlib/builtin/string_charptr_byteptr_helpers.v:73:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 71 | // vstring_with_len converts a C style string to a V string. 72 | // Note: the string data is reused, NOT copied. 73 | [unsafe] | ^ 74 | pub fn (bp byteptr) vstring_literal_with_len(len int) string { 75 | return string{ vlib/builtin/string_charptr_byteptr_helpers.v:85:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 83 | // See also vstring_literal defined on byteptr for more details. 84 | // Note: the string data is reused, NOT copied. 85 | [unsafe] | ^ 86 | pub fn (cp charptr) vstring_literal() string { 87 | return string{ vlib/builtin/string_charptr_byteptr_helpers.v:97:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 95 | // See also vstring_literal_with_len defined on byteptr. 96 | // Note: the string data is reused, NOT copied. 97 | [unsafe] | ^ 98 | pub fn (cp charptr) vstring_literal_with_len(len int) string { 99 | return string{ vlib/builtin/string_interpolation.v:82:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 80 | } 81 | 82 | [inline] | ^ 83 | fn fabs32(x f32) f32 { 84 | return if x < 0 { -x } else { x } vlib/builtin/string_interpolation.v:87:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 85 | } 86 | 87 | [inline] | ^ 88 | fn fabs64(x f64) f64 { 89 | return if x < 0 { -x } else { x } vlib/builtin/string_interpolation.v:92:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 90 | } 91 | 92 | [inline] | ^ 93 | fn abs64(x i64) u64 { 94 | return if x < 0 { u64(-x) } else { u64(x) } vlib/builtin/string_interpolation.v:151:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 149 | 150 | // convert from struct to formatted string 151 | [manualfree] | ^ 152 | fn (data &StrIntpData) process_str_intp_data(mut sb strings.Builder) { 153 | x := data.fmt vlib/builtin/string_interpolation.v:658:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 656 | 657 | // interpolation function 658 | [direct_array_access; manualfree] | ^ 659 | pub fn str_intp(data_len int, input_base &StrIntpData) string { 660 | mut res := strings.new_builder(256) vlib/builtin/string_interpolation.v:687:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 685 | ) 686 | 687 | [inline] | ^ 688 | pub fn str_intp_sq(in_str string) string { 689 | return 'str_intp(2, _MOV((StrIntpData[]){{_SLIT("\'"), ${si_s_code}, {.d_s = ${in_str}}},{_SLIT("\'"), 0, {.d_c = 0 }}}))' vlib/builtin/string_interpolation.v:692:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 690 | } 691 | 692 | [inline] | ^ 693 | pub fn str_intp_rune(in_str string) string { 694 | return 'str_intp(2, _MOV((StrIntpData[]){{_SLIT("\`"), ${si_s_code}, {.d_s = ${in_str}}},{_SLIT("\`"), 0, {.d_c = 0 }}}))' vlib/builtin/string_interpolation.v:697:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 695 | } 696 | 697 | [inline] | ^ 698 | pub fn str_intp_g32(in_str string) string { 699 | return 'str_intp(1, _MOV((StrIntpData[]){{_SLIT0, ${si_g32_code}, {.d_f32 = ${in_str} }}}))' vlib/builtin/string_interpolation.v:702:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 700 | } 701 | 702 | [inline] | ^ 703 | pub fn str_intp_g64(in_str string) string { 704 | return 'str_intp(1, _MOV((StrIntpData[]){{_SLIT0, ${si_g64_code}, {.d_f64 = ${in_str} }}}))' vlib/builtin/string_interpolation.v:708:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 706 | 707 | // replace %% with the in_str 708 | [manualfree] | ^ 709 | pub fn str_intp_sub(base_str string, in_str string) string { 710 | index := base_str.index('%%') or { vlib/builtin/utf8.c.v:47:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 45 | // See also builtin.wchar.to_string/1, for a version that eases working with 46 | // the platform dependent &wchar_t L"" strings. 47 | [manualfree; unsafe] | ^ 48 | pub fn string_from_wide(_wstr &u16) string { 49 | $if windows { vlib/builtin/utf8.c.v:69:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 67 | // See also builtin.wchar.to_string2/2, for a version that eases working 68 | // with the platform dependent &wchar_t L"" strings. 69 | [manualfree; unsafe] | ^ 70 | pub fn string_from_wide2(_wstr &u16, len int) string { 71 | $if windows { vlib/builtin/utf8.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 22 | } 23 | 24 | [manualfree; unsafe] | ^ 25 | pub fn utf32_to_str_no_malloc(code u32, buf &u8) string { 26 | unsafe { vlib/builtin/utf8.v:36:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 34 | } 35 | 36 | [manualfree; unsafe] | ^ 37 | pub fn utf32_decode_to_buffer(code u32, buf &u8) int { 38 | unsafe { vlib/strings/builder.c.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 22 | // NB: you *should NOT use* the string builder instance after calling this method. 23 | // Use only the return value after calling this method. 24 | [unsafe] | ^ 25 | pub fn (mut b Builder) reuse_as_plain_u8_array() []u8 { 26 | unsafe { b.flags.clear(.noslices) } vlib/strings/builder.c.v:31:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 29 | 30 | // write_ptr writes `len` bytes provided byteptr to the accumulated buffer 31 | [unsafe] | ^ 32 | pub fn (mut b Builder) write_ptr(ptr &u8, len int) { 33 | if len == 0 { vlib/strings/builder.c.v:40:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 38 | 39 | // write_rune appends a single rune to the accumulated buffer 40 | [manualfree] | ^ 41 | pub fn (mut b Builder) write_rune(r rune) { 42 | mut buffer := [5]u8{} vlib/strings/builder.c.v:80:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 78 | // without dynamic allocation. The higher order digits come first, i.e. 6123 will be written 79 | // with the digit `6` first, then `1`, then `2` and `3` last. 80 | [direct_array_access] | ^ 81 | pub fn (mut b Builder) write_decimal(n i64) { 82 | if n == 0 { vlib/strings/builder.c.v:115:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 113 | // drain_builder writes all of the `other` builder content, then re-initialises 114 | // `other`, so that the `other` strings builder is ready to receive new content. 115 | [manualfree] | ^ 116 | pub fn (mut b Builder) drain_builder(mut other Builder, other_new_cap int) { 117 | if other.len > 0 { vlib/strings/builder.c.v:126:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 124 | // byte_at returns a byte, located at a given index `i`. 125 | // Note: it can panic, if there are not enough bytes in the strings builder yet. 126 | [inline] | ^ 127 | pub fn (b &Builder) byte_at(n int) u8 { 128 | return unsafe { (&[]u8(b))[n] } vlib/strings/builder.c.v:132:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 130 | 131 | // write appends the string `s` to the buffer 132 | [inline] | ^ 133 | pub fn (mut b Builder) write_string(s string) { 134 | if s.len == 0 { vlib/strings/builder.c.v:149:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 147 | } 148 | 149 | [inline] | ^ 150 | fn (b &Builder) spart(start_pos int, n int) string { 151 | unsafe { vlib/strings/builder.c.v:184:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 182 | 183 | // writeln appends the string `s`, and then a newline character. 184 | [inline] | ^ 185 | pub fn (mut b Builder) writeln(s string) { 186 | // for c in s { vlib/strings/builder.c.v:250:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 248 | // free frees the memory block, used for the buffer. 249 | // Note: do not use the builder, after a call to free(). 250 | [unsafe] | ^ 251 | pub fn (mut b Builder) free() { 252 | if b.data != 0 { vlib/strings/strings.c.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | 3 | // strings.repeat - fill a string with `n` repetitions of the character `c` 4 | [direct_array_access] | ^ 5 | pub fn repeat(c u8, n int) string { 6 | if n <= 0 { vlib/strings/strings.c.v:20:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 18 | // Note: strings.repeat, that repeats a single byte, is between 2x 19 | // and 24x faster than strings.repeat_string called for a 1 char string. 20 | [direct_array_access] | ^ 21 | pub fn repeat_string(s string, n int) string { 22 | if n <= 0 || s.len == 0 { vlib/strconv/atof.c.v:127:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 125 | // parser tries to parse the given string into a number 126 | // NOTE: #TOFIX need one char after the last char of the number 127 | [direct_array_access] | ^ 128 | fn parser(s string) (ParserState, PrepNumber) { 129 | mut digx := 0 vlib/strconv/atofq.c.v:19:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 17 | 18 | // atof_quick return a f64 number from a string in a quick way 19 | [direct_array_access] | ^ 20 | pub fn atof_quick(s string) f64 { 21 | mut f := Float64u{} // result vlib/strconv/atoi.v:15:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 13 | ) 14 | 15 | [inline] | ^ 16 | pub fn byte_to_lower(c u8) u8 { 17 | return c | 32 vlib/strconv/atoi.v:38:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 36 | // the first returned value contains the parsed value, 37 | // the second returned value contains the error code (0 = OK, >1 = index of first non-parseable character + 1, -1 = wrong base, -2 = wrong bit size, -3 = overflow) 38 | [direct_array_access] | ^ 39 | pub fn common_parse_uint2(s string, _base int, _bit_size int) (u64, int) { 40 | if s.len < 1 { vlib/strconv/atoi.v:159:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 157 | // common_parse_int is called by parse int and allows the parsing 158 | // to stop on non or invalid digit characters and return with an error 159 | [direct_array_access] | ^ 160 | pub fn common_parse_int(_s string, base int, _bit_size int, error_on_non_digit bool, error_on_high_digit bool) !i64 { 161 | if _s.len < 1 { vlib/strconv/atoi.v:223:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 221 | 222 | // atoi is equivalent to parse_int(s, 10, 0), converted to type int. 223 | [direct_array_access] | ^ 224 | pub fn atoi(s string) !int { 225 | if s == '' { vlib/strconv/f32_str.c.v:53:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 51 | // max 46 char 52 | // -3.40282346638528859811704183484516925440e+38 53 | [direct_array_access] | ^ 54 | pub fn (d Dec32) get_string_32(neg bool, i_n_digit int, i_pad_digit int) string { 55 | n_digit := i_n_digit + 1 vlib/strconv/f64_str.c.v:23:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 21 | =============================================================================*/ 22 | 23 | [direct_array_access] | ^ 24 | fn (d Dec64) get_string_64(neg bool, i_n_digit int, i_pad_digit int) string { 25 | mut n_digit := i_n_digit + 1 vlib/strconv/format.v:89:26: notice: `[attr]` has been deprecated, use `@[attr]` instead 87 | sign_flag bool // flag for print sign as prefix in padding 88 | align Align_text = .right // alignment of the string 89 | allign Align_text [deprecated: 'use align instead'; deprecated_after: '2023-11-30'] = .right | ^ 90 | rm_tail_zero bool // remove the tail zeros from floats 91 | } vlib/strconv/format.v:94:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 92 | 93 | // format_str returns a `string` formatted according to the options set in `p`. 94 | [manualfree] | ^ 95 | pub fn format_str(s string, p BF_param) string { 96 | if p.len0 <= 0 { vlib/strconv/format_mem.c.v:44:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 42 | 43 | // format_dec_sb formats an u64 using a `strings.Builder`. 44 | [direct_array_access] | ^ 45 | pub fn format_dec_sb(d u64, p BF_param, mut res strings.Builder) { 46 | mut n_char := dec_digits(d) vlib/strconv/format_mem.c.v:139:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 137 | 138 | // f64_to_str_lnd1 formats a f64 to a `string` with `dec_digit` digits after the dot. 139 | [direct_array_access; manualfree] | ^ 140 | pub fn f64_to_str_lnd1(f f64, dec_digit int) string { 141 | unsafe { vlib/strconv/format_mem.c.v:316:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 314 | 315 | // format_fl is a `strings.Builder` version of format_fl. 316 | [direct_array_access; manualfree] | ^ 317 | pub fn format_fl(f f64, p BF_param) string { 318 | unsafe { vlib/strconv/format_mem.c.v:393:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 391 | 392 | // format_es returns a f64 as a `string` formatted according to the options set in `p`. 393 | [direct_array_access; manualfree] | ^ 394 | pub fn format_es(f f64, p BF_param) string { 395 | unsafe { vlib/strconv/format_mem.c.v:464:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 462 | 463 | // remove_tail_zeros strips traling zeros from `s` and return the resulting `string`. 464 | [direct_array_access] | ^ 465 | pub fn remove_tail_zeros(s string) string { 466 | unsafe { vlib/strconv/ftoa.c.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 22 | // 23 | // Example: assert strconv.ftoa_64(123.1234567891011121) == '1.2312345678910111e+02' 24 | [inline] | ^ 25 | pub fn ftoa_64(f f64) string { 26 | return f64_to_str(f, 17) vlib/strconv/ftoa.c.v:32:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 30 | // 31 | // Example: assert strconv.f64_to_str_l(123.1234567891011121) == '123.12345678910111' 32 | [inline] | ^ 33 | pub fn ftoa_long_64(f f64) string { 34 | return f64_to_str_l(f) vlib/strconv/ftoa.c.v:40:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 38 | // 39 | // Example: assert strconv.ftoa_32(34.1234567) == '3.4123455e+01' 40 | [inline] | ^ 41 | pub fn ftoa_32(f f32) string { 42 | return f32_to_str(f, 8) vlib/strconv/ftoa.c.v:48:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 46 | // 47 | // Example: assert strconv.ftoa_long_32(34.1234567) == '34.12346' 48 | [inline] | ^ 49 | pub fn ftoa_long_32(f f32) string { 50 | return f32_to_str_l(f) vlib/strconv/number_to_base.c.v:7:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 5 | // format_int returns the string representation of the number n in base `radix` 6 | // for digit values > 10, this function uses the small latin leters a-z. 7 | [direct_array_access; manualfree] | ^ 8 | pub fn format_int(n i64, radix int) string { 9 | unsafe { vlib/strconv/number_to_base.c.v:44:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 42 | // format_uint returns the string representation of the number n in base `radix` 43 | // for digit values > 10, this function uses the small latin leters a-z. 44 | [direct_array_access; manualfree] | ^ 45 | pub fn format_uint(n u64, radix int) string { 46 | unsafe { vlib/strconv/utilities.c.v:31:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 29 | // 30 | // Example: assert strconv.f32_to_str_l(34.1234567) == '34.12346' 31 | [manualfree] | ^ 32 | pub fn f32_to_str_l(f f32) string { 33 | s := f32_to_str(f, 6) vlib/strconv/utilities.c.v:43:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 41 | // 42 | // Example: assert strconv.f32_to_str_l_with_dot(34.) == '34.0' 43 | [manualfree] | ^ 44 | pub fn f32_to_str_l_with_dot(f f32) string { 45 | s := f32_to_str(f, 6) vlib/strconv/utilities.c.v:54:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 52 | // 53 | // Example: assert strconv.f64_to_str_l(123.1234567891011121) == '123.12345678910111' 54 | [manualfree] | ^ 55 | pub fn f64_to_str_l(f f64) string { 56 | s := f64_to_str(f, 18) vlib/strconv/utilities.c.v:66:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 64 | // 65 | // Example: assert strconv.f64_to_str_l_with_dot (34.) == '34.0' 66 | [manualfree] | ^ 67 | pub fn f64_to_str_l_with_dot(f f64) string { 68 | s := f64_to_str(f, 18) vlib/strconv/utilities.c.v:78:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 76 | // 77 | // Example: assert strconv.fxx_to_str_l_parse('34.22e+00') == '34.22' 78 | [direct_array_access; manualfree] | ^ 79 | pub fn fxx_to_str_l_parse(s string) string { 80 | // check for +inf -inf Nan vlib/strconv/utilities.c.v:212:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 210 | // 211 | // Example: assert strconv.fxx_to_str_l_parse_with_dot ('34.e+01') == '340.0' 212 | [direct_array_access; manualfree] | ^ 213 | pub fn fxx_to_str_l_parse_with_dot(s string) string { 214 | // check for +inf -inf Nan vlib/strconv/utilities.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6 | 7 | // General Utilities 8 | [if debug_strconv ?] | ^ 9 | fn assert1(t bool, msg string) { 10 | if !t { vlib/strconv/utilities.v:15:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 13 | } 14 | 15 | [inline] | ^ 16 | fn bool_to_int(b bool) int { 17 | if b { vlib/strconv/utilities.v:23:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 21 | } 22 | 23 | [inline] | ^ 24 | fn bool_to_u32(b bool) u32 { 25 | if b { vlib/strconv/utilities.v:31:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 29 | } 30 | 31 | [inline] | ^ 32 | fn bool_to_u64(b bool) u64 { 33 | if b { vlib/strconv/vprintf.c.v:30:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 28 | // In most cases, you are better off using V's string interpolation, 29 | // when your format string is known at compile time. 30 | [unsafe] | ^ 31 | pub fn v_printf(str string, pt ...voidptr) { 32 | print(unsafe { v_sprintf(str, ...pt) }) vlib/strconv/vprintf.c.v:45:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 43 | // assert strconv.v_sprintf('aaa %G', x) == 'aaa 3.141516' 44 | // ``` 45 | [direct_array_access; manualfree; unsafe] | ^ 46 | pub fn v_sprintf(str string, pt ...voidptr) string { 47 | mut res := strings.new_builder(pt.len * 16) vlib/strconv/vprintf.c.v:560:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 558 | } 559 | 560 | [inline] | ^ 561 | fn v_sprintf_panic(idx int, len int) { 562 | if idx >= len { vlib/strconv/vprintf.c.v:575:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 573 | 574 | // strings.Builder version of format_fl 575 | [direct_array_access; manualfree] | ^ 576 | pub fn format_fl_old(f f64, p BF_param) string { 577 | unsafe { vlib/strconv/vprintf.c.v:652:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 650 | } 651 | 652 | [manualfree] | ^ 653 | fn format_es_old(f f64, p BF_param) string { 654 | unsafe { vlib/strconv/vprintf.c.v:758:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 756 | 757 | // max int64 9223372036854775807 758 | [manualfree] | ^ 759 | pub fn format_dec_old(d u64, p BF_param) string { 760 | mut s := '' vlib/os/debugger_freebsd.c.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6 | 7 | // debugger_present returns a bool indicating if the process is being debugged 8 | [inline] | ^ 9 | pub fn debugger_present() bool { 10 | // check if the parent could trace its process, vlib/os/environment.c.v:21:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 19 | // `getenv_opt` returns the value of a given environment variable. 20 | // Returns `none` if the environment variable does not exist. 21 | [manualfree] | ^ 22 | pub fn getenv_opt(key string) ?string { 23 | unsafe { vlib/os/fd.c.v:74:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 72 | } 73 | 74 | [typedef] | ^ 75 | pub struct C.fd_set {} 76 | vlib/os/file.c.v:358:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 356 | // Note: write_ptr is unsafe and should be used carefully, since if you pass invalid 357 | // pointers to it, it will cause your programs to segfault. 358 | [unsafe] | ^ 359 | pub fn (mut f File) write_ptr(data voidptr, size int) int { 360 | return int(C.fwrite(data, 1, size, f.cfile)) vlib/os/file.c.v:365:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 363 | // write_full_buffer writes a whole buffer of data to the file, starting from the 364 | // address in `buffer`, no matter how many tries/partial writes it would take. 365 | [unsafe] | ^ 366 | pub fn (mut f File) write_full_buffer(buffer voidptr, buffer_len usize) ! { 367 | if buffer_len <= usize(0) { vlib/os/file.c.v:391:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 389 | // Note: write_ptr_at is unsafe and should be used carefully, since if you pass invalid 390 | // pointers to it, it will cause your programs to segfault. 391 | [unsafe] | ^ 392 | pub fn (mut f File) write_ptr_at(data voidptr, size int, pos u64) int { 393 | $if x64 { vlib/os/filepath.v:60:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 58 | // - redundant path separators 59 | // - the last path separator 60 | [direct_array_access] | ^ 61 | pub fn norm_path(path string) string { 62 | if path.len == 0 { vlib/os/os.c.v:47:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 45 | 46 | // read_bytes returns all bytes read from file in `path`. 47 | [manualfree] | ^ 48 | pub fn read_bytes(path string) ![]u8 { 49 | mut fp := vfopen(path, 'rb')! vlib/os/os.c.v:92:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 90 | // For these, we can not allocate all memory in advance (since we do not know the final size), and so we have no choice 91 | // but to read the file in `buf_size` chunks. 92 | [manualfree] | ^ 93 | fn slurp_file_in_builder(fp &C.FILE) !strings.Builder { 94 | buf := [os.buf_size]u8{} vlib/os/os.c.v:110:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 108 | 109 | // read_file reads the file in `path` and returns the contents. 110 | [manualfree] | ^ 111 | pub fn read_file(path string) !string { 112 | mode := 'rb' vlib/os/os.c.v:480:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 478 | // Warning: `is_writable()` is known to cause a TOCTOU vulnerability when used incorrectly 479 | // (for more information: https://github.com/vlang/v/blob/master/vlib/os/README.md) 480 | [manualfree] | ^ 481 | pub fn is_writable(path string) bool { 482 | $if windows { vlib/os/os.c.v:497:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 495 | // Warning: `is_readable()` is known to cause a TOCTOU vulnerability when used incorrectly 496 | // (for more information: https://github.com/vlang/v/blob/master/vlib/os/README.md) 497 | [manualfree] | ^ 498 | pub fn is_readable(path string) bool { 499 | $if windows { vlib/os/os.c.v:672:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 670 | // executable returns the path name of the executable that started the current 671 | // process. 672 | [manualfree] | ^ 673 | pub fn executable() string { 674 | mut result := [max_path_buffer_size]u8{} vlib/os/os.c.v:850:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 848 | 849 | // getwd returns the absolute path of the current directory. 850 | [manualfree] | ^ 851 | pub fn getwd() string { 852 | unsafe { vlib/os/os.c.v:875:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 873 | // and https://insanecoding.blogspot.com/2007/11/implementing-realpath-in-c.html 874 | // Note: this particular rabbit hole is *deep* ... 875 | [manualfree] | ^ 876 | pub fn real_path(fpath string) string { 877 | mut fullpath := [max_path_buffer_size]u8{} vlib/os/os.c.v:934:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 932 | } 933 | 934 | [direct_array_access; manualfree; unsafe] | ^ 935 | fn normalize_drive_letter(path string) { 936 | $if !windows { vlib/os/os.v:38:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 36 | } 37 | 38 | [unsafe] | ^ 39 | pub fn (mut result Result) free() { 40 | unsafe { result.output.free() } vlib/os/os.v:135:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 133 | 134 | // read_lines reads the file in `path` into an array of lines. 135 | [manualfree] | ^ 136 | pub fn read_lines(path string) ![]string { 137 | buf := read_file(path)! vlib/os/os.v:222:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 220 | // is_dir_empty will return a `bool` whether or not `path` is empty. 221 | // Note that it will return `true` if `path` does not exist. 222 | [manualfree] | ^ 223 | pub fn is_dir_empty(path string) bool { 224 | items := ls(path) or { return true } vlib/os/os.v:541:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 539 | 540 | // join_path returns a path as string from input string parameter(s). 541 | [manualfree] | ^ 542 | pub fn join_path(base string, dirs ...string) string { 543 | // TODO: fix freeing of `dirs` when the passed arguments are variadic, vlib/os/os.v:568:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 566 | // join_path_single appends the `elem` after `base`, using a platform specific 567 | // path_separator. 568 | [manualfree] | ^ 569 | pub fn join_path_single(base string, elem string) string { 570 | // TODO: deprecate this and make it `return os.join_path(base, elem)`, vlib/os/os.v:691:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 689 | } 690 | 691 | [params] | ^ 692 | pub struct MkdirParams { 693 | mode u32 = 0o777 // note that the actual mode is affected by the process's umask vlib/os/os.v:832:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 830 | // It gives a convenient way to access program resources like images, fonts, sounds and so on, 831 | // *no matter* how the program was started, and what is the current working directory. 832 | [manualfree] | ^ 833 | pub fn resource_abs_path(path string) string { 834 | exe := executable() vlib/os/os_nix.c.v:308:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 306 | 307 | // execute starts the specified command, waits for it to complete, and returns its output. 308 | [manualfree] | ^ 309 | pub fn execute(cmd string) Result { 310 | // if cmd.contains(';') || cmd.contains('&&') || cmd.contains('||') || cmd.contains('\n') { vlib/os/os_nix.c.v:352:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 350 | // It's marked as `unsafe` to help emphasize the problems that may arise by allowing, for example, 351 | // user provided escape sequences. 352 | [unsafe] | ^ 353 | pub fn raw_execute(cmd string) Result { 354 | return execute(cmd) vlib/os/os_nix.c.v:357:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 355 | } 356 | 357 | [manualfree] | ^ 358 | pub fn (mut c Command) start() ! { 359 | pcmd := c.path + ' 2>&1' vlib/os/os_nix.c.v:369:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 367 | } 368 | 369 | [manualfree] | ^ 370 | pub fn (mut c Command) read_line() string { 371 | buf := [4096]u8{} vlib/os/os_nix.c.v:436:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 434 | // ensure_folder_is_writable checks that `folder` exists, and is writable to the process 435 | // by creating an empty file in it, then deleting it. 436 | [manualfree] | ^ 437 | pub fn ensure_folder_is_writable(folder string) ! { 438 | if !exists(folder) { vlib/os/os_nix.c.v:458:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 456 | } 457 | 458 | [inline] | ^ 459 | pub fn getpid() int { 460 | return C.getpid() vlib/os/os_nix.c.v:463:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 461 | } 462 | 463 | [inline] | ^ 464 | pub fn getppid() int { 465 | return C.getppid() vlib/os/os_nix.c.v:468:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 466 | } 467 | 468 | [inline] | ^ 469 | pub fn getuid() int { 470 | return C.getuid() vlib/os/os_nix.c.v:473:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 471 | } 472 | 473 | [inline] | ^ 474 | pub fn geteuid() int { 475 | return C.geteuid() vlib/os/os_nix.c.v:478:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 476 | } 477 | 478 | [inline] | ^ 479 | pub fn getgid() int { 480 | return C.getgid() vlib/os/os_nix.c.v:483:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 481 | } 482 | 483 | [inline] | ^ 484 | pub fn getegid() int { 485 | return C.getegid() vlib/os/process.c.v:83:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 81 | } 82 | 83 | [unsafe] | ^ 84 | pub fn (mut p Process) free() { 85 | p.close() vlib/os/process.v:18:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 16 | } 17 | 18 | [heap] | ^ 19 | pub struct Process { 20 | pub mut: vlib/os/signal_default.c.v:1:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1 | [has_globals] | ^ 2 | module os 3 | vlib/os/signal_default.c.v:19:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 17 | } 18 | 19 | [typedef] | ^ 20 | struct C.sigset_t {} 21 | vlib/term/term.v:186:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 184 | } 185 | 186 | [manualfree] | ^ 187 | fn supports_escape_sequences(fd int) bool { 188 | vcolors_override := os.getenv('VCOLORS') vlib/term/utf8.c.v:3:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1 | module term 2 | 3 | [inline] | ^ 4 | fn getchar() int { 5 | return C.getchar() vlib/v/help/help.v:7:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 5 | const help_dir = os.join_path(@VEXEROOT, 'vlib', 'v', 'help') 6 | 7 | [params] | ^ 8 | pub struct ExitOptions { 9 | exit_code int vlib/v/help/help.v:13:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 11 | 12 | // print_and_exit prints the help topic and exits. 13 | [noreturn] | ^ 14 | pub fn print_and_exit(topic string, opts ExitOptions) { 15 | if topic == 'topics' { vlib/v/pref/pref.v:97:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 95 | pub const supported_test_runners = ['normal', 'simple', 'tap', 'dump', 'teamcity'] 96 | 97 | [heap; minify] | ^ 98 | pub struct Preferences { 99 | pub mut: vlib/v/pref/pref.v:263:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 261 | } 262 | 263 | [if linux] | ^ 264 | fn detect_musl(mut res Preferences) { 265 | res.is_glibc = true vlib/v/pref/pref.v:279:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 277 | } 278 | 279 | [noreturn] | ^ 280 | fn run_code_in_tmp_vfile_and_exit(args []string, mut res Preferences, option_name string, extension string, content string) { 281 | tmp_file_path := rand.ulid() vlib/v/pref/pref.v:1046:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1044 | } 1045 | 1046 | [noreturn] | ^ 1047 | pub fn eprintln_exit(s string) { 1048 | eprintln(s) vlib/v/pref/pref.v:1122:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1120 | } 1121 | 1122 | [inline] | ^ 1123 | fn is_source_file(path string) bool { 1124 | return path.ends_with('.v') || os.exists(path) vlib/v/util/errors.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | [has_globals] | ^ 5 | module util 6 | vlib/v/util/errors.v:129:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 127 | } 128 | 129 | [heap] | ^ 130 | struct LinesCache { 131 | mut: vlib/v/util/errors.v:200:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 198 | } 199 | 200 | [noreturn] | ^ 201 | pub fn verror(kind string, s string) { 202 | final_kind := bold(color(kind, kind)) vlib/v/util/module.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6 | import v.pref 7 | 8 | [if trace_util_qualify ?] | ^ 9 | fn trace_qualify(callfn string, mod string, file_path string, kind_res string, result string, detail string) { 10 | eprintln('> ${callfn:15}: ${mod:-18} | file_path: ${file_path:-71} | => ${kind_res:14}: ${result:-18} ; ${detail}') vlib/v/util/quote.v:17:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 15 | const double_escape = '\\\\' 16 | 17 | [direct_array_access] | ^ 18 | pub fn smart_quote(str string, raw bool) string { 19 | len := str.len vlib/v/util/scanning.v:3:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1 | module util 2 | 3 | [inline] | ^ 4 | pub fn is_name_char(c u8) bool { 5 | return (c >= `a` && c <= `z`) || (c >= `A` && c <= `Z`) || c == `_` vlib/v/util/scanning.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6 | } 7 | 8 | [inline] | ^ 9 | pub fn is_func_char(c u8) bool { 10 | return (c >= `a` && c <= `z`) || (c >= `A` && c <= `Z`) || c == `_` || (c >= `0` && c <= `9`) vlib/v/util/scanning.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 22 | // HTTPRequest bad 23 | // HttpRequest good 24 | [direct_array_access] | ^ 25 | pub fn good_type_name(s string) bool { 26 | if s.len < 4 { vlib/v/util/scanning.v:38:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 36 | 37 | // is_generic_type_name returns true if the current token is a generic type name. 38 | [direct_array_access; inline] | ^ 39 | pub fn is_generic_type_name(name string) bool { 40 | return name.len == 1 && name[0] != `C` && (name[0] >= `A` && name[0] <= `Z`) vlib/v/util/surrounder.v:32:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 30 | // ``` 31 | 32 | [noinit] | ^ 33 | pub struct Surrounder { 34 | mut: vlib/v/util/surrounder.v:59:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 57 | 58 | // before returns all the `before` parts that were accumulated so far 59 | [manualfree] | ^ 60 | pub fn (s &Surrounder) before() string { 61 | len := s.befores.len vlib/v/util/surrounder.v:81:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 79 | // after returns all the `after` parts that were accumulated so far, 80 | // in reverse order of their addition. 81 | [manualfree] | ^ 82 | pub fn (s &Surrounder) after() string { 83 | len := s.afters.len vlib/v/util/surrounder.v:132:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 130 | // free frees the private resources associated with the surrounder instance 131 | // Called automatically by `-autofree`, or in `[manualfree]` tagged functions. 132 | [unsafe] | ^ 133 | pub fn (mut s Surrounder) free() { 134 | unsafe { vlib/v/util/timers.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | [has_globals] | ^ 5 | module util 6 | vlib/v/util/timers.v:11:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 9 | __global g_timers = new_timers(should_print: false, label: 'g_timers') 10 | 11 | [heap] | ^ 12 | pub struct Timers { 13 | label string vlib/v/util/timers.v:21:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 19 | } 20 | 21 | [params] | ^ 22 | pub struct TimerParams { 23 | should_print bool vlib/v/util/util.v:130:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 128 | // `cmd/tools/.disable_autorecompilation` file, OR by changing the timestamps of all executables 129 | // in cmd/tools to be < 1024 seconds (in unix time). 130 | [noreturn] | ^ 131 | pub fn launch_tool(is_verbose bool, tool_name string, args []string) { 132 | vexe := pref.vexe_path() vlib/v/util/util.v:296:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 294 | } 295 | 296 | [heap] | ^ 297 | struct SourceCache { 298 | mut: vlib/v/util/util.v:302:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 300 | } 301 | 302 | [unsafe] | ^ 303 | pub fn cached_read_source_file(path string) !string { 304 | mut static cache := &SourceCache(unsafe { nil }) vlib/v/builder/builder.v:383:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 381 | } 382 | 383 | [inline] | ^ 384 | pub fn module_path(mod string) string { 385 | // submodule support vlib/v/builder/builder.v:650:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 648 | } 649 | 650 | [noreturn] | ^ 651 | pub fn verror(s string) { 652 | util.verror('builder error', s) vlib/v/builder/compile.v:41:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 39 | 40 | // Temporary, will be done by -autofree 41 | [unsafe] | ^ 42 | fn (mut b Builder) myfree() { 43 | // for file in b.parsed_files { vlib/v/builder/compile.v:175:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 173 | } 174 | 175 | [noreturn] | ^ 176 | fn serror(reason string, e IError) { 177 | eprintln('could not ${reason} handler') vlib/math/bits/bits.v:155:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 153 | // 154 | // This function's execution time does not depend on the inputs. 155 | [inline] | ^ 156 | pub fn rotate_left_8(x u8, k int) u8 { 157 | s := u8(k) & (bits.n8 - u8(1)) vlib/math/bits/bits.v:165:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 163 | // 164 | // This function's execution time does not depend on the inputs. 165 | [inline] | ^ 166 | pub fn rotate_left_16(x u16, k int) u16 { 167 | s := u16(k) & (bits.n16 - u16(1)) vlib/math/bits/bits.v:175:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 173 | // 174 | // This function's execution time does not depend on the inputs. 175 | [inline] | ^ 176 | pub fn rotate_left_32(x u32, k int) u32 { 177 | s := u32(k) & (bits.n32 - u32(1)) vlib/math/bits/bits.v:185:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 183 | // 184 | // This function's execution time does not depend on the inputs. 185 | [inline] | ^ 186 | pub fn rotate_left_64(x u64, k int) u64 { 187 | s := u64(k) & (bits.n64 - u64(1)) vlib/math/bits/bits.v:193:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 191 | // --- Reverse --- 192 | // reverse_8 returns the value of x with its bits in reversed order. 193 | [inline] | ^ 194 | pub fn reverse_8(x u8) u8 { 195 | return rev_8_tab[x] vlib/math/bits/bits.v:199:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 197 | 198 | // reverse_16 returns the value of x with its bits in reversed order. 199 | [inline] | ^ 200 | pub fn reverse_16(x u16) u16 { 201 | return u16(rev_8_tab[x >> 8]) | (u16(rev_8_tab[x & u16(0xff)]) << 8) vlib/math/bits/bits.v:205:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 203 | 204 | // reverse_32 returns the value of x with its bits in reversed order. 205 | [inline] | ^ 206 | pub fn reverse_32(x u32) u32 { 207 | mut y := ((x >> u32(1) & (bits.m0 & bits.max_u32)) | ((x & (bits.m0 & bits.max_u32)) << 1)) vlib/math/bits/bits.v:214:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 212 | 213 | // reverse_64 returns the value of x with its bits in reversed order. 214 | [inline] | ^ 215 | pub fn reverse_64(x u64) u64 { 216 | mut y := ((x >> u64(1) & (bits.m0 & bits.max_u64)) | ((x & (bits.m0 & bits.max_u64)) << 1)) vlib/math/bits/bits.v:226:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 224 | // 225 | // This function's execution time does not depend on the inputs. 226 | [inline] | ^ 227 | pub fn reverse_bytes_16(x u16) u16 { 228 | return (x >> 8) | (x << 8) vlib/math/bits/bits.v:234:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 232 | // 233 | // This function's execution time does not depend on the inputs. 234 | [inline] | ^ 235 | pub fn reverse_bytes_32(x u32) u32 { 236 | y := ((x >> u32(8) & (bits.m3 & bits.max_u32)) | ((x & (bits.m3 & bits.max_u32)) << u32(8))) vlib/math/bits/bits.v:243:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 241 | // 242 | // This function's execution time does not depend on the inputs. 243 | [inline] | ^ 244 | pub fn reverse_bytes_64(x u64) u64 { 245 | mut y := ((x >> u64(8) & (bits.m3 & bits.max_u64)) | ((x & (bits.m3 & bits.max_u64)) << u64(8))) vlib/math/bits/unsafe_bits.v:9:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 7 | // with the sign bit of f and the result in the same bit position. 8 | // f32_bits(f32_from_bits(x)) == x. 9 | [inline] | ^ 10 | pub fn f32_bits(f f32) u32 { 11 | p := *unsafe { &u32(&f) } vlib/math/bits/unsafe_bits.v:19:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 17 | // and the result in the same bit position. 18 | // f32_from_bits(f32_bits(x)) == x. 19 | [inline] | ^ 20 | pub fn f32_from_bits(b u32) f32 { 21 | p := *unsafe { &f32(&b) } vlib/math/bits/unsafe_bits.v:28:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 26 | // with the sign bit of f and the result in the same bit position, 27 | // and f64_bits(f64_from_bits(x)) == x. 28 | [inline] | ^ 29 | pub fn f64_bits(f f64) u64 { 30 | p := *unsafe { &u64(&f) } vlib/math/bits/unsafe_bits.v:38:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 36 | // and the result in the same bit position. 37 | // f64_from_bits(f64_bits(x)) == x. 38 | [inline] | ^ 39 | pub fn f64_from_bits(b u64) f64 { 40 | p := *unsafe { &f64(&b) } vlib/strings/textscanner/textscanner.v:23:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 21 | 22 | // free frees all allocated resources. 23 | [unsafe] | ^ 24 | pub fn (mut ss TextScanner) free() { 25 | unsafe { vlib/strings/textscanner/textscanner.v:31:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 29 | 30 | // remaining returns how many characters remain from current position. 31 | [inline] | ^ 32 | pub fn (ss &TextScanner) remaining() int { 33 | return ss.ilen - ss.pos vlib/strings/textscanner/textscanner.v:39:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 37 | // next returns `-1` if it can't reach the next character. 38 | // next advances the scanner position. 39 | [direct_array_access; inline] | ^ 40 | pub fn (mut ss TextScanner) next() int { 41 | if ss.pos < ss.ilen { vlib/strings/textscanner/textscanner.v:51:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 49 | // skip skips one character ahead; `skip()` is slightly faster than `.next()`. 50 | // `skip()` does not return a result. 51 | [inline] | ^ 52 | pub fn (mut ss TextScanner) skip() { 53 | if ss.pos + 1 < ss.ilen { vlib/strings/textscanner/textscanner.v:59:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 57 | 58 | // skip_n skips ahead `n` characters, stopping at the end of the input. 59 | [inline] | ^ 60 | pub fn (mut ss TextScanner) skip_n(n int) { 61 | ss.pos += n vlib/strings/textscanner/textscanner.v:70:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 68 | // peek returns `-1` if it can't peek the next character. 69 | // unlike `next()`, `peek()` does not change the state of the scanner. 70 | [direct_array_access; inline] | ^ 71 | pub fn (ss &TextScanner) peek() int { 72 | if ss.pos < ss.ilen { vlib/strings/textscanner/textscanner.v:82:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 80 | // ts.peek_n(0) == ts.current() . 81 | // ts.peek_n(1) == ts.peek() . 82 | [direct_array_access; inline] | ^ 83 | pub fn (ss &TextScanner) peek_n(n int) int { 84 | if ss.pos + n < ss.ilen { vlib/strings/textscanner/textscanner.v:91:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 89 | 90 | // back goes back one character from the current scanner position. 91 | [inline] | ^ 92 | pub fn (mut ss TextScanner) back() { 93 | if ss.pos > 0 { vlib/strings/textscanner/textscanner.v:112:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 110 | // peek_back returns `-1` if it can't peek the previous character. 111 | // unlike `back()`, `peek_back()` does not change the state of the scanner. 112 | [direct_array_access; inline] | ^ 113 | pub fn (ss &TextScanner) peek_back() int { 114 | return ss.peek_back_n(1) vlib/strings/textscanner/textscanner.v:121:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 119 | // ts.peek_back_n(0) == ts.current() 120 | // ts.peek_back_n(1) == ts.peek_back() 121 | [direct_array_access; inline] | ^ 122 | pub fn (ss &TextScanner) peek_back_n(n int) int { 123 | offset := n + 1 vlib/strings/textscanner/textscanner.v:133:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 131 | // current returns `-1` at the start of the input text. 132 | // Note: after `c := ts.next()`, `ts.current()` will also return `c`. 133 | [direct_array_access; inline] | ^ 134 | pub fn (mut ss TextScanner) current() int { 135 | if ss.pos > 0 { vlib/term/termios/termios_freebsd.c.v:41:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 39 | // flag provides a termios flag of the correct size 40 | // for the underlying C.termios structure 41 | [inline] | ^ 42 | pub fn flag(value int) TcFlag { 43 | return int(value) vlib/term/termios/termios_freebsd.c.v:48:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 46 | // invert is a platform dependant way to bitwise NOT (~) TcFlag 47 | // as its length varies across platforms 48 | [inline] | ^ 49 | pub fn invert(value TcFlag) TcFlag { 50 | return ~int(value) vlib/term/termios/termios_freebsd.c.v:65:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 63 | 64 | // tcgetattr is an unsafe wrapper around C.termios and keeps its semantic 65 | [inline] | ^ 66 | pub fn tcgetattr(fd int, mut termios_p Termios) int { 67 | unsafe { vlib/term/termios/termios_freebsd.c.v:73:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 71 | 72 | // tcsetattr is an unsafe wrapper around C.termios and keeps its semantic 73 | [inline] | ^ 74 | pub fn tcsetattr(fd int, optional_actions int, mut termios_p Termios) int { 75 | unsafe { vlib/term/termios/termios_freebsd.c.v:81:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 79 | 80 | // ioctl is an unsafe wrapper around C.ioctl and keeps its semantic 81 | [inline] | ^ 82 | pub fn ioctl(fd int, request u64, arg voidptr) int { 83 | unsafe { vlib/v/vcache/vcache.v:176:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 174 | } 175 | 176 | [if trace_usecache ?] | ^ 177 | pub fn dlog(fname string, s string) { 178 | xlog(fname, s) vlib/v/vcache/vcache.v:181:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 179 | } 180 | 181 | [if trace_usecache_n ?] | ^ 182 | fn nlog(fname string, s string) { 183 | xlog(fname, s) vlib/v/vcache/vcache.v:195:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 193 | } 194 | 195 | [unsafe] | ^ 196 | fn mypid() int { 197 | mut static pid := 0 vlib/rand/mini_math.v:17:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 15 | const sqrt2 = 1.41421356237309504880168872420969807856967187537694807317667974 16 | 17 | [inline] | ^ 18 | fn msqrt(a f64) f64 { 19 | if a == 0 { vlib/rand/mini_math.v:122:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 120 | } 121 | 122 | [inline] | ^ 123 | fn f64_from_bits(b u64) f64 { 124 | return *unsafe { &f64(&b) } vlib/rand/mini_math.v:127:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 125 | } 126 | 127 | [inline] | ^ 128 | fn f64_bits(f f64) u64 { 129 | return *unsafe { &u64(&f) } vlib/rand/rand.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | [has_globals] | ^ 5 | module rand 6 | vlib/rand/rand.v:28:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 26 | 27 | // bytes returns a buffer of `bytes_needed` random bytes 28 | [inline] | ^ 29 | pub fn (mut rng PRNG) bytes(bytes_needed int) ![]u8 { 30 | if bytes_needed < 0 { vlib/rand/rand.v:46:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 44 | 45 | // u32n returns a uniformly distributed pseudorandom 32-bit signed positive `u32` in range `[0, max)`. 46 | [inline] | ^ 47 | pub fn (mut rng PRNG) u32n(max u32) !u32 { 48 | if max == 0 { vlib/rand/rand.v:82:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 80 | 81 | // u64n returns a uniformly distributed pseudorandom 64-bit signed positive `u64` in range `[0, max)`. 82 | [inline] | ^ 83 | pub fn (mut rng PRNG) u64n(max u64) !u64 { 84 | if max == 0 { vlib/rand/rand.v:112:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 110 | 111 | // u32_in_range returns a uniformly distributed pseudorandom 32-bit unsigned `u32` in range `[min, max)`. 112 | [inline] | ^ 113 | pub fn (mut rng PRNG) u32_in_range(min u32, max u32) !u32 { 114 | if max <= min { vlib/rand/rand.v:121:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 119 | 120 | // u64_in_range returns a uniformly distributed pseudorandom 64-bit unsigned `u64` in range `[min, max)`. 121 | [inline] | ^ 122 | pub fn (mut rng PRNG) u64_in_range(min u64, max u64) !u64 { 123 | if max <= min { vlib/rand/rand.v:130:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 128 | 129 | // i8 returns a (possibly negative) pseudorandom 8-bit `i8`. 130 | [inline] | ^ 131 | pub fn (mut rng PRNG) i8() i8 { 132 | return i8(rng.u8()) vlib/rand/rand.v:136:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 134 | 135 | // i16 returns a (possibly negative) pseudorandom 16-bit `i16`. 136 | [inline] | ^ 137 | pub fn (mut rng PRNG) i16() i16 { 138 | return i16(rng.u16()) vlib/rand/rand.v:142:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 140 | 141 | // int returns a (possibly negative) pseudorandom 32-bit `int`. 142 | [inline] | ^ 143 | pub fn (mut rng PRNG) int() int { 144 | return int(rng.u32()) vlib/rand/rand.v:148:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 146 | 147 | // i64 returns a (possibly negative) pseudorandom 64-bit `i64`. 148 | [inline] | ^ 149 | pub fn (mut rng PRNG) i64() i64 { 150 | return i64(rng.u64()) vlib/rand/rand.v:154:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 152 | 153 | // int31 returns a positive pseudorandom 31-bit `int`. 154 | [inline] | ^ 155 | pub fn (mut rng PRNG) int31() int { 156 | return int(rng.u32() & constants.u31_mask) // Set the 32nd bit to 0. vlib/rand/rand.v:160:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 158 | 159 | // int63 returns a positive pseudorandom 63-bit `i64`. 160 | [inline] | ^ 161 | pub fn (mut rng PRNG) int63() i64 { 162 | return i64(rng.u64() & constants.u63_mask) // Set the 64th bit to 0. vlib/rand/rand.v:166:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 164 | 165 | // intn returns a pseudorandom `int` in range `[0, max)`. 166 | [inline] | ^ 167 | pub fn (mut rng PRNG) intn(max int) !int { 168 | if max <= 0 { vlib/rand/rand.v:175:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 173 | 174 | // i64n returns a pseudorandom int that lies in `[0, max)`. 175 | [inline] | ^ 176 | pub fn (mut rng PRNG) i64n(max i64) !i64 { 177 | if max <= 0 { vlib/rand/rand.v:184:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 182 | 183 | // int_in_range returns a pseudorandom `int` in range `[min, max)`. 184 | [inline] | ^ 185 | pub fn (mut rng PRNG) int_in_range(min int, max int) !int { 186 | if max <= min { vlib/rand/rand.v:194:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 192 | 193 | // i64_in_range returns a pseudorandom `i64` in range `[min, max)`. 194 | [inline] | ^ 195 | pub fn (mut rng PRNG) i64_in_range(min i64, max i64) !i64 { 196 | if max <= min { vlib/rand/rand.v:204:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 202 | // f32 returns a pseudorandom `f32` value in range `[0, 1)` 203 | // using rng.u32() multiplied by an f64 constant. 204 | [inline] | ^ 205 | pub fn (mut rng PRNG) f32() f32 { 206 | return f32((rng.u32() >> 9) * constants.reciprocal_2_23rd) vlib/rand/rand.v:213:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 211 | // and the exponent varies as well.) 212 | // See https://allendowney.com/research/rand/ for background on the method. 213 | [inline] | ^ 214 | pub fn (mut rng PRNG) f32cp() f32 { 215 | mut x := rng.u32() vlib/rand/rand.v:245:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 243 | // f64 returns a pseudorandom `f64` value in range `[0, 1)` 244 | // using rng.u64() multiplied by a constant. 245 | [inline] | ^ 246 | pub fn (mut rng PRNG) f64() f64 { 247 | return f64((rng.u64() >> 12) * constants.reciprocal_2_52nd) vlib/rand/rand.v:254:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 252 | // and the exponent varies as well.) 253 | // See https://allendowney.com/research/rand/ for background on the method. 254 | [inline] | ^ 255 | pub fn (mut rng PRNG) f64cp() f64 { 256 | mut x := rng.u64() vlib/rand/rand.v:284:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 282 | 283 | // f32n returns a pseudorandom `f32` value in range `[0, max]`. 284 | [inline] | ^ 285 | pub fn (mut rng PRNG) f32n(max f32) !f32 { 286 | if max < 0 { vlib/rand/rand.v:293:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 291 | 292 | // f64n returns a pseudorandom `f64` value in range `[0, max]`. 293 | [inline] | ^ 294 | pub fn (mut rng PRNG) f64n(max f64) !f64 { 295 | if max < 0 { vlib/rand/rand.v:302:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 300 | 301 | // f32_in_range returns a pseudorandom `f32` in range `[min, max]`. 302 | [inline] | ^ 303 | pub fn (mut rng PRNG) f32_in_range(min f32, max f32) !f32 { 304 | if max < min { vlib/rand/rand.v:311:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 309 | 310 | // i64_in_range returns a pseudorandom `i64` in range `[min, max]`. 311 | [inline] | ^ 312 | pub fn (mut rng PRNG) f64_in_range(min f64, max f64) !f64 { 313 | if max < min { vlib/rand/rand.v:423:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 421 | // optional and the entire array is shuffled by default. Leave the end as 0 to 422 | // shuffle all elements until the end. 423 | [direct_array_access] | ^ 424 | pub fn (mut rng PRNG) shuffle[T](mut a []T, config_ config.ShuffleConfigStruct) ! { 425 | config_.validate_for(a)! vlib/rand/rand.v:487:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 485 | 486 | // new_default returns a new instance of the default RNG. If the seed is not provided, the current time will be used to seed the instance. 487 | [manualfree] | ^ 488 | pub fn new_default(config_ config.PRNGConfigStruct) &PRNG { 489 | mut rng := &wyrand.WyRandRNG{} vlib/v/token/keywords_matcher_trie.v:6:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4 | // is a reserved word (belongs to a given set of previously known words `R`). 5 | // See the module description for more details. 6 | [heap] | ^ 7 | pub struct KeywordsMatcherTrie { 8 | pub mut: vlib/v/token/keywords_matcher_trie.v:25:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 23 | // there at all. If the word was found, find will return the `value` (value => 0), 24 | // associated with the word, when it was added. 25 | [direct_array_access] | ^ 26 | pub fn (km &KeywordsMatcherTrie) find(word string) int { 27 | wlen := word.len vlib/v/token/keywords_matcher_trie.v:42:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 40 | 41 | // matches returns true when the word was already added, i.e. when it was found. 42 | [inline] | ^ 43 | pub fn (km &KeywordsMatcherTrie) matches(word string) bool { 44 | return km.find(word) != -1 vlib/v/token/keywords_matcher_trie.v:49:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 47 | // add_word adds the given word to the KeywordsMatcherTrie instance. It associates a non 48 | // negative integer value to it, so later `find` could return the value, when it succeeds. 49 | [direct_array_access] | ^ 50 | pub fn (mut km KeywordsMatcherTrie) add_word(word string, value int) { 51 | wlen := word.len vlib/v/token/keywords_matcher_trie.v:145:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 143 | // It returns -1 if there is no match, or the value associated with the previously added 144 | // matching word by `add_word`. 145 | [direct_array_access] | ^ 146 | pub fn (root &TrieNode) find(word string) int { 147 | wlen := word.len vlib/v/token/pos.v:16:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 14 | } 15 | 16 | [unsafe] | ^ 17 | pub fn (mut p Pos) free() { 18 | } vlib/v/token/pos.v:46:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 44 | } 45 | 46 | [inline] | ^ 47 | pub fn (tok &Token) pos() Pos { 48 | return Pos{ vlib/v/token/token.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6 | const orm_custom_operators = ['like'] 7 | 8 | [minify] | ^ 9 | pub struct Token { 10 | pub: vlib/v/token/token.v:351:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 349 | } 350 | 351 | [inline] | ^ 352 | pub fn is_key(key string) bool { 353 | return int(token.keywords[key]) > 0 vlib/v/token/token.v:356:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 354 | } 355 | 356 | [inline] | ^ 357 | pub fn is_decl(t Kind) bool { 358 | return t in [.key_enum, .key_interface, .key_fn, .key_struct, .key_type, .key_const, .key_pub, vlib/v/token/token.v:362:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 360 | } 361 | 362 | [inline] | ^ 363 | pub fn (t Kind) is_assign() bool { 364 | return t in token.assign_tokens vlib/v/token/token.v:368:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 366 | 367 | // note: used for some code generation, so no quoting 368 | [inline] | ^ 369 | pub fn (t Kind) str() string { 370 | idx := int(t) vlib/v/token/token.v:377:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 375 | } 376 | 377 | [inline] | ^ 378 | pub fn (t Token) is_next_to(pre_token Token) bool { 379 | return t.pos - pre_token.pos == pre_token.len vlib/v/token/token.v:482:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 480 | 481 | // precedence returns a tokens precedence if defined, otherwise 0 482 | [direct_array_access; inline] | ^ 483 | pub fn (tok Token) precedence() int { 484 | return int(token.precedences[tok.kind]) vlib/v/token/token.v:488:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 486 | 487 | // precedence returns the precedence of the given token `kind` if defined, otherwise 0 488 | [direct_array_access; inline] | ^ 489 | pub fn (kind Kind) precedence() int { 490 | return int(token.precedences[kind]) vlib/v/token/token.v:494:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 492 | 493 | // is_scalar returns true if the token is a scalar 494 | [inline] | ^ 495 | pub fn (tok Token) is_scalar() bool { 496 | return tok.kind in [.number, .string] vlib/v/token/token.v:500:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 498 | 499 | // is_unary returns true if the token can be in a unary expression 500 | [inline] | ^ 501 | pub fn (tok Token) is_unary() bool { 502 | // `+` | `-` | `!` | `~` | `*` | `&` | `<-` vlib/v/token/token.v:506:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 504 | } 505 | 506 | [inline] | ^ 507 | pub fn (tok Kind) is_relational() bool { 508 | // `<` | `<=` | `>` | `>=` | `==` | `!=` vlib/v/token/token.v:512:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 510 | } 511 | 512 | [inline] | ^ 513 | pub fn (k Kind) is_start_of_type() bool { 514 | return k in [.name, .lpar, .amp, .lsbr, .question, .key_shared, .not] vlib/v/token/token.v:517:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 515 | } 516 | 517 | [inline] | ^ 518 | pub fn (kind Kind) is_prefix() bool { 519 | return kind in [.minus, .amp, .mul, .not, .bit_not] vlib/v/token/token.v:522:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 520 | } 521 | 522 | [inline] | ^ 523 | pub fn (kind Kind) is_infix() bool { 524 | return kind in [.plus, .minus, .mod, .mul, .div, .eq, .ne, .gt, .lt, .key_in, .key_as, .ge, vlib/v/token/token.v:529:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 527 | } 528 | 529 | [inline] | ^ 530 | pub fn (kind Kind) is_postfix() bool { 531 | return kind in [.inc, .dec, .question] vlib/v/mathutil/mathutil.v:6:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4 | module mathutil 5 | 6 | [inline] | ^ 7 | pub fn min[T](a T, b T) T { 8 | return if a < b { a } else { b } vlib/v/mathutil/mathutil.v:11:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 9 | } 10 | 11 | [inline] | ^ 12 | pub fn max[T](a T, b T) T { 13 | return if a > b { a } else { b } vlib/v/mathutil/mathutil.v:16:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 14 | } 15 | 16 | [inline] | ^ 17 | pub fn abs[T](a T) T { 18 | return if a > 0 { a } else { -a } vlib/time/chrono.v:21:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 19 | // http://howardhinnant.github.io/date_algorithms.html 20 | // Note that method will return negative values for days before 1970-01-01. 21 | [inline] | ^ 22 | pub fn (t Time) days_from_unix_epoch() int { 23 | return days_from_unix_epoch(t.year, t.month, t.day) vlib/time/operator.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | 3 | // operator `==` returns true if provided time is equal to time 4 | [inline] | ^ 5 | pub fn (t1 Time) == (t2 Time) bool { 6 | return t1.unix == t2.unix && t1.nanosecond == t2.nanosecond vlib/time/operator.v:10:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 8 | 9 | // operator `<` returns true if provided time is less than time 10 | [inline] | ^ 11 | pub fn (t1 Time) < (t2 Time) bool { 12 | return t1.unix < t2.unix || (t1.unix == t2.unix && t1.nanosecond < t2.nanosecond) vlib/time/operator.v:16:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 14 | 15 | // Time subtract using operator overloading. 16 | [inline] | ^ 17 | pub fn (lhs Time) - (rhs Time) Duration { 18 | // lhs.unix * 1_000_000_000 + i64(lhs.nanosecond) will overflow i64, for years > 3000 . vlib/time/stopwatch.v:6:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4 | module time 5 | 6 | [params] | ^ 7 | pub struct StopWatchOptions { 8 | auto_start bool = true vlib/time/time.v:53:18: notice: `[attr]` has been deprecated, use `@[attr]` instead 51 | is_local bool // used to make time.now().local().local() == time.now().local() 52 | // 53 | microsecond int [deprecated: 'use t.nanosecond / 1000 instead'; deprecated_after: '2023-08-05'] | ^ 54 | } 55 | vlib/time/time.v:106:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 104 | 105 | // unix_time returns the UNIX time with second resolution. 106 | [inline] | ^ 107 | pub fn (t Time) unix_time() i64 { 108 | return t.unix vlib/time/time.v:112:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 110 | 111 | // unix_time_milli returns the UNIX time with millisecond resolution. 112 | [inline] | ^ 113 | pub fn (t Time) unix_time_milli() i64 { 114 | return t.unix * 1_000 + (i64(t.nanosecond) / 1_000_000) vlib/time/time.v:118:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 116 | 117 | // unix_time_micro returns the UNIX time with microsecond resolution. 118 | [inline] | ^ 119 | pub fn (t Time) unix_time_micro() i64 { 120 | return t.unix * 1_000_000 + (i64(t.nanosecond) / 1_000) vlib/time/time.v:124:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 122 | 123 | // unix_time_nano returns the UNIX time with nanosecond resolution. 124 | [inline] | ^ 125 | pub fn (t Time) unix_time_nano() i64 { 126 | // TODO: use i128 here, when V supports it, since the following expression overflows for years like 3001: vlib/time/time_nix.c.v:67:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 65 | // Note: vpc_now is used by `v -profile` . 66 | // It should NOT call *any other v function*, just C functions and casts. 67 | [inline] | ^ 68 | fn vpc_now() u64 { 69 | ts := C.timespec{} vlib/time/unix.v:28:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 26 | 27 | // unix2 returns a Time struct, given an Unix timestamp in seconds, and a microsecond value 28 | [deprecated: 'use unix_microsecond(unix_ts, us) instead'] | ^ 29 | [deprecated_after: '2023-09-05'] 30 | pub fn unix2(abs i64, microsecond int) Time { vlib/time/unix.v:29:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 27 | // unix2 returns a Time struct, given an Unix timestamp in seconds, and a microsecond value 28 | [deprecated: 'use unix_microsecond(unix_ts, us) instead'] 29 | [deprecated_after: '2023-09-05'] | ^ 30 | pub fn unix2(abs i64, microsecond int) Time { 31 | return unix_nanosecond(abs, microsecond * 1000) vlib/v/vmod/vmod.v:33:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 31 | } 32 | 33 | [heap] | ^ 34 | pub struct ModFileCacher { 35 | mut: vlib/v/ast/ast.v:219:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 217 | } 218 | 219 | [minify] | ^ 220 | pub struct StringLiteral { 221 | pub: vlib/v/ast/ast.v:269:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 267 | 268 | // `foo.bar` 269 | [minify] | ^ 270 | pub struct SelectorExpr { 271 | pub: vlib/v/ast/ast.v:318:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 316 | } 317 | 318 | [minify] | ^ 319 | pub struct StructField { 320 | pub: vlib/v/ast/ast.v:371:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 369 | 370 | // const declaration 371 | [minify] | ^ 372 | pub struct ConstDecl { 373 | pub: vlib/v/ast/ast.v:383:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 381 | } 382 | 383 | [minify] | ^ 384 | pub struct StructDecl { 385 | pub: vlib/v/ast/ast.v:421:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 419 | } 420 | 421 | [minify] | ^ 422 | pub struct InterfaceDecl { 423 | pub: vlib/v/ast/ast.v:461:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 459 | // field1: 'hello' 460 | // }` 461 | [minify] | ^ 462 | pub struct StructInit { 463 | pub: vlib/v/ast/ast.v:522:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 520 | 521 | // function or method declaration 522 | [minify] | ^ 523 | pub struct FnDecl { 524 | pub: vlib/v/ast/ast.v:597:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 595 | } 596 | 597 | [minify] | ^ 598 | pub struct Fn { 599 | pub: vlib/v/ast/ast.v:641:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 639 | } 640 | 641 | [minify] | ^ 642 | pub struct Param { 643 | pub: vlib/v/ast/ast.v:701:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 699 | 700 | // break, continue 701 | [minify] | ^ 702 | pub struct BranchStmt { 703 | pub: vlib/v/ast/ast.v:710:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 708 | 709 | // function or method call expr 710 | [minify] | ^ 711 | pub struct CallExpr { 712 | pub: vlib/v/ast/ast.v:755:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 753 | 754 | // function call argument: `f(callarg)` 755 | [minify] | ^ 756 | pub struct CallArg { 757 | pub: vlib/v/ast/ast.v:787:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 785 | } 786 | 787 | [minify] | ^ 788 | pub struct Var { 789 | pub: vlib/v/ast/ast.v:820:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 818 | // used for smartcasting only 819 | // struct fields change type in scopes 820 | [minify] | ^ 821 | pub struct ScopeStructField { 822 | pub: vlib/v/ast/ast.v:835:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 833 | } 834 | 835 | [minify] | ^ 836 | pub struct GlobalField { 837 | pub: vlib/v/ast/ast.v:861:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 859 | } 860 | 861 | [minify] | ^ 862 | pub struct EmbeddedFile { 863 | pub: vlib/v/ast/ast.v:877:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 875 | // When the V compiler runs, the parser will fill an []File. 876 | // That array is then passed to V's checker. 877 | [heap] | ^ 878 | pub struct File { 879 | pub: vlib/v/ast/ast.v:906:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 904 | } 905 | 906 | [unsafe] | ^ 907 | pub fn (f &File) free() { 908 | unsafe { vlib/v/ast/ast.v:931:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 929 | // TODO: (joe) remove completely, use ident.obj 930 | // instead which points to the scope object 931 | [minify] | ^ 932 | pub struct IdentVar { 933 | pub mut: vlib/v/ast/ast.v:954:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 952 | 953 | // A single identifier 954 | [minify] | ^ 955 | pub struct Ident { 956 | pub: vlib/v/ast/ast.v:1012:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1010 | // left op right 1011 | // See: token.Kind.is_infix 1012 | [minify] | ^ 1013 | pub struct InfixExpr { 1014 | pub: vlib/v/ast/ast.v:1049:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1047 | 1048 | // See: token.Kind.is_prefix 1049 | [minify] | ^ 1050 | pub struct PrefixExpr { 1051 | pub: vlib/v/ast/ast.v:1061:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1059 | } 1060 | 1061 | [minify] | ^ 1062 | pub struct IndexExpr { 1063 | pub: vlib/v/ast/ast.v:1079:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1077 | } 1078 | 1079 | [minify] | ^ 1080 | pub struct IfExpr { 1081 | pub: vlib/v/ast/ast.v:1127:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1125 | } 1126 | 1127 | [minify] | ^ 1128 | pub struct MatchExpr { 1129 | pub: vlib/v/ast/ast.v:1166:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1164 | } 1165 | 1166 | [minify] | ^ 1167 | pub struct SelectBranch { 1168 | pub: vlib/v/ast/ast.v:1209:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1207 | } 1208 | 1209 | [minify] | ^ 1210 | pub struct ForInStmt { 1211 | pub: vlib/v/ast/ast.v:1267:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1265 | 1266 | // variable assign statement 1267 | [minify] | ^ 1268 | pub struct AssignStmt { 1269 | pub: vlib/v/ast/ast.v:1319:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1317 | 1318 | // enum declaration 1319 | [minify] | ^ 1320 | pub struct EnumDecl { 1321 | pub: vlib/v/ast/ast.v:1374:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1372 | // v1 excludes non current os ifdefs so 1373 | // the defer's never get added in the first place 1374 | [minify] | ^ 1375 | pub struct DeferStmt { 1376 | pub: vlib/v/ast/ast.v:1394:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1392 | } 1393 | 1394 | [minify] | ^ 1395 | pub struct GoExpr { 1396 | pub: vlib/v/ast/ast.v:1403:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1401 | } 1402 | 1403 | [minify] | ^ 1404 | pub struct SpawnExpr { 1405 | pub: vlib/v/ast/ast.v:1426:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1424 | } 1425 | 1426 | [minify] | ^ 1427 | pub struct ArrayInit { 1428 | pub: vlib/v/ast/ast.v:1471:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1469 | } 1470 | 1471 | [minify] | ^ 1472 | pub struct MapInit { 1473 | pub: vlib/v/ast/ast.v:1487:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1485 | 1486 | // s[10..20] 1487 | [minify] | ^ 1488 | pub struct RangeExpr { 1489 | pub: vlib/v/ast/ast.v:1500:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1498 | } 1499 | 1500 | [minify] | ^ 1501 | pub struct CastExpr { 1502 | pub mut: vlib/v/ast/ast.v:1512:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1510 | } 1511 | 1512 | [minify] | ^ 1513 | pub struct AsmStmt { 1514 | pub: vlib/v/ast/ast.v:1530:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1528 | } 1529 | 1530 | [minify] | ^ 1531 | pub struct AsmTemplate { 1532 | pub mut: vlib/v/ast/ast.v:1699:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1697 | 1698 | // `assert a == 0, 'a is zero'` 1699 | [minify] | ^ 1700 | pub struct AssertStmt { 1701 | pub: vlib/v/ast/ast.v:1754:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1752 | 1753 | // deprecated 1754 | [minify] | ^ 1755 | pub struct Assoc { 1756 | pub: vlib/v/ast/ast.v:1786:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1784 | } 1785 | 1786 | [minify] | ^ 1787 | pub struct OffsetOf { 1788 | pub: vlib/v/ast/ast.v:1816:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1814 | } 1815 | 1816 | [minify] | ^ 1817 | pub struct TypeOf { 1818 | pub: vlib/v/ast/ast.v:1826:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1824 | } 1825 | 1826 | [minify] | ^ 1827 | pub struct DumpExpr { 1828 | pub: vlib/v/ast/ast.v:1861:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1859 | } 1860 | 1861 | [minify] | ^ 1862 | pub struct ComptimeSelector { 1863 | pub: vlib/v/ast/ast.v:1873:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1871 | } 1872 | 1873 | [minify] | ^ 1874 | pub struct ComptimeCall { 1875 | pub: vlib/v/ast/ast.v:1969:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1967 | } 1968 | 1969 | [inline] | ^ 1970 | pub fn (expr Expr) is_blank_ident() bool { 1971 | if expr is Ident { vlib/v/ast/attr.v:17:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 15 | 16 | // e.g. `[unsafe]` 17 | [minify] | ^ 18 | pub struct Attr { 19 | pub: vlib/v/ast/attr.v:62:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 60 | } 61 | 62 | [direct_array_access] | ^ 63 | pub fn (attrs []Attr) find_first(aname string) ?Attr { 64 | for a in attrs { vlib/v/ast/attr.v:72:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 70 | } 71 | 72 | [direct_array_access] | ^ 73 | pub fn (attrs []Attr) find_last(aname string) ?Attr { 74 | for idx := attrs.len - 1; idx > -1; idx-- { vlib/v/ast/attr.v:83:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 81 | } 82 | 83 | [direct_array_access] | ^ 84 | pub fn (attrs []Attr) find_comptime_define() ?int { 85 | for idx in 0 .. attrs.len { vlib/v/ast/scope.v:6:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4 | module ast 5 | 6 | [heap] | ^ 7 | pub struct Scope { 8 | pub mut: vlib/v/ast/scope.v:19:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 17 | } 18 | 19 | [unsafe] | ^ 20 | pub fn (s &Scope) free() { 21 | unsafe { vlib/v/ast/scope.v:178:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 176 | } 177 | 178 | [inline] | ^ 179 | pub fn (s &Scope) contains(pos int) bool { 180 | return pos >= s.start_pos && pos <= s.end_pos vlib/v/ast/table.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | [has_globals] | ^ 5 | module ast 6 | vlib/v/ast/table.v:10:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 8 | import v.util 9 | 10 | [heap; minify] | ^ 11 | pub struct Table { 12 | mut: vlib/v/ast/table.v:55:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 53 | // used by vls to avoid leaks 54 | // TODO remove manual memory management 55 | [unsafe] | ^ 56 | pub fn (mut t Table) free() { 57 | unsafe { vlib/v/ast/table.v:287:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 285 | } 286 | 287 | [params] | ^ 288 | pub struct GetEmbedsOptions { 289 | preceding []Type vlib/v/ast/table.v:637:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 635 | } 636 | 637 | [inline] | ^ 638 | pub fn (t &Table) find_type_idx(name string) int { 639 | return t.type_idxs[name] vlib/v/ast/table.v:642:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 640 | } 641 | 642 | [inline] | ^ 643 | pub fn (t &Table) find_sym(name string) ?&TypeSymbol { 644 | idx := t.type_idxs[name] vlib/v/ast/table.v:651:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 649 | } 650 | 651 | [inline] | ^ 652 | pub fn (t &Table) find_sym_and_type_idx(name string) (&TypeSymbol, int) { 653 | idx := t.type_idxs[name] vlib/v/ast/table.v:670:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 668 | } 669 | 670 | [inline] | ^ 671 | pub fn (t &Table) sym_by_idx(idx int) &TypeSymbol { 672 | return t.type_symbols[idx] vlib/v/ast/table.v:687:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 685 | 686 | // final_sym follows aliases until it gets to a "real" Type 687 | [inline] | ^ 688 | pub fn (t &Table) final_sym(typ Type) &TypeSymbol { 689 | mut idx := typ.idx() vlib/v/ast/table.v:702:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 700 | } 701 | 702 | [inline] | ^ 703 | pub fn (t &Table) get_type_name(typ Type) string { 704 | return t.sym(typ).name vlib/v/ast/table.v:707:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 705 | } 706 | 707 | [inline] | ^ 708 | pub fn (t &Table) get_final_type_name(typ Type) string { 709 | return t.final_sym(typ).name vlib/v/ast/table.v:712:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 710 | } 711 | 712 | [inline] | ^ 713 | pub fn (t &Table) unalias_num_type(typ Type) Type { 714 | sym := t.sym(typ) vlib/v/ast/table.v:723:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 721 | } 722 | 723 | [inline] | ^ 724 | pub fn (t &Table) unaliased_type(typ Type) Type { 725 | sym := t.sym(typ) vlib/v/ast/table.v:770:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 768 | } 769 | 770 | [inline] | ^ 771 | pub fn (mut t Table) register_sym(sym TypeSymbol) int { 772 | mut idx := -2 vlib/v/ast/table.v:803:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 801 | } 802 | 803 | [inline] | ^ 804 | pub fn (mut t Table) register_enum_decl(enum_decl EnumDecl) { 805 | t.enum_decls[enum_decl.name] = enum_decl vlib/v/ast/table.v:808:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 806 | } 807 | 808 | [inline] | ^ 809 | pub fn (mut t Table) register_anon_struct(name string, sym_idx int) { 810 | t.anon_struct_names[name] = sym_idx vlib/v/ast/table.v:853:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 851 | // array_source_name generates the original name for the v source. 852 | // e. g. []int 853 | [inline] | ^ 854 | pub fn (t &Table) array_name(elem_type Type) string { 855 | elem_type_sym := t.sym(elem_type) vlib/v/ast/table.v:862:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 860 | } 861 | 862 | [inline] | ^ 863 | pub fn (t &Table) array_cname(elem_type Type) string { 864 | elem_type_sym := t.sym(elem_type) vlib/v/ast/table.v:878:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 876 | // array_fixed_source_name generates the original name for the v source. 877 | // e. g. [16][8]int 878 | [inline] | ^ 879 | pub fn (t &Table) array_fixed_name(elem_type Type, size int, size_expr Expr) string { 880 | elem_type_sym := t.sym(elem_type) vlib/v/ast/table.v:892:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 890 | } 891 | 892 | [inline] | ^ 893 | pub fn (t &Table) array_fixed_cname(elem_type Type, size int) string { 894 | elem_type_sym := t.sym(elem_type) vlib/v/ast/table.v:906:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 904 | } 905 | 906 | [inline] | ^ 907 | pub fn (t &Table) chan_name(elem_type Type, is_mut bool) string { 908 | elem_type_sym := t.sym(elem_type) vlib/v/ast/table.v:918:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 916 | } 917 | 918 | [inline] | ^ 919 | pub fn (t &Table) chan_cname(elem_type Type, is_mut bool) string { 920 | elem_type_sym := t.sym(elem_type) vlib/v/ast/table.v:930:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 928 | } 929 | 930 | [inline] | ^ 931 | pub fn (t &Table) promise_name(return_type Type) string { 932 | if return_type.idx() == void_type_idx { vlib/v/ast/table.v:940:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 938 | } 939 | 940 | [inline] | ^ 941 | pub fn (t &Table) promise_cname(return_type Type) string { 942 | if return_type == void_type { vlib/v/ast/table.v:950:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 948 | } 949 | 950 | [inline] | ^ 951 | pub fn (t &Table) thread_name(return_type Type) string { 952 | if return_type.idx() == void_type_idx { vlib/v/ast/table.v:968:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 966 | } 967 | 968 | [inline] | ^ 969 | pub fn (t &Table) thread_cname(return_type Type) string { 970 | if return_type == void_type { vlib/v/ast/table.v:988:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 986 | // map_source_name generates the original name for the v source. 987 | // e. g. map[string]int 988 | [inline] | ^ 989 | pub fn (t &Table) map_name(key_type Type, value_type Type) string { 990 | key_type_sym := t.sym(key_type) vlib/v/ast/table.v:998:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 996 | } 997 | 998 | [inline] | ^ 999 | pub fn (t &Table) map_cname(key_type Type, value_type Type) string { 1000 | key_type_sym := t.sym(key_type) vlib/v/ast/table.v:1229:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1227 | } 1228 | 1229 | [inline] | ^ 1230 | pub fn (t &Table) value_type(typ Type) Type { 1231 | sym := t.final_sym(typ) vlib/v/ast/types.v:89:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 87 | // Each TypeSymbol is entered into `Table.types`. 88 | // See also: Table.sym. 89 | [minify] | ^ 90 | pub struct TypeSymbol { 91 | pub: vlib/v/ast/types.v:150:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 148 | } 149 | 150 | [minify] | ^ 151 | pub struct Struct { 152 | pub: vlib/v/ast/types.v:175:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 173 | } 174 | 175 | [minify] | ^ 176 | pub struct Interface { 177 | pub mut: vlib/v/ast/types.v:201:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 199 | } 200 | 201 | [minify] | ^ 202 | pub struct Alias { 203 | pub: vlib/v/ast/types.v:224:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 222 | } 223 | 224 | [minify] | ^ 225 | pub struct ArrayFixed { 226 | pub: vlib/v/ast/types.v:251:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 249 | } 250 | 251 | [minify] | ^ 252 | pub struct SumType { 253 | pub mut: vlib/v/ast/types.v:287:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 285 | 286 | // return TypeSymbol idx for `t` 287 | [inline] | ^ 288 | pub fn (t Type) idx() int { 289 | return u16(t) & 0xffff vlib/v/ast/types.v:293:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 291 | 292 | // is_void return true if t is of type void 293 | [inline] | ^ 294 | pub fn (t Type) is_void() bool { 295 | return t == ast.void_type vlib/v/ast/types.v:299:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 297 | 298 | // is_full return true if t is not of type void 299 | [inline] | ^ 300 | pub fn (t Type) is_full() bool { 301 | return t != 0 && t != ast.void_type vlib/v/ast/types.v:305:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 303 | 304 | // return nr_muls for `t` 305 | [inline] | ^ 306 | pub fn (t Type) nr_muls() int { 307 | return (int(t) >> 16) & 0xff vlib/v/ast/types.v:311:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 309 | 310 | // return true if `t` is a pointer (nr_muls>0) 311 | [inline] | ^ 312 | pub fn (t Type) is_ptr() bool { 313 | // any normal pointer, i.e. &Type, &&Type etc; vlib/v/ast/types.v:319:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 317 | 318 | // is_pointer returns true if typ is any of the builtin pointer types (voidptr, byteptr, charptr) 319 | [inline] | ^ 320 | pub fn (typ Type) is_pointer() bool { 321 | // builtin pointer types (voidptr, byteptr, charptr) vlib/v/ast/types.v:326:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 324 | 325 | // is_voidptr returns true if typ is a voidptr 326 | [inline] | ^ 327 | pub fn (typ Type) is_voidptr() bool { 328 | return typ.idx() == ast.voidptr_type_idx vlib/v/ast/types.v:332:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 330 | 331 | // is_any_kind_of_pointer returns true if t is any type of pointer 332 | [inline] | ^ 333 | pub fn (t Type) is_any_kind_of_pointer() bool { 334 | return (int(t) >> 16) & 0xff > 0 || (u16(t) & 0xffff) in ast.pointer_type_idxs vlib/v/ast/types.v:338:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 336 | 337 | // set nr_muls on `t` and return it 338 | [inline] | ^ 339 | pub fn (t Type) set_nr_muls(nr_muls int) Type { 340 | if nr_muls < 0 || nr_muls > 255 { vlib/v/ast/types.v:347:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 345 | 346 | // increments nr_muls on `t` and return it 347 | [inline] | ^ 348 | pub fn (t Type) ref() Type { 349 | nr_muls := (int(t) >> 16) & 0xff vlib/v/ast/types.v:357:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 355 | 356 | // decrement nr_muls on `t` and return it 357 | [inline] | ^ 358 | pub fn (t Type) deref() Type { 359 | nr_muls := (int(t) >> 16) & 0xff vlib/v/ast/types.v:367:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 365 | 366 | // set `flag` on `t` and return `t` 367 | [inline] | ^ 368 | pub fn (t Type) set_flag(flag TypeFlag) Type { 369 | return int(t) | (1 << (int(flag) + 24)) vlib/v/ast/types.v:373:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 371 | 372 | // clear `flag` on `t` and return `t` 373 | [inline] | ^ 374 | pub fn (t Type) clear_flag(flag TypeFlag) Type { 375 | return int(t) & ~(1 << (int(flag) + 24)) vlib/v/ast/types.v:379:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 377 | 378 | // clear all flags or multi flags 379 | [inline] | ^ 380 | pub fn (t Type) clear_flags(flags ...TypeFlag) Type { 381 | if flags.len == 0 { vlib/v/ast/types.v:393:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 391 | 392 | // return true if `flag` is set on `t` 393 | [inline] | ^ 394 | pub fn (t Type) has_flag(flag TypeFlag) bool { 395 | return int(t) & (1 << (int(flag) + 24)) > 0 vlib/v/ast/types.v:461:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 459 | 460 | // copy flags & nr_muls from `t_from` to `t` and return `t` 461 | [inline] | ^ 462 | pub fn (t Type) derive(t_from Type) Type { 463 | return (0xffff0000 & t_from) | u16(t) vlib/v/ast/types.v:467:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 465 | 466 | // copy flags from `t_from` to `t` and return `t` 467 | [inline] | ^ 468 | pub fn (t Type) derive_add_muls(t_from Type) Type { 469 | return Type((0xff000000 & t_from) | u16(t)).set_nr_muls(t.nr_muls() + t_from.nr_muls()) vlib/v/ast/types.v:473:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 471 | 472 | // return new type with TypeSymbol idx set to `idx` 473 | [inline] | ^ 474 | pub fn new_type(idx int) Type { 475 | if idx < 1 || idx > 65535 { vlib/v/ast/types.v:482:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 480 | 481 | // return new type with TypeSymbol idx set to `idx` & nr_muls set to `nr_muls` 482 | [inline] | ^ 483 | pub fn new_type_ptr(idx int, nr_muls int) Type { 484 | if idx < 1 || idx > 65535 { vlib/v/ast/types.v:493:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 491 | } 492 | 493 | [inline] | ^ 494 | pub fn (typ Type) is_float() bool { 495 | return !typ.is_ptr() && typ.idx() in ast.float_type_idxs vlib/v/ast/types.v:498:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 496 | } 497 | 498 | [inline] | ^ 499 | pub fn (typ Type) is_int() bool { 500 | return !typ.is_ptr() && typ.idx() in ast.integer_type_idxs vlib/v/ast/types.v:503:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 501 | } 502 | 503 | [inline] | ^ 504 | pub fn (typ Type) is_int_valptr() bool { 505 | return typ.is_ptr() && typ.idx() in ast.integer_type_idxs vlib/v/ast/types.v:508:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 506 | } 507 | 508 | [inline] | ^ 509 | pub fn (typ Type) is_float_valptr() bool { 510 | return typ.is_ptr() && typ.idx() in ast.float_type_idxs vlib/v/ast/types.v:513:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 511 | } 512 | 513 | [inline] | ^ 514 | pub fn (typ Type) is_pure_int() bool { 515 | return int(typ) in ast.integer_type_idxs vlib/v/ast/types.v:518:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 516 | } 517 | 518 | [inline] | ^ 519 | pub fn (typ Type) is_pure_float() bool { 520 | return int(typ) in ast.float_type_idxs vlib/v/ast/types.v:523:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 521 | } 522 | 523 | [inline] | ^ 524 | pub fn (typ Type) is_signed() bool { 525 | return typ.idx() in ast.signed_integer_type_idxs vlib/v/ast/types.v:528:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 526 | } 527 | 528 | [inline] | ^ 529 | pub fn (typ Type) is_unsigned() bool { 530 | return typ.idx() in ast.unsigned_integer_type_idxs vlib/v/ast/types.v:550:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 548 | } 549 | 550 | [inline] | ^ 551 | pub fn (typ Type) is_int_literal() bool { 552 | return int(typ) == ast.int_literal_type_idx vlib/v/ast/types.v:555:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 553 | } 554 | 555 | [inline] | ^ 556 | pub fn (typ Type) is_number() bool { 557 | return typ.clear_flags() in ast.number_type_idxs vlib/v/ast/types.v:560:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 558 | } 559 | 560 | [inline] | ^ 561 | pub fn (typ Type) is_string() bool { 562 | return typ.idx() == ast.string_type_idx vlib/v/ast/types.v:565:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 563 | } 564 | 565 | [inline] | ^ 566 | pub fn (typ Type) is_bool() bool { 567 | return typ.idx() == ast.bool_type_idx vlib/v/ast/types.v:765:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 763 | } 764 | 765 | [noreturn] | ^ 766 | fn (t &TypeSymbol) no_info_panic(fname string) { 767 | panic('${fname}: no info for type: ${t.name}') vlib/v/ast/types.v:770:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 768 | } 769 | 770 | [inline] | ^ 771 | pub fn (t &TypeSymbol) enum_info() Enum { 772 | if t.info is Enum { vlib/v/ast/types.v:784:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 782 | } 783 | 784 | [inline] | ^ 785 | pub fn (t &TypeSymbol) mr_info() MultiReturn { 786 | if t.info is MultiReturn { vlib/v/ast/types.v:798:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 796 | } 797 | 798 | [inline] | ^ 799 | pub fn (t &TypeSymbol) array_info() Array { 800 | if t.info is Array { vlib/v/ast/types.v:812:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 810 | } 811 | 812 | [inline] | ^ 813 | pub fn (t &TypeSymbol) array_fixed_info() ArrayFixed { 814 | if t.info is ArrayFixed { vlib/v/ast/types.v:826:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 824 | } 825 | 826 | [inline] | ^ 827 | pub fn (t &TypeSymbol) chan_info() Chan { 828 | if t.info is Chan { vlib/v/ast/types.v:840:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 838 | } 839 | 840 | [inline] | ^ 841 | pub fn (t &TypeSymbol) thread_info() Thread { 842 | if t.info is Thread { vlib/v/ast/types.v:854:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 852 | } 853 | 854 | [inline] | ^ 855 | pub fn (t &TypeSymbol) map_info() Map { 856 | if t.info is Map { vlib/v/ast/types.v:868:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 866 | } 867 | 868 | [inline] | ^ 869 | pub fn (t &TypeSymbol) struct_info() Struct { 870 | if t.info is Struct { vlib/v/ast/types.v:882:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 880 | } 881 | 882 | [inline] | ^ 883 | pub fn (t &TypeSymbol) sumtype_info() SumType { 884 | if t.info is SumType { vlib/v/ast/types.v:984:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 982 | } 983 | 984 | [inline] | ^ 985 | pub fn (t &TypeSymbol) is_pointer() bool { 986 | return t.kind in [.byteptr, .charptr, .voidptr] vlib/v/ast/types.v:989:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 987 | } 988 | 989 | [inline] | ^ 990 | pub fn (t &TypeSymbol) is_int() bool { 991 | res := t.kind in [.i8, .i16, .int, .i64, .i32, .isize, .u8, .u16, .u32, .u64, .usize, vlib/v/ast/types.v:999:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 997 | } 998 | 999 | [inline] | ^ 1000 | pub fn (t &TypeSymbol) is_float() bool { 1001 | return t.kind in [.f32, .f64, .float_literal] vlib/v/ast/types.v:1004:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1002 | } 1003 | 1004 | [inline] | ^ 1005 | pub fn (t &TypeSymbol) is_string() bool { 1006 | return t.kind == .string vlib/v/ast/types.v:1009:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1007 | } 1008 | 1009 | [inline] | ^ 1010 | pub fn (t &TypeSymbol) is_number() bool { 1011 | return t.is_int() || t.is_float() vlib/v/ast/types.v:1014:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1012 | } 1013 | 1014 | [inline] | ^ 1015 | pub fn (t &TypeSymbol) is_bool() bool { 1016 | return t.kind == .bool vlib/v/ast/types.v:1019:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1017 | } 1018 | 1019 | [inline] | ^ 1020 | pub fn (t &TypeSymbol) is_primitive() bool { 1021 | return t.is_number() || t.is_pointer() || t.is_string() || t.is_bool() vlib/v/ast/types.v:1024:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1022 | } 1023 | 1024 | [inline] | ^ 1025 | pub fn (t &TypeSymbol) is_builtin() bool { 1026 | return t.mod == 'builtin' vlib/v/ast/types.v:1142:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1140 | // round_up rounds the number `n` up to the next multiple `multiple`. 1141 | // Note: `multiple` must be a power of 2. 1142 | [inline] | ^ 1143 | fn round_up(n int, multiple int) int { 1144 | return (n + multiple - 1) & -multiple vlib/v/ast/types.v:1485:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1483 | } 1484 | 1485 | [minify] | ^ 1486 | pub struct FnSignatureOpts { 1487 | skip_receiver bool vlib/v/checker/checker.v:43:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 41 | ) 42 | 43 | [heap; minify] | ^ 44 | pub struct Checker { 45 | pub mut: vlib/v/checker/checker.v:1959:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1957 | } 1958 | 1959 | [inline] | ^ 1960 | fn (mut c Checker) check_loop_label(label string, pos token.Pos) { 1961 | if label.len == 0 { vlib/v/checker/checker.v:4025:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4023 | } 4024 | 4025 | [inline] | ^ 4026 | pub fn (mut c Checker) is_comptime_var(node ast.Expr) bool { 4027 | return node is ast.Ident && node.info is ast.IdentVar && node.kind == .variable vlib/v/checker/comptime.v:12:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 10 | import v.pkgconfig 11 | 12 | [inline] | ^ 13 | fn (mut c Checker) get_ct_type_var(node ast.Expr) ast.ComptimeVarKind { 14 | return if node is ast.Ident && node.obj is ast.Var { vlib/v/checker/comptime.v:21:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 19 | } 20 | 21 | [inline] | ^ 22 | fn (mut c Checker) get_comptime_var_type(node ast.Expr) ast.Type { 23 | if node is ast.Ident && node.obj is ast.Var { vlib/v/checker/comptime.v:930:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 928 | 929 | // get_comptime_selector_type retrieves the var.$(field.name) type when field_name is 'name' otherwise default_type is returned 930 | [inline] | ^ 931 | fn (mut c Checker) get_comptime_selector_type(node ast.ComptimeSelector, default_type ast.Type) ast.Type { 932 | if node.field_expr is ast.SelectorExpr && c.check_comptime_is_field_selector(node.field_expr) vlib/v/checker/comptime.v:940:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 938 | 939 | // is_comptime_selector_field_name checks if the SelectorExpr is related to $for variable accessing specific field name provided by `field_name` 940 | [inline] | ^ 941 | fn (mut c Checker) is_comptime_selector_field_name(node ast.SelectorExpr, field_name string) bool { 942 | return c.inside_comptime_for_field && node.expr is ast.Ident vlib/v/checker/comptime.v:947:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 945 | 946 | // is_comptime_selector_type checks if the SelectorExpr is related to $for variable accessing .typ field 947 | [inline] | ^ 948 | fn (mut c Checker) is_comptime_selector_type(node ast.SelectorExpr) bool { 949 | if c.inside_comptime_for_field && node.expr is ast.Ident { vlib/v/checker/comptime.v:956:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 954 | 955 | // check_comptime_is_field_selector checks if the SelectorExpr is related to $for variable 956 | [inline] | ^ 957 | fn (mut c Checker) check_comptime_is_field_selector(node ast.SelectorExpr) bool { 958 | if c.inside_comptime_for_field && node.expr is ast.Ident { vlib/v/checker/comptime.v:965:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 963 | 964 | // check_comptime_is_field_selector_bool checks if the SelectorExpr is related to field.is_* boolean fields 965 | [inline] | ^ 966 | fn (mut c Checker) check_comptime_is_field_selector_bool(node ast.SelectorExpr) bool { 967 | if c.check_comptime_is_field_selector(node) { vlib/v/checker/return.v:12:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 10 | // ! => Result type 11 | // others => type `name` 12 | [inline] | ^ 13 | fn (mut c Checker) error_type_name(exp_type ast.Type) string { 14 | return if exp_type == ast.void_type.set_flag(.result) { vlib/v/checker/str.v:129:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 127 | // unicode character literals are limited to a maximum value of 0x10ffff 128 | // https://stackoverflow.com/questions/52203351/why-unicode-is-restricted-to-0x10ffff 129 | [direct_array_access] | ^ 130 | fn (mut c Checker) string_lit(mut node ast.StringLiteral) ast.Type { 131 | mut idx := 0 vlib/v/checker/str.v:210:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 208 | } 209 | 210 | [direct_array_access] | ^ 211 | fn (mut c Checker) check_num_literal(lohi LoHiLimit, is_neg bool, lit string) ! { 212 | limit := if is_neg { lohi.lower } else { lohi.higher } vlib/v/transformer/index_state.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6 | } 7 | 8 | [if debug_bounds_checking ?] | ^ 9 | fn debug_bounds_checking(str string) { 10 | println(str) vlib/v/transformer/index_state.v:94:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 92 | // encountered as the code flow is then not lineear, and only restart when a 93 | // new function analysis is started. 94 | [if !no_bounds_checking] | ^ 95 | fn (mut i IndexState) indent(is_function bool) { 96 | mut kvs := []KeyVal{cap: i.max_index.len} vlib/v/transformer/index_state.v:109:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 107 | 108 | // restoring the data as it was before the if/for/unsafe block 109 | [if !no_bounds_checking] | ^ 110 | fn (mut i IndexState) unindent() { 111 | i.level -= 1 vlib/v/parser/expr.v:823:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 821 | // For example, there is a `like` operator in ORM, which should be used 822 | // in expressions like `name like 'M%'`, but it should not be used in V directly. 823 | [inline] | ^ 824 | fn (mut p Parser) process_custom_orm_operators() { 825 | if !p.inside_orm { vlib/v/parser/parser.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | // Use of this source code is governed by an MIT license 3 | // that can be found in the LICENSE file. 4 | [has_globals] | ^ 5 | module parser 6 | vlib/v/parser/parser.v:17:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 15 | import hash.fnv1a 16 | 17 | [minify] | ^ 18 | pub struct Parser { 19 | pref &pref.Preferences = unsafe { nil } vlib/v/parser/parser.v:178:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 176 | } 177 | 178 | [unsafe] | ^ 179 | pub fn (mut p Parser) free() { 180 | unsafe { p.free_scanner() } vlib/v/parser/parser.v:183:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 181 | } 182 | 183 | [unsafe] | ^ 184 | fn (mut p Parser) free_scanner() { 185 | unsafe { vlib/v/parser/parser.v:483:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 481 | } 482 | 483 | [inline] | ^ 484 | fn (p &Parser) peek_token(n int) token.Token { 485 | return p.scanner.peek_token(n - 2) vlib/v/parser/parser.v:636:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 634 | } 635 | 636 | [params] | ^ 637 | struct ParamsForUnexpected { 638 | got string vlib/v/parser/parser.v:699:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 697 | } 698 | 699 | [if trace_parser ?] | ^ 700 | fn (p &Parser) trace_parser(label string) { 701 | eprintln('parsing: ${p.file_name:-30}|tok.pos: ${p.tok.pos().line_str():-39}|tok.kind: ${p.tok.kind:-10}|tok.lit: ${p.tok.lit:-10}|${label}') vlib/v/parser/parser.v:918:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 916 | } 917 | 918 | [params] | ^ 919 | struct EatCommentsConfig { 920 | same_line bool // Only eat comments on the same line as the previous token vlib/v/parser/parser.v:2344:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2342 | } 2343 | 2344 | [direct_array_access] | ^ 2345 | fn (p &Parser) is_generic_struct_init() bool { 2346 | lit0_is_capital := p.tok.kind != .eof && p.tok.lit.len > 0 && p.tok.lit[0].is_capital() vlib/v/parser/parser.v:2379:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2377 | } 2378 | 2379 | [direct_array_access; inline] | ^ 2380 | fn (p &Parser) is_typename(t token.Token) bool { 2381 | return t.kind == .name && (t.lit[0].is_capital() || p.table.known_type(t.lit)) vlib/v/parser/parser.v:2396:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2394 | // 9. otherwise, it's not generic 2395 | // see also test_generic_detection in vlib/v/tests/generics_test.v 2396 | [direct_array_access] | ^ 2397 | fn (p &Parser) is_generic_call() bool { 2398 | lit0_is_capital := p.tok.kind != .eof && p.tok.lit.len > 0 && p.tok.lit[0].is_capital() vlib/v/parser/parser.v:2510:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2508 | } 2509 | 2510 | [direct_array_access] | ^ 2511 | fn (mut p Parser) name_expr() ast.Expr { 2512 | prev_tok_kind := p.prev_tok.kind vlib/v/parser/parser.v:4333:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4331 | } 4332 | 4333 | [noreturn] | ^ 4334 | fn verror(s string) { 4335 | util.verror('parser error', s) vlib/v/parser/parser.v:4475:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4473 | } 4474 | 4475 | [params] | ^ 4476 | struct ParserShowParams { 4477 | msg string vlib/v/callgraph/callgraph.v:24:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 22 | } 23 | 24 | [heap] | ^ 25 | struct Mapper { 26 | pos int vlib/v/dotgraph/dotgraph.v:5:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 3 | import strings 4 | 5 | [heap] | ^ 6 | pub struct DotGraph { 7 | mut: vlib/hash/wyhash.c.v:10:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 8 | 9 | // wyhash_c returns a hash given a byte string `key`, its `len`, and a `seed`. 10 | [inline] | ^ 11 | pub fn wyhash_c(key &u8, len u64, seed u64) u64 { 12 | return C.wyhash(key, len, seed, &u64(C._wyp)) vlib/hash/wyhash.c.v:16:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 14 | 15 | // wyhash64_c returns a hash given two u64 values `a` and `b`. 16 | [inline] | ^ 17 | pub fn wyhash64_c(a u64, b u64) u64 { 18 | return C.wyhash64(a, b) vlib/hash/wyhash.c.v:22:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 20 | 21 | // sum64_string returns a hash given a V string `key` and a `seed`. 22 | [inline] | ^ 23 | pub fn sum64_string(key string, seed u64) u64 { 24 | return wyhash_c(key.str, u64(key.len), seed) vlib/hash/wyhash.c.v:28:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 26 | 27 | // sum64 returns a hash given a byte array `key` and a `seed`. 28 | [inline] | ^ 29 | pub fn sum64(key []u8, seed u64) u64 { 30 | return wyhash_c(&u8(key.data), u64(key.len), seed) vlib/hash/wyhash.v:26:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 24 | ) 25 | 26 | [inline] | ^ 27 | fn wyrotr(v u64, k u32) u64 { 28 | return (v >> k) | (v << (64 - k)) vlib/hash/wyhash.v:32:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 30 | 31 | // wymum returns a hash by performing multiply and mix on `a` and `b`. 32 | [inline] | ^ 33 | pub fn wymum(a u64, b u64) u64 { 34 | /* vlib/hash/wyhash.v:54:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 52 | } 53 | 54 | [inline] | ^ 55 | fn wyr3(p &u8, k u64) u64 { 56 | unsafe { vlib/hash/wyhash.v:61:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 59 | } 60 | 61 | [inline] | ^ 62 | fn wyr4(p &u8) u64 { 63 | unsafe { vlib/hash/wyhash.v:68:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 66 | } 67 | 68 | [inline] | ^ 69 | fn wyr8(p &u8) u64 { 70 | unsafe { vlib/v/gen/c/auto_eq_methods.v:113:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 111 | 112 | // read_opt generates C code accessing option data 113 | [inline] | ^ 114 | fn (mut g Gen) read_opt(typ ast.Type, var_name string) string { 115 | return '(${g.base_type(typ)}*)${var_name}.data' vlib/v/gen/c/auto_eq_methods.v:119:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 117 | 118 | // read_field generates C code for reading option/no-option struct field 119 | [inline] | ^ 120 | fn (mut g Gen) read_field(struct_type ast.Type, field_name string, var_name string) string { 121 | return if struct_type.has_flag(.option) { vlib/v/gen/c/auto_eq_methods.v:129:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 127 | 128 | // read_opt_field generates C code for reading option/no-option struct field 129 | [inline] | ^ 130 | fn (mut g Gen) read_opt_field(struct_type ast.Type, field_name string, var_name string, field_typ ast.Type) string { 131 | return if field_typ.has_flag(.option) { vlib/v/gen/c/auto_free_methods.v:139:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 137 | } 138 | 139 | [inline] | ^ 140 | fn styp_to_free_fn_name(styp string) string { 141 | return styp.replace_each(['*', '', '.', '__', ' ', '__']) + '_free' vlib/v/gen/c/auto_str_methods.v:526:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 524 | } 525 | 526 | [inline] | ^ 527 | fn styp_to_str_fn_name(styp string) string { 528 | return styp.replace_each(['*', '', '.', '__', ' ', '__']) + '_str' vlib/v/gen/c/cgen.v:697:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 695 | // it frees the bulk of the memory that is private to the Gen instance 696 | // (the various string builders) 697 | [unsafe] | ^ 698 | pub fn (mut g Gen) free_builders() { 699 | unsafe { vlib/v/gen/c/cgen.v:1422:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1420 | } 1421 | 1422 | [inline] | ^ 1423 | fn (g &Gen) type_sidx(t ast.Type) string { 1424 | if g.pref.build_mode == .build_module { vlib/v/gen/c/cgen.v:2007:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2005 | } 2006 | 2007 | [inline] | ^ 2008 | fn (mut g Gen) write_v_source_line_info(pos token.Pos) { 2009 | if g.inside_ternary == 0 && g.pref.is_vlines && g.is_vlines_enabled { vlib/v/gen/c/cgen.v:2918:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2916 | } 2917 | 2918 | [if trace_autofree ?] | ^ 2919 | fn (mut g Gen) trace_autofree(line string) { 2920 | g.writeln(line) vlib/v/gen/c/cgen.v:4327:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4325 | } 4326 | 4327 | [inline] | ^ 4328 | pub fn (mut g Gen) is_generic_param_var(node ast.Expr) bool { 4329 | return node is ast.Ident && node.info is ast.IdentVar && node.obj is ast.Var vlib/v/gen/c/cgen.v:4333:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4331 | } 4332 | 4333 | [inline] | ^ 4334 | pub fn (mut g Gen) is_comptime_var(node ast.Expr) bool { 4335 | return node is ast.Ident && node.info is ast.IdentVar && node.obj is ast.Var vlib/v/gen/c/cgen.v:4694:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4692 | } 4693 | 4694 | [inline] | ^ 4695 | fn (g &Gen) expr_is_multi_return_call(expr ast.Expr) bool { 4696 | if expr is ast.CallExpr { vlib/v/gen/c/cgen.v:5729:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 5727 | } 5728 | 5729 | [noreturn] | ^ 5730 | fn verror(s string) { 5731 | util.verror('cgen error', s) vlib/v/gen/c/cgen.v:5734:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 5732 | } 5733 | 5734 | [noreturn] | ^ 5735 | fn (g &Gen) error(s string, pos token.Pos) { 5736 | util.show_compiler_message('cgen error:', pos: pos, file_path: g.file.path, message: s) vlib/v/gen/c/cgen.v:6377:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6375 | } 6376 | 6377 | [inline] | ^ 6378 | fn c_name(name_ string) string { 6379 | name := util.no_dots(name_) vlib/v/gen/c/cgen.v:6560:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6558 | } 6559 | 6560 | [inline] | ^ 6561 | fn (mut g Gen) get_type(typ ast.Type) ast.Type { 6562 | return if typ == g.field_data_type { g.comptime_for_field_value.typ } else { typ } vlib/v/gen/c/cgen.v:6582:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6580 | } 6581 | 6582 | [inline] | ^ 6583 | fn (mut g Gen) gen_enum_prefix(typ ast.Type) string { 6584 | if g.pref.translated && typ.is_number() { vlib/v/gen/c/comptime.v:743:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 741 | 742 | // is_comptime_selector_field_name checks if the SelectorExpr is related to $for variable accessing specific field name provided by `field_name` 743 | [inline] | ^ 744 | fn (mut g Gen) is_comptime_selector_field_name(node ast.SelectorExpr, field_name string) bool { 745 | return g.inside_comptime_for_field && node.expr is ast.Ident vlib/v/gen/c/comptime.v:750:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 748 | 749 | // check_comptime_is_field_selector checks if the SelectorExpr is related to $for variable accessing .typ field 750 | [inline] | ^ 751 | fn (mut g Gen) is_comptime_selector_type(node ast.SelectorExpr) bool { 752 | if g.inside_comptime_for_field && node.expr is ast.Ident { vlib/v/gen/c/fn.v:857:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 855 | } 856 | 857 | [inline] | ^ 858 | fn (mut g Gen) gen_arg_from_type(node_type ast.Type, node ast.Expr) { 859 | if node_type.has_flag(.shared_f) { vlib/v/gen/c/fn.v:2195:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2193 | } 2194 | 2195 | [inline] | ^ 2196 | fn (mut g Gen) ref_or_deref_arg(arg ast.CallArg, expected_type ast.Type, lang ast.Language) { 2197 | arg_typ := g.unwrap_generic(arg.typ) vlib/v/gen/c/json.v:214:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 212 | } 213 | 214 | [inline] | ^ 215 | fn (mut g Gen) gen_enum_to_str(utyp ast.Type, sym ast.TypeSymbol, enum_var string, result_var string, ident string, mut enc strings.Builder) { 216 | enum_prefix := g.gen_enum_prefix(utyp.clear_flag(.option)) vlib/v/gen/c/json.v:233:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 231 | } 232 | 233 | [inline] | ^ 234 | fn (mut g Gen) gen_str_to_enum(utyp ast.Type, sym ast.TypeSymbol, val_var string, result_var string, ident string, mut dec strings.Builder) { 235 | enum_prefix := g.gen_enum_prefix(utyp.clear_flag(.option)) vlib/v/gen/c/json.v:260:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 258 | } 259 | 260 | [inline] | ^ 261 | fn (mut g Gen) is_enum_as_int(sym ast.TypeSymbol) bool { 262 | if enum_decl := g.table.enum_decls[sym.name] { vlib/v/gen/c/json.v:270:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 268 | } 269 | 270 | [inline] | ^ 271 | fn (mut g Gen) gen_enum_enc_dec(utyp ast.Type, sym ast.TypeSymbol, mut enc strings.Builder, mut dec strings.Builder) { 272 | is_option := utyp.has_flag(.option) vlib/v/gen/c/json.v:297:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 295 | } 296 | 297 | [inline] | ^ 298 | fn (mut g Gen) gen_prim_enc_dec(typ ast.Type, mut enc strings.Builder, mut dec strings.Builder) { 299 | if typ.is_ptr() { vlib/v/gen/c/json.v:337:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 335 | } 336 | 337 | [inline] | ^ 338 | fn (mut g Gen) gen_option_enc_dec(typ ast.Type, mut enc strings.Builder, mut dec strings.Builder) { 339 | enc.writeln('\tif (val.state == 2) {') vlib/v/gen/c/json.v:354:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 352 | } 353 | 354 | [inline] | ^ 355 | fn (mut g Gen) gen_sumtype_enc_dec(utyp ast.Type, sym ast.TypeSymbol, mut enc strings.Builder, mut dec strings.Builder, ret_styp string) { 356 | info := sym.info as ast.SumType vlib/v/gen/c/json.v:585:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 583 | } 584 | 585 | [inline] | ^ 586 | fn (mut g Gen) gen_struct_enc_dec(utyp ast.Type, type_info ast.TypeInfo, styp string, mut enc strings.Builder, mut dec strings.Builder) { 587 | info := type_info as ast.Struct vlib/v/gen/c/reflection.v:19:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 17 | 18 | // gen_reflection_strings generates the reflectino string registration 19 | [inline] | ^ 20 | fn (mut g Gen) gen_reflection_strings() { 21 | for str, idx in g.reflection_strings { vlib/v/gen/c/reflection.v:27:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 25 | 26 | // gen_empty_array generates code for empty array 27 | [inline] | ^ 28 | fn (g Gen) gen_empty_array(type_name string) string { 29 | return '__new_array_with_default(0, 0, sizeof(${type_name}), 0)' vlib/v/gen/c/reflection.v:33:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 31 | 32 | // gen_functionarg_array generates the code for functionarg argument 33 | [inline] | ^ 34 | fn (g Gen) gen_functionarg_array(type_name string, node ast.Fn) string { 35 | if node.params.len == 0 { vlib/v/gen/c/reflection.v:46:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 44 | 45 | // gen_functionarg_array generates the code for functionarg argument 46 | [inline] | ^ 47 | fn (mut g Gen) gen_function_array(nodes []ast.Fn) string { 48 | type_name := '${c.cprefix}Function' vlib/v/gen/c/reflection.v:62:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 60 | 61 | // gen_reflection_fn generates C code for Function struct 62 | [inline] | ^ 63 | fn (mut g Gen) gen_reflection_fn(node ast.Fn) string { 64 | mut arg_str := '((${c.cprefix}Function){' vlib/v/gen/c/reflection.v:81:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 79 | 80 | // gen_reflection_sym generates C code for TypeSymbol struct 81 | [inline] | ^ 82 | fn (mut g Gen) gen_reflection_sym(tsym ast.TypeSymbol) string { 83 | kind_name := if tsym.kind in [.none_, .struct_, .enum_, .interface_] { vlib/v/gen/c/reflection.v:94:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 92 | 93 | // gen_attrs_array generates C code for []Attr 94 | [inline] | ^ 95 | fn (g Gen) gen_attrs_array(attrs []ast.Attr) string { 96 | if attrs.len == 0 { vlib/v/gen/c/reflection.v:107:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 105 | 106 | // gen_fields_array generates C code for []StructField 107 | [inline] | ^ 108 | fn (g Gen) gen_fields_array(fields []ast.StructField) string { 109 | if fields.len == 0 { vlib/v/gen/c/reflection.v:120:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 118 | 119 | // gen_type_array generates C code for []Type 120 | [inline] | ^ 121 | fn (g Gen) gen_type_array(types []ast.Type) string { 122 | if types.len == 0 { vlib/v/gen/c/reflection.v:129:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 127 | 128 | // gen_string_array generates C code for []string 129 | [inline] | ^ 130 | fn (g Gen) gen_string_array(strs []string) string { 131 | if strs.len == 0 { vlib/v/gen/c/reflection.v:139:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 137 | 138 | // gen_reflection_sym_info generates C code for TypeSymbol's info sum type 139 | [inline] | ^ 140 | fn (mut g Gen) gen_reflection_sym_info(tsym ast.TypeSymbol) string { 141 | match tsym.kind { vlib/v/gen/c/spawn_and_go.v:395:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 393 | 394 | // get current thread size, if fn hasn't defined return default 395 | [inline] | ^ 396 | fn (mut g Gen) get_cur_thread_stack_size(name string) string { 397 | ast_fn := g.table.fns[name] or { return '${g.pref.thread_stack_size}' } vlib/v/gen/c/text_manipulation.v:55:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 53 | } 54 | 55 | [inline] | ^ 56 | fn (g &Gen) nth_stmt_pos(n int) int { 57 | return g.stmt_path_pos[g.stmt_path_pos.len - (1 + n)] vlib/v/gen/c/text_manipulation.v:60:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 58 | } 59 | 60 | [inline] | ^ 61 | fn (mut g Gen) set_current_pos_as_last_stmt_pos() { 62 | g.stmt_path_pos << g.out.len vlib/v/gen/c/text_manipulation.v:65:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 63 | } 64 | 65 | [inline] | ^ 66 | fn (mut g Gen) go_before_last_stmt() string { 67 | return g.out.cut_to(g.nth_stmt_pos(0)) vlib/v/gen/c/text_manipulation.v:70:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 68 | } 69 | 70 | [inline] | ^ 71 | fn (mut g Gen) go_before_ternary() string { 72 | return g.out.cut_to(g.nth_stmt_pos(g.inside_ternary)) vlib/v/gen/c/utils.v:64:22: notice: `[attr]` has been deprecated, use `@[attr]` instead 62 | struct Type { 63 | // typ is the original type 64 | typ ast.Type [required] | ^ 65 | sym &ast.TypeSymbol [required] 66 | // unaliased is `typ` once aliased have been resolved vlib/v/gen/c/utils.v:65:22: notice: `[attr]` has been deprecated, use `@[attr]` instead 63 | // typ is the original type 64 | typ ast.Type [required] 65 | sym &ast.TypeSymbol [required] | ^ 66 | // unaliased is `typ` once aliased have been resolved 67 | // it may not contain information such as flags and nr_muls vlib/v/gen/c/utils.v:68:32: notice: `[attr]` has been deprecated, use `@[attr]` instead 66 | // unaliased is `typ` once aliased have been resolved 67 | // it may not contain information such as flags and nr_muls 68 | unaliased ast.Type [required] | ^ 69 | unaliased_sym &ast.TypeSymbol [required] 70 | } vlib/v/gen/c/utils.v:69:32: notice: `[attr]` has been deprecated, use `@[attr]` instead 67 | // it may not contain information such as flags and nr_muls 68 | unaliased ast.Type [required] 69 | unaliased_sym &ast.TypeSymbol [required] | ^ 70 | } 71 | vlib/v/gen/c/utils.v:128:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 126 | } 127 | 128 | [inline] | ^ 129 | fn (mut g Gen) dot_or_ptr(val_type ast.Type) string { 130 | return if val_type.has_flag(.shared_f) { vlib/sync/channels.c.v:34:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 32 | } 33 | 34 | [typedef] | ^ 35 | pub struct C.atomic_uintptr_t {} 36 | vlib/sync/channels.c.v:160:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 158 | } 159 | 160 | [inline] | ^ 161 | pub fn (mut ch Channel) len() int { 162 | return int(C.atomic_load_u32(&ch.read_avail)) vlib/sync/channels.c.v:165:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 163 | } 164 | 165 | [inline] | ^ 166 | pub fn (mut ch Channel) closed() bool { 167 | return C.atomic_load_u16(&ch.closed) != 0 vlib/sync/channels.c.v:170:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 168 | } 169 | 170 | [inline] | ^ 171 | pub fn (mut ch Channel) push(src voidptr) { 172 | if ch.try_push_priv(src, false) == .closed { vlib/sync/channels.c.v:177:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 175 | } 176 | 177 | [inline] | ^ 178 | pub fn (mut ch Channel) try_push(src voidptr) ChanState { 179 | return ch.try_push_priv(src, true) vlib/sync/channels.c.v:363:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 361 | } 362 | 363 | [inline] | ^ 364 | pub fn (mut ch Channel) pop(dest voidptr) bool { 365 | return ch.try_pop_priv(dest, false) == .success vlib/sync/channels.c.v:368:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 366 | } 367 | 368 | [inline] | ^ 369 | pub fn (mut ch Channel) try_pop(dest voidptr) ChanState { 370 | return ch.try_pop_priv(dest, true) vlib/sync/sync.c.v:3:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1 | module sync 2 | 3 | [noreturn] | ^ 4 | fn cpanic(res int) { 5 | panic(unsafe { tos_clone(&u8(C.strerror(res))) }) vlib/sync/sync.c.v:8:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 6 | } 7 | 8 | [noreturn] | ^ 9 | fn cpanic_errno() { 10 | cpanic(C.errno) vlib/sync/waitgroup.c.v:6:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4 | module sync 5 | 6 | [trusted] | ^ 7 | fn C.atomic_fetch_add_u32(voidptr, u32) u32 8 | vlib/sync/waitgroup.c.v:9:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 7 | fn C.atomic_fetch_add_u32(voidptr, u32) u32 8 | 9 | [trusted] | ^ 10 | fn C.atomic_load_u32(voidptr) u32 11 | vlib/sync/waitgroup.c.v:12:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 10 | fn C.atomic_load_u32(voidptr) u32 11 | 12 | [trusted] | ^ 13 | fn C.atomic_compare_exchange_weak_u32(voidptr, voidptr, u32) bool 14 | vlib/sync/waitgroup.c.v:27:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 25 | // 26 | // [init_with=new_waitgroup] // TODO: implement support for init_with struct attribute, and disallow WaitGroup{} from outside the sync.new_waitgroup() function. 27 | [heap] | ^ 28 | pub struct WaitGroup { 29 | mut: vlib/sync/sync_default.c.v:16:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 14 | #include 15 | 16 | [trusted] | ^ 17 | fn C.pthread_mutex_init(voidptr, voidptr) int 18 | fn C.pthread_mutex_lock(voidptr) int vlib/sync/sync_default.c.v:37:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 35 | fn C.sem_destroy(voidptr) int 36 | 37 | [typedef] | ^ 38 | pub struct C.pthread_mutex_t {} 39 | vlib/sync/sync_default.c.v:40:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 38 | pub struct C.pthread_mutex_t {} 39 | 40 | [typedef] | ^ 41 | pub struct C.pthread_rwlock_t {} 42 | vlib/sync/sync_default.c.v:43:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 41 | pub struct C.pthread_rwlock_t {} 42 | 43 | [typedef] | ^ 44 | pub struct C.pthread_rwlockattr_t {} 45 | vlib/sync/sync_default.c.v:46:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 44 | pub struct C.pthread_rwlockattr_t {} 45 | 46 | [typedef] | ^ 47 | pub struct C.sem_t {} 48 | vlib/sync/sync_default.c.v:50:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 48 | 49 | // [init_with=new_mutex] // TODO: implement support for this struct attribute, and disallow Mutex{} from outside the sync.new_mutex() function. 50 | [heap] | ^ 51 | pub struct Mutex { 52 | mutex C.pthread_mutex_t vlib/sync/sync_default.c.v:55:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 53 | } 54 | 55 | [heap] | ^ 56 | pub struct RwMutex { 57 | mutex C.pthread_rwlock_t vlib/sync/sync_default.c.v:64:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 62 | } 63 | 64 | [heap] | ^ 65 | pub struct Semaphore { 66 | sem C.sem_t vlib/sync/sync_default.c.v:78:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 76 | // init initialises the mutex. It should be called once before the mutex is used, 77 | // since it creates the associated resources needed for the mutex to work properly. 78 | [inline] | ^ 79 | pub fn (mut m Mutex) init() { 80 | C.pthread_mutex_init(&m.mutex, C.NULL) vlib/sync/sync_default.c.v:104:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 102 | // @lock locks the mutex instance (`lock` is a keyword). 103 | // If the mutex was already locked, it will block, till it is unlocked. 104 | [inline] | ^ 105 | pub fn (mut m Mutex) @lock() { 106 | C.pthread_mutex_lock(&m.mutex) vlib/sync/sync_default.c.v:111:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 109 | // unlock unlocks the mutex instance. The mutex is released, and one of 110 | // the other threads, that were blocked, because they called @lock can continue. 111 | [inline] | ^ 112 | pub fn (mut m Mutex) unlock() { 113 | C.pthread_mutex_unlock(&m.mutex) vlib/sync/sync_default.c.v:131:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 129 | // Note: there may be several threads that are waiting for the same lock. 130 | // Note: RwMutex has separate read and write locks. 131 | [inline] | ^ 132 | pub fn (mut m RwMutex) @rlock() { 133 | C.pthread_rwlock_rdlock(&m.mutex) vlib/sync/sync_default.c.v:142:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 140 | // Note: there may be several threads that are waiting for the same lock. 141 | // Note: RwMutex has separate read and write locks. 142 | [inline] | ^ 143 | pub fn (mut m RwMutex) @lock() { 144 | C.pthread_rwlock_wrlock(&m.mutex) vlib/sync/sync_default.c.v:161:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 159 | // unlocking here as well, even though that they do the same 160 | // on !windows platforms. 161 | [inline] | ^ 162 | pub fn (mut m RwMutex) runlock() { 163 | C.pthread_rwlock_unlock(&m.mutex) vlib/sync/sync_default.c.v:171:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 169 | // unlocking here as well, even though that they do the same 170 | // on !windows platforms. 171 | [inline] | ^ 172 | pub fn (mut m RwMutex) unlock() { 173 | C.pthread_rwlock_unlock(&m.mutex) vlib/sync/sync_default.c.v:178:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 176 | // new_semaphore creates a new initialised Semaphore instance on the heap, and returns a pointer to it. 177 | // The initial counter value of the semaphore is 0. 178 | [inline] | ^ 179 | pub fn new_semaphore() &Semaphore { 180 | return new_semaphore_init(0) vlib/sync/sync_default.c.v:194:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 192 | // It should be called once before the semaphore is used, since it creates the associated 193 | // resources needed for the semaphore to work properly. 194 | [inline] | ^ 195 | pub fn (mut sem Semaphore) init(n u32) { 196 | C.sem_init(&sem.sem, 0, n) vlib/sync/sync_default.c.v:203:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 201 | // on the semaphore, the waiting thread will decrement the counter by 1 202 | // (locking the semaphore), and then will continue running. See also .wait() . 203 | [inline] | ^ 204 | pub fn (mut sem Semaphore) post() { 205 | C.sem_post(&sem.sem) vlib/sync/pool/pool.v:6:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 4 | import runtime 5 | 6 | [trusted] | ^ 7 | fn C.atomic_fetch_add_u32(voidptr, u32) u32 8 | vlib/rand/config/config.v:13:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 11 | // uses a different number of u32s, use the `seed.time_seed_array()` method with the correct 12 | // number of u32s. 13 | [params] | ^ 14 | pub struct PRNGConfigStruct { 15 | pub: vlib/rand/config/config.v:21:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 19 | // Configuration struct for generating normally distributed floats. The default value for 20 | // `mu` is 0 and the default value for `sigma` is 1. 21 | [params] | ^ 22 | pub struct NormalConfigStruct { 23 | pub: vlib/rand/config/config.v:31:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 29 | // The start index is inclusive and the end index is exclusive. 30 | // Set the end to 0 to shuffle until the end of the array. 31 | [params] | ^ 32 | pub struct ShuffleConfigStruct { 33 | pub: vlib/rand/wyrand/wyrand.v:39:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 37 | 38 | // byte returns a uniformly distributed pseudorandom 8-bit unsigned positive `byte`. 39 | [inline] | ^ 40 | pub fn (mut rng WyRandRNG) u8() u8 { 41 | // Can we extract a value from the buffer? vlib/rand/wyrand/wyrand.v:57:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 55 | 56 | // u16 returns a pseudorandom 16bit int in range `[0, 2¹⁶)`. 57 | [inline] | ^ 58 | pub fn (mut rng WyRandRNG) u16() u16 { 59 | if rng.bytes_left >= 2 { vlib/rand/wyrand/wyrand.v:72:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 70 | 71 | // u32 returns a pseudorandom 32bit int in range `[0, 2³²)`. 72 | [inline] | ^ 73 | pub fn (mut rng WyRandRNG) u32() u32 { 74 | if rng.bytes_left >= 4 { vlib/rand/wyrand/wyrand.v:87:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 85 | 86 | // u64 returns a pseudorandom 64bit int in range `[0, 2⁶⁴)`. 87 | [inline] | ^ 88 | pub fn (mut rng WyRandRNG) u64() u64 { 89 | unsafe { vlib/rand/wyrand/wyrand.v:99:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 97 | 98 | // block_size returns the number of bits that the RNG can produce in a single iteration. 99 | [inline] | ^ 100 | pub fn (mut rng WyRandRNG) block_size() int { 101 | return 64 vlib/rand/wyrand/z_wyrand.c.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | 3 | // free should be called when the generator is no longer needed 4 | [unsafe] | ^ 5 | pub fn (mut rng WyRandRNG) free() { 6 | unsafe { free(rng) } vlib/hash/fnv1a/fnv1a.v:14:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 12 | 13 | // sum32 returns a fnv1a hash of the string, described by `data` 14 | [direct_array_access; inline] | ^ 15 | pub fn sum32_string(data string) u32 { 16 | mut hash := fnv1a.fnv32_offset_basis vlib/hash/fnv1a/fnv1a.v:25:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 23 | // sum32 returns a fnv1a hash of the memory block, described by the dynamic 24 | // byte array `data`. 25 | [direct_array_access; inline] | ^ 26 | pub fn sum32(data []u8) u32 { 27 | mut hash := fnv1a.fnv32_offset_basis vlib/hash/fnv1a/fnv1a.v:35:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 33 | 34 | // sum32_bytes returns a fnv1a hash of the struct `s`. 35 | [direct_array_access; inline] | ^ 36 | pub fn sum32_struct[T](s &T) u32 { 37 | bp := unsafe { &u8(s) } vlib/hash/fnv1a/fnv1a.v:48:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 46 | // sum32_bytes returns a fnv1a hash of `data_len` bytes starting at 47 | // the address in the given &byte pointer `data`. 48 | [direct_array_access; inline; unsafe] | ^ 49 | pub fn sum32_bytes(data &u8, data_len int) u32 { 50 | mut hash := fnv1a.fnv32_offset_basis vlib/hash/fnv1a/fnv1a.v:58:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 56 | 57 | // sum64 returns a fnv1a hash of the string, described by `data` 58 | [direct_array_access; inline] | ^ 59 | pub fn sum64_string(data string) u64 { 60 | mut hash := fnv1a.fnv64_offset_basis vlib/hash/fnv1a/fnv1a.v:69:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 67 | // sum64 returns a fnv1a hash of the memory block, described by the dynamic 68 | // byte array `data`. 69 | [direct_array_access; inline] | ^ 70 | pub fn sum64(data []u8) u64 { 71 | mut hash := fnv1a.fnv64_offset_basis vlib/hash/fnv1a/fnv1a.v:80:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 78 | // sum64_bytes returns a fnv1a hash of `data_len` bytes starting at 79 | // the address in the given &byte pointer `data`. 80 | [direct_array_access; inline; unsafe] | ^ 81 | pub fn sum64_bytes(data &u8, data_len int) u64 { 82 | mut hash := fnv1a.fnv64_offset_basis vlib/hash/fnv1a/fnv1a.v:90:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 88 | 89 | // sum64_bytes returns a fnv1a hash of the struct `s`. 90 | [direct_array_access; inline] | ^ 91 | pub fn sum64_struct[T](s &T) u64 { 92 | bp := unsafe { &u8(s) } vlib/v/vet/vet.v:26:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 24 | } 25 | 26 | [minify] | ^ 27 | pub struct Error { 28 | pub mut: vlib/v/vet/vet.v:29:17: notice: `[attr]` has been deprecated, use `@[attr]` instead 27 | pub struct Error { 28 | pub mut: 29 | kind ErrorKind [required] | ^ 30 | pub: 31 | // General message vlib/v/vet/vet.v:32:22: notice: `[attr]` has been deprecated, use `@[attr]` instead 30 | pub: 31 | // General message 32 | message string [required] | ^ 33 | details string // Details about how to resolve or fix the situation 34 | file_path string // file where the error have origin vlib/v/vet/vet.v:36:22: notice: `[attr]` has been deprecated, use `@[attr]` instead 34 | file_path string // file where the error have origin 35 | pos token.Pos // position in the file 36 | fix FixKind [required] | ^ 37 | typ ErrorType [required] 38 | } vlib/v/vet/vet.v:37:22: notice: `[attr]` has been deprecated, use `@[attr]` instead 35 | pos token.Pos // position in the file 36 | fix FixKind [required] 37 | typ ErrorType [required] | ^ 38 | } vlib/v/scanner/scanner.v:26:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 24 | ) 25 | 26 | [minify] | ^ 27 | pub struct Scanner { 28 | pub mut: vlib/v/scanner/scanner.v:160:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 158 | } 159 | 160 | [unsafe] | ^ 161 | pub fn (mut s Scanner) free() { 162 | unsafe { vlib/v/scanner/scanner.v:171:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 169 | } 170 | 171 | [inline] | ^ 172 | fn (s &Scanner) should_parse_comment() bool { 173 | return s.comments_mode == .parse_comments vlib/v/scanner/scanner.v:188:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 186 | } 187 | 188 | [inline] | ^ 189 | fn (mut s Scanner) new_token(tok_kind token.Kind, lit string, len int) token.Token { 190 | cidx := s.tidx vlib/v/scanner/scanner.v:208:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 206 | } 207 | 208 | [inline] | ^ 209 | fn (s &Scanner) new_eof_token() token.Token { 210 | return token.Token{ vlib/v/scanner/scanner.v:221:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 219 | } 220 | 221 | [inline] | ^ 222 | fn (mut s Scanner) new_multiline_token(tok_kind token.Kind, lit string, len int, start_line int) token.Token { 223 | cidx := s.tidx vlib/v/scanner/scanner.v:240:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 238 | } 239 | 240 | [direct_array_access; inline] | ^ 241 | fn (mut s Scanner) ident_name() string { 242 | start := s.pos vlib/v/scanner/scanner.v:316:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 314 | } 315 | 316 | [direct_array_access] | ^ 317 | fn (mut s Scanner) ident_hex_number() string { 318 | mut has_wrong_digit := false vlib/v/scanner/scanner.v:400:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 398 | } 399 | 400 | [direct_array_access] | ^ 401 | fn (mut s Scanner) ident_dec_number() string { 402 | mut has_wrong_digit := false vlib/v/scanner/scanner.v:535:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 533 | } 534 | 535 | [direct_array_access; inline] | ^ 536 | fn (mut s Scanner) skip_whitespace() { 537 | for s.pos < s.text.len { vlib/v/scanner/scanner.v:608:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 606 | } 607 | 608 | [direct_array_access] | ^ 609 | pub fn (mut s Scanner) scan() token.Token { 610 | for { vlib/v/scanner/scanner.v:626:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 624 | } 625 | 626 | [direct_array_access; inline] | ^ 627 | pub fn (s &Scanner) peek_token(n int) token.Token { 628 | idx := s.tidx + n vlib/v/scanner/scanner.v:636:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 634 | } 635 | 636 | [direct_array_access; inline] | ^ 637 | fn (s &Scanner) look_ahead(n int) u8 { 638 | if s.pos + n < s.text.len { vlib/v/scanner/scanner.v:645:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 643 | } 644 | 645 | [direct_array_access] | ^ 646 | fn (mut s Scanner) text_scan() token.Token { 647 | // The for loop here is so that instead of doing vlib/v/scanner/scanner.v:1176:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1174 | } 1175 | 1176 | [direct_array_access] | ^ 1177 | fn (mut s Scanner) ident_string() string { 1178 | // determines if it is a nested string vlib/v/scanner/scanner.v:1450:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1448 | } 1449 | 1450 | [inline] | ^ 1451 | fn is_escape_sequence(c u8) bool { 1452 | return c in [`x`, `u`, `e`, `n`, `r`, `t`, `v`, `a`, `f`, `b`, `\\`, `\``, `$`, `@`, `?`, `{`, vlib/v/scanner/scanner.v:1566:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1564 | } 1565 | 1566 | [direct_array_access; inline] | ^ 1567 | fn (s &Scanner) expect(want string, start_pos int) bool { 1568 | end_pos := start_pos + want.len vlib/v/scanner/scanner.v:1580:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1578 | } 1579 | 1580 | [inline] | ^ 1581 | fn (mut s Scanner) ignore_line() { 1582 | s.eat_to_end_of_line() vlib/v/scanner/scanner.v:1586:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1584 | } 1585 | 1586 | [direct_array_access; inline] | ^ 1587 | fn (mut s Scanner) eat_to_end_of_line() { 1588 | for s.pos < s.text.len && s.text[s.pos] != scanner.b_lf { vlib/v/scanner/scanner.v:1593:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 1591 | } 1592 | 1593 | [inline] | ^ 1594 | fn (mut s Scanner) inc_line_number() { 1595 | s.last_nl_pos = s.text.len - 1 vlib/rand/seed/seed.v:9:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 7 | 8 | // nr_next returns a next value based on the previous value `prev`. 9 | [inline] | ^ 10 | fn nr_next(prev u32) u32 { 11 | return prev * 1664525 + 1013904223 vlib/rand/seed/seed.v:27:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 25 | 26 | // time_seed_32 returns a 32-bit seed generated from system time. 27 | [manualfree] | ^ 28 | pub fn time_seed_32() u32 { 29 | sa := time_seed_array(1) vlib/rand/seed/seed.v:36:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 34 | 35 | // time_seed_64 returns a 64-bit seed generated from system time. 36 | [manualfree] | ^ 37 | pub fn time_seed_64() u64 { 38 | seed_data := time_seed_array(2) vlib/flag/flag.v:43:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 41 | // and are marked with [manualfree]. After you call .free() on 42 | // a Flag instance, you should NOT use that instance any more. 43 | [unsafe] | ^ 44 | fn (mut f Flag) free() { 45 | unsafe { vlib/flag/flag.v:105:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 103 | // in programs, compiled with `-autofree`. Note: you should NOT use the 104 | // instance over which you have called .free() for anything after the call. 105 | [unsafe] | ^ 106 | fn (mut f FlagParser) free() { 107 | unsafe { vlib/flag/flag.v:221:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 219 | // - the name, usage are registered 220 | // - found arguments and corresponding values are removed from args list 221 | [manualfree] | ^ 222 | fn (mut fs FlagParser) parse_value(longhand string, shorthand u8) []string { 223 | full := '--${longhand}' vlib/semver/compare.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | 3 | // * Private functions. 4 | [inline] | ^ 5 | fn version_satisfies(ver Version, input string) bool { 6 | range := parse_range(input) or { return false } vlib/semver/util.v:4:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 2 | 3 | // * Private functions. 4 | [inline] | ^ 5 | fn is_version_valid(input string) bool { 6 | raw_ver := parse(input) vlib/semver/util.v:10:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 8 | } 9 | 10 | [inline] | ^ 11 | fn coerce_version(input string) !Version { 12 | raw_ver := parse(input) vlib/semver/util.v:16:1: notice: `[attr]` has been deprecated, use `@[attr]` instead 14 | } 15 | 16 | [inline] | ^ 17 | fn increment_version(ver Version, typ Increment) Version { 18 | mut major := ver.major vlib/builtin/map.v:102:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 100 | len: 0 101 | deletes: 0 102 | all_deleted: 0 | ~~~~~~~~~~~~~~ 103 | keys: unsafe { malloc(__at_least_one(u64(cap) * u64(key_bytes))) } 104 | values: unsafe { malloc(__at_least_one(u64(cap) * u64(value_bytes))) } vlib/builtin/map.v:682:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 680 | len: d.len 681 | deletes: d.deletes 682 | all_deleted: 0 | ~~~~~~~~~~~~~~ 683 | values: 0 684 | keys: 0 vlib/builtin/map.v:683:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 681 | deletes: d.deletes 682 | all_deleted: 0 683 | values: 0 | ~~~~~~~~~ 684 | keys: 0 685 | } vlib/builtin/map.v:684:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 682 | all_deleted: 0 683 | values: 0 684 | keys: 0 | ~~~~~~~ 685 | } 686 | unsafe { vlib/sync/channels.c.v:85:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 83 | ringbuf: rbuf 84 | statusbuf: sbuf 85 | write_subscriber: 0 | ~~~~~~~~~~~~~~~~~~~ 86 | read_subscriber: 0 87 | } vlib/sync/channels.c.v:86:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 84 | statusbuf: sbuf 85 | write_subscriber: 0 86 | read_subscriber: 0 | ~~~~~~~~~~~~~~~~~~ 87 | } 88 | ch.writesem.init(wsem) vlib/v/ast/table.v:99:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 97 | mut t := &Table{ 98 | global_scope: &Scope{ 99 | parent: 0 | ~~~~~~~~~ 100 | } 101 | cur_fn: 0 vlib/v/ast/table.v:101:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 99 | parent: 0 100 | } 101 | cur_fn: 0 | ~~~~~~~~~ 102 | } 103 | t.register_builtin_type_symbols() vlib/v/gen/c/assign.v:218:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 216 | mut blank_assign := false 217 | mut ident := ast.Ident{ 218 | scope: 0 | ~~~~~~~~ 219 | } 220 | left_sym := g.table.sym(g.unwrap_generic(var_type)) vlib/v/gen/c/assign.v:784:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 782 | mut is_auto_heap := false 783 | mut ident := ast.Ident{ 784 | scope: 0 | ~~~~~~~~ 785 | } 786 | if lx is ast.Ident { vlib/v/gen/c/cgen.v:282:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 280 | mut reflection_strings := map[string]int{} 281 | mut global_g := Gen{ 282 | file: 0 | ~~~~~~~ 283 | out: strings.new_builder(512000) 284 | cheaders: strings.new_builder(15000) vlib/v/gen/c/cgen.v:311:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 309 | table: table 310 | pref: pref_ 311 | fn_decl: 0 | ~~~~~~~~~~ 312 | is_autofree: pref_.autofree 313 | indent: -1 vlib/v/gen/c/cgen.v:665:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 663 | table: global_g.table 664 | pref: global_g.pref 665 | fn_decl: 0 | ~~~~~~~~~~ 666 | indent: -1 667 | module_built: global_g.module_built vlib/v/gen/c/cgen.v:3997:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 3995 | defer { 3996 | g.cur_lock = ast.LockExpr{ 3997 | scope: 0 | ~~~~~~~~ 3998 | } 3999 | } vlib/v/gen/c/orm.v:1028:6: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 1026 | expr_type: (right_where_expr.info as ast.IdentVar).typ 1027 | typ: (right_where_expr.info as ast.IdentVar).typ 1028 | scope: 0 | ~~~~~~~~ 1029 | } 1030 | mut sql_expr_select_array := ast.SqlExpr{ vlib/v/checker/checker.v:2022:8: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 2020 | if id.comptime && id.name in ast.valid_comptime_not_user_defined { 2021 | node.defer_vars[i] = ast.Ident{ 2022 | scope: 0 | ~~~~~~~~ 2023 | name: '' 2024 | } vlib/v/parser/comptime.v:96:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 94 | fn (mut p Parser) comptime_call() ast.ComptimeCall { 95 | err_node := ast.ComptimeCall{ 96 | scope: 0 | ~~~~~~~~ 97 | } 98 | start_pos := p.tok.pos() vlib/v/parser/comptime.v:124:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 122 | p.check(.rpar) 123 | return ast.ComptimeCall{ 124 | scope: 0 | ~~~~~~~~ 125 | method_name: method_name 126 | args_var: s vlib/v/parser/comptime.v:143:5: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 141 | if has_args { 142 | return ast.ComptimeCall{ 143 | scope: 0 | ~~~~~~~~ 144 | method_name: method_name 145 | args_var: type_index vlib/v/parser/comptime.v:150:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 148 | } 149 | return ast.ComptimeCall{ 150 | scope: 0 | ~~~~~~~~ 151 | method_name: method_name 152 | pos: start_pos.extend(p.prev_tok.pos()) vlib/v/parser/comptime.v:191:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 189 | } 190 | return ast.ComptimeCall{ 191 | scope: 0 | ~~~~~~~~ 192 | is_embed: true 193 | embed_file: ast.EmbeddedFile{ vlib/v/parser/comptime.v:227:6: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 225 | if p.pref.is_fmt { 226 | return ast.ComptimeCall{ 227 | scope: 0 | ~~~~~~~~ 228 | is_vweb: true 229 | method_name: method_name vlib/v/parser/comptime.v:268:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 266 | file.path = tmpl_path 267 | return ast.ComptimeCall{ 268 | scope: 0 | ~~~~~~~~ 269 | is_vweb: true 270 | vweb_tmpl: file vlib/v/parser/fn.v:292:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 290 | is_method = true 291 | p.fn_receiver(mut params, mut rec) or { return ast.FnDecl{ 292 | scope: 0 | ~~~~~~~~ 293 | } } 294 | vlib/v/parser/fn.v:324:5: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 322 | name_pos) 323 | return ast.FnDecl{ 324 | scope: 0 | ~~~~~~~~ 325 | } 326 | } vlib/v/parser/fn.v:339:6: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 337 | p.error_with_pos('duplicate method `${name}`', name_pos) 338 | return ast.FnDecl{ 339 | scope: 0 | ~~~~~~~~ 340 | } 341 | } vlib/v/parser/fn.v:347:6: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 345 | p.error_with_pos('cannot redefine imported function `${name}`', name_pos) 346 | return ast.FnDecl{ 347 | scope: 0 | ~~~~~~~~ 348 | } 349 | } vlib/v/parser/fn.v:377:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 375 | p.error_with_pos('expecting method name', p.tok.pos()) 376 | return ast.FnDecl{ 377 | scope: 0 | ~~~~~~~~ 378 | } 379 | } vlib/v/parser/fn.v:406:6: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 404 | p.error_with_pos('redefinition of parameter `${param.name}`', param.pos) 405 | return ast.FnDecl{ 406 | scope: 0 | ~~~~~~~~ 407 | } 408 | } vlib/v/parser/fn.v:482:5: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 480 | rec.type_pos) 481 | return ast.FnDecl{ 482 | scope: 0 | ~~~~~~~~ 483 | } 484 | } vlib/v/parser/fn.v:584:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 582 | p.error_with_pos('functions with type only params can not have bodies', body_start_pos) 583 | return ast.FnDecl{ 584 | scope: 0 | ~~~~~~~~ 585 | } 586 | } vlib/v/parser/parser.v:265:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 263 | } 264 | global_scope := &ast.Scope{ 265 | parent: 0 | ~~~~~~~~~ 266 | } 267 | mut p := Parser{ vlib/v/parser/parser.v:1197:3: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 1195 | p.check(.lcbr) 1196 | p.scope = &ast.Scope{ 1197 | parent: 0 // you shouldn't be able to reference other variables in assembly blocks | ~~~~~~~~~ 1198 | detached_from_parent: true 1199 | start_pos: p.tok.pos vlib/v/parser/parser.v:4298:4: notice: assigning `0` to a reference field is only allowed in `unsafe` blocks 4296 | p.error('unknown variable `${var_name}`') 4297 | return ast.Assoc{ 4298 | scope: 0 | ~~~~~~~~ 4299 | } 4300 | } ./v2 -o v cmd/v rm -rf v1 v2 V has been successfully built ./v run ./cmd/tools/detect_tcc.v Note: `tcc` was not used, so unless you install it yourself, your backend C compiler will be `cc`, which is usually either `clang`, `gcc` or `msvc`. These C compilers, are several times slower at compiling C source code, compared to `tcc`. They do produce more optimised executables, but that is done at the cost of compilation speed. =========================================================================== =================================================== ===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0 =========================================================================== =================================================== ===== env: NO_DEPENDS=yes USER=root UID=0 GID=0 ===> Staging for v-0.4.3 ===> Generating temporary packing list /bin/mkdir -p /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/v install -s -m 555 /wrkdirs/usr/ports/lang/v/work/v-0.4.3/v /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/v install -m 0644 /wrkdirs/usr/ports/lang/v/work/v-0.4.3/v.mod /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/v install -l rs /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/v/v /wrkdirs/usr/ports/lang/v/work/stage/usr/local/bin/v cd /wrkdirs/usr/ports/lang/v/work/v-0.4.3 && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) && /usr/bin/find -Ed $1 $3 \( -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} + -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE cmd /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/v cd /wrkdirs/usr/ports/lang/v/work/v-0.4.3 && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) && /usr/bin/find -Ed $1 $3 \( -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} + -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE thirdparty /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/v cd /wrkdirs/usr/ports/lang/v/work/v-0.4.3 && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) && /usr/bin/find -Ed $1 $3 \( -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} + -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE vlib /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/v /bin/mkdir -p /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/doc/v install -m 0644 /wrkdirs/usr/ports/lang/v/work/v-0.4.3/*.md /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/doc/v cd /wrkdirs/usr/ports/lang/v/work/v-0.4.3/doc && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) && /usr/bin/find -Ed $1 $3 \( -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} + -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE . /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/doc/v /bin/mkdir -p /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/examples/v cd /wrkdirs/usr/ports/lang/v/work/v-0.4.3/examples && /bin/sh -c '(/usr/bin/find -Ed $1 $3 | /usr/bin/cpio -dumpl $2 >/dev/null 2>&1) && /usr/bin/find -Ed $1 $3 \( -type d -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 755 "$@"'\'' . {} + -o -type f -exec /bin/sh -c '\''cd '\''$2'\'' && chmod 0644 "$@"'\'' . {} + \)' COPYTREE_SHARE . /wrkdirs/usr/ports/lang/v/work/stage/usr/local/share/examples/v ====> Compressing man pages (compress-man) =========================================================================== =================================================== ===== env: 'PKG_NOTES=build_timestamp ports_top_git_hash ports_top_checkout_unclean port_git_hash port_checkout_unclean built_by' 'PKG_NOTE_build_timestamp=2024-04-04T20:59:04+0000' 'PKG_NOTE_ports_top_git_hash=c2c35d895e' 'PKG_NOTE_ports_top_checkout_unclean=yes' 'PKG_NOTE_port_git_hash=bdff10f8d7' 'PKG_NOTE_port_checkout_unclean=no' 'PKG_NOTE_built_by=poudriere-git-3.4.99.20240122_1' NO_DEPENDS=yes USER=root UID=0 GID=0 ===> Building packages for v-0.4.3 ===> Building v-0.4.3 =========================================================================== =>> Cleaning up wrkdir ===> Cleaning for v-0.4.3 build of lang/v | v-0.4.3 ended at Thu Apr 4 22:12:19 BST 2024 build time: 00:13:18