Mercurial > hg > truffle
comparison src/share/vm/opto/library_call.cpp @ 12190:edb5ab0f3fe5
8001107: @Stable annotation for constant folding of lazily evaluated variables
Reviewed-by: rbackman, twisti, kvn
Contributed-by: john.r.rose@oracle.com, vladimir.x.ivanov@oracle.com
author | vlivanov |
---|---|
date | Tue, 10 Sep 2013 14:51:48 -0700 |
parents | 29aa8936f03c |
children | 884ed7a10f09 b2e698d2276c |
comparison
equal
deleted
inserted
replaced
12188:cd16d587b0fa | 12190:edb5ab0f3fe5 |
---|---|
1278 Node* target = _gvn.transform( makecon(TypeOopPtr::make_from_constant(target_array, true))); | 1278 Node* target = _gvn.transform( makecon(TypeOopPtr::make_from_constant(target_array, true))); |
1279 jint target_length = target_array->length(); | 1279 jint target_length = target_array->length(); |
1280 const TypeAry* target_array_type = TypeAry::make(TypeInt::CHAR, TypeInt::make(0, target_length, Type::WidenMin)); | 1280 const TypeAry* target_array_type = TypeAry::make(TypeInt::CHAR, TypeInt::make(0, target_length, Type::WidenMin)); |
1281 const TypeAryPtr* target_type = TypeAryPtr::make(TypePtr::BotPTR, target_array_type, target_array->klass(), true, Type::OffsetBot); | 1281 const TypeAryPtr* target_type = TypeAryPtr::make(TypePtr::BotPTR, target_array_type, target_array->klass(), true, Type::OffsetBot); |
1282 | 1282 |
1283 // String.value field is known to be @Stable. | |
1284 if (UseImplicitStableValues) { | |
1285 target = cast_array_to_stable(target, target_type); | |
1286 } | |
1287 | |
1283 IdealKit kit(this, false, true); | 1288 IdealKit kit(this, false, true); |
1284 #define __ kit. | 1289 #define __ kit. |
1285 Node* zero = __ ConI(0); | 1290 Node* zero = __ ConI(0); |
1286 Node* one = __ ConI(1); | 1291 Node* one = __ ConI(1); |
1287 Node* cache = __ ConI(cache_i); | 1292 Node* cache = __ ConI(cache_i); |