This commit is contained in:
QkoSad
2025-07-16 13:00:37 +03:00
commit 7894b48931
806 changed files with 162532 additions and 0 deletions
+348
View File
@@ -0,0 +1,348 @@
function String.new 0
push constant 3
call Memory.alloc 1
pop pointer 0
push argument 0
push constant 0
gt
not
if-goto L0
push argument 0
call Array.new 1
pop this 0
goto L1
label L0
label L1
push argument 0
pop this 2
push constant 0
pop this 1
push pointer 0
return
function String.dispose 0
push argument 0
pop pointer 0
push this 1
push constant 0
gt
not
if-goto L2
push this 0
call Array.dispose 1
pop temp 0
goto L3
label L2
label L3
push pointer 0
call Memory.deAlloc 1
pop temp 0
push constant 0
return
function String.length 0
push argument 0
pop pointer 0
push this 1
return
function String.charAt 0
push argument 0
pop pointer 0
push argument 1
push this 1
gt
not
if-goto L4
push constant 7
call Sys.error 1
pop temp 0
goto L5
label L4
label L5
push this 0
push argument 1
add
pop pointer 1
push that 0
return
function String.setCharAt 0
push argument 0
pop pointer 0
push argument 1
push this 1
gt
not
if-goto L6
push constant 7
call Sys.error 1
pop temp 0
goto L7
label L6
label L7
push this 0
push argument 1
push argument 2
pop temp 1
add
pop pointer 1
push temp 1
pop that 0
push constant 0
return
function String.appendChar 0
push argument 0
pop pointer 0
push this 2
push this 1
eq
not
if-goto L8
push constant 7
call Sys.error 1
pop temp 0
goto L9
label L8
label L9
push this 0
push this 1
push argument 1
pop temp 1
add
pop pointer 1
push temp 1
pop that 0
push this 1
push constant 1
add
pop this 1
push pointer 0
return
function String.eraseLastChar 0
push argument 0
pop pointer 0
push this 1
push constant 0
eq
not
if-goto L10
push constant 7
call Sys.error 1
pop temp 0
goto L11
label L10
label L11
push this 0
push this 1
push constant 0
pop temp 1
add
pop pointer 1
push temp 1
pop that 0
push this 1
push constant 1
sub
pop this 1
push constant 0
return
function String.intValue 4
push argument 0
pop pointer 0
label L12
push local 2
push this 1
lt
not
if-goto L13
push this 0
push local 2
add
pop pointer 1
push that 0
pop local 0
push local 0
push constant 47
gt
push local 0
push constant 58
lt
and
not
if-goto L14
push local 1
push constant 10
call Math.multiply 2
push local 0
push constant 48
sub
add
pop local 1
goto L15
label L14
push local 2
push constant 0
eq
push local 0
push constant 45
eq
and
not
if-goto L16
push constant 1
neg
pop local 3
goto L17
label L16
push this 1
pop local 2
label L17
label L15
push local 2
push constant 1
add
pop local 2
goto L12
label L13
push local 3
not
if-goto L18
push local 1
neg
return
goto L19
label L18
label L19
push local 1
return
function String.setInt 4
push argument 0
pop pointer 0
push constant 6
call Array.new 1
pop local 0
push argument 1
push constant 0
lt
not
if-goto L20
push constant 0
not
pop local 1
push argument 1
neg
pop argument 1
goto L21
label L20
label L21
push argument 1
pop local 2
label L22
push local 2
push constant 0
gt
not
if-goto L23
push argument 1
push constant 10
call Math.divide 2
pop local 2
push local 0
push local 3
push constant 48
push argument 1
add
push local 2
push constant 10
call Math.multiply 2
sub
pop temp 1
add
pop pointer 1
push temp 1
pop that 0
push local 3
push constant 1
add
pop local 3
push local 2
pop argument 1
goto L22
label L23
push local 1
not
if-goto L24
push local 0
push local 3
push constant 45
pop temp 1
add
pop pointer 1
push temp 1
pop that 0
push local 3
push constant 1
add
pop local 3
goto L25
label L24
label L25
push local 3
push constant 0
eq
not
if-goto L26
push this 0
push constant 0
push constant 48
pop temp 1
add
pop pointer 1
push temp 1
pop that 0
push constant 1
pop this 1
goto L27
label L26
push constant 0
pop this 1
label L28
push this 1
push local 3
lt
not
if-goto L29
push this 0
push this 1
push local 0
push local 3
push constant 1
sub
push this 1
sub
add
pop pointer 1
push that 0
pop temp 1
add
pop pointer 1
push temp 1
pop that 0
push this 1
push constant 1
add
pop this 1
goto L28
label L29
label L27
push local 0
call Array.dispose 1
pop temp 0
push constant 0
return
function String.newLine 0
push constant 128
return
function String.backSpace 0
push constant 129
return
function String.doubleQuote 0
push constant 34
return