640
641 #ifndef PRODUCT
642 virtual void dump_req(outputStream *st = tty) const;
643 virtual void dump_spec(outputStream *st) const;
644 #endif
645 };
646
647
648 //------------------------------CallJavaNode-----------------------------------
649 // Make a static or dynamic subroutine call node using Java calling
650 // convention. (The "Java" calling convention is the compiler's calling
651 // convention, as opposed to the interpreter's or that of native C.)
652 class CallJavaNode : public CallNode {
653 friend class VMStructs;
654 protected:
655 virtual uint cmp( const Node &n ) const;
656 virtual uint size_of() const; // Size is bigger
657
658 bool _optimized_virtual;
659 bool _method_handle_invoke;
660 ciMethod* _method; // Method being direct called
661 public:
662 const int _bci; // Byte Code Index of call byte code
663 CallJavaNode(const TypeFunc* tf , address addr, ciMethod* method, int bci)
664 : CallNode(tf, addr, TypePtr::BOTTOM),
665 _method(method), _bci(bci),
666 _optimized_virtual(false),
667 _method_handle_invoke(false)
668 {
669 init_class_id(Class_CallJava);
670 }
671
672 virtual int Opcode() const;
673 ciMethod* method() const { return _method; }
674 void set_method(ciMethod *m) { _method = m; }
675 void set_optimized_virtual(bool f) { _optimized_virtual = f; }
676 bool is_optimized_virtual() const { return _optimized_virtual; }
677 void set_method_handle_invoke(bool f) { _method_handle_invoke = f; }
678 bool is_method_handle_invoke() const { return _method_handle_invoke; }
679
680 #ifndef PRODUCT
681 virtual void dump_spec(outputStream *st) const;
682 virtual void dump_compact_spec(outputStream *st) const;
683 #endif
684 };
685
686 //------------------------------CallStaticJavaNode-----------------------------
687 // Make a direct subroutine call using Java calling convention (for static
688 // calls and optimized virtual calls, plus calls to wrappers for run-time
689 // routines); generates static stub.
690 class CallStaticJavaNode : public CallJavaNode {
691 virtual uint cmp( const Node &n ) const;
692 virtual uint size_of() const; // Size is bigger
693 public:
694 CallStaticJavaNode(Compile* C, const TypeFunc* tf, address addr, ciMethod* method, int bci)
695 : CallJavaNode(tf, addr, method, bci) {
696 init_class_id(Class_CallStaticJava);
697 if (C->eliminate_boxing() && (method != NULL) && method->is_boxing_method()) {
698 init_flags(Flag_is_macro);
|
640
641 #ifndef PRODUCT
642 virtual void dump_req(outputStream *st = tty) const;
643 virtual void dump_spec(outputStream *st) const;
644 #endif
645 };
646
647
648 //------------------------------CallJavaNode-----------------------------------
649 // Make a static or dynamic subroutine call node using Java calling
650 // convention. (The "Java" calling convention is the compiler's calling
651 // convention, as opposed to the interpreter's or that of native C.)
652 class CallJavaNode : public CallNode {
653 friend class VMStructs;
654 protected:
655 virtual uint cmp( const Node &n ) const;
656 virtual uint size_of() const; // Size is bigger
657
658 bool _optimized_virtual;
659 bool _method_handle_invoke;
660 bool _override_symbolic_info; // Override symbolic call site info from bytecode
661 ciMethod* _method; // Method being direct called
662 public:
663 const int _bci; // Byte Code Index of call byte code
664 CallJavaNode(const TypeFunc* tf , address addr, ciMethod* method, int bci)
665 : CallNode(tf, addr, TypePtr::BOTTOM),
666 _method(method), _bci(bci),
667 _optimized_virtual(false),
668 _method_handle_invoke(false),
669 _override_symbolic_info(false)
670 {
671 init_class_id(Class_CallJava);
672 }
673
674 virtual int Opcode() const;
675 ciMethod* method() const { return _method; }
676 void set_method(ciMethod *m) { _method = m; }
677 void set_optimized_virtual(bool f) { _optimized_virtual = f; }
678 bool is_optimized_virtual() const { return _optimized_virtual; }
679 void set_method_handle_invoke(bool f) { _method_handle_invoke = f; }
680 bool is_method_handle_invoke() const { return _method_handle_invoke; }
681 void set_override_symbolic_info(bool f) { _override_symbolic_info = f; }
682 bool override_symbolic_info() const { return _override_symbolic_info; }
683
684 #ifndef PRODUCT
685 virtual void dump_spec(outputStream *st) const;
686 virtual void dump_compact_spec(outputStream *st) const;
687 #endif
688 };
689
690 //------------------------------CallStaticJavaNode-----------------------------
691 // Make a direct subroutine call using Java calling convention (for static
692 // calls and optimized virtual calls, plus calls to wrappers for run-time
693 // routines); generates static stub.
694 class CallStaticJavaNode : public CallJavaNode {
695 virtual uint cmp( const Node &n ) const;
696 virtual uint size_of() const; // Size is bigger
697 public:
698 CallStaticJavaNode(Compile* C, const TypeFunc* tf, address addr, ciMethod* method, int bci)
699 : CallJavaNode(tf, addr, method, bci) {
700 init_class_id(Class_CallStaticJava);
701 if (C->eliminate_boxing() && (method != NULL) && method->is_boxing_method()) {
702 init_flags(Flag_is_macro);
|