src/share/vm/c1/c1_Instruction.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6919934 Sdiff src/share/vm/c1

src/share/vm/c1/c1_Instruction.hpp

Print this page


   1 /*
   2  * Copyright 1999-2006 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *


1123   ValueStack* state() const                      { return _state; }
1124   IRScope* scope() const;                        // the state's scope
1125 
1126   // manipulation
1127   void set_state(ValueStack* state)              { _state = state; }
1128 
1129   // generic
1130   virtual void input_values_do(void f(Value*))   { /* no values */ }
1131   virtual void state_values_do(void f(Value*));
1132 };
1133 
1134 
1135 LEAF(Invoke, StateSplit)
1136  private:
1137   Bytecodes::Code           _code;
1138   Value                     _recv;
1139   Values*                   _args;
1140   BasicTypeList*            _signature;
1141   int                       _vtable_index;
1142   ciMethod*                 _target;

1143 
1144  public:
1145   // creation
1146   Invoke(Bytecodes::Code code, ValueType* result_type, Value recv, Values* args,
1147          int vtable_index, ciMethod* target);
1148 
1149   // accessors
1150   Bytecodes::Code code() const                   { return _code; }
1151   Value receiver() const                         { return _recv; }
1152   bool has_receiver() const                      { return receiver() != NULL; }
1153   int number_of_arguments() const                { return _args->length(); }
1154   Value argument_at(int i) const                 { return _args->at(i); }
1155   int vtable_index() const                       { return _vtable_index; }
1156   BasicTypeList* signature() const               { return _signature; }
1157   ciMethod* target() const                       { return _target; }

1158 
1159   // Returns false if target is not loaded
1160   bool target_is_final() const                   { return check_flag(TargetIsFinalFlag); }
1161   bool target_is_loaded() const                  { return check_flag(TargetIsLoadedFlag); }
1162   // Returns false if target is not loaded
1163   bool target_is_strictfp() const                { return check_flag(TargetIsStrictfpFlag); }
1164 



1165   // generic
1166   virtual bool can_trap() const                  { return true; }
1167   virtual void input_values_do(void f(Value*)) {
1168     StateSplit::input_values_do(f);
1169     if (has_receiver()) f(&_recv);
1170     for (int i = 0; i < _args->length(); i++) f(_args->adr_at(i));
1171   }

1172 };
1173 
1174 
1175 LEAF(NewInstance, StateSplit)
1176  private:
1177   ciInstanceKlass* _klass;
1178 
1179  public:
1180   // creation
1181   NewInstance(ciInstanceKlass* klass) : StateSplit(instanceType), _klass(klass) {}
1182 
1183   // accessors
1184   ciInstanceKlass* klass() const                 { return _klass; }
1185 
1186   // generic
1187   virtual bool can_trap() const                  { return true; }
1188   ciType* exact_type() const;
1189 };
1190 
1191 


   1 /*
   2  * Copyright 1999-2010 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *


1123   ValueStack* state() const                      { return _state; }
1124   IRScope* scope() const;                        // the state's scope
1125 
1126   // manipulation
1127   void set_state(ValueStack* state)              { _state = state; }
1128 
1129   // generic
1130   virtual void input_values_do(void f(Value*))   { /* no values */ }
1131   virtual void state_values_do(void f(Value*));
1132 };
1133 
1134 
1135 LEAF(Invoke, StateSplit)
1136  private:
1137   Bytecodes::Code _code;
1138   Value           _recv;
1139   Values*         _args;
1140   BasicTypeList*  _signature;
1141   int             _vtable_index;
1142   ciMethod*       _target;
1143   ValueStack*     _state_before;  // Required for deoptimization.
1144 
1145  public:
1146   // creation
1147   Invoke(Bytecodes::Code code, ValueType* result_type, Value recv, Values* args,
1148          int vtable_index, ciMethod* target, ValueStack* state_before);
1149 
1150   // accessors
1151   Bytecodes::Code code() const                   { return _code; }
1152   Value receiver() const                         { return _recv; }
1153   bool has_receiver() const                      { return receiver() != NULL; }
1154   int number_of_arguments() const                { return _args->length(); }
1155   Value argument_at(int i) const                 { return _args->at(i); }
1156   int vtable_index() const                       { return _vtable_index; }
1157   BasicTypeList* signature() const               { return _signature; }
1158   ciMethod* target() const                       { return _target; }
1159   ValueStack* state_before() const               { return _state_before; }
1160 
1161   // Returns false if target is not loaded
1162   bool target_is_final() const                   { return check_flag(TargetIsFinalFlag); }
1163   bool target_is_loaded() const                  { return check_flag(TargetIsLoadedFlag); }
1164   // Returns false if target is not loaded
1165   bool target_is_strictfp() const                { return check_flag(TargetIsStrictfpFlag); }
1166 
1167   // JSR 292 support
1168   bool is_invokedynamic() const                  { return code() == Bytecodes::_invokedynamic; }
1169 
1170   // generic
1171   virtual bool can_trap() const                  { return true; }
1172   virtual void input_values_do(void f(Value*)) {
1173     StateSplit::input_values_do(f);
1174     if (has_receiver()) f(&_recv);
1175     for (int i = 0; i < _args->length(); i++) f(_args->adr_at(i));
1176   }
1177   virtual void state_values_do(void f(Value*));
1178 };
1179 
1180 
1181 LEAF(NewInstance, StateSplit)
1182  private:
1183   ciInstanceKlass* _klass;
1184 
1185  public:
1186   // creation
1187   NewInstance(ciInstanceKlass* klass) : StateSplit(instanceType), _klass(klass) {}
1188 
1189   // accessors
1190   ciInstanceKlass* klass() const                 { return _klass; }
1191 
1192   // generic
1193   virtual bool can_trap() const                  { return true; }
1194   ciType* exact_type() const;
1195 };
1196 
1197 


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