Smalltalk.st
changeset 375 e5019c22f40e
parent 366 1044f947435d
child 379 5b5a130ccd09
equal deleted inserted replaced
374:7eb5bedfaa1c 375:e5019c22f40e
    25 
    25 
    26 Smalltalk comment:'
    26 Smalltalk comment:'
    27 COPYRIGHT (c) 1988 by Claus Gittinger
    27 COPYRIGHT (c) 1988 by Claus Gittinger
    28 	     All Rights Reserved
    28 	     All Rights Reserved
    29 
    29 
    30 $Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.55 1995-07-23 11:54:53 claus Exp $
    30 $Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.56 1995-08-08 00:49:01 claus Exp $
    31 '!
    31 '!
    32 
    32 
    33 "
    33 "
    34  dont depend on these being global - they will become
    34  dont depend on these being global - they will become
    35  class variables of some class ...
    35  class variables of some class ...
    54 "
    54 "
    55 !
    55 !
    56 
    56 
    57 version
    57 version
    58 "
    58 "
    59 $Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.55 1995-07-23 11:54:53 claus Exp $
    59 $Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.56 1995-08-08 00:49:01 claus Exp $
    60 "
    60 "
    61 !
    61 !
    62 
    62 
    63 documentation
    63 documentation
    64 "
    64 "
  1018 %{  /* NOCONTEXT */
  1018 %{  /* NOCONTEXT */
  1019     __STATISTIC__();
  1019     __STATISTIC__();
  1020 %}
  1020 %}
  1021 !
  1021 !
  1022 
  1022 
  1023 infoPrinting:aBoolean
       
  1024     "turn on/off various informational printouts in the VM.
       
  1025      For example, the GC activity messages are controlled by
       
  1026      this flags setting.
       
  1027      The default is true, since (currently) those messages
       
  1028      are useful for ST/X developers."
       
  1029 
       
  1030 %{  /* NOCONTEXT */
       
  1031     extern int __infoPrinting;
       
  1032 
       
  1033     __infoPrinting = (aBoolean == true);
       
  1034 %}
       
  1035 !
       
  1036 
       
  1037 debugPrinting:aBoolean
       
  1038     "turn on/off various debug printouts in the VM
       
  1039      in case of an error. For example, a double-notUnderstood
       
  1040      leads to a VM context dump if debugPrinting is on.
       
  1041      If off, those messages are suppressed.
       
  1042      The default is on, since these messages are only printed for
       
  1043      severe errors."
       
  1044 
       
  1045 %{  /* NOCONTEXT */
       
  1046     extern int __debugPrinting;
       
  1047 
       
  1048     __debugPrinting = (aBoolean == true);
       
  1049 %}
       
  1050 !
       
  1051 
       
  1052 debugOn
  1023 debugOn
  1053     "turns some tracing on.
  1024     "turns some tracing on.
  1054      WARNING: this method is for debugging only 
  1025      WARNING: this method is for debugging only 
  1055 	      it may be removed without notice"
  1026 	      it may be removed without notice"
  1056 
  1027 
  1057     "LookupTrace := true.   "
  1028     "LookupTrace := true.   "
  1058     MessageTrace := true.
       
  1059     "AllocTrace := true.     "
  1029     "AllocTrace := true.     "
  1060     ObjectMemory flushInlineCaches
  1030     ObjectMemory flushCaches
  1061 !
  1031 !
  1062 
  1032 
  1063 debugOff
  1033 debugOff
  1064     "turns tracing off.
  1034     "turns tracing off.
  1065      WARNING: this method is for debugging only 
  1035      WARNING: this method is for debugging only 
  1066 	      it may be removed without notice"
  1036 	      it may be removed without notice"
  1067 
  1037 
  1068     LookupTrace := nil.    
  1038     LookupTrace := nil.    
  1069     MessageTrace := nil
       
  1070     ". AllocTrace := nil     "
  1039     ". AllocTrace := nil     "
  1071 !
  1040 !
  1072 
  1041 
  1073 executionDebugOn
  1042 executionDebugOn
  1074     "turns tracing of interpreter on.
  1043     "turns tracing of interpreter on.
  2041     ] ifFalse:[
  2010     ] ifFalse:[
  2042 	(aFileName startsWith:'fileIn/') ifTrue:[
  2011 	(aFileName startsWith:'fileIn/') ifTrue:[
  2043 	    aStream := self fileInFileStreamFor:(aFileName copyFrom:8)
  2012 	    aStream := self fileInFileStreamFor:(aFileName copyFrom:8)
  2044 	] ifFalse:[
  2013 	] ifFalse:[
  2045 	    aStream := self systemFileStreamFor:aFileName.
  2014 	    aStream := self systemFileStreamFor:aFileName.
  2046 	    (aFileName includes:$/) ifTrue:[
  2015 	    (aStream notNil and:[aFileName includes:$/]) ifTrue:[
  2047 		"/ temporarily prepend the files directory
  2016 		"/ temporarily prepend the files directory
  2048 		"/ to the searchPath.
  2017 		"/ to the searchPath.
  2049 		"/ This allows fileIn-driver files to refer to local
  2018 		"/ This allows fileIn-driver files to refer to local
  2050 		"/ files via a relative path, and drivers to fileIn other
  2019 		"/ files via a relative path, and drivers to fileIn other
  2051 		"/ drivers ...
  2020 		"/ drivers ...