当前位置: 首页>>代码示例>>C++>>正文


C++ oop::is_constMethod方法代码示例

本文整理汇总了C++中oop::is_constMethod方法的典型用法代码示例。如果您正苦于以下问题:C++ oop::is_constMethod方法的具体用法?C++ oop::is_constMethod怎么用?C++ oop::is_constMethod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oop的用法示例。


在下文中一共展示了oop::is_constMethod方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: oop_follow_contents

void constMethodKlass::oop_follow_contents(oop obj) {
  assert (obj->is_constMethod(), "object must be constMethod");
  constMethodOop cm = constMethodOop(obj);
  MarkSweep::mark_and_push(cm->adr_method());
  MarkSweep::mark_and_push(cm->adr_stackmap_data());
  MarkSweep::mark_and_push(cm->adr_exception_table());
  // Performance tweak: We skip iterating over the klass pointer since we
  // know that Universe::constMethodKlassObj never moves.
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:9,代码来源:constMethodKlass.cpp

示例2: oop_verify_on

void constMethodKlass::oop_verify_on(oop obj, outputStream* st) {
  Klass::oop_verify_on(obj, st);
  guarantee(obj->is_constMethod(), "object must be constMethod");
  constMethodOop m = constMethodOop(obj);
  guarantee(m->is_perm(),                            "should be in permspace");

  // Verification can occur during oop construction before the method or
  // other fields have been initialized.
  if (!obj->partially_loaded()) {
    guarantee(m->method()->is_perm(), "should be in permspace");
    guarantee(m->method()->is_method(), "should be method");
    typeArrayOop stackmap_data = m->stackmap_data();
    guarantee(stackmap_data == NULL ||
              stackmap_data->is_perm(),  "should be in permspace");
    guarantee(m->exception_table()->is_perm(), "should be in permspace");
    guarantee(m->exception_table()->is_typeArray(), "should be type array");

    address m_end = (address)((oop*) m + m->size());
    address compressed_table_start = m->code_end();
    guarantee(compressed_table_start <= m_end, "invalid method layout");
    address compressed_table_end = compressed_table_start;
    // Verify line number table
    if (m->has_linenumber_table()) {
      CompressedLineNumberReadStream stream(m->compressed_linenumber_table());
      while (stream.read_pair()) {
        guarantee(stream.bci() >= 0 && stream.bci() <= m->code_size(), "invalid bci in line number table");
      }
      compressed_table_end += stream.position();
    }
    guarantee(compressed_table_end <= m_end, "invalid method layout");
    // Verify checked exceptions and local variable tables
    if (m->has_checked_exceptions()) {
      u2* addr = m->checked_exceptions_length_addr();
      guarantee(*addr > 0 && (address) addr >= compressed_table_end && (address) addr < m_end, "invalid method layout");
    }
    if (m->has_localvariable_table()) {
      u2* addr = m->localvariable_table_length_addr();
      guarantee(*addr > 0 && (address) addr >= compressed_table_end && (address) addr < m_end, "invalid method layout");
    }
    // Check compressed_table_end relative to uncompressed_table_start
    u2* uncompressed_table_start;
    if (m->has_localvariable_table()) {
      uncompressed_table_start = (u2*) m->localvariable_table_start();
    } else {
      if (m->has_checked_exceptions()) {
        uncompressed_table_start = (u2*) m->checked_exceptions_start();
      } else {
        uncompressed_table_start = (u2*) m_end;
      }
    }
    int gap = (intptr_t) uncompressed_table_start - (intptr_t) compressed_table_end;
    int max_gap = align_object_size(1)*BytesPerWord;
    guarantee(gap >= 0 && gap < max_gap, "invalid method layout");
  }
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:55,代码来源:constMethodKlass.cpp

示例3: oop_oop_iterate

int constMethodKlass::oop_oop_iterate(oop obj, OopClosure* blk) {
  assert (obj->is_constMethod(), "object must be constMethod");
  constMethodOop cm = constMethodOop(obj);
  blk->do_oop(cm->adr_method());
  blk->do_oop(cm->adr_stackmap_data());
  blk->do_oop(cm->adr_exception_table());
  // Get size before changing pointers.
  // Don't call size() or oop_size() since that is a virtual call.
  int size = cm->object_size();
  return size;
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:11,代码来源:constMethodKlass.cpp

示例4: oop_adjust_pointers

int constMethodKlass::oop_adjust_pointers(oop obj) {
  assert(obj->is_constMethod(), "should be constMethod");
  constMethodOop cm = constMethodOop(obj);
  MarkSweep::adjust_pointer(cm->adr_method());
  MarkSweep::adjust_pointer(cm->adr_stackmap_data());
  MarkSweep::adjust_pointer(cm->adr_exception_table());
  // Get size before changing pointers.
  // Don't call size() or oop_size() since that is a virtual call.
  int size = cm->object_size();
  // Performance tweak: We skip iterating over the klass pointer since we
  // know that Universe::constMethodKlassObj never moves.
  return size;
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:13,代码来源:constMethodKlass.cpp

示例5: classify_object

object_type ClassifyObjectClosure::classify_object(oop obj, bool count) {
  object_type type = unknown_type;

  Klass* k = obj->blueprint();

  if (k->as_klassOop() == SystemDictionary::Object_klass()) {
    tty->print_cr("Found the class!");
  }

  if (count) {
    k->set_alloc_count(k->alloc_count() + 1);
  }

  if (obj->is_instance()) {
    if (k->oop_is_instanceRef()) {
      type = instanceRef_type;
    } else {
      type = instance_type;
    }
  } else if (obj->is_typeArray()) {
    type = typeArray_type;
  } else if (obj->is_objArray()) {
    type = objArray_type;
  } else if (obj->is_symbol()) {
    type = symbol_type;
  } else if (obj->is_klass()) {
    Klass* k = ((klassOop)obj)->klass_part();
    if (k->oop_is_instance()) {
      type = instanceKlass_type;
    } else {
      type = klass_type;
    }
  } else if (obj->is_method()) {
    type = method_type;
  } else if (obj->is_constMethod()) {
    type = constMethod_type;
  } else if (obj->is_methodData()) {
    ShouldNotReachHere();
  } else if (obj->is_constantPool()) {
    type = constantPool_type;
  } else if (obj->is_constantPoolCache()) {
    type = constantPoolCache_type;
  } else if (obj->is_compiledICHolder()) {
    type = compiledICHolder_type;
  } else {
    ShouldNotReachHere();
  }

  assert(type != unknown_type, "found object of unknown type.");
  return type;
}
开发者ID:tetratec,项目名称:Runescape-Launcher,代码行数:51,代码来源:classify.cpp

示例6: oop_print_on

void constMethodKlass::oop_print_on(oop obj, outputStream* st) {
  ResourceMark rm;
  assert(obj->is_constMethod(), "must be constMethod");
  Klass::oop_print_on(obj, st);
  constMethodOop m = constMethodOop(obj);
  st->print(" - method:       " INTPTR_FORMAT " ", (address)m->method());
  m->method()->print_value_on(st); st->cr();
  st->print(" - exceptions:   " INTPTR_FORMAT "\n", (address)m->exception_table());
  if (m->has_stackmap_table()) {
    st->print(" - stackmap data:       ");
    m->stackmap_data()->print_value_on(st);
    st->cr();
  }
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:14,代码来源:constMethodKlass.cpp

示例7: oop_update_pointers

int constMethodKlass::oop_update_pointers(ParCompactionManager* cm, oop obj,
                                          HeapWord* beg_addr,
                                          HeapWord* end_addr) {
  assert(obj->is_constMethod(), "should be constMethod");
  constMethodOop cm_oop = constMethodOop(obj);

  oop* const beg_oop = MAX2((oop*)beg_addr, cm_oop->oop_block_beg());
  oop* const end_oop = MIN2((oop*)end_addr, cm_oop->oop_block_end());
  for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) {
    PSParallelCompact::adjust_pointer(cur_oop);
  }

  return cm_oop->object_size();
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:14,代码来源:constMethodKlass.cpp

示例8: oop_oop_iterate_m

int constMethodKlass::oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) {
  assert (obj->is_constMethod(), "object must be constMethod");
  constMethodOop cm = constMethodOop(obj);
  oop* adr;
  adr = cm->adr_method();
  if (mr.contains(adr)) blk->do_oop(adr);
  adr = cm->adr_stackmap_data();
  if (mr.contains(adr)) blk->do_oop(adr);
  adr = cm->adr_exception_table();
  if (mr.contains(adr)) blk->do_oop(adr);
  // Get size before changing pointers.
  // Don't call size() or oop_size() since that is a virtual call.
  int size = cm->object_size();
  // Performance tweak: We skip iterating over the klass pointer since we
  // know that Universe::constMethodKlassObj never moves.
  return size;
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:17,代码来源:constMethodKlass.cpp

示例9: do_object

  void do_object(oop obj) {

    // Mark all constMethod objects.

    if (obj->is_constMethod()) {
      mark_object(obj);
      mark_object(constMethodOop(obj)->stackmap_data());
      // Exception tables are needed by ci code during compilation.
      mark_object(constMethodOop(obj)->exception_table());
    }

    // Mark objects referenced by klass objects which are read-only.

    else if (obj->is_klass()) {
      Klass* k = Klass::cast((klassOop)obj);
      mark_object(k->secondary_supers());

      // The METHODS() OBJARRAYS CANNOT BE MADE READ-ONLY, even though
      // it is never modified. Otherwise, they will be pre-marked; the
      // GC marking phase will skip them; and by skipping them will fail
      // to mark the methods objects referenced by the array.

      if (obj->blueprint()->oop_is_instanceKlass()) {
        instanceKlass* ik = instanceKlass::cast((klassOop)obj);
        mark_object(ik->method_ordering());
        mark_object(ik->local_interfaces());
        mark_object(ik->transitive_interfaces());
        mark_object(ik->fields());

        mark_object(ik->class_annotations());

        mark_object_recursive_skipping_klasses(ik->fields_annotations());
        mark_object_recursive_skipping_klasses(ik->methods_annotations());
        mark_object_recursive_skipping_klasses(ik->methods_parameter_annotations());
        mark_object_recursive_skipping_klasses(ik->methods_default_annotations());

        typeArrayOop inner_classes = ik->inner_classes();
        if (inner_classes != NULL) {
          mark_object(inner_classes);
        }
      }
    }
  }
开发者ID:ericbbcc,项目名称:hotspot,代码行数:43,代码来源:dump.cpp

示例10: oop_push_contents

void constMethodKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
  assert(obj->is_constMethod(), "should be constMethod");
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:3,代码来源:constMethodKlass.cpp

示例11: oop_print_value_on

// Short version of printing constMethodOop - just print the name of the
// method it belongs to.
void constMethodKlass::oop_print_value_on(oop obj, outputStream* st) {
  assert(obj->is_constMethod(), "must be constMethod");
  constMethodOop m = constMethodOop(obj);
  st->print(" const part of method " );
  m->method()->print_value_on(st);
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:8,代码来源:constMethodKlass.cpp

示例12: oop_is_conc_safe

bool constMethodKlass::oop_is_conc_safe(oop obj) const {
  assert(obj->is_constMethod(), "must be constMethod oop");
  return constMethodOop(obj)->is_conc_safe();
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:4,代码来源:constMethodKlass.cpp

示例13: oop_is_parsable

bool constMethodKlass::oop_is_parsable(oop obj) const {
  assert(obj->is_constMethod(), "must be constMethod oop");
  return constMethodOop(obj)->object_is_parsable();
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:4,代码来源:constMethodKlass.cpp

示例14: oop_size

int constMethodKlass::oop_size(oop obj) const {
  assert(obj->is_constMethod(), "must be constMethod oop");
  return constMethodOop(obj)->object_size();
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:4,代码来源:constMethodKlass.cpp

示例15: oop_set_partially_loaded

// The exception_table is the last field set when loading an object.
void constMethodKlass::oop_set_partially_loaded(oop obj) {
  assert(obj->is_constMethod(), "object must be klass");
  constMethodOop m = constMethodOop(obj);
  // Temporarily set exception_table to point to self
  m->set_exception_table((typeArrayOop)obj);
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:7,代码来源:constMethodKlass.cpp


注:本文中的oop::is_constMethod方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。