Cat Stevens
21cb42edf3
cast fixes undefined behaviour; closes #1919 in upstream
2018-01-31 17:15:54 +01:00
Björn Lindqvist
453eca66c4
VM: changing case of code_block_type
2016-10-19 09:14:58 +02:00
Björn Lindqvist
a6df4168af
bootstrap.layouts: sync note in comments
2016-09-25 20:10:16 +02:00
Alexander Iljin
0d57734dab
vm: replace block comments /**/ with line comments //
2016-09-09 05:47:52 +02:00
Alexander Iljin
e0acf4f328
Revert "vm: replace line comments // with block comments /**/ for consintency"
...
This reverts commit 7ee4e5dea5
.
2016-09-09 05:47:52 +02:00
Alexander Iljin
7ee4e5dea5
vm: replace line comments // with block comments /**/ for consintency
...
Fix #1651 .
2016-08-03 09:19:48 -07:00
Björn Lindqvist
10464e7e4e
VM: LEAF_FRAME_SIZE is 16 bytes on all platforms so we can simplify it
2015-08-26 20:23:15 +02:00
Björn Lindqvist
fce5d4353a
VM: replace binary_payload_start() with slot_count()
...
This should simplify a little the address calculations when visiting
slots of an object
2015-07-06 22:49:38 +02:00
Björn Lindqvist
46423dfebf
VM: merge strings.hpp and tuples.hpp into layouts.hpp, because those
...
header files were so tiny
2015-07-06 22:49:38 +02:00
Björn Lindqvist
66eb9f1fe5
VM: split the size() method into base_size() and aligned_size()
2015-07-06 22:49:38 +02:00
Björn Lindqvist
fb9fa12cdd
VM: change the definition of entry_point in word and quotation from void* to cell
...
this gets rid of lots of redundant casts from void* to cell
2015-01-15 09:29:13 +00:00
Björn Lindqvist
af270cb4d8
VM converts the methods callstack::frame_top_at and code_block::offset to use cells instead of void*'s
2015-01-15 09:29:13 +00:00
Björn Lindqvist
0c9e61ca99
VM: refactoring that removes data_root_ranges
...
instead of storing data_root_ranges in data_roots, you can just store
cell pointers directly. the advantage with doing it that way is that
registration and traversal code becomes simpler (and slightly faster).
2014-06-12 13:50:10 -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
b918c3e646
VM: Remove redundant #ifdef FACTOR_DEBUGs
...
FACTOR_DEBUG checks around asserts aren't needed, since FACTOR_ASSERT is
already conditionally defined by FACTOR_DEBUG.
2013-05-12 23:44:32 -04:00
Erik Charlebois
7b1b1eef23
VM: Remove unnecessary _ suffix in constructors
2013-05-12 23:20:43 -04:00
Erik Charlebois
26ff071205
VM: Remove unnecessary explicit keywords
2013-05-12 21:48:38 -04:00
Erik Charlebois
0b5a12fdea
VM: Refactor layouts/hpp to Factor style
2013-05-12 13:24:45 -04:00
Doug Coleman
a1ef43a42f
layours.hpp: Don't need RETAG here. Found by @mrjbq7. Fixes #637 .
2013-03-29 17:20:08 -07:00
Joe Groff
604ceb957c
vm: replace remaining stack_frame-based logic
2011-12-14 09:56:49 -08:00
Joe Groff
e116bc497b
vm: reversed callstack iteration
2011-12-14 09:56:47 -08:00
Joe Groff
0a1a252cdb
vm: replace assert with FACTOR_ASSERT
...
Factor is finally a real C++ project and has a custom assert macro. Assertion failures were still getting caught as exceptions and causing failure loops. Write our own macro that calls factor::abort on failure.
2011-11-23 11:11:26 -08:00
Joe Groff
c31530caec
vm: strip out call-counting profiler
...
This makes the separate "code" and "entry_point" fields in word and quotation redundant, so also remove them to reclaim an additional cell per word and quotation object, which should help with #318 .
2011-11-10 16:01:07 -08:00
Joe Groff
f4479ee1e6
vm: print type names instead of numbers in fep
2011-11-06 20:26:51 -08:00
Joe Groff
cdfb1b1b94
vm: change "profiler" names to "counting_profiler"
2011-11-02 13:23:05 -07:00
Slava Pestov
806e54630a
GC maps for more compact inline GC checks
2010-06-11 20:06:00 -04:00
Slava Pestov
58e4381eb1
compiler: new "binary literal area" at the end of a word's machine code stores constant floats and SIMD vectors; this allows ##load-reference/##load-memory fusion to be performed on x86-64, with a RIP-relative address reaching the data; also simplifies VM since custom relocation types used by the previous 32-bit-only optimization are no longer needed
2010-05-03 17:34:35 -04:00
Slava Pestov
9788323d25
compiler: add ##load-vector instruction to avoid wasting a temporary register on x86-32
2010-05-03 17:34:28 -04:00
Slava Pestov
d23bb19b55
Code cleanups
2010-05-03 17:34:17 -04:00
Slava Pestov
a9ccfa8f05
strings: move string-nth primitive out of the VM and into the library
2010-05-03 17:34:12 -04:00
Slava Pestov
2517b2fc2b
compiler: combine ##load-constant followed by ##alien-double into a ##load-double on x86-32, saving an integer register
2010-04-18 21:42:45 -05:00
Slava Pestov
637a77c018
Stop wearing monocle and use the term "entry point" instead of "XT" throughout VM and compiler; also remove two unused relocation types
2010-01-18 20:54:00 +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
57fe0dea48
Fix conflict
2009-11-22 02:12:44 -06:00
Slava Pestov
c2b3d6b894
vm: fix fencepost error in write barrier on large object allocation; fixes benchmark.sort crash
2009-11-11 19:31:18 -06:00
Slava Pestov
064c00f78d
New identity-hashcode primitive
2009-11-10 21:18:54 -06:00
Samuel Tardieu
351e795a52
Add parentheses to prevent GCC warning
2009-11-08 02:01:48 +01:00
Slava Pestov
57c541ea46
vm: eliminating literal table work in progress
2009-11-07 16:16:09 -06:00
Slava Pestov
43e08c76fb
vm: on 32-bit, the largest free block size was only 512mb, leading to weird errors if the heap grew beyond this. eliminate this limit
2009-11-06 08:44:36 -06:00
Slava Pestov
11075828e5
vm: faster data_root and <array> primitive
2009-11-06 05:30:37 -06:00
Slava Pestov
2c0531b015
vm: faster immediate_p()
2009-11-02 20:21:21 -06:00
Slava Pestov
6c2c87758a
vm: rename gc_root to data_root, add code_root to fix a problem where code blocks would move underneath the PIC compiler if PIC compiler allocated enough
2009-11-02 18:10:34 -06:00
Slava Pestov
e4ad642134
vm: 4 bit tags, new representation of alien objects makes unbox-any-c-ptr more efficient (work in progress)
2009-11-02 04:25:54 -06:00
Slava Pestov
62e718eaa9
vm: combine heap_block and code_block structs, eliminates some boilerplate
2009-10-24 21:33:31 -05:00
Slava Pestov
03f4b4cdd6
vm: move binary_payload_start() method from factor_vm to object class
2009-10-24 04:27:45 -05:00
Slava Pestov
40351d40be
vm: use iostreams instead of printf for debug messages, clean up a few things
2009-10-21 20:12:57 -05:00
Slava Pestov
af855b7fa9
vm: debugging mark-sweep
2009-10-21 19:41:54 -05:00
Slava Pestov
e482940dca
vm: object start recording in cards is now independent of allocation strategy
2009-10-20 13:47:04 -05:00
Slava Pestov
d22d5466fc
vm: move factor_vm::untagged_object_size() to object::size()
2009-10-20 13:13:39 -05:00