[etoys-dev] Etoys: System-bf.8.mcz

commits at source.squeak.org commits at source.squeak.org
Tue May 4 19:33:28 EDT 2010


Bert Freudenberg uploaded a new version of System to project Etoys:
http://source.squeak.org/etoys/System-bf.8.mcz

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

Name: System-bf.8
Author: bf
Time: 4 May 2010, 4:32:42 pm
UUID: 49577188-3425-4e79-90ad-59ade2a40710
Ancestors: System-bf.7

- protect references in Player scripts when recompiling

=============== Diff against System-bf.7 ===============

Item was added:
+ ----- Method: ScriptParser>>parse:class:noPattern:context:notifying:ifFail: (in category 'as yet unclassified') -----
+ parse: sourceStream class: class noPattern: noPattern context: ctxt notifying: req ifFail: aBlock 
+         "Answer a MethodNode for the argument, sourceStream, that is the root of 
+         a parse tree. Parsing is done with respect to the argument, class, to find 
+         instance, class, and pool variables; and with respect to the argument, 
+         ctxt, to find temporary variables. Errors in parsing are reported to the 
+         argument, req, if not nil; otherwise aBlock is evaluated. The argument 
+         noPattern is a Boolean that is true if the the sourceStream does not 
+         contain a method header (i.e., for DoIts)."
+ 
+ 	"Copied from superclass, use ScriptEncoder and give it a referenceWorld. This assumes worldLoading has been set to the right world this player belongs to. --bf 5/4/2010"
+ 
+          | methNode repeatNeeded myStream parser s p |
+         (req notNil and: [RequestAlternateSyntaxSetting signal and: [(sourceStream isKindOf: FileStream) not]])
+                 ifTrue: [parser _ self as: DialectParser]
+                 ifFalse: [parser _ self].
+         myStream _ sourceStream.
+         [repeatNeeded _ false.
+ 	   p _ myStream position.
+ 	   s _ myStream upToEnd.
+ 	   myStream position: p.
+         parser init: myStream notifying: req failBlock: [^ aBlock value].
+         doitFlag _ noPattern.
+         failBlock_ aBlock.
+         [methNode _ parser method: noPattern context: ctxt
+                                 encoder: (ScriptEncoder new init: class context: ctxt notifying: parser;
+ 								referenceObject: ActiveWorld referenceWorld )] 
+                 on: ParserRemovedUnusedTemps 
+                 do: 
+                         [ :ex | repeatNeeded _ (requestor isKindOf: TextMorphEditor) not.
+                         myStream _ ReadStream on: requestor text string.
+                         ex resume].
+         repeatNeeded] whileTrue.
+         encoder _ failBlock _ requestor _ parseNode _ nil. "break cycles & mitigate refct overflow"
+ 	   methNode sourceText: s.
+         ^ methNode!

Item was added:
+ ----- Method: ScriptCompiler>>compile:in:notifying:ifFail: (in category 'as yet unclassified') -----
+ compile: textOrStream in: aClass notifying: aRequestor ifFail: failBlock
+ 	
+ 	self parserClass: ScriptParser.
+ 	^super compile: textOrStream in: aClass notifying: aRequestor ifFail: failBlock!



More information about the etoys-dev mailing list