projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more trap cleanup, properly handle JS.Clones
[org.ibex.core.git]
/
src
/
org
/
ibex
/
js
/
Test.java
diff --git
a/src/org/ibex/js/Test.java
b/src/org/ibex/js/Test.java
index
8e4be33
..
478ef8e
100644
(file)
--- a/
src/org/ibex/js/Test.java
+++ b/
src/org/ibex/js/Test.java
@@
-31,6
+31,7
@@
public class Test extends JS {
public JS get(JS key) throws JSExn {
if(!JS.isString(key)) return null;
if("print".equals(JS.toString(key))) return METHOD;
public JS get(JS key) throws JSExn {
if(!JS.isString(key)) return null;
if("print".equals(JS.toString(key))) return METHOD;
+ if("clone".equals(JS.toString(key))) return METHOD;
if("bgget".equals(JS.toString(key))) {
action = "bgget";
try {
if("bgget".equals(JS.toString(key))) {
action = "bgget";
try {
@@
-51,8
+52,12
@@
public class Test extends JS {
} catch(NotPauseableException e) {
throw new Error("should never happen");
}
} catch(NotPauseableException e) {
throw new Error("should never happen");
}
- return;
- }
+ return;
+ }
+ if("exit".equals(JS.toString(key))) {
+ System.exit(JS.toInt(val));
+ return;
+ }
super.put(key,val);
}
super.put(key,val);
}
@@
-62,6
+67,7
@@
public class Test extends JS {
System.out.println(JS.debugToString(a0));
return null;
}
System.out.println(JS.debugToString(a0));
return null;
}
+ if("clone".equals(JS.toString(method))) return a0 == null ? null : a0.jsclone();
return null;
}
}
return null;
}
}