/[cmucl]/src/code/dfixnum.lisp
ViewVC logotype

Diff of /src/code/dfixnum.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by rtoy, Mon Apr 19 02:18:03 2010 UTC revision 1.6 by rtoy, Tue Apr 20 17:57:44 2010 UTC
# Line 71  Line 71 
71        (setf (dfixnum-l v) low)))        (setf (dfixnum-l v) low)))
72    (let ((high (+ (dfixnum-h v) (dfixnum-h i))))    (let ((high (+ (dfixnum-h v) (dfixnum-h i))))
73      (when (> high dfmax)      (when (> high dfmax)
74        (error _"dfixnum became too big ~a + ~a" v i))        (error (intl:gettext "dfixnum became too big ~a + ~a") v i))
75      (setf (dfixnum-h v) high))      (setf (dfixnum-h v) high))
76    v)    v)
77    
# Line 84  Line 84 
84    "increments dfixnum v by i (max half fixnum)"    "increments dfixnum v by i (max half fixnum)"
85    (declare (type dfixnum v) (type fixnum i))    (declare (type dfixnum v) (type fixnum i))
86    (when (> i dfmax)    (when (> i dfmax)
87        (error _"not a half-fixnum: ~a" i))        (error (intl:gettext "not a half-fixnum: ~a") i))
88    (let ((low (+ (dfixnum-l v) i)))    (let ((low (+ (dfixnum-l v) i)))
89      (if (> low dfmax)      (if (> low dfmax)
90          (progn          (progn
# Line 92  Line 92 
92            (incf (dfixnum-h v)))            (incf (dfixnum-h v)))
93        (setf (dfixnum-l v) (the dfparttype low))))        (setf (dfixnum-l v) (the dfparttype low))))
94    (when (> (+ (dfixnum-h v) i) dfmax)    (when (> (+ (dfixnum-h v) i) dfmax)
95      (error _"dfixnum became too big ~a + ~a" v i))      (error (intl:gettext "dfixnum became too big ~a + ~a") v i))
96    v)    v)
97    
98  (defun dfixnum-dec-df (v i)  (defun dfixnum-dec-df (v i)
# Line 105  Line 105 
105          (decf high)          (decf high)
106          (setf low (+ low dfmax)))          (setf low (+ low dfmax)))
107      (when (< high 0)      (when (< high 0)
108        (error _"dfixnum became negative ~a - ~a (~a/~a)" v i low high))        (error (intl:gettext "dfixnum became negative ~a - ~a (~a/~a)") v i low high))
109      (setf (dfixnum-h v) high)      (setf (dfixnum-h v) high)
110      (setf (dfixnum-l v) low))      (setf (dfixnum-l v) low))
111    v)    v)
# Line 120  Line 120 
120          (decf high)          (decf high)
121          (setf low (+ low dfmax)))          (setf low (+ low dfmax)))
122      (when (< high 0)      (when (< high 0)
123        (error _"dfixnum became negative ~a - ~a (~a/~a)" v i low high))        (error (intl:gettext "dfixnum became negative ~a - ~a (~a/~a)") v i low high))
124      (setf (dfixnum-h v) high)      (setf (dfixnum-h v) high)
125      (setf (dfixnum-l v) low))      (setf (dfixnum-l v) low))
126    v)    v)
# Line 200  Line 200 
200           (setf ,vl low)))           (setf ,vl low)))
201       (let ((high (+ ,vh ,ih)))       (let ((high (+ ,vh ,ih)))
202         (when (> high dfmax)         (when (> high dfmax)
203           (error _"dfixnum became too big ~a/~a + ~a/~a" ,vh ,vl ,ih ,il))           (error (intl:gettext "dfixnum became too big ~a/~a + ~a/~a") ,vh ,vl ,ih ,il))
204         (setf ,vh high))))         (setf ,vh high))))
205    
206  (defun dfixnum-pair-integer (h l)  (defun dfixnum-pair-integer (h l)
# Line 215  Line 215 
215         (decf high)         (decf high)
216         (setf low (+ low dfmax)))         (setf low (+ low dfmax)))
217       (when (< high 0)       (when (< high 0)
218         (error _"dfixnum became negative ~a/~a - ~a/~a(~a/~a)"         (error (intl:gettext "dfixnum became negative ~a/~a - ~a/~a(~a/~a)")
219                ,vh ,vl ,ih ,il low high))                ,vh ,vl ,ih ,il low high))
220       (setf ,vh high)       (setf ,vh high)
221       (setf ,vl low)))       (setf ,vl low)))

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.5