<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Hi Eliot,<div><br></div><div>please review. :-) It connects to this discussion: http://forum.world.st/Transcript-error-when-forceUpdate-false-tp5126397p5126559.html</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class='history_container' type='cite' style='border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;'>
<p style='color: #AAAAAA; margin-top: 10px;'>Am 27.01.2021 10:31:57 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style='font-family:Arial,Helvetica,sans-serif'>A new version of Compiler was added to project The Inbox:<br>http://source.squeak.org/inbox/Compiler-mt.454.mcz<br><br>==================== Summary ====================<br><br>Name: Compiler-mt.454<br>Author: mt<br>Time: 27 January 2021, 10:31:47.057422 am<br>UUID: 6e01e1e3-e3b2-41a4-9749-37f1dab71fba<br>Ancestors: Compiler-eem.453<br><br>Adds <nocontextswitch> pragma, which maps to <primitive: 123="">. For this, allow parser extensions to be non-keyword (i.e. unary) pragmas. Might have a tiny performance impact when parsing methods with lots of non-keyword pragmas.<br><br>=============== Diff against Compiler-eem.453 ===============<br><br>Item was added:<br>+ ----- Method: Parser>>noContextSwitch (in category 'pragmas - code evaluation') -----<br>+ noContextSwitch<br>+ "By adding this pragma to a method, it will not be preempt the current process on method activation if a higher-priority process is runnable. Any numbered primitive without side effects will do here."<br>+ <pragmaparser><br>+ <br>+ "Note that primitive 123 once was primitiveValueUninteruptibly but is no longer in use." <br>+ self addPragma: (Pragma keyword: #primitive: arguments: #(123)).<br>+ <br>+ self advance.<br>+ ^ true!<br><br>Item was changed:<br> ----- Method: Parser>>pragmaStatement (in category 'pragmas') -----<br> pragmaStatement<br> "Parse a pragma statement. The leading '<' has already been consumed. The 'here' token is the first one in the pragma. Use that token to dispatch to a custom pragma-parsing method if one can be found with a selector that matches it.<br> <br> Note that custom pragma parsers need to fulfill two requirements:<br> - method selector must match the current token as simple getter,<br> e.g., <apicall: ...=""> matches #apicall or <primitive: ...=""> matches #primitive<br> - method must have pragma <pragmaparser> to be called."<br> <br> "0) Early exit"<br> (hereType = #keyword or: [ hereType = #word or: [ hereType = #binary ] ])<br> ifFalse: [ ^ self expected: 'pragma declaration' ].<br> <br>+ "1) Avoid interning new symbols for made-up pragmas such as #my for <my: 1="" pragma:="" 2="">."<br>+ (Symbol lookup: (here last == $: ifTrue: [here allButLast] ifFalse: [here])) ifNotNil: [:parserSelector |<br>+ Parser methodDict at: parserSelector ifPresent: [:parserMethod |<br>+ "2) Only call methods that claim to be a custom pragma parser via <pragmaparser>."<br>+ (parserMethod hasPragma: #pragmaParser)<br>+ ifTrue: [^ self executeMethod: parserMethod]]].<br>- "1) Do not consider one-word pragmas such as <primitive> and <foobar>. Only keyword pragmas."<br>- here last == $: ifTrue: [<br>- "2) Avoid interning new symbols for made-up pragmas such as #my for <my: 1="" pragma:="" 2="">."<br>- (Symbol lookup: here allButLast) ifNotNil: [:parserSelector |<br>- Parser methodDict at: parserSelector ifPresent: [:parserMethod |<br>- "3) Only call methods that claim to be a custom pragma parser via <pragmaparser>."<br>- (parserMethod hasPragma: #pragmaParser)<br>- ifTrue: [^ self executeMethod: parserMethod]]]].<br> <br> "X) No custom pragma parser found. Use the default one."<br> ^ self pragmaStatementKeywords!<br><br><br></pragmaparser></my:></foobar></primitive></pragmaparser></my:></pragmaparser></primitive:></apicall:></pragmaparser></primitive:></nocontextswitch></div></blockquote>
</div></body>