comparison src/share/vm/graal/graalCodeInstaller.cpp @ 18319:56cc1a799a60

(re)converted Value to an interface
author Doug Simon <doug.simon@oracle.com>
date Fri, 07 Nov 2014 22:00:11 +0100
parents ae181ec869c5
children 23a2faa68470
comparison
equal deleted inserted replaced
18305:da76d42c397e 18319:56cc1a799a60
189 // Records any Metadata values embedded in a Constant (e.g., the value returned by HotSpotResolvedObjectTypeImpl.klass()). 189 // Records any Metadata values embedded in a Constant (e.g., the value returned by HotSpotResolvedObjectTypeImpl.klass()).
190 static void record_metadata_in_constant(oop constant, OopRecorder* oop_recorder) { 190 static void record_metadata_in_constant(oop constant, OopRecorder* oop_recorder) {
191 if (constant->is_a(HotSpotMetaspaceConstantImpl::klass())) { 191 if (constant->is_a(HotSpotMetaspaceConstantImpl::klass())) {
192 oop obj = HotSpotMetaspaceConstantImpl::metaspaceObject(constant); 192 oop obj = HotSpotMetaspaceConstantImpl::metaspaceObject(constant);
193 jlong prim = HotSpotMetaspaceConstantImpl::primitive(constant); 193 jlong prim = HotSpotMetaspaceConstantImpl::primitive(constant);
194 assert(Kind::typeChar(Value::kind(constant)) == 'j', "must have word kind"); 194 assert(Kind::typeChar(AbstractValue::kind(constant)) == 'j', "must have word kind");
195 assert(obj != NULL, "must have an object"); 195 assert(obj != NULL, "must have an object");
196 assert(prim != 0, "must have a primitive value"); 196 assert(prim != 0, "must have a primitive value");
197 197
198 record_metadata_reference(obj, prim, false, oop_recorder); 198 record_metadata_reference(obj, prim, false, oop_recorder);
199 } 199 }
203 record_metadata_reference(HotSpotMetaspaceConstantImpl::metaspaceObject(constant), HotSpotMetaspaceConstantImpl::primitive(constant), HotSpotMetaspaceConstantImpl::compressed(constant), oop_recorder); 203 record_metadata_reference(HotSpotMetaspaceConstantImpl::metaspaceObject(constant), HotSpotMetaspaceConstantImpl::primitive(constant), HotSpotMetaspaceConstantImpl::compressed(constant), oop_recorder);
204 } 204 }
205 205
206 ScopeValue* CodeInstaller::get_scope_value(oop value, int total_frame_size, GrowableArray<ScopeValue*>* objects, ScopeValue* &second, OopRecorder* oop_recorder) { 206 ScopeValue* CodeInstaller::get_scope_value(oop value, int total_frame_size, GrowableArray<ScopeValue*>* objects, ScopeValue* &second, OopRecorder* oop_recorder) {
207 second = NULL; 207 second = NULL;
208 if (value == Value::ILLEGAL()) { 208 if (value == AbstractValue::ILLEGAL()) {
209 return _illegal_value; 209 return _illegal_value;
210 } 210 }
211 211
212 oop lirKind = Value::lirKind(value); 212 oop lirKind = AbstractValue::lirKind(value);
213 oop platformKind = LIRKind::platformKind(lirKind); 213 oop platformKind = LIRKind::platformKind(lirKind);
214 jint referenceMask = LIRKind::referenceMask(lirKind); 214 jint referenceMask = LIRKind::referenceMask(lirKind);
215 assert(referenceMask == 0 || referenceMask == 1, "unexpected referenceMask"); 215 assert(referenceMask == 0 || referenceMask == 1, "unexpected referenceMask");
216 bool reference = referenceMask == 1; 216 bool reference = referenceMask == 1;
217 217
801 monitors->append(get_monitor_value(value, _total_frame_size, objects, _oop_recorder)); 801 monitors->append(get_monitor_value(value, _total_frame_size, objects, _oop_recorder));
802 } 802 }
803 if (second != NULL) { 803 if (second != NULL) {
804 i++; 804 i++;
805 assert(i < values->length(), "double-slot value not followed by Value.ILLEGAL"); 805 assert(i < values->length(), "double-slot value not followed by Value.ILLEGAL");
806 assert(values->obj_at(i) == Value::ILLEGAL(), "double-slot value not followed by Value.ILLEGAL"); 806 assert(values->obj_at(i) == AbstractValue::ILLEGAL(), "double-slot value not followed by Value.ILLEGAL");
807 } 807 }
808 } 808 }
809 809
810 _debug_recorder->dump_object_pool(objects); 810 _debug_recorder->dump_object_pool(objects);
811 811