Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/systemDictionary.cpp @ 6751:2a48c84f1d04
7197269: NPG: FollowReferences has no ClassLoader -> Class link to follow
Summary: restore java/lang/ClassLoader.addClass() upcall
Reviewed-by: sspitsyn, dcubed, jmasa
author | coleenp |
---|---|
date | Mon, 17 Sep 2012 10:46:59 -0400 |
parents | aed758eda82a |
children | f6b0eb4e44cf d8ce2825b193 |
comparison
equal
deleted
inserted
replaced
6750:859cd1a76f8a | 6751:2a48c84f1d04 |
---|---|
1493 // which will require a token to perform the define class | 1493 // which will require a token to perform the define class |
1494 Symbol* name_h = k->name(); | 1494 Symbol* name_h = k->name(); |
1495 unsigned int d_hash = dictionary()->compute_hash(name_h, loader_data); | 1495 unsigned int d_hash = dictionary()->compute_hash(name_h, loader_data); |
1496 int d_index = dictionary()->hash_to_index(d_hash); | 1496 int d_index = dictionary()->hash_to_index(d_hash); |
1497 check_constraints(d_index, d_hash, k, class_loader_h, true, CHECK); | 1497 check_constraints(d_index, d_hash, k, class_loader_h, true, CHECK); |
1498 | |
1499 // Register class just loaded with class loader (placed in Vector) | |
1500 // Note we do this before updating the dictionary, as this can | |
1501 // fail with an OutOfMemoryError (if it does, we will *not* put this | |
1502 // class in the dictionary and will not update the class hierarchy). | |
1503 // JVMTI FollowReferences needs to find the classes this way. | |
1504 if (k->class_loader() != NULL) { | |
1505 methodHandle m(THREAD, Universe::loader_addClass_method()); | |
1506 JavaValue result(T_VOID); | |
1507 JavaCallArguments args(class_loader_h); | |
1508 args.push_oop(Handle(THREAD, k->java_mirror())); | |
1509 JavaCalls::call(&result, m, &args, CHECK); | |
1510 } | |
1498 | 1511 |
1499 // Add the new class. We need recompile lock during update of CHA. | 1512 // Add the new class. We need recompile lock during update of CHA. |
1500 { | 1513 { |
1501 unsigned int p_hash = placeholders()->compute_hash(name_h, loader_data); | 1514 unsigned int p_hash = placeholders()->compute_hash(name_h, loader_data); |
1502 int p_index = placeholders()->hash_to_index(p_hash); | 1515 int p_index = placeholders()->hash_to_index(p_hash); |