diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-01 12:02:36 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-01 12:02:36 +0000 |
commit | 638a7a9c546f867882ee3d19af458bb25f62fb01 (patch) | |
tree | 9948c4ef01b8662c9d14a96cc228d7844af68b71 /.gdbinit | |
parent | 213e5424de641be03636548c0b869697bfd93aea (diff) | |
download | ruby-638a7a9c546f867882ee3d19af458bb25f62fb01.tar.gz ruby-638a7a9c546f867882ee3d19af458bb25f62fb01.tar.xz ruby-638a7a9c546f867882ee3d19af458bb25f62fb01.zip |
* include/ruby/ruby.h (struct RBignum): embed digits in RBignum for
small bignums.
* bignum.c: RBignum embeded digits implemented.
* include/ruby/intern.h: declare rb_big_resize.
* gc.c: don't free embedded digits.
* numeric.c: replace direct bignum field accessor by abstract field
accessor such as RBIGNUM(val)->sign to RBIGNUM_SIGN(val).
* sprintf.c: ditto.
* compar.c: ditto.
* marshal.c: ditto.
* random.c: ditto.
* .gdbinit: support embedded small bignums.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -95,9 +95,17 @@ define rp else if ($flags & 0x1f) == 0x0d printf "T_BIGNUM: sign=%d len=%d ", \ - ((struct RBignum*)$arg0)->sign, ((struct RBignum*)$arg0)->len + (($flags & RUBY_FL_USER1) != 0), \ + (($flags & RUBY_FL_USER2) ? \ + ($flags & (RUBY_FL_USER5|RUBY_FL_USER4|RUBY_FL_USER3)) >> (RUBY_FL_USHIFT+3) : \ + ((struct RBignum*)$arg0)->as.heap.len) + if $flags & RUBY_FL_USER2 + printf "(embed) " + end print (struct RBignum *)$arg0 - x/xw ((struct RBignum*)$arg0)->digits + x/xw (($flags & RUBY_FL_USER2) ? \ + ((struct RBignum*)$arg0)->as.ary : \ + ((struct RBignum*)$arg0)->as.heap.digits) else if ($flags & 0x1f) == 0x0e printf "T_FILE: " |