'From Cuis 1.0 of 28 November 2009 [latest update: #337] on 8 December 2009 at 10:14:35 pm'!

!BlockClosure methodsFor: 'printing' stamp: 'jmv 12/8/2009 22:12'!
decompile
	^Smalltalk actualDecompilerClass new decompileBlock: self! !


!CompiledMethod methodsFor: '*Morphic-Explorer' stamp: 'jmv 12/8/2009 22:14'!
explorerContents
	"(CompiledMethod compiledMethodAt: #explorerContents) explore"
	
	^Array streamContents:
		[:s| | tokens |
		tokens := Smalltalk actualScannerClass new scanTokens: (self headerDescription readStream skipTo: $"; upTo: $").
		s nextPut: (ObjectExplorerWrapper
						with: ((0 to: tokens size by: 2) collect:
								[:i| i = 0 ifTrue: [self header] ifFalse: [{tokens at: i - 1. tokens at: i}]])
						name: 'header'
						model: self).
		(1 to: self numLiterals) do:
			[:key|
			s nextPut: (ObjectExplorerWrapper
							with: (self literalAt: key)
							name: ('literal', key printString contractTo: 32)
							model: self)].
		self isQuick
			ifTrue: [s nextPut: (ObjectExplorerWrapper
									with: self symbolic
									name: #symbolic
									model: self)]
			ifFalse:
				[self symbolicLinesDo:
					[:pc :line|
					pc <= 1
						ifTrue:
							[s nextPut: (ObjectExplorerWrapper
											with: line
											name: 'pragma'
											model: self)]
						ifFalse:
							[s nextPut: (ObjectExplorerWrapper
											with: line
											name: pc printString
											model: self)]]].
				"should be self numLiterals + 1 * Smalltalk wordSize + 1"
		self endPC + 1
			to: self basicSize
			do: [:key|
				s nextPut: (ObjectExplorerWrapper
								with: (self basicAt: key)
								name: key printString
								model: self)]]! !


!SystemDictionary methodsFor: 'Compiler swapping' stamp: 'jmv 12/8/2009 22:10'!
actualCompiledMethodWithNodeClass
	"Sending this message replaces direct references to some class"
	^self usingClosureCompiler
		ifTrue: [ CompiledMethodWithNode ]
		ifFalse: [ NonClosureCompiledMethodWithNode ]! !

!SystemDictionary methodsFor: 'Compiler swapping' stamp: 'jmv 12/8/2009 22:11'!
actualCompilerClass
	"Sending this message replaces direct references to some class"
	^self usingClosureCompiler
		ifTrue: [ Compiler ]
		ifFalse: [ NonClosureCompiler ]! !

!SystemDictionary methodsFor: 'Compiler swapping' stamp: 'jmv 12/8/2009 22:12'!
actualDecompilerClass
	"Sending this message replaces direct references to some class"
	^self usingClosureCompiler
		ifTrue: [ Decompiler ]
		ifFalse: [ NonClosureDecompiler ]! !

!SystemDictionary methodsFor: 'Compiler swapping' stamp: 'jmv 12/8/2009 22:13'!
actualEncoderClass
	"Sending this message replaces direct references to some class"
	^self usingClosureCompiler
		ifTrue: [ Encoder ]
		ifFalse: [ NonClosureEncoder ]! !

!SystemDictionary methodsFor: 'Compiler swapping' stamp: 'jmv 12/8/2009 22:13'!
actualMessageNodeClass
	"Sending this message replaces direct references to some class"
	^self usingClosureCompiler
		ifTrue: [ MessageNode ]
		ifFalse: [ NonClosureMessageNode ]! !

!SystemDictionary methodsFor: 'Compiler swapping' stamp: 'jmv 12/8/2009 22:13'!
actualParserClass
	"Sending this message replaces direct references to some class"
	^self usingClosureCompiler
		ifTrue: [ Parser ]
		ifFalse: [ NonClosureParser ]! !

!SystemDictionary methodsFor: 'Compiler swapping' stamp: 'jmv 12/8/2009 22:14'!
actualScannerClass
	"Sending this message replaces direct references to some class"
	^self usingClosureCompiler
		ifTrue: [ Scanner ]
		ifFalse: [ NonClosureScanner ]! !

