rev 708 - in trunk: . include/prothon modules/Prosist src
SVN User <[email protected]> Mon, 05 Jul 2004 22:24:22 -0400
| Newsgroups | gmane.comp.lang.prothon.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: mark
Date: 2004-07-05 22:24:19 -0400 (Mon, 05 Jul 2004)
New Revision: 708
Modified:
trunk/CHANGES.txt
trunk/include/prothon/prothon.h
trunk/modules/Prosist/Prosist.c
trunk/src/interp.c
trunk/src/main.c
trunk/src/memory_mgr.c
trunk/src/object.c
Log:
*** release build 708 ***
fixed bug in copy_object
Modified: trunk/CHANGES.txt
===================================================================
--- trunk/CHANGES.txt 2004-07-05 23:49:20 UTC (rev 707)
+++ trunk/CHANGES.txt 2004-07-06 02:24:19 UTC (rev 708)
@@ -1,7 +1,7 @@
----- Prothon Release History ----
-Version 0.1.2 - Build 707 - 7/05/04
+Version 0.1.2 - Build 708 - 7/05/04
- print is now a function, not a keyword
- function-as-command feature allows print to be used without parens
- Added prop keyword and properties feature with wildcards
Modified: trunk/include/prothon/prothon.h
===================================================================
--- trunk/include/prothon/prothon.h 2004-07-05 23:49:20 UTC (rev 707)
+++ trunk/include/prothon/prothon.h 2004-07-06 02:24:19 UTC (rev 708)
@@ -81,7 +81,7 @@
#endif
#define PROTHON_VERSION_NUMBER "0.1"
-#define PROTHON_VERSION_BUILD "$Rev: 707$"
+#define PROTHON_VERSION_BUILD "$Rev: 708$"
#define PROTHON_VERSION_DATE __DATE__
#ifndef FALSE
@@ -235,10 +235,9 @@
u8_t has_attrs :1;
u8_t unclonable :1;
u8_t immutable :1;
- u8_t lock_kywrd :1;
u8_t del_locked :1;
- u8_t rdlock_cnt :6;
- u8_t wrlock_req_cnt :6;
+ u8_t rdlock_cnt :7;
+ u8_t wrlock_req_cnt :7;
i32_t wrlock;
attr_proto_t attr_proto;
obj_data_t data;
Modified: trunk/modules/Prosist/Prosist.c
===================================================================
--- trunk/modules/Prosist/Prosist.c 2004-07-05 23:49:20 UTC (rev 707)
+++ trunk/modules/Prosist/Prosist.c 2004-07-06 02:24:19 UTC (rev 708)
@@ -494,7 +494,8 @@
if (obj->data_type == DATA_TYPE_DATAPTR && obj->data.ptr) {
pr_free(obj->data.ptr);
}
- memcpy(obj, res, sizeof(*obj)-sizeof(obj->next_obj));
+ memcpy(obj, res, sizeof(*obj)-2*sizeof(obj->next_obj));
+ obj->data = res->data;
read_lock(ist, obj);
}
}
Modified: trunk/src/interp.c
===================================================================
--- trunk/src/interp.c 2004-07-05 23:49:20 UTC (rev 707)
+++ trunk/src/interp.c 2004-07-06 02:24:19 UTC (rev 708)
@@ -900,7 +900,7 @@
exc_exc_loc = p->exc_loc;
}
while(TRUE){
- if (debug_obj && !is_del_locked(debug_obj))
+ if (debug_obj && (debug_obj->next_obj == debug_obj))
raise_exception(ist, OBJ(INTERPRETER_EXC), "DEBUG FAILURE");
while (have_exstk && (fr_pc <= exc_try_loc || fr_pc >= exc_exc_loc)) {
if (exc_final && fr_pc != exc_exc_loc) {
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2004-07-05 23:49:20 UTC (rev 707)
+++ trunk/src/main.c 2004-07-06 02:24:19 UTC (rev 708)
@@ -221,7 +221,7 @@
#ifdef DUMP_OBJECTS_AT_END
if (dump_objects_at_end)
- dump(ist, "object-dump.txt", OBJ(ROOT_GLOBALS));
+ dump(ist, "!object-dump.txt", OBJ(ROOT_GLOBALS));
#endif
return 0;
@@ -229,7 +229,5 @@
// common exit point for debug breakpoints
void pr_exit(int n){
-
-
exit(n);
}
Modified: trunk/src/memory_mgr.c
===================================================================
--- trunk/src/memory_mgr.c 2004-07-05 23:49:20 UTC (rev 707)
+++ trunk/src/memory_mgr.c 2004-07-06 02:24:19 UTC (rev 708)
@@ -167,7 +167,10 @@
obj=obj_list_root;
pr_unlock(&object_list_lock);
while(obj && !mem_mgr_req_termination) {
- pr_assert(obj != obj->next_obj);
+ if (obj == obj->next_obj) {
+ dump(ist, "!mm-obj-dump.txt", obj);
+ pr_assert(FALSE);
+ }
mm_write_lock(ist, obj);
obj->state = OBJ_STATE_UNMARKED;
obj->scanned = FALSE;
@@ -196,7 +199,10 @@
while(TRUE && !mem_mgr_req_termination) {
obj_p val;
obj_count++;
- pr_assert(obj != obj->next_obj);
+ if (obj == obj->next_obj) {
+ dump(ist, "!mm-obj-dump.txt", obj);
+ pr_assert(FALSE);
+ }
mm_read_lock(ist, obj);
if (obj->has_attrs) {
int i;
@@ -304,7 +310,10 @@
pr_unlock(&object_list_lock);
last_obj = NULL;
while(obj && !mem_mgr_req_termination) {
- pr_assert(obj != obj->next_obj);
+ if (obj == obj->next_obj) {
+ dump(ist, "!mm-obj-dump.txt", obj);
+ pr_assert(FALSE);
+ }
obj_count++;
if (obj->state != OBJ_STATE_NEW_OR_MARKED && !obj->del_locked) {
delete_notify(ist, obj);
Modified: trunk/src/object.c
===================================================================
--- trunk/src/object.c 2004-07-05 23:49:20 UTC (rev 707)
+++ trunk/src/object.c 2004-07-06 02:24:19 UTC (rev 708)
@@ -289,6 +289,8 @@
//********************************* new_object ********************************
obj_p new_object(isp ist, obj_p proto){
obj_p obj = pr_malloc(sizeof(obj_t));
+ if (obj == (obj_p) 0xa192f0)
+ memset(obj, 0, sizeof(obj_t));
memset(obj, 0, sizeof(obj_t));
if (!proto) proto = OBJ(OBJECT);
obj->rd_access = ACC_GUEST;
@@ -314,7 +316,8 @@
wrlock_rtrn(obj);
if_wrlock(copy) { write_unlock(ist, obj); return; }
wrlock_req_cnt = copy->wrlock_req_cnt;
- memcpy(copy, obj, sizeof(*obj)-sizeof(obj->next_obj));
+ memcpy(copy, obj, sizeof(*obj)-2*sizeof(obj->next_obj));
+ copy->data = obj->data;
copy->wrlock_req_cnt = wrlock_req_cnt;
if (obj->has_attrs) {
size_t size;
@@ -333,7 +336,8 @@
obj_p copy;
attr_p new_attrp, attrp;
copy = NEW_OBJ(NULL);
- memcpy(copy, obj, sizeof(*obj)-sizeof(obj->next_obj));
+ memcpy(copy, obj, sizeof(*obj)-2*sizeof(obj->next_obj));
+ copy->data = obj->data;
copy->archived = FALSE;
copy->del_locked = TRUE;
copy->rdlock_cnt = 0;