octave-maintainers
[Top][All Lists]
Advanced

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

Anonymous functions


From: Daniel Kraft
Subject: Anonymous functions
Date: Fri, 05 Aug 2011 19:11:04 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110624 Thunderbird/5.0

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

Hi Jordi and all,

there's at least some progress towards anonymous functions -- and
actually the problem with missing line/column was that it is not set in
make_anon_fcn_handle in the parser (this is a FIXME).  I think the
current solution is also not perfect, since the column is not correct
(i.e., the position is that of the end of the definition, not the @
sign).  But it's a long time since I used yacc/bison, so I was not sure
how to get the location of the @ itself.

For now, this gives at least some information, and output of the form
"anonymous@:line:column" in the profiler for different anonymous functions.

I also tried to get the file name in there, but if I uncomment the line
near the end of make_anon_fcn_handle (line 2098 of oct-parse.yy with my
patch applied), I can no longer call the function: "no longer valid
function handle" at line 187 of ov-fcn-handle.cc.  It seems that setting
the file-name makes fcn.is_defined() false -- I've no idea why.  Does
this ring a bell somewhere?

For now, I provide the attached patch (since it is still work in
progress, I didn't commit it to my hg history and it's a raw patch; hope
that's ok).  It would be really cool if someone had an idea why
is_defined() becomes false when I set the file-name.  If not, I'll try
to figure that out myself.

Yours,
Daniel

- -- 
OpenPGP: 3BA2 3DDB 7758 F010 BDAB 0DCF 527E 79BA A3B5 3998
or use https://safesend.domob.eu/
- --
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/

iQIcBAEBAgAGBQJOPCQnAAoJEFJ+ebqjtTmY5pcP/0EENW1DQlC6DreQbIzXp03u
0G09NKavAmz6mKhCEBRVNsp4eT1btaF/FF5EXugjCNUlmOaph3fsYu6wvKLM1LDW
Zfr5jRA9CvOnJMV1Cw44/zNfw7NqBlEhunQeOPO42pVDgmG8W0XtehJf7G8nBcnq
LVs+PUbVPd6AgNlSy8bQlrN1DSVd+r+J9uivs8QrVACOaon/1yWFqNNhUUsvGSo6
R6Zv9Tmya0t0mx0FZnQbiKYLmVFubwx98PXovyuWV3hw69wq1/M6/Ctr64JRAV9L
vGKYG0mMK9QQsgSDuCkKDlpDy7+q4vD7jObeA9YuIAmV5S8mNLvaw41ZB5xMO5/6
C3zLff1inYbn2n2Mm6RQMJU/s2tEdugfJt+u+Z3YryGrOzFFC4VmtglMNtRlz4nD
n/Am92gXZxq2WqvLEj1IQpU2bKdS6B6RZHJ5xk8IaWiKWp5XGR3fS3KP+KDbf5Yu
g21F/jnC9Ai7DkQrLV6pTTBAcMJUoQSVSsZcexrIJ2LQX01BGpp4YN02DKxd8edl
skFfCDayl37VDAvRw2CB8oJz1PXTzN9zl/bVdGXrzuP5W2HFtpIbovGgs093EVkA
9seiNK1bg/4xWtVqPdwIBi78lJ2XAqgzYlrz/KQPSQCsOm1V0qcRS0uV3RcLJbpN
F3enhSarZaHWbBwJb0qE
=n+7g
-----END PGP SIGNATURE-----

Attachment: patch.diff
Description: Text document

Attachment: patch.diff.sig
Description: Binary data

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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