Hmmm, new changes these are.

git-svn-id: svn://10.0.0.236/trunk@32641 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rogerl%netscape.com
1999-05-26 01:01:07 +00:00
parent 5bd2264bd8
commit 300d6f0885
13 changed files with 226 additions and 144 deletions

View File

@@ -15,23 +15,23 @@ class JSInteger extends JSNumber {
theEnv.theStack.push(this);
}
JSBoolean toJSBoolean() {
JSBoolean toJSBoolean(Environment theEnv) {
return (i != 0) ? JSBoolean.JSTrue : JSBoolean.JSFalse;
}
JSDouble toJSDouble() {
JSDouble toJSDouble(Environment theEnv) {
return new JSDouble(i);
}
JSInteger toJSInteger() {
JSInteger toJSInteger(Environment theEnv) {
return this;
}
JSValue toPrimitive() {
JSValue toPrimitive(Environment theEnv, String hint) {
return this;
}
JSString toJSString() {
JSString toJSString(Environment theEnv) {
return new JSString(Integer.toString(i));
}
@@ -41,32 +41,32 @@ class JSInteger extends JSNumber {
void and(Environment theEnv) {
JSValue vR = theEnv.theStack.pop();
theEnv.theStack.push(new JSInteger(i & vR.toJSInteger().i));
theEnv.theStack.push(new JSInteger(i & vR.toJSInteger(theEnv).i));
}
void or(Environment theEnv) {
JSValue vR = theEnv.theStack.pop();
theEnv.theStack.push(new JSInteger(i | vR.toJSInteger().i));
theEnv.theStack.push(new JSInteger(i | vR.toJSInteger(theEnv).i));
}
void xor(Environment theEnv) {
JSValue vR = theEnv.theStack.pop();
theEnv.theStack.push(new JSInteger(i ^ vR.toJSInteger().i));
theEnv.theStack.push(new JSInteger(i ^ vR.toJSInteger(theEnv).i));
}
void shl(Environment theEnv) {
JSValue vR = theEnv.theStack.pop();
theEnv.theStack.push(new JSInteger(i >> vR.toJSInteger().i));
theEnv.theStack.push(new JSInteger(i >> vR.toJSInteger(theEnv).i));
}
void shr(Environment theEnv) {
JSValue vR = theEnv.theStack.pop();
theEnv.theStack.push(new JSInteger(i << vR.toJSInteger().i));
theEnv.theStack.push(new JSInteger(i << vR.toJSInteger(theEnv).i));
}
void ushl(Environment theEnv) {
JSValue vR = theEnv.theStack.pop();
theEnv.theStack.push(new JSInteger(i >>> vR.toJSInteger().i));
theEnv.theStack.push(new JSInteger(i >>> vR.toJSInteger(theEnv).i));
}
int i;