diff options
author | Karl Berry <karl@freefriends.org> | 2010-07-05 22:26:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-07-05 22:26:04 +0000 |
commit | 648027bec248a7b000741a507b507f6d89941ce5 (patch) | |
tree | ce3b82b43a8b17403eda43db782bbf2e5bf0e161 /Build/source/utils/asymptote/coder.h | |
parent | 5ff8f96c8ab3bd3aeb8fed8d512c57134fb2a6cc (diff) |
asy 2.00
git-svn-id: svn://tug.org/texlive/trunk@19250 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/coder.h')
-rw-r--r-- | Build/source/utils/asymptote/coder.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Build/source/utils/asymptote/coder.h b/Build/source/utils/asymptote/coder.h index 92176cf774b..0405e6d18d7 100644 --- a/Build/source/utils/asymptote/coder.h +++ b/Build/source/utils/asymptote/coder.h @@ -18,6 +18,7 @@ #include "program.h" #include "util.h" #include "modifier.h" +#include "inst.h" namespace trans { @@ -104,15 +105,18 @@ public: // its own frame, which is the usual (sensible) thing to do. It is set to // false for a line-at-a-time codelet, where variables should be allocated in // the lower frame. - coder(string name, function *t, coder *parent, + coder(position pos, + string name, function *t, coder *parent, modifier sord = DEFAULT_DYNAMIC, bool reframe=true); // Start encoding the body of the record. The function being encoded // is the record's initializer. - coder(record *t, coder *parent, modifier sord = DEFAULT_DYNAMIC); + coder(position pos, + record *t, coder *parent, modifier sord = DEFAULT_DYNAMIC); - coder(string name, modifier sord = DEFAULT_DYNAMIC); + coder(position pos, + string name, modifier sord = DEFAULT_DYNAMIC); coder(const coder&); @@ -179,17 +183,18 @@ public: bool isRecord(); // Creates a new coder to handle the translation of a new function. - coder newFunction(string name, function *t, modifier sord=DEFAULT_DYNAMIC); + coder newFunction(position pos, + string name, function *t, modifier sord=DEFAULT_DYNAMIC); // Creates a new record type. record *newRecord(symbol id); // Create a coder for the initializer of the record. - coder newRecordInit(record *r, modifier sord=DEFAULT_DYNAMIC); + coder newRecordInit(position pos, record *r, modifier sord=DEFAULT_DYNAMIC); // Create a coder for translating a small piece of code. Used for // line-at-a-time mode. - coder newCodelet(); + coder newCodelet(position pos); frame *getFrame() { @@ -265,6 +270,10 @@ public: encode(i); } + // Encodes a pop instruction, or merges the pop into the previous + // instruction (ex. varsave+pop becomes varpop). + void encodePop(); + // Puts the requested frame on the stack. If the frame is not that of // this coder or its ancestors, false is returned. bool encode(frame *f); |