Changeset 12837
- Timestamp:
- Sep 14, 2009, 11:47:46 AM (15 years ago)
- Location:
- trunk/source
- Files:
-
- 4 edited
-
level-0/X86/X8632/x8632-utils.lisp (modified) (1 diff)
-
level-0/X86/x86-utils.lisp (modified) (1 diff)
-
lib/misc.lisp (modified) (1 diff)
-
lisp-kernel/x86-exceptions.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-0/X86/X8632/x8632-utils.lisp
r12797 r12837 402 402 (single-value-return)) 403 403 404 (defx8632lapfunction %unwatch ((watched arg_ z))405 (check-nargs 1)404 (defx8632lapfunction %unwatch ((watched arg_y) (new arg_z)) 405 (check-nargs 2) 406 406 (movl ($ arch::watch-trap-function-unwatch) (%l imm0)) 407 407 (uuo-watch-trap) 408 (movl ($ nil) (%l arg_z))409 408 (single-value-return)) 410 409 -
trunk/source/level-0/X86/x86-utils.lisp
r12790 r12837 455 455 (single-value-return)) 456 456 457 (defx86lapfunction %unwatch ((watched arg_ z))458 (check-nargs 1)457 (defx86lapfunction %unwatch ((watched arg_y) (new arg_z)) 458 (check-nargs 2) 459 459 (movl ($ arch::watch-trap-function-unwatch) (%l imm0)) 460 460 (uuo-watch-trap) 461 (movl ($ nil) (%l arg_z))462 461 (single-value-return)) 463 462 -
trunk/source/lib/misc.lisp
r12794 r12837 1060 1060 ;; list while %map-areas iterates over it, but I 1061 1061 ;; think we'll get away with it. 1062 ( %unwatch thing)1063 (return-from unwatch)))1062 (let ((new (%alloc-misc (uvsize thing) (typecode thing)))) 1063 (return-from unwatch (%unwatch thing new))))) 1064 1064 area-watched area-watched)) 1065 1065 -
trunk/source/lisp-kernel/x86-exceptions.c
r12827 r12837 3707 3707 watch_object(TCR *tcr, signed_natural param) 3708 3708 { 3709 TCR *other_tcr;3710 3709 LispObj uvector = (LispObj)param; 3711 3710 LispObj *noderef = (LispObj *)untag(uvector); … … 3730 3729 } 3731 3730 3731 /* 3732 * We expect the watched object in arg_y, and the new uninitialized 3733 * object (which is just zeroed) in arg_z. 3734 */ 3732 3735 signed_natural 3733 3736 unwatch_object(TCR *tcr, signed_natural param) 3734 3737 { 3735 TCR *other_tcr;3736 LispObj uvector = (LispObj)param;3737 LispObj *noderef = (LispObj *)untag(uvector);3738 LispObj old = uvector;3739 LispObj new;3740 natural size = uvector_total_size_in_bytes(noderef);3741 area *a = area_containing((BytePtr)noderef);3742 3738 ExceptionInformation *xp = tcr->xframe->curr; 3739 LispObj old = xpGPR(xp, Iarg_y); 3740 LispObj new = xpGPR(xp, Iarg_z); 3741 LispObj *oldnode = (LispObj *)untag(old); 3742 LispObj *newnode = (LispObj *)untag(new); 3743 area *a = area_containing((BytePtr)old); 3743 3744 3744 3745 if (a && a->code == AREA_WATCHED) { 3745 update_bytes_allocated(tcr, (void *)tcr->save_allocptr); 3746 if (allocate_object(xp, size, size - fulltag_misc, tcr)) { 3747 new = (LispObj)tcr->save_allocptr; 3748 tcr->save_allocptr -= fulltag_misc; 3749 } else { 3750 lisp_allocation_failure(xp, tcr, size); 3751 } 3752 3753 memcpy(tcr->save_allocptr, noderef, size); 3746 natural size = uvector_total_size_in_bytes(oldnode); 3747 3748 memcpy(newnode, oldnode, size); 3754 3749 delete_watched_area(a, tcr); 3755 3750 wp_update_references(tcr, old, new); 3751 /* because wp_update_references doesn't update refbits */ 3752 tenure_to_area(tenured_area); 3756 3753 check_all_areas(tcr); 3754 xpGPR(xp, Iarg_z) = new; 3757 3755 } 3758 3756 return 0; … … 3770 3768 break; 3771 3769 case WATCH_TRAP_FUNCTION_UNWATCH: 3772 gc_like_from_xp(xp, unwatch_object, uvector);3770 gc_like_from_xp(xp, unwatch_object, 0); 3773 3771 break; 3774 3772 default:
Note:
See TracChangeset
for help on using the changeset viewer.
