Created
March 31, 2009 19:24
-
-
Save macournoyer/88355 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./tinyrb -d -e "1 + 2" | |
; block definition: 0x219f80 (level 0) | |
; 2 registers ; 0 nested blocks | |
; 0 args | |
.value 1 ; 0 | |
.value 2 ; 1 | |
[000] add 0 256 257 | |
[001] return 0 0 0 | |
; block end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./tinyrb -d -e "a = 1; a = a + 1" | |
; block definition: 0x218f80 (level 0) | |
; 3 registers ; 0 nested blocks | |
; 0 args | |
.local a ; 0 | |
.value 1 ; 0 | |
[000] loadk 0 0 0 ; R[0] = 1 | |
[001] add 0 0 256 | |
[002] return 0 0 0 | |
; block end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = 1 | |
while x < 50000000 | |
x = x + 1 | |
end | |
; block definition: 0x218f80 (level 0) | |
; 3 registers ; 0 nested blocks | |
; 0 args | |
.local x ; 0 | |
.value 1 ; 0 | |
.value 50000000 ; 1 | |
[000] loadk 0 0 0 ; R[0] = 1 | |
[001] lt 1 0 257 | |
[002] jmpunless 1 256 1 | |
[003] add 0 0 256 | |
[004] jmp 0 255 507 ; -4 | |
[005] return 0 0 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment