On 4/24/08, Charles Oliver Nutter <[EMAIL PROTECTED]> wrote:
[snip]
>      public void updateFrame(
>              RubyModule klazz, IRubyObject self, String name,
>              Block block, String fileName, int line,
>              JumpTarget jumpTarget) {
>          assert block != null :
>              "Block uses null object pattern.  It should NEVER be null";
>
>          this.self = self;
>          this.name = name;
>          this.klazz = klazz;
>          this.fileName = fileName;
>          this.line = line;
>          this.block = block;
>          this.jumpTarget = jumpTarget;
>          this.visibility = Visibility.PUBLIC;
>          this.isBindingFrame = false;
>          this.backref = null;
>          this.lastline = null;
>      }


Can you aggregate some of those parameters?

Klazz, name, fileName and line with certainly be the same every time
the call is made. What about block and jumpTarget?

at best you could have

class FrameData {
  public final RubyModule klazz;
  public final String name;
  public final Block block;
  public finalString fileName;
  public final int line;
  public final JumpTarget jumpTarget;

 public FrameData(...).....
}

    public void updateFrame(
            FrameData frameData, IRubyObject selft) {
        assert block != null :
            "Block uses null object pattern.  It should NEVER be null";

        this.self = self;
        this.frameData = frameData;
        this.visibility = Visibility.PUBLIC;
        this.isBindingFrame = false;
        this.backref = null;
        this.lastline = null;
    }


The FameData instances would be synthetic final static fields on the class.

John Wilson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to