[run2value
strick**20120319044447
 Ignore-this: 92ccf4ea511c372bc21c14951c0ac236
] hunk ./terse-vm/prelude.txt 13
-meth Blk tuple
-  self vec
-meth Blk list
-  self vec
hunk ./terse-vm/prelude.txt 19
-      'he' ap: 'l' ,, ap: 'lo'
+      'he' ap: 'l' $ ap: 'lo'
hunk ./terse-vm/prelude.txt 39
-equals 1
-	'Vec' == Vec name
+equals 'Vec'
+	Vec name
hunk ./terse-vm/prelude.txt 42
-equals VEC[ 4. 7. 9. ]
-    VEC[ 2 * 2. 7. 3 * 3. ]
+equals 4, 7, 9
+    2 * 2; 7; 3 * 3;
hunk ./terse-vm/prelude.txt 50
+	(8;) cls name
+equals 1
+	(8;) len
+equals 'Vec'
hunk ./terse-vm/prelude.txt 58
-	x, y = Vec[3. 4].   x * x + y * y.
+	x, y = Vec(3, 4).   x * x + y * y.
hunk ./terse-vm/prelude.txt 60
-	x, y = 3, 4.   x * x + y * y ,, + 1.
+	x, y = 3; 4.   x * x + y * y $ + 1.
+equals 26
+	x; y = 3, 4.   x * x + y * y $ + 1.
hunk ./terse-vm/prelude.txt 66
-    n: ['Vec.== expected Vec argument, but got' err: VEC[a. a cls. a cls name. a cls name equals: 'Vec'] ]
+    n: ['Vec.== expected Vec argument, but got' err: VEC(a, a cls, a cls name, a cls name equals: 'Vec') ]
hunk ./terse-vm/prelude.txt 69
-        n: ['Vec.== got different length Vecs' err: VEC[self. a]]
+        n: ['Vec.== got different length Vecs' err: VEC(self, a)]
hunk ./terse-vm/prelude.txt 79
-equals Vec[1. 1. 0.]
-  Vec['foo'. 100. 'z'] == Vec['foo'. 100. 'zoo']
+equals 1, 1, 0
+  Vec('foo', 100, 'z') == Vec('foo'; 100; 'zoo')
hunk ./terse-vm/prelude.txt 86
-      z ap: ( a run: x ) ] .
+      z ap: ( a value: x ) ] .
hunk ./terse-vm/prelude.txt 89
-equals VEC[ 100. 400. 900. ]
-  VEC[ 10. 20. 30. ] collect: [x :  x * x]
+equals VEC( 100, 400, 900. )
+  VEC( 10, 20, 30. ) collect: [x :  x * x]
hunk ./terse-vm/prelude.txt 96
-      ( a run: x ) y: [
+      ( a value: x ) y: [
hunk ./terse-vm/prelude.txt 100
-equals VEC[ 10. 20. ]
-  VEC[ 10. 20. 30. ] select: [x:  x < 25]
+equals 10, 20
+  ( 10, 20, 30. ) select: [x:  x < 25]
hunk ./terse-vm/prelude.txt 103
-meth Blk join:
+meth Vec join:
hunk ./terse-vm/prelude.txt 106
-  self vec do: [x:
+  self do: [x:
hunk ./terse-vm/prelude.txt 111
-meth Blk join
+
+meth Vec join
hunk ./terse-vm/prelude.txt 114
-meth Blk jam
+meth Vec jam
hunk ./terse-vm/prelude.txt 130
-equals Vec[33. 44]
+equals Vec[33; 44]
hunk ./terse-vm/prelude.txt 132
-equals Vec[33. 44. 55]
-  33; 44; 50 + 4 ,, + 1
-equals Vec[Vec[22. 44]. 55]
-  22, 44 ,, , 55
+equals Vec[33; 44; 55]
+  33; 44; 50 + 4 $ + 1
+equals Vec[Vec[22; 44]; 55]
+  22, 44 ; 55
hunk ./terse-vm/prelude.txt 138
-  ['once'. 'upon'. 'a'. 'time'] join: '-'
+  ('once', 'upon', 'a', 'time') join: '-'
hunk ./terse-vm/prelude.txt 140
-meth Vec tuple
-  self vec
-meth Vec list
-  self vec
-
hunk ./terse-vm/prelude.txt 143
+stop
+
hunk ./terse-vm/prelude.txt 147
-      '|link|/RESET|[RESET]|'.
-      '|link|/Home|[Home]|'.
-      '|link|/Browse|[Browse]|'.
-      '|link|/FormDoit|[Doit]|'.
-      '|link|/DrawLife|[DrawLife]|'.
-      '|link|/DrawLine|[DrawLine]|'.
-      '|link|/DrawRect|[DrawRect]|'.
-      '|link|/DrawStar|[DrawStar]|'.
-      '|link|/ListUnicodePages|[ListUnicodePages]|'.
+      '|link|/RESET|[RESET]|';
+      '|link|/Home|[Home]|';
+      '|link|/Browse|[Browse]|';
+      '|link|/FormDoit|[Doit]|';
+      '|link|/DrawLife|[DrawLife]|';
+      '|link|/DrawLine|[DrawLine]|';
+      '|link|/DrawRect|[DrawRect]|';
+      '|link|/DrawStar|[DrawStar]|';
+      '|link|/ListUnicodePages|[ListUnicodePages]|';
hunk ./terse-vm/prelude.txt 162
-          ,, at: 'title' put: a
-          ,, at: 'value' put: VEC[
-          '|link|/Home|Home|', 'Go Home.'.
-          '|link|/Reset|Reset|', 'Reset Interpreter.'.
-          '|link|/Browse|browse|', 'Browse Classes.'.
-          '|link|/FormDoit|doit|', 'Evaluate code'.
-          '|link|/DrawLife|[DrawLife]|', 'Conway''s Life'.
-          '|link|/DrawLine|[DrawLine]|', 'Draw Line'.
-          '|link|/DrawRect|[DrawRect]|', 'Draw Rect'.
-          '|link|/DrawStar|[DrawStar]|', 'Draw Star'.
-          '|link|/ListUnicodePages|[ListUnicodePages]|', 'List Unicode Pages'.
-        ].
+          $ at: 'title' put: a
+          $ at: 'value' put: (
+          '|link|/Home|Home|', 'Go Home.';
+          '|link|/Reset|Reset|', 'Reset Interpreter.';
+          '|link|/Browse|browse|', 'Browse Classes.';
+          '|link|/FormDoit|doit|', 'Evaluate code';
+          '|link|/DrawLife|[DrawLife]|', 'Conway''s Life';
+          '|link|/DrawLine|[DrawLine]|', 'Draw Line';
+          '|link|/DrawRect|[DrawRect]|', 'Draw Rect';
+          '|link|/DrawStar|[DrawStar]|', 'Draw Star';
+          '|link|/ListUnicodePages|[ListUnicodePages]|', 'List Unicode Pages';
+        ).
hunk ./terse-vm/prelude.txt 188
-        AND[ clss at: i ,, cls name ends: 'Cls' .
-             OR[ clss at: i ,, name ends: 'Cls' ,, not .
-                 clss at: i ,, cls name == 'ClsCls' . ] ] ] .
+        AND[ clss at: i $ cls name ends: 'Cls' .
+             OR[ clss at: i $ name ends: 'Cls' $ not .
+                 clss at: i $ cls name == 'ClsCls' . ] ] ] .
hunk ./terse-vm/prelude.txt 202
-          ,, at: 'title' put: 'Browsing All Classes'
-          ,, at: 'extra' put: ( clss )
-          ,, at: 'extraKeys' put: ( clss dir )
-          ,, at: 'extraCollect' put: ( clss dir collect: [i:  ( clss at: i ) cls cls name ] )
-          ,, at: 'extraSelect' put: gk
-          ,, at: 'value' put: v
+          $ at: 'title' put: 'Browsing All Classes'
+          $ at: 'extra' put: ( clss )
+          $ at: 'extraKeys' put: ( clss dir )
+          $ at: 'extraCollect' put: ( clss dir collect: [i:  ( clss at: i ) cls cls name ] )
+          $ at: 'extraSelect' put: gk
+          $ at: 'value' put: v
hunk ./terse-vm/prelude.txt 218
-      v ap: ( Jam[ '|link|/EditMethod.' . cn . 'Cls.' . x . '|class ' . x. '|' ]; d at: x ,, str ) .
+      v ap: ( Jam[ '|link|/EditMethod.' . cn . 'Cls.' . x . '|class ' . x. '|' ]; d at: x $ str ) .
hunk ./terse-vm/prelude.txt 223
-      v ap: ( Jam[ '|link|/EditMethod.' . cn . '.' . x . '|' . x. '|' ]; d at: x ,, str ) .
+      v ap: ( Jam[ '|link|/EditMethod.' . cn . '.' . x . '|' . x. '|' ]; d at: x $ str ) .
hunk ./terse-vm/prelude.txt 227
-          ,, at: 'title' put: ( 'Browsing Class' ap: cn )
-          ,, at: 'value' put: v
+          $ at: 'title' put: ( 'Browsing Class' ap: cn )
+          $ at: 'value' put: v
hunk ./terse-vm/prelude.txt 250
-          ,, at: 'title' p: ( 'Editing Class' ap: cn ,, ap: ' Method ' ,, ap: mn )
-          ,, at: 'value' p: ( mo str )
-          ,, at: 'action' p: ( '/SubmitMethod' )
-          ,, at: 'field1' p: 'ClassName'
-          ,, at: 'value1' p: cn
-          ,, at: 'field2' p: 'MethodName'
-          ,, at: 'value2' p: mn
+          $ at: 'title' p: ( 'Editing Class' ap: cn $ ap: ' Method ' $ ap: mn )
+          $ at: 'value' p: ( mo str )
+          $ at: 'action' p: ( '/SubmitMethod' )
+          $ at: 'field1' p: 'ClassName'
+          $ at: 'value1' p: cn
+          $ at: 'field2' p: 'MethodName'
+          $ at: 'value2' p: mn
hunk ./terse-vm/prelude.txt 328
-      x= theta sin * 290 ,,+ 300.
-      y= theta cos * 290 ,,+ 300.
+      x= theta sin * 290 $+ 300.
+      y= theta cos * 290 $+ 300.
hunk ./terse-vm/prelude.txt 361
-  ] ,, say.
+  ] $ say.
hunk ./terse-vm/prelude.txt 389
-           (p at: x) at: y ,,
+           (p at: x) at: y $
hunk ./terse-vm/prelude.txt 398
-      (p at: x) at: y ,,
+      (p at: x) at: y $
hunk ./terse-vm/src/terse/vm/Cls.java 330
-					arr[i] = new Vec(pros(key, value));
+					arr[i] = new Vec(terp, pros(key, value));
hunk ./terse-vm/src/terse/vm/Expr.java 198
-			return fmt("%s", cls, methName, numLocals, numArgs, body);
+			return fmt("TOP(cls=%s methName=%s numLocals=%s numArgs=%s body=<%s>)", cls, methName, numLocals, numArgs, body);
hunk ./terse-vm/src/terse/vm/Expr.java 314
+	static final class GetFrame extends Expr {
+		GetFrame(Terp t) {
+			super(t);
+		}
+
+		Pro eval(Frame f) {
+			return f;
+		}
+
+		public String toString() {
+			return fmt("Sys frame");
+		}
+	}
+
hunk ./terse-vm/src/terse/vm/Expr.java 630
+	static final class MakeVec extends Expr {
+		Expr[] elements; // Eval these in order; return value of last.
+		char delim;
+
+		public MakeVec(Terp t, Expr[] elements, char delim) {
+			super(t);
+			this.elements = elements;
+			this.delim = delim;
+		}
+
+		Pro eval(Frame f) {
+			Vec z = new Vec(cls.terp);
+			for (Expr expr : elements) {
+				Pro x = expr.eval(f);
+				assert x != null;
+				z.vec.add(x);
+			}
+			return z;
+		}
+
+		public String toString() {
+			StringBuffer sb = new StringBuffer(" (");
+			for (int i = 0; i < elements.length; i++) {
+				sb.append(elements[i].toString());
+				sb.append(delim);
+				sb.append(' ');
+			}
+			sb.append(") ");
+			return sb.toString();
+		}
+
+		void pretty(int level, StringBuffer sb) {
+			sb.append(" (");
+			for (int i = 0; i < elements.length; i++) {
+				sb.append(repeat(level, "  "));
+				sb.append(elements[i].toString());
+				sb.append(delim);
+				sb.append('\n');
+			}
+			sb.append(") ");
+		}
+
+		boolean isComplicated() {
+			return true;
+		}
+
+		int depth() {
+			int z = 0;
+			for (int i = 0; i < elements.length; i++) {
+				z = Math.max(z, 1 + elements[i].depth());
+			}
+			return z;
+		}
+	}
+
hunk ./terse-vm/src/terse/vm/ExprTest.java 63
-        Expr.Top top = Parser.parseMethod(usrCls, "temp", " [ 23 pl: 42 . ] run  ");
+        Expr.Top top = Parser.parseMethod(usrCls, "temp", " [ 23 pl: 42 . ] value  ");
hunk ./terse-vm/src/terse/vm/ExprTest.java 90
-        Expr.Top top = Parser.parseMethod(usrCls, "temp", "a= Vec[0. 0. 0. 0. 0.]. a at: 3 p: 33 . a at: 3 ");
+        Expr.Top top = Parser.parseMethod(usrCls, "temp", "a= Vec(0, 0, 0, 0, 0). a at: 3 p: 33 . a at: 3 ");
hunk ./terse-vm/src/terse/vm/ExprTest.java 162
-        Expr.Top top = Parser.parseMethod(usrCls, "temp", " [ 1 pl: 1 . 2 pl: 2 . 3 pl: 3 . 4 pl: 4 . ] vec at: 2 ");
+        Expr.Top top = Parser.parseMethod(usrCls, "temp", "( 1 pl: 1 ; 2 pl: 2 ; 3 pl: 3 ; 4 pl: 4 ) at: 2 ");
hunk ./terse-vm/src/terse/vm/ExprTest.java 172
-                + "   RUN[ a gt: 0 ] y: [ g =  se triangle: RUN[ a mi: 1 ] ,, pl: a  ] . " + "   g' . "
+                + "   a gt: 0 $ y: [ g = se triangle: ( a mi: 1 ) $pl: a  ] . " + "   g' . "
hunk ./terse-vm/src/terse/vm/Makefile 3
+
+J = Pro.java Terp.java
hunk ./terse-vm/src/terse/vm/Makefile 6
-Wrap.java : wrap.tcl Pro.java
-	tclsh wrap.tcl > Wrap.java
+Wrap.java : wrap.tcl $J
+	tclsh wrap.tcl $J > Wrap.java
hunk ./terse-vm/src/terse/vm/Parser.java 179
-		return new Expr.Seq(terp, v);
+		if (v.length == 0) {
+			return new Expr.Lit(terp.instNil); // Trivial case.
+		} else if (v.length == 1) {
+			return v[0]; // Trivial case.
+		} else {
+			return new Expr.Seq(terp, v);
+		}
hunk ./terse-vm/src/terse/vm/Parser.java 224
-		Expr[] v = exprs(parseChain());
+		Expr[] v = exprs(parseTuple());
hunk ./terse-vm/src/terse/vm/Parser.java 232
-			v = append(v, parseChain());
+			v = append(v, parseTuple());
hunk ./terse-vm/src/terse/vm/Parser.java 235
-			// Use "[ ... ] list" to construct the List.
-			return new Expr.Send(new Expr.Block(new Expr.Seq(terp, v),
-					emptyExprs), "list", emptyExprs);
+			return new Expr.MakeVec(terp, v, ';');
+		} else {
+			// It's not a list at all.
+			return v[0];
+		}
+	}
+
+	private Expr parseTuple() {
+		boolean itsATuple = false;
+		Expr[] v = exprs(parseChain());
+		while (lex.isTupler()) {
+			itsATuple = true;
+			lex.advance();
+			if (lex.isLister() || lex.endsStmt() || lex.closesBlock()
+					|| lex.closesParen() || lex.isEOF()) {
+				break;
+			}
+			v = append(v, parseChain());
+		}
+		if (itsATuple) {
+			return new Expr.MakeVec(terp, v, ',');
hunk ./terse-vm/src/terse/vm/Parser.java 271
-			while (lex.t == Pat.NAME && ! lex.isKeyword()) { // parse Unary messages at front of
+			while (lex.t == Pat.NAME && !lex.isKeyword()) { // parse Unary
+															// messages at front
+															// of
hunk ./terse-vm/src/terse/vm/Parser.java 286
-		receiver = parseTuple(receiver);
+		receiver = parseBinary3(receiver);
hunk ./terse-vm/src/terse/vm/Parser.java 292
-				while (lex.isKeyword()
-						&& lex.keywordStrength() == strength) {
+				while (lex.isKeyword() && lex.keywordStrength() == strength) {
hunk ./terse-vm/src/terse/vm/Parser.java 298
-					Expr tuple = parseTuple(unary);
+					Expr tuple = parseBinary3(unary);
hunk ./terse-vm/src/terse/vm/Parser.java 311
-	private Expr parseTuple(Expr receiver) {
-		receiver = parseBinary3(receiver);
-		boolean itsATuple = false;
-		Expr[] v = exprs(receiver);
-		while (lex.isTupler()) {
-			itsATuple = true;
-			lex.advance();
-			if (lex.isKeyword() || lex.isChain() || lex.isLister()
-					|| lex.endsStmt() || lex.closesBlock() || lex.closesParen()
-					|| lex.isEOF()) {
-				break;
-			}
-			Expr unary = parseUnary();
-			v = append(v, parseBinary3(unary));
-		}
-		if (itsATuple) {
-			// Use "[ ... ] tuple" to construct the Tuple.
-			return new Expr.Send(new Expr.Block(new Expr.Seq(terp, v),
-					emptyExprs), "tuple", emptyExprs);
-		} else {
-			// It's not a tuple at all.
-			return v[0];
-		}
-	}
-
hunk ./terse-vm/src/terse/vm/Parser.java 350
-		while (lex.t == Pat.NAME && ! lex.isKeyword()) {
+		while (lex.t == Pat.NAME && !lex.isKeyword()) {
hunk ./terse-vm/src/terse/vm/Parser.java 392
-//		case KEYWORD:
-//			terp.toss(
-//					"Misplaced keyword, was expecting a variable or literal or block: <%s>",
-//					lex.w);
-//			break;
hunk ./terse-vm/src/terse/vm/Parser.java 440
-//	private Expr XXXXXXXXXXXXXXXXXXparseBlock() {
-//		assert lex.opensBlock();
-//		lex.advance();
-//		String[] params = emptyStrs;
-//		int[] paramsLocalIndex = emptyInts;
-//		while (lex.marksBlockParam()) {
-//			String marker = lex.w; // Just for error message.
-//			lex.advance(); // Beyond the marker.
-//			if (lex.t != Pat.NAME) {
-//				terp.toss(
-//						"Expected a variable name for Block Parameter after <%s> but got <%s>",
-//						marker, lex.w);
-//			}
-//			params = append(params, lex.w); // Keep case, since this is
-//			Integer localIndex = localVars.get(lex.w.toLowerCase());
-//			// On first pass, we don't know locals, so say -1, to make sure it
-//			// is never eval'ed.
-//			int index = (localIndex == null) ? -1 : localIndex.intValue();
-//			paramsLocalIndex = append(paramsLocalIndex, index);
-//			// definition point.
-//			// Params count as Assignments, from the point of view of
-//			// allocating local variables. Forbid using inst var for param.
-//			int negativeIfInstanceVar = indexForLocalVariable(lex.w,
-//					lex.w.toLowerCase());
-//			if (negativeIfInstanceVar < 0) {
-//				terp.toss(
-//						"Instance variable <%s> not allowed as param in Blk.",
-//						lex.w);
-//			}
-//
-//			lex.advance(); // Beyond the var name.
-//		}
-//		Expr body = parseExpr();
-//		// say("@@@@@@@ body=<%s>", body);
-//		assert lex.closesBlock() : fmt("lex=%s<%s> body=<%s>", lex.t, lex.w,
-//				body);
-//		// Do not advance; parsePrim() does that after switch().
-//		return new Expr.Block(body, params, paramsLocalIndex);
-//	}
-
hunk ./terse-vm/src/terse/vm/Parser.java 446
-			return new Expr.Send(new Expr.Block(new Expr.Seq(terp, emptyExprs),
-					emptyExprs), "vec", emptyExprs);
+			return new Expr.MakeVec(terp, emptyExprs, ',');
hunk ./terse-vm/src/terse/vm/Parser.java 451
-		return new Expr.Send(new Expr.Block(body, emptyExprs), "run",
-				emptyExprs);
+		return body;
+//		return new Expr.Send(new Expr.Block(body, emptyExprs), "run",
+//				emptyExprs);
hunk ./terse-vm/src/terse/vm/Parser.java 466
-		if (sz == 1) {
-			String name = names.get(0);
-			return new Expr.Send(blocks.get(0), name.toLowerCase(), emptyExprs);
-		} else {
-			String name = names.get(0) + names.get(1);
-			name += ":";
-			for (int i = 2; i < sz; i++) {
-				String nextName = names.get(0);
-				name += nextName + ":";
-			}
-			Expr[] args = new Expr[sz - 1];
-			for (int i = 1; i < sz; i++)
-				args[i - 1] = blocks.get(i); // Leave off the first.
-			return new Expr.Send(blocks.get(0), name.toLowerCase(), args);
+		StringBuilder message = new StringBuilder("macro:");
+		Expr[] bb = exprs(new Expr.GetFrame(terp));
+		for (int i = 0; i < sz; i++) {
+			message.append(names.get(i).toLowerCase());
+			message.append(':');
+			bb = append(bb, blocks.get(i));
hunk ./terse-vm/src/terse/vm/Parser.java 473
+		return new Expr.Send(new Expr.GetSelf(terp), message.toString(), bb);
hunk ./terse-vm/src/terse/vm/Parser.java 539
-				"[A-Za-z][A-Za-z0-9]*"), /*KEYWORD(
-				"([A-Za-z][A-Za-z0-9]*)\\s*([:/]+)"),*/ OTHER(
+				"[A-Za-z][A-Za-z0-9]*"), OTHER(
hunk ./terse-vm/src/terse/vm/Parser.java 684
-			// Must check KEYWORD before NAME, or NAME will overtake it.
-			if (attempt(Pat.RESERVED) /*|| attempt(Pat.KEYWORD)*/
-					|| attempt(Pat.NAME) || attempt(Pat.NUMBER)) {
+			if (attempt(Pat.RESERVED) || attempt(Pat.NAME)
+					|| attempt(Pat.NUMBER)) {
hunk ./terse-vm/src/terse/vm/ParserTest.java 25
-		assertEquals("TUPLE(111. 222. 333. ) . ", a.body.toString());
+		assertEquals(" (111, 222, 333, ) ", a.body.toString());
hunk ./terse-vm/src/terse/vm/ParserTest.java 31
-		assertEquals("LIST(TUPLE(111. 222. ) . TUPLE(333. 444. ) . ) . ", a.body.toString());
+		assertEquals(" ( (111, 222, ) ;  (333, 444, ) ; ) ", a.body.toString());
hunk ./terse-vm/src/terse/vm/ParserTest.java 37
-		assertEquals("TUPLE(111 * 2 . 222 + 3 . 333 > 4 . ) . ", a.body.toString());
+		assertEquals(" (111 * 2 , 222 + 3 , 333 > 4 , ) ", a.body.toString());
hunk ./terse-vm/src/terse/vm/ParserTest.java 42
-		assertEquals("0 at/ (1 != (2 + (3 * 4 ) ) ) . ", a.body.toString());
+		assertEquals("0 at/ (1 != (2 + (3 * 4 ) ) ) ", a.body.toString());
hunk ./terse-vm/src/terse/vm/ParserTest.java 47
-		assertEquals("0 at/ ((1 != ((2 + ((3 * 4 ) * 5 ) ) + 6 ) ) == 7 ) . ", a.body.toString());
-	}
-	public void testChainTuple() {
-		Cls cls = t.tTmp;
-		Top a = Parser.parseMethod(cls, "bogus", "222 , 444 ,,  , 555");
-		assertEquals("TUPLE(TUPLE(222. 444. ) . 555. ) . ", a.body.toString());
+		assertEquals("0 at/ ((1 != ((2 + ((3 * 4 ) * 5 ) ) + 6 ) ) == 7 ) ", a.body.toString());
hunk ./terse-vm/src/terse/vm/ParserTest.java 59
-		assertEquals(t.newNum(25), t.newTmp().eval("x, y = Vec[3. 4].   x * x + y * y."));
+		assertEquals(t.newNum(25), t.newTmp().eval("x, y = Vec(3; 4;).   x * x + y * y."));
hunk ./terse-vm/src/terse/vm/Pro.java 268
+		// =meth Obj "macro" macro:vec: "Execute the block to return a vector."
+		public Pro macroVec(Frame f, Blk b) {
+			return b.evalWithoutArgs().mustVec();
+		}
+
+		// =meth Obj "macro" macro:dict: "Construct a Dict from list of pairs."
+		public Pro macroDict(Frame f, Blk b) {
+			Vec list = b.evalWithoutArgs().mustVec();
+			Dict z = new Dict(b.terp());
+			int sz = list.vec.size();
+			for (int i = 0; i < sz; i++) {
+				Vec tuple = list.vec.get(i).mustVec();
+				assert tuple.vec.size() == 2 : tuple;
+				z.dict.put(tuple.vec.get(0), tuple.vec.get(1));
+			}
+			return z;
+		}
+		
+		// =meth Obj "macro" macro:and:
+		public Pro macroAnd(Frame f, Blk b) {
+			if (b.body instanceof Expr.MakeVec) {
+				Expr.MakeVec mv = (Expr.MakeVec) b.body;
+				for (int i = 0; i < mv.elements.length; i++) {
+					// Eval in blk's frame!
+					Pro x = mv.elements[i].eval(b.f);
+					// If any evals false, return false.
+					if (!x.truth()){
+						return terp().instFalse;
+					}
+				}
+				return terp().instTrue;  // All were true.
+			} else {
+				return terp().toss("Body of AND macro is not a vector constructor: <%s>", b.body);
+			}
+		}
+		
+		// =meth Obj "macro" macro:or:
+		public Pro macroOr(Frame f, Blk b) {
+			if (b.body instanceof Expr.MakeVec) {
+				Expr.MakeVec mv = (Expr.MakeVec) b.body;
+				for (int i = 0; i < mv.elements.length; i++) {
+					// Eval in blk's frame!
+					Pro x = mv.elements[i].eval(b.f);
+					// If any evals true, return true.
+					if (x.truth()){
+						return terp().instTrue;
+					}
+				}
+				return terp().instFalse;  // All were false.
+			} else {
+				return terp().toss("Body of AND macro is not a vector constructor: <%s>", b.body);
+			}
+		}
+
hunk ./terse-vm/src/terse/vm/Pro.java 577
-					z.vec.add(new Vec(pros(terp.newStr(name),
+					z.vec.add(new Vec(terp, pros(terp.newStr(name),
hunk ./terse-vm/src/terse/vm/Pro.java 601
+		
+		static void addBuiltinMethodsForSys(final Terp terp) {
+		}
hunk ./terse-vm/src/terse/vm/Pro.java 607
-
+	
hunk ./terse-vm/src/terse/vm/Pro.java 637
+			new JavaMeth(terp.wrap.clsSys, "frame", "",
+					"Return current stack frame.") {
+				public Pro apply(Frame f, Pro r, Pro[] args) {
+					return f;
+				}
+			};
hunk ./terse-vm/src/terse/vm/Pro.java 669
-		Pro evalWithoutArgs() { // Cannot just call it eval(), because that
-			// names takes a Frame, and this does not.
+		// =meth Blk "eval" value
+		public Pro evalWithoutArgs() {
hunk ./terse-vm/src/terse/vm/Pro.java 679
-		Pro evalWith1Arg(Pro arg0) {
+		// =meth Blk "eval" value:
+		public Pro evalWith1Arg(Pro arg0) {
hunk ./terse-vm/src/terse/vm/Pro.java 690
-		Pro evalWith2Args(Pro arg0, Pro arg1) {
+		// =meth Blk "eval" value:value:
+		public Pro evalWith2Args(Pro arg0, Pro arg1) {
hunk ./terse-vm/src/terse/vm/Pro.java 730
-
-		// =meth Blk "macro" dyct "Construct a Dict from a list of tuples."
-		public Dict dyct() {
-			final Vec list = this.eval("self run").mustVec();
-			final int n = list.vec.size();
-			final Pro[] arr = new Pro[n];
-			for (int i = 0; i < n; i++) {
-				arr[i] = list.vec.get(i).mustPair();
-			}
-			return terp().newDict(arr);
-		}
-
+		
hunk ./terse-vm/src/terse/vm/Pro.java 733
-			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "or", "",
-					"Return true if any member evaluates true.") {
-				public Pro apply(Frame _, Pro r, Pro[] args) {
-					Blk blk = r.asBlk();
-					// Notice the block runs in its frame, not the caller's.
-					Expr.Seq seq = (Seq) blk.body;
-					Pro[] arr = new Pro[seq.body.length];
-					for (int i = 0; i < arr.length; i++) {
-						Pro x = seq.body[i].eval(blk.f);
-						if (x.truth())
-							return terp.instTrue;
-					}
-					return terp.instFalse;
-				}
-			});
-			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "and", "",
-					"Return false if any member evaluates untrue.") {
-				public Pro apply(Frame _, Pro r, Pro[] args) {
-					Blk blk = r.asBlk();
-					// Notice the block runs in its frame, not the caller's.
-					Expr.Seq seq = (Seq) blk.body;
-					Pro[] arr = new Pro[seq.body.length];
-					for (int i = 0; i < arr.length; i++) {
-						Pro x = seq.body[i].eval(blk.f);
-						if (!x.truth())
-							return terp.instFalse;
-					}
-					return terp.instTrue;
-				}
-			});
-			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "vec", "v",
-					"Evalute members of the block to make a Vec.") {
-				public Pro apply(Frame _, Pro r, Pro[] args) {
-					Blk blk = r.asBlk();
-					// Notice the block runs in its frame, not the caller's.
-					Expr.Seq seq = (Seq) blk.body;
-					Pro[] arr = new Pro[seq.body.length];
-					for (int i = 0; i < arr.length; i++) {
-						arr[i] = seq.body[i].eval(blk.f);
-					}
-					return terp.newVec(arr);
-				}
-			});
-			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "dict", "d",
-					"Evalute pairs of the block to make a Dict.") {
-				public Pro apply(Frame _, Pro r, Pro[] args) {
-					Blk blk = r.asBlk();
-					// Notice the block runs in its frame, not the caller's.
-					Expr.Seq seq = (Seq) blk.body;
-					Pro[] arr = new Pro[seq.body.length];
-					for (int i = 0; i < arr.length; i++) {
-						arr[i] = seq.body[i].eval(blk.f); // should be a pair.
-					}
-					return terp.newDict(arr);
-				}
-			});
-			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "run", "value",
-					"Evaluate the block.") {
-				public Pro apply(Frame _, Pro r, Pro[] args) {
-					return r.asBlk().evalWithoutArgs();
-				}
-			});
-			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "run:", "value:",
-					"Run the block with one argument.") {
-				public Pro apply(Frame _, Pro r, Pro[] args) {
-					return r.asBlk().evalWith1Arg(args[0]);
-				}
-			});
-			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "run:with:",
-					"value:value:", "Run the block with two arguments.") {
-				public Pro apply(Frame _, Pro r, Pro[] args) {
-					return r.asBlk().evalWith2Args(args[0], args[1]);
-				}
-			});
-			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "catch", "",
-					"Catch exceptions.") {
-				public Pro apply(Frame _, Pro r, Pro[] args) {
-					Pro z = terp.instNil;
-					Pro err = terp.instNil;
-					Pro info = terp.instNil;
-					try {
-						z = r.asBlk().evalWithoutArgs();
-					} catch (RuntimeException ex) {
-						err = terp.newStr(ex.toString());
-						StackTraceElement[] t = ex.getStackTrace();
-						StringBuffer sb = new StringBuffer();
-						for (int i = 0; i < t.length; i++) {
-							sb.append(t[i].toString());
-							sb.append("\n");
-						}
-						info = terp.newStr(sb.toString());
-					}
-					return terp.newVec(pros(z, err, info));
-				}
-			});
+//			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "or", "",
+//					"Return true if any member evaluates true.") {
+//				public Pro apply(Frame _, Pro r, Pro[] args) {
+//					Blk blk = r.asBlk();
+//					// Notice the block runs in its frame, not the caller's.
+//					Expr.Seq seq = (Seq) blk.body;
+//					Pro[] arr = new Pro[seq.body.length];
+//					for (int i = 0; i < arr.length; i++) {
+//						Pro x = seq.body[i].eval(blk.f);
+//						if (x.truth())
+//							return terp.instTrue;
+//					}
+//					return terp.instFalse;
+//				}
+//			});
+//			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "and", "",
+//					"Return false if any member evaluates untrue.") {
+//				public Pro apply(Frame _, Pro r, Pro[] args) {
+//					Blk blk = r.asBlk();
+//					// Notice the block runs in its frame, not the caller's.
+//					Expr.Seq seq = (Seq) blk.body;
+//					Pro[] arr = new Pro[seq.body.length];
+//					for (int i = 0; i < arr.length; i++) {
+//						Pro x = seq.body[i].eval(blk.f);
+//						if (!x.truth())
+//							return terp.instFalse;
+//					}
+//					return terp.instTrue;
+//				}
+//			});
+//			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "value", "",
+//					"Evaluate the block.") {
+//				public Pro apply(Frame _, Pro r, Pro[] args) {
+//					return r.asBlk().evalWithoutArgs();
+//				}
+//			});
+//			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "value:", "",
+//					"Run the block with one argument.") {
+//				public Pro apply(Frame _, Pro r, Pro[] args) {
+//					return r.asBlk().evalWith1Arg(args[0]);
+//				}
+//			});
+//			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "value:value:",
+//					"value:value:", "Run the block with two arguments.") {
+//				public Pro apply(Frame _, Pro r, Pro[] args) {
+//					return r.asBlk().evalWith2Args(args[0], args[1]);
+//				}
+//			});
+//			terp.tBlk.addMethod(new JavaMeth(terp.tBlk, "catch", "",
+//					"Catch exceptions.") {
+//				public Pro apply(Frame _, Pro r, Pro[] args) {
+//					Pro z = terp.instNil;
+//					Pro err = terp.instNil;
+//					Pro info = terp.instNil;
+//					try {
+//						z = r.asBlk().evalWithoutArgs();
+//					} catch (RuntimeException ex) {
+//						err = terp.newStr(ex.toString());
+//						StackTraceElement[] t = ex.getStackTrace();
+//						StringBuffer sb = new StringBuffer();
+//						for (int i = 0; i < t.length; i++) {
+//							sb.append(t[i].toString());
+//							sb.append("\n");
+//						}
+//						info = terp.newStr(sb.toString());
+//					}
+//					return terp.newVec(pros(z, err, info));
+//				}
+//			});
hunk ./terse-vm/src/terse/vm/Pro.java 981
-					return new Vec(arr);
+					return new Vec(terp, arr);
hunk ./terse-vm/src/terse/vm/Pro.java 1431
-		Vec(Pro[] nonemptyArray) {
-			super(nonemptyArray[0].cls.terp.tVec);
+		Vec(Terp t, Pro[] arr) {
+			super(t.tVec);
hunk ./terse-vm/src/terse/vm/Pro.java 1434
-			for (int i = 0; i < nonemptyArray.length; i++) {
-				this.vec.add(nonemptyArray[i]);
+			for (int i = 0; i < arr.length; i++) {
+				this.vec.add(arr[i]);
hunk ./terse-vm/src/terse/vm/Pro.java 1444
-			StringBuffer sb = new StringBuffer("Vec(");
+			StringBuffer sb = new StringBuffer("VEC(");
hunk ./terse-vm/src/terse/vm/Pro.java 1449
-				sb.append(". ");
+				sb.append("; ");
hunk ./terse-vm/src/terse/vm/Pro.java 1646
-			StringBuffer sb = new StringBuffer("Dict{");
+			StringBuffer sb = new StringBuffer("DICT(");
hunk ./terse-vm/src/terse/vm/Pro.java 1650
-				sb.append(", ");
+				sb.append("), (");
hunk ./terse-vm/src/terse/vm/Pro.java 1652
-				sb.append("). ");
+				sb.append("); ");
hunk ./terse-vm/src/terse/vm/Pro.java 1654
-			sb.append("} ");
+			sb.append(") ");
hunk ./terse-vm/src/terse/vm/Pro.java 1695
-				z[i] = new Vec(pros(key, dict.get(key)));
+				z[i] = new Vec(terp(), pros(key, dict.get(key)));
hunk ./terse-vm/src/terse/vm/Terp.java 138
-		this.tUsr.myVars = strs("p", "q");  // TODO: temp hack.
+		this.tUsr.myVars = strs("p", "q"); // TODO: temp hack.
hunk ./terse-vm/src/terse/vm/Terp.java 140
-		
+
hunk ./terse-vm/src/terse/vm/Terp.java 163
-		//Sys.addBuiltinMethodsForSys(this);
+		Sys.addBuiltinMethodsForSys(this);  // for Sys frame.
hunk ./terse-vm/src/terse/vm/Terp.java 171
-		
+
+		tolerateNullClass = true;
hunk ./terse-vm/src/terse/vm/Terp.java 178
+		tolerateNullClass = false;
hunk ./terse-vm/src/terse/vm/Terp.java 193
-	public class Frame { // Important: non-static, tied to a Terp.
+	public class Frame extends Obj { // Important: non-static, tied to a Terp.
+		// =cls "Sys" Frame Obj
+
+		// =get Frame . prev prevFrame
+
+		// =get Frame . self receiver
+
+		// =get Frame Pro[] locals localVars
+
+		// =get Frame . top currentMethodExpr
+
+		// =get Frame int level level
+
hunk ./terse-vm/src/terse/vm/Terp.java 216
+			super(wrap.clsFrame);
hunk ./terse-vm/src/terse/vm/Terp.java 316
-			queryArr[i] = new Vec(pros(queryKey, queryValue));
+			queryArr[i] = new Vec(this, pros(queryKey, queryValue));
hunk ./terse-vm/src/terse/vm/Terp.java 338
-			String qDictRepr = qDict.repr();  // Inefficient. TODO.
+			String qDictRepr = qDict.repr(); // Inefficient. TODO.
hunk ./terse-vm/src/terse/vm/Terp.java 350
-				result_pro = inst.eval(fmt("self handle: (%s) query: (%s)", urlRepr,
-						qDictRepr));
+				result_pro = inst.eval(fmt("self handle: (%s) query: (%s)",
+						urlRepr, qDictRepr));
hunk ./terse-vm/src/terse/vm/Terp.java 355
-				result_pro = cls.eval(fmt("self handle: (%s) query: (%s)", urlRepr,
-						qDictRepr));
+				result_pro = cls.eval(fmt("self handle: (%s) query: (%s)",
+						urlRepr, qDictRepr));
hunk ./terse-vm/src/terse/vm/Terp.java 383
-					new Vec(pros(newStr("type"), newStr("text"))), new Vec(
+					new Vec(this, pros(newStr("type"), newStr("text"))), new Vec(this, 
hunk ./terse-vm/src/terse/vm/Terp.java 385
-					new Vec(pros(newStr("value"), newStr(sb.toString()))));
+					new Vec(this, pros(newStr("value"), newStr(sb.toString()))));
hunk ./terse-vm/src/terse/vm/Terp.java 465
-						String className = words[1];
-						String methodName = words[2];
+					String className = words[1];
+					String methodName = words[2];
hunk ./terse-vm/src/terse/vm/Terp.java 468
-						// TODO:
-//						Cls cls = clss.get(className.toLowerCase());
-//						if (cls == null) {
-//							toss("loadInitFile: Global <%s> not a class, for meth <%s> :: %s",
-//									className, methodName);
-//						}
-//						cls.eval(fmt(
-//								"self definemethod: %s abbrev: %s doc: %s code: %s",
-//								newStr(methodName).repr(), newStr("").repr(),
-//								newStr("").repr(), newStr(more).repr()));
+					// TODO:
+					// Cls cls = clss.get(className.toLowerCase());
+					// if (cls == null) {
+					// toss("loadInitFile: Global <%s> not a class, for meth <%s> :: %s",
+					// className, methodName);
+					// }
+					// cls.eval(fmt(
+					// "self definemethod: %s abbrev: %s doc: %s code: %s",
+					// newStr(methodName).repr(), newStr("").repr(),
+					// newStr("").repr(), newStr(more).repr()));
hunk ./terse-vm/src/terse/vm/Terp.java 509
+				} else if (command.equals("stop")) {
+					break;  // For testing partial files.
hunk ./terse-vm/src/terse/vm/Terp.java 565
-	
+
hunk ./terse-vm/src/terse/vm/TerpTest.java 28
-		;
hunk ./terse-vm/src/terse/vm/Wrap.java 30
+    // CMD meth Obj "macro" macro:vec: "Execute the block to return a vector." TYPE Pro NAME macroVec PARAMS {Frame f} { Blk b}
+    // CLS Obj GROUP "macro" METH macro:vec: REMARK "Execute the block to return a vector."
+
+    new JavaMeth(terp.wrap.clsObj, "macro:vec:", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+      Obj self = (Obj) r;
+        Frame a = (Frame) args[0];
+        Blk b = (Blk) args[1];
+        return self.macroVec (a, b);
+      }
+    };
+
+    // CMD meth Obj "macro" macro:dict: "Construct a Dict from list of pairs." TYPE Pro NAME macroDict PARAMS {Frame f} { Blk b}
+    // CLS Obj GROUP "macro" METH macro:dict: REMARK "Construct a Dict from list of pairs."
+
+    new JavaMeth(terp.wrap.clsObj, "macro:dict:", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+      Obj self = (Obj) r;
+        Frame a = (Frame) args[0];
+        Blk b = (Blk) args[1];
+        return self.macroDict (a, b);
+      }
+    };
+
+    // CMD meth Obj "macro" macro:and: TYPE Pro NAME macroAnd PARAMS {Frame f} { Blk b}
+    // CLS Obj GROUP "macro" METH macro:and: REMARK ""
+
+    new JavaMeth(terp.wrap.clsObj, "macro:and:", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+      Obj self = (Obj) r;
+        Frame a = (Frame) args[0];
+        Blk b = (Blk) args[1];
+        return self.macroAnd (a, b);
+      }
+    };
+
+    // CMD meth Obj "macro" macro:or: TYPE Pro NAME macroOr PARAMS {Frame f} { Blk b}
+    // CLS Obj GROUP "macro" METH macro:or: REMARK ""
+
+    new JavaMeth(terp.wrap.clsObj, "macro:or:", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+      Obj self = (Obj) r;
+        Frame a = (Frame) args[0];
+        Blk b = (Blk) args[1];
+        return self.macroOr (a, b);
+      }
+    };
+
hunk ./terse-vm/src/terse/vm/Wrap.java 81
-    new JavaMeth(terp.wrap.wrapObj, "eval:", "") {
+    new JavaMeth(terp.wrap.clsObj, "eval:", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 92
-    new JavaMeth(terp.wrap.wrapObj, "eval:arg:", "") {
+    new JavaMeth(terp.wrap.clsObj, "eval:arg:", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 104
-    new JavaMeth(terp.wrap.wrapObj, "eval:arg:arg:", "") {
+    new JavaMeth(terp.wrap.clsObj, "eval:arg:arg:", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 117
-    new JavaMeth(terp.wrap.wrapSysCls, "files", "") {
+    new JavaMeth(terp.wrap.clsSysCls, "files", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 126
-    new JavaMeth(terp.wrap.wrapSysCls, "envAt:", "") {
+    new JavaMeth(terp.wrap.clsSysCls, "envAt:", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 137
-    new JavaMeth(terp.wrap.wrapSysCls, "trigraphs", "") {
+    new JavaMeth(terp.wrap.clsSysCls, "trigraphs", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 143
-    // CMD meth Blk "macro" implode,imp  "Implode strings and ints (as chars) and subvectors." TYPE Str NAME implode PARAMS 
-    // CLS Blk GROUP "macro" METH implode,imp REMARK "Implode strings and ints (as chars) and subvectors."
+    // CMD meth Blk "eval" value TYPE Pro NAME evalWithoutArgs PARAMS 
+    // CLS Blk GROUP "eval" METH value REMARK ""
hunk ./terse-vm/src/terse/vm/Wrap.java 146
-    new JavaMeth(terp.wrap.wrapBlk, "implode", "imp") {
+    new JavaMeth(terp.wrap.clsBlk, "value", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 149
-        return self.implode ();
+        return self.evalWithoutArgs ();
+      }
+    };
+
+    // CMD meth Blk "eval" value: TYPE Pro NAME evalWith1Arg PARAMS {Pro arg0}
+    // CLS Blk GROUP "eval" METH value: REMARK ""
+
+    new JavaMeth(terp.wrap.clsBlk, "value:", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+      Blk self = (Blk) r;
+        Pro a = (Pro) args[0];
+        return self.evalWith1Arg (a);
+      }
+    };
+
+    // CMD meth Blk "eval" value:value: TYPE Pro NAME evalWith2Args PARAMS {Pro arg0} { Pro arg1}
+    // CLS Blk GROUP "eval" METH value:value: REMARK ""
+
+    new JavaMeth(terp.wrap.clsBlk, "value:value:", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+      Blk self = (Blk) r;
+        Pro a = (Pro) args[0];
+        Pro b = (Pro) args[1];
+        return self.evalWith2Args (a, b);
hunk ./terse-vm/src/terse/vm/Wrap.java 176
-    // CMD meth Blk "macro" dyct "Construct a Dict from a list of tuples." TYPE Dict NAME dyct PARAMS 
-    // CLS Blk GROUP "macro" METH dyct REMARK "Construct a Dict from a list of tuples."
+    // CMD meth Blk "macro" implode,imp  "Implode strings and ints (as chars) and subvectors." TYPE Str NAME implode PARAMS 
+    // CLS Blk GROUP "macro" METH implode,imp REMARK "Implode strings and ints (as chars) and subvectors."
hunk ./terse-vm/src/terse/vm/Wrap.java 179
-    new JavaMeth(terp.wrap.wrapBlk, "dyct", "") {
+    new JavaMeth(terp.wrap.clsBlk, "implode", "imp") {
hunk ./terse-vm/src/terse/vm/Wrap.java 182
-        return self.dyct ();
+        return self.implode ();
hunk ./terse-vm/src/terse/vm/Wrap.java 189
-    new JavaMeth(terp.wrap.wrapNum, "==", "") {
+    new JavaMeth(terp.wrap.clsNum, "==", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 200
-    new JavaMeth(terp.wrap.wrapNum, "!=", "") {
+    new JavaMeth(terp.wrap.clsNum, "!=", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 211
-    new JavaMeth(terp.wrap.wrapNum, "<", "") {
+    new JavaMeth(terp.wrap.clsNum, "<", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 222
-    new JavaMeth(terp.wrap.wrapNum, "<=", "") {
+    new JavaMeth(terp.wrap.clsNum, "<=", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 233
-    new JavaMeth(terp.wrap.wrapNum, ">", "") {
+    new JavaMeth(terp.wrap.clsNum, ">", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 244
-    new JavaMeth(terp.wrap.wrapNum, ">=", "") {
+    new JavaMeth(terp.wrap.clsNum, ">=", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 255
-    new JavaMeth(terp.wrap.wrapNum, "+", "") {
+    new JavaMeth(terp.wrap.clsNum, "+", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 266
-    new JavaMeth(terp.wrap.wrapNum, "-", "") {
+    new JavaMeth(terp.wrap.clsNum, "-", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 277
-    new JavaMeth(terp.wrap.wrapNum, "|", "") {
+    new JavaMeth(terp.wrap.clsNum, "|", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 288
-    new JavaMeth(terp.wrap.wrapNum, "^", "") {
+    new JavaMeth(terp.wrap.clsNum, "^", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 299
-    new JavaMeth(terp.wrap.wrapNum, "*", "") {
+    new JavaMeth(terp.wrap.clsNum, "*", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 310
-    new JavaMeth(terp.wrap.wrapNum, "/", "") {
+    new JavaMeth(terp.wrap.clsNum, "/", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 321
-    new JavaMeth(terp.wrap.wrapNum, "%", "") {
+    new JavaMeth(terp.wrap.clsNum, "%", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 332
-    new JavaMeth(terp.wrap.wrapNum, "&", "") {
+    new JavaMeth(terp.wrap.clsNum, "&", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 343
-    new JavaMeth(terp.wrap.wrapStr, "applySubstitutions", "") {
+    new JavaMeth(terp.wrap.clsStr, "applySubstitutions", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 353
-    new JavaMeth(terp.wrap.wrapVec, "len", "") {
+    new JavaMeth(terp.wrap.clsVec, "len", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 363
-    new JavaMeth(terp.wrap.wrapVec, "at:", "") {
+    new JavaMeth(terp.wrap.clsVec, "at:", "") {
hunk ./terse-vm/src/terse/vm/Wrap.java 374
-    new JavaMeth(terp.wrap.wrapVec, "at:put:", "at:p:") {
+    new JavaMeth(terp.wrap.clsVec, "at:put:", "at:p:") {
hunk ./terse-vm/src/terse/vm/Wrap.java 387
-    new JavaMeth(terp.wrap.wrapVec, "append:", "ap:") {
+    new JavaMeth(terp.wrap.clsVec, "append:", "ap:") {
hunk ./terse-vm/src/terse/vm/Wrap.java 396
+    new JavaMeth(terp.wrap.clsFrame, "prevFrame", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+        Frame self = (Frame) r;
+        return self.prev;
+      }
+    };
+    new JavaMeth(terp.wrap.clsFrame, "receiver", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+        Frame self = (Frame) r;
+        return self.self;
+      }
+    };
+    new JavaMeth(terp.wrap.clsFrame, "localVars", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+        Frame self = (Frame) r;
+        return new Vec(terp, terp.pros(self.locals));
+      }
+    };
+    new JavaMeth(terp.wrap.clsFrame, "currentMethodExpr", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+        Frame self = (Frame) r;
+        return self.top;
+      }
+    };
+    new JavaMeth(terp.wrap.clsFrame, "level", "") {
+      public Pro apply(Frame f, Pro r, Pro[] args) {
+        Frame self = (Frame) r;
+        return terp.newNum(self.level);
+      }
+    };
hunk ./terse-vm/src/terse/vm/Wrap.java 431
-    wrapProCls = terp.tProCls;
-    wrapPro = terp.tPro;
+    this.clsProCls = terp.tProCls;
+    this.clsPro = terp.tPro;
hunk ./terse-vm/src/terse/vm/Wrap.java 435
-    this.wrapSuperCls = terp.clss.get("supercls");
-    if (this.wrapSuperCls == null) {
-      this.wrapSuperCls = new Cls(terp.tMetaclsCls, terp, "SuperCls", this.wrapProCls);
+    this.clsSuperCls = terp.clss.get("supercls");
+    if (this.clsSuperCls == null) {
+      this.clsSuperCls = new Cls(terp.tMetaclsCls, terp, "SuperCls", this.clsProCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 439
-    this.wrapSuper      = terp.clss.get("super");
-    if (this.wrapSuper == null) {
-      this.wrapSuper = new Cls(this.wrapSuperCls, terp, "Super", this.wrapPro);
+    this.clsSuper      = terp.clss.get("super");
+    if (this.clsSuper == null) {
+      this.clsSuper = new Cls(this.clsSuperCls, terp, "Super", this.clsPro);
hunk ./terse-vm/src/terse/vm/Wrap.java 444
-    this.wrapObjCls = terp.clss.get("objcls");
-    if (this.wrapObjCls == null) {
-      this.wrapObjCls = new Cls(terp.tMetaclsCls, terp, "ObjCls", this.wrapProCls);
+    this.clsObjCls = terp.clss.get("objcls");
+    if (this.clsObjCls == null) {
+      this.clsObjCls = new Cls(terp.tMetaclsCls, terp, "ObjCls", this.clsProCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 448
-    this.wrapObj      = terp.clss.get("obj");
-    if (this.wrapObj == null) {
-      this.wrapObj = new Cls(this.wrapObjCls, terp, "Obj", this.wrapPro);
+    this.clsObj      = terp.clss.get("obj");
+    if (this.clsObj == null) {
+      this.clsObj = new Cls(this.clsObjCls, terp, "Obj", this.clsPro);
hunk ./terse-vm/src/terse/vm/Wrap.java 453
-    this.wrapSysCls = terp.clss.get("syscls");
-    if (this.wrapSysCls == null) {
-      this.wrapSysCls = new Cls(terp.tMetaclsCls, terp, "SysCls", this.wrapObjCls);
+    this.clsSysCls = terp.clss.get("syscls");
+    if (this.clsSysCls == null) {
+      this.clsSysCls = new Cls(terp.tMetaclsCls, terp, "SysCls", this.clsObjCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 457
-    this.wrapSys      = terp.clss.get("sys");
-    if (this.wrapSys == null) {
-      this.wrapSys = new Cls(this.wrapSysCls, terp, "Sys", this.wrapObj);
+    this.clsSys      = terp.clss.get("sys");
+    if (this.clsSys == null) {
+      this.clsSys = new Cls(this.clsSysCls, terp, "Sys", this.clsObj);
hunk ./terse-vm/src/terse/vm/Wrap.java 462
-    this.wrapBogusCls = terp.clss.get("boguscls");
-    if (this.wrapBogusCls == null) {
-      this.wrapBogusCls = new Cls(terp.tMetaclsCls, terp, "BogusCls", this.wrapSysCls);
+    this.clsBogusCls = terp.clss.get("boguscls");
+    if (this.clsBogusCls == null) {
+      this.clsBogusCls = new Cls(terp.tMetaclsCls, terp, "BogusCls", this.clsSysCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 466
-    this.wrapBogus      = terp.clss.get("bogus");
-    if (this.wrapBogus == null) {
-      this.wrapBogus = new Cls(this.wrapBogusCls, terp, "Bogus", this.wrapSys);
+    this.clsBogus      = terp.clss.get("bogus");
+    if (this.clsBogus == null) {
+      this.clsBogus = new Cls(this.clsBogusCls, terp, "Bogus", this.clsSys);
hunk ./terse-vm/src/terse/vm/Wrap.java 471
-    this.wrapBogus.eval("self defineInstanceVars: 'slot1 slot2 slot3'");
+    this.clsBogus.eval("self defineInstanceVars: 'slot1 slot2 slot3'");
hunk ./terse-vm/src/terse/vm/Wrap.java 473
-    this.wrapUndefinedCls = terp.clss.get("undefinedcls");
-    if (this.wrapUndefinedCls == null) {
-      this.wrapUndefinedCls = new Cls(terp.tMetaclsCls, terp, "UndefinedCls", this.wrapObjCls);
+    this.clsUndefinedCls = terp.clss.get("undefinedcls");
+    if (this.clsUndefinedCls == null) {
+      this.clsUndefinedCls = new Cls(terp.tMetaclsCls, terp, "UndefinedCls", this.clsObjCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 477
-    this.wrapUndefined      = terp.clss.get("undefined");
-    if (this.wrapUndefined == null) {
-      this.wrapUndefined = new Cls(this.wrapUndefinedCls, terp, "Undefined", this.wrapObj);
+    this.clsUndefined      = terp.clss.get("undefined");
+    if (this.clsUndefined == null) {
+      this.clsUndefined = new Cls(this.clsUndefinedCls, terp, "Undefined", this.clsObj);
hunk ./terse-vm/src/terse/vm/Wrap.java 482
-    this.wrapBlkCls = terp.clss.get("blkcls");
-    if (this.wrapBlkCls == null) {
-      this.wrapBlkCls = new Cls(terp.tMetaclsCls, terp, "BlkCls", this.wrapObjCls);
+    this.clsBlkCls = terp.clss.get("blkcls");
+    if (this.clsBlkCls == null) {
+      this.clsBlkCls = new Cls(terp.tMetaclsCls, terp, "BlkCls", this.clsObjCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 486
-    this.wrapBlk      = terp.clss.get("blk");
-    if (this.wrapBlk == null) {
-      this.wrapBlk = new Cls(this.wrapBlkCls, terp, "Blk", this.wrapObj);
+    this.clsBlk      = terp.clss.get("blk");
+    if (this.clsBlk == null) {
+      this.clsBlk = new Cls(this.clsBlkCls, terp, "Blk", this.clsObj);
hunk ./terse-vm/src/terse/vm/Wrap.java 491
-    this.wrapNumCls = terp.clss.get("numcls");
-    if (this.wrapNumCls == null) {
-      this.wrapNumCls = new Cls(terp.tMetaclsCls, terp, "NumCls", this.wrapObjCls);
+    this.clsNumCls = terp.clss.get("numcls");
+    if (this.clsNumCls == null) {
+      this.clsNumCls = new Cls(terp.tMetaclsCls, terp, "NumCls", this.clsObjCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 495
-    this.wrapNum      = terp.clss.get("num");
-    if (this.wrapNum == null) {
-      this.wrapNum = new Cls(this.wrapNumCls, terp, "Num", this.wrapObj);
+    this.clsNum      = terp.clss.get("num");
+    if (this.clsNum == null) {
+      this.clsNum = new Cls(this.clsNumCls, terp, "Num", this.clsObj);
hunk ./terse-vm/src/terse/vm/Wrap.java 500
-    this.wrapBufCls = terp.clss.get("bufcls");
-    if (this.wrapBufCls == null) {
-      this.wrapBufCls = new Cls(terp.tMetaclsCls, terp, "BufCls", this.wrapObjCls);
+    this.clsBufCls = terp.clss.get("bufcls");
+    if (this.clsBufCls == null) {
+      this.clsBufCls = new Cls(terp.tMetaclsCls, terp, "BufCls", this.clsObjCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 504
-    this.wrapBuf      = terp.clss.get("buf");
-    if (this.wrapBuf == null) {
-      this.wrapBuf = new Cls(this.wrapBufCls, terp, "Buf", this.wrapObj);
+    this.clsBuf      = terp.clss.get("buf");
+    if (this.clsBuf == null) {
+      this.clsBuf = new Cls(this.clsBufCls, terp, "Buf", this.clsObj);
hunk ./terse-vm/src/terse/vm/Wrap.java 509
-    this.wrapStrCls = terp.clss.get("strcls");
-    if (this.wrapStrCls == null) {
-      this.wrapStrCls = new Cls(terp.tMetaclsCls, terp, "StrCls", this.wrapObjCls);
+    this.clsStrCls = terp.clss.get("strcls");
+    if (this.clsStrCls == null) {
+      this.clsStrCls = new Cls(terp.tMetaclsCls, terp, "StrCls", this.clsObjCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 513
-    this.wrapStr      = terp.clss.get("str");
-    if (this.wrapStr == null) {
-      this.wrapStr = new Cls(this.wrapStrCls, terp, "Str", this.wrapObj);
+    this.clsStr      = terp.clss.get("str");
+    if (this.clsStr == null) {
+      this.clsStr = new Cls(this.clsStrCls, terp, "Str", this.clsObj);
hunk ./terse-vm/src/terse/vm/Wrap.java 518
-    this.wrapVecCls = terp.clss.get("veccls");
-    if (this.wrapVecCls == null) {
-      this.wrapVecCls = new Cls(terp.tMetaclsCls, terp, "VecCls", this.wrapObjCls);
+    this.clsVecCls = terp.clss.get("veccls");
+    if (this.clsVecCls == null) {
+      this.clsVecCls = new Cls(terp.tMetaclsCls, terp, "VecCls", this.clsObjCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 522
-    this.wrapVec      = terp.clss.get("vec");
-    if (this.wrapVec == null) {
-      this.wrapVec = new Cls(this.wrapVecCls, terp, "Vec", this.wrapObj);
+    this.clsVec      = terp.clss.get("vec");
+    if (this.clsVec == null) {
+      this.clsVec = new Cls(this.clsVecCls, terp, "Vec", this.clsObj);
hunk ./terse-vm/src/terse/vm/Wrap.java 527
-    this.wrapDictCls = terp.clss.get("dictcls");
-    if (this.wrapDictCls == null) {
-      this.wrapDictCls = new Cls(terp.tMetaclsCls, terp, "DictCls", this.wrapObjCls);
+    this.clsDictCls = terp.clss.get("dictcls");
+    if (this.clsDictCls == null) {
+      this.clsDictCls = new Cls(terp.tMetaclsCls, terp, "DictCls", this.clsObjCls);
hunk ./terse-vm/src/terse/vm/Wrap.java 531
-    this.wrapDict      = terp.clss.get("dict");
-    if (this.wrapDict == null) {
-      this.wrapDict = new Cls(this.wrapDictCls, terp, "Dict", this.wrapObj);
+    this.clsDict      = terp.clss.get("dict");
+    if (this.clsDict == null) {
+      this.clsDict = new Cls(this.clsDictCls, terp, "Dict", this.clsObj);
+    }
+          
+    this.clsFrameCls = terp.clss.get("framecls");
+    if (this.clsFrameCls == null) {
+      this.clsFrameCls = new Cls(terp.tMetaclsCls, terp, "FrameCls", this.clsObjCls);
+    }
+    this.clsFrame      = terp.clss.get("frame");
+    if (this.clsFrame == null) {
+      this.clsFrame = new Cls(this.clsFrameCls, terp, "Frame", this.clsObj);
hunk ./terse-vm/src/terse/vm/Wrap.java 547
-  public Cls wrapProCls;
-  public Cls wrapPro;
+  public Cls clsProCls;
+  public Cls clsPro;
+        
+  public Cls clsSuperCls;
+  public Cls clsSuper;
hunk ./terse-vm/src/terse/vm/Wrap.java 553
-  public Cls wrapSuperCls;
-  public Cls wrapSuper;
+  public Cls clsObjCls;
+  public Cls clsObj;
hunk ./terse-vm/src/terse/vm/Wrap.java 556
-  public Cls wrapObjCls;
-  public Cls wrapObj;
+  public Cls clsSysCls;
+  public Cls clsSys;
hunk ./terse-vm/src/terse/vm/Wrap.java 559
-  public Cls wrapSysCls;
-  public Cls wrapSys;
+  public Cls clsBogusCls;
+  public Cls clsBogus;
hunk ./terse-vm/src/terse/vm/Wrap.java 562
-  public Cls wrapBogusCls;
-  public Cls wrapBogus;
+  public Cls clsUndefinedCls;
+  public Cls clsUndefined;
hunk ./terse-vm/src/terse/vm/Wrap.java 565
-  public Cls wrapUndefinedCls;
-  public Cls wrapUndefined;
+  public Cls clsBlkCls;
+  public Cls clsBlk;
hunk ./terse-vm/src/terse/vm/Wrap.java 568
-  public Cls wrapBlkCls;
-  public Cls wrapBlk;
+  public Cls clsNumCls;
+  public Cls clsNum;
hunk ./terse-vm/src/terse/vm/Wrap.java 571
-  public Cls wrapNumCls;
-  public Cls wrapNum;
+  public Cls clsBufCls;
+  public Cls clsBuf;
hunk ./terse-vm/src/terse/vm/Wrap.java 574
-  public Cls wrapBufCls;
-  public Cls wrapBuf;
+  public Cls clsStrCls;
+  public Cls clsStr;
hunk ./terse-vm/src/terse/vm/Wrap.java 577
-  public Cls wrapStrCls;
-  public Cls wrapStr;
+  public Cls clsVecCls;
+  public Cls clsVec;
hunk ./terse-vm/src/terse/vm/Wrap.java 580
-  public Cls wrapVecCls;
-  public Cls wrapVec;
+  public Cls clsDictCls;
+  public Cls clsDict;
hunk ./terse-vm/src/terse/vm/Wrap.java 583
-  public Cls wrapDictCls;
-  public Cls wrapDict;
+  public Cls clsFrameCls;
+  public Cls clsFrame;
hunk ./terse-vm/src/terse/vm/wrap.tcl 61
-	   puts "    new JavaMeth(terp.wrap.wrap$cls, \"$kw0\", \"$kw1\") {"
+	   puts "    new JavaMeth(terp.wrap.cls$cls, \"$kw0\", \"$kw1\") {"
hunk ./terse-vm/src/terse/vm/wrap.tcl 130
-  public Cls wrap${cls}Cls;
-  public Cls wrap${cls};
+  public Cls cls${cls}Cls;
+  public Cls cls${cls};
hunk ./terse-vm/src/terse/vm/wrap.tcl 136
-    this.wrap${cls}Cls = terp.clss.get("[string tolower ${cls}Cls]");
-    if (this.wrap${cls}Cls == null) {
-      this.wrap${cls}Cls = new Cls(terp.tMetaclsCls, terp, "${cls}Cls", this.wrap${supercls}Cls);
+    this.cls${cls}Cls = terp.clss.get("[string tolower ${cls}Cls]");
+    if (this.cls${cls}Cls == null) {
+      this.cls${cls}Cls = new Cls(terp.tMetaclsCls, terp, "${cls}Cls", this.cls${supercls}Cls);
hunk ./terse-vm/src/terse/vm/wrap.tcl 140
-    this.wrap$cls      = terp.clss.get("[string tolower $cls]");
-    if (this.wrap$cls == null) {
-      this.wrap${cls} = new Cls(this.wrap${cls}Cls, terp, "${cls}", this.wrap${supercls});
+    this.cls$cls      = terp.clss.get("[string tolower $cls]");
+    if (this.cls$cls == null) {
+      this.cls${cls} = new Cls(this.cls${cls}Cls, terp, "${cls}", this.cls${supercls});
hunk ./terse-vm/src/terse/vm/wrap.tcl 149
-    this.wrap${cls}.eval("self defineInstanceVars: '$vv'");
+    this.cls${cls}.eval("self defineInstanceVars: '$vv'");
hunk ./terse-vm/src/terse/vm/wrap.tcl 153
+      } elseif {$verb == "get"} {
+        set cls [lindex $cmd 1]
+        set type [lindex $cmd 2]
+        set slot [lindex $cmd 3]
+        set meth [lindex $cmd 4]
+        set doc [lindex $cmd 5]
+
+	   puts "    new JavaMeth(terp.wrap.cls$cls, \"$meth\", \"\") {"
+	   puts "      public Pro apply(Frame f, Pro r, Pro\[\] args) {"
+	   puts "        $cls self = ($cls) r;" 
+
+	   if { $type == "int" } {
+	     puts "        return terp.newNum(self.$slot);"
+	   } elseif { $type == "double" } {
+	     puts "        return terp.newNum(self.$slot);"
+	   } elseif { $type == "String" } {
+	     puts "        return terp.newStr(self.$slot);"
+	   } elseif { $type == {Pro[]} } {
+	     puts "        return new Vec(terp, terp.pros(self.$slot));"
+	   } elseif { $type == "." } {
+	     puts "        return self.$slot;"
+	   } else {
+	     error "Unknown type <$type> in getter for cls $cls slot $slot"
+	   }
+
+	   puts "      }"
+	   puts "    };"
+
hunk ./terse-vm/src/terse/vm/wrap.tcl 218
-wrap Pro.java
+foreach j $argv {
+  wrap $j
+}
hunk ./terse-vm/src/terse/vm/wrap.tcl 228
-    wrapProCls = terp.tProCls;
-    wrapPro = terp.tPro;
+    this.clsProCls = terp.tProCls;
+    this.clsPro = terp.tPro;