Mercurial > hg > truffle
comparison src/share/vm/shark/sharkConstant.cpp @ 7643:3ac7d10a6572
Merge with hsx25/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 31 Jan 2013 15:42:25 +0100 |
parents | 606eada1bf86 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
7573:17b6a63fe7c2 | 7643:3ac7d10a6572 |
---|---|
35 SharkConstant* SharkConstant::for_ldc(ciBytecodeStream *iter) { | 35 SharkConstant* SharkConstant::for_ldc(ciBytecodeStream *iter) { |
36 ciConstant constant = iter->get_constant(); | 36 ciConstant constant = iter->get_constant(); |
37 ciType *type = NULL; | 37 ciType *type = NULL; |
38 if (constant.basic_type() == T_OBJECT) { | 38 if (constant.basic_type() == T_OBJECT) { |
39 ciEnv *env = ciEnv::current(); | 39 ciEnv *env = ciEnv::current(); |
40 assert(constant.as_object()->klass() == env->String_klass() || constant.as_object()->klass() == env->Class_klass(), "should be"); | 40 |
41 assert(constant.as_object()->klass() == env->String_klass() | |
42 || constant.as_object()->klass() == env->Class_klass() | |
43 || constant.as_object()->klass()->is_subtype_of(env->MethodType_klass()) | |
44 || constant.as_object()->klass()->is_subtype_of(env->MethodHandle_klass()), "should be"); | |
45 | |
41 type = constant.as_object()->klass(); | 46 type = constant.as_object()->klass(); |
42 } | 47 } |
43 return new SharkConstant(constant, type); | 48 return new SharkConstant(constant, type); |
44 } | 49 } |
45 | 50 |