Mercurial > hg > truffle
comparison src/share/vm/runtime/javaCalls.cpp @ 6940:18fb7da42534
8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass
Summary: Change types of above methods and field to InstanceKlass and remove unneeded casts from the source files.
Reviewed-by: dholmes, coleenp, zgu
Contributed-by: harold.seigel@oracle.com
author | coleenp |
---|---|
date | Tue, 06 Nov 2012 15:09:37 -0500 |
parents | da91efe96a93 |
children | e522a00b91aa f34d701e952e |
comparison
equal
deleted
inserted
replaced
6939:c284cf4781f0 | 6940:18fb7da42534 |
---|---|
187 | 187 |
188 void JavaCalls::call_default_constructor(JavaThread* thread, methodHandle method, Handle receiver, TRAPS) { | 188 void JavaCalls::call_default_constructor(JavaThread* thread, methodHandle method, Handle receiver, TRAPS) { |
189 assert(method->name() == vmSymbols::object_initializer_name(), "Should only be called for default constructor"); | 189 assert(method->name() == vmSymbols::object_initializer_name(), "Should only be called for default constructor"); |
190 assert(method->signature() == vmSymbols::void_method_signature(), "Should only be called for default constructor"); | 190 assert(method->signature() == vmSymbols::void_method_signature(), "Should only be called for default constructor"); |
191 | 191 |
192 InstanceKlass* ik = InstanceKlass::cast(method->method_holder()); | 192 InstanceKlass* ik = method->method_holder(); |
193 if (ik->is_initialized() && ik->has_vanilla_constructor()) { | 193 if (ik->is_initialized() && ik->has_vanilla_constructor()) { |
194 // safe to skip constructor call | 194 // safe to skip constructor call |
195 } else { | 195 } else { |
196 static JavaValue result(T_VOID); | 196 static JavaValue result(T_VOID); |
197 JavaCallArguments args(receiver); | 197 JavaCallArguments args(receiver); |
342 return; | 342 return; |
343 } | 343 } |
344 | 344 |
345 | 345 |
346 #ifdef ASSERT | 346 #ifdef ASSERT |
347 { Klass* holder = method->method_holder(); | 347 { InstanceKlass* holder = method->method_holder(); |
348 // A klass might not be initialized since JavaCall's might be used during the executing of | 348 // A klass might not be initialized since JavaCall's might be used during the executing of |
349 // the <clinit>. For example, a Thread.start might start executing on an object that is | 349 // the <clinit>. For example, a Thread.start might start executing on an object that is |
350 // not fully initialized! (bad Java programming style) | 350 // not fully initialized! (bad Java programming style) |
351 assert(InstanceKlass::cast(holder)->is_linked(), "rewritting must have taken place"); | 351 assert(holder->is_linked(), "rewritting must have taken place"); |
352 } | 352 } |
353 #endif | 353 #endif |
354 | 354 |
355 | 355 |
356 assert(!thread->is_Compiler_thread(), "cannot compile from the compiler"); | 356 assert(!thread->is_Compiler_thread(), "cannot compile from the compiler"); |