From 2104d1a75b76dbffc0b15a96c98d94e7a16594e8 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 27 Jan 2020 00:39:46 -0800 Subject: 5925 --- html/077subx-words.subx.html | 46 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'html/077subx-words.subx.html') diff --git a/html/077subx-words.subx.html b/html/077subx-words.subx.html index 300f8a6a..39970cd9 100644 --- a/html/077subx-words.subx.html +++ b/html/077subx-words.subx.html @@ -64,9 +64,9 @@ if ('onhashchange' in window) { 5 # . op subop mod rm32 base index scale r32 6 # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes 7 - 8 has-metadata?: # word : (addr slice), s : (addr string) -> eax : boolean + 8 has-metadata?: # word: (addr slice), s: (addr string) -> eax: boolean 9 # pseudocode: - 10 # var twig : &slice = next-token-from-slice(word->start, word->end, '/') # skip name + 10 # var twig: &slice = next-token-from-slice(word->start, word->end, '/') # skip name 11 # curr = twig->end 12 # while true 13 # twig = next-token-from-slice(curr, word->end, '/') @@ -84,9 +84,9 @@ if ('onhashchange' in window) { 25 57/push-edi 26 # esi = word 27 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi - 28 # var edx : (addr byte) = word->end + 28 # var edx: (addr byte) = word->end 29 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 2/r32/edx 4/disp8 . # copy *(esi+4) to edx - 30 # var twig/edi : slice + 30 # var twig/edi: slice 31 68/push 0/imm32/end 32 68/push 0/imm32/start 33 89/copy 3/mod/direct 7/rm32/edi . . . 4/r32/esp . . # copy esp to edi @@ -160,7 +160,7 @@ if ('onhashchange' in window) { 101 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 102 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 103 05/add-to-eax 4/imm32 -104 # var in/esi : slice = {eax, ecx} +104 # var in/esi: slice = {eax, ecx} 105 51/push-ecx 106 50/push-eax 107 89/copy 3/mod/direct 6/rm32/esi . . . 4/r32/esp . . # copy esp to esi @@ -195,7 +195,7 @@ if ('onhashchange' in window) { 136 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 137 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 138 05/add-to-eax 4/imm32 -139 # var in/esi : slice = {eax, ecx} +139 # var in/esi: slice = {eax, ecx} 140 51/push-ecx 141 50/push-eax 142 89/copy 3/mod/direct 6/rm32/esi . . . 4/r32/esp . . # copy esp to esi @@ -230,7 +230,7 @@ if ('onhashchange' in window) { 171 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 172 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 173 05/add-to-eax 4/imm32 -174 # var in/esi : slice = {eax, ecx} +174 # var in/esi: slice = {eax, ecx} 175 51/push-ecx 176 50/push-eax 177 89/copy 3/mod/direct 6/rm32/esi . . . 4/r32/esp . . # copy esp to esi @@ -265,7 +265,7 @@ if ('onhashchange' in window) { 206 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 207 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 208 05/add-to-eax 4/imm32 -209 # var in/esi : slice = {eax, ecx} +209 # var in/esi: slice = {eax, ecx} 210 51/push-ecx 211 50/push-eax 212 89/copy 3/mod/direct 6/rm32/esi . . . 4/r32/esp . . # copy esp to esi @@ -300,7 +300,7 @@ if ('onhashchange' in window) { 241 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 242 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 243 05/add-to-eax 4/imm32 -244 # var in/esi : slice = {eax, ecx} +244 # var in/esi: slice = {eax, ecx} 245 51/push-ecx 246 50/push-eax 247 89/copy 3/mod/direct 6/rm32/esi . . . 4/r32/esp . . # copy esp to esi @@ -334,7 +334,7 @@ if ('onhashchange' in window) { 275 #: - if it starts with '0x' it's treated as a number. (redundant) 276 #: - if it's two characters long, it can't be a name. Either it's a hex 277 #: byte, or it raises an error. -278 is-valid-name?: # in : (addr slice) -> eax : boolean +278 is-valid-name?: # in: (addr slice) -> eax: boolean 279 # . prologue 280 55/push-ebp 281 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -343,21 +343,21 @@ if ('onhashchange' in window) { 284 56/push-esi 285 # esi = in 286 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 . # copy *(ebp+8) to esi -287 # var start/ecx : (addr byte) = in->start +287 # var start/ecx: (addr byte) = in->start 288 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . . # copy *esi to ecx 289 $is-valid-name?:check0: 290 # if (start >= in->end) return false 291 3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 4/disp8 . # compare ecx with *(esi+4) 292 73/jump-if-addr>= $is-valid-name?:false/disp8 293 $is-valid-name?:check1: -294 # var len/eax : int = in->end - start +294 # var len/eax: int = in->end - start 295 8b/copy 1/mod/*+disp8 6/rm32/esi . . . 0/r32/eax 4/disp8 . # copy *(esi+4) to eax 296 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . . # subtract ecx from eax 297 # if (eax == 2) return false 298 3d/compare-eax-and 2/imm32 299 74/jump-if-= $is-valid-name?:false/disp8 300 $is-valid-name?:check2: -301 # var c/eax : (addr byte) = *start +301 # var c/eax: (addr byte) = *start 302 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . . # clear eax 303 8a/copy-byte 0/mod/indirect 1/rm32/ecx . . . 0/r32/AL . . # copy byte at *ecx to AL 304 # if (c == "-") return false @@ -396,7 +396,7 @@ if ('onhashchange' in window) { 337 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 338 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 339 05/add-to-eax 4/imm32 -340 # var slice/ecx : slice = {eax, ecx} +340 # var slice/ecx: slice = {eax, ecx} 341 51/push-ecx 342 50/push-eax 343 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -430,7 +430,7 @@ if ('onhashchange' in window) { 371 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 372 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 373 05/add-to-eax 4/imm32 -374 # var slice/ecx : slice = {eax, ecx} +374 # var slice/ecx: slice = {eax, ecx} 375 51/push-ecx 376 50/push-eax 377 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -464,7 +464,7 @@ if ('onhashchange' in window) { 405 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 406 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 407 05/add-to-eax 4/imm32 -408 # var slice/ecx : slice = {eax, ecx} +408 # var slice/ecx: slice = {eax, ecx} 409 51/push-ecx 410 50/push-eax 411 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -498,7 +498,7 @@ if ('onhashchange' in window) { 439 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 440 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 441 05/add-to-eax 4/imm32 -442 # var slice/ecx : slice = {eax, ecx} +442 # var slice/ecx: slice = {eax, ecx} 443 51/push-ecx 444 50/push-eax 445 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -532,7 +532,7 @@ if ('onhashchange' in window) { 473 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 474 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 475 05/add-to-eax 4/imm32 -476 # var slice/ecx : slice = {eax, ecx} +476 # var slice/ecx: slice = {eax, ecx} 477 51/push-ecx 478 50/push-eax 479 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -566,7 +566,7 @@ if ('onhashchange' in window) { 507 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 508 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 509 05/add-to-eax 4/imm32 -510 # var slice/ecx : slice = {eax, ecx} +510 # var slice/ecx: slice = {eax, ecx} 511 51/push-ecx 512 50/push-eax 513 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -591,7 +591,7 @@ if ('onhashchange' in window) { 532 5d/pop-to-ebp 533 c3/return 534 -535 is-label?: # word : (addr slice) -> eax : boolean +535 is-label?: # word: (addr slice) -> eax: boolean 536 # . prologue 537 55/push-ebp 538 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . . # copy esp to ebp @@ -599,7 +599,7 @@ if ('onhashchange' in window) { 540 51/push-ecx 541 # ecx = word 542 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 8/disp8 . # copy *(ebp+8) to ecx -543 # var end/ecx : (addr byte) = word->end +543 # var end/ecx: (addr byte) = word->end 544 8b/copy 1/mod/*+disp8 1/rm32/ecx . . . 1/r32/ecx 4/disp8 . # copy *(ecx+4) to ecx 545 # return *(end - 1) == ':' 546 # . eax = *(end-1) @@ -628,7 +628,7 @@ if ('onhashchange' in window) { 569 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 570 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 571 05/add-to-eax 4/imm32 -572 # var slice/ecx : slice = {eax, ecx} +572 # var slice/ecx: slice = {eax, ecx} 573 51/push-ecx 574 50/push-eax 575 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx @@ -654,7 +654,7 @@ if ('onhashchange' in window) { 595 8b/copy 0/mod/indirect 0/rm32/eax . . . 1/r32/ecx . . # copy *eax to ecx 596 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 1/index/ecx . 1/r32/ecx 4/disp8 . # copy eax+ecx+4 to ecx 597 05/add-to-eax 4/imm32 -598 # var slice/ecx : slice = {eax, ecx} +598 # var slice/ecx: slice = {eax, ecx} 599 51/push-ecx 600 50/push-eax 601 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . . # copy esp to ecx -- cgit 1.4.1-2-gfad0