SmallInteger.st
branchjv
changeset 23103 1a0d5755718e
parent 21246 958aa6e341d4
child 23107 40173e082cbc
equal deleted inserted replaced
23102:574962856f04 23103:1a0d5755718e
  3288                 if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil)
  3288                 if (((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil)
  3289 # ifdef PARANOIA
  3289 # ifdef PARANOIA
  3290                  && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))
  3290                  && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))
  3291 # endif
  3291 # endif
  3292                 ) {
  3292                 ) {
  3293 
       
  3294 # ifdef NEW_BLOCK_CALL
       
  3295 
       
  3296 #                   define BLOCK_ARG  aBlock
  3293 #                   define BLOCK_ARG  aBlock
  3297 
       
  3298 # else
       
  3299 
       
  3300 #                   define BLOCK_ARG  rHome
       
  3301                     REGISTER OBJ rHome;
       
  3302 
       
  3303                     /*
       
  3304                      * home on stack - no need to refetch
       
  3305                      */
       
  3306                     rHome = __BlockInstPtr(aBlock)->b_home;
       
  3307                     if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
       
  3308 # endif
       
  3309                     {
  3294                     {
  3310 # ifdef __UNROLL_LOOPS__
  3295 # ifdef __UNROLL_LOOPS__
  3311 
  3296 
  3312                         /*
  3297                         /*
  3313                          * you are not supposed to program like this - I know what I do
  3298                          * you are not supposed to program like this - I know what I do
  3373                 }
  3358                 }
  3374             }
  3359             }
  3375 
  3360 
  3376 #           undef BLOCK_ARG
  3361 #           undef BLOCK_ARG
  3377 
  3362 
  3378 # ifdef NEW_BLOCK_CALL
       
  3379 #           define BLOCK_ARG  aBlock
  3363 #           define BLOCK_ARG  aBlock
  3380 #           define IBLOCK_ARG nil
  3364 #           define IBLOCK_ARG nil
  3381 # else
       
  3382 #           define BLOCK_ARG  (__BlockInstPtr(aBlock)->b_home)
       
  3383 #           define IBLOCK_ARG (__BlockInstPtr(aBlock)->b_home)
       
  3384 # endif
       
  3385 
  3365 
  3386             /*
  3366             /*
  3387              * sorry - must check for the blocks code within the loops;
  3367              * sorry - must check for the blocks code within the loops;
  3388              * it could be recompiled or flushed (in the interrupt)
  3368              * it could be recompiled or flushed (in the interrupt)
  3389              */
  3369              */
  3476 # ifdef PARANOIA
  3456 # ifdef PARANOIA
  3477                  && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))
  3457                  && (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))
  3478 # endif
  3458 # endif
  3479                 ) {
  3459                 ) {
  3480 
  3460 
  3481 # ifdef NEW_BLOCK_CALL
       
  3482 
       
  3483 #                   define BLOCK_ARG  aBlock
  3461 #                   define BLOCK_ARG  aBlock
  3484 
       
  3485 # else
       
  3486 
       
  3487 #                   define BLOCK_ARG  rHome
       
  3488                     REGISTER OBJ rHome;
       
  3489                     rHome = __BlockInstPtr(aBlock)->b_home;
       
  3490                     if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
       
  3491 
       
  3492 # endif
       
  3493                     {
  3462                     {
  3494                         if (step < 0) {
  3463                         if (step < 0) {
  3495                             if (step == -1) {
  3464                             if (step == -1) {
  3496                                 while (tmp >= final) {
  3465                                 while (tmp >= final) {
  3497                                     if (InterruptPending != nil) __interruptL(@line);
  3466                                     if (InterruptPending != nil) __interruptL(@line);
  3530              * it could be recompiled or flushed (in the interrupt)
  3499              * it could be recompiled or flushed (in the interrupt)
  3531              */
  3500              */
  3532 
  3501 
  3533 #           undef BLOCK_ARG
  3502 #           undef BLOCK_ARG
  3534 
  3503 
  3535 # ifdef NEW_BLOCK_CALL
       
  3536 #           define BLOCK_ARG  aBlock
  3504 #           define BLOCK_ARG  aBlock
  3537 #           define IBLOCK_ARG nil
  3505 #           define IBLOCK_ARG nil
  3538 # else
       
  3539 #           define BLOCK_ARG  (__BlockInstPtr(aBlock)->b_home)
       
  3540 #           define IBLOCK_ARG (__BlockInstPtr(aBlock)->b_home)
       
  3541 # endif
       
  3542 
  3506 
  3543             if (step < 0) {
  3507             if (step < 0) {
  3544                 while (tmp >= final) {
  3508                 while (tmp >= final) {
  3545                     REGISTER OBJFUNC codeVal;
  3509                     REGISTER OBJFUNC codeVal;
  3546 
  3510 
  3686                  */
  3650                  */
  3687                 REGISTER OBJFUNC codeVal;
  3651                 REGISTER OBJFUNC codeVal;
  3688 
  3652 
  3689                 if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) {
  3653                 if ((codeVal = __BlockInstPtr(aBlock)->b_code) != (OBJFUNC)nil) {
  3690 
  3654 
  3691 # ifdef NEW_BLOCK_CALL
       
  3692 
       
  3693 #                   define BLOCK_ARG  aBlock
  3655 #                   define BLOCK_ARG  aBlock
  3694 
       
  3695 # else
       
  3696 
       
  3697 #                   define BLOCK_ARG  rHome
       
  3698                     REGISTER OBJ rHome;
       
  3699                     rHome = __BlockInstPtr(aBlock)->b_home;
       
  3700                     if ((rHome == nil) || (__qSpace(rHome) >= STACKSPACE))
       
  3701 # endif
       
  3702                     {
  3656                     {
  3703 
  3657 
  3704 # ifdef PARANOIA
  3658 # ifdef PARANOIA
  3705                         if (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))
  3659                         if (! ((INT)(__BlockInstPtr(aBlock)->b_flags) & __MASKSMALLINT(F_DYNAMIC)))
  3706 # endif
  3660 # endif
  3863                 }
  3817                 }
  3864             }
  3818             }
  3865 
  3819 
  3866 #           undef BLOCK_ARG
  3820 #           undef BLOCK_ARG
  3867 
  3821 
  3868 # ifdef NEW_BLOCK_CALL
       
  3869 #           define BLOCK_ARG  aBlock
  3822 #           define BLOCK_ARG  aBlock
  3870 #           define IBLOCK_ARG nil
  3823 #           define IBLOCK_ARG nil
  3871 # else
       
  3872 #           define BLOCK_ARG  (__BlockInstPtr(aBlock)->b_home)
       
  3873 #           define IBLOCK_ARG (__BlockInstPtr(aBlock)->b_home)
       
  3874 # endif
       
  3875 
  3824 
  3876             /*
  3825             /*
  3877              * sorry - must check for the blocks code within the loops;
  3826              * sorry - must check for the blocks code within the loops;
  3878              * it could be recompiled or flushed (in the interrupt)
  3827              * it could be recompiled or flushed (in the interrupt)
  3879              */
  3828              */