Print this page
rev 1082 : [mq]: indy.compiler.patch

Split Close
Expand all
Collapse all
          --- old/src/share/vm/opto/type.cpp
          +++ new/src/share/vm/opto/type.cpp
↓ open down ↓ 2423 lines elided ↑ open up ↑
2424 2424      return arr;
2425 2425    } else {
2426 2426      ShouldNotReachHere();
2427 2427      return NULL;
2428 2428    }
2429 2429  }
2430 2430  
2431 2431  //------------------------------make_from_constant-----------------------------
2432 2432  // Make a java pointer from an oop constant
2433 2433  const TypeOopPtr* TypeOopPtr::make_from_constant(ciObject* o, bool require_constant) {
2434      -  if (o->is_method_data() || o->is_method()) {
     2434 +  if (o->is_method_data() || o->is_method() || o->is_cpcache()) {
2435 2435      // Treat much like a typeArray of bytes, like below, but fake the type...
2436 2436      const Type* etype = (Type*)get_const_basic_type(T_BYTE);
2437 2437      const TypeAry* arr0 = TypeAry::make(etype, TypeInt::POS);
2438 2438      ciKlass *klass = ciTypeArrayKlass::make((BasicType) T_BYTE);
2439 2439      assert(o->can_be_constant(), "method data oops should be tenured");
2440 2440      const TypeAryPtr* arr = TypeAryPtr::make(TypePtr::Constant, o, arr0, klass, true, 0);
2441 2441      return arr;
2442 2442    } else {
2443 2443      assert(o->is_java_object(), "must be java language object");
2444 2444      assert(!o->is_null_object(), "null object not yet handled here.");
↓ open down ↓ 1514 lines elided ↑ open up ↑
3959 3959  const TypeFunc *TypeFunc::make( const TypeTuple *domain, const TypeTuple *range ) {
3960 3960    return (TypeFunc*)(new TypeFunc(domain,range))->hashcons();
3961 3961  }
3962 3962  
3963 3963  //------------------------------make-------------------------------------------
3964 3964  const TypeFunc *TypeFunc::make(ciMethod* method) {
3965 3965    Compile* C = Compile::current();
3966 3966    const TypeFunc* tf = C->last_tf(method); // check cache
3967 3967    if (tf != NULL)  return tf;  // The hit rate here is almost 50%.
3968 3968    const TypeTuple *domain;
3969      -  if (method->flags().is_static()) {
     3969 +  if (method->is_static()) {
3970 3970      domain = TypeTuple::make_domain(NULL, method->signature());
3971 3971    } else {
3972 3972      domain = TypeTuple::make_domain(method->holder(), method->signature());
3973 3973    }
3974 3974    const TypeTuple *range  = TypeTuple::make_range(method->signature());
3975 3975    tf = TypeFunc::make(domain, range);
3976 3976    C->set_last_tf(method, tf);  // fill cache
3977 3977    return tf;
3978 3978  }
3979 3979  
↓ open down ↓ 120 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX