[squeak-dev] The Inbox: Compiler-ct.419.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Feb 16 14:53:23 UTC 2020


Christoph Thiede uploaded a new version of Compiler to project The Inbox:
http://source.squeak.org/inbox/Compiler-ct.419.mcz

==================== Summary ====================

Name: Compiler-ct.419
Author: ct
Time: 16 February 2020, 3:53:20.427 pm
UUID: 1fc6588f-e718-d846-8e56-829f6dcc5780
Ancestors: Compiler-eem.416

Adds Compiler >> #compiledMethodFor:in:to:environment:notifying:ifFail: with new environment argument.

=============== Diff against Compiler-eem.416 ===============

Item was added:
+ ----- Method: Compiler>>compiledMethodFor:in:to:environment:notifying:ifFail: (in category 'public access') -----
+ compiledMethodFor: textOrStream in: aContext to: receiver environment: anEnvironment notifying: aRequestor ifFail: failBlock
+ 	"Compiles the sourceStream into a parse tree, then generates code into a method, and answers it.  If receiver is not nil, then the text can refer to instance variables of that receiver (tools such as Inspector use this). If aContext is not nil, the text can refer to temporaries in that context (tools such as Debugger use this).  If anEnvironment is not nil, then all global bindings in the text are resolved in that environment instead of the current environment.  If aRequestor is not nil, then it will receive a notify:at: message before the attempt to evaluate is aborted."
+ 
+ 	| methodNode method |
+ 	methodNode := self
+ 		compileNoPattern: textOrStream
+ 		in: (self classForReceiver: receiver context: aContext)
+ 		context: aContext
+ 		environment: anEnvironment
+ 		notifying: aRequestor
+ 		ifFail: [^failBlock value].
+ 	method := self interactive
+ 		ifTrue: [ methodNode generateWithTempNames ] 
+ 		ifFalse: [ methodNode generate ].
+ 	^method!

Item was changed:
  ----- Method: Compiler>>compiledMethodFor:in:to:notifying:ifFail: (in category 'public access') -----
  compiledMethodFor: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock
- 	"Compiles the sourceStream into a parse tree, then generates code
- 	 into a method, and answers it.  If receiver is not nil, then the text can
- 	 refer to instance variables of that receiver (the Inspector uses this).
- 	 If aContext is not nil, the text can refer to temporaries in that context
- 	 (the Debugger uses this). If aRequestor is not nil, then it will receive a 
- 	 notify:at: message before the attempt to evaluate is aborted."
  
+ 	^ self compiledMethodFor: textOrStream in: aContext to: receiver environment: receiver class environment notifying: aRequestor ifFail: failBlock!
- 	| methodNode method |
- 	methodNode := self
- 		compileNoPattern: textOrStream
- 		in: (self classForReceiver: receiver context: aContext)
- 		context: aContext
- 		notifying: aRequestor
- 		ifFail: [^failBlock value].
- 	method := self interactive
- 		ifTrue: [ methodNode generateWithTempNames ] 
- 		ifFalse: [ methodNode generate ].
- 	^method!



More information about the Squeak-dev mailing list