Esempio n. 1
0
void InlinedScope::addSend(GrowableArray<PReg*>* expStk, bool isSend) {
  // add send or prim. call / uncommon branch to this scope and mark locals as debug-visible
  if (!expStk) return;    		// not an exposing send
  for (InlinedScope* s = this; s && s->isInlinedScope(); s = s->sender()) {
    if (isSend) s->_nofSends++;
    s->_nofInterruptPoints++;
    s->markLocalsDebugVisible(expStk);	// mark locals as debug-visible
  }
}
Esempio n. 2
0
bool InlinedScope::isSenderOf(InlinedScope* callee) const {
  assert(callee, "should have a scope");
  if (depth > callee->depth) return false;
  int d = callee->depth - 1;
  for (InlinedScope* s = callee->sender(); s && d >= depth; s = s->sender(), d--) {
    if (this == s) return true;
  }
  return false;
}
Esempio n. 3
0
void CompiledLoop::discoverLoopNesting() {
  // discover enclosing loop (if any) and set up loop header links
  for (InlinedScope* s = _scope; s != NULL; s = s->sender()) {
    GrowableArray<CompiledLoop*>* loops = s->loops();
    for (int i = loops->length() - 1; i >= 0; i--) {
      CompiledLoop* l = loops->at(i);
      if (l->isInLoop(_loopHeader)) {
	// this is out enclosing loop
	_loopHeader->set_enclosingLoop(l->loopHeader());
	l->loopHeader()->addNestedLoop(_loopHeader);
	return;
      }
    }
  }
}