Björn Lindqvist
df171b0485
VM: changing case of enums values bignum_comparison and generation
...
It is consistent if all enum values have all uppercase names.
2016-10-19 08:57:33 +02:00
Björn Lindqvist
bbd71ae975
math.parser: (format-float) doesn't need to zero-terminate returned byte-array
2016-10-09 00:47:37 +02:00
Alexander Iljin
0d57734dab
vm: replace block comments /**/ with line comments //
2016-09-09 05:47:52 +02:00
Doug Coleman
7488e54825
math.cpp: Fix two warnings. Fixes #1549 .
2016-03-08 10:02:28 -08:00
Jon Harper
13ba081ac8
primitive_format_float, return empty string on bad locale instead of C++ exception
2016-03-08 07:55:25 -08:00
Jon Harper
19fadb6c96
prettyprinter, locale independant float printing
2016-03-08 07:55:25 -08:00
Björn Lindqvist
ed702209ce
VM: fix bignum>fixnum-strict conversion, previously most-negative-fixnum
...
>bignum bignum>fixnum-strict didn't work
2015-06-29 08:19:42 +02:00
Björn Lindqvist
35b04f8ec1
VM: fixes a bug with the handling of 0 bignums, and declares bignum/mod
...
to maybe output fixnums
2015-06-27 16:14:58 +02:00
Björn Lindqvist
2f835d3666
compiler.tree.propagation.*: implements downgrading to fixnum for the
...
mod word, maybe a first step in solving #224
factor_vm::primitive_bignum_mod is changed so that it outputs a fixnum
if the value is small enough. Then the compiler can take advantage of
knowing that expressions like [ >bignum 10 mod ] always result in a
fixnum [-9,9] and inline more arithmetic.
2015-06-27 16:14:58 +02:00
Doug Coleman
c675694619
vm: Annotate more places where we can gc.
...
Code formatting fix.
2014-11-29 19:25:46 -06:00
Björn Lindqvist
1f6d6b9a5d
VM: cell -> ret
2014-11-17 17:27:35 -08:00
Björn Lindqvist
7d6f282d91
VM: conversion of many more bignum.cpp methods to use data_roots instead
...
of gc_bignum
2014-11-17 17:27:35 -08:00
John Benediktsson
82f9f21a50
vm: change some push/pop to replace/peek.
2014-06-07 12:16:43 -07:00
John Benediktsson
e9e1fd4e6a
vm: generate a to_fixnum_strict to workaround an odd io.monitors issue.
2014-06-07 12:06:03 -07:00
John Benediktsson
eeaa91d6c1
vm: using bignum>fixnum-strict in integer>fixnum-strict.
2014-06-07 09:46:05 -07:00
Björn Lindqvist
d225bec128
VM: CELL_TO_FOO macro-magic in the same spirit as BIGNUM_TO_FOO
...
Now also factor_vm::to_cell doesn't piggyback on
factor_vm::to_fixnum's (strict) conversion.
2014-06-07 17:04:27 +02: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
Björn Lindqvist
03672ad938
VM: refactored factor_vm::unbox_array_size()
2014-06-07 12:13:59 +02:00
John Benediktsson
fd1dc5ce01
vm: formatting of sign_mask.
2014-06-02 07:54:01 -07: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
d9e225e1dc
VM: Refactor math.hpp/cpp to Factor style
2013-05-12 13:24:46 -04:00
Erik Charlebois
ca2ea548be
VM: Remove exec bit from VM source files
2013-05-11 17:04:23 -04: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
5be15d7e3f
vm: more use of ctx->replace().
2013-03-22 09:17:02 -07:00
John Benediktsson
49a7d37dcd
vm: don't ctx-pop() in bignum_divmod.
2013-03-22 08:26:01 -07:00
John Benediktsson
9c025abc67
vm: use ctx->replace() with bignum and float operations.
2013-03-22 08:00:13 -07:00
John Benediktsson
42f4193939
vm: simplify a bit the fixnum_divmod code.
2012-08-23 08:38:18 -07:00
John Benediktsson
ed8496b583
vm: speed up primitive_fixnum_divmod by 10-12%.
2012-08-22 21:46:59 -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
91d8326b77
math.cpp: Fix theoretical gc bug.
2012-08-15 01:51:58 -07:00
John Benediktsson
22c26ff3f5
vm: adding bignum_gcd primitive.
2012-04-05 09:17:35 -07:00
John Benediktsson
4653df21cb
vm: remove math::bignum_producer.
2011-10-11 21:24:38 -07: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
Slava Pestov
1985705413
compiler: now that FFI has been deconcatenatized, we no longer need the special ##unary-float-function and ##binary-float-function fastpaths
2010-08-13 23:59:19 -07:00
Slava Pestov
b23aac1beb
compiler.cfg: open-code parameter boxing and unboxing for certain C types
2010-07-19 10:25:13 -04:00
Slava Pestov
0fd636b4b9
compiler.cfg: ##unbox-long-long can have multiple outputs now, clean up long long parameter passing code using this
2010-07-15 19:49:29 -04:00
Slava Pestov
91cd3b854d
Use ##local-allot to simplify longlong unboxing
2010-05-19 01:07:22 -04:00
Slava Pestov
eb802208d1
FFI rewrite part 4: parameter and return value unboxing redesign
2010-05-11 19:11:44 -04:00
Slava Pestov
288090d993
math.parser: expose a format-float primitive for use by formatting vocabulary
2010-04-13 21:21:28 -07:00
Slava Pestov
11ddbc03a4
vm: signal handling cleanup
2010-03-27 07:33:28 -04:00
Slava Pestov
747974f4ae
vm: nuke unused (string>float) primitive
2010-02-08 08:16:56 +13:00
Doug Coleman
d22eb40360
Fix spaces that crept into vm/ cpp files
2010-02-06 01:06:26 -06:00
Slava Pestov
942f6e0943
Update Win64 support
2010-01-25 15:39:34 +13:00
Slava Pestov
e4da687413
vm: Tweak Factor VM to compile with Microsoft Visual Studio on Windows, in addition to Mingw. Add an Nmakefile which can be used for this purpose. Rename Makefile to GNUmakefile.
2010-01-17 03:43:22 +13:00
Slava Pestov
15eb8d1a0a
vm: remove VM_ASM_API
2009-12-24 01:37:24 +13: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