Re: [BLACKBOX] structured return types - was: BlackBox 1.6 final version? - Complex numbers

From: [at]} <Bernhard>
Date: Thu, 2 Jul 2009 20:40:38 +0200

----boundary-LibPST-iamunique-225612291_-_-
Content-type: text/plain

 [...]
>
> While the restriction is generally a good idea it becomes a bad idea when
> considering facilities (like COMPLEX functions) which allow general
> operations / expressions involving structured types. This is presumably
> why
> 'Structured Return Values' were added to OberonX at the same time as
> user-defined operators.
>

the missing "structured" return types (even in interface modules) turn the
task of creating interface modules to foreign DLLs (e.g. GSL, see
http://www.gnu.org/software/gsl/ and/or
http://www.gnu.org/software/gsl/manual/html_node/) very difficult.

GSL returns complex numbers on the stack, I am still searching
for a solution in the interface module for GSL. One solution I have
been thinking of, would be some code procedure, which takes
as argument an allocated pointer to complex and pops the values
which are left by the foreign function into these addresses, but
I did not find the time to dig into assembler and test this idea.

Structured return values would solve that.

But personally I would postpone such changes and keep them
in the queue for a later version. If such changes are encorporated
therer should be a longer period of testing.

I think it could be extracted from the Native Oberon compiler
and fittted into the CP compiler; we could have two compiler
frontends in parallel ...

regards
Bernhard Treutwein


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-225612291_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIw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mliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNU
U0VSVkBMSVNUUy5PQkVST04uQ0hccGFyDQp9
----boundary-LibPST-iamunique-225612291_-_---
Received on Thu Jul 02 2009 - 20:40:38 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:46 UTC