Mercurial > hg > graal-compiler
comparison src/share/vm/shark/sharkConstant.cpp @ 7601:606eada1bf86
8005820: Shark: enable JSR292 support
Reviewed-by: twisti
Contributed-by: Roman Kennke <rkennke@redhat.com>
author | twisti |
---|---|
date | Fri, 11 Jan 2013 16:47:23 -0800 |
parents | 2cd5e15048e6 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
7600:c095a7f289aa | 7601:606eada1bf86 |
---|---|
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 |