Nicolas Cellier uploaded a new version of Compiler to project The Inbox:
http://source.squeak.org/inbox/Compiler-nice.354.mcz ==================== Summary ==================== Name: Compiler-nice.354 Author: nice Time: 26 April 2017, 11:47:32.330583 pm UUID: 59611875-6e84-499b-88af-e118535a2c14 Ancestors: Compiler-eem.353 Don't decompile obsolete compiled forms for braces {} (braceWith: & friends) nor blocks [] (closureCopy:copiedValues:) =============== Diff against Compiler-eem.353 =============== Item was removed: - ----- Method: BraceNode>>matchBraceWithReceiver:selector:arguments: (in category 'initialize-release') ----- - matchBraceWithReceiver: receiver selector: selector arguments: arguments - - selector = (self selectorForShortForm: arguments size) - ifFalse: [^ nil "no match"]. - - "Appears to be a short form brace construct" - self elements: arguments! Item was removed: - ----- Method: BraceNode>>selectorForShortForm: (in category 'code generation') ----- - selectorForShortForm: nElements - - nElements > 4 ifTrue: [^ nil]. - ^ #(braceWithNone braceWith: braceWith:with: - braceWith:with:with: braceWith:with:with:with:) at: nElements + 1! Item was changed: ----- Method: Decompiler>>send:super:numArgs: (in category 'instruction decoding') ----- send: selector super: superFlag numArgs: numArgs | args rcvr selNode msgNode messages | args := Array new: numArgs. (numArgs to: 1 by: -1) do: [:i | args at: i put: stack removeLast]. rcvr := stack removeLast. superFlag ifTrue: [rcvr := constructor codeSuper]. + selNode := constructor codeAnySelector: selector. + rcvr == CascadeFlag + ifTrue: + ["May actually be a cascade or an ifNil: for value." + self willJumpIfFalse + ifTrue: "= generated by a case macro" + [selector == #= ifTrue: + [" = signals a case statement..." + statements addLast: args first. + stack addLast: rcvr. "restore CascadeFlag" + ^ self]. + selector == #== ifTrue: + [" == signals an ifNil: for value..." + stack removeLast; removeLast. + rcvr := stack removeLast. + stack addLast: IfNilFlag; + addLast: (constructor + codeMessage: rcvr + selector: selNode + arguments: args). + ^ self]] + ifFalse: + [(self willJumpIfTrue and: [selector == #==]) ifTrue: + [" == signals an ifNotNil: for value..." + stack removeLast; removeLast. + rcvr := stack removeLast. + stack addLast: IfNilFlag; + addLast: (constructor + codeMessage: rcvr + selector: selNode + arguments: args). + ^ self]]. + msgNode := constructor + codeCascadedMessage: selNode + arguments: args. + stack last == CascadeFlag ifFalse: + ["Last message of a cascade" + statements addLast: msgNode. + messages := self popTo: stack removeLast. "Depth saved by first dup" - (#closureCopy:copiedValues: == selector - and: [self checkForClosureCopy: rcvr arguments: args]) ifFalse: - [selNode := constructor codeAnySelector: selector. - rcvr == CascadeFlag - ifTrue: - ["May actually be a cascade or an ifNil: for value." - self willJumpIfFalse - ifTrue: "= generated by a case macro" - [selector == #= ifTrue: - [" = signals a case statement..." - statements addLast: args first. - stack addLast: rcvr. "restore CascadeFlag" - ^ self]. - selector == #== ifTrue: - [" == signals an ifNil: for value..." - stack removeLast; removeLast. - rcvr := stack removeLast. - stack addLast: IfNilFlag; - addLast: (constructor - codeMessage: rcvr - selector: selNode - arguments: args). - ^ self]] - ifFalse: - [(self willJumpIfTrue and: [selector == #==]) ifTrue: - [" == signals an ifNotNil: for value..." - stack removeLast; removeLast. - rcvr := stack removeLast. - stack addLast: IfNilFlag; - addLast: (constructor - codeMessage: rcvr - selector: selNode - arguments: args). - ^ self]]. msgNode := constructor + codeCascade: stack removeLast + messages: messages]] + ifFalse: + [msgNode := constructor + codeMessage: rcvr + selector: selNode + arguments: args]. + stack addLast: msgNode! - codeCascadedMessage: selNode - arguments: args. - stack last == CascadeFlag ifFalse: - ["Last message of a cascade" - statements addLast: msgNode. - messages := self popTo: stack removeLast. "Depth saved by first dup" - msgNode := constructor - codeCascade: stack removeLast - messages: messages]] - ifFalse: - [msgNode := constructor - codeMessage: rcvr - selector: selNode - arguments: args]. - stack addLast: msgNode]! Item was changed: ----- Method: DecompilerConstructor>>codeMessage:selector:arguments: (in category 'constructor') ----- codeMessage: receiver selector: selector arguments: arguments | symbol | symbol := selector key. - (BraceNode new - matchBraceWithReceiver: receiver - selector: symbol - arguments: arguments) ifNotNil: [:node| ^node]. (self decodeLiteralVariableValueDereferenceWithReceiver: receiver selector: symbol arguments: arguments) ifNotNil: [:node| ^node]. (self decodeIfNilWithReceiver: receiver selector: symbol arguments: arguments) ifNotNil: [:node| ^node]. ^MessageNode new receiver: receiver selector: selector arguments: arguments precedence: symbol precedence! |
Free forum by Nabble | Edit this page |