Fixed error with the way the string pool worked

This commit is contained in:
Mitchell Plamann
2015-04-12 00:33:57 -04:00
parent f13a302b54
commit f2541c0266
45 changed files with 1072 additions and 0 deletions

48
test/moreArrays.c0.bc0 Normal file
View File

@@ -0,0 +1,48 @@
C0 C0 FF EE # magic number
00 09 # version 4, arch = 1 (64 bits)
00 00 # int pool count
# int pool
00 00 # string pool total size
# string pool
00 01 # function count
# function_pool
#<main>
00 00 # number of arguments = 0
00 01 # number of local variables = 1
00 2D # code length = 45 bytes
10 32 # bipush 50 # 50
BC 04 # newarray 4 # alloc_array(int, 50)
36 00 # vstore 0 # A = alloc_array(int, 50);
15 00 # vload 0 # A
10 03 # bipush 3 # 3
63 # aadds # &A[3]
10 17 # bipush 23 # 23
4E # imstore # A[3] = 23;
15 00 # vload 0 # A
10 02 # bipush 2 # 2
63 # aadds # &A[2]
10 0C # bipush 12 # 12
4E # imstore # A[2] = 12;
15 00 # vload 0 # A
10 03 # bipush 3 # 3
63 # aadds # &A[3]
2E # imload # A[3]
B7 00 00 # invokenative 0 # printint(A[3])
57 # pop # (ignore result)
15 00 # vload 0 # A
10 02 # bipush 2 # 2
63 # aadds # &A[2]
2E # imload # A[2]
B7 00 00 # invokenative 0 # printint(A[2])
57 # pop # (ignore result)
10 00 # bipush 0 # 0
B0 # return #
00 01 # native count
# native pool
00 01 00 13 # printint