From e0b8eddb5b2463a6a2890fd2a089cc3cc1a0f711 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Wed, 23 Jun 2021 13:19:20 -0700 Subject: . --- html/shell/macroexpand.mu.html | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'html/shell/macroexpand.mu.html') diff --git a/html/shell/macroexpand.mu.html b/html/shell/macroexpand.mu.html index 6abe8101..4ba567b1 100644 --- a/html/shell/macroexpand.mu.html +++ b/html/shell/macroexpand.mu.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { https://github.com/akkartik/mu/blob/main/shell/macroexpand.mu
   1 fn macroexpand expr-ah: (addr handle cell), globals: (addr global-table), trace: (addr trace) {
-  2 +-- 15 lines: # trace "macroexpand " expr-ah --------------------------------------------------------------------------------------------------------------------------------------------
+  2 +-- 15 lines: # trace "macroexpand " expr-ah -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  17   trace-lower trace
  18   # loop until convergence
  19   {
@@ -78,13 +78,13 @@ if ('onhashchange' in window) {
  25     loop-if-!=
  26   }
  27   trace-higher trace
- 28 +-- 15 lines: # trace "=> " expr-ah -----------------------------------------------------------------------------------------------------------------------------------------------------
+ 28 +-- 15 lines: # trace "=> " expr-ah --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  43 }
  44 
  45 # return true if we found any macros
  46 fn macroexpand-iter _expr-ah: (addr handle cell), globals: (addr global-table), trace: (addr trace) -> _/eax: boolean {
  47   var expr-ah/esi: (addr handle cell) <- copy _expr-ah
- 48 +-- 15 lines: # trace "macroexpand-iter " expr ------------------------------------------------------------------------------------------------------------------------------------------
+ 48 +-- 15 lines: # trace "macroexpand-iter " expr ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
  63   trace-lower trace
  64   # if expr is a non-pair, return
  65   var expr/eax: (addr cell) <- lookup *expr-ah
@@ -111,8 +111,8 @@ if ('onhashchange' in window) {
  86   var rest-ah/ecx: (addr handle cell) <- get expr, right
  87   var first/eax: (addr cell) <- lookup *first-ah
  88   {
- 89     var litfn?/eax: boolean <- litfn? first
- 90     compare litfn?, 0/false
+ 89     var litfn?/eax: boolean <- litfn? first
+ 90     compare litfn?, 0/false
  91     break-if-=
  92     # litfn is a literal
  93     trace-text trace, "mac", "literal function"
@@ -120,8 +120,8 @@ if ('onhashchange' in window) {
  95     return 0/false
  96   }
  97   {
- 98     var litmac?/eax: boolean <- litmac? first
- 99     compare litmac?, 0/false
+ 98     var litmac?/eax: boolean <- litmac? first
+ 99     compare litmac?, 0/false
 100     break-if-=
 101     # litmac is a literal
 102     trace-text trace, "mac", "literal macro"
@@ -131,8 +131,8 @@ if ('onhashchange' in window) {
 106   var result/edi: boolean <- copy 0/false
 107   # for each builtin, expand only what will later be evaluated
 108   $macroexpand-iter:anonymous-function: {
-109     var fn?/eax: boolean <- fn? first
-110     compare fn?, 0/false
+109     var fn?/eax: boolean <- fn? first
+110     compare fn?, 0/false
 111     break-if-=
 112     # fn: expand every expression in the body
 113     trace-text trace, "mac", "anonymous function"
@@ -159,7 +159,7 @@ if ('onhashchange' in window) {
 134       loop
 135     }
 136     trace-higher trace
-137 +-- 15 lines: # trace "fn=> " _expr-ah --------------------------------------------------------------------------------------------------------------------------------------------------
+137 +-- 15 lines: # trace "fn=> " _expr-ah -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 152     return result
 153   }
 154   # builtins with "special" evaluation rules
@@ -203,7 +203,7 @@ if ('onhashchange' in window) {
 192     var val-ah/edx: (addr handle cell) <- get rest, left
 193     var macro-found?/eax: boolean <- macroexpand-iter val-ah, globals, trace
 194     trace-higher trace
-195 +-- 15 lines: # trace "define=> " _expr-ah ----------------------------------------------------------------------------------------------------------------------------------------------
+195 +-- 15 lines: # trace "define=> " _expr-ah -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 210     return macro-found?
 211   }
 212   $macroexpand-iter:set: {
@@ -219,7 +219,7 @@ if ('onhashchange' in window) {
 222     var val-ah/edx: (addr handle cell) <- get rest, left
 223     var macro-found?/eax: boolean <- macroexpand-iter val-ah, globals, trace
 224     trace-higher trace
-225 +-- 15 lines: # trace "set=> " _expr-ah -------------------------------------------------------------------------------------------------------------------------------------------------
+225 +-- 15 lines: # trace "set=> " _expr-ah ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 240     return macro-found?
 241   }
 242   # 'and' is like a function for macroexpansion purposes
@@ -244,7 +244,7 @@ if ('onhashchange' in window) {
 261     {
 262       var definition-car-ah/eax: (addr handle cell) <- get definition, left
 263       var definition-car/eax: (addr cell) <- lookup *definition-car-ah
-264       var macro?/eax: boolean <- litmac? definition-car
+264       var macro?/eax: boolean <- litmac? definition-car
 265       compare macro?, 0/false
 266     }
 267     break-if-=
@@ -252,9 +252,9 @@ if ('onhashchange' in window) {
 269     var macro-definition-ah/eax: (addr handle cell) <- get definition, right
 270     # TODO: check car(macro-definition) is litfn
 271 #?     turn-on-debug-print
-272     apply macro-definition-ah, rest-ah, expr-ah, globals, trace, 0/no-screen, 0/no-keyboard, 0/definitions-created, 0/call-number
+272     apply macro-definition-ah, rest-ah, expr-ah, globals, trace, 0/no-screen, 0/no-keyboard, 0/definitions-created, 0/call-number
 273     trace-higher trace
-274 +-- 15 lines: # trace "1=> " _expr-ah ---------------------------------------------------------------------------------------------------------------------------------------------------
+274 +-- 15 lines: # trace "1=> " _expr-ah ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 289     return 1/true
 290   }
 291   # no macro found; process any macros within args
@@ -279,7 +279,7 @@ if ('onhashchange' in window) {
 310     loop
 311   }
 312   trace-higher trace
-313 +-- 15 lines: # trace "=> " _expr-ah ----------------------------------------------------------------------------------------------------------------------------------------------------
+313 +-- 15 lines: # trace "=> " _expr-ah -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 328   return result
 329 }
 330 
@@ -301,29 +301,29 @@ if ('onhashchange' in window) {
 346   }
 347   var cdr-ah/ecx: (addr handle cell) <- get expr, right
 348   var car-ah/ebx: (addr handle cell) <- get expr, left
-349   var car/eax: (addr cell) <- lookup *car-ah
+349   var car/eax: (addr cell) <- lookup *car-ah
 350   # if car is unquote or unquote-splice, check if cadr is unquote or
 351   # unquote-splice.
 352   $look-for-double-unquote:check: {
 353     # if car is not an unquote, break
 354     {
 355       {
-356         var unquote?/eax: boolean <- symbol-equal? car, ","
+356         var unquote?/eax: boolean <- symbol-equal? car, ","
 357         compare unquote?, 0/false
 358       }
 359       break-if-!=
-360       var unquote-splice?/eax: boolean <- symbol-equal? car, ",@"
+360       var unquote-splice?/eax: boolean <- symbol-equal? car, ",@"
 361       compare unquote-splice?, 0/false
 362       break-if-!=
 363       break $look-for-double-unquote:check
 364     }
 365     # if cdr is not a pair, break
-366     var cdr/eax: (addr cell) <- lookup *cdr-ah
-367     var cdr-type/ecx: (addr int) <- get cdr, type
+366     var cdr/eax: (addr cell) <- lookup *cdr-ah
+367     var cdr-type/ecx: (addr int) <- get cdr, type
 368     compare *cdr-type, 0/pair
 369     break-if-!=
 370     # if cadr is not an unquote, break
-371     var cadr-ah/eax: (addr handle cell) <- get cdr, left
+371     var cadr-ah/eax: (addr handle cell) <- get cdr, left
 372     var cadr/eax: (addr cell) <- lookup *cadr-ah
 373     {
 374       {
@@ -371,7 +371,7 @@ if ('onhashchange' in window) {
 416   var dummy/eax: boolean <- macroexpand-iter result-ah, globals, trace
 417   var error?/eax: boolean <- has-errors? trace
 418   check-not error?, "F - test-macroexpand/error"
-419 #?   dump-cell-from-cursor-over-full-screen result-ah
+419 #?   dump-cell-from-cursor-over-full-screen result-ah, 4/fg 0/bg
 420   var _result/eax: (addr cell) <- lookup *result-ah
 421   var result/edi: (addr cell) <- copy _result
 422   # expected
@@ -384,7 +384,7 @@ if ('onhashchange' in window) {
 429 #?   dump-cell-from-cursor-over-full-screen expected-ah
 430   var expected/eax: (addr cell) <- lookup *expected-ah
 431   #
-432   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
+432   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
 433   check assertion, "F - test-macroexpand"
 434 }
 435 
@@ -422,7 +422,7 @@ if ('onhashchange' in window) {
 467   read-cell expected-gap, expected-ah, trace
 468   var expected/eax: (addr cell) <- lookup *expected-ah
 469   #
-470   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
+470   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
 471   check assertion, "F - test-macroexpand-inside-anonymous-fn"
 472 }
 473 
@@ -461,7 +461,7 @@ if ('onhashchange' in window) {
 506 #?   dump-cell-from-cursor-over-full-screen expected-ah
 507   var expected/eax: (addr cell) <- lookup *expected-ah
 508   #
-509   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
+509   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
 510   check assertion, "F - test-macroexpand-inside-fn-call"
 511 }
 512 
@@ -529,7 +529,7 @@ if ('onhashchange' in window) {
 574   read-cell expected-gap, expected-ah, trace
 575   var expected/eax: (addr cell) <- lookup *expected-ah
 576   #
-577   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
+577   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
 578   check assertion, "F - test-macroexpand-inside-backquote-unquote"
 579 }
 580 
@@ -555,7 +555,7 @@ if ('onhashchange' in window) {
 600   var dummy/eax: boolean <- macroexpand-iter result-ah, globals, trace
 601   var error?/eax: boolean <- has-errors? trace
 602   check-not error?, "F - test-macroexpand-inside-nested-backquote-unquote/error"
-603   dump-cell-from-cursor-over-full-screen result-ah
+603 #?   dump-cell-from-cursor-over-full-screen result-ah
 604   var _result/eax: (addr cell) <- lookup *result-ah
 605   var result/edi: (addr cell) <- copy _result
 606   # expected
@@ -565,10 +565,10 @@ if ('onhashchange' in window) {
 610   var expected-h: (handle cell)
 611   var expected-ah/edx: (addr handle cell) <- address expected-h
 612   read-cell expected-gap, expected-ah, trace
-613   dump-cell-from-cursor-over-full-screen expected-ah
+613 #?   dump-cell-from-cursor-over-full-screen expected-ah
 614   var expected/eax: (addr cell) <- lookup *expected-ah
 615   #
-616   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
+616   var assertion/eax: boolean <- cell-isomorphic? result, expected, trace
 617   check assertion, "F - test-macroexpand-inside-nested-backquote-unquote"
 618 }
 619 
-- 
cgit 1.4.1-2-gfad0