octave-maintainers
[Top][All Lists]
Advanced

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

Re: Possible GSoC Project: AOT "bytecode" compiler for octave


From: Lasse Schuirmann
Subject: Re: Possible GSoC Project: AOT "bytecode" compiler for octave
Date: Wed, 12 Feb 2014 16:11:52 +0100

On Wed, 2014-02-12 at 09:47 -0500, Jordi GutiƩrrez Hermoso wrote:
> On Wed, 2014-02-12 at 15:01 +0100, Lasse Schuirmann wrote:
> 
> > I also have successfully serialized a tree_statement_list that
> > contained a comment with some rather generic methods I wrote. I am
> > relatively sure that this would work well with the JIT compiler
> > since this is on the evaluation side only.
> [snip]
> > I would like to participate on the google summer of code with this project
> > if you think that would be useful.
> 
> This sounds useful. Can you show us your patches?
> 
> - Jordi G. H.
> 
> 

Of course. My general approach for serialization is hosted here in a git
repository:
https://bitbucket.org/sils1297/serialization-test

A patch for octave is appended to this email. Please do not judge me by
this code, it was meant to be an experiment.

If you patch your version of octave with this patch, create a directory
named "tmp" and execute octave in the parent directory of tmp, the
version will save a serialized version of every statement to tmp/tmpA
(B, C, ...). You will find an example execution below my signature.

Serialization should work with comments (and nothing else). I did not
test deserialization with octave yet.

Greetings,

Lasse Schuirmann

Example:
~/prog/octave/build$ ./run-octave --no-gui
octave:1> x=1 # a comment!
tmp/tmpA
x =  1
octave:2> exit
tmp/tmpB

~/prog/octave/build$ cd tmp 
~/prog/octave/build/tmp$ hexdump -c tmpA
0000000 001 001  \0  \0  \0  \0  \0  \0  \0 001 377 377 377 377 377 377
0000010 377 377  \0  \0 001 001  \0  \0  \0 002  \0  \0  \0  \0 001 001
0000020  \0  \0  \0  \0  \0  \0  \0 003  \0  \0  \0  \f  \0  \0  \0  \0
0000030  \0  \0  \0       a       c   o   m   m   e   n   t   !  \n    
000003f

Attachment: serialization.patch
Description: Text Data


reply via email to

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