From ba7e56926df02be575ba772c33c8e1614f13f1f8 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 29 Nov 2014 00:57:06 -0800 Subject: 379 --- mu.arc | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'mu.arc') diff --git a/mu.arc b/mu.arc index ec681c08..d278fee6 100644 --- a/mu.arc +++ b/mu.arc @@ -599,7 +599,9 @@ (= memory*.addr val)) (do (if ((types* typeof.loc) 'array) ; size check for arrays - (when (~is rep.val.0 (- n 1)) + (when (~is n + (+ 1 ; array length + (* rep.val.0 (sizeof ((types* typeof.loc) 'elem))))) (die "writing invalid array @(tostring prn.val)")) ; size check for non-arrays (when (~is sizeof.loc n) @@ -646,14 +648,18 @@ (def sizeof (x) (trace "sizeof" x) (point return - (when (and (acons x) - (pos 'deref metadata.x)) - (assert typeinfo.x!address) - (return (sizeof deref.x))) - (when (and (acons x) - typeinfo.x!array) - (return (+ 1 (* (m `(,v.x integer)) - (sizeof typeinfo.x!elem))))) + (when (acons x) +;? (tr "aa " x) + (zap absolutize x) +;? (tr "bb " x) + (while (pos 'deref metadata.x) +;? (tr "cc " x) + (zap deref x)) +;? (tr "dd " x) +;? (trace "sizeof" "after canonizing: " x) + (when typeinfo.x!array + (return (+ 1 (* (m `(,v.x integer ,@(cut x 2))) + (sizeof typeinfo.x!elem)))))) (let type (if (and acons.x (pos 'deref metadata.x)) typeinfo.x!elem ; deref pointer acons.x -- cgit 1.4.1-2-gfad0 href='/akspecs/ranger/diff/doc/pydoc/ranger.gui.mouse_event.html?h=v1.8.0&id=f885ace0d94ec1c2d9aa504020b3457954153b98'>diff stats
path: root/doc/pydoc/ranger.gui.mouse_event.html
blob: a68937156dea49d27ba3e316d5e15f3509c215be (plain) (tree)
1
2
3
4
5
6
7
8
9
10