Joe Groff
07ab5f006d
on OS X, rather than define _XOPEN_SOURCE, use the non-deprecated sys/ucontext.h header instead
2009-08-26 16:44:25 -05:00
Joe Groff
2a56ba0d2d
add -D_XOPEN_SOURCE flag to suppress ucontext deprecation errors on snow leopard. add -m32 flag when compiling 32-bit because snow leopard gcc defaults to x86_64
2009-08-26 16:29:55 -05:00
Philipp Brüschweiler
230061783a
misc small documentation fixes, some fixes for factor.vim, changed permissions of vm/* to 644
2009-08-10 21:33:07 +02:00
Slava Pestov
46688f960d
image.cpp: don't try to make code heap bigger than p->code_size since on PPC this will cause crashes if the image has a code heap of exactly 32Mb
2009-07-31 23:23:29 -05:00
Slava Pestov
91e5c05f40
debug.cpp: fep now prints return addresses in call stack dump
2009-07-29 19:28:58 -05:00
Slava Pestov
3fb4fc1bde
Improve code generation for shift word: add intrinsics for fixnum-shift-fast in the case where the shift count is not constant, transform 1 swap shift into a more overflow check with open-coded fast case, transform bitand into fixnum-bitand in more cases
2009-07-16 23:50:48 -05:00
Slava Pestov
baff251d1e
alien.libraries: add remove-library word, fix dlclose and dll-valid? VM primitives
2009-07-09 06:51:31 -05:00
Slava Pestov
2d231f066a
GC checks now save and restore registers
2009-06-02 18:23:47 -05:00
Slava Pestov
9e987e8642
Merge branch 'master' into global_optimization
2009-06-01 03:12:32 -05:00
Slava Pestov
b389dcf441
Redo compiler.codegen.fixup and get %dispatch to work
2009-06-01 02:32:36 -05:00
Slava Pestov
fc152ef210
Various improvements aimed at getting local optimization regressions fixed:
...
- Rename _gc to ##gc
- Absolute labels are now supported
- Generate _dispatch-label
2009-05-31 23:28:08 -05:00
Slava Pestov
faaccceac6
Fix rdtsc on Windows
2009-05-31 15:16:40 -05:00
Slava Pestov
617e57fc75
cpu.x86.features: add RDTSC support. This is a new vocabulary with words: sse2? instruction-counter count-instructions
2009-05-31 15:02:14 -05:00
Slava Pestov
6b2192bde0
Fix compile error on GCC 4.x
2009-05-20 20:01:21 -04:00
Slava Pestov
610b276c86
callstack>array primitive was not GC safe
2009-05-20 18:52:21 -05:00
Slava Pestov
efde9b8d10
callstack>array was keeping an uninitialized array around across potential GCs; add more assertions
2009-05-17 18:18:07 -05:00
Slava Pestov
1e6227fe68
os-linux.cpp: inotify wrappers should be VM_C_API
2009-05-13 03:49:51 -05:00
Slava Pestov
9ef162e2ef
More VM cleanups
2009-05-13 01:08:16 -05:00
Slava Pestov
69cb3dee5e
Fix FEP if there are too many words in the image, clean up some VM code
2009-05-13 00:58:54 -05:00
Slava Pestov
3987468ff3
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-12 16:23:26 -05:00
Slava Pestov
e0f4b18709
Link VM with OpenSSL on NetBSD otherwise it can't find some symbols
2009-05-12 16:23:09 -05:00
Slava Pestov
6e08e29a3a
Remove compiled slot from quotations since its not needed
2009-05-12 03:09:15 -05:00
Slava Pestov
aa3aa715be
Slightly more space-efficient dispatch table representation
2009-05-09 20:24:32 -05:00
Slava Pestov
04a70da513
Fix compile error in cpu-ppc.hpp
2009-05-08 17:41:22 -05:00
Slava Pestov
367724f41e
Fix Windows compile error
2009-05-08 15:23:44 -05:00
Slava Pestov
ace084b633
Need to include unistd.h
2009-05-08 15:15:10 -05:00
Slava Pestov
3bf8134476
VM cleanup: replace some #defines with constants and inline functions
2009-05-08 15:05:55 -05:00
Slava Pestov
5c4bb80bc3
Update PowerPC %jump and %dispatch-label, and add PIC-related functions to cpu-ppc.hpp
2009-05-07 19:47:38 -05:00
Slava Pestov
3591f6c684
Count megamorphic cache hits
2009-05-07 14:26:08 -05:00
Slava Pestov
d7b40d72a0
Code cleanups
2009-05-07 12:33:31 -05:00
Slava Pestov
318552ba60
Fix tail call PICs on x86-64
2009-05-06 22:44:30 -05:00
Slava Pestov
4915e1ced7
Clean up bootstrap.image, and implement new calling convention for tail calls; tail call sites now have PICs
2009-05-06 22:04:01 -05:00
Slava Pestov
12a34d81f7
JIT now supports multiple relocations per code template. This simplifies non-optimizing compiler backends
2009-05-06 20:04:49 -05:00
Slava Pestov
581d017b46
Working on inline caching for tail call sites
2009-05-06 19:22:22 -05:00
Slava Pestov
49409b4d8c
Working on PowerPC backend
2009-05-06 15:39:03 -05:00
Slava Pestov
867ff51b83
Remove some unused constants and update an obsolete comment
2009-05-06 14:57:17 -05:00
Slava Pestov
a961e17ef1
Add new RC_ABSOLUTE_PPC_2 relocation type
2009-05-05 20:56:23 -05:00
Slava Pestov
58d0e17936
Fix bool type; its actually 1 byte not 4 in structs. Bug reported by jedahu
2009-05-05 18:37:40 -05:00
Slava Pestov
be207afe9a
Fix VM compile error
2009-05-05 16:19:13 -05:00
Slava Pestov
8d5d1b8bb5
Fix VM code to export the right symbols on Windows
2009-05-05 15:55:41 -05:00
Slava Pestov
3295c54bff
Remove debug messages from VM
2009-05-05 14:27:22 -05:00
Slava Pestov
56597b65f4
VM now compiles with GCC 3.4 on Windows
2009-05-05 14:17:02 -05:00
unknown
cc9ac345fa
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-05 13:03:43 -05:00
unknown
6e26c7b554
Fixing compile errors on Windows
2009-05-05 13:03:24 -05:00
Slava Pestov
53db9d737a
Change (void) to ()
2009-05-05 11:33:35 -05:00
Slava Pestov
786b9096e2
Store forwarding table off to the side instead of in the code block; saves one cell per code block
2009-05-05 11:07:20 -05:00
Slava Pestov
12de56c41e
Fix botched replace all in VM source, clean up image saving code, and fix save-image-and-exit to actually call (save-image-and-exit) instead of (save-image)
2009-05-05 10:29:22 -05:00
Slava Pestov
029d93a838
Make walker work better with call( and breakpoints which are nested inside combinators
2009-05-05 09:12:32 -05:00
Slava Pestov
0682c3da39
Some VM fixes
2009-05-04 15:11:31 -05:00
sheeple
dbc245729c
use eg++ on openbsd
2009-05-04 11:48:46 -05:00
Slava Pestov
fb5b48c71a
Fix some test failures
2009-05-04 09:44:26 -05:00
Slava Pestov
fb9086d191
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-04 08:31:56 -05:00
Slava Pestov
f812f70473
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-04 09:08:46 -04:00
Slava Pestov
7a80307b52
Fix problem caused by different behavior of GCC 4.0 -vs- 4.3
2009-05-04 09:08:33 -04:00
Samuel Tardieu
f3a9234422
Make the primitives array const
2009-05-04 14:45:15 +02:00
Samuel Tardieu
1b0db9623b
Do not lower primitives to "void*" to get better compiler checking
2009-05-04 14:32:09 +02:00
Slava Pestov
a9782a2e64
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-04 07:19:40 -05:00
Slava Pestov
708c8b50ff
Config.freebsd fix
2009-05-04 07:19:32 -05:00
Slava Pestov
af5a7b537e
Attempt to fix gcc 4.5.0 compile error
2009-05-04 07:11:00 -05:00
Slava Pestov
2bfde0250e
Fixing some build issues on Linux with GCC 4.3
2009-05-04 08:00:06 -04:00
Slava Pestov
2772473d1c
Merge branch 'master' of git://factorcode.org/git/factor
2009-05-04 06:43:36 -05:00
Slava Pestov
28cb6ea5c3
NetBSD build fix
2009-05-04 06:43:20 -05:00
Slava Pestov
abf7912ae7
Cleanups
2009-05-04 05:07:14 -05:00
Slava Pestov
8872c40b1e
The great type renaming
2009-05-04 04:50:24 -05:00
Slava Pestov
edecac508e
Use C++ namespaces
2009-05-04 01:46:13 -05:00
Slava Pestov
8e17e0a01e
VM: use better abstractions for tagged pointers, eliminate get()/set() stuff, clean up array, string, and byte-array element access
2009-05-04 01:00:30 -05:00
Slava Pestov
ec28b1ef85
Various VM cleanups, new approach for bignum GC root registration
2009-05-03 05:48:03 -05:00
Slava Pestov
e3592ca8f6
Clean up untag_* and tag_* inline functions in favor of more idiomatic C++
2009-05-02 20:47:29 -05:00
Slava Pestov
b923d548cf
Move vmpp to vm
2009-05-02 20:37:18 -05:00
Slava Pestov
982d409a8b
Fix VM compilation on Windows
2009-05-01 02:01:43 -05:00
slava
b8b7d3861b
Fix some compiler warnings
2009-04-30 23:50:53 -04:00
Slava Pestov
d93514d47d
Merge branch 'master' of git://factorcode.org/git/factor
2009-04-30 21:13:36 -05:00
Slava Pestov
b20ed595c4
Remove obsolete comment
2009-04-30 19:47:08 -05:00
Slava Pestov
742d574162
Non-optimizing compiler doesn't need to optimize 'dispatch' primitive anymore since its rarely used
2009-04-30 19:42:08 -05:00
Slava Pestov
7be231f6f8
Clean up code duplication in quotations.c
2009-04-30 19:07:13 -05:00
Slava Pestov
f9ec0a07c5
Fix PICs for x86-64
2009-04-30 18:00:49 -05:00
Doug Coleman
674bb9a4d5
remove error_message from windows vm
2009-04-30 09:36:01 -05:00
Slava Pestov
d6444e742c
Fix comment
2009-04-30 07:06:23 -05:00
Slava Pestov
5bc63fc237
At the end of a compilation unit, all PICs become dead so add them to the free list immediately instead of having them waste space until the next GC.
...
Similarly, when a PIC transition occurs, add the old PIC to the free list immediately.
Remove an unused function update_code_heap_roots()
2009-04-30 05:59:44 -05:00
Slava Pestov
5fb5c19d61
Machine code is now stored in a byte array instead of an array for add_code_block()
2009-04-30 04:34:35 -05:00
Slava Pestov
515c619202
Non-optimizing compiler now open-codes megamorphic dispatch fast path
2009-04-30 03:37:07 -05:00
Slava Pestov
fc4894fbdf
Replace ratio and complex built-in types with tuples defined in the library. This frees up two lo-tags, so move array and quotation over to these tags and update compiler for new tags
2009-04-30 00:27:35 -05:00
Slava Pestov
62db617927
Get rid of two instructions from tag pics and one instruction from all others
2009-04-29 22:24:28 -05:00
Slava Pestov
bd186b6320
Eliminate 3 instructions from PIC fast path
2009-04-29 21:32:05 -05:00
Slava Pestov
ae22b345ec
PIC -> megamorphic transition now has correct semantics within compilation units
2009-04-29 19:50:50 -05:00
Slava Pestov
02bd4f3f00
PICs now pass the method table around instead of extracting it from the generic word body. This gels better with how compilation units are supposed to work
2009-04-29 19:39:43 -05:00
Slava Pestov
a26947ba2e
Remove obsolete -mtune=pentium4 compile flag
2009-04-28 23:05:42 -05:00
Slava Pestov
9243316489
Debugging inline caching
2009-04-28 23:05:18 -05:00
Slava Pestov
dfcbd206b6
Fix -pic command line switch, and enable PICs in user-space
2009-04-28 18:06:10 -05:00
Slava Pestov
c15a4c1c5a
Add new relocation type for call sites which may be replaced by ICs
2009-04-28 17:53:14 -05:00
Slava Pestov
5f6c074edd
Split up types.c/h into smaller files, remove optimized slot from F_WORD struct
2009-04-28 17:26:11 -05:00
Slava Pestov
e8008af5d0
inline-cache-miss primitive now jumps to the new stub
2009-04-28 16:58:38 -05:00
Slava Pestov
3985b18026
Add -pic= command line argument
2009-04-28 16:58:19 -05:00
Slava Pestov
e940f6fd8b
Add method dispatch statistics
2009-04-28 16:58:05 -05:00
Slava Pestov
bd1b6be732
Remove some unused macros
2009-04-28 04:03:11 -05:00
Slava Pestov
4d10105802
Working on inline caching
2009-04-28 03:48:37 -05:00
Slava Pestov
d5b51df7e7
Clean up profiler.c using new JIT API
2009-04-28 00:53:32 -05:00
Slava Pestov
e45790a802
Split off parts of quotations.c into jit.c, which is a general codegen facility used by the non-optimizing compiler, and soon to be the profiler and PICs
2009-04-28 00:48:00 -05:00
Slava Pestov
15ef4f651b
Sprinkle VM source with assertions, add a missing local root to quotations.c, fix GROWABLE_ARRAY macros for GC safety
2009-04-28 00:11:09 -05:00
Slava Pestov
bba3bdd2bd
Merge branch 'inline_caching' into jit_cleanup
2009-04-27 17:09:12 -05:00
Slava Pestov
bba30dc284
Fix conflict from master
2009-04-27 17:09:09 -05:00
Slava Pestov
bf0e8606a8
Merge branch 'master' into inline_caching
2009-04-26 21:26:39 -05:00
Slava Pestov
087c962f75
VM: simplify GC a bit, add GC_DEBUG compile-time flag
2009-04-26 16:05:09 -05:00
Slava Pestov
e0f6825757
Rename some fields to avoid conflicting with windows.h macros 'small' and 'large'
2009-04-26 10:02:52 -05:00
Slava Pestov
f94a44f3fd
Merge branch 'master' into inline_caching
2009-04-26 09:22:27 -05:00
Slava Pestov
5f756a8019
Code GC: segregated free list for faster allocation, combine unmark/build free list/update literals passes into one pass for faster deallocation
2009-04-26 09:15:58 -05:00
Slava Pestov
a14e5a4a3b
Better local cache
2009-04-26 08:06:37 -05:00
Slava Pestov
63fff0a832
Clean up VM's growable array implementation, and non-optimizing compiler
2009-04-26 07:00:48 -05:00
Slava Pestov
89eccddde7
quotations.c: fix quot_code_offset_to_scan
2009-04-25 22:35:51 -05:00
Slava Pestov
356537593e
Get rid of execute-unsafe now that (execute) is more versatile
2009-04-25 21:50:34 -05:00
Slava Pestov
2630c4a95f
Add local caching
2009-04-25 20:33:52 -05:00
Slava Pestov
8c5b0373a8
Working on new method dispatch system
2009-04-24 15:31:06 -05:00
Slava Pestov
b00d81e47b
Add time spent scanning cards to 'time' output
2009-04-24 09:44:29 -05:00
Slava Pestov
461ddfac1a
Fix 'become'
2009-04-21 00:05:39 -05:00
Slava Pestov
f38d2f91f6
Words which didn't compile cannot be run at all
2009-04-20 22:05:41 -05:00
Slava Pestov
968bf4bcb4
Merge branch 'master' of git://factorcode.org/git/factor
2009-04-20 01:56:16 -05:00
Slava Pestov
5ac1358aea
Report actual SEH code on Windows instead of 'signal 11'
2009-04-20 01:55:27 -05:00
Slava Pestov
8baaf04ac5
When doing code heap compaction, don't scan stacks as roots since we're going to exit anyway
2009-04-18 03:25:51 -05:00
Slava Pestov
f4cdcaa1ce
Fix compiler warnings in tools.deploy.shaker
2009-04-17 20:38:55 -05:00
Slava Pestov
db3818814d
Refactor GLU usages in basis, and move opengl.glu to extra, and don't like VM with GLU
2009-04-11 15:17:08 -05:00
Slava Pestov
ef095f5eef
Check return value of fread and fwrite in image.c
2009-04-11 14:28:48 -05:00
Doug Coleman
2ff6c7ed07
use fseek on windows instead of _fseeki64
2009-04-03 14:59:46 -05:00
Doug Coleman
4f3e8be3f6
move FSEEK definition from os-genuinx.h to os-unix.h
2009-04-03 12:26:04 -05:00
Doug Coleman
34c8e07900
make FSEEK macro for using _fseeki64 instead of fseeko on windows
2009-04-03 10:35:43 -05:00
Slava Pestov
535850f3ea
Fix vocab: and word name stripping in deployed binaries
2009-04-03 10:16:56 -05:00
Slava Pestov
9907bd9fe2
Add fseek primitive so that c-streams can seek. This lets the UI work without native IO
2009-04-03 10:16:25 -05:00
Doug Coleman
5a9dc86774
fix typo
2009-04-02 11:42:10 -05:00
Slava Pestov
39b53817b9
Small size reduction for deployed images
2009-03-31 08:15:27 -05:00
sheeple
42d164db77
Fix C99 complex number support in FFI on Mac OS X/PPC
2009-03-30 07:19:14 -05:00
Slava Pestov
2314af94fe
Remove redundant flush_icache() call
2009-03-29 16:38:12 -05:00
Doug Coleman
5460a5375e
change makefile to use .so instead of .a on unix
2009-03-28 14:41:48 -05:00
Doug Coleman
45ed9b3b80
use -fPIC on all platforms for ffi lib
2009-03-27 15:39:13 -05:00
Doug Coleman
785e3bcfd0
only use -fPIC on the ffi library
2009-03-26 10:47:25 -05:00
Doug Coleman
77fccb2782
build with -fPIC on linux64
2009-03-26 10:38:00 -05:00
Doug Coleman
97283b9857
compile an ffi test library, reduce factor runtime by 6kb!
2009-03-25 13:06:20 -05:00
sheeple
c6837fbe3e
Update cpu-ppc.S for quotation layout change
2009-03-24 01:07:38 -05:00
Slava Pestov
2a7848053f
Fix 64-bit build issue; relocation entries are 32-bit on all platforms
2009-03-19 23:21:32 -05:00
Slava Pestov
ae09d85d84
More compact relocation layout
2009-03-19 20:03:07 -05:00
Slava Pestov
8f059e07a7
Move flags from F_CODE_BLOCK to F_BLOCK for further space savings
2009-03-19 03:49:49 -05:00
Slava Pestov
78f168e304
Remove code_length field from F_CODE_BLOCK struct, and make F_BLOCK the head of F_CODE_BLOCK to simplify other code
2009-03-19 03:45:37 -05:00
Slava Pestov
44d61b71f6
Store next_free pointer to free blocks only
2009-03-19 03:00:21 -05:00
Slava Pestov
be4fb1e7d9
Move call( and execute( to core
2009-03-16 20:11:36 -05:00
Slava Pestov
1559b74640
Add new check-datastack primitive and re-implement call( with it, instead of using with-datastack. call( is now 5x faster
2009-03-16 06:16:51 -05:00
Slava Pestov
a2d93dad1d
Fix to make new_ui compile with X11 libraries on Mac OS X
2009-03-05 13:38:55 -06:00
Slava Pestov
2fee574b4f
Working on X11 backend
2009-03-02 02:55:54 -06:00
Slava Pestov
4257cd55e0
fix problem with bignum-bit? -- return value would be truncated if sizeof(int) != sizeof(bignum_digit_type)
2009-02-22 19:45:05 -06:00
Joe Groff
5dd4bbcf42
Defuse RTLD_GLOBAL time bomb in os-unix.c
2009-02-10 19:58:53 -06:00
Doug Coleman
201296c040
dllexport err_no and clear_err_no
2009-02-06 18:46:23 -06:00
sheeple
173b0ee78d
Add some more tests for complex numbers in FFI
2009-02-06 12:21:53 -06:00
Slava Pestov
05632b8525
Don't use complex.h since *BSDs don't have it in latest release versions (gah!); add DLLEXPORT for ffi_test_45 to make it work on Windows
2009-02-06 11:03:52 -06:00
Slava Pestov
f9bc9a3198
Fix VM compile error
2009-02-06 04:53:08 -06:00
Slava Pestov
7bb0e78314
Add support for C99 complex float and complex double types to FFI
...
They are named complex-float and complex-double in the Factor world
2009-02-06 04:02:00 -06:00
unknown
b6c3bc892d
Fix the build support for windows again, have the makefile load Config.* files in the top level so that freetype.dll and zlib1.dll targets can make
2009-02-04 18:21:58 -06:00
Doug Coleman
eec86d6043
Fix io.launcher on Windows -- Microsoft does the same thing with devenv
2009-02-04 13:05:52 -06:00
Doug Coleman
a60e11b89e
add RTLD_GLOBAL to dlopen flags. load atlas before cblas on freebsd
2009-01-30 16:45:30 -06:00
Doug Coleman
ed7b49df78
Windows vm now tries vm-console.image or vm.image first, then removes -console if it exists and tries to find the image again
2009-01-29 19:57:01 -06:00
Doug Coleman
8acba1543a
oops, didnt mean to remove these two lines
2009-01-29 13:38:07 -06:00
Doug Coleman
2d960f4103
Create two binaries: factor.com and factor.exe. factor.com is the console version, factor.exe is win32. also make a factor shell script called factor to help cygwin out because it ignores the env vars
2009-01-29 13:15:16 -06:00
Slava Pestov
c074740746
Split off data_heap.c from data_gc.c; split off write_barrier.h, local_roots.h from data_gc.h, misc other cleanups
2009-01-24 23:39:00 -06:00
Slava Pestov
ed1a2855b5
Big code GC refactoring
...
- Move code block-specific parts of code_gc.c to code_heap.c
- code_gc.c is now a generic malloc-style heap
- New code_block.c to split up large code_heap.c
- Clean up relocation code and remove some duplication
- Fix problems with code heap not being updated properly with uninterned words (bug re
ported by doublec)
- Remove boolean parameter from modify-code-heap primitive
- Less unnecessary fixup speeds up bootstrap slightly
2009-01-24 20:13:17 -06:00
Slava Pestov
670d0106d1
Clean up some duplication
2009-01-24 17:42:28 -06:00
Slava Pestov
32bb531621
Move literal tables out of code heap, instead each code block holds a reference to the literal table
2009-01-24 17:01:01 -06:00
Slava Pestov
a8d1459c08
Rename compiled slot of words to optimized, to reflect what it really means (all words are compiled)
2009-01-23 00:37:02 -06:00
Doug Coleman
09b82321b5
remove failed proper-save from vm
2009-01-21 23:32:23 -06:00
Doug Coleman
1dc7ecfdc5
lol the hak...fix coming up
2009-01-21 20:12:09 -06:00
Doug Coleman
a9277c71fd
fix macosx initialization of executable_path
2009-01-21 18:07:26 -06:00
Doug Coleman
99cd664961
better save_image that doesn't corrupt your factor image if you're out of disk space. should throw exception instead of printing error messages if saving fails..
2009-01-21 15:02:27 -06:00
Doug Coleman
9f95c9611b
fix vm path on openbsd, fix compiler warning
2009-01-19 21:19:32 -06:00
Slava Pestov
0d56665522
Fix Windows build
2009-01-16 14:21:44 -06:00
Slava Pestov
07ec51b24a
Clean up embedding API
2009-01-14 18:40:23 -06:00
Doug Coleman
585d977ed0
remove a couple comments from Config.windows files
2009-01-13 20:54:39 -06:00
Slava Pestov
b2e45f199e
Calling dispose on unix stdin no longer kills the VM
2008-12-20 18:02:08 -06:00
Slava Pestov
00212bb626
Save and restore r31
2008-12-16 02:06:53 -06:00
unknown
b5d98e6a1e
Fix warning
2008-12-15 21:19:04 -06:00
U-SLAVA-DFB8FF805\Slava
f4c3bf1dd6
Fix compile warning and fix (sleep) primitive on Windows
2008-12-13 04:49:16 -06:00
Joe Groff
88856fac21
OSX VM requires function from Cocoa framework, so link against it even when building for X11
2008-12-10 12:22:17 -08:00
Slava Pestov
ec23584f48
Finish up O(1) byte array allocation
2008-12-09 18:17:04 -06:00
Slava Pestov
eb79c6ab71
Fix conflict
2008-12-09 17:52:45 -06:00
Slava Pestov
9ad51490af
Fix GC crash with -generations=2
2008-12-09 16:26:30 -06:00
Slava Pestov
833d9f9c0b
Fix quotation pooling
2008-12-08 21:24:45 -06:00
Slava Pestov
e4f8448eb1
Fix some problems with arithmetic type inference, exposed by recent changes to log2 word
...
- declared input type for bignum-shift was stricter than the runtime behavior, leading to bad propagation of type info if shift count was a bignum
- types inferred for type functions which used number-valued/integer-valued/real-valued were not always precise, eg bignum bignum bitxor => integer
- add interval-log2, type function for (log2)
- remove math-class-min, it was useless
2008-12-07 19:44:49 -06:00
Slava Pestov
0290be6e93
Exploit the fast-path for allocation of array with initial element 0 by changing
...
new-sequence on arrays, the vector constructor, and resize-array, called when
growing vectors, to fill arrays with 0 instead of f. user code never observes the
initial value in these situations anyway. small speedup on bootstrap
2008-12-06 18:37:28 -06:00
Slava Pestov
908644ee7a
O(1) <sbuf> and new-sequence on byte-arrays (work in progress)
2008-12-05 07:28:52 -06:00
Slava Pestov
e256846acd
Tweak string representation; high bit indicates if character has high bits in aux vector. Avoids memory access in common case. Split set-string-nth into two primitives; set-string-nth-fast is open-coded by optimizing compiler. 13% improvement on reverse-complement
2008-12-05 06:38:51 -06:00
Slava Pestov
d59f8b10dc
Fix printing of negative fixnums in FEP
2008-12-01 18:08:39 -06:00
sheeple
abc486c342
Subtraction overflow was wrong way round on PowerPC
2008-11-30 06:08:16 -06:00
sheeple
2b1a90e90a
Fixing PowerPC arithmetic primitives
2008-11-28 22:22:26 -06:00
Slava Pestov
68dd6cc35a
Working on PowerPC overflow checks
2008-11-28 20:02:50 -06:00
Slava Pestov
2863da257b
fixnum-shift didn't work with very large negative shift counts; BRANCHLESS_MAX macro was wrong
2008-11-28 08:34:30 -06:00
Slava Pestov
5634becda1
##fixnum-add, ##fixnum-sub instructions open-code overflow check
2008-11-28 05:33:58 -06:00
Slava Pestov
6320b936ff
Merge branch 'master' into faster_overflow_checks
2008-11-28 04:35:26 -06:00
Slava Pestov
c8a8d69382
After merging quotations, we need to update references to the old versions' XTs in the code heap
2008-11-28 03:47:37 -06:00
Slava Pestov
b3ad902208
Fix cosmetic issue
2008-11-28 00:48:20 -06:00
Slava Pestov
fff10d8082
Fix for gcc 4.2
2008-11-27 23:32:17 -06:00
Slava Pestov
cfbd3c679b
Remove unused function from VM
2008-11-27 23:28:38 -06:00
Slava Pestov
6dfce7d4e7
load-locals is a primitive now, change semantics of get-locals to bum out 2 instructions from the sub-primitive
2008-11-27 22:30:29 -06:00
Slava Pestov
e78121f38c
Rewrite remaining fixnum primitives in assembly (work in progress)
2008-11-26 04:22:39 -06:00
Slava Pestov
826be7530e
Check Mac OS X version on startup and give up if we're running something older than 10.5
2008-11-25 21:51:41 -06:00
Slava Pestov
c7c1f3903f
Fix performance problem: literals were being scanned too often
2008-11-25 21:27:07 -06:00
slava
fbc0f33c86
The deploy tool would coalesce equal quotations into one. This created a problem
...
for the non-optimizing compiler because if the new 'leader' quotation was not
compiled but some of the ones that it replaces were, then calls to the quotation
from contexts where they have to be compiled (eg, compiled if and dip) would no
longer work. Add a `jit-compile' primitive to compile quotations, and call it
as appropriate in `compress-quotations`.
2008-11-24 15:59:27 -06:00
Slava Pestov
a4282139dc
Add comments explaining recent changes
2008-11-24 09:27:15 -06:00
Slava Pestov
ab689c098b
Clean up direct literal code and make a first attempt at PowerPC support
2008-11-24 08:16:14 -06:00
Slava Pestov
030501d6ef
GC speedup
2008-11-24 06:49:14 -06:00
Slava Pestov
2aaf860f47
Experimental optimizations
2008-11-24 06:40:51 -06:00
Slava Pestov
8663ca2982
Fix VM for PowerPC
2008-11-24 02:03:01 -06:00
Slava Pestov
d86524f4bc
Non-optimizing compiler now compiles dip, 2dip, 3dip, if, with direct branches instead of indirect branches. 8% bootstrap time improvement on Core Duo 2
2008-11-24 00:23:17 -06:00
Slava Pestov
1d6e389d18
Fixing walker, adding traceback tests
2008-11-23 21:40:54 -06:00
Slava Pestov
65b89eea9e
Fix compile error
2008-11-23 04:46:15 -06:00
Slava Pestov
7788b3e0db
Merge branch 'master' into microseconds
2008-11-23 03:06:32 -06:00
Slava Pestov
a4d9cdfeb3
Refactor all usages of >r/r> in core to use dip, 2dip, 3dip
...
Non-optimizing compiler now special-cases dip, 2dip, 3dip following a
literal quotation: this allows us to break the dip/slip meta-circle
without explicit calls to >r/r>
2008-11-23 02:44:56 -06:00
Slava Pestov
f1b95c0038
Fix .c command in FEP
2008-11-22 19:57:06 -06:00
Slava Pestov
1b091b5a26
Reuse F_CONTEXT instances used for FFI callbacks: 60x speed improvement on benchmark.fib6
2008-11-21 23:13:14 -06:00
Slava Pestov
322d115d2e
/mod didn't handle overflow correctly
2008-11-21 05:18:55 -06:00
Slava Pestov
27503bf67f
Faster /mod and /i primitives
2008-11-21 01:54:45 -06:00
Doug Coleman
3ea773fa80
remove UNKNOWN test
2008-11-19 16:10:00 -06:00
Slava Pestov
8819f23312
Replace millis primitive with micros primitive
...
Add millis as a library word
sleep now takes either a duration or a microsecond count; code using durations doens't need to be updated, code using millisecond counts updated to use durations for the most part
2008-11-19 01:50:05 -06:00
U-SLAVA-DFB8FF805\Slava
2ffecd3acc
Fix VM compile on 32-bit Windows
2008-11-18 18:51:52 -06:00
Slava Pestov
7fd0a27c0d
VM no longer uses printf since format string directives are not portable between Win64 and everything else...
2008-11-18 18:21:42 -06:00
Slava Pestov
d6dd9ea2a3
Add workaround for Windows bttray.exe issue
2008-11-17 21:21:57 -06:00
unknown
ddd28c7d12
Fix Win64 type issue
2008-11-17 18:44:06 -06:00
Slava Pestov
14246fde37
Better FFI unit tests expose a new problem
2008-11-17 12:23:44 -06:00
Slava Pestov
63d109cc04
Remove unused F_CURRY struct from layouts.h
2008-11-16 11:49:32 -06:00
Slava Pestov
cfa82cb474
New calling convention for VM primitives:
...
instead of the Factor side passing the stack pointer as the first parameter, and having the VM save it to stack_chain->top, we instead have the Factor side save it. Eliminates a lot of crud in the VM
2008-11-13 03:20:34 -06:00
Slava Pestov
cdb94e4c62
Word constructor was not invoking relocation on the profiled block, so words constructed while profiling was on could not be executed. This prevented profiling of PEGs
2008-11-11 23:07:40 -06:00
Slava Pestov
abc3915387
Fix x86-32 VM compilation; was using a 64-bit reg on accident
2008-11-08 21:06:51 -06:00
Slava Pestov
fdbea06e27
Fix compile warning
2008-11-08 20:40:09 -06:00
unknown
359fb6e518
VM fixes for Win64 calling convention
2008-11-08 20:32:23 -06:00
unknown
7365959f01
Starting work on Win64 port
2008-11-07 20:33:32 -06:00
unknown
e45df2e89c
Fix bignums for Win64
2008-11-07 20:25:31 -06:00
Slava Pestov
c2117d4046
make macosx-ppc now compiles a ppc binary on intel mac os; it doesn't work properly in rosetta though
2008-11-06 03:37:10 -06:00
Slava Pestov
7741096bff
Tweak PPC register usage; gcc doesn't like it when you mess with r31 for some reason
2008-11-06 03:36:46 -06:00
Slava Pestov
cc879fa9b7
Tuple layouts are now arrays, instead of built-in types. The superclass
...
array is now part of the tuple layout object itself, and class hashcodes
are stored alongside class words there. This removes 2 indirections when
reading a superclass, and 3 when reading a superclass hashcode.
2008-11-05 22:20:29 -06:00
Slava Pestov
2239f4fb99
More work on PowerPC backend; change register usage, free up some more integer and float regs (untested)
2008-11-05 04:20:35 -06:00
U-SLAVA-DFB8FF805\Slava
72b34c7b47
Fix visibility of check_sse2 symbol; DDLEXPORT doesn't work in gas source
2008-11-04 00:04:18 -06:00
Slava Pestov
00fc4eb179
Fix Windows bootstrap: check_sse2 was not DLLEXPORT
2008-11-03 07:27:14 -06:00
Slava Pestov
44a2499c17
fixnum-shift-fast and fixnum-mod subprimitives
2008-11-03 01:18:35 -06:00
Slava Pestov
804c6f93ea
Fix x86.32
2008-10-31 21:07:41 -05:00
Slava Pestov
461a4ddd0a
Add SSE2 detection routine
2008-10-20 05:56:39 -05:00
Doug Coleman
964961ed74
remove dead code
2008-10-19 18:13:59 -05:00
Doug Coleman
f324ceb2b0
remove some macroz
2008-10-19 16:50:11 -05:00
Doug Coleman
78a529b1c3
remove directory from the vm
2008-10-19 13:27:59 -05:00
Doug Coleman
84ec1eec1d
remove environ and os-envs primitives
2008-10-18 21:41:16 -05:00
Slava Pestov
6130aeb88f
Fix fep looping
2008-10-09 00:13:04 -05:00
Slava Pestov
ded36a2279
Fix GC bug
2008-09-28 21:55:40 -05:00
Slava Pestov
be4915ee9c
Fix save-image-and-exit bug
2008-09-19 14:44:58 -05:00
Doug Coleman
c6db662b3b
Rice is a part of every healthy diet
2008-08-05 04:38:01 -05:00
Slava Pestov
722cacddb4
Fixing some problems with returning structs by value in x86.64 FFI
2008-09-13 20:28:13 -05:00
Slava Pestov
a3d1379b8c
Fix bug with large structs passed by value on x86.64
2008-09-09 03:10:43 -05:00
Slava Pestov
e1716d92b3
Remove delegation slot
2008-09-03 03:46:56 -05:00
Slava Pestov
5a0c3e3d73
Add better error message for out of memory
2008-07-25 22:05:36 -05:00