REBOL3 tracker
  0.9.12 beta
Ticket #0001577 User: anonymous

Project:



rss
TypeBug Statustested Date23-Apr-2010 11:15
Versionalpha 97 CategoryNative Submitted bymeijeru
PlatformAll Severityminor Prioritynormal

Summary BODY-OF treats op! values derived from natives differently from those derived from actions
Description Values of type op! have either a corresponding action (e.g. + and ADD) or a corresponding native (e.g. = and EQUAL?). On all values of type any-function! the reflector BODY-OF is defined. On actions this yields a number, and so it does on the corresponding op. On natives it yields NONE, but on the corresponding op, it yields the machine address of the handling routine (which is also stored with the native, of course, only never revealed).
Example code
>> body-of :add
== 1 ;; is in fact the ordinal in SYSTEM/CATALOG/ACTIONS
>> body-of :+
== 1
>> body-of :equal?
== none
>> body-of :=
== 4336624

Assigned ton/a Fixed inalpha 98 Last Update6-May-2010 09:35


Comments
(0002234)
Carl
26-Apr-2010 20:21

Since ops are infix trampolines, BODY-OF should return the same result as it would on the target of the redirection. That result is NONE for natives and actions.
(0002237)
meijeru
26-Apr-2010 20:27

That result is currently NOT NONE for actions. So you are not only rectifying the result for natives, but also changing it for actions?
(0002336)
BrianH
6-May-2010 09:35

The value returned from actions and ops was *not* the body, so BODY-OF now returns none.

Date User Field Action Change
6-May-2010 09:35 BrianH Comment : 0002336 Added -
6-May-2010 09:34 BrianH Status Modified built => tested
1-May-2010 08:46 carl Fixedin Modified => alpha 98
26-Apr-2010 20:27 meijeru Comment : 0002237 Added -
26-Apr-2010 20:21 carl Code Modified -
26-Apr-2010 20:21 carl Status Modified submitted => built
26-Apr-2010 20:21 carl Comment : 0002234 Added -
23-Apr-2010 11:15 meijeru Ticket Added -