more bug fixes
This commit is contained in:
parent
81eff27575
commit
bec43212c1
|
@ -132,6 +132,13 @@ public class ISBPL {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if(stack.size() > stackHeight) {
|
||||||
|
stack.setSize(stackHeight);
|
||||||
|
stack.trimToSize();
|
||||||
|
}
|
||||||
|
while(stack.size() < stackHeight) {
|
||||||
|
stack.push(getNullObject());
|
||||||
|
}
|
||||||
if (Arrays.asList(allowed).contains("Java") || allowed.length == 1 && allowed[0].equals("all")) {
|
if (Arrays.asList(allowed).contains("Java") || allowed.length == 1 && allowed[0].equals("all")) {
|
||||||
stack.push(toISBPL(e));
|
stack.push(toISBPL(e));
|
||||||
stack.push(toISBPLString(e.getClass().getName()));
|
stack.push(toISBPLString(e.getClass().getName()));
|
||||||
|
|
19
std.isbpl
19
std.isbpl
|
@ -38,6 +38,7 @@ native subprocess
|
||||||
"index has to be <16, index 0 is this call" #
|
"index has to be <16, index 0 is this call" #
|
||||||
native _last_word
|
native _last_word
|
||||||
native include
|
native include
|
||||||
|
native reload
|
||||||
native putchar
|
native putchar
|
||||||
native mktype
|
native mktype
|
||||||
native mkinstance
|
native mkinstance
|
||||||
|
@ -310,15 +311,22 @@ func strjoin {
|
||||||
s
|
s
|
||||||
}
|
}
|
||||||
|
|
||||||
func strsub {
|
func strsub {
|
||||||
|
def pos2 _int =pos2
|
||||||
|
def pos1 _int =pos1
|
||||||
|
_array
|
||||||
|
pos1 pos2 asub _string
|
||||||
|
}
|
||||||
|
|
||||||
|
func asub {
|
||||||
"bind args" #
|
"bind args" #
|
||||||
def pos2 _int =pos2
|
def pos2 _int =pos2
|
||||||
def pos1 _int =pos1
|
def pos1 _int =pos1
|
||||||
def string _string =string
|
def arr =arr
|
||||||
|
|
||||||
pos2 pos1 - =length
|
def length pos2 pos1 - =length
|
||||||
|
|
||||||
( o _char length anew dup ) string swap pos1 0 length acopy
|
arr length anew pos1 0 length acopy
|
||||||
}
|
}
|
||||||
|
|
||||||
func puts {
|
func puts {
|
||||||
|
@ -444,7 +452,8 @@ func [ {
|
||||||
TYPE_ARRAY TYPE_SHADOW settype
|
TYPE_ARRAY TYPE_SHADOW settype
|
||||||
}
|
}
|
||||||
|
|
||||||
"For some reason, this makes objects lose their identity, because of the DUP statement. I do not know, why." #
|
"For some reason, this makes objects lose their identity. I do not know, why." #
|
||||||
|
"Fixed in commit 81eff27, bug was in dup native." #
|
||||||
func ] {
|
func ] {
|
||||||
"create an array containing everything on stack until the arrayshadow" #
|
"create an array containing everything on stack until the arrayshadow" #
|
||||||
def array 0 anew =array
|
def array 0 anew =array
|
||||||
|
|
Loading…
Reference in a new issue