JSValue changes, closing in on JSObject API. Began 'correct' semantic

implementation for various operators.
This commit is contained in:
rogerl@netscape.com
1999-05-25 21:49:40 +00:00
parent 5a9bce8a7e
commit 6fed77b487
14 changed files with 291 additions and 146 deletions
+4
View File
@@ -35,6 +35,10 @@ class JSInteger extends JSNumber {
return new JSString(Integer.toString(i));
}
void twiddle(Environment theEnv) {
theEnv.theStack.push(new JSInteger(~i));
}
void and(Environment theEnv) {
JSValue vR = theEnv.theStack.pop();
theEnv.theStack.push(new JSInteger(i & vR.toJSInteger().i));