[e-cvs] cvs commit: e/src/jsrc/org/erights/e/elib/slot RuinedSlot.java Slot.java
markm@eros.cs.jhu.edu
markm@eros.cs.jhu.edu
Sat, 1 Dec 2001 05:38:42 -0500
markm 01/12/01 05:38:42
Modified: src/jsrc Makefile
src/jsrc/org/erights/e/elang/evm Evaluator.java
src/jsrc/org/erights/e/elang/interp LazyEvalSlot.java
LoaderScope.java
src/jsrc/org/erights/e/elang/syntax EParser.java e.y
src/jsrc/org/erights/e/elang/visitors ETreeVisitor.java
src/jsrc/org/erights/e/elib/ref Ref.java SlotRef.java
src/jsrc/org/erights/e/elib/slot RuinedSlot.java Slot.java
Log:
Fixed earlier search-n-replace that was too agressive
Revision Changes Path
1.60 +7 -4 e/src/jsrc/Makefile
Index: Makefile
===================================================================
RCS file: /cvs/e/src/jsrc/Makefile,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- Makefile 2001/11/09 01:17:20 1.59
+++ Makefile 2001/12/01 10:38:41 1.60
@@ -50,15 +50,18 @@
# optional: remake the parsers from yacc, or just use the generated
# ones, which are included.
elang_parser:
- (cd $(TOP)/src/jsrc/org/quasiliteral/term; $(MAKE) all)
+ find org/quasiliteral/astro -name '*.java' > files.tmp
+ $(JCOMPILE) @files.tmp
+ # (cd $(TOP)/src/jsrc/org/quasiliteral/term; $(MAKE) all)
(cd $(ER)/elang/syntax; $(MAKE) all)
# space-time-local elang
# depends on stl_elib, elang_builder
stl_elang:
- find $(ER)/elang -name '*.java' > files.tmp
- find org/quasiliteral -name '*.java' >> files.tmp
- find org/capml -name '*.java' >> files.tmp
+ find $(ER)/elang -name '*.java' > files.tmp
+ find org/capml -name '*.java' >> files.tmp
+ # find org/quasiliteral/term -name '*.java' >> files.tmp
+ # find org/quasiliteral/quasiterm -name '*.java' >> files.tmp
$(JCOMPILE) @files.tmp
# elmer
1.12 +2 -2 e/src/jsrc/org/erights/e/elang/evm/Evaluator.java
Index: Evaluator.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/evm/Evaluator.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Evaluator.java 2001/12/01 07:52:12 1.11
+++ Evaluator.java 2001/12/01 10:38:41 1.12
@@ -86,7 +86,7 @@
* for example, the variable "foo" into corresponding final variable
* "foo__Slot", bound to an explicit Slot object holding the value of
* the "foo" variable. Use of "foo" as a rValue then becomes
- * "foo__Slot getData" and assignment becomes "foo__Slot
+ * "foo__Slot getValue()" and assignment becomes "foo__Slot
* setValue(newValue)". All non-final variables and assignment
* statements could have been transformed away this way, but for
* compilation purposes we chose not to. However, when transforming
@@ -115,7 +115,7 @@
* def y :final := 7
* ... x__Slot ... (x__Slot setValue(4)) ... y ...
* def [pow, pow__Resolver] := PromiseMaker pair
- * ... visualizingEvaluator eval(e`x__Slot getData ** y =~ pow :final`,
+ * ... visualizingEvaluator eval(e`x__Slot getValue() ** y =~ pow :final`,
* ["x__Slot" => x__Slot, "y" => y],
* true,
* ["pow" => pow_Resolver]) ...
1.10 +12 -10 e/src/jsrc/org/erights/e/elang/interp/LazyEvalSlot.java
Index: LazyEvalSlot.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/LazyEvalSlot.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- LazyEvalSlot.java 2001/12/01 07:52:12 1.9
+++ LazyEvalSlot.java 2001/12/01 10:38:41 1.10
@@ -21,7 +21,6 @@
import org.erights.e.elang.evm.EExpr;
import org.erights.e.elang.scope.Scope;
-import org.erights.e.elang.scope.OuterScope;
import org.erights.e.elang.syntax.EParser;
import org.erights.e.elib.eio.TextWriter;
import org.erights.e.elib.prim.E;
@@ -45,8 +44,10 @@
*
* @author Mark S. Miller
*/
-/*package*/ class LazyEvalSlot implements Slot {
+/*package*/
+class LazyEvalSlot implements Slot {
+
/** only meaningful when myOptSource != null */
private Object myOptScope;
@@ -57,14 +58,15 @@
private Object myOptValue;
/**
- * @param scope The scope in which to evaluate the source text. It's
- * declared as an Object rather than Scope so that it can be a promise
- * for a Scope. This promise must become fulfilled before the first
- * getData() happens.
- * @param source The source text to be evaluated in the promised scope at
- * the time of the first getData().
- */
- /*package*/ LazyEvalSlot(Object scope, Twine source) {
+ * @param scope The scope in which to evaluate the source text. It's
+ * declared as an Object rather than Scope so that it can be
+ * a promise for a Scope. This promise must become fulfilled
+ * before the first getValue() happens.
+ * @param source The source text to be evaluated in the promised scope
+ * at the time of the first getValue().
+ */
+ /*package*/
+ LazyEvalSlot(Object scope, Twine source) {
myOptScope = scope;
myOptSource = source;
myOptValue = null;
1.42 +2 -2 e/src/jsrc/org/erights/e/elang/interp/LoaderScope.java
Index: LoaderScope.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/LoaderScope.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- LoaderScope.java 2001/12/01 07:52:12 1.41
+++ LoaderScope.java 2001/12/01 10:38:41 1.42
@@ -180,8 +180,8 @@
result = FinalSlotMaker.THE_ONE.makeSlot(ref, null);
myAlreadyImported.put(fqName, result, true);
Object value;
- //start with it set to false, so we'll also remove fqName if getData
- //throws
+ //start with it set to false, so we'll also remove fqName if
+ //getValue() throws
boolean[] keep = { false };
try {
value = getValue(fqName, keep);
1.104 +8 -8 e/src/jsrc/org/erights/e/elang/syntax/EParser.java
Index: EParser.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/EParser.java,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- EParser.java 2001/12/01 07:52:12 1.103
+++ EParser.java 2001/12/01 10:38:41 1.104
@@ -1142,7 +1142,7 @@
static public final StaticMaker EParserMaker =
StaticMaker.make(EParser.class);
-/**
+/**
* caches previous simple parses (as is used for quasi-parsing)
*/
static private IdentityCacheTable OurCache =
@@ -1151,7 +1151,7 @@
/**
*
*/
-static private final ConstMap DefaultProps =
+static private final ConstMap DefaultProps =
ConstMap.fromProperties(System.getProperties());
@@ -1159,7 +1159,7 @@
/** contains all the tokens after yylval */
private ELexer myLexer;
-/**
+/**
* Do we escape after parsing only one expression, or do we parse the
* entire input?
*/
@@ -1261,7 +1261,7 @@
/**
* If the input is empty, returns the null expression e`null`, rather
- * than null.
+ * than null.
*/
public ENode parse() {
ENode result = optParse();
@@ -1623,7 +1623,7 @@
* If 'name' is a keyword, return it's token type code, else -1.
* <p>
* Note that E keywords are case insensitive, so 'name' is first
- * toLowerCase()d.
+ * toLowerCase()d.
*/
static public int optKeywordType(String name) {
name = name.toLowerCase();
@@ -1640,7 +1640,7 @@
/**
* These are the tokens that may appear at the end of a line, in which
* case the next line is a (to be indented) continuation of the
- * expression.
+ * expression.
* <p>
* Note that > isn't on the list because of its role in closing a
* calculated URI expression.
@@ -1738,7 +1738,7 @@
//###############################################################
// method: yyparse : parse input and execute indicated items
//###############################################################
-int yyparse()
+int yyparse()
{
int yyn; //next next thing to do
int yym; //
@@ -1754,7 +1754,7 @@
while (true) //until parsing is done, either correctly, or w/error
{
doaction=true;
- if (yydebug) debug("loop");
+ if (yydebug) debug("loop");
//#### NEXT ACTION (from reduction table)
for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])
{
1.95 +1 -1 e/src/jsrc/org/erights/e/elang/syntax/e.y
Index: e.y
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/e.y,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- e.y 2001/11/20 12:32:06 1.94
+++ e.y 2001/12/01 10:38:41 1.95
@@ -970,7 +970,7 @@
* A non-reserved ID (as a String)
*/
ident:
- ID { $$ = ((AstroToken)$1).getValue(); }
+ ID { $$ = ((AstroToken)$1).getData(); }
| reserved { reserved("keyword \"" +
((AstroToken)$1).getText() +
"\""); }
1.20 +1 -1 e/src/jsrc/org/erights/e/elang/visitors/ETreeVisitor.java
Index: ETreeVisitor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/visitors/ETreeVisitor.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ETreeVisitor.java 2001/12/01 07:52:13 1.19
+++ ETreeVisitor.java 2001/12/01 10:38:42 1.20
@@ -129,7 +129,7 @@
/**
* varName. <p>
*
- * The result of a getData on the slot named by this varName.
+ * The result of a getValue() on the slot named by this varName.
*
* @see <a href="{@docroot}/../elang/kernel/NounExpr.html">The
* Kernel-E Noun Expression</a>
1.33 +1 -1 e/src/jsrc/org/erights/e/elib/ref/Ref.java
Index: Ref.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/Ref.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- Ref.java 2001/12/01 07:52:13 1.32
+++ Ref.java 2001/12/01 10:38:42 1.33
@@ -101,7 +101,7 @@
/**
* Makes a promise that should be resolved to a Slot, and which responds
- * to synchronous getData() calls optimistically. Just like
+ * to synchronous getValue() calls optimistically. Just like
* Ref.promise(), except it uses a SlotRef as the SwitchableRef.
*/
static public Object[] slotPromise() {
1.9 +15 -15 e/src/jsrc/org/erights/e/elib/ref/SlotRef.java
Index: SlotRef.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/SlotRef.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SlotRef.java 2001/12/01 07:52:13 1.8
+++ SlotRef.java 2001/12/01 10:38:42 1.9
@@ -23,11 +23,11 @@
/**
* A Ref that's expected to resolve to a Slot. It's special behavior is
- * that, even when EVENTUAL, it will respond to immediate getData() calls
- * by handling out the Ref of a promise for the Slot's getData(). When a
+ * that, even when EVENTUAL, it will respond to immediate getValue() calls
+ * by handling out the Ref of a promise for the Slot's getValue(). When a
* SlotRef gets committed, it must be directly committed to an object
- * that immediately responds to getData(), as this will be called on the
- * resolution and used to resolve the promises made by previous getData()s
+ * that immediately responds to getValue(), as this will be called on the
+ * resolution and used to resolve the promises made by previous getValue()s
* on this SlotPromise.
*
* @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
@@ -49,13 +49,13 @@
/**
* In order to J-implement the Slot interface. Return a promise for the
- * getData() of my future Slot.
+ * getValue() of my future Slot.
*/
public Object getValue() {
if (null != myValueResolver) {
return myValueRef;
} else {
- return super.callAll("getData", NO_ARGS);
+ return super.callAll("getValue", NO_ARGS);
}
}
@@ -67,11 +67,11 @@
}
/**
- * Intercept immediate getData() calls and return a promise for the
- * getData() of my future Slot.
+ * Intercept immediate getValue() calls and return a promise for the
+ * getValue() of my future Slot.
*/
public Object callAll(String verb, Object[] args) {
- if (args.length == 0 && verb.equals("getData")) {
+ if (args.length == 0 && verb.equals("getValue")) {
return getValue();
} else {
return super.callAll(verb, args);
@@ -79,18 +79,18 @@
}
/**
- * If this SlotRef becomes committed to a presumed slot, immediately
- * resolve the result of previously synchronous getData() calls (not
- * sends) to the result of calling getData() on this . Otherwise, break
- * the promise returned by these getData() calls.
- */
+ * If this SlotRef becomes committed to a presumed slot, immediately
+ * resolve the result of previously synchronous getValue() calls (not
+ * sends) to the result of calling getValue() on this . Otherwise, break
+ * the promise returned by these getValue() calls.
+ */
/*package*/ void commit() {
super.commit();
Resolver valueResolver = myValueResolver;
myValueRef = null;
myValueResolver = null;
try {
- valueResolver.resolve(super.callAll("getData", NO_ARGS));
+ valueResolver.resolve(super.callAll("getValue", NO_ARGS));
} catch (Throwable problem) {
valueResolver.smash(problem);
}
1.17 +1 -1 e/src/jsrc/org/erights/e/elib/slot/RuinedSlot.java
Index: RuinedSlot.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/slot/RuinedSlot.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- RuinedSlot.java 2001/12/01 07:52:13 1.16
+++ RuinedSlot.java 2001/12/01 10:38:42 1.17
@@ -27,7 +27,7 @@
import java.io.IOException;
/**
- * A ruined slot responds to both getData and setValue by throwing the
+ * A ruined slot responds to both getValue() and setValue by throwing the
* problem that explains why it's ruined.
*
* @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
1.8 +1 -1 e/src/jsrc/org/erights/e/elib/slot/Slot.java
Index: Slot.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/slot/Slot.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Slot.java 2001/12/01 07:52:13 1.7
+++ Slot.java 2001/12/01 10:38:42 1.8
@@ -41,7 +41,7 @@
/**
* Sets the current value of the variable to be a coercion of specimen to
* a value that meets the constraints represented by this slot.
- * getData() will then return this value. If the variable is final
+ * getValue() will then return this value. If the variable is final
* (immutable), then throw an informative exception instead.
*/
void setValue(Object specimen);