Mercurial > hg > truffle
comparison src/share/vm/opto/type.cpp @ 1339:09ac706c2623
Merge
author | asaha |
---|---|
date | Wed, 24 Mar 2010 17:16:33 -0700 |
parents | ae4032fb0a5b 97125851f396 |
children | 5b29c2368d93 |
comparison
equal
deleted
inserted
replaced
1338:f5dd08ad65df | 1339:09ac706c2623 |
---|---|
2429 } | 2429 } |
2430 | 2430 |
2431 //------------------------------make_from_constant----------------------------- | 2431 //------------------------------make_from_constant----------------------------- |
2432 // Make a java pointer from an oop constant | 2432 // Make a java pointer from an oop constant |
2433 const TypeOopPtr* TypeOopPtr::make_from_constant(ciObject* o, bool require_constant) { | 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 // Treat much like a typeArray of bytes, like below, but fake the type... | 2435 // Treat much like a typeArray of bytes, like below, but fake the type... |
2436 const Type* etype = (Type*)get_const_basic_type(T_BYTE); | 2436 const Type* etype = (Type*)get_const_basic_type(T_BYTE); |
2437 const TypeAry* arr0 = TypeAry::make(etype, TypeInt::POS); | 2437 const TypeAry* arr0 = TypeAry::make(etype, TypeInt::POS); |
2438 ciKlass *klass = ciTypeArrayKlass::make((BasicType) T_BYTE); | 2438 ciKlass *klass = ciTypeArrayKlass::make((BasicType) T_BYTE); |
2439 assert(o->can_be_constant(), "method data oops should be tenured"); | 2439 assert(o->can_be_constant(), "method data oops should be tenured"); |
3967 const TypeFunc *TypeFunc::make(ciMethod* method) { | 3967 const TypeFunc *TypeFunc::make(ciMethod* method) { |
3968 Compile* C = Compile::current(); | 3968 Compile* C = Compile::current(); |
3969 const TypeFunc* tf = C->last_tf(method); // check cache | 3969 const TypeFunc* tf = C->last_tf(method); // check cache |
3970 if (tf != NULL) return tf; // The hit rate here is almost 50%. | 3970 if (tf != NULL) return tf; // The hit rate here is almost 50%. |
3971 const TypeTuple *domain; | 3971 const TypeTuple *domain; |
3972 if (method->flags().is_static()) { | 3972 if (method->is_static()) { |
3973 domain = TypeTuple::make_domain(NULL, method->signature()); | 3973 domain = TypeTuple::make_domain(NULL, method->signature()); |
3974 } else { | 3974 } else { |
3975 domain = TypeTuple::make_domain(method->holder(), method->signature()); | 3975 domain = TypeTuple::make_domain(method->holder(), method->signature()); |
3976 } | 3976 } |
3977 const TypeTuple *range = TypeTuple::make_range(method->signature()); | 3977 const TypeTuple *range = TypeTuple::make_range(method->signature()); |