Example #1
0
 Module* module() {
   if(multiple_scopes_p()) {
     return top_scope_->module();
   } else {
     return scope->module();
   }
 }
Example #2
0
    Symbol* original_name() {
      if(multiple_scopes_p()) {
        if(block_as_method_p()) return cm->name();
        return top_scope_->method()->name();
      }

      return cm->name();
    }
Example #3
0
  VariableScope* CallFrame::method_scope(STATE) {
    VariableScope* current = promote_scope(state);
    if(!multiple_scopes_p()) return current;

    for(;;) {
      if(current->block_as_method_p()) return current;
      VariableScope* parent = current->parent();
      if(!parent->nil_p()) {
        current = parent;
      } else {
        return current;
      }
    }

    assert("should not be here" && 0);
  }
Example #4
0
  VariableScope* CallFrame::method_scope(STATE) {
    VariableScope* current = promote_scope(state);
    if(!multiple_scopes_p()) return current;

    for(;;) {
      if(current->block_as_method_p()) return current;
      VariableScope* parent = current->parent();
      if(!parent->nil_p()) {
        current = parent;
      } else {
        return current;
      }
    }

    // Shouldn't ever get here.
    return 0;
  }
Example #5
0
 VariableScope* top_scope(STATE) {
   if(multiple_scopes_p()) return top_scope_;
   return promote_scope(state);
 }