octave-maintainers
[Top][All Lists]
Advanced

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

PING: Anonymous functions


From: Daniel Kraft
Subject: PING: Anonymous functions
Date: Thu, 08 Sep 2011 21:30:34 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

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

Hi all,

I'm back from holidays; and just remembered this patch.  What do you
think about it, any new ideas?

Or should I turn it into a commit so that we at least fix row/column
partially for now?

Yours,
Daniel

- -------- Original Message --------
Subject: Anonymous functions
Date: Fri, 05 Aug 2011 19:11:04 +0200
From: Daniel Kraft <address@hidden>
To: Jordi GutiƩrrez Hermoso <address@hidden>
CC: Octave Maintainers List <address@hidden>

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOaRfZAAoJEFJ+ebqjtTmYGAwP/1gaRwhdBs9YK9v4t2p218uu
67OkpG1DTCfTxrBFe7/6GkN4Ef+JsjqT3sa1norJFqfdq4S/sglIXkSnND9gZ9P9
8eIWE3YgtCVBtv/rQjUWFPxA9StUsOzYBxxoNfTdxVx8mv48y0HqIm7zbn1OhTNH
fC95vkZRF+gmmzLioZ9ZS1nhxh/yU7gnsJfkxSEudUNQhLSMdlgGU5s4R8vXyJDu
zxV20giDuz9vsf/6m+xhA/TUAYn2nff8PDOBoTUHCgxqg4uyIbpZCHIUJAjm0Gx+
nsXWotXghbWi13Ok/WoalB1InyGF+hJmTqX5T/eNZ0hLGYIouLN9lGLLUFEIdpis
BafyBdTfSQg9o+zqoLTDxkiWP4DnhF5aKcsXcYARETcj/OszkqA0xuoKoj7LwfVU
lIOI1ecgPWju0d9jgmvcI7IRs5UaoevtFpItf0nWUhqguxZ7bGnE2b2Z4+nJYlDR
keyYoqX+ZeQ7roAIS6YvloFIEKHuT3DhaqMoynLRPI/bU5KdTlCCOKb/jBe5vin8
hbqubeeBPEzc1F2o3ZG1phqtQRIt+7OELhk54R1PCNgtcXgne1/JfkyVRyV/iwBO
TzrpVlB8HuACeUQGERsDf2d2TaiUjnaPK5AIdZk29t8AxhCBVUiMvZTMs9lQNE+i
GznHcZf8Paa0XdpfSh4g
=tiqj
-----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]