Advertisement
snake5

new lang some progress

Jan 12th, 2015
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.64 KB | None | 0 0
  1. tntc -c sample.tnt
  2.  
  3. [static] [var] id(globall) : id(int32) = uint(1) ; [class] id(data1) { [class] id(ooo) {
  4. [var] id(c) : id(uint8) ; } [var] id(name) : id(string) ; [var] id(value) : id(int32) ;
  5. [func] id(both) ( ) { [return] id(name) $ id(value) ; } [func] id(__getindex) ( id(index)
  6. : id(int32) ) : id(T) { [if] ( id(index) < uint(0) || id(index) >= id(m_size) ) { id(W
  7. ARNING) ( str(array index out of bounds) ) ; [return] id(T) ( ) ; } [return] id(m_data) [ id
  8. (index) ] ; } } [func] id(_test) ( id(a) : id(int32) ) : id(int32) { [var] id(v) : i
  9. d(int8) = - uint(5) ; [return] int8(0) + id(a) + id(v) ; }
  10.  
  11. Inside "parse_decllist"
  12. Inside "parse_vardecls"
  13. Inside "parse_arglist"
  14. Inside "parse_arg"
  15. Inside "parse_exp"
  16. Inside "parse_vardecls"
  17. Inside "level_exp"
  18. Out of "level_exp" at line 1459
  19. Out of "parse_exp" at line 1729
  20. Inside "parse_exp"
  21. Inside "parse_vardecls"
  22. Inside "level_exp"
  23. Out of "level_exp" at line 1459
  24. Out of "parse_exp" at line 1729
  25. Out of "parse_arg" at line 1020
  26. Out of "parse_arglist" at line 1081
  27. Out of "parse_vardecls" at line 1518
  28. Inside "parse_class"
  29. Inside "parse_class"
  30. Inside "parse_vardecls"
  31. Inside "parse_arglist"
  32. Inside "parse_arg"
  33. Inside "parse_exp"
  34. Inside "parse_vardecls"
  35. Inside "level_exp"
  36. Out of "level_exp" at line 1459
  37. Out of "parse_exp" at line 1729
  38. Out of "parse_arg" at line 1020
  39. Out of "parse_arglist" at line 1081
  40. Out of "parse_vardecls" at line 1518
  41. Inside "parse_vardecls"
  42. Inside "parse_arglist"
  43. Inside "parse_arg"
  44. Inside "parse_exp"
  45. Inside "parse_vardecls"
  46. Inside "level_exp"
  47. Out of "level_exp" at line 1459
  48. Out of "parse_exp" at line 1729
  49. Out of "parse_arg" at line 1020
  50. Out of "parse_arglist" at line 1081
  51. Out of "parse_vardecls" at line 1518
  52. Inside "parse_vardecls"
  53. Inside "parse_arglist"
  54. Inside "parse_arg"
  55. Inside "parse_exp"
  56. Inside "parse_vardecls"
  57. Inside "level_exp"
  58. Out of "level_exp" at line 1459
  59. Out of "parse_exp" at line 1729
  60. Out of "parse_arg" at line 1020
  61. Out of "parse_arglist" at line 1081
  62. Out of "parse_vardecls" at line 1518
  63. Inside "parse_function"
  64. Inside "parse_arglist"
  65. Out of "parse_arglist" at line 1081
  66. Inside "parse_stmt"
  67. Inside "parse_stmtlist"
  68. Inside "parse_stmt"
  69. Inside "parse_explist"
  70. Inside "parse_exp"
  71. Inside "parse_vardecls"
  72. Inside "level_exp"
  73. Entering a function from "level_exp" at line 1334
  74. Inside "level_exp"
  75. Out of "level_exp" at line 1459
  76. Entering a function from "level_exp" at line 1360
  77. Inside "level_exp"
  78. Out of "level_exp" at line 1459
  79. Out of "level_exp" at line 1377
  80. Out of "level_exp" at line 1410
  81. Out of "parse_exp" at line 1729
  82. Out of "parse_explist" at line 1795
  83. Out of "parse_stmt" at line 2515
  84. Out of "parse_stmtlist" at line 2628
  85. Out of "parse_stmt" at line 2563
  86. Out of "parse_function" at line 2228
  87. Inside "parse_function"
  88. Inside "parse_arglist"
  89. Inside "parse_arg"
  90. Inside "parse_exp"
  91. Inside "parse_vardecls"
  92. Inside "level_exp"
  93. Out of "level_exp" at line 1459
  94. Out of "parse_exp" at line 1729
  95. Out of "parse_arg" at line 1020
  96. Out of "parse_arglist" at line 1081
  97. Inside "parse_exp"
  98. Inside "parse_vardecls"
  99. Inside "level_exp"
  100. Out of "level_exp" at line 1459
  101. Out of "parse_exp" at line 1729
  102. Inside "parse_stmt"
  103. Inside "parse_stmtlist"
  104. Inside "parse_stmt"
  105. Inside "parse_if"
  106. Inside "parse_exp"
  107. Inside "parse_vardecls"
  108. Inside "level_exp"
  109. Entering a function from "level_exp" at line 1334
  110. Inside "level_exp"
  111. Entering a function from "level_exp" at line 1334
  112. Inside "level_exp"
  113. Out of "level_exp" at line 1459
  114. Entering a function from "level_exp" at line 1360
  115. Inside "level_exp"
  116. Out of "level_exp" at line 1459
  117. Out of "level_exp" at line 1377
  118. Out of "level_exp" at line 1410
  119. Entering a function from "level_exp" at line 1360
  120. Inside "level_exp"
  121. Entering a function from "level_exp" at line 1334
  122. Inside "level_exp"
  123. Out of "level_exp" at line 1459
  124. Entering a function from "level_exp" at line 1360
  125. Inside "level_exp"
  126. Out of "level_exp" at line 1459
  127. Out of "level_exp" at line 1377
  128. Out of "level_exp" at line 1410
  129. Out of "level_exp" at line 1377
  130. Out of "level_exp" at line 1410
  131. Out of "parse_exp" at line 1729
  132. Inside "parse_stmt"
  133. Inside "parse_stmtlist"
  134. Inside "parse_stmt"
  135. Inside "parse_explist"
  136. Inside "parse_exp"
  137. Inside "parse_vardecls"
  138. Entering a function from "parse_exp" at line 1612
  139. Inside "parse_exp"
  140. Inside "parse_vardecls"
  141. Inside "level_exp"
  142. Out of "level_exp" at line 1459
  143. Out of "parse_exp" at line 1729
  144. Inside "level_exp"
  145. Entering a function from "level_exp" at line 1238
  146. Inside "level_exp"
  147. Out of "level_exp" at line 1459
  148. Entering a function from "level_exp" at line 1264
  149. Inside "level_exp"
  150. Out of "level_exp" at line 1459
  151. Out of "level_exp" at line 1303
  152. Out of "parse_exp" at line 1729
  153. Out of "parse_explist" at line 1795
  154. Out of "parse_stmt" at line 2574
  155. Inside "parse_stmt"
  156. Inside "parse_explist"
  157. Inside "parse_exp"
  158. Inside "parse_vardecls"
  159. Inside "level_exp"
  160. Entering a function from "level_exp" at line 1238
  161. Inside "level_exp"
  162. Out of "level_exp" at line 1459
  163. Entering a function from "level_exp" at line 1264
  164. Inside "level_exp"
  165. Out of "level_exp" at line 1459
  166. Out of "level_exp" at line 1303
  167. Out of "parse_exp" at line 1729
  168. Out of "parse_explist" at line 1795
  169. Out of "parse_stmt" at line 2515
  170. Out of "parse_stmtlist" at line 2628
  171. Out of "parse_stmt" at line 2563
  172. Out of "parse_if" at line 1840
  173. Out of "parse_stmt" at line 2414
  174. Inside "parse_stmt"
  175. Inside "parse_explist"
  176. Inside "parse_exp"
  177. Inside "parse_vardecls"
  178. Entering a function from "parse_exp" at line 1612
  179. Inside "parse_exp"
  180. Inside "parse_vardecls"
  181. Inside "level_exp"
  182. Out of "level_exp" at line 1459
  183. Out of "parse_exp" at line 1729
  184. Inside "level_exp"
  185. Entering a function from "level_exp" at line 1238
  186. Inside "level_exp"
  187. Out of "level_exp" at line 1459
  188. Entering a function from "level_exp" at line 1264
  189. Inside "level_exp"
  190. Out of "level_exp" at line 1459
  191. Out of "level_exp" at line 1294
  192. Out of "parse_exp" at line 1729
  193. Out of "parse_explist" at line 1795
  194. Out of "parse_stmt" at line 2515
  195. Out of "parse_stmtlist" at line 2628
  196. Out of "parse_stmt" at line 2563
  197. Out of "parse_function" at line 2228
  198. Inside "parse_function"
  199. Inside "parse_arglist"
  200. Inside "parse_arg"
  201. Inside "parse_exp"
  202. Inside "parse_vardecls"
  203. Inside "level_exp"
  204. Out of "level_exp" at line 1459
  205. Out of "parse_exp" at line 1729
  206. Out of "parse_arg" at line 1020
  207. Out of "parse_arglist" at line 1081
  208. Inside "parse_exp"
  209. Inside "parse_vardecls"
  210. Inside "level_exp"
  211. Out of "level_exp" at line 1459
  212. Out of "parse_exp" at line 1729
  213. Inside "parse_stmt"
  214. Inside "parse_stmtlist"
  215. Inside "parse_stmt"
  216. Inside "parse_vardecls"
  217. Inside "parse_arglist"
  218. Inside "parse_arg"
  219. Inside "parse_exp"
  220. Inside "parse_vardecls"
  221. Inside "level_exp"
  222. Out of "level_exp" at line 1459
  223. Out of "parse_exp" at line 1729
  224. Inside "parse_exp"
  225. Inside "parse_vardecls"
  226. Inside "level_exp"
  227. Entering a function from "level_exp" at line 1442
  228. Inside "level_exp"
  229. Out of "level_exp" at line 1459
  230. Out of "level_exp" at line 1449
  231. Out of "parse_exp" at line 1729
  232. Out of "parse_arg" at line 1020
  233. Out of "parse_arglist" at line 1081
  234. Out of "parse_vardecls" at line 1518
  235. Out of "parse_stmt" at line 2533
  236. Inside "parse_stmt"
  237. Inside "parse_explist"
  238. Inside "parse_exp"
  239. Inside "parse_vardecls"
  240. Inside "level_exp"
  241. Entering a function from "level_exp" at line 1334
  242. Inside "level_exp"
  243. Entering a function from "level_exp" at line 1334
  244. Inside "level_exp"
  245. Out of "level_exp" at line 1459
  246. Entering a function from "level_exp" at line 1360
  247. Inside "level_exp"
  248. Out of "level_exp" at line 1459
  249. Out of "level_exp" at line 1377
  250. Out of "level_exp" at line 1410
  251. Entering a function from "level_exp" at line 1360
  252. Inside "level_exp"
  253. Out of "level_exp" at line 1459
  254. Out of "level_exp" at line 1377
  255. Out of "level_exp" at line 1410
  256. Out of "parse_exp" at line 1729
  257. Out of "parse_explist" at line 1795
  258. Out of "parse_stmt" at line 2515
  259. Out of "parse_stmtlist" at line 2628
  260. Out of "parse_stmt" at line 2563
  261. Out of "parse_function" at line 2228
  262. Out of "parse_decllist" at line 2706
  263. BLOCK (struct=4 op=21 opsub=0 tt=75)
  264. {
  265. locals:
  266. VAR (struct=2 op=54 opsub=0 tt=78)
  267. {
  268. name = 'globall'
  269. orig_datatype = 'int32'
  270. datatype = ''
  271. orig_typeinfo:
  272. IDENT (struct=12 op=1 opsub=0 tt=78)
  273. name = 'int32'
  274. typeinfo: <null>
  275. value:
  276. uint(1) (struct=13 op=3 opsub=0 tt=86)
  277. }
  278. code:
  279. {
  280. CLASS (struct=5 op=52 opsub=0 tt=75)
  281. {
  282. name = 'data1'
  283. items:
  284. {
  285. CLASS (struct=5 op=52 opsub=0 tt=75)
  286. {
  287. name = 'ooo'
  288. items:
  289. MEMBER (struct=2 op=55 opsub=0 tt=78)
  290. {
  291. name = 'c'
  292. orig_datatype = 'uint8'
  293. datatype = ''
  294. orig_typeinfo:
  295. IDENT (struct=12 op=1 opsub=0 tt=78)
  296. name = 'uint8'
  297. typeinfo: <null>
  298. value: <null>
  299. }
  300. }
  301. MEMBER (struct=2 op=55 opsub=0 tt=78)
  302. {
  303. name = 'name'
  304. orig_datatype = 'string'
  305. datatype = ''
  306. orig_typeinfo:
  307. IDENT (struct=12 op=1 opsub=0 tt=78)
  308. name = 'string'
  309. typeinfo: <null>
  310. value: <null>
  311. }
  312. MEMBER (struct=2 op=55 opsub=0 tt=78)
  313. {
  314. name = 'value'
  315. orig_datatype = 'int32'
  316. datatype = ''
  317. orig_typeinfo:
  318. IDENT (struct=12 op=1 opsub=0 tt=78)
  319. name = 'int32'
  320. typeinfo: <null>
  321. value: <null>
  322. }
  323. FUNC (struct=6 op=30 opsub=0 tt=75)
  324. {
  325. name = 'both'
  326. orig_datatype = ''
  327. datatype = ''
  328. orig_typeinfo: <null>
  329. typeinfo: <null>
  330. params: <null>
  331. code:
  332. BLOCK (struct=4 op=21 opsub=0 tt=75)
  333. {
  334. locals: <null>
  335. code:
  336. RETURN (struct=7 op=18 opsub=0 tt=78)
  337. {
  338. arg:
  339. $ (struct=7 op=4 opsub=0 tt=239)
  340. {
  341. arg:
  342. {
  343. IDENT (struct=12 op=1 opsub=0 tt=78)
  344. name = 'name'
  345. IDENT (struct=12 op=1 opsub=0 tt=78)
  346. name = 'value'
  347. }
  348. }
  349. }
  350. }
  351. bytecode:
  352. }
  353. FUNC (struct=6 op=30 opsub=0 tt=75)
  354. {
  355. name = '__getindex'
  356. orig_datatype = 'T'
  357. datatype = ''
  358. orig_typeinfo:
  359. IDENT (struct=12 op=1 opsub=0 tt=78)
  360. name = 'T'
  361. typeinfo: <null>
  362. params:
  363. ARG (struct=2 op=10 opsub=0 tt=78)
  364. {
  365. name = 'index'
  366. orig_datatype = 'int32'
  367. datatype = ''
  368. orig_typeinfo:
  369. IDENT (struct=12 op=1 opsub=0 tt=78)
  370. name = 'int32'
  371. typeinfo: <null>
  372. value: <null>
  373. }
  374. code:
  375. BLOCK (struct=4 op=21 opsub=0 tt=75)
  376. {
  377. locals: <null>
  378. code:
  379. {
  380. IF/ELSE (struct=9 op=22 opsub=0 tt=75)
  381. {
  382. test:
  383. || (struct=7 op=4 opsub=0 tt=226)
  384. {
  385. arg:
  386. {
  387. < (struct=7 op=4 opsub=0 tt=206)
  388. {
  389. arg:
  390. {
  391. IDENT (struct=12 op=1 opsub=0 tt=78)
  392. name = 'index'
  393. uint(0) (struct=13 op=3 opsub=0 tt=86)
  394. }
  395. }
  396. >= (struct=7 op=4 opsub=0 tt=205)
  397. {
  398. arg:
  399. {
  400. IDENT (struct=12 op=1 opsub=0 tt=78)
  401. name = 'index'
  402. IDENT (struct=12 op=1 opsub=0 tt=78)
  403. name = 'm_size'
  404. }
  405. }
  406. }
  407. }
  408. ontrue:
  409. BLOCK (struct=4 op=21 opsub=0 tt=78)
  410. {
  411. locals: <null>
  412. code:
  413. {
  414. FCALL (struct=7 op=6 opsub=0 tt=40)
  415. {
  416. arg:
  417. {
  418. IDENT (struct=12 op=1 opsub=0 tt=78)
  419. name = 'WARNING'
  420. EXPR_LIST (struct=7 op=15 opsub=0 tt=40)
  421. {
  422. arg:
  423. str(array index out of bounds) (struct=13 op=3 opsub=0 tt=83)
  424. }
  425. }
  426. }
  427. RETURN (struct=7 op=18 opsub=0 tt=78)
  428. {
  429. arg:
  430. FCALL (struct=7 op=6 opsub=0 tt=40)
  431. {
  432. arg:
  433. {
  434. IDENT (struct=12 op=1 opsub=0 tt=78)
  435. name = 'T'
  436. EXPR_LIST (struct=7 op=15 opsub=0 tt=40)
  437. {
  438. arg: <null>
  439. }
  440. }
  441. }
  442. }
  443. }
  444. }
  445. onfalse: <null>
  446. }
  447. RETURN (struct=7 op=18 opsub=0 tt=78)
  448. {
  449. arg:
  450. INDEX (struct=7 op=7 opsub=0 tt=91)
  451. {
  452. arg:
  453. {
  454. IDENT (struct=12 op=1 opsub=0 tt=78)
  455. name = 'm_data'
  456. IDENT (struct=12 op=1 opsub=0 tt=78)
  457. name = 'index'
  458. }
  459. }
  460. }
  461. }
  462. }
  463. bytecode:
  464. }
  465. }
  466. }
  467. FUNC (struct=6 op=30 opsub=0 tt=75)
  468. {
  469. name = '_test'
  470. orig_datatype = 'int32'
  471. datatype = ''
  472. orig_typeinfo:
  473. IDENT (struct=12 op=1 opsub=0 tt=78)
  474. name = 'int32'
  475. typeinfo: <null>
  476. params:
  477. ARG (struct=2 op=10 opsub=0 tt=78)
  478. {
  479. name = 'a'
  480. orig_datatype = 'int32'
  481. datatype = ''
  482. orig_typeinfo:
  483. IDENT (struct=12 op=1 opsub=0 tt=78)
  484. name = 'int32'
  485. typeinfo: <null>
  486. value: <null>
  487. }
  488. code:
  489. BLOCK (struct=4 op=21 opsub=0 tt=75)
  490. {
  491. locals:
  492. VAR (struct=2 op=54 opsub=0 tt=78)
  493. {
  494. name = 'v'
  495. orig_datatype = 'int8'
  496. datatype = ''
  497. orig_typeinfo:
  498. IDENT (struct=12 op=1 opsub=0 tt=78)
  499. name = 'int8'
  500. typeinfo: <null>
  501. value:
  502. - (struct=7 op=4 opsub=0 tt=229)
  503. {
  504. arg:
  505. uint(5) (struct=13 op=3 opsub=0 tt=86)
  506. }
  507. }
  508. code:
  509. RETURN (struct=7 op=18 opsub=0 tt=86)
  510. {
  511. arg:
  512. + (struct=7 op=4 opsub=0 tt=228)
  513. {
  514. arg:
  515. {
  516. + (struct=7 op=4 opsub=0 tt=228)
  517. {
  518. arg:
  519. {
  520. int8(0) (struct=13 op=3 opsub=0 tt=86)
  521. IDENT (struct=12 op=1 opsub=0 tt=78)
  522. name = 'a'
  523. }
  524. }
  525. IDENT (struct=12 op=1 opsub=0 tt=78)
  526. name = 'v'
  527. }
  528. }
  529. }
  530. }
  531. bytecode:
  532. }
  533. }
  534. }
  535. PASSED STMT op=21 struct=4
  536. PASSED STMT op=18 struct=7
  537. PASSED EXPR 00000000007977D0 op=4 struct=7 tok=239
  538. PASSED EXPR 00000000007977A0 op=1 struct=12 tok=78
  539. PASSED EXPR 0000000000797800 op=1 struct=12 tok=78
  540. PASSED STMT op=21 struct=4
  541. PASSED STMT op=22 struct=9
  542. PASSED EXPR 0000000000797CD0 op=4 struct=7 tok=226
  543. PASSED EXPR 0000000000797AC0 op=4 struct=7 tok=206
  544. PASSED EXPR 0000000000797B50 op=1 struct=12 tok=78
  545. PASSED EXPR 0000000000797A00 op=3 struct=13 tok=86
  546. PASSED EXPR 0000000000797A60 op=4 struct=7 tok=205
  547. PASSED EXPR 0000000000797C40 op=1 struct=12 tok=78
  548. PASSED EXPR 00000000007979D0 op=1 struct=12 tok=78
  549. PASSED STMT op=21 struct=4
  550. PASSED STMT op=6 struct=7
  551. PASSED STMT op=18 struct=7
  552. PASSED EXPR 0000000000797B80 op=6 struct=7 tok=40
  553. PASSED STMT op=18 struct=7
  554. PASSED EXPR 0000000000798980 op=7 struct=7 tok=91
  555. PASSED STMT op=21 struct=4
  556. PASSED EXPR 0000000000798890 op=4 struct=7 tok=229
  557. PASSED EXPR 0000000000798530 op=3 struct=13 tok=86
  558. PASSED STMT op=18 struct=7
  559. PASSED EXPR 00000000007986B0 op=4 struct=7 tok=228
  560. PASSED EXPR 0000000000798410 op=4 struct=7 tok=228
  561. PASSED EXPR 0000000000798380 op=3 struct=13 tok=86
  562. PASSED EXPR 00000000007983E0 op=1 struct=12 tok=78
  563. PASSED EXPR 0000000000798470 op=1 struct=12 tok=78
  564. BLOCK (struct=4 op=21 opsub=0 tt=75)
  565. {
  566. locals: <null>
  567. code: <null>
  568. }
  569. VAR (struct=2 op=54 opsub=0 tt=78)
  570. {
  571. name = 'globall'
  572. orig_datatype = 'int32'
  573. datatype = ''
  574. orig_typeinfo:
  575. IDENT (struct=12 op=1 opsub=0 tt=78)
  576. name = 'int32'
  577. typeinfo: <null>
  578. value:
  579. uint(1) (struct=13 op=3 opsub=0 tt=86)
  580. }
  581. CLASS (struct=5 op=52 opsub=0 tt=75)
  582. {
  583. name = 'data1.ooo'
  584. items:
  585. MEMBER (struct=2 op=55 opsub=0 tt=78)
  586. {
  587. name = 'c'
  588. orig_datatype = 'uint8'
  589. datatype = ''
  590. orig_typeinfo:
  591. IDENT (struct=12 op=1 opsub=0 tt=78)
  592. name = 'uint8'
  593. typeinfo: <null>
  594. value: <null>
  595. }
  596. }
  597. FUNC (struct=6 op=30 opsub=0 tt=75)
  598. {
  599. name = 'data1.both'
  600. orig_datatype = ''
  601. datatype = ''
  602. orig_typeinfo: <null>
  603. typeinfo: <null>
  604. params: <null>
  605. code:
  606. BLOCK (struct=4 op=21 opsub=0 tt=75)
  607. {
  608. locals: <null>
  609. code:
  610. RETURN (struct=7 op=18 opsub=0 tt=78)
  611. {
  612. arg:
  613. $ (struct=7 op=4 opsub=0 tt=239)
  614. {
  615. arg:
  616. {
  617. IDENT (struct=12 op=1 opsub=0 tt=78)
  618. name = 'name'
  619. IDENT (struct=12 op=1 opsub=0 tt=78)
  620. name = 'value'
  621. }
  622. }
  623. }
  624. }
  625. bytecode:
  626. FCALL 0 [24] <= args(2): name [6], value [8]
  627. RETURN 0 [24]
  628. }
  629. FUNC (struct=6 op=30 opsub=0 tt=75)
  630. {
  631. name = 'data1.__getindex'
  632. orig_datatype = 'T'
  633. datatype = ''
  634. orig_typeinfo:
  635. IDENT (struct=12 op=1 opsub=0 tt=78)
  636. name = 'T'
  637. typeinfo: <null>
  638. params:
  639. ARG (struct=2 op=10 opsub=0 tt=78)
  640. {
  641. name = 'index'
  642. orig_datatype = 'int32'
  643. datatype = ''
  644. orig_typeinfo:
  645. IDENT (struct=12 op=1 opsub=0 tt=78)
  646. name = 'int32'
  647. typeinfo: <null>
  648. value: <null>
  649. }
  650. code:
  651. BLOCK (struct=4 op=21 opsub=0 tt=75)
  652. {
  653. locals: <null>
  654. code:
  655. {
  656. IF/ELSE (struct=9 op=22 opsub=0 tt=75)
  657. {
  658. test:
  659. || (struct=7 op=4 opsub=0 tt=226)
  660. {
  661. arg:
  662. {
  663. < (struct=7 op=4 opsub=0 tt=206)
  664. {
  665. arg:
  666. {
  667. IDENT (struct=12 op=1 opsub=0 tt=78)
  668. name = 'index'
  669. uint(0) (struct=13 op=3 opsub=0 tt=86)
  670. }
  671. }
  672. >= (struct=7 op=4 opsub=0 tt=205)
  673. {
  674. arg:
  675. {
  676. IDENT (struct=12 op=1 opsub=0 tt=78)
  677. name = 'index'
  678. IDENT (struct=12 op=1 opsub=0 tt=78)
  679. name = 'm_size'
  680. }
  681. }
  682. }
  683. }
  684. ontrue:
  685. BLOCK (struct=4 op=21 opsub=0 tt=78)
  686. {
  687. locals: <null>
  688. code:
  689. {
  690. FCALL (struct=7 op=6 opsub=0 tt=40)
  691. {
  692. arg:
  693. {
  694. IDENT (struct=12 op=1 opsub=0 tt=78)
  695. name = 'WARNING'
  696. EXPR_LIST (struct=7 op=15 opsub=0 tt=40)
  697. {
  698. arg:
  699. str(array index out of bounds) (struct=13 op=3 opsub=0 tt=83)
  700. }
  701. }
  702. }
  703. RETURN (struct=7 op=18 opsub=0 tt=78)
  704. {
  705. arg:
  706. FCALL (struct=7 op=6 opsub=0 tt=40)
  707. {
  708. arg:
  709. {
  710. IDENT (struct=12 op=1 opsub=0 tt=78)
  711. name = 'T'
  712. EXPR_LIST (struct=7 op=15 opsub=0 tt=40)
  713. {
  714. arg: <null>
  715. }
  716. }
  717. }
  718. }
  719. }
  720. }
  721. onfalse: <null>
  722. }
  723. RETURN (struct=7 op=18 opsub=0 tt=78)
  724. {
  725. arg:
  726. INDEX (struct=7 op=7 opsub=0 tt=91)
  727. {
  728. arg:
  729. {
  730. IDENT (struct=12 op=1 opsub=0 tt=78)
  731. name = 'm_data'
  732. IDENT (struct=12 op=1 opsub=0 tt=78)
  733. name = 'index'
  734. }
  735. }
  736. }
  737. }
  738. }
  739. bytecode:
  740. IF
  741. CONST 0 [24] <= uint64 : 0000000000000000
  742. LT 1 [27] <= index [11], 0 [24]
  743. GTEQ 2 [28] <= index [11], m_size [13]
  744. BLN_OR 3 [29] <= 1 [27], 2 [28]
  745. DO
  746. RETURN [0]
  747. ENDO
  748. RETURN [0]
  749. }
  750. CLASS (struct=5 op=52 opsub=0 tt=75)
  751. {
  752. name = 'data1'
  753. items:
  754. {
  755. MEMBER (struct=2 op=55 opsub=0 tt=78)
  756. {
  757. name = 'name'
  758. orig_datatype = 'string'
  759. datatype = ''
  760. orig_typeinfo:
  761. IDENT (struct=12 op=1 opsub=0 tt=78)
  762. name = 'string'
  763. typeinfo: <null>
  764. value: <null>
  765. }
  766. MEMBER (struct=2 op=55 opsub=0 tt=78)
  767. {
  768. name = 'value'
  769. orig_datatype = 'int32'
  770. datatype = ''
  771. orig_typeinfo:
  772. IDENT (struct=12 op=1 opsub=0 tt=78)
  773. name = 'int32'
  774. typeinfo: <null>
  775. value: <null>
  776. }
  777. }
  778. }
  779. FUNC (struct=6 op=30 opsub=0 tt=75)
  780. {
  781. name = '_test'
  782. orig_datatype = 'int32'
  783. datatype = ''
  784. orig_typeinfo:
  785. IDENT (struct=12 op=1 opsub=0 tt=78)
  786. name = 'int32'
  787. typeinfo: <null>
  788. params:
  789. ARG (struct=2 op=10 opsub=0 tt=78)
  790. {
  791. name = 'a'
  792. orig_datatype = 'int32'
  793. datatype = ''
  794. orig_typeinfo:
  795. IDENT (struct=12 op=1 opsub=0 tt=78)
  796. name = 'int32'
  797. typeinfo: <null>
  798. value: <null>
  799. }
  800. code:
  801. BLOCK (struct=4 op=21 opsub=0 tt=75)
  802. {
  803. locals:
  804. VAR (struct=2 op=54 opsub=0 tt=78)
  805. {
  806. name = 'v'
  807. orig_datatype = 'int8'
  808. datatype = ''
  809. orig_typeinfo:
  810. IDENT (struct=12 op=1 opsub=0 tt=78)
  811. name = 'int8'
  812. typeinfo: <null>
  813. value:
  814. - (struct=7 op=4 opsub=0 tt=229)
  815. {
  816. arg:
  817. uint(5) (struct=13 op=3 opsub=0 tt=86)
  818. }
  819. }
  820. code:
  821. RETURN (struct=7 op=18 opsub=0 tt=86)
  822. {
  823. arg:
  824. + (struct=7 op=4 opsub=0 tt=228)
  825. {
  826. arg:
  827. {
  828. + (struct=7 op=4 opsub=0 tt=228)
  829. {
  830. arg:
  831. {
  832. int8(0) (struct=13 op=3 opsub=0 tt=86)
  833. IDENT (struct=12 op=1 opsub=0 tt=78)
  834. name = 'a'
  835. }
  836. }
  837. IDENT (struct=12 op=1 opsub=0 tt=78)
  838. name = 'v'
  839. }
  840. }
  841. }
  842. }
  843. bytecode:
  844. CONST 0 [24] <= uint64 : 0500000000000000
  845. NEGATE 1 [27] <= 0 [24]
  846. COPY 2 [28] <= 1 [27]
  847. CONST 3 [29] <= int8 : 00
  848. ADD 4 [32] <= 3 [29], a [18]
  849. ADD 5 [33] <= 4 [32], v [19]
  850. RETURN 5 [33]
  851. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement