rev 363 - in trunk: . include include/prothon modules/File modules/OS modules/Prosist modules/Re modules/SQLite src

SVN User <[email protected]>
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-04-15 18:07:03 -0400 (Thu, 15 Apr 2004)
New Revision: 363

Modified:
   trunk/
   trunk/STATUS.txt
   trunk/include/
   trunk/include/prothon/prothon.h
   trunk/include/prothon/prothon_dll.h
   trunk/modules/File/
   trunk/modules/File/File.c
   trunk/modules/OS/
   trunk/modules/OS/OS.c
   trunk/modules/Prosist/
   trunk/modules/Prosist/Prosist.c
   trunk/modules/Re/
   trunk/modules/Re/Re.c
   trunk/modules/SQLite/
   trunk/modules/SQLite/SQLite.c
   trunk/src/
   trunk/src/builtins-core.c
   trunk/src/builtins-dict.c
   trunk/src/builtins-float.c
   trunk/src/builtins-int.c
   trunk/src/builtins-list.c
   trunk/src/builtins-string.c
   trunk/src/builtins-thread.c
   trunk/src/builtins-tuple.c
   trunk/src/interp.h
   trunk/src/object.c
Log:
exceptions checked during module loading now


Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
   - config.log
config.cache
config.status
Makefile
prothon.ncb
prothon.sln
prothon.suo
bison_prothon.bat.lnk
apr
Rules.mk
libtool
Shortcut to rel.bat.lnk
Shortcut to prothon.exe.lnk
mro.py
release-checklist.txt

   + config.log
config.cache
config.status
Makefile
prothon.ncb
prothon.sln
prothon.suo
bison_prothon.bat.lnk
apr
Rules.mk
libtool
Shortcut to rel.bat.lnk
Shortcut to prothon.exe.lnk
mro.py
release-checklist.txt
apr
bin
links
posts
release
SQLiteC
www
release


Modified: trunk/STATUS.txt
===================================================================
--- trunk/STATUS.txt	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/STATUS.txt	2004-04-15 22:07:03 UTC (rev 363)
@@ -6,8 +6,6 @@
 --- add support for APR_BINARY in File.c ('b' flag)
 --- support any object that supports file methods in stdxxx (duck std)
 
---- catch exceptions during module loading
-
 --- help() in interactive console()
 
 --- -d -m -l cmd-line options missing


Property changes on: trunk/include
___________________________________________________________________
Name: svn:ignore
   - config.h
regex

   + config.h
regex
mutex.h
regex


Modified: trunk/include/prothon/prothon.h
===================================================================
--- trunk/include/prothon/prothon.h	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/include/prothon/prothon.h	2004-04-15 22:07:03 UTC (rev 363)
@@ -872,6 +872,9 @@
 // example usage:   call_func(...); if_exc_return NULL;
 #define if_exc_return	if(ist && ist->exception_obj) return
 
+// CHECK_EXCEPTIONS: print exception stack to stdout and remove exception
+obj_p check_exceptions(isp ist);
+
 //***************** LOW-LEVEL OBJECT ACCESS FUNCTIONS **************************
 
 // OBJ_MALLOC_RL, OBJ_REALLOC, & OBJ_FREE:  Memory allocation for objects.

Modified: trunk/include/prothon/prothon_dll.h
===================================================================
--- trunk/include/prothon/prothon_dll.h	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/include/prothon/prothon_dll.h	2004-04-15 22:07:03 UTC (rev 363)
@@ -99,6 +99,7 @@
 	obj_p		(*new_object)(isp ist, obj_p proto);
 	void		(*add_doc_to_obj)(isp ist, obj_p obj, char* str);
 	obj_p	    (*dict_keys_values)(isp ist, obj_p dict_obj, int key_flg);
+	obj_p		(*check_exceptions)(isp ist);
 
 	void*		(*pr_malloc)(size_t nbytes);
 	void*		(*pr_realloc)(void *p, size_t nbytes);
@@ -177,22 +178,28 @@
 		 name##_OBJ);								\
 	set_attr(ist, OBJ(OBJECT), sym(ist, #name),		\
 		 name##_OBJ);								\
+	check_exceptions(ist);							\
 } while(0)
 
 #define MODULE_ADD_TO_OBJ(name, obj, __sym)				\
 do {													\
 	set_attr(ist, obj, sym(ist, __sym), name##_OBJ);	\
+	check_exceptions(ist);								\
 } while(0)
 
-#define MODULE_SUB_INIT(name) \
-	name##_initialize_module()
+#define MODULE_SUB_INIT(name)	\
+	name##_initialize_module();	\
+	check_exceptions(ist);
 
 #define MODULE_ADD_SYM(name, __sym) \
-	name##__sym##init()
+	name##__sym##init();			\
+	check_exceptions(ist);
 
-#define MODULE_SET_DOC(name, docstr) \
-	add_doc_to_obj(ist, name##_OBJ, #name ": " docstr)
 
+#define MODULE_SET_DOC(name, docstr)					\
+	add_doc_to_obj(ist, name##_OBJ, #name ": " docstr);	\
+	check_exceptions(ist);
+
 #ifndef OBJECT_H
 
 #define get_ist				(*services->get_ist)
@@ -246,6 +253,7 @@
 #define clr_immutable		(*services->clr_immutable)	
 #define get_pr_head_pool	(*services->get_pr_head_pool)
 #define dict_keys_values	(*services->dict_keys_values)
+#define check_exceptions	(*services->check_exceptions)
 #define set_obj_rdacc		(*services->set_obj_rdacc)
 #define set_obj_wracc		(*services->set_obj_wracc)
 #define get_obj_rdacc		(*services->get_obj_rdacc)


Property changes on: trunk/modules/File
___________________________________________________________________
Name: svn:ignore
   - *.so
*.o
*.lo
*.la
.libs
Makefile

   + *.so
*.o
*.lo
*.la
.libs
Makefile
Release
Debug


Modified: trunk/modules/File/File.c
===================================================================
--- trunk/modules/File/File.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/modules/File/File.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -783,4 +783,6 @@
 		set_attr(ist, File_OBJ, sym(ist, "stdout"), file_obj);
 	if ((file_obj = __open_std_file(__STDERR, std_pool)))
 		set_attr(ist, File_OBJ, sym(ist, "stderr"), file_obj);
+
+	check_exceptions(ist);
 }


Property changes on: trunk/modules/OS
___________________________________________________________________
Name: svn:ignore
   - .libs
Makefile

   + .libs
Makefile
Debug


Modified: trunk/modules/OS/OS.c
===================================================================
--- trunk/modules/OS/OS.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/modules/OS/OS.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -80,4 +80,6 @@
 {
 	MODULE_SUB_INIT(OS);
 	MODULE_ADD_SYM(OS, system);
+
+	check_exceptions(ist);
 }


Property changes on: trunk/modules/Prosist
___________________________________________________________________
Name: svn:ignore
   - .libs
Makefile

   + .libs
Makefile
Release
Debug


Modified: trunk/modules/Prosist/Prosist.c
===================================================================
--- trunk/modules/Prosist/Prosist.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/modules/Prosist/Prosist.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -214,4 +214,6 @@
 	MODULE_ADD_SYM(DB, commit);
 	MODULE_ADD_SYM(DB, close);
 	MODULE_ADD_SYM(DB, closed_QUES);
+
+	check_exceptions(ist);
 }


Property changes on: trunk/modules/Re
___________________________________________________________________
Name: svn:ignore
   - *.so
*.o
*.lo
*.la
.libs
Makefile

   + *.so
*.o
*.lo
*.la
.libs
Makefile
Release
Debug


Modified: trunk/modules/Re/Re.c
===================================================================
--- trunk/modules/Re/Re.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/modules/Re/Re.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -680,4 +680,6 @@
 	MODULE_ADD_SYM(ReMatch, group);
 	MODULE_ADD_SYM(ReMatch, groups);
 	MODULE_ADD_SYM(ReMatch, __objList__);
+
+	check_exceptions(ist);
 }


Property changes on: trunk/modules/SQLite
___________________________________________________________________
Name: svn:ignore
   - .libs
Makefile

   + .libs
Makefile
Release
Debug


Modified: trunk/modules/SQLite/SQLite.c
===================================================================
--- trunk/modules/SQLite/SQLite.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/modules/SQLite/SQLite.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -291,4 +291,6 @@
 	MODULE_ADD_SYM(Cursor, fetchAll);
 	MODULE_ADD_SYM(Cursor, rowCount);
 	MODULE_ADD_SYM(Cursor, __objList__);
+
+	check_exceptions(ist);
 }


Property changes on: trunk/src
___________________________________________________________________
Name: svn:ignore
   - Makefile
parser.c
prothon
prothon.exe
parser.output
src.vcproj
object-dump.txt
.libs

   + Makefile
parser.c
prothon
prothon.exe
parser.output
src.vcproj
object-dump.txt
.libs
Release
Debug
f_def_dump.txt
Main1_module_dump.txt
PthMod1_module_dump.txt
test.db
_execstr_code.txt
.prothon_history
code_trace.txt


Modified: trunk/src/builtins-core.c
===================================================================
--- trunk/src/builtins-core.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/builtins-core.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -713,4 +713,6 @@
 	MODULE_SUB_INIT(Func);
 	MODULE_ADD_SYM(Func, __cDataLen__);
 	MODULE_ADD_SYM(Func, __objList__);
+
+	check_exceptions(ist);
 }

Modified: trunk/src/builtins-dict.c
===================================================================
--- trunk/src/builtins-dict.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/builtins-dict.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -493,4 +493,6 @@
 
 	MODULE_SUB_INIT(DictGen);
 	MODULE_ADD_SYM(DictGen, next);
+
+	check_exceptions(ist);
 }

Modified: trunk/src/builtins-float.c
===================================================================
--- trunk/src/builtins-float.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/builtins-float.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -386,4 +386,6 @@
 	MODULE_ADD_SYM(Float, __rPow__);
 	MODULE_ADD_SYM(Float, __covers__QUES);
 	MODULE_ADD_SYM(Float, __coerce__);
+
+	check_exceptions(ist);
 }

Modified: trunk/src/builtins-int.c
===================================================================
--- trunk/src/builtins-int.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/builtins-int.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -379,4 +379,6 @@
 
 	MODULE_SUB_INIT(IntGen);
 	MODULE_ADD_SYM(IntGen, next);
+
+	check_exceptions(ist);
 }

Modified: trunk/src/builtins-list.c
===================================================================
--- trunk/src/builtins-list.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/builtins-list.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -740,4 +740,6 @@
 	MODULE_ADD_SYM(List, pop_BANG);
 	MODULE_ADD_SYM(List, reverse_BANG);
 	MODULE_ADD_SYM(List, sort_BANG);
+
+	check_exceptions(ist);
 }

Modified: trunk/src/builtins-string.c
===================================================================
--- trunk/src/builtins-string.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/builtins-string.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -423,4 +423,6 @@
 
 	MODULE_SUB_INIT(StringGen);
 	MODULE_ADD_SYM(StringGen, next);
+
+	check_exceptions(ist);
 }

Modified: trunk/src/builtins-thread.c
===================================================================
--- trunk/src/builtins-thread.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/builtins-thread.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -388,4 +388,6 @@
 	MODULE_ADD_SYM(Mutex, unlock);
 	MODULE_ADD_SYM(Mutex, __del__);
 	MODULE_ADD_SYM(Mutex, __objList__);
+
+	check_exceptions(ist);
 }

Modified: trunk/src/builtins-tuple.c
===================================================================
--- trunk/src/builtins-tuple.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/builtins-tuple.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -346,4 +346,6 @@
 
 	MODULE_SUB_INIT(Tgen);
 	MODULE_ADD_SYM(Tgen, next);
+
+	check_exceptions(ist);
 }

Modified: trunk/src/interp.h
===================================================================
--- trunk/src/interp.h	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/interp.h	2004-04-15 22:07:03 UTC (rev 363)
@@ -64,7 +64,6 @@
 #include <apr_thread_proc.h>
 
 isp get_ist(access_t access);
-obj_p check_exceptions(isp ist);
 
 extern i32_t main_threads_started;
 extern i32_t main_threads_running;

Modified: trunk/src/object.c
===================================================================
--- trunk/src/object.c	2004-04-15 21:47:29 UTC (rev 362)
+++ trunk/src/object.c	2004-04-15 22:07:03 UTC (rev 363)
@@ -177,10 +177,8 @@
 	dll_services.set_obj_wracc	  = set_obj_wracc;
 	dll_services.get_obj_rdacc	  = get_obj_rdacc;
 	dll_services.get_obj_wracc	  = get_obj_wracc;
+	dll_services.check_exceptions = check_exceptions;
 
-
-
-
 	/* Setup the core objects. Order counts here */
 	OBJ(OBJECT)             = new_object(ist, NULL);
 	OBJ(OBJECT)->attr_proto.proto = OBJ(OBJECT);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.