void BlockScope::initialize(methodOop method, klassOop methodHolder, Scope* p, InlinedScope* s, RScope* rs, SendInfo* info) { InlinedScope::initialize(method, methodHolder, s, rs, info); _parent = p; _self_is_initialized = false; if (s == NULL) { // top scope: create a context (currently always initialized for blocks) // (context is set up by the prologue node) _context = new SAPReg(this, PrologueBCI, EpilogueBCI); } else { // set up for context passed in by caller // (_context may be changed later if this scope allocates its own context) switch (method->block_info()) { case methodOopDesc::expects_nil: // no context needed _context = NULL; break; case methodOopDesc::expects_self: _context = self()->preg(); fatal("self not known yet -- fix this"); break; case methodOopDesc::expects_parameter: // fix this -- should find which Unimplemented(); break; case methodOopDesc::expects_context: if (p->isInlinedScope()) { _context = ((InlinedScope*)p)->context(); } else { fatal("shouldn't inline"); // shouldn't inline block unless parent was inlined, too } break; default: fatal("unexpected incoming info"); } } }