src/share/vm/c1/c1_CodeStubs.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7008809 Sdiff src/share/vm/c1

src/share/vm/c1/c1_CodeStubs.hpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2010, 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  *


 459   }
 460 
 461   void set_obj(LIR_Opr obj) {
 462     _obj = obj;
 463   }
 464 
 465   virtual void emit_code(LIR_Assembler* e);
 466   virtual CodeEmitInfo* info() const             { return _info; }
 467   virtual bool is_exception_throw_stub() const   { return true; }
 468   virtual void visit(LIR_OpVisitState* visitor) {
 469     if (_obj->is_valid()) visitor->do_input(_obj);
 470     visitor->do_slow_case(_info);
 471   }
 472 #ifndef PRODUCT
 473   virtual void print_name(outputStream* out) const { out->print("SimpleExceptionStub"); }
 474 #endif // PRODUCT
 475 };
 476 
 477 
 478 
 479 class ArrayStoreExceptionStub: public CodeStub {
 480  private:
 481   CodeEmitInfo* _info;
 482 
 483  public:
 484   ArrayStoreExceptionStub(CodeEmitInfo* info);
 485   virtual void emit_code(LIR_Assembler* emit);
 486   virtual CodeEmitInfo* info() const             { return _info; }
 487   virtual bool is_exception_throw_stub() const   { return true; }
 488   virtual void visit(LIR_OpVisitState* visitor) {
 489     visitor->do_slow_case(_info);
 490   }
 491 #ifndef PRODUCT
 492   virtual void print_name(outputStream* out) const { out->print("ArrayStoreExceptionStub"); }
 493 #endif // PRODUCT
 494 };
 495 
 496 
 497 class ArrayCopyStub: public CodeStub {
 498  private:
 499   LIR_OpArrayCopy* _op;
 500 
 501  public:
 502   ArrayCopyStub(LIR_OpArrayCopy* op): _op(op) { }
 503 
 504   LIR_Opr src() const                         { return _op->src(); }
 505   LIR_Opr src_pos() const                     { return _op->src_pos(); }
 506   LIR_Opr dst() const                         { return _op->dst(); }
 507   LIR_Opr dst_pos() const                     { return _op->dst_pos(); }
 508   LIR_Opr length() const                      { return _op->length(); }
 509   LIR_Opr tmp() const                         { return _op->tmp(); }
 510 


   1 /*
   2  * Copyright (c) 1999, 2011, 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  *


 459   }
 460 
 461   void set_obj(LIR_Opr obj) {
 462     _obj = obj;
 463   }
 464 
 465   virtual void emit_code(LIR_Assembler* e);
 466   virtual CodeEmitInfo* info() const             { return _info; }
 467   virtual bool is_exception_throw_stub() const   { return true; }
 468   virtual void visit(LIR_OpVisitState* visitor) {
 469     if (_obj->is_valid()) visitor->do_input(_obj);
 470     visitor->do_slow_case(_info);
 471   }
 472 #ifndef PRODUCT
 473   virtual void print_name(outputStream* out) const { out->print("SimpleExceptionStub"); }
 474 #endif // PRODUCT
 475 };
 476 
 477 
 478 
 479 class ArrayStoreExceptionStub: public SimpleExceptionStub {
 480  private:
 481   CodeEmitInfo* _info;
 482 
 483  public:
 484   ArrayStoreExceptionStub(LIR_Opr obj, CodeEmitInfo* info): SimpleExceptionStub(Runtime1::throw_array_store_exception_id, obj, info) {}






 485 #ifndef PRODUCT
 486   virtual void print_name(outputStream* out) const { out->print("ArrayStoreExceptionStub"); }
 487 #endif // PRODUCT
 488 };
 489 
 490 
 491 class ArrayCopyStub: public CodeStub {
 492  private:
 493   LIR_OpArrayCopy* _op;
 494 
 495  public:
 496   ArrayCopyStub(LIR_OpArrayCopy* op): _op(op) { }
 497 
 498   LIR_Opr src() const                         { return _op->src(); }
 499   LIR_Opr src_pos() const                     { return _op->src_pos(); }
 500   LIR_Opr dst() const                         { return _op->dst(); }
 501   LIR_Opr dst_pos() const                     { return _op->dst_pos(); }
 502   LIR_Opr length() const                      { return _op->length(); }
 503   LIR_Opr tmp() const                         { return _op->tmp(); }
 504 


src/share/vm/c1/c1_CodeStubs.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File