Commit Graph

1937 Commits (master)

Author SHA1 Message Date
John Benediktsson f2a40f88dc bootstrap: rename layouts/layouts.factor to layouts.factor. 2020-09-26 21:29:52 -07:00
John Benediktsson ae1890e0d7 vm: remove -console option, seems not necessary. 2020-09-26 11:46:56 -07:00
John Benediktsson 997aaf005e Revert "Revert "vm: Allow larger 32bit code heaps.""
This reverts commit 0c0647f12c.
2020-08-14 10:47:18 -07:00
John Benediktsson 6e83e00d22 vm: rename primitive_sampling_profiler to primitive_set_profiling.
also rename the private primitives words in tools.profiler.sampling.
2020-08-14 10:40:54 -07:00
John Benediktsson e1085ffef4 vm: add some allocates memory comments. 2020-08-14 10:27:54 -07:00
John Benediktsson f21deee3df vm: change some bools from cell to bool. 2020-08-14 10:27:18 -07:00
John Benediktsson 0c0647f12c Revert "vm: Allow larger 32bit code heaps."
This reverts commit 723e0e2c1a.
2020-08-14 10:14:18 -07:00
Doug Coleman 723e0e2c1a vm: Allow larger 32bit code heaps.
Code heap is artificially restricted on 32bit because PPC only had relative
jump instructions of a certain width and we punted on implementing
larger jumps.
2020-04-13 15:50:58 -07:00
John Benediktsson e219aad7e5 vm: lost a character somehow. 2020-04-07 11:40:04 -07:00
John Benediktsson 5c98ba78cb vm: quick fix for compilation warning. 2020-04-07 11:38:48 -07:00
Doug Coleman fcc225466f vm/allot.hpp: Print more room info when allot() fails.
This is to help debug win64.

Some interesting observations:

fails without any error:
factor.com -codeheap=74000

fails with VirtualAlloc error:
factor.com -codeheap=80000
2020-03-10 03:33:20 -05:00
Doug Coleman fe83a4a164 vm: Add AS_UTF and use it to print wchar_t in Windows terminal.
There may be more places to add AS_UTF8 calls--anywhere that prints a
wchar_t string in the Windows vm.

Fixes #992.
2020-03-06 23:57:57 -06:00
John Benediktsson 0d6096df0a vm: use FILE_READ_ATTRIBUTES to make exists? faster. 2020-02-25 11:05:17 -08:00
kusumotonorio fb3928f807 Tests for System V AMD64 ABI (#2233)
* Adds Tests for System V AMD64 ABI

* Remove TABs, etc.

* Adds a test

* Some Cleanup

* Add Callback Tests

* Add More Tests
2020-01-24 21:54:33 +00:00
nomennescio c33a406066 Support for MinGW compiler. Need to instal MinGW compiler and runtime. 2019-12-10 08:53:32 -08:00
Doug Coleman 0cfc48479e macos32: Lock to 10.11 for build machine.
32bit macos has been deprectated and 10.13 does not seem have i386 libraries anymore.
2019-05-22 11:02:20 -05:00
Doug Coleman 9d06dcb67e Config.linux: Better check for g++.
A consistent string across platforms is 'Free Software Foundation'
2019-04-07 18:54:59 -05:00
Doug Coleman 6f58118afb Config.linux: Better check for gcc.
To print in make:
$(info IS_GCC is $(IS_GCC))
2019-03-25 00:31:18 -05:00
Doug Coleman 5609370be6 make: Allow overriding macosx sdk
MACOSX_SDK=MacOSX10.11.sdk ./build.sh update macosx-x86-32
2019-03-22 01:32:28 -05:00
Doug Coleman 60c80e4b78 make: Use the MacOSX 10.13 SDK for x86 support.
Bugfix - CFLAGS += instead of CFLAGS = because it would get overwritten otherwise.

Also allow overwriting of XCODE_PATH for non-standard path.

Download the 10.13 SDK from
https://github.com/phracker/MacOSX-SDKs/releases

```bash
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.13.sdk.tar.xz
xz --uncompress MacOSX10.13.sdk.tar.xz
tar xvf MacOSX10.13.sdk.tar
mv MacOSX10.13.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
```
2019-03-22 00:09:06 -05:00
Doug Coleman d6c3cff581 debian: Don't install gcc g++ on debian.
gmake assumes default CC is cc, CXX is g++ (not c++).
In order to make this sane (c++), we check if the shell variable CXX was set
and if so we honor it, else we set CXX to c++.
2019-03-08 21:19:33 -06:00
Doug Coleman a9871b39aa vm: Fix DEBUG flag, make REPRODUCIBLE work like debug, minor fixes to build.sh
- ``make DEBUG=0`` caused debug mode because the check was ``ifdef DEBUG`` which is true even if DEBUG=0
- no need to ``#pragma message`` that we are doing a reproducible build imo
- clang warns about redefining builtin macros, turn the warning off for reproducible builds
- add ``./build.sh info`` as an alias for ``./build.sh report``
- show if we a reproducible in report/info
2019-02-23 16:23:33 -06:00
Cat Stevens 044f7bbe11 vm/master.hpp: optional reproducible VM compilation
The old behaviour of building with `__DATE__` and
    `__TIME__` is still the default, but now it's
    possible to use `-DREPRODUCIBLE=1` and the
    `REPRODUCIBLE=1` parameter to `make` and `nmake`.

Specifically, this replaces the value of
    `FACTOR_COMPILE_TIME` with the string constant
    `"[reproducible]"`. This is purely a cosmetic
    change.
2019-02-20 15:50:06 -05:00
Doug Coleman 205018869b vm: Add freebsd32 support for completeness.
We need gmake on freebsd.
2019-02-09 19:40:54 +00:00
Doug Coleman 123327115d config.freebsd: Link the UI libraries into the Factor VM.
This should happen for other BSD platforms as well.
2019-02-09 18:49:29 +00:00
Doug Coleman d139924bf5 vm: Use the old FreeBSD os-freebsd.cpp so we don't need procfs installed (it's not mounted by default). 2019-02-08 22:07:02 +00:00
Jack Lucas 3154242a3a Re-add Freebsd Support 2019-02-08 19:17:30 -05:00
Doug Coleman e6e7655cbd vm: Fix some really minor warnings. 2018-07-27 21:35:55 -05:00
Doug Coleman 2a409c79e0 vm: Fix unused variable warnings on Windows. 2018-07-13 00:48:58 -05:00
Doug Coleman 0939974c65 contexts.cpp: Don't warn on unused variables. 2018-07-13 00:00:55 -05:00
Doug Coleman aa87e69d25 Revert "VM: removing the unused callstack-bounds primitive"
This reverts commit c55a6ef873.

This primitive is useful for fixing the macOS pthread bug and the javascriptcore library.
2018-06-03 22:12:28 -05:00
John Benediktsson 1d8ca2c835 vm/mach_signal.cpp: didn't need mach_msg_return_t. 2018-05-03 19:17:33 -07:00
John Benediktsson dd5be66957 vm: fix COMPILE-TIME to use __DATE__ and __TIME__
Those are "time the preprocessor is run", not "date and time of the last
modification of the current source file" like __TIMESTAMP__.
2018-03-22 10:41:34 -07:00
Cat Stevens 21cb42edf3 cast fixes undefined behaviour; closes #1919 in upstream 2018-01-31 17:15:54 +01:00
Björn Lindqvist d454072564 VM: init object_counter, silences valgrind #1886 2018-01-26 17:17:29 +01:00
Björn Lindqvist 0100d22809 VM: removing init_globals(), calling init_mvm() instead 2017-06-30 22:47:11 +02:00
Björn Lindqvist b20084317a VM: removing the annotations to please musl (#1836) 2017-06-26 17:43:14 +02:00
Björn Lindqvist 134a9fbcb4 VM: we can save the process by throwing a normal error here 2017-06-25 01:43:31 +02:00
Björn Lindqvist abbf8f8f1f VM: merging the profiling_sample and profiling_sample_count classes
This refactoring makes the code a bit simpler.
2017-06-25 01:17:12 +02:00
John Benediktsson 42ef8adec6 vm: change -nosignals to -no-signals. 2017-01-20 22:36:22 -08:00
Björn Lindqvist 20a98a38fb VM: undo 7d9bad465c
It cause the code heap to run out of memory to soon and without growth,
it crashed windows.
2016-12-15 00:49:38 +01:00
Björn Lindqvist 4737645857 VM: this struct isn't used anymore 2016-12-15 00:29:37 +01:00
Björn Lindqvist ee0b34a469 VM: don't need the data_roots here 2016-11-30 16:36:25 +01:00
Björn Lindqvist d73666b9d0 VM: the unimplemented error isn't used anymore
Cause all the primitives are implemented so it can never ever be
thrown. Probably requires new boot images.
2016-11-23 10:24:52 +01:00
Björn Lindqvist 0590ebf914 VM: storing some sample data in the heap (#337)
This is the first half of it. In the second half the samples array
should also be stored in the heap.
2016-11-23 09:44:17 +01:00
Björn Lindqvist 90b7f9ceb3 VM: here, going through the data_root isn't needed 2016-11-23 08:17:39 +01:00
Björn Lindqvist 9927c92cbd VM: better to use a "normal" for-loop here 2016-11-23 06:42:06 +01:00
Björn Lindqvist 7661ed3b57 VM: replacing the copy assignment operators of the smart pointers
Little more to write, but much easier to see what is going on with
methods rather than assignment operator overloading.
2016-11-23 06:42:06 +01:00
Björn Lindqvist 3b3cc151e9 VM: removing factor_vm::init_contexts() 2016-11-23 06:42:06 +01:00
Björn Lindqvist 1a646d3379 VM: removing array_to_stack() from the factor_vm class 2016-11-23 06:42:06 +01:00