Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

send.h

This is the verbatim text of the send.h include file.
/* Sun-$Revision: 23.6 $ */

/* Copyright 1992-9 Sun Microsystems, Inc. and Stanford University.
   See the LICENSE file for license information. */

# pragma interface

struct Send: Expr {
  Expr* receiver;
  String* message;
  String* del;
  
  Send(Expr* r, String* m, String* d, char* start, char* end, 
       char* file, fint line, fint col, Parser* p)
    : Expr(start, end, file, line, col, p){
      receiver = r; message = m; del = d;
    }
  
  bool IsSend() { return true; }
  
  bool GenByteCodes(AbstractByteCode* b, Object* parent, bool isExpr = true);

  void oops_do(oopsDoFn f) {
    Expr::oops_do(f); if (receiver) receiver->oops_do(f); }

  void addCommentAnnotations(Scanner* scanner);
  
  bool GenReceiverForPseudoPrim(AbstractByteCode* b, Object* parent);

  void PrintDelegatee();
};

struct Unary: Send {
  Unary(Expr* r, String* m, String* d, char* start, char* end, 
        char* file, fint line, fint col, Parser* p)
    : Send(r, m, d, start, end, file, line, col, p) {}
  
  bool GenByteCodes(AbstractByteCode* b, Object* parent, bool isExpr = true);

  void Print();
};

struct Binary: Unary {
  Expr* arg;
  
  Binary(Expr* r, String* m, Expr* a, String* d,
         char* start, char* end, char* file, fint line, fint col, Parser* p)
    : Unary(r, m, d, start, end, file, line, col, p) {
      arg = a;
    }
  
  bool IsBinary() { return true; }
  
  bool GenByteCodes(AbstractByteCode* b, Object* parent, bool isExpr = true);

  void oops_do(oopsDoFn f) { Unary::oops_do(f); arg->oops_do(f); }
  
  void addCommentAnnotations(Scanner* scanner);

  void Print();
};

struct Keyword: Send {
  StringList* keywords;
  ExprList* args;
  
  Keyword(Expr* r, StringList* k, ExprList* a, String* d,
          char* start, char* end, char* file, fint line, fint col, Parser* p)
    : Send(r, 0, d, start, end, file, line, col, p) { 
      keywords = k; args = a; message = keywords->AsSelector();
    }
  
  bool IsKeyword() { return true; }
  
  bool GenByteCodes(AbstractByteCode* b, Object* parent, bool isExpr = true);
  
  bool GenBranch(AbstractByteCode* b, Object* parent,
                        bool cond, Expr* testMe, Expr* dst);
  bool GenIndexedBranch(AbstractByteCode* b, Object* parent);
                        
  bool GenLabelDefinition(AbstractByteCode* b, Object* parent);

  void oops_do(oopsDoFn f) { Send::oops_do(f); args->oops_do(f); }
  
  void addCommentAnnotations(Scanner* scanner);
 
  void Print();
};

Generated at Tue Jun 27 12:07:46 2000 for SelfVM by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999