[Jastadd] String tokens

From: Jesper Mattsson <jesper.mattsson_at_modelon.com>
Date: Fri, 7 Dec 2012 13:14:28 +0000

Hi all

When compiling with the "beaver" flag set, then all String tokens will generate two public int fields in the node class.
A :== <B>;
will give the fields:
public int Bstart;
public int Bend;

These fields are set when using the A.setB(beaver.Symbol) method or A(beaver.Symbol) constructor, but they are as far as I can tell never read from generated code.

The fields incur a cost of 8 bytes for each such Token. I suggest either adding a flag that controls if the fields are generated, or removing them entirely. If the latter option is chosen, then any user needing the functionality would easily be able add it themselves for the specific tokens they need it, and still save memory on any others.

For comparison, these fields alone comprises 1% of the memory use of the JModelica.org compiler for a model that I am currently using as benchmark.


Software Developer & IT Administrator

Phone direct: +46 73 324 5909
Email: jesper.mattsson_at_modelon.com<mailto:jesper.mattsson_at_modelon.com>

[Description: Description: Modelon_2011_Gradient_RGB_400]
Modelon AB
Ideon Science Park
SE-223 70 Lund, Sweden

Phone: +46 46 286 2200
Fax: +46 46 286 2201

Web: http://www.modelon.com<http://www.modelon.com/>

This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged. If you are not one of the named recipients or have received this email in error, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this email and all attachments, (iii) Modelon does not accept or assume any liability or responsibility for any use of or reliance on this email.

(image/png attachment: image001.png)

Received on Fri Dec 07 2012 - 14:15:11 CET

This archive was generated by hypermail 2.3.0 : Wed Apr 16 2014 - 17:19:06 CEST