octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Row and column of anonymous function


From: Daniel Kraft
Subject: Re: Row and column of anonymous function
Date: Tue, 28 Jun 2011 07:48:04 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/27/11 22:35, John W. Eaton wrote:
> On 27-Jun-2011, Daniel Kraft wrote:
> 
> | And now more interesting:  How do I
> | get the line and column where the inline function was defined?  I looked
> | up through the class hierarchy, but did not find any source location
> | information in octave_user_function, octave_function, octave_base_value,
> | octave_value -- probably I missed it; or is it somewhere else?  How do I
> | get this information, so I can fill in the "42:42" above with the real
> | values?
> 
> Line and column info for tokens is only stored in the parse tree.  I
> would not want to store that information in the octave_value class for
> every value object.  If it is only needed for functions, then I guess
> we could store the info there when creating the function object.

Ok, thanks -- so then I would have to set it from some of the pt-*
classes where the function object is generated?  Sounds reasonable.
Maybe I also think again about you're suggestion of caching the profiler
name, and then just call something like

octave_function::stash_profiler_name (function_name, file, line, column)

on it when creating the function.  I'll look into this.

Yours,
Daniel

- -- 
http://www.pro-vegan.info/
- --
Done:  Arc-Bar-Cav-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Mon-Pri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOCWsUAAoJEFJ+ebqjtTmYEpsQAM0pA2700RSTWjqRtvQ9/RIn
Rs02P0ebhq2CKRgIJO75qrTj6IaylNYL4cwAJIVrDUYwIVEXCy4R1d+aHqWN/Mqp
eH+5MAJ3XD2XNIgdp0k3KKPuOLi4up3ZvAL91LhRW6cQNRfYqNo5PLZ/X5aOvrgF
ZXvUvf573wP87AaFgQ6D6glYs/5XBz48d0YjnZgkFqXn07AocbFiqUtgQMIzY079
QP+6rcBSig4qMTvZBDTh2vEeYnTdh15QPmEx2sC/Iu1Mz2knWfboDc52e25GY2NR
MMQTpAfkMUZ0+G4RKHQMMFNeDoY5KbBWX5MyTJbLib8GrA7HdoHC9qCwfQ/GZl0h
KmOA7VaqAKxBFGgTuuQgDQyfP6aqAdDddZc/KefwgGeF05ZcC/LSJ5JOjAjjwk1n
ujAskx7klsIULUvlzKSHhutWuS3jyDa4ZF+NWXnx5fLq3120PHtp1BJ4UZmVMEfO
HENsKvbpZYPSUaHDfiq2Xs5AK0rfhbvpua3t0AIadldEzXfPntgoWoDkXIBWN0kP
TTABERwDAoRZ9uw70NFAHsgWz7h7Ol+gk6GKet2DpwCMWEeolgeEpa25uF51BlzQ
B5acNOyRli6iahJ9QaPCM0hDkkTU2ItS6T3Ps4aFU7S2VMQGN+jmM5BEjhzD3p0O
EaUZxBH0kfftrgW9isP+
=YcnX
-----END PGP SIGNATURE-----


reply via email to

[Prev in Thread] Current Thread [Next in Thread]