[e-cvs] cvs commit: e/src/jsrc/net/captp/tables ExportsTable.java SwissTable.java
markm@eros.cs.jhu.edu
markm@eros.cs.jhu.edu
Fri, 3 Aug 2001 20:45:38 -0400
markm 01/08/03 20:45:38
Modified: src/csrc/setup eprops-template.txt
src/esrc/scripts setup.e
src/jsrc/net/captp/jcomm ProxyConnection.java
src/jsrc/net/captp/tables ExportsTable.java SwissTable.java
Log:
Exported promises (NewRemoteVowDesc) works
Revision Changes Path
1.17 +24 -24 e/src/csrc/setup/eprops-template.txt
Index: eprops-template.txt
===================================================================
RCS file: /cvs/e/src/csrc/setup/eprops-template.txt,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- eprops-template.txt 2001/04/13 08:08:33 1.16
+++ eprops-template.txt 2001/08/04 00:45:38 1.17
@@ -1,39 +1,39 @@
# E Configuration File (or E Configuration Template File)
-#
+#
# If you are looking at eprops-template.txt, then
# you are looking at a template to be used to construct eprops.txt.
# In this case, for several property definitions, you should instead
-# see text of the form, for example,
-#
+# see text of the form, for example,
+#
# e.version=$<<e.version>>
-#
+#
# but with curly brackets instead of angle brackets.
-#
+#
# In the comment preceding that line, you should see an example of a
# possible value of this property, such as "0.8.9". Were this
# property to have this value in the eprops.txt file, it would appear
# as
-#
+#
# e.version=0.8.9
-#
+#
# The eprops.txt file is written in a restricted form of Java's
# Properties file save/load syntax. If you are looking at an
# eprops.txt file, all property definitions should already have the
# above form. You may create an eprops.txt file manually by copying
# the eprops-template.txt file and replacing the
# dollar-double-curly-bracket for with the Java propert definition.
-#
+#
# Notice that there are no quotes around the value. This is correct
# even if the property value contains spaces, since the Java property
# syntax reads all text till the end of the line.
-#
+#
# When a property value is a file or directory path name, it should be
# absolute and use forward slashes ("/"), regardless of the local
# platform's convention. If it's a non-top-level directory, a
# terminal slash is optional. Note: On MSWindows, you must specify
# drives the MSWindows/Java way ("c:...") rather than the Cygwin way
# ("//c/...").
-#
+#
# When a property value is a pathlist (a list of paths, sometimes also
# confusingly refered to as a "path", as in the PATH or CLASSPATH
# variables), then the entries should be separated by a semicolon
@@ -45,7 +45,7 @@
# property. This is so command-line property settings (using
# arguments of the form "-D<name>=<value>) will take precedence over
# property settings in eprops.txt.
-#
+#
# The eprops.txt file should serve as a record of everywhere (outside
# of the install directory itself) that installation placed files and
# registry entries, so that a future uninstaller will know (fingers
@@ -133,7 +133,7 @@
# nothing, and setup.e simply grabs whatever extensions it likes
# (which are these 5).
#
-# ".e;.maker;.updoc;.vat;.cap" or any subset.
+# ".e;.emaker;.updoc;.vat;.cap" or any subset.
e.extensionslist=${{e.extensionslist}}
@@ -162,7 +162,7 @@
################## Other Switches #####################
# One of "report" (the default), "prompt", or "gui". <p>
-#
+#
# When E fails to launch, or when the top level script (the *.e file)
# throws a problem, how should the E interpreter report the problem
# before exiting with a non-zero error code?
@@ -170,33 +170,33 @@
# When this property is set to "report" (or when the property is
# absent), then E prints a problem report on stderr and exits
# immediately. <p>
-#
+#
# When set to "prompt", E still prints the problem report on stderr,
# but it then also prompts for a character to be typed in before the
# process is dismissed, and then blocks waiting for that
-# character. <p>
-#
+# character. <p>
+#
# When set to "gui", E will pop up a window at least reporting the
# error and waiting to be dismissed. Later versions of E may provide
# support for diagnostics and debugging starting from this window.
# Note: "gui" is not yet implemented. If used, it will prompt
-# instead.
+# instead.
e.onErrorExit=${{e.onErrorExit}}
# One of "platform" (the default), "none", or a look and feel class
# name. <p>
-#
+#
# When set to "platform" (or when the property is absent), the look
# and feel is set to the default for the platform according to
# "UIManager getSystemLookAndFeelClassName()". <p>
-#
+#
# When set to "none", this advises code that there may not be an
# available graphical display device, and that they should try, if
# possible, to avoid any operations which would fail in a pure
# character/teletype environment, such as a telnet session. <p>
-#
+#
# When set to a look and feel class name, it sets this to be the
# initial look and feel for this E process.
@@ -265,7 +265,7 @@
# stated for a particular feature.
# Only e.enable.bind below defaults to "true" for reasons it
-# explains.
+# explains.
# Another reason they are left in the implementation is to allow
# experimentation. All these features were added for reasons that
@@ -279,7 +279,7 @@
# to do so.
-# If e.enable.anon-lambda is set to "true", E accepts the
+# If e.enable.anon-lambda is set to "true", E accepts the
# " '_' '('params...')' '{' eExpr '}' and " '_'{eExpr}" lambda
# shorthands. To turn a program using this feature into a proper
# modern E program, the first should be prefixed by "def". In the
@@ -362,7 +362,7 @@
e.enable.one-method-object=${{e.enable.one-method-object}}
-# Accept the experimental
+# Accept the experimental
# " 'def' name 'match' pattern '{' eExpr '}' " kernel
# construct. This is not a shorthand, so if you need it there's
# nothing to do instead. Rather, it is an exprimental kernel feature
@@ -401,7 +401,7 @@
# tab key. The best path to sanity is to simply avoid the presence of
# tab characters in text files, with the one unfortunate exception of
# "Makefile"s and "*.mk" files.
-#
+#
# Unfortunately, because so many text editors put tabs into files in a
# way that's hard to turn off, E must, by default, accept tabs as a
# valid whitespace character. However, to help you prevent yourself
1.13 +1 -1 e/src/esrc/scripts/setup.e
Index: setup.e
===================================================================
RCS file: /cvs/e/src/esrc/scripts/setup.e,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- setup.e 2001/04/05 01:21:59 1.12
+++ setup.e 2001/08/04 00:45:38 1.13
@@ -8,7 +8,7 @@
# eprops.txt
def props := [
- "e.extensionslist" => ".e;.maker;.updoc;.vat;.cap",
+ "e.extensionslist" => ".e;.emaker;.updoc;.vat;.cap",
"e.vendor" => "ERights.org",
"e.vendor.url" => "http://www.erights.org/",
"e.vendor.url.bug" => "mailto:bugs@erights.org",
1.19 +25 -7 e/src/jsrc/net/captp/jcomm/ProxyConnection.java
Index: ProxyConnection.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/ProxyConnection.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ProxyConnection.java 2001/07/29 03:06:13 1.18
+++ ProxyConnection.java 2001/08/04 00:45:38 1.19
@@ -317,10 +317,10 @@
*
*/
/*package*/ ProxyResolver makeQuestion() {
- int index = myQuestions.bind(null);
- RemoteVowHandler handler = new RemoteVowHandler(this, -index);
+ int pos = -myQuestions.bind(null);
+ RemoteVowHandler handler = new RemoteVowHandler(this, pos);
ProxyResolver result = handler.myResolver;
- myQuestions.put(index, result);
+ myQuestions.put(-pos, result);
return result;
}
@@ -349,9 +349,21 @@
/**
*
*/
- /*package*/ NewRemoteVowDesc newRemoteVowDesc(Object ref) {
- throw new RuntimeException
- ("XXX newRemoteVowDesc not yet implemented");
+ /*package*/ NewRemoteVowDesc newRemoteVowDesc(Object promise) {
+ int importPos = myExports.bind(promise);
+
+ BigInteger rdrBase = myEntropy.nextSwiss();
+ BigInteger rdrNum = BigIntegerSugar.cryptoHash(rdrBase);
+ BigInteger rdrHash = BigIntegerSugar.cryptoHash(rdrNum);
+
+ int rdrPos = -myQuestions.bind(null);
+ FarHandler handler = new FarHandler(this, rdrPos, rdrHash);
+ ProxyResolver rdrResolver = handler.myResolver;
+ myQuestions.put(-rdrPos, rdrResolver);
+ Object farRdr = rdrResolver.getProxy();
+ E.sendOnly(promise, "whenMoreResolved", farRdr);
+
+ return new NewRemoteVowDesc(importPos, rdrPos, rdrBase);
}
/**
@@ -416,7 +428,13 @@
int rdrPos,
BigInteger rdrBase)
{
- throw new RuntimeException("XXX newRemoteVow not yet implemented");
+ RemoteVowHandler handler = new RemoteVowHandler(this, importPos);
+ ProxyResolver resolver = handler.myResolver;
+ myImports.put(importPos, resolver);
+ DelayedRedirector rdr = new DelayedRedirector(resolver);
+ myAnswers.put(-rdrPos, rdr, true);
+ myProxyMgr.getSwissTable().registerNewSwiss(rdr, rdrBase);
+ return resolver.getProxy();
}
/**
1.4 +0 -18 e/src/jsrc/net/captp/tables/ExportsTable.java
Index: ExportsTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/ExportsTable.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ExportsTable.java 2001/07/29 02:16:49 1.3
+++ ExportsTable.java 2001/08/04 00:45:38 1.4
@@ -86,22 +86,4 @@
myPBPMap.putInt(pbp, index, true);
return index;
}
-
- /**
- * Allocates and returns the index of a newly exported local EVENTUAL
- * reference (a LocalVow).
- *
- * @param localVow The local eventual reference to be exported
- *
- * @return The index of the RemoveVow to be created-imported on the
- * other end.
- */
- public int newRemoteVowPos(Ref localVow) {
- if (! Ref.isEventual(localVow)) {
- //XXX should also check that it's not remote
- throw new RuntimeException("internal: " + localVow +
- " isn't eventual");
- }
- return bind(localVow);
- }
}
1.6 +1 -1 e/src/jsrc/net/captp/tables/SwissTable.java
Index: SwissTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/SwissTable.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SwissTable.java 2001/07/22 05:29:55 1.5
+++ SwissTable.java 2001/08/04 00:45:38 1.6
@@ -248,7 +248,7 @@
swissBase);
}
BigInteger result = BigIntegerSugar.cryptoHash(swissBase);
- Object oldRef = mySwissToRef.get(result, ref);
+ Object oldRef = mySwissToRef.get(result, null);
if (null != oldRef) {
throw new RuntimeException("Already registered: " + result);
}