diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/evaluate.mu | 2 | ||||
-rw-r--r-- | shell/global.mu | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/shell/evaluate.mu b/shell/evaluate.mu index e4034f95..c8ca02a9 100644 --- a/shell/evaluate.mu +++ b/shell/evaluate.mu @@ -262,7 +262,7 @@ fn evaluate _in-ah: (addr handle cell), _out-ah: (addr handle cell), env-h: (han stream-to-array first-arg-data, tmp-ah var first-arg-data-string/eax: (addr array byte) <- lookup *tmp-ah var out-ah/edi: (addr handle cell) <- copy _out-ah - assign-or-create-global globals, first-arg-data-string, *out-ah, trace + var defined-index/eax: int <- assign-or-create-global globals, first-arg-data-string, *out-ah, trace trace-higher trace return } diff --git a/shell/global.mu b/shell/global.mu index 8eb4552d..275bb7c0 100644 --- a/shell/global.mu +++ b/shell/global.mu @@ -327,13 +327,12 @@ fn refresh-definition _self: (addr global-table), _index: int { stream-to-array correct-definition-name, curr-global-name-ah } -fn assign-or-create-global _self: (addr global-table), name: (addr array byte), value: (handle cell), trace: (addr trace) { +fn assign-or-create-global _self: (addr global-table), name: (addr array byte), value: (handle cell), trace: (addr trace) -> _/eax: int { var self/esi: (addr global-table) <- copy _self compare self, 0 { break-if-!= abort "assign global" - return } var curr-index/ecx: int <- find-symbol-name-in-globals self, name { @@ -353,6 +352,7 @@ fn assign-or-create-global _self: (addr global-table), name: (addr array byte), copy-array-object name, curr-name-ah var curr-value-ah/eax: (addr handle cell) <- get curr, value copy-handle value, curr-value-ah + return curr-index } fn lookup-symbol-in-globals _sym: (addr cell), out: (addr handle cell), _globals: (addr global-table), trace: (addr trace), screen-cell: (addr handle cell), keyboard-cell: (addr handle cell) { |