The Trunk: Kernel-eem.1345.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-eem.1345.mcz

commits-2
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1345.mcz

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

Name: Kernel-eem.1345
Author: eem
Time: 9 October 2020, 11:24:29.39536 am
UUID: a2fbce4f-7c3e-4945-ae44-2f7cb7d40cc7
Ancestors: Kernel-tonyg.1344

Refactor ClassDescription>>#compile:environment:classified:withStamp:notifying:logSource: into compileCue:environment:classified:withStamp:notifying:logSource: to allow clients to more easily install methods with dfferent btecode sets (for tests).

Provide accessors for CompiledCode's primary and secondary bytecodeSetEncoderClasses.

Correct a slip; integers should be compared using #=, not #==.

=============== Diff against Kernel-tonyg.1344 ===============

Item was changed:
  ----- Method: ClassDescription>>compile:environment:classified:withStamp:notifying:logSource: (in category 'compiling') -----
  compile: text environment: anEnvironment classified: category withStamp: changeStamp notifying: requestor logSource: logSource
 
+ ^self
+ compileCue: (CompilationCue
+ source: text
+ class: self
+ environment: anEnvironment
+ requestor: requestor)
- | methodAndNode context methodNode selector |
- context := CompilationCue
- source: text
- class: self
  environment: anEnvironment
+ classified: category
+ withStamp: changeStamp
+ notifying: requestor
+ logSource: logSource!
- requestor: requestor.
- methodNode := self newCompiler compile: context ifFail: [^ nil].
- methodAndNode := CompiledMethodWithNode
- generateMethodFromNode: methodNode
- trailer: (self defaultMethodTrailerIfLogSource: logSource).
- selector := methodAndNode selector.
- logSource ifTrue: [
- self
- logMethodSource: text
- forMethodWithNode: methodAndNode
- inCategory: category
- withStamp: changeStamp
- notifying: requestor.
- RecentMessages default
- recordSelector: selector
- forClass: methodAndNode method methodClass
- inEnvironment: anEnvironment ].
- self
- addAndClassifySelector: selector
- withMethod: methodAndNode method
- inProtocol: category
- notifying: requestor.
- self instanceSide
- noteCompilationOf: selector
- meta: self isClassSide.
- ^selector!

Item was added:
+ ----- Method: ClassDescription>>compileCue:environment:classified:withStamp:notifying:logSource: (in category 'compiling') -----
+ compileCue: compilationCue environment: anEnvironment classified: category withStamp: changeStamp notifying: requestor logSource: logSource
+
+ | methodAndNode methodNode selector |
+ methodNode := self newCompiler compile: compilationCue ifFail: [^nil].
+ methodAndNode := CompiledMethodWithNode
+ generateMethodFromNode: methodNode
+ trailer: (self defaultMethodTrailerIfLogSource: logSource).
+ selector := methodAndNode selector.
+ logSource ifTrue:
+ [self
+ logMethodSource: compilationCue source
+ forMethodWithNode: methodAndNode
+ inCategory: category
+ withStamp: changeStamp
+ notifying: requestor.
+ RecentMessages default
+ recordSelector: selector
+ forClass: methodAndNode method methodClass
+ inEnvironment: anEnvironment].
+ self
+ addAndClassifySelector: selector
+ withMethod: methodAndNode method
+ inProtocol: category
+ notifying: requestor.
+ self instanceSide
+ noteCompilationOf: selector
+ meta: self isClassSide.
+ ^selector!

Item was added:
+ ----- Method: CompiledCode class>>primaryBytecodeSetEncoderClass (in category 'method encoding') -----
+ primaryBytecodeSetEncoderClass
+ ^PrimaryBytecodeSetEncoderClass!

Item was added:
+ ----- Method: CompiledCode class>>secondaryBytecodeSetEncoderClass (in category 'method encoding') -----
+ secondaryBytecodeSetEncoderClass
+ ^SecondaryBytecodeSetEncoderClass!

Item was changed:
  ----- Method: CompiledMethod>>isNamedPrimitive (in category 'testing') -----
  isNamedPrimitive
  "Answer if the receiver invokes a named primitive."
+ ^self primitive = 117
- ^self primitive == 117
 
  "self systemNavigation browseAllSelect: [:m| m isNamedPrimitive]"!