Doug Coleman
9f213f96f6
core: Add the shuffler words but without primitives.
...
The nipd branch slowed bootstrap by a minute, this patch does not.
sorry about changing the fjsc line endings...
2018-06-19 22:52:58 -05:00
Doug Coleman
310a4a247c
alien.libraries: load-library is misnamed, refactor library-dll.
...
load-library implies that dlopen() is called, which is totally not the
case. add-library calls dlopen() and load-library just looks the opened
library up in the ``libraries`` global. What load-library did is now
library-dll.
If we want to do it right, add-library should be a declarative top-level
form that tries to call a real load-library on demand instead of
memoizing the first try which would fix the case where the library is
not found, is moved into position by the user and Factor declines to
look it up again.
2018-02-19 10:38:21 -06:00
Björn Lindqvist
a9ac763912
alien.libraries: word>dlsym was a stupid idea that didn't work
...
The def>> attribute is stripped when deploying. So return dlsym? and use
that.
2016-11-30 16:36:24 +01:00
Björn Lindqvist
2ba659dcb1
io.sockets.secure,alien.libraries: new word word>dlsym to replace the dlsym? word
2016-11-30 11:51:54 +01:00
John Benediktsson
98ed2a8ee5
alien.libraries: split update-library and add-library again.
2016-03-29 06:07:14 -07:00
John Benediktsson
12350404f2
alien.libraries: merge update-library and find-library.
2016-03-28 22:49:23 -07:00
Doug Coleman
27b954f95b
alien.libraries: Add a way to see if a dll has a function.
2016-03-04 09:14:49 -08:00
John Benediktsson
ceb75057da
change ERROR: words from throw-foo back to foo.
2015-08-13 16:13:05 -07:00
John Benediktsson
0e1169ceab
alien.libraries: try out throw-foo.
2015-08-13 06:52:06 -07:00
Doug Coleman
e3ddd337e0
compiler, alien: fix some duplication in ERROR: definitions. hope this doesnt trigger more failing builds than it fixed...
2015-08-12 13:58:38 -05:00
John Benediktsson
0fbd2fd472
alien.libraries: don't need << >>.
2015-07-28 19:13:13 -07:00
Doug Coleman
44e8e7b344
primitives: Change PRIMITIVE: to check that the word is in that vocabulary and the stack effect is correct.
...
Use PRIMITIVE: in core/ and basis/
2015-06-25 18:02:03 -07:00
Doug Coleman
5908f301b9
alien.libraries: Add update-library. See #1185
2015-06-16 19:56:34 -07:00
Doug Coleman
9bbf0af6e8
Revert "alien.libraries: Normalize the path before opening a dll since"
...
This reverts commit 05aabb13f4
.
2014-07-07 23:31:59 -07:00
Doug Coleman
05aabb13f4
alien.libraries: Normalize the path before opening a dll since
...
find-library can return paths that have "resource:" in them.
2014-07-08 01:12:44 -05:00
Doug Coleman
d10443186c
alien.libraries.finder: Make find-library return the string passed in instead of f if the library is not found. We want vocabularies to load no matter what instead of throwing a missing library error. Also, print dlerror in the error message and take away the redundant line about possible missing libraries. Fixes #986 .
2014-06-07 20:58:14 -07:00
Doug Coleman
40a79766af
alien.libraries: Change <library> to be just a constructor. Replace with make-library and try-make-library so that we throw better errors.
2014-06-05 14:28:37 -07:00
John Benediktsson
351d68b1e1
Revert "alien.libraries: dlopen should handle resource:-paths"
...
This reverts commit cc663fff88fa7321af6deea424890128d3b0bc07.
Conflicts:
basis/alien/libraries/libraries-tests.factor
2013-12-20 21:07:31 -08:00
Björn Lindqvist
ab7494eef9
alien.libraries: dlopen should handle resource:-paths
2013-12-12 18:00:25 -08:00
Doug Coleman
f820215b1e
alien.libraries: Rename library to lookup-library.
2013-03-23 17:16:46 -07:00
John Benediktsson
3cfce74d28
Revert "alien.libraries: allow "foo f address-of" to be folded."
...
This reverts commit 96c7a59ad2
.
2012-07-31 22:11:25 -07:00
John Benediktsson
7b7df45c50
alien.libraries: allow "foo f address-of" to be folded.
2012-07-31 22:03:06 -07:00
Doug Coleman
94db86a6db
Make "foo.private" require load foo instead.
...
Move require from vocabs.loader to vocabs. Update everything.
Fixes #201 .
2011-11-02 11:50:03 -07:00
Joe Groff
5703e8d7a1
alien.libraries, compiler.cfg.builder.alien: if `dlopen` fails during `<library>`, call `dlerror` and store the error message in the library object; put the dlerror message in the linkage-error when a word from the library is compiled
2011-09-12 23:25:59 -07:00
Joe Groff
b6e0f0180b
alien.libraries, compiler.cfg.builder.alien: include the result of dlerror/GetLastError in the linkage-error for missing symbols
2011-09-12 23:25:59 -07:00
Erik Charlebois
64252dbdbc
32 and 64 bit Linux PPC support
2011-05-23 23:36:14 -04:00
Slava Pestov
b03a16ef4d
alien.libraries: add-library won't close and re-open the library if nothing changed. This fixes a crash on Windows when reloading the windows vocab
2010-10-25 23:39:15 -05:00
Slava Pestov
1834241e5a
alien.libraries, stack-checker.alien: check user inputs more carefully to ensure that invalid ABI descriptors don't slip through and break random stuff (reported by prunedtree)
2010-05-18 18:46:31 -04:00
Slava Pestov
becb7c78b7
Move non-parsing words out of alien.syntax, and use a symbol instead of a string variable to store the current library in alien.parser
2010-04-12 18:09:26 -05:00
Joe Groff
65c3259761
"cdecl" -> cdecl
2010-03-31 19:20:35 -07:00
Slava Pestov
23a1f0ed8c
alien: some code cleanups and fixes
2010-02-23 01:28:56 +13:00
Joe Groff
42089b6586
alien.libraries: add a "deploy-library" word that marks a library to have its dll deployed with applications that use it. add support to tools.deploy to find and copy deployed libraries into target bundle
2010-02-16 13:32:58 -08:00
Slava Pestov
0612bc6177
Factor source files should not be executable
2009-11-21 17:50:43 -06:00
Slava Pestov
1993274d01
alien.libraries: add-library should now reload the library properly, instead of just leaking DLL handles
2009-07-31 19:46:18 -05:00
Slava Pestov
15c7499ef5
alien.libraries: add dispose method for library tuple, and remove-library word; add-library first calls remove-library to properly close the library when reloading
2009-07-09 06:41:51 -05:00
Slava Pestov
a6afbea707
alien.libraries: Fix dlsym on Windows
2009-05-05 16:00:31 -05:00
Slava Pestov
a63ad6a7a5
Remove cruddy string encoding/decoding code from VM
2009-05-02 13:45:38 -05:00
Doug Coleman
63e06589bd
don't normalize-path in add-library
2009-03-26 18:56:10 -05:00
Doug Coleman
3c1b716bf9
move a lot of words to alien.libraries
2009-03-25 23:00:02 -05:00