Hi,
Also FWIW, I have a few more obvious nits that are needed to get SVN
-r397 to build. I think the object/boot/configure patch in this one
is a better approach, as -pthread needs to be added to the GCC flags
for compiling as well as linking to do the right thing.
--
Michael FIG <[EMAIL PROTECTED]> //\
http://michael.fig.org/ \//
Build environment enhancements.
diff -r 796e7ba8aa58 function/examples/cairo/Makefile
--- a/function/examples/cairo/Makefile Mon Mar 03 20:16:46 2008 -0600
+++ b/function/examples/cairo/Makefile Tue Mar 11 02:30:35 2008 -0600
@@ -1,10 +1,11 @@ JOLT = ../../jolt-burg/main
JOLT = ../../jolt-burg/main
+CAIROINC = $(patsubst %,-J%,$(wildcard /usr/include/cairo) $(wildcard /usr/local/include/cairo))
test : cairolib.so .FORCE
$(JOLT) boot.k main.k
cairolib.so : cairolib.st
- idc -J/usr/local/include/cairo -I../../objects -s $<
+ idc $(CAIROINC) -I../../objects -s $<
clean : .FORCE
rm -f *~ *.so *.o
diff -r 796e7ba8aa58 function/examples/jcanvas/Makefile
--- a/function/examples/jcanvas/Makefile Mon Mar 03 20:16:46 2008 -0600
+++ b/function/examples/jcanvas/Makefile Tue Mar 11 02:30:35 2008 -0600
@@ -1,10 +1,11 @@ JOLT = ../../jolt-burg/main
JOLT = ../../jolt-burg/main
+CAIROINC = $(patsubst %,-J%,$(wildcard /usr/include/cairo) $(wildcard /usr/local/include/cairo))
test : _cairo.so cairo.so .FORCE
$(JOLT) boot.k main.k
IDC = ../idc -O
-IDFLAGS = -g -k -I../../objects -J/usr/local/include/cairo
+IDFLAGS = -g -k -I../../objects $(CAIROINC)
%.so : %.st
$(IDC) $(IDFLAGS) -s $< -o $@
diff -r 796e7ba8aa58 function/jolt-burg/Makefile
--- a/function/jolt-burg/Makefile Mon Mar 03 20:16:46 2008 -0600
+++ b/function/jolt-burg/Makefile Tue Mar 11 02:30:35 2008 -0600
@@ -58,7 +58,7 @@ tidy : .FORCE
-rm -f *.o *.d *~ .gdb* *.stackdump *.o.c main.c
clean : tidy
- -rm -f $(FILES) jolt.a main$(OBJEXT) CodeGenerator-local.st
+ -rm -f $(FILES) jolt.a main$(OBJEXT) main.sysgc$(OBJEXT) CodeGenerator-local.st
-rm -f bench-id bench-c
distclean spotless : clean
diff -r 796e7ba8aa58 function/objects/ProfiledMethod.st
--- a/function/objects/ProfiledMethod.st Mon Mar 03 20:16:46 2008 -0600
+++ b/function/objects/ProfiledMethod.st Tue Mar 11 02:30:35 2008 -0600
@@ -7,14 +7,16 @@ ProfiledMethod : Object ( _method count
ProfiledMethod new
{
- oop clone= (oop)malloc(sizeof(oop) + sizeof(*self)) + 1;
+ void *mem= malloc(sizeof(oop) + sizeof(*self));
+ oop clone= &((oop *)memory)[1];
clone->_vtable[-1]= self->_vtable[-1];
_return(clone);
}
ProfiledMethod delete
{
- free(v_self - 1);
+ void *mem= &((oop *)v_self)[-1];
+ free(mem);
}
ProfiledMethod release
@@ -118,7 +120,7 @@ StaticBlockClosure statisticalProfile
StaticBlockClosure statisticalProfile
[
| methods |
- self perform: #profilerTick every: 0.01.
+ self perform: #profilerTick every: "0.01" 0.5.
self value.
self perform: nil every: 0.
methods := ProfiledMethods.
@@ -129,7 +131,7 @@ Object profilerTick
Object profilerTick
[
| _mi mi |
- { if (!(v__mi= _libid->methodAt(1))) { _return(0); } }.
+ { printf("tick!\n"); if (!(v__mi= _libid->methodAt(1))) { _return(0); } }.
mi := ProfiledMethod withMethod_: _mi.
mi increment.
]
diff -r 796e7ba8aa58 object/boot/configure
--- a/object/boot/configure Mon Mar 03 20:16:46 2008 -0600
+++ b/object/boot/configure Tue Mar 11 02:30:35 2008 -0600
@@ -80,7 +80,7 @@ done
TARGET="${TARGET:-`sh ./boot/config.guess`}"
-GCDIR=${GCDIR:-"gc-7.0"}
+GCDIR=${GCDIR:-"gc6.7"}
ppc () {
OFLAGS=${OFLAGS:-"-O"}
@@ -174,7 +174,7 @@ linux () {
linux () {
CC=${CC:-"cc"}
PREFIX=${PREFIX:-"/usr/local/lib/idc/$TARGET/"}
- CFLAGS=${CFLAGS:-"-g -Wall -Wreturn-type -Werror -D_GNU_SOURCE=1 -Wno-unused-value"}
+ CFLAGS=${CFLAGS:-"-g -Wall -Wreturn-type -Werror -D_GNU_SOURCE=1 -Wno-unused-value -pthread"}
LDFLAGS=${LDFLAGS:-"-export-dynamic"}
LDLIBS=${LDLIBS:-"-ldl -lm"}
CCFLAGS_O=${CCFLAGS_O:-"-c"}
diff -r 796e7ba8aa58 object/examples/Makefile
--- a/object/examples/Makefile Mon Mar 03 20:16:46 2008 -0600
+++ b/object/examples/Makefile Tue Mar 11 02:30:35 2008 -0600
@@ -14,7 +14,7 @@ clean : .FORCE
rm -f *~
-$(SHELL) -ec 'for dir in $(SUBDIRS); do ( cd $$dir; $(MAKE) clean ); done'
-spotless : .FORCE
+distclean spotless : .FORCE
rm -f *~
-$(SHELL) -ec 'for dir in $(SUBDIRS); do ( cd $$dir; $(MAKE) spotless ); done'
diff -r 796e7ba8aa58 object/examples/ignore/Makefile
--- a/object/examples/ignore/Makefile Mon Mar 03 20:16:46 2008 -0600
+++ b/object/examples/ignore/Makefile Tue Mar 11 02:30:35 2008 -0600
@@ -5,7 +5,7 @@ all : $(PROGRAM)
all : $(PROGRAM)
run : all
- ./$(PROGRAM)
+ -./$(PROGRAM)
% : %.st
$(IDC) $<
diff -r 796e7ba8aa58 object/examples/x11/Makefile
--- a/object/examples/x11/Makefile Mon Mar 03 20:16:46 2008 -0600
+++ b/object/examples/x11/Makefile Tue Mar 11 02:30:35 2008 -0600
@@ -23,6 +23,6 @@ clean : tidy .FORCE
clean : tidy .FORCE
rm -f $(PROGRAM) $(LIBS) *.exe
-spotless : clean .FORCE
+distclean spotless : clean .FORCE
.FORCE :
diff -r 796e7ba8aa58 object/st80/BlockClosure.st
--- a/object/st80/BlockClosure.st Mon Mar 03 20:16:46 2008 -0600
+++ b/object/st80/BlockClosure.st Tue Mar 11 02:30:35 2008 -0600
@@ -30,9 +30,7 @@ StaticBlockClosure function_: _implement
StaticBlockClosure function_: _implementationAddress arity_: _argumentCount
[
{
-# ifndef STAGE1
v_stateful_self=
-# endif
v_self= _libid->alloc(v_self, sizeof(*self));
}.
_arity := _argumentCount.
@@ -127,9 +125,7 @@ BlockClosure function_: _implementationA
outer: outerBlock state: variableArray nlr_: _dynamicEnvironment
[
{
-# ifndef STAGE1
v_stateful_self=
-# endif
v_self= _libid->alloc(v_self, sizeof(*self));
}.
_function := _implementationAddress.
diff -r 796e7ba8aa58 object/st80/Object.st
--- a/object/st80/Object.st Mon Mar 03 20:16:46 2008 -0600
+++ b/object/st80/Object.st Tue Mar 11 02:30:35 2008 -0600
@@ -79,9 +79,7 @@ StaticBlockClosure function_: _implement
StaticBlockClosure function_: _implementationAddress arity_: _argumentCount
[
{
-# ifndef STAGE1
v_stateful_self=
-# endif
v_self= _libid->alloc(v_self, sizeof(*self));
}.
_arity := _argumentCount.
@@ -92,9 +90,7 @@ BlockClosure function_: _implementationA
outer: outerBlock state: variableArray nlr_: _dynamicEnvironment
[
{
-# ifndef STAGE1
v_stateful_self=
-# endif
v_self= _libid->alloc(v_self, sizeof(*self));
}.
_function := _implementationAddress.
diff -r 796e7ba8aa58 object/st80/_object.st
--- a/object/st80/_object.st Mon Mar 03 20:16:46 2008 -0600
+++ b/object/st80/_object.st Tue Mar 11 02:30:35 2008 -0600
@@ -82,9 +82,7 @@ _selector _string
_vector new_: _newSize
{
-#ifndef STAGE1
v_stateful_self=
-#endif
v_self= _libid->alloc(v_self, sizeof(struct t__vector) + sizeof(oop) * (size_t)v__newSize);
((struct t__vector *)v_self)->v__size= v__newSize;
}
diff -r 796e7ba8aa58 object/st80/perform.st
--- a/object/st80/perform.st Mon Mar 03 20:16:46 2008 -0600
+++ b/object/st80/perform.st Tue Mar 11 02:30:35 2008 -0600
@@ -56,11 +56,7 @@ Object _perform: s
#else
# define V_SEND v__closure
#endif
-#ifdef STAGE1
-# define V_SELF v_self
-#else
-# define V_SELF v_self, v_self
-#endif
+#define V_SELF v_stateful_self, v_self
struct __closure *c= _libid->bind(v_s, v_self);
return (c->method)(V_SEND, V_SELF);
}
_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc