CompiledCode.st
branchjv
changeset 17993 956342c369a2
parent 17976 50c2416f962a
child 18011 deb0c3355881
equal deleted inserted replaced
17992:797f12be31a0 17993:956342c369a2
   325     ^ flags
   325     ^ flags
   326 
   326 
   327     "Modified: / 30.1.1999 / 14:51:59 / cg"
   327     "Modified: / 30.1.1999 / 14:51:59 / cg"
   328 !
   328 !
   329 
   329 
       
   330 homeMethod
       
   331     "for common protocol with blocks: if the receiver is a method,
       
   332      return the receiver; otherwise, if its a block, return its home
       
   333      method."
       
   334 
       
   335     ^ self
       
   336 !
       
   337 
   330 literalAt:index
   338 literalAt:index
   331     "return a literal element"
   339     "return a literal element"
   332 
   340 
   333     ^ self literalAt:index ifAbsent:[self error:'bad literal index']
   341     ^ self literalAt:index ifAbsent:[self error:'bad literal index']
   334 !
   342 !
   426     "Modified: / 23.1.1998 / 16:30:07 / stefan"
   434     "Modified: / 23.1.1998 / 16:30:07 / stefan"
   427 !
   435 !
   428 
   436 
   429 literalsDetect:aBlock ifNone:exceptionBlock
   437 literalsDetect:aBlock ifNone:exceptionBlock
   430     "execute a one arg block for each of our literals.
   438     "execute a one arg block for each of our literals.
   431      return the first literal for which aBlock returns true,
   439      Return the first literal for which aBlock returns true,
   432      or the value from exceptionBlock, if either no literals or
   440      or the value from exceptionBlock, if either no literals or
   433      none satisfied the block"
   441      none satisfied the block"
   434 
   442 
   435     self literalsDo:[:eachLiteral |
   443     self literalsDo:[:eachLiteral |
   436 	(aBlock value:eachLiteral) ifTrue:[
   444         (aBlock value:eachLiteral) ifTrue:[
   437 	    ^ eachLiteral
   445             ^ eachLiteral
   438 	]
   446         ]
   439     ].
   447     ].
   440     ^ exceptionBlock value.
   448     ^ exceptionBlock value.
   441 
   449 
   442     "Created: / 24.6.1996 / 14:27:35 / stefan"
   450     "Created: / 24.6.1996 / 14:27:35 / stefan"
   443     "Modified: / 30.1.1997 / 16:24:04 / cg"
   451     "Modified: / 30.1.1997 / 16:24:04 / cg"
   532     "/ self obsoleteMethodWarning:'use numVars'.
   540     "/ self obsoleteMethodWarning:'use numVars'.
   533     ^ self numVars
   541     ^ self numVars
   534 
   542 
   535     "Modified: / 30.1.1999 / 14:55:42 / cg"
   543     "Modified: / 30.1.1999 / 14:55:42 / cg"
   536     "Created: / 30.1.1999 / 14:55:51 / cg"
   544     "Created: / 30.1.1999 / 14:55:51 / cg"
       
   545 !
       
   546 
       
   547 source
       
   548     ^ self subclassResponsibility.
   537 ! !
   549 ! !
   538 
   550 
   539 !CompiledCode methodsFor:'compiler interface'!
   551 !CompiledCode methodsFor:'compiler interface'!
   540 
   552 
   541 compilerClass
   553 compilerClass
  1857 ! !
  1869 ! !
  1858 
  1870 
  1859 !CompiledCode class methodsFor:'documentation'!
  1871 !CompiledCode class methodsFor:'documentation'!
  1860 
  1872 
  1861 version
  1873 version
  1862     ^ '$Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.118 2012/10/26 10:25:36 stefan Exp $'
  1874     ^ '$Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.120 2012/11/04 14:13:28 cg Exp $'
  1863 !
  1875 !
  1864 
  1876 
  1865 version_CVS
  1877 version_CVS
  1866     ^ '§Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.118 2012/10/26 10:25:36 stefan Exp §'
  1878     ^ '§Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.120 2012/11/04 14:13:28 cg Exp §'
  1867 !
  1879 !
  1868 
  1880 
  1869 version_SVN
  1881 version_SVN
  1870     ^ '$Id: CompiledCode.st 10858 2012-10-29 22:07:56Z vranyj1 $'
  1882     ^ '$Id: CompiledCode.st 10876 2012-11-30 17:19:23Z vranyj1 $'
  1871 ! !
  1883 ! !
  1872 
  1884 
  1873 
  1885 
  1874 
  1886