Context.st
branchjv
changeset 23108 77cd6e1625e1
parent 23107 40173e082cbc
child 25392 c52eeea62763
equal deleted inserted replaced
22910:58b0fbe6734b 23108:77cd6e1625e1
     1 "
     1 "
     2  COPYRIGHT (c) 1988 by Claus Gittinger
     2  COPYRIGHT (c) 1988 by Claus Gittinger
       
     3  COPYRIGHT (c) 2009-2011 Jan Vrany
       
     4  COPYRIGHT (c) 2015-2017 Jan Vrany
     3 	      All Rights Reserved
     5 	      All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
     6  only in accordance with the terms of that license and with the
     8  only in accordance with the terms of that license and with the
     7  inclusion of the above copyright notice.   This software may not
     9  inclusion of the above copyright notice.   This software may not
    24 !Context class methodsFor:'documentation'!
    26 !Context class methodsFor:'documentation'!
    25 
    27 
    26 copyright
    28 copyright
    27 "
    29 "
    28  COPYRIGHT (c) 1988 by Claus Gittinger
    30  COPYRIGHT (c) 1988 by Claus Gittinger
       
    31  COPYRIGHT (c) 2009-2011 Jan Vrany
       
    32  COPYRIGHT (c) 2015-2017 Jan Vrany
    29 	      All Rights Reserved
    33 	      All Rights Reserved
    30 
    34 
    31  This software is furnished under a license and may be used
    35  This software is furnished under a license and may be used
    32  only in accordance with the terms of that license and with the
    36  only in accordance with the terms of that license and with the
    33  inclusion of the above copyright notice.   This software may not
    37  inclusion of the above copyright notice.   This software may not
   796 	     * this cannot happen
   800 	     * this cannot happen
   797 	     */
   801 	     */
   798 	    __PATCHUPCONTEXT(theContext);
   802 	    __PATCHUPCONTEXT(theContext);
   799 	}
   803 	}
   800 	if (! __isNonLIFO(theContext)) {
   804 	if (! __isNonLIFO(theContext)) {
   801 	    /*
       
   802 	     * to be prepared for the worst situation
       
   803 	     * (the sender is not stored, so the trap won't catch it)
       
   804 	     * make the writeBarrier trigger manually.
       
   805 	     * We'll see, if this is really required.
       
   806 	     */
       
   807 	    theContext->o_space |= CATCHMARK;
       
   808 	    __markNonLIFO(theContext);
   805 	    __markNonLIFO(theContext);
   809 	}
   806 	}
   810     }
   807     }
   811     RETURN (theContext);
   808     RETURN (theContext);
   812 #endif
   809 #endif
  2306     while (__isNonNilObject(theContext)) {
  2303     while (__isNonNilObject(theContext)) {
  2307 	if ((INT)(__ContextInstPtr(theContext)->c_flags) & __MASKSMALLINT(__HANDLE_MARK|__RAISE_MARK)) {
  2304 	if ((INT)(__ContextInstPtr(theContext)->c_flags) & __MASKSMALLINT(__HANDLE_MARK|__RAISE_MARK)) {
  2308 	    if (__isLazy(theContext)) {
  2305 	    if (__isLazy(theContext)) {
  2309 		__PATCHUPCONTEXT(theContext);
  2306 		__PATCHUPCONTEXT(theContext);
  2310 	    }
  2307 	    }
  2311 
       
  2312 	    if (! __isNonLIFO(theContext)) {
       
  2313 		/*
       
  2314 		 * to be prepared for the worst situation
       
  2315 		 * (the sender is not stored, so the trap won't catch it)
       
  2316 		 * make the writeBarrier trigger manually.
       
  2317 		 * We'll see, if this is really required.
       
  2318 		 */
       
  2319 		theContext->o_space |= CATCHMARK;
       
  2320 # if 0
       
  2321 		__markNonLIFO(theContext);
       
  2322 # endif
       
  2323 	    }
       
  2324 	    RETURN (theContext);
  2308 	    RETURN (theContext);
  2325 	}
  2309 	}
  2326 	theContext = __ContextInstPtr(theContext)->c_sender;
  2310 	theContext = __ContextInstPtr(theContext)->c_sender;
  2327     }
  2311     }
  2328 #endif /* not SCHTEAM */
  2312 #endif /* not SCHTEAM */
  2404 	 || ((selector2 != nil) && (sel == selector2))
  2388 	 || ((selector2 != nil) && (sel == selector2))
  2405 	 || ((selector3 != nil) && (sel == selector3))) {
  2389 	 || ((selector3 != nil) && (sel == selector3))) {
  2406 	    if (__isLazy(theContext)) {
  2390 	    if (__isLazy(theContext)) {
  2407 		__PATCHUPCONTEXT(theContext);
  2391 		__PATCHUPCONTEXT(theContext);
  2408 	    }
  2392 	    }
  2409 
       
  2410 	    if (! __isNonLIFO(theContext)) {
       
  2411 		/*
       
  2412 		 * to be prepared for the worst situation
       
  2413 		 * (the sender is not stored, so the trap won't catch it)
       
  2414 		 * make the writeBarrier trigger manually.
       
  2415 		 * We'll see, if this is really required.
       
  2416 		 */
       
  2417 		theContext->o_space |= CATCHMARK;
       
  2418 		__markNonLIFO(theContext);
       
  2419 	    }
       
  2420 	    RETURN (theContext);
  2393 	    RETURN (theContext);
  2421 	}
  2394 	}
  2422 	theContext = __ContextInstPtr(theContext)->c_sender;
  2395 	theContext = __ContextInstPtr(theContext)->c_sender;
  2423     }
  2396     }
  2424     RETURN (nil);
  2397     RETURN (nil);
  2489     while (__isNonNilObject(theContext)) {
  2462     while (__isNonNilObject(theContext)) {
  2490 	if ((theContext == aContext)
  2463 	if ((theContext == aContext)
  2491 	 || ((INT)(__ContextInstPtr(theContext)->c_flags) & __MASKSMALLINT(__UNWIND_MARK))) {
  2464 	 || ((INT)(__ContextInstPtr(theContext)->c_flags) & __MASKSMALLINT(__UNWIND_MARK))) {
  2492 	    if (__isLazy(theContext)) {
  2465 	    if (__isLazy(theContext)) {
  2493 		__PATCHUPCONTEXT(theContext);
  2466 		__PATCHUPCONTEXT(theContext);
  2494 	    }
       
  2495 	    if (! __isNonLIFO(theContext)) {
       
  2496 		/*
       
  2497 		 * to be prepared for the worst situation
       
  2498 		 * (the sender is not stored, so the trap won't catch it)
       
  2499 		 * make the writeBarrier trigger manually.
       
  2500 		 * We'll see, if this is really required.
       
  2501 		 */
       
  2502 		theContext->o_space |= CATCHMARK;
       
  2503 # if 0
       
  2504 		__markNonLIFO(theContext);
       
  2505 # endif
       
  2506 	    }
  2467 	    }
  2507 	    RETURN (theContext);
  2468 	    RETURN (theContext);
  2508 	}
  2469 	}
  2509 	theContext = __ContextInstPtr(theContext)->c_sender;
  2470 	theContext = __ContextInstPtr(theContext)->c_sender;
  2510     }
  2471     }
  2572     theContext = __INST(sender_);
  2533     theContext = __INST(sender_);
  2573     while (__isNonNilObject(theContext)) {
  2534     while (__isNonNilObject(theContext)) {
  2574 	if ((INT)(__ContextInstPtr(theContext)->c_flags) & mask) {
  2535 	if ((INT)(__ContextInstPtr(theContext)->c_flags) & mask) {
  2575 	    if (__isLazy(theContext)) {
  2536 	    if (__isLazy(theContext)) {
  2576 		__PATCHUPCONTEXT(theContext);
  2537 		__PATCHUPCONTEXT(theContext);
  2577 	    }
       
  2578 
       
  2579 	    if (! __isNonLIFO(theContext)) {
       
  2580 		/*
       
  2581 		 * to be prepared for the worst situation
       
  2582 		 * (the sender is not stored, so the trap won't catch it)
       
  2583 		 * make the writeBarrier trigger manually.
       
  2584 		 * We'll see, if this is really required.
       
  2585 		 */
       
  2586 		theContext->o_space |= CATCHMARK;
       
  2587 # if 0
       
  2588 		__markNonLIFO(theContext);
       
  2589 # endif
       
  2590 	    }
  2538 	    }
  2591 	    RETURN (theContext);
  2539 	    RETURN (theContext);
  2592 	}
  2540 	}
  2593 	theContext = __ContextInstPtr(theContext)->c_sender;
  2541 	theContext = __ContextInstPtr(theContext)->c_sender;
  2594     }
  2542     }