1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

54 Commits

Author SHA1 Message Date
Subhomoy Haldar
8759409a69
math.big: fix min i32 value bug (#17775)
* attempt big int min value fix

* cast value for correct comparison

* update edge case

* add one more test
2023-03-26 08:45:42 +03:00
Felipe Pena
6a179a2926
checker: add int signedness mismatch checking for function call arguments (#16750) 2022-12-24 06:28:35 +02:00
Delyan Angelov
952f4644c5
math.big: remove import math dependency (math.big only uses min/max/abs) 2022-11-29 14:42:46 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
yuyi
51f4d99399
all: change optional to result in most of the libraries (#16123) 2022-10-20 22:14:33 +03:00
yuyi
c662431cfd
checker: check unsafe array assign (fix #9651) (#15515) 2022-08-25 08:52:13 +03:00
Subhomoy Haldar
297cb5f89c
math.big: improve multiplication performance (#15200) 2022-07-24 19:35:37 +03:00
Delyan Angelov
ed17779434
math.big: fix Integer.bit_len() when there are no digits in the number 2022-05-18 08:29:08 +03:00
Delyan Angelov
ed12a5c84c
math.big: reduce memory usage of Integer.str() (free intermediary Integers), optimise some operations using [direct_array_access] (#14353) 2022-05-13 08:21:34 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
Alexander Medvednikov
fb192d949b all: replace []byte with []u8 2022-04-15 15:35:35 +03:00
Alexander Medvednikov
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
Delyan Angelov
716cb17aea
math.big: wrap all asserts in module code (not in tests) in $if debug {} (#14012) 2022-04-12 09:38:53 +03:00
Subhomoy Haldar
7ef7188f4b
math.big: add bit_len, optimize gcd, add documentation (#13872) 2022-03-30 15:52:09 +03:00
Subhomoy Haldar
114a341f5f
rand: simplify rand.PRNG, move to optional types for error handling (#13570) 2022-02-23 12:36:14 +02:00
Subhomoy Haldar
072480352c
math.big: add get_bit, set_bit, big_mod_pow (#13507) 2022-02-18 11:53:39 +03:00
Delyan Angelov
59357e873d
math: move the math.mathutil generic min/max/abs fns to math (#13042) 2022-01-05 18:02:20 +02:00
Andreas Schoeller
f14dabc6bd
math.big: add a new greatest-common-divisor-algo for big.Integer, also add a benchmark for it (#12261) 2021-10-26 11:10:13 +03:00
Vincent Laisney
273154c1ae
math.big: add Newton and Karatsuba algorithms (#11487) 2021-09-16 19:31:07 +03:00
Daniel Däschle
b63ec8fbcf
checker: require params attribute to use struct as keyword arguments in function (#11135) 2021-09-14 00:05:30 +03:00
Vincent Laisney
c8d4a64512
math.big: fix subtract_digit_array (#11451) 2021-09-09 14:56:20 +03:00
Subhomoy Haldar
96d4a0777f
math.big: fix comparison and add tests (#11449) 2021-09-08 20:30:20 +03:00
Vincent Laisney
43fae5de74
bigint: division (#11386) 2021-09-08 14:16:35 +03:00
Subhomoy Haldar
dadfda9400
math.big: implement big.integer in V (#11352) 2021-08-31 19:21:00 +03:00
playX
2f6b2dd189
js: math.big support, f{32,64}_bits,from_bits support, typeof(expr).name support (#11260) 2021-08-21 17:18:57 +03:00
Miccah
19abe8c750
math.big: add from_bytes function (#11213) 2021-08-17 09:12:39 +03:00
blackshirt
1eac351f25
math.big: change the return value of divmod to (quotient, remainder) (#10993) 2021-07-30 02:28:32 +03:00
Uwe Krüger
f457b94fe4
cgen: properly support reference args in receivers and arithmetic op methods (#10873) 2021-07-20 15:08:32 +03:00
Delyan Angelov
eed4f50d8c
ci: fix sanitize failures with math.big 2021-07-19 20:51:41 +03:00
Delyan Angelov
732d8101e0
math.big: add .bytes() and .bytes_trimmed() methods, big.from_int(1024).bytes_trimmed() == [byte(0x00), 0x04] 2021-07-19 17:17:08 +03:00
Delyan Angelov
d4f31412b7
v: deprecate @VROOT in favour of @VMODROOT (#9795) 2021-04-19 19:01:47 +03:00
Delyan Angelov
3e297bced4
ci: remove some tests from skip_with_werror in v test-self 2021-04-14 12:47:24 +03:00
Delyan Angelov
c0e2b9b1e2
ci: fix some of v test-cleancode 2 2021-04-05 20:55:03 +03:00
Nick Treleaven
c03798e390
checker: disallow implicit conversion from fixed array to fooptr (#8823) 2021-02-26 00:28:47 +01:00
zakuro
ac4791045f
time: consolidate the different sleep functions into time.wait(Duration) (#8853) 2021-02-21 17:05:03 +02:00
Lukas Neubert
d660f2cc6f
fmt: insert newline after last HashStmt (#8482) 2021-02-01 14:50:41 +01:00
Delyan Angelov
728344ff65
ci: fix v test-cleancode 2021-01-25 12:55:01 +02:00
Lukas Neubert
8b61891348
fmt: smarter if condition wrapping (#8201) 2021-01-23 10:33:22 +02:00
Swastik Baranwal
334b66b311
checker/cgen: add checks and fix cgen for [typedef] for C structs (#8169) 2021-01-17 17:18:07 +02:00
Swastik Baranwal
0ca36aafe2
cgen: allow assignment operators for type aliases (#8086) 2021-01-15 02:27:19 +01:00
joe-conigliaro
5f90192970
math: use full import module name in tests 2020-12-23 01:38:17 +11:00
Delyan Angelov
93c0f503a2 math.big: make big.from_string take a decimal, add big.from_hex_string 2020-12-22 09:45:56 +02:00
Alexander Medvednikov
939e10cb28 math.big: minor clean up 2020-12-22 08:27:50 +01:00
Alexander Medvednikov
b3e0926601 json: decode/encode time.Time 2020-12-22 07:24:44 +01:00
LilEnvy
665e6cc957
math.big: fix big.from_string #7313 (#7351) 2020-12-16 02:23:02 +01:00
LilEnvy
069d77d1c5
math.big: implement decimal .str() for big numbers (#7314) 2020-12-14 11:53:18 +02:00
Delyan Angelov
5526954fdc vdoc: cleanup warnings on ./v doc -s vlib 2020-08-28 09:03:22 +03:00
Uwe Krüger
2635be511f
all: re-apply C++ support 2020-05-18 21:38:06 +02:00
Alexander Medvednikov
07a78b2843 Revert "all: C++ compiler support"
This reverts commit 9a237c3e82.
2020-05-18 17:05:48 +02:00
Uwe Krüger
9a237c3e82
all: C++ compiler support 2020-05-18 15:51:36 +02:00