JavaContext.st
changeset 216 abe4c0313d97
parent 211 bd118f601aed
child 228 18ed0b234062
equal deleted inserted replaced
215:f8e28c816033 216:abe4c0313d97
     9 !JavaContext methodsFor:'ST context mimicri'!
     9 !JavaContext methodsFor:'ST context mimicri'!
    10 
    10 
    11 argsAndVars
    11 argsAndVars
    12     |nArgs nVars|
    12     |nArgs nVars|
    13 
    13 
       
    14     stack isNil ifTrue:[^ #()].
       
    15     frameBase isNil ifTrue:[^ #()].
       
    16 
    14     nArgs := method numArgs.
    17     nArgs := method numArgs.
    15     nVars := method numVars.
    18     nVars := method numVars.
    16 
    19 
    17     method isStatic ifTrue:[
    20     method isStatic ifTrue:[
    18         (nArgs + nVars) == 0 ifTrue:[
    21         (nArgs + nVars) == 0 ifTrue:[
    21         ^ (stack copyFrom:frameBase to:(frameBase + nArgs + nVars - 1)) asArray
    24         ^ (stack copyFrom:frameBase to:(frameBase + nArgs + nVars - 1)) asArray
    22     ].
    25     ].
    23     ^ (stack copyFrom:(frameBase+1) to:(frameBase + nArgs + nVars)) asArray
    26     ^ (stack copyFrom:(frameBase+1) to:(frameBase + nArgs + nVars)) asArray
    24 
    27 
    25     "Created: 1.5.1996 / 17:32:44 / cg"
    28     "Created: 1.5.1996 / 17:32:44 / cg"
    26     "Modified: 1.5.1996 / 17:41:50 / cg"
    29     "Modified: 12.8.1997 / 22:04:39 / cg"
    27 !
    30 !
    28 
    31 
    29 canReturn
    32 canReturn
    30     ^ false
    33     ^ false
    31 
    34 
   116 stackFrame
   119 stackFrame
   117 sp < frameBase ifTrue:[
   120 sp < frameBase ifTrue:[
   118  'oops - negative stackFrame' errorPrintCR.
   121  'oops - negative stackFrame' errorPrintCR.
   119  ^ #()
   122  ^ #()
   120 ].
   123 ].
       
   124 stack isNil ifTrue:[^ #()].
   121 
   125 
   122 "/ method displayString printCR.
   126 "/ method displayString printCR.
   123 "/ frameBase print. ' ... ' print. (sp-1) printCR.
   127 "/ frameBase print. ' ... ' print. (sp-1) printCR.
   124 "/ (stack collect:[:e | e class name]) printCR.
   128 "/ (stack collect:[:e | e class name]) printCR.
   125 
   129 
   126 "/    method isStatic ifFalse:[
   130 "/    method isStatic ifFalse:[
   127 "/        ^ stack copyFrom:frameBase+1 to:(sp-1)
   131 "/        ^ stack copyFrom:frameBase+1 to:(sp-1)
   128 "/    ].
   132 "/    ].
   129     ^ stack copyFrom:frameBase to:(sp-1)
   133     ^ stack copyFrom:frameBase to:(sp-1)
   130 
   134 
   131     "Modified: 4.8.1997 / 23:39:38 / cg"
   135     "Modified: 12.8.1997 / 21:55:47 / cg"
   132 ! !
   136 ! !
   133 
   137 
   134 !JavaContext methodsFor:'accessing'!
   138 !JavaContext methodsFor:'accessing'!
   135 
   139 
   136 class:aJavaClass method:aJavaMethod sender:aContext stack:s frameBase:f
   140 class:aJavaClass method:aJavaMethod sender:aContext stack:s frameBase:f
   245 ! !
   249 ! !
   246 
   250 
   247 !JavaContext class methodsFor:'documentation'!
   251 !JavaContext class methodsFor:'documentation'!
   248 
   252 
   249 version
   253 version
   250     ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaContext.st,v 1.15 1997/08/12 00:39:51 cg Exp $'
   254     ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaContext.st,v 1.16 1997/08/13 13:11:04 cg Exp $'
   251 ! !
   255 ! !