Björn Lindqvist
b90e52b527
VM: GC_BIGNUM must be called in the same scope as the variable declaration
2014-09-17 12:13:05 -07:00
Doug Coleman
2834bc90f8
bignum.cpp: Fix regression in bignum conversion. Fixes #1072 .
2014-06-16 20:52:51 -07:00
Björn Lindqvist
8ac3b80173
VM: rename all variables named "bignum" in bignum.cpp to "bn"
...
The name can cause compiler errors because it's the same as the type
name. It only matters in some functions, but I like consistency so I
renamed it everywhere.
2014-06-12 13:50:10 -07:00
Björn Lindqvist
75129d34ad
VM: refactor bignum.cpp so that GC_BIGNUM is never called on a NULL
...
pointer
The purpose of this fix is to ensure that no NULL checks are needed when
traversing the bignum_roots vector.
2014-06-12 13:50:10 -07:00
John Benediktsson
f0e878e3fa
Revert "vm: fix bignum_to_fixnum_strict for BIGNUM_ZERO."
...
This reverts commit 0a66016c7db3c8c02af609d7c46411dc05a7b0dd.
2014-06-08 16:32:35 -07:00
John Benediktsson
ad7ee60341
vm: fix bignum_to_fixnum_strict for BIGNUM_ZERO.
2014-06-08 16:05:36 -07:00
Björn Lindqvist
1300a27dca
VM: better version of bignum_to_fixnum_strict that doesn't allocate
2014-06-07 13:09:00 +02:00
Björn Lindqvist
a9a52d9174
VM: bignum_to_fixnum_strict and an accompanying vm error in case the conversion fails
2014-06-07 12:13:59 +02:00
John Benediktsson
6c703bbd6c
vm: adding a fast path for bignum sq.
2014-06-06 10:45:09 -07:00
John Benediktsson
c2c6225955
vm: fix tabs-to-spaces.
2014-06-02 07:24:14 -07:00
John Benediktsson
cf287f4144
vm: faster foo_to_bignum for common case of one bignum digit.
2014-06-02 07:16:43 -07:00
John Benediktsson
0dda4fc812
vm: speed up bignum log2.
2013-12-06 14:40:22 -08:00
Erik Charlebois
ffe41b3d7f
VM: Fixup cast formatting after clang-format
...
clang-format doesn't recognize casts to non-pointer/non-template types
so it winds up adding a space between the right paren and the expression
and then failing to recognize prefix operators in the process
(e.g. foo = (cell) & bar; should be foo = (cell)&bar;). This commit
manually fixes up the major cases (fixnum, cell, all types ending in _t).
2013-05-13 14:59:24 -04:00
Erik Charlebois
88d7c10d03
VM: Replace u8-64, s8-64, cell, fixnum with stdint.h equivalents
2013-05-13 00:28:25 -04:00
Erik Charlebois
a80271c79c
VM: Refactor bignum to Factor style
2013-05-12 13:24:41 -04:00
Erik Charlebois
ca2ea548be
VM: Remove exec bit from VM source files
2013-05-11 17:04:23 -04:00
John Benediktsson
411306c0b8
vm: adding bignum_gcd note.
2013-03-27 14:53:56 -07:00
Doug Coleman
2b33dde782
vm: Add more Allocates memory comments.
2013-03-25 17:52:30 -07:00
Doug Coleman
86649ce1c0
vm: More allocates comments.
2013-03-25 14:05:05 -07:00
Doug Coleman
dbfa185eef
vm: Standardize /* Allocates memory */ comments so you can grep -A1
...
and see if a function allocates for easier debugging of the gc.
A couple of the functions were not yet annotated.
2013-03-25 12:00:18 -07:00
John Benediktsson
afdaff3059
vm: make bignum-bitnot faster.
2012-08-31 15:22:07 -07:00
John Benediktsson
b541986b4e
vm: use tabs instead of spaces in bignum_gcd.
2012-08-22 21:31:27 -07:00
Doug Coleman
000efd9bbb
vm: Add messages about things that can allocate. Fix a gc bug in the primitive for quotation-code.
2012-08-15 21:30:55 -07:00
Doug Coleman
47b4ebc80d
bignum.cpp: Fix calls to reallot_array() -- bignums can get new addresses if they are not in the nursery or are somehow larger. Fix a couple more correctness issues.
2012-08-15 01:51:58 -07:00
John Benediktsson
39c3f10138
bignum: incorporate some fixes from @slavapestov.
2012-08-10 14:28:44 -07:00
John Benediktsson
c4f85efc9d
vm: make sure we zero out the end of the bignums.
2012-08-04 18:02:27 -07:00
John Benediktsson
61a6b5692f
vm: a bit faster not to trim on each iteration...
2012-08-04 09:13:05 -07:00
John Benediktsson
f7bb7c6a32
vm: additional fix in bignum_gcd.
2012-08-03 21:50:48 -07:00
John Benediktsson
37001708cd
vm: some fixes to fast bignum gcd.
2012-08-03 12:13:46 -07:00
John Benediktsson
5c8a2a4057
vm: fix updating size inside bignum_gcd loop.
2012-08-02 17:36:07 -07:00
Doug Coleman
30e34ca616
bignum: Fix bignum_gcd algorithm from overwriting the wrong bignum memory. Add GC_BIGNUM to prevent gc crashes. Fixes #599 .
2012-08-02 17:16:03 -07:00
John Benediktsson
426c449ee1
vm: adding more GC_BIGNUM to WIN64 path. See #599 .
2012-08-02 17:04:22 -07:00
John Benediktsson
5794ab46a0
vm: use euclid gcd on win64 until we find a better way to do the 128-bit math.
2012-04-06 11:42:59 -07:00
John Benediktsson
eb556bfb06
vm: use twodigit type for all variables (fixes 32-bit warning).
2012-04-06 09:36:25 -07:00
John Benediktsson
22c26ff3f5
vm: adding bignum_gcd primitive.
2012-04-05 09:17:35 -07:00
Joe Groff
0e3c315099
vm: move bignum.cpp includes to master.hpp
...
That way they get PCHed
2011-11-08 08:42:47 -08:00
John Benediktsson
afc07c0e05
io.binary: make le> and be> faster (20% and 75%, respectively).
...
Removed primitive byte-array>bignum and digit_stream_to_bignum from vm/.
2011-10-11 21:13:30 -07:00
Slava Pestov
f27080498d
Remove bignum>float VM primitive, and use bignum/f to implement >float on bignums instead, for a slight accuracy gain. Also, bignum/f now has a more efficient post-scaling algorithm to break the circular dependency on bignum>float
2010-11-24 22:41:15 -08:00
Joe Groff
11deca47b4
quiet some data conversions warnings raised by msvc
2010-05-05 22:22:13 -07:00
Slava Pestov
63edd20a55
vm: eliminating register variables work in progress. Works on x86-32 with non-optimizing compiler
2009-12-19 10:59:56 +13:00
Slava Pestov
d85d84697a
Change data heap alignment to 16 bytes
2009-10-20 12:45:00 -05:00
Phil Dawes
9b7412b8f8
Moved PRIMITIVE and PRIMITIVE_FORWARDs to primitives.[ch]pp
2009-09-27 19:42:18 +01:00
Phil Dawes
83b0769eef
renamed factorvm to factor_vm
2009-09-24 08:16:52 +01:00
Phil Dawes
3b8292db8e
bignum indentation and macro cleanup
2009-09-24 08:02:14 +01:00
Phil Dawes
35b2657f53
bignum indentation cleanup
2009-09-24 08:02:14 +01:00
Phil Dawes
e566656e46
removed a bunch of superflous blank lines
2009-09-24 08:02:14 +01:00
Phil Dawes
e8d1612e8e
Split data out into separate vm-data struct
2009-09-16 08:22:16 +01:00
Phil Dawes
32eace1a11
removed global functions from bignum.cpp
2009-09-16 08:16:27 +01:00
Phil Dawes
d093ff766f
updated function ptr calls (iterators etc..) to take a vm parameter
2009-09-16 08:16:25 +01:00
Phil Dawes
efa974f025
moved global state from math into vm
2009-09-16 08:16:24 +01:00