comparison src/share/vm/opto/graphKit.hpp @ 13086:096c224171c4

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Wed, 20 Nov 2013 00:10:38 +0100
parents b2ee5dc63353
children de6a9e811145 2113136690bc
comparison
equal deleted inserted replaced
12782:92b7ec34ddfa 13086:096c224171c4
376 376
377 // Null check oop. Return null-path control into (*null_control). 377 // Null check oop. Return null-path control into (*null_control).
378 // Return a cast-not-null node which depends on the not-null control. 378 // Return a cast-not-null node which depends on the not-null control.
379 // If never_see_null, use an uncommon trap (*null_control sees a top). 379 // If never_see_null, use an uncommon trap (*null_control sees a top).
380 // The cast is not valid along the null path; keep a copy of the original. 380 // The cast is not valid along the null path; keep a copy of the original.
381 // If safe_for_replace, then we can replace the value with the cast
382 // in the parsing map (the cast is guaranteed to dominate the map)
381 Node* null_check_oop(Node* value, Node* *null_control, 383 Node* null_check_oop(Node* value, Node* *null_control,
382 bool never_see_null = false); 384 bool never_see_null = false, bool safe_for_replace = false);
383 385
384 // Check the null_seen bit. 386 // Check the null_seen bit.
385 bool seems_never_null(Node* obj, ciProfileData* data); 387 bool seems_never_null(Node* obj, ciProfileData* data);
386 388
389 // Check for unique class for receiver at call
390 ciKlass* profile_has_unique_klass() {
391 ciCallProfile profile = method()->call_profile_at_bci(bci());
392 if (profile.count() >= 0 && // no cast failures here
393 profile.has_receiver(0) &&
394 profile.morphism() == 1) {
395 return profile.receiver(0);
396 }
397 return NULL;
398 }
399
400 // record type from profiling with the type system
401 Node* record_profile_for_speculation(Node* n, ciKlass* exact_kls);
402 Node* record_profiled_receiver_for_speculation(Node* n);
403 void record_profiled_arguments_for_speculation(ciMethod* dest_method, Bytecodes::Code bc);
404 void record_profiled_parameters_for_speculation();
405
387 // Use the type profile to narrow an object type. 406 // Use the type profile to narrow an object type.
388 Node* maybe_cast_profiled_receiver(Node* not_null_obj, 407 Node* maybe_cast_profiled_receiver(Node* not_null_obj,
389 ciProfileData* data, 408 ciKlass* require_klass,
390 ciKlass* require_klass); 409 ciKlass* spec,
410 bool safe_for_replace);
411
412 // Cast obj to type and emit guard unless we had too many traps here already
413 Node* maybe_cast_profiled_obj(Node* obj,
414 ciKlass* type,
415 bool not_null = false);
391 416
392 // Cast obj to not-null on this path 417 // Cast obj to not-null on this path
393 Node* cast_not_null(Node* obj, bool do_replace_in_map = true); 418 Node* cast_not_null(Node* obj, bool do_replace_in_map = true);
394 // Replace all occurrences of one node by another. 419 // Replace all occurrences of one node by another.
395 void replace_in_map(Node* old, Node* neww); 420 void replace_in_map(Node* old, Node* neww);
771 // helper functions for the fast path/slow path idioms 796 // helper functions for the fast path/slow path idioms
772 Node* fast_and_slow(Node* in, const Type *result_type, Node* null_result, IfNode* fast_test, Node* fast_result, address slow_call, const TypeFunc *slow_call_type, Node* slow_arg, Klass* ex_klass, Node* slow_result); 797 Node* fast_and_slow(Node* in, const Type *result_type, Node* null_result, IfNode* fast_test, Node* fast_result, address slow_call, const TypeFunc *slow_call_type, Node* slow_arg, Klass* ex_klass, Node* slow_result);
773 798
774 // Generate an instance-of idiom. Used by both the instance-of bytecode 799 // Generate an instance-of idiom. Used by both the instance-of bytecode
775 // and the reflective instance-of call. 800 // and the reflective instance-of call.
776 Node* gen_instanceof( Node *subobj, Node* superkls ); 801 Node* gen_instanceof(Node *subobj, Node* superkls, bool safe_for_replace = false);
777 802
778 // Generate a check-cast idiom. Used by both the check-cast bytecode 803 // Generate a check-cast idiom. Used by both the check-cast bytecode
779 // and the array-store bytecode 804 // and the array-store bytecode
780 Node* gen_checkcast( Node *subobj, Node* superkls, 805 Node* gen_checkcast( Node *subobj, Node* superkls,
781 Node* *failure_control = NULL ); 806 Node* *failure_control = NULL );