The Trunk: Compiler-eem.364.mcz

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

The Trunk: Compiler-eem.364.mcz

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

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

Name: Compiler-eem.364
Author: eem
Time: 5 January 2018, 7:03:50.183797 pm
UUID: 745c56d9-c3bf-4d7a-89bd-f5751947949e
Ancestors: Compiler-eem.363

Fix reindexingLiteralsDo: to also reset the nodes in the selectorSet.  And simplify.

=============== Diff against Compiler-eem.363 ===============

Item was changed:
  ----- Method: BytecodeEncoder>>reindexingLiteralsDo: (in category 'code generation') -----
  reindexingLiteralsDo: aBlock
+ | savedLiterals saveBlock |
- | savedLiterals |
  savedLiterals := PluggableDictionary new equalBlock: litSet equalBlock.
+ saveBlock := [:assoc| savedLiterals at: assoc key put: assoc value shallowCopy].
+ litSet associationsDo: saveBlock.
+ litIndSet associationsDo: saveBlock.
+ selectorSet associationsDo: saveBlock.
+ ^aBlock ensure:
+ [| restoreBlock |
+ restoreBlock := [:assoc| assoc value resetFromCopy: (savedLiterals at: assoc key)].
+ litSet associationsDo: restoreBlock.
+ litIndSet associationsDo: restoreBlock.
+ selectorSet associationsDo: restoreBlock]!
- litSet associationsDo:
- [:assoc|
- savedLiterals at: assoc key put: assoc value shallowCopy].
- litIndSet associationsDo:
- [:assoc|
- savedLiterals at: assoc key put: assoc value shallowCopy].
- ^[aBlock value]
- ensure:
- [litSet associationsDo:
- [:assoc|
- assoc value resetFromCopy: (savedLiterals at: assoc key)].
- litIndSet associationsDo:
- [:assoc|
- assoc value resetFromCopy: (savedLiterals at: assoc key)]]!