diff --git a/.gitignore b/.gitignore index df4d4ed..fb44b31 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ test*.isbpl *.class *.jar *.bf.isbpl +rust-interpreter diff --git a/ISBPL.java b/ISBPL.java index 9faf109..cdc56bd 100644 --- a/ISBPL.java +++ b/ISBPL.java @@ -1084,6 +1084,10 @@ public class ISBPL { case "jio.context": func = (stack) -> stack.push(toISBPL(this)); break; + case "jio.mirror": + // Do nothing, we are in the java interpreter already! + func = (stack) -> {}; + break; case "null": func = (stack) -> stack.push(new ISBPLObject(getType("null"), 0)); break; diff --git a/docs/base/std.md b/docs/base/std.md index b14ffeb..125aaf4 100644 --- a/docs/base/std.md +++ b/docs/base/std.md @@ -621,6 +621,11 @@ - +#### `mirrorInterpreterData ::: -> ` + + - + + #### `context ::: -> ` - diff --git a/docs/std.md b/docs/std.md index f01a113..577f4fe 100644 --- a/docs/std.md +++ b/docs/std.md @@ -656,6 +656,11 @@ over type definitions, to string processing. Returns the ISBPL representation of a java class (statics and constructors are usable here) +#### `mirrorInterpreterData ::: -> ` + + If using a native interpreter, mirror the data of it to the Java one for JIO access. + + ## >String Any string in ISBPL diff --git a/gen-doc.sh b/gen-doc.sh new file mode 100755 index 0000000..b259417 --- /dev/null +++ b/gen-doc.sh @@ -0,0 +1,3 @@ +isbpldoc $1.isbpl > $1.md.tmp +git merge-file docs/$1.md docs/base/$1.md $1.md.tmp || echo Manual merge needed! +mv $1.md.tmp docs/base/$1.md diff --git a/std.isbpl b/std.isbpl index 30d712f..265ed79 100644 --- a/std.isbpl +++ b/std.isbpl @@ -173,7 +173,7 @@ def TYPE_JIO construct jio { jio.getclass } context { - pop + mirrorInterpreterData native jio.context jio.context } @@ -181,6 +181,11 @@ def TYPE_JIO construct jio { pop "java.lang.Thread" JIO class currentThread0 getId0 JIO context debuggerIPC stack get1 } + mirrorInterpreterData { + pop + native jio.mirror + jio.mirror + } } =TYPE_JIO def JIO 0 TYPE_JIO settype =JIO