comparison src/share/vm/opto/callnode.cpp @ 17937:78bbf4d43a14

8037816: Fix for 8036122 breaks build with Xcode5/clang 8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas 8043164: Format warning in traceStream.hpp Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings Reviewed-by: kvn, coleenp, iveresov, twisti
author drchase
date Thu, 22 May 2014 15:52:41 -0400
parents a9becfeecd1b
children 0bf37f737702
comparison
equal deleted inserted replaced
17935:7384f6a12fc1 17937:78bbf4d43a14
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
109 }; 109 };
110 110
111 #ifndef PRODUCT 111 #ifndef PRODUCT
112 void ParmNode::dump_spec(outputStream *st) const { 112 void ParmNode::dump_spec(outputStream *st) const {
113 if( _con < TypeFunc::Parms ) { 113 if( _con < TypeFunc::Parms ) {
114 st->print(names[_con]); 114 st->print("%s", names[_con]);
115 } else { 115 } else {
116 st->print("Parm%d: ",_con-TypeFunc::Parms); 116 st->print("Parm%d: ",_con-TypeFunc::Parms);
117 // Verbose and WizardMode dump bottom_type for all nodes 117 // Verbose and WizardMode dump bottom_type for all nodes
118 if( !Verbose && !WizardMode ) bottom_type()->dump_on(st); 118 if( !Verbose && !WizardMode ) bottom_type()->dump_on(st);
119 } 119 }
345 assert( t == TypePtr::NULL_PTR || n->in_dump(), "" ); 345 assert( t == TypePtr::NULL_PTR || n->in_dump(), "" );
346 st->print(" %s%d]=#NULL",msg,i); 346 st->print(" %s%d]=#NULL",msg,i);
347 break; 347 break;
348 case Type::AryPtr: 348 case Type::AryPtr:
349 case Type::InstPtr: 349 case Type::InstPtr:
350 st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,t->isa_oopptr()->const_oop()); 350 st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,p2i(t->isa_oopptr()->const_oop()));
351 break; 351 break;
352 case Type::KlassPtr: 352 case Type::KlassPtr:
353 st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,t->make_ptr()->isa_klassptr()->klass()); 353 st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,p2i(t->make_ptr()->isa_klassptr()->klass()));
354 break; 354 break;
355 case Type::MetadataPtr: 355 case Type::MetadataPtr:
356 st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,t->make_ptr()->isa_metadataptr()->metadata()); 356 st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,p2i(t->make_ptr()->isa_metadataptr()->metadata()));
357 break; 357 break;
358 case Type::NarrowOop: 358 case Type::NarrowOop:
359 st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,t->make_ptr()->isa_oopptr()->const_oop()); 359 st->print(" %s%d]=#Ptr" INTPTR_FORMAT,msg,i,p2i(t->make_ptr()->isa_oopptr()->const_oop()));
360 break; 360 break;
361 case Type::RawPtr: 361 case Type::RawPtr:
362 st->print(" %s%d]=#Raw" INTPTR_FORMAT,msg,i,t->is_rawptr()); 362 st->print(" %s%d]=#Raw" INTPTR_FORMAT,msg,i,p2i(t->is_rawptr()));
363 break; 363 break;
364 case Type::DoubleCon: 364 case Type::DoubleCon:
365 st->print(" %s%d]=#%fD",msg,i,t->is_double_constant()->_d); 365 st->print(" %s%d]=#%fD",msg,i,t->is_double_constant()->_d);
366 break; 366 break;
367 case Type::FloatCon: 367 case Type::FloatCon:
368 st->print(" %s%d]=#%fF",msg,i,t->is_float_constant()->_f); 368 st->print(" %s%d]=#%fF",msg,i,t->is_float_constant()->_f);
369 break; 369 break;
370 case Type::Long: 370 case Type::Long:
371 st->print(" %s%d]=#"INT64_FORMAT,msg,i,t->is_long()->get_con()); 371 st->print(" %s%d]=#"INT64_FORMAT,msg,i,(int64_t)(t->is_long()->get_con()));
372 break; 372 break;
373 case Type::Half: 373 case Type::Half:
374 case Type::Top: 374 case Type::Top:
375 st->print(" %s%d]=_",msg,i); 375 st->print(" %s%d]=_",msg,i);
376 break; 376 break;
425 format_helper(regalloc, st, obj, obj_msg, i, &scobjs); 425 format_helper(regalloc, st, obj, obj_msg, i, &scobjs);
426 } 426 }
427 427
428 for (i = 0; i < (uint)scobjs.length(); i++) { 428 for (i = 0; i < (uint)scobjs.length(); i++) {
429 // Scalar replaced objects. 429 // Scalar replaced objects.
430 st->print_cr(""); 430 st->cr();
431 st->print(" # ScObj" INT32_FORMAT " ", i); 431 st->print(" # ScObj" INT32_FORMAT " ", i);
432 SafePointScalarObjectNode* spobj = scobjs.at(i); 432 SafePointScalarObjectNode* spobj = scobjs.at(i);
433 ciKlass* cik = spobj->bottom_type()->is_oopptr()->klass(); 433 ciKlass* cik = spobj->bottom_type()->is_oopptr()->klass();
434 assert(cik->is_instance_klass() || 434 assert(cik->is_instance_klass() ||
435 cik->is_array_klass(), "Not supported allocation."); 435 cik->is_array_klass(), "Not supported allocation.");
482 } 482 }
483 } 483 }
484 st->print(" }"); 484 st->print(" }");
485 } 485 }
486 } 486 }
487 st->print_cr(""); 487 st->cr();
488 if (caller() != NULL) caller()->format(regalloc, n, st); 488 if (caller() != NULL) caller()->format(regalloc, n, st);
489 } 489 }
490 490
491 491
492 void JVMState::dump_spec(outputStream *st) const { 492 void JVMState::dump_spec(outputStream *st) const {
945 return CallNode::cmp(call) && !strcmp(_name,call._name); 945 return CallNode::cmp(call) && !strcmp(_name,call._name);
946 } 946 }
947 #ifndef PRODUCT 947 #ifndef PRODUCT
948 void CallRuntimeNode::dump_spec(outputStream *st) const { 948 void CallRuntimeNode::dump_spec(outputStream *st) const {
949 st->print("# "); 949 st->print("# ");
950 st->print(_name); 950 st->print("%s", _name);
951 CallNode::dump_spec(st); 951 CallNode::dump_spec(st);
952 } 952 }
953 #endif 953 #endif
954 954
955 //------------------------------calling_convention----------------------------- 955 //------------------------------calling_convention-----------------------------
963 963
964 //============================================================================= 964 //=============================================================================
965 #ifndef PRODUCT 965 #ifndef PRODUCT
966 void CallLeafNode::dump_spec(outputStream *st) const { 966 void CallLeafNode::dump_spec(outputStream *st) const {
967 st->print("# "); 967 st->print("# ");
968 st->print(_name); 968 st->print("%s", _name);
969 CallNode::dump_spec(st); 969 CallNode::dump_spec(st);
970 } 970 }
971 #endif 971 #endif
972 972
973 //============================================================================= 973 //=============================================================================