summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/stack.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-05-28 02:18:52 +0000
committerKarl Berry <karl@freefriends.org>2011-05-28 02:18:52 +0000
commitc59fe5fe4739f0c61560f05d4e42b4e552219b27 (patch)
tree8cf79e85e394b3177a28d374415840a4e0a025ad /Build/source/utils/asymptote/stack.h
parent771db15706dbf3f4af8b630dcb15646a3e5fda00 (diff)
asy 2.10
git-svn-id: svn://tug.org/texlive/trunk@22633 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/stack.h')
-rw-r--r--Build/source/utils/asymptote/stack.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/Build/source/utils/asymptote/stack.h b/Build/source/utils/asymptote/stack.h
index bb42074800d..4cb2ef0b41e 100644
--- a/Build/source/utils/asymptote/stack.h
+++ b/Build/source/utils/asymptote/stack.h
@@ -56,17 +56,8 @@ private:
typedef mem::vector<item> stack_t;
stack_t theStack;
-#ifdef DEBUG_FRAME
- vars_t make_frame(string name, size_t, vars_t closure);
-#else
- vars_t make_frame(size_t, vars_t closure);
-#endif
-
void draw(ostream& out);
- // Move arguments from stack to frame.
- void marshall(size_t args, vars_t vars);
-
// The initializer functions for imports, indexed by name.
importInitMap *initMap;
@@ -84,6 +75,9 @@ private:
position lastPos, breakPos;
bool newline;
+ // Move arguments from stack to frame.
+ void marshall(size_t args, stack::vars_t vars);
+
public:
stack() : e(0), debugOp(0), lastPos(nullPos),
breakPos(nullPos), newline(false) {};
@@ -102,8 +96,9 @@ public:
return e;
}
- // Runs the instruction listed in code, with vars as frame of variables.
- void run(program *code, vars_t vars);
+ // Runs a lambda. If vars is non-null, it is used to store the variables of
+ // the lambda. Otherwise, the method allocates a closure only if needed.
+ void runWithOrWithoutClosure(lambda *l, vars_t vars, vars_t parent);
// Executes a function on top of the stack.
void run(func *f);
@@ -158,6 +153,7 @@ inline T pop(stack* s, T defval)
class interactiveStack : public stack {
vars_t globals;
+ size_t globals_size;
public:
interactiveStack();