< prev index next >

hotspot/src/share/vm/c1/c1_CodeStubs.hpp

Print this page
rev 10453 : imported patch update dates
   1 /*
   2  * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  60   virtual bool is_divbyzero_stub() const         { return false; }
  61 #ifndef PRODUCT
  62   virtual void print_name(outputStream* out) const = 0;
  63 #endif
  64 
  65   // label access
  66   Label* entry()                                 { return &_entry; }
  67   Label* continuation()                          { return &_continuation; }
  68   // for LIR
  69   virtual void visit(LIR_OpVisitState* visit) {
  70 #ifndef PRODUCT
  71     if (LIRTracePeephole && Verbose) {
  72       tty->print("no visitor for ");
  73       print_name(tty);
  74       tty->cr();
  75     }
  76 #endif
  77   }
  78 };
  79 
  80 
  81 define_array(CodeStubArray, CodeStub*)
  82 define_stack(_CodeStubList, CodeStubArray)
  83 
  84 class CodeStubList: public _CodeStubList {
  85  public:
  86   CodeStubList(): _CodeStubList() {}
  87 
  88   void append(CodeStub* stub) {
  89     if (!contains(stub)) {
  90       _CodeStubList::append(stub);
  91     }
  92   }
  93 };
  94 
  95 class CounterOverflowStub: public CodeStub {
  96  private:
  97   CodeEmitInfo* _info;
  98   int           _bci;
  99   LIR_Opr       _method;
 100 
 101 public:
 102   CounterOverflowStub(CodeEmitInfo* info, int bci, LIR_Opr method) :  _info(info), _bci(bci), _method(method) {
 103   }
 104 
 105   virtual void emit_code(LIR_Assembler* e);
 106 
 107   virtual void visit(LIR_OpVisitState* visitor) {
 108     visitor->do_slow_case(_info);
 109     visitor->do_input(_method);
 110   }


   1 /*
   2  * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


  60   virtual bool is_divbyzero_stub() const         { return false; }
  61 #ifndef PRODUCT
  62   virtual void print_name(outputStream* out) const = 0;
  63 #endif
  64 
  65   // label access
  66   Label* entry()                                 { return &_entry; }
  67   Label* continuation()                          { return &_continuation; }
  68   // for LIR
  69   virtual void visit(LIR_OpVisitState* visit) {
  70 #ifndef PRODUCT
  71     if (LIRTracePeephole && Verbose) {
  72       tty->print("no visitor for ");
  73       print_name(tty);
  74       tty->cr();
  75     }
  76 #endif
  77   }
  78 };
  79 
  80 class CodeStubList: public GrowableArray<CodeStub*> {




  81  public:
  82   CodeStubList(): GrowableArray<CodeStub*>() {}
  83 
  84   void append(CodeStub* stub) {
  85     if (!contains(stub)) {
  86       GrowableArray<CodeStub*>::append(stub);
  87     }
  88   }
  89 };
  90 
  91 class CounterOverflowStub: public CodeStub {
  92  private:
  93   CodeEmitInfo* _info;
  94   int           _bci;
  95   LIR_Opr       _method;
  96 
  97 public:
  98   CounterOverflowStub(CodeEmitInfo* info, int bci, LIR_Opr method) :  _info(info), _bci(bci), _method(method) {
  99   }
 100 
 101   virtual void emit_code(LIR_Assembler* e);
 102 
 103   virtual void visit(LIR_OpVisitState* visitor) {
 104     visitor->do_slow_case(_info);
 105     visitor->do_input(_method);
 106   }


< prev index next >