From c59fe5fe4739f0c61560f05d4e42b4e552219b27 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 28 May 2011 02:18:52 +0000 Subject: asy 2.10 git-svn-id: svn://tug.org/texlive/trunk@22633 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/utils/asymptote/stack.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'Build/source/utils/asymptote/stack.h') 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 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(); -- cgit v1.2.3