[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Re: gst 2.1.11 on Debian AMD64
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] Re: gst 2.1.11 on Debian AMD64 |
Date: |
Tue, 30 Aug 2005 11:18:34 +0200 |
User-agent: |
Mozilla Thunderbird 0.9 (Macintosh/20041103) |
A cleaner solution, however, is to simply base the alignment decisions
on int's rather than long's, as in the attached patch. BTW, next time
please use "diff -u" or "diff -c" to make your patch, it will be more
readable and easier to apply.
My patch is completely wrong, yours is correct. I committed it (with
some stylistic fixes) as smalltalk--devo--2.1--patch-35 in the arch
repository. With it, I confirm I can bootstrap GNU Smalltalk on x86_64.
The geometry.st failure is caused by differences in #basicHash on the
two systems. The intmath.st is a 64-bit cleanliness problem in mpz.c.
Both are fixed in patch-36.
Unfortunately I noted that the arch mirror is lagging behind the
repository :-( so I attach the modifications I've done today.
Paolo
--- orig/libgst/cint.c
+++ mod/libgst/cint.c
@@ -899,10 +899,11 @@ push_obj (cparam_union * up,
alignInts = alignments[typ] / sizeof (long);
/* Align the stack properly */
- if ((c_arg - c_arg_vec) % alignInts)
+ if (alignInts > 0 && (c_arg - c_arg_vec) % alignInts)
c_arg += alignInts - ((c_arg - c_arg_vec) % alignInts);
- for (i = 0; i < type_sizes[typ] / sizeof (long); i++)
+ i = 0;
+ do
{
if (c_arg - c_arg_vec >= ARG_VEC_SIZE)
{
@@ -913,6 +914,7 @@ push_obj (cparam_union * up,
}
*c_arg++ = up->valueVec[i];
}
+ while (++i < type_sizes[typ] / sizeof (long));
}
OOP
--- orig/libgst/mpz.c
+++ mod/libgst/mpz.c
@@ -1541,7 +1541,7 @@ _gst_mpz_from_oop(gst_mpz *mpz, OOP srcO
if (IS_INT(srcOOP))
{
- int i = TO_INT(srcOOP);
+ long i = TO_INT(srcOOP);
gst_mpz_realloc (mpz, 1);
mpz->size = i < 0 ? -1 : 1;
mpz->d[0] = i < 0 ? -i : i;
--- orig/snprintfv/snprintfv/Makefile.am
+++ mod/snprintfv/snprintfv/Makefile.am
@@ -49,6 +49,7 @@ nodist_noinst_HEADERS = compat.h
endif
dist_noinst_DATA = filament.stamp stream.stamp printf.stamp dl.stamp
+CLEANFILES = $(dist_noinst_DATA)
EXTRA_LTLIBRARIES = libsnprintfv.la libsnprintfvc.la
noinst_LTLIBRARIES = $(convenience_libsnprintfv)
@@ -112,7 +113,7 @@ $(srcdir)/%.h: %.stamp
%.stamp: %.in
@file=`echo $@ | sed 's,\.stamp$$,.h,'`; \
- $(GENPROTO_ENVIRONMENT) $(GENPROTO) $(GENPROTO_FLAGS) $(srcdir)/$^ > \
+ $(GENPROTO_ENVIRONMENT) $(GENPROTO) $(GENPROTO_FLAGS) $^ > \
$${file}T; \
if cmp -s $(srcdir)/$$file $${file}T; then \
echo $$file is unchanged; rm -f $${file}T; \
--- orig/tests/geometry.ok
+++ mod/tests/geometry.ok
@@ -1,5 +1,8 @@
Execution begins...
+returned value is Rectangle
+
+Execution begins...
'p1 = 'address@hidden
'p2 = 'address@hidden
returned value is Point new "<0>"
@@ -66,8 +69,8 @@ Execution begins...
address@hidden corner: address@hidden
address@hidden corner: address@hidden
(address@hidden corner: address@hidden address@hidden corner: address@hidden )
-(address@hidden corner: address@hidden address@hidden corner: address@hidden
address@hidden corner: address@hidden )
-(address@hidden corner: address@hidden address@hidden corner: address@hidden
address@hidden corner: address@hidden address@hidden corner: address@hidden )
+(address@hidden corner: address@hidden address@hidden corner: address@hidden
address@hidden corner: address@hidden )
+(address@hidden corner: address@hidden address@hidden corner: address@hidden
address@hidden corner: address@hidden address@hidden corner: address@hidden )
address@hidden corner: address@hidden
address@hidden corner: address@hidden
address@hidden corner: address@hidden
--- orig/tests/geometry.st
+++ mod/tests/geometry.st
@@ -10,7 +10,7 @@
"======================================================================
|
-| Copyright (C) 1995, 1999 Free Software Foundation.
+| Copyright (C) 1995, 1999, 2005 Free Software Foundation.
| Written by Doug McCallum.
|
| This file is part of GNU Smalltalk.
@@ -30,6 +30,13 @@
|
======================================================================"
+!Rectangle methodsFor: 'testing'!
+
+myAreasOutside: a
+ | ans |
+ ans := self areasOutside: a.
+ ans := ans asSortedCollection: [ :x :y | x printString < y printString ].
+ ^ans asArray! !
"Creation methods and printing"
| p1 p2 |
@@ -175,9 +182,9 @@
(A amountToTranslateWithin: C) printNl.
(A intersect: B) printNl.
(D intersect: C) printNl.
- (A areasOutside: B) printNl.
- (D areasOutside: C) printNl.
- (D areasOutside: B) printNl.
+ (A myAreasOutside: B) printNl.
+ (D myAreasOutside: C) printNl.
+ (D myAreasOutside: B) printNl.
(C expandBy: 10) printNl.
(C insetBy: address@hidden) printNl.
(B merge: C) printNl!
Re: [Help-smalltalk] gst 2.1.11 on Debian AMD64, Stefan Schmiedl, 2005/08/28