diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-10-12 19:00:16 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-10-12 19:00:16 -0700 |
commit | 1faea03428d564c61f41d1a81d63ec1c393e20fb (patch) | |
tree | d839611d944d93fb0ef4233467f928f77a2729aa /apps | |
parent | 32cc6779af5b6150dc0921e27de7d8acc2604c98 (diff) | |
download | mu-1faea03428d564c61f41d1a81d63ec1c393e20fb.tar.gz |
7013
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tile/environment.mu | 3 | ||||
-rw-r--r-- | apps/tile/int-stack.mu | 23 | ||||
-rw-r--r-- | apps/tile/value-stack.mu | 25 |
3 files changed, 1 insertions, 50 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu index 339b6401..5ff176c2 100644 --- a/apps/tile/environment.mu +++ b/apps/tile/environment.mu @@ -764,8 +764,7 @@ fn render-column screen: (addr screen), functions: (addr handle function), bindi # render stack var curr-row/edx: int <- copy top-row curr-row <- add 3 # stack-margin-top - var _max-width/eax: int <- value-stack-max-width stack-addr - var max-width/esi: int <- copy _max-width + var max-width/esi: int <- copy 0 var i/eax: int <- value-stack-length stack-addr { compare i, 0 diff --git a/apps/tile/int-stack.mu b/apps/tile/int-stack.mu index 8e58f456..3bb9336f 100644 --- a/apps/tile/int-stack.mu +++ b/apps/tile/int-stack.mu @@ -67,26 +67,3 @@ fn int-stack-length _self: (addr int-stack) -> result/eax: int { var top-addr/eax: (addr int) <- get self, top result <- copy *top-addr } - -fn int-stack-max-width _self: (addr int-stack) -> result/eax: int { - var self/esi: (addr int-stack) <- copy _self - var data-ah/edi: (addr handle array int) <- get self, data - var _data/eax: (addr array int) <- lookup *data-ah - var data/edi: (addr array int) <- copy _data - var top-addr/ecx: (addr int) <- get self, top - var i/ebx: int <- copy 0 - result <- copy 0 - { - compare i, *top-addr - break-if->= - var g/edx: (addr int) <- index data, i - var w/ecx: int <- int-width-decimal *g - compare w, result - { - break-if-<= - result <- copy w - } - i <- increment - loop - } -} diff --git a/apps/tile/value-stack.mu b/apps/tile/value-stack.mu index 126ed036..b7b794c6 100644 --- a/apps/tile/value-stack.mu +++ b/apps/tile/value-stack.mu @@ -86,28 +86,3 @@ fn value-stack-length _self: (addr value-stack) -> result/eax: int { var top-addr/eax: (addr int) <- get self, top result <- copy *top-addr } - -fn value-stack-max-width _self: (addr value-stack) -> result/eax: int { - var self/esi: (addr value-stack) <- copy _self - var data-ah/edi: (addr handle array value) <- get self, data - var _data/eax: (addr array value) <- lookup *data-ah - var data/edi: (addr array value) <- copy _data - var top-addr/ecx: (addr int) <- get self, top - var i/ebx: int <- copy 0 - result <- copy 0 - { - compare i, *top-addr - break-if->= - var o/edx: (offset value) <- compute-offset data, i - var g/edx: (addr value) <- index data, o - var g2/edx: (addr int) <- get g, scalar-data - var w/ecx: int <- int-width-decimal *g2 - compare w, result - { - break-if-<= - result <- copy w - } - i <- increment - loop - } -} |