530 // Cheat with a preallocated exception object. |
530 // Cheat with a preallocated exception object. |
531 if (C->log() != NULL) |
531 if (C->log() != NULL) |
532 C->log()->elem("hot_throw preallocated='1' reason='%s'", |
532 C->log()->elem("hot_throw preallocated='1' reason='%s'", |
533 Deoptimization::trap_reason_name(reason)); |
533 Deoptimization::trap_reason_name(reason)); |
534 const TypeInstPtr* ex_con = TypeInstPtr::make(ex_obj); |
534 const TypeInstPtr* ex_con = TypeInstPtr::make(ex_obj); |
535 Node* ex_node = _gvn.transform(new (C, 1) ConPNode(ex_con)); |
535 Node* ex_node = _gvn.transform( ConNode::make(C, ex_con) ); |
536 |
536 |
537 // Clear the detail message of the preallocated exception object. |
537 // Clear the detail message of the preallocated exception object. |
538 // Weblogic sometimes mutates the detail message of exceptions |
538 // Weblogic sometimes mutates the detail message of exceptions |
539 // using reflection. |
539 // using reflection. |
540 int offset = java_lang_Throwable::get_detailMessage_offset(); |
540 int offset = java_lang_Throwable::get_detailMessage_offset(); |
1041 Node* GraphKit::load_object_klass(Node* obj) { |
1041 Node* GraphKit::load_object_klass(Node* obj) { |
1042 // Special-case a fresh allocation to avoid building nodes: |
1042 // Special-case a fresh allocation to avoid building nodes: |
1043 Node* akls = AllocateNode::Ideal_klass(obj, &_gvn); |
1043 Node* akls = AllocateNode::Ideal_klass(obj, &_gvn); |
1044 if (akls != NULL) return akls; |
1044 if (akls != NULL) return akls; |
1045 Node* k_adr = basic_plus_adr(obj, oopDesc::klass_offset_in_bytes()); |
1045 Node* k_adr = basic_plus_adr(obj, oopDesc::klass_offset_in_bytes()); |
1046 return _gvn.transform( new (C, 3) LoadKlassNode(0, immutable_memory(), k_adr, TypeInstPtr::KLASS) ); |
1046 return _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), k_adr, TypeInstPtr::KLASS) ); |
1047 } |
1047 } |
1048 |
1048 |
1049 //-------------------------load_array_length----------------------------------- |
1049 //-------------------------load_array_length----------------------------------- |
1050 Node* GraphKit::load_array_length(Node* array) { |
1050 Node* GraphKit::load_array_length(Node* array) { |
1051 // Special-case a fresh allocation to avoid building nodes: |
1051 // Special-case a fresh allocation to avoid building nodes: |
2222 Node *p2 = _gvn.transform( new (C, 4) AddPNode(subklass,subklass,chk_off_X) ); |
2222 Node *p2 = _gvn.transform( new (C, 4) AddPNode(subklass,subklass,chk_off_X) ); |
2223 // For some types like interfaces the following loadKlass is from a 1-word |
2223 // For some types like interfaces the following loadKlass is from a 1-word |
2224 // cache which is mutable so can't use immutable memory. Other |
2224 // cache which is mutable so can't use immutable memory. Other |
2225 // types load from the super-class display table which is immutable. |
2225 // types load from the super-class display table which is immutable. |
2226 Node *kmem = might_be_cache ? memory(p2) : immutable_memory(); |
2226 Node *kmem = might_be_cache ? memory(p2) : immutable_memory(); |
2227 Node *nkls = _gvn.transform( new (C, 3) LoadKlassNode( NULL, kmem, p2, _gvn.type(p2)->is_ptr(), TypeKlassPtr::OBJECT_OR_NULL ) ); |
2227 Node *nkls = _gvn.transform( LoadKlassNode::make( _gvn, kmem, p2, _gvn.type(p2)->is_ptr(), TypeKlassPtr::OBJECT_OR_NULL ) ); |
2228 |
2228 |
2229 // Compile speed common case: ARE a subtype and we canNOT fail |
2229 // Compile speed common case: ARE a subtype and we canNOT fail |
2230 if( superklass == nkls ) |
2230 if( superklass == nkls ) |
2231 return top(); // false path is dead; no test needed. |
2231 return top(); // false path is dead; no test needed. |
2232 |
2232 |
2813 if (ReduceFieldZeroing && !raw_mem_only) { |
2813 if (ReduceFieldZeroing && !raw_mem_only) { |
2814 // Extract memory strands which may participate in the new object's |
2814 // Extract memory strands which may participate in the new object's |
2815 // initialization, and source them from the new InitializeNode. |
2815 // initialization, and source them from the new InitializeNode. |
2816 // This will allow us to observe initializations when they occur, |
2816 // This will allow us to observe initializations when they occur, |
2817 // and link them properly (as a group) to the InitializeNode. |
2817 // and link them properly (as a group) to the InitializeNode. |
2818 Node* klass_node = alloc->in(AllocateNode::KlassNode); |
|
2819 assert(init->in(InitializeNode::Memory) == malloc, ""); |
2818 assert(init->in(InitializeNode::Memory) == malloc, ""); |
2820 MergeMemNode* minit_in = MergeMemNode::make(C, malloc); |
2819 MergeMemNode* minit_in = MergeMemNode::make(C, malloc); |
2821 init->set_req(InitializeNode::Memory, minit_in); |
2820 init->set_req(InitializeNode::Memory, minit_in); |
2822 record_for_igvn(minit_in); // fold it up later, if possible |
2821 record_for_igvn(minit_in); // fold it up later, if possible |
2823 Node* minit_out = memory(rawidx); |
2822 Node* minit_out = memory(rawidx); |