src/share/vm/shark/sharkBlock.hpp

Print this page


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














  26 class SharkState;
  27 
  28 class SharkBlock : public SharkTargetInvariants {
  29  protected:
  30   SharkBlock(const SharkTargetInvariants* parent)
  31     : SharkTargetInvariants(parent),
  32       _iter(target()),
  33       _current_state(NULL) {}
  34 
  35   SharkBlock(const SharkCompileInvariants* parent, ciMethod* target)
  36     : SharkTargetInvariants(parent, target),
  37       _iter(target),
  38       _current_state(NULL) {}
  39 
  40  private:
  41   ciBytecodeStream _iter;
  42   SharkState*      _current_state;
  43 
  44  public:
  45   ciBytecodeStream* iter() {


 262  protected:
 263   virtual void do_call();
 264 
 265   // checkcast and instanceof
 266  protected:
 267   virtual void do_instance_check();
 268   virtual bool maybe_do_instanceof_if();
 269 
 270   // new and *newarray
 271  protected:
 272   virtual void do_new();
 273   virtual void do_newarray();
 274   virtual void do_anewarray();
 275   virtual void do_multianewarray();
 276 
 277   // monitorenter and monitorexit
 278  protected:
 279   virtual void do_monitorenter();
 280   virtual void do_monitorexit();
 281 };


   1 /*
   2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2008, 2009 Red Hat, Inc.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #ifndef SHARE_VM_SHARK_SHARKBLOCK_HPP
  27 #define SHARE_VM_SHARK_SHARKBLOCK_HPP
  28 
  29 #include "ci/ciMethod.hpp"
  30 #include "ci/ciStreams.hpp"
  31 #include "memory/allocation.hpp"
  32 #include "shark/llvmHeaders.hpp"
  33 #include "shark/sharkBuilder.hpp"
  34 #include "shark/sharkConstant.hpp"
  35 #include "shark/sharkInvariants.hpp"
  36 #include "shark/sharkState.hpp"
  37 #include "shark/sharkValue.hpp"
  38 #include "utilities/debug.hpp"
  39 
  40 class SharkState;
  41 
  42 class SharkBlock : public SharkTargetInvariants {
  43  protected:
  44   SharkBlock(const SharkTargetInvariants* parent)
  45     : SharkTargetInvariants(parent),
  46       _iter(target()),
  47       _current_state(NULL) {}
  48 
  49   SharkBlock(const SharkCompileInvariants* parent, ciMethod* target)
  50     : SharkTargetInvariants(parent, target),
  51       _iter(target),
  52       _current_state(NULL) {}
  53 
  54  private:
  55   ciBytecodeStream _iter;
  56   SharkState*      _current_state;
  57 
  58  public:
  59   ciBytecodeStream* iter() {


 276  protected:
 277   virtual void do_call();
 278 
 279   // checkcast and instanceof
 280  protected:
 281   virtual void do_instance_check();
 282   virtual bool maybe_do_instanceof_if();
 283 
 284   // new and *newarray
 285  protected:
 286   virtual void do_new();
 287   virtual void do_newarray();
 288   virtual void do_anewarray();
 289   virtual void do_multianewarray();
 290 
 291   // monitorenter and monitorexit
 292  protected:
 293   virtual void do_monitorenter();
 294   virtual void do_monitorexit();
 295 };
 296 
 297 #endif // SHARE_VM_SHARK_SHARKBLOCK_HPP