The Trunk: Compiler-eem.262.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.262.mcz

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

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

Name: Compiler-eem.262
Author: eem
Time: 12 April 2013, 4:10:28.001 pm
UUID: b0593a62-a896-c24f-acf7-8edeeab9a81c
Ancestors: Compiler-nice.261

Restore and improve upon the comment in
LiteralVariableNode>>emitCodeForStore:encoder:

=============== Diff against Compiler-nice.261 ===============

Item was changed:
  ----- Method: LiteralVariableNode>>emitCodeForStore:encoder: (in category 'code generation') -----
  emitCodeForStore: stack encoder: encoder
  | exprOffset |
  writeNode ifNil: [^encoder genStoreLiteralVar: index].
  "On entry the stack has only the expression.  Push the binding,
+ duplicate the expression, send #value: and pop.
+ The various value: methods on Association ReadOnlyVariableBinding
+ etc _do not_ return the value assigned; they return the receiver.  If they
+ did we could generate much simpler code, e.g.
+ encoder genPushLiteral: index.
+ stack push: 1.
+ writeNode emitCode: stack args: 1 encoder: encoder super: false"
- duplicate the expression, send #value: and pop."
  exprOffset := stack position - 1.
  encoder genPushLiteral: index.
  stack push: 1.
  encoder genPushTempLong: exprOffset.
  stack push: 1.
  writeNode
  emitCode: stack
  args: 1
  encoder: encoder
  super: false.
  stack pop: 1.
  encoder genPop!