From 53d69dd1c5707a1cddd5c2ca6827b9a517659eeb Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 9 Nov 2021 09:29:56 -0800 Subject: keep 'grapheme-stack' We want to at least document intent there. --- html/513grapheme-stack.mu.html | 230 ++++++++++++++++++++--------------------- 1 file changed, 115 insertions(+), 115 deletions(-) (limited to 'html/513grapheme-stack.mu.html') diff --git a/html/513grapheme-stack.mu.html b/html/513grapheme-stack.mu.html index bde73e65..8476f08d 100644 --- a/html/513grapheme-stack.mu.html +++ b/html/513grapheme-stack.mu.html @@ -64,27 +64,27 @@ if ('onhashchange' in window) {
   1 # code-point-utf8 stacks are the smallest unit of editable text
   2 
-  3 type code-point-utf8-stack {
+  3 type grapheme-stack {
   4   data: (handle array code-point-utf8)
   5   top: int
   6 }
   7 
-  8 fn initialize-code-point-utf8-stack _self: (addr code-point-utf8-stack), n: int {
-  9   var self/esi: (addr code-point-utf8-stack) <- copy _self
+  8 fn initialize-grapheme-stack _self: (addr grapheme-stack), n: int {
+  9   var self/esi: (addr grapheme-stack) <- copy _self
  10   var d/edi: (addr handle array code-point-utf8) <- get self, data
  11   populate d, n
  12   var top/eax: (addr int) <- get self, top
  13   copy-to *top, 0
  14 }
  15 
- 16 fn clear-code-point-utf8-stack _self: (addr code-point-utf8-stack) {
- 17   var self/esi: (addr code-point-utf8-stack) <- copy _self
+ 16 fn clear-grapheme-stack _self: (addr grapheme-stack) {
+ 17   var self/esi: (addr grapheme-stack) <- copy _self
  18   var top/eax: (addr int) <- get self, top
  19   copy-to *top, 0
  20 }
  21 
- 22 fn code-point-utf8-stack-empty? _self: (addr code-point-utf8-stack) -> _/eax: boolean {
- 23   var self/esi: (addr code-point-utf8-stack) <- copy _self
+ 22 fn grapheme-stack-empty? _self: (addr grapheme-stack) -> _/eax: boolean {
+ 23   var self/esi: (addr grapheme-stack) <- copy _self
  24   var top/eax: (addr int) <- get self, top
  25   compare *top, 0
  26   {
@@ -94,14 +94,14 @@ if ('onhashchange' in window) {
  30   return 0/false
  31 }
  32 
- 33 fn code-point-utf8-stack-length _self: (addr code-point-utf8-stack) -> _/eax: int {
- 34   var self/esi: (addr code-point-utf8-stack) <- copy _self
+ 33 fn grapheme-stack-length _self: (addr grapheme-stack) -> _/eax: int {
+ 34   var self/esi: (addr grapheme-stack) <- copy _self
  35   var top/eax: (addr int) <- get self, top
  36   return *top
  37 }
  38 
- 39 fn push-code-point-utf8-stack _self: (addr code-point-utf8-stack), _val: code-point-utf8 {
- 40   var self/esi: (addr code-point-utf8-stack) <- copy _self
+ 39 fn push-grapheme-stack _self: (addr grapheme-stack), _val: code-point-utf8 {
+ 40   var self/esi: (addr grapheme-stack) <- copy _self
  41   var top-addr/ecx: (addr int) <- get self, top
  42   var data-ah/edx: (addr handle array code-point-utf8) <- get self, data
  43   var data/eax: (addr array code-point-utf8) <- lookup *data-ah
@@ -112,8 +112,8 @@ if ('onhashchange' in window) {
  48   add-to *top-addr, 1
  49 }
  50 
- 51 fn pop-code-point-utf8-stack _self: (addr code-point-utf8-stack) -> _/eax: code-point-utf8 {
- 52   var self/esi: (addr code-point-utf8-stack) <- copy _self
+ 51 fn pop-grapheme-stack _self: (addr grapheme-stack) -> _/eax: code-point-utf8 {
+ 52   var self/esi: (addr grapheme-stack) <- copy _self
  53   var top-addr/ecx: (addr int) <- get self, top
  54   {
  55     compare *top-addr, 0
@@ -128,8 +128,8 @@ if ('onhashchange' in window) {
  64   return *result-addr
  65 }
  66 
- 67 fn copy-code-point-utf8-stack _src: (addr code-point-utf8-stack), dest: (addr code-point-utf8-stack) {
- 68   var src/esi: (addr code-point-utf8-stack) <- copy _src
+ 67 fn copy-grapheme-stack _src: (addr grapheme-stack), dest: (addr grapheme-stack) {
+ 68   var src/esi: (addr grapheme-stack) <- copy _src
  69   var data-ah/edi: (addr handle array code-point-utf8) <- get src, data
  70   var _data/eax: (addr array code-point-utf8) <- lookup *data-ah
  71   var data/edi: (addr array code-point-utf8) <- copy _data
@@ -139,7 +139,7 @@ if ('onhashchange' in window) {
  75     compare i, *top-addr
  76     break-if->=
  77     var g/edx: (addr code-point-utf8) <- index data, i
- 78     push-code-point-utf8-stack dest, *g
+ 78     push-grapheme-stack dest, *g
  79     i <- increment
  80     loop
  81   }
@@ -148,8 +148,8 @@ if ('onhashchange' in window) {
  84 # dump stack to screen from bottom to top
  85 # hardcoded colors:
  86 #   matching paren
- 87 fn render-stack-from-bottom-wrapping-right-then-down screen: (addr screen), _self: (addr code-point-utf8-stack), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, highlight-matching-open-paren?: boolean, open-paren-depth: int, color: int, background-color: int -> _/eax: int, _/ecx: int {
- 88   var self/esi: (addr code-point-utf8-stack) <- copy _self
+ 87 fn render-stack-from-bottom-wrapping-right-then-down screen: (addr screen), _self: (addr grapheme-stack), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, highlight-matching-open-paren?: boolean, open-paren-depth: int, color: int, background-color: int -> _/eax: int, _/ecx: int {
+ 88   var self/esi: (addr grapheme-stack) <- copy _self
  89   var matching-open-paren-index/edx: int <- get-matching-open-paren-index self, highlight-matching-open-paren?, open-paren-depth
  90   var data-ah/edi: (addr handle array code-point-utf8) <- get self, data
  91   var _data/eax: (addr array code-point-utf8) <- lookup *data-ah
@@ -187,7 +187,7 @@ if ('onhashchange' in window) {
 123 }
 124 
 125 # helper for small words
-126 fn render-stack-from-bottom screen: (addr screen), self: (addr code-point-utf8-stack), x: int, y: int, highlight-matching-open-paren?: boolean, open-paren-depth: int -> _/eax: int {
+126 fn render-stack-from-bottom screen: (addr screen), self: (addr grapheme-stack), x: int, y: int, highlight-matching-open-paren?: boolean, open-paren-depth: int -> _/eax: int {
 127   var _width/eax: int <- copy 0
 128   var _height/ecx: int <- copy 0
 129   _width, _height <- screen-size screen
@@ -204,8 +204,8 @@ if ('onhashchange' in window) {
 140 # hard-coded colors:
 141 #   matching paren
 142 #   cursor
-143 fn render-stack-from-top-wrapping-right-then-down screen: (addr screen), _self: (addr code-point-utf8-stack), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, render-cursor?: boolean, color: int, background-color: int -> _/eax: int, _/ecx: int {
-144   var self/esi: (addr code-point-utf8-stack) <- copy _self
+143 fn render-stack-from-top-wrapping-right-then-down screen: (addr screen), _self: (addr grapheme-stack), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, render-cursor?: boolean, color: int, background-color: int -> _/eax: int, _/ecx: int {
+144   var self/esi: (addr grapheme-stack) <- copy _self
 145   var matching-close-paren-index/edx: int <- get-matching-close-paren-index self, render-cursor?
 146   var data-ah/eax: (addr handle array code-point-utf8) <- get self, data
 147   var _data/eax: (addr array code-point-utf8) <- lookup *data-ah
@@ -260,7 +260,7 @@ if ('onhashchange' in window) {
 196 }
 197 
 198 # helper for small words
-199 fn render-stack-from-top screen: (addr screen), self: (addr code-point-utf8-stack), x: int, y: int, render-cursor?: boolean -> _/eax: int {
+199 fn render-stack-from-top screen: (addr screen), self: (addr grapheme-stack), x: int, y: int, render-cursor?: boolean -> _/eax: int {
 200   var _width/eax: int <- copy 0
 201   var _height/ecx: int <- copy 0
 202   _width, _height <- screen-size screen
@@ -272,190 +272,190 @@ if ('onhashchange' in window) {
 208   return x2  # y2? yolo
 209 }
 210 
-211 fn test-render-code-point-utf8-stack {
+211 fn test-render-grapheme-stack {
 212   # setup: gs = "abc"
-213   var gs-storage: code-point-utf8-stack
-214   var gs/edi: (addr code-point-utf8-stack) <- address gs-storage
-215   initialize-code-point-utf8-stack gs, 5
+213   var gs-storage: grapheme-stack
+214   var gs/edi: (addr grapheme-stack) <- address gs-storage
+215   initialize-grapheme-stack gs, 5
 216   var g/eax: code-point-utf8 <- copy 0x61/a
-217   push-code-point-utf8-stack gs, g
+217   push-grapheme-stack gs, g
 218   g <- copy 0x62/b
-219   push-code-point-utf8-stack gs, g
+219   push-grapheme-stack gs, g
 220   g <- copy 0x63/c
-221   push-code-point-utf8-stack gs, g
+221   push-grapheme-stack gs, g
 222   # setup: screen
 223   var screen-storage: screen
 224   var screen/esi: (addr screen) <- address screen-storage
 225   initialize-screen screen, 5, 4, 0/no-pixel-graphics
 226   #
 227   var x/eax: int <- render-stack-from-bottom screen, gs, 0/x, 0/y, 0/no-highlight-matching-open-paren, 0/open-paren-depth
-228   check-screen-row screen, 0/y, "abc ", "F - test-render-code-point-utf8-stack from bottom"
-229   check-ints-equal x, 3, "F - test-render-code-point-utf8-stack from bottom: result"
-230   check-background-color-in-screen-row screen, 3/bg=reverse, 0/y, "   ", "F - test-render-code-point-utf8-stack from bottom: bg"
+228   check-screen-row screen, 0/y, "abc ", "F - test-render-grapheme-stack from bottom"
+229   check-ints-equal x, 3, "F - test-render-grapheme-stack from bottom: result"
+230   check-background-color-in-screen-row screen, 3/bg=reverse, 0/y, "   ", "F - test-render-grapheme-stack from bottom: bg"
 231   #
 232   var x/eax: int <- render-stack-from-top screen, gs, 0/x, 1/y, 0/cursor=false
-233   check-screen-row screen, 1/y, "cba ", "F - test-render-code-point-utf8-stack from top without cursor"
-234   check-ints-equal x, 3, "F - test-render-code-point-utf8-stack from top without cursor: result"
-235   check-background-color-in-screen-row screen, 3/bg=reverse, 1/y, "   ", "F - test-render-code-point-utf8-stack from top without cursor: bg"
+233   check-screen-row screen, 1/y, "cba ", "F - test-render-grapheme-stack from top without cursor"
+234   check-ints-equal x, 3, "F - test-render-grapheme-stack from top without cursor: result"
+235   check-background-color-in-screen-row screen, 3/bg=reverse, 1/y, "   ", "F - test-render-grapheme-stack from top without cursor: bg"
 236   #
 237   var x/eax: int <- render-stack-from-top screen, gs, 0/x, 2/y, 1/cursor=true
-238   check-screen-row screen, 2/y, "cba ", "F - test-render-code-point-utf8-stack from top with cursor"
-239   check-ints-equal x, 3, "F - test-render-code-point-utf8-stack from top with cursor: result"
-240   check-background-color-in-screen-row screen, 3/bg=reverse, 2/y, "|   ", "F - test-render-code-point-utf8-stack from top with cursor: bg"
+238   check-screen-row screen, 2/y, "cba ", "F - test-render-grapheme-stack from top with cursor"
+239   check-ints-equal x, 3, "F - test-render-grapheme-stack from top with cursor: result"
+240   check-background-color-in-screen-row screen, 3/bg=reverse, 2/y, "|   ", "F - test-render-grapheme-stack from top with cursor: bg"
 241 }
 242 
-243 fn test-render-code-point-utf8-stack-while-highlighting-matching-close-paren {
+243 fn test-render-grapheme-stack-while-highlighting-matching-close-paren {
 244   # setup: gs = "(b)"
-245   var gs-storage: code-point-utf8-stack
-246   var gs/edi: (addr code-point-utf8-stack) <- address gs-storage
-247   initialize-code-point-utf8-stack gs, 5
+245   var gs-storage: grapheme-stack
+246   var gs/edi: (addr grapheme-stack) <- address gs-storage
+247   initialize-grapheme-stack gs, 5
 248   var g/eax: code-point-utf8 <- copy 0x29/close-paren
-249   push-code-point-utf8-stack gs, g
+249   push-grapheme-stack gs, g
 250   g <- copy 0x62/b
-251   push-code-point-utf8-stack gs, g
+251   push-grapheme-stack gs, g
 252   g <- copy 0x28/open-paren
-253   push-code-point-utf8-stack gs, g
+253   push-grapheme-stack gs, g
 254   # setup: screen
 255   var screen-storage: screen
 256   var screen/esi: (addr screen) <- address screen-storage
 257   initialize-screen screen, 5, 4, 0/no-pixel-graphics
 258   #
 259   var x/eax: int <- render-stack-from-top screen, gs, 0/x, 2/y, 1/cursor=true
-260   check-screen-row                      screen,               2/y, "(b) ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-close-paren"
-261   check-background-color-in-screen-row  screen, 3/bg=reverse,  2/y, "|   ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-close-paren: cursor"
-262   check-screen-row-in-color             screen, 0xf/fg=white, 2/y, "  ) ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-close-paren: matching paren"
+260   check-screen-row                      screen,               2/y, "(b) ", "F - test-render-grapheme-stack-while-highlighting-matching-close-paren"
+261   check-background-color-in-screen-row  screen, 3/bg=reverse,  2/y, "|   ", "F - test-render-grapheme-stack-while-highlighting-matching-close-paren: cursor"
+262   check-screen-row-in-color             screen, 0xf/fg=white, 2/y, "  ) ", "F - test-render-grapheme-stack-while-highlighting-matching-close-paren: matching paren"
 263 }
 264 
-265 fn test-render-code-point-utf8-stack-while-highlighting-matching-close-paren-2 {
+265 fn test-render-grapheme-stack-while-highlighting-matching-close-paren-2 {
 266   # setup: gs = "(a (b)) c"
-267   var gs-storage: code-point-utf8-stack
-268   var gs/edi: (addr code-point-utf8-stack) <- address gs-storage
-269   initialize-code-point-utf8-stack gs, 0x10
+267   var gs-storage: grapheme-stack
+268   var gs/edi: (addr grapheme-stack) <- address gs-storage
+269   initialize-grapheme-stack gs, 0x10
 270   var g/eax: code-point-utf8 <- copy 0x63/c
-271   push-code-point-utf8-stack gs, g
+271   push-grapheme-stack gs, g
 272   g <- copy 0x20/space
-273   push-code-point-utf8-stack gs, g
+273   push-grapheme-stack gs, g
 274   g <- copy 0x29/close-paren
-275   push-code-point-utf8-stack gs, g
+275   push-grapheme-stack gs, g
 276   g <- copy 0x29/close-paren
-277   push-code-point-utf8-stack gs, g
+277   push-grapheme-stack gs, g
 278   g <- copy 0x62/b
-279   push-code-point-utf8-stack gs, g
+279   push-grapheme-stack gs, g
 280   g <- copy 0x28/open-paren
-281   push-code-point-utf8-stack gs, g
+281   push-grapheme-stack gs, g
 282   g <- copy 0x20/space
-283   push-code-point-utf8-stack gs, g
+283   push-grapheme-stack gs, g
 284   g <- copy 0x61/a
-285   push-code-point-utf8-stack gs, g
+285   push-grapheme-stack gs, g
 286   g <- copy 0x28/open-paren
-287   push-code-point-utf8-stack gs, g
+287   push-grapheme-stack gs, g
 288   # setup: screen
 289   var screen-storage: screen
 290   var screen/esi: (addr screen) <- address screen-storage
 291   initialize-screen screen, 5, 4, 0/no-pixel-graphics
 292   #
 293   var x/eax: int <- render-stack-from-top screen, gs, 0/x, 2/y, 1/cursor=true
-294   check-screen-row                      screen,               2/y, "(a (b)) c ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-close-paren-2"
-295   check-background-color-in-screen-row  screen, 3/bg=reverse,  2/y, "|         ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-close-paren-2: cursor"
-296   check-screen-row-in-color             screen, 0xf/fg=white, 2/y, "      )   ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-close-paren-2: matching paren"
+294   check-screen-row                      screen,               2/y, "(a (b)) c ", "F - test-render-grapheme-stack-while-highlighting-matching-close-paren-2"
+295   check-background-color-in-screen-row  screen, 3/bg=reverse,  2/y, "|         ", "F - test-render-grapheme-stack-while-highlighting-matching-close-paren-2: cursor"
+296   check-screen-row-in-color             screen, 0xf/fg=white, 2/y, "      )   ", "F - test-render-grapheme-stack-while-highlighting-matching-close-paren-2: matching paren"
 297 }
 298 
-299 fn test-render-code-point-utf8-stack-while-highlighting-matching-open-paren-with-close-paren-at-end {
+299 fn test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end {
 300   # setup: gs = "(b)"
-301   var gs-storage: code-point-utf8-stack
-302   var gs/edi: (addr code-point-utf8-stack) <- address gs-storage
-303   initialize-code-point-utf8-stack gs, 5
+301   var gs-storage: grapheme-stack
+302   var gs/edi: (addr grapheme-stack) <- address gs-storage
+303   initialize-grapheme-stack gs, 5
 304   var g/eax: code-point-utf8 <- copy 0x28/open-paren
-305   push-code-point-utf8-stack gs, g
+305   push-grapheme-stack gs, g
 306   g <- copy 0x62/b
-307   push-code-point-utf8-stack gs, g
+307   push-grapheme-stack gs, g
 308   g <- copy 0x29/close-paren
-309   push-code-point-utf8-stack gs, g
+309   push-grapheme-stack gs, g
 310   # setup: screen
 311   var screen-storage: screen
 312   var screen/esi: (addr screen) <- address screen-storage
 313   initialize-screen screen, 5, 4, 0/no-pixel-graphics
 314   #
 315   var x/eax: int <- render-stack-from-bottom screen, gs, 0/x, 2/y, 1/highlight-matching-open-paren, 1/open-paren-depth
-316   check-screen-row          screen,               2/y, "(b) ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-open-paren-with-close-paren-at-end"
-317   check-screen-row-in-color screen, 0xf/fg=white, 2/y, "(   ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-open-paren-with-close-paren-at-end: matching paren"
+316   check-screen-row          screen,               2/y, "(b) ", "F - test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end"
+317   check-screen-row-in-color screen, 0xf/fg=white, 2/y, "(   ", "F - test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end: matching paren"
 318 }
 319 
-320 fn test-render-code-point-utf8-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2 {
+320 fn test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2 {
 321   # setup: gs = "a((b))"
-322   var gs-storage: code-point-utf8-stack
-323   var gs/edi: (addr code-point-utf8-stack) <- address gs-storage
-324   initialize-code-point-utf8-stack gs, 0x10
+322   var gs-storage: grapheme-stack
+323   var gs/edi: (addr grapheme-stack) <- address gs-storage
+324   initialize-grapheme-stack gs, 0x10
 325   var g/eax: code-point-utf8 <- copy 0x61/a
-326   push-code-point-utf8-stack gs, g
+326   push-grapheme-stack gs, g
 327   g <- copy 0x28/open-paren
-328   push-code-point-utf8-stack gs, g
+328   push-grapheme-stack gs, g
 329   g <- copy 0x28/open-paren
-330   push-code-point-utf8-stack gs, g
+330   push-grapheme-stack gs, g
 331   g <- copy 0x62/b
-332   push-code-point-utf8-stack gs, g
+332   push-grapheme-stack gs, g
 333   g <- copy 0x29/close-paren
-334   push-code-point-utf8-stack gs, g
+334   push-grapheme-stack gs, g
 335   g <- copy 0x29/close-paren
-336   push-code-point-utf8-stack gs, g
+336   push-grapheme-stack gs, g
 337   # setup: screen
 338   var screen-storage: screen
 339   var screen/esi: (addr screen) <- address screen-storage
 340   initialize-screen screen, 5, 4, 0/no-pixel-graphics
 341   #
 342   var x/eax: int <- render-stack-from-bottom screen, gs, 0/x, 2/y, 1/highlight-matching-open-paren, 1/open-paren-depth
-343   check-screen-row          screen,               2/y, "a((b)) ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2"
-344   check-screen-row-in-color screen, 0xf/fg=white, 2/y, " (     ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2: matching paren"
+343   check-screen-row          screen,               2/y, "a((b)) ", "F - test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2"
+344   check-screen-row-in-color screen, 0xf/fg=white, 2/y, " (     ", "F - test-render-grapheme-stack-while-highlighting-matching-open-paren-with-close-paren-at-end-2: matching paren"
 345 }
 346 
-347 fn test-render-code-point-utf8-stack-while-highlighting-matching-open-paren {
+347 fn test-render-grapheme-stack-while-highlighting-matching-open-paren {
 348   # setup: gs = "(b"
-349   var gs-storage: code-point-utf8-stack
-350   var gs/edi: (addr code-point-utf8-stack) <- address gs-storage
-351   initialize-code-point-utf8-stack gs, 5
+349   var gs-storage: grapheme-stack
+350   var gs/edi: (addr grapheme-stack) <- address gs-storage
+351   initialize-grapheme-stack gs, 5
 352   var g/eax: code-point-utf8 <- copy 0x28/open-paren
-353   push-code-point-utf8-stack gs, g
+353   push-grapheme-stack gs, g
 354   g <- copy 0x62/b
-355   push-code-point-utf8-stack gs, g
+355   push-grapheme-stack gs, g
 356   # setup: screen
 357   var screen-storage: screen
 358   var screen/esi: (addr screen) <- address screen-storage
 359   initialize-screen screen, 5, 4, 0/no-pixel-graphics
 360   #
 361   var x/eax: int <- render-stack-from-bottom screen, gs, 0/x, 2/y, 1/highlight-matching-open-paren, 0/open-paren-depth
-362   check-screen-row          screen,               2/y, "(b ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-open-paren"
-363   check-screen-row-in-color screen, 0xf/fg=white, 2/y, "(  ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-open-paren: matching paren"
+362   check-screen-row          screen,               2/y, "(b ", "F - test-render-grapheme-stack-while-highlighting-matching-open-paren"
+363   check-screen-row-in-color screen, 0xf/fg=white, 2/y, "(  ", "F - test-render-grapheme-stack-while-highlighting-matching-open-paren: matching paren"
 364 }
 365 
-366 fn test-render-code-point-utf8-stack-while-highlighting-matching-open-paren-2 {
+366 fn test-render-grapheme-stack-while-highlighting-matching-open-paren-2 {
 367   # setup: gs = "a((b)"
-368   var gs-storage: code-point-utf8-stack
-369   var gs/edi: (addr code-point-utf8-stack) <- address gs-storage
-370   initialize-code-point-utf8-stack gs, 0x10
+368   var gs-storage: grapheme-stack
+369   var gs/edi: (addr grapheme-stack) <- address gs-storage
+370   initialize-grapheme-stack gs, 0x10
 371   var g/eax: code-point-utf8 <- copy 0x61/a
-372   push-code-point-utf8-stack gs, g
+372   push-grapheme-stack gs, g
 373   g <- copy 0x28/open-paren
-374   push-code-point-utf8-stack gs, g
+374   push-grapheme-stack gs, g
 375   g <- copy 0x28/open-paren
-376   push-code-point-utf8-stack gs, g
+376   push-grapheme-stack gs, g
 377   g <- copy 0x62/b
-378   push-code-point-utf8-stack gs, g
+378   push-grapheme-stack gs, g
 379   g <- copy 0x29/close-paren
-380   push-code-point-utf8-stack gs, g
+380   push-grapheme-stack gs, g
 381   # setup: screen
 382   var screen-storage: screen
 383   var screen/esi: (addr screen) <- address screen-storage
 384   initialize-screen screen, 5, 4, 0/no-pixel-graphics
 385   #
 386   var x/eax: int <- render-stack-from-bottom screen, gs, 0/x, 2/y, 1/highlight-matching-open-paren, 0/open-paren-depth
-387   check-screen-row          screen,               2/y, "a((b) ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-open-paren-2"
-388   check-screen-row-in-color screen, 0xf/fg=white, 2/y, " (    ", "F - test-render-code-point-utf8-stack-while-highlighting-matching-open-paren-2: matching paren"
+387   check-screen-row          screen,               2/y, "a((b) ", "F - test-render-grapheme-stack-while-highlighting-matching-open-paren-2"
+388   check-screen-row-in-color screen, 0xf/fg=white, 2/y, " (    ", "F - test-render-grapheme-stack-while-highlighting-matching-open-paren-2: matching paren"
 389 }
 390 
 391 # return the index of the matching close-paren of the code-point-utf8 at cursor (top of stack)
 392 # or top index if there's no matching close-paren
-393 fn get-matching-close-paren-index _self: (addr code-point-utf8-stack), render-cursor?: boolean -> _/edx: int {
-394   var self/esi: (addr code-point-utf8-stack) <- copy _self
+393 fn get-matching-close-paren-index _self: (addr grapheme-stack), render-cursor?: boolean -> _/edx: int {
+394   var self/esi: (addr grapheme-stack) <- copy _self
 395   var top-addr/edx: (addr int) <- get self, top
 396   # if not rendering cursor, return
 397   compare render-cursor?, 0/false
@@ -510,8 +510,8 @@ if ('onhashchange' in window) {
 446 
 447 # return the index of the first open-paren at the given depth
 448 # or top index if there's no matching close-paren
-449 fn get-matching-open-paren-index _self: (addr code-point-utf8-stack), control: boolean, depth: int -> _/edx: int {
-450   var self/esi: (addr code-point-utf8-stack) <- copy _self
+449 fn get-matching-open-paren-index _self: (addr grapheme-stack), control: boolean, depth: int -> _/edx: int {
+450   var self/esi: (addr grapheme-stack) <- copy _self
 451   var top-addr/edx: (addr int) <- get self, top
 452   # if not rendering cursor, return
 453   compare control, 0/false
@@ -558,8 +558,8 @@ if ('onhashchange' in window) {
 494 
 495 # compare from bottom
 496 # beware: modifies 'stream', which must be disposed of after a false result
-497 fn prefix-match? _self: (addr code-point-utf8-stack), s: (addr stream byte) -> _/eax: boolean {
-498   var self/esi: (addr code-point-utf8-stack) <- copy _self
+497 fn prefix-match? _self: (addr grapheme-stack), s: (addr stream byte) -> _/eax: boolean {
+498   var self/esi: (addr grapheme-stack) <- copy _self
 499   var data-ah/edi: (addr handle array code-point-utf8) <- get self, data
 500   var _data/eax: (addr array code-point-utf8) <- lookup *data-ah
 501   var data/edi: (addr array code-point-utf8) <- copy _data
@@ -586,8 +586,8 @@ if ('onhashchange' in window) {
 522 
 523 # compare from bottom
 524 # beware: modifies 'stream', which must be disposed of after a false result
-525 fn suffix-match? _self: (addr code-point-utf8-stack), s: (addr stream byte) -> _/eax: boolean {
-526   var self/esi: (addr code-point-utf8-stack) <- copy _self
+525 fn suffix-match? _self: (addr grapheme-stack), s: (addr stream byte) -> _/eax: boolean {
+526   var self/esi: (addr grapheme-stack) <- copy _self
 527   var data-ah/edi: (addr handle array code-point-utf8) <- get self, data
 528   var _data/eax: (addr array code-point-utf8) <- lookup *data-ah
 529   var data/edi: (addr array code-point-utf8) <- copy _data
@@ -613,15 +613,15 @@ if ('onhashchange' in window) {
 549   return 1   # true
 550 }
 551 
-552 fn code-point-utf8-stack-is-decimal-integer? _self: (addr code-point-utf8-stack) -> _/eax: boolean {
-553   var self/esi: (addr code-point-utf8-stack) <- copy _self
+552 fn grapheme-stack-is-decimal-integer? _self: (addr grapheme-stack) -> _/eax: boolean {
+553   var self/esi: (addr grapheme-stack) <- copy _self
 554   var data-ah/eax: (addr handle array code-point-utf8) <- get self, data
 555   var _data/eax: (addr array code-point-utf8) <- lookup *data-ah
 556   var data/edx: (addr array code-point-utf8) <- copy _data
 557   var top-addr/ecx: (addr int) <- get self, top
 558   var i/ebx: int <- copy 0
 559   var result/eax: boolean <- copy 1/true
-560   $code-point-utf8-stack-is-integer?:loop: {
+560   $grapheme-stack-is-integer?:loop: {
 561     compare i, *top-addr
 562     break-if->=
 563     var g/edx: (addr code-point-utf8) <- index data, i
-- 
cgit 1.4.1-2-gfad0