From 9309600c5a8a5a86ac5aeebdee7bf0656409fc26 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 14 Feb 2019 23:00:47 -0800 Subject: 4967 --- html/subx/058stream-equal.subx.html | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'html/subx/058stream-equal.subx.html') diff --git a/html/subx/058stream-equal.subx.html b/html/subx/058stream-equal.subx.html index 368a7f46..31fcfd17 100644 --- a/html/subx/058stream-equal.subx.html +++ b/html/subx/058stream-equal.subx.html @@ -93,7 +93,7 @@ if ('onhashchange' in window) { 32 81 0/subop/add 3/mod/direct 6/rm32/ESI . . . . . 0xc/imm32 # add to ESI 33 # EDI = s 34 8b/copy 1/mod/*+disp8 5/rm32/EBP . . . 7/r32/EDI 0xc/disp8 . # copy *(EBP+12) to EDI - 35 # if (f->write != s->length) return false; + 35 # if (f->write != s->length) return false 36 39/compare 0/mod/indirect 7/rm32/EDI . . . 0/r32/EAX . . # compare *EDI and EAX 37 75/jump-if-not-equal $stream-data-equal?:false/disp8 38 # currs/EDI = s->data @@ -296,25 +296,25 @@ if ('onhashchange' in window) { 235 # pseudocode: 236 # currf = f->read # bound: f->write 237 # currs = 0 # bound : s->length -238 # while true -239 # if currf >= f->write +238 # while true: +239 # if (currf >= f->write) 240 # return currs >= s->length -241 # if f[currf] == '\n' +241 # if (f[currf] == '\n') 242 # ++currf 243 # return currs >= s->length -244 # if currs >= s->length return false # the current line of f still has data to match -245 # if f[currf] != s[currs] return false +244 # if (currs >= s->length) return false # the current line of f still has data to match +245 # if (f[currf] != s[currs]) return false 246 # ++currf 247 # ++currs 248 # 249 # collapsing the two branches that can return true: 250 # currf = f->read # bound: f->write 251 # currs = 0 # bound : s->length -252 # while true -253 # if currf >= f->write break -254 # if f[currf] == '\n' break -255 # if currs >= s->length return false # the current line of f still has data to match -256 # if f[currf] != s[currs] return false +252 # while true: +253 # if (currf >= f->write) break +254 # if (f[currf] == '\n') break +255 # if (currs >= s->length) return false # the current line of f still has data to match +256 # if (f[currf] != s[currs]) return false 257 # ++currf 258 # ++currs 259 # ++currf # skip '\n' @@ -322,12 +322,12 @@ if ('onhashchange' in window) { 261 # Here the final `++currf` is sometimes unnecessary (if we're already at the end of the stream) 262 # 263 # registers: -264 # f : ESI -265 # s : EDI -266 # currf : ECX -267 # currs : EDX -268 # f[currf] : EAX -269 # s[currs] : EBX +264 # f: ESI +265 # s: EDI +266 # currf: ECX +267 # currs: EDX +268 # f[currf]: EAX +269 # s[currs]: EBX 270 # 271 # . prolog 272 55/push-EBP @@ -373,7 +373,7 @@ if ('onhashchange' in window) { 312 $next-stream-line-equal?:break: 313 # ++currf 314 41/increment-ECX -315 # if currs >= s->length return true +315 # if (currs >= s->length) return true 316 3b/compare 0/mod/indirect 7/rm32/EDI . . . 2/r32/EDX . . # compare EDX with *EDI 317 7c/jump-if-lesser $next-stream-line-equal?:false/disp8 318 $next-stream-line-equal?:true: -- cgit 1.4.1-2-gfad0