diff options
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/ast.boot | 20 | ||||
-rw-r--r-- | src/boot/initial-env.lisp | 5 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot index 270b1221..819f79d4 100644 --- a/src/boot/ast.boot +++ b/src/boot/ast.boot @@ -1249,9 +1249,9 @@ genTypeAlias(head,body) == -- This is used to communicate data between native -- functions and OpenAxiom functions. The `buffer' type -- constructor must be used in conjunction with one of the --- modifier `readonly' or `writeonly', and instantiated --- with one of `char', `byte', `int', `float', and `double'. --- It cannot be used a function return type. +-- modifiers `readonly', `writeonly', or `readwrite', and +-- instantiated with one of `char', `byte', `int', `float', +-- and `double'. It cannot be used as function return type. -- Note that the length of the array is not stored as -- part of the data being transmitted. @@ -1327,7 +1327,7 @@ nativeArgumentType t == coreError '"invalid argument type for a native function" [m,[c,t']] := t -- Require a modifier. - not (m in '(readonly writeonly)) => + not (m in '(readonly writeonly readwrite)) => coreError '"missing modifier for argument type for a native function" -- Only 'pointer' and 'buffer' can be instantiated. not (c in '(buffer pointer)) => @@ -1339,7 +1339,7 @@ nativeArgumentType t == ++ True if objects of type native type `t' are sensible to GC. needsStableReference? t == - not atom t and first t in '(readonly writeonly) + not atom t and first t in '(readonly writeonly readwrite) ++ coerce argument `a' to native type `t', in preparation for ++ a call to a native functions. @@ -1471,9 +1471,9 @@ genCLISPnativeTranslation(op,s,t,op') == [KEYWORD::LANGUAGE,KEYWORD::STDC]] -- The forwarding function. We have to introduce local foreign - -- variables to hold the address of converted Lisp obejcts. Then - -- we have to copy back those that are `writeonly' to simulate - -- the reference semantics. Don't try ever try to pass around + -- variables to hold the address of converted Lisp objects. Then + -- we have to copy back those that are `writeonly' or `readwrite' to + -- simulate the reference semantics. Don't ever try to pass around -- gigantic buffer, you might find out that it is insanely inefficient. forwardingFun := null unstableArgs => ["DEFUN",op,parms, [n,:parms]] @@ -1483,11 +1483,11 @@ genCLISPnativeTranslation(op,s,t,op') == actualArg(p,pairs) == a' := rest ASSOC(p,pairs) => rest rest a' p - -- Fix up the call if there is any `writeonly' parameter. + -- Fix up the call if there is any `write' parameter. call := fixups := [q | not null (q := copyBack p) for p in localPairs] where copyBack [p,x,y,:a] == - x isnt ["writeonly",:.] => nil + x is ["readonly",:.] => nil ["SETF", p, [bfColonColon("FFI","FOREIGN-VALUE"), a]] null fixups => [call] [["PROG1",call, :fixups]] diff --git a/src/boot/initial-env.lisp b/src/boot/initial-env.lisp index 7c98e734..dd67e0c4 100644 --- a/src/boot/initial-env.lisp +++ b/src/boot/initial-env.lisp @@ -1,6 +1,6 @@ ;; Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. ;; All rights reserved. -;; Copyright (C) 2007-2008, Gabriel Dos Reis. +;; Copyright (C) 2007-2009, Gabriel Dos Reis. ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without @@ -49,7 +49,8 @@ (:export "loadNativeModule" "loadSystemRuntimeCore" "$InteractiveMode" - "string2BootTree")) + "string2BootTree" + "genImportDeclaration")) (in-package "BOOTTRAN") |