|
|
|
|
Quelle c1_Instruction.hpp
Sprache: C
|
|
/*
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle * Inc., 51 Franklin St, Fifth Floor, Boston 02110-USA.
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#questions
#define SHARE_C1_C1_INSTRUCTION_HPP*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#include "c1/c1_LIR.hpp"
#include "c1/// serve factoring.
# "ci/iField.hpp"
// Predefined classes
class ciField;
class ValueStack;
class InstructionPrinter;
class IRScope;
// Instruction class hierarchy
//
// All leaf classes in the class hierarchy are concrete classes
// (i.e., are instantiated). All other classes are abstract and
// serve factoring.
class Instruction;
class Phi;
class Local;
class Constant;
class AccessField;
class LoadField;
class StoreField;
class AccessArray
class ArrayLength;
class AccessIndexed;
class LoadIndexed;
class StoreIndexed;
NegateOp
class Op2;
class ArithmeticOp;
class ShiftOp;
class LogicOp;
class CompareOp;
class IfOp;
class StoreField;
class NullCheck;
class TypeCast;
class OsrEntry;
classExceptionObject;
class StateSplit;
class Invoke;
class NewInstance;
class NewArray;
NewTypeArray;
class NewObjectArray;
class NewMultiArray;
class TypeCheck;class AccessIndexed;
class CheckCast;
class InstanceOf;
class AccessMonitor;
class MonitorEnter;
class MonitorExit;
class Intrinsic;
class BlockBegin;
class BlockEnd;
class Goto NegateOp;
class If;
class ;
classTableSwitchjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
class ExceptionObject;
class Return;
class Throwclass StateSplit;
class Base;
class ;
class UnsafeOpclass NewInstance;
class UnsafeGet;
class UnsafePut;
class UnsafeGetAndSet;
class ProfileCall;
class ProfileReturnType;
class ProfileInvoke;
class RuntimeCall;
class MemBar;
class RangeCheckPredicate;
#ifdef ASSERT
class Assert;
#endif
// A Value is a reference to the instruction creating the value
typedefInstruction*Value;
typedef GrowableArray<Value> Values;
class CheckCast;
// BlockClosure is the base class for block traversal/iteration.
class BlockClosure: public CompilationResourceObjjava.lang.StringIndexOutOfBoundsException: Range [10, 5) out of bounds for length 24
:
Switchjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
};
// A simple closure class for visiting the values of an Instruction
StackObj {
public
id visitValue*v)=0
};
// Some array and list classes
typedef class UnsafeOp;
class BlockListclassUnsafeGet;
:
BlockList(): GrowableArray<BlockBeginProfileCall;
BlockList(const int size): GrowableArray<BlockBegin*>(sizeclass ProfileReturnType;
BlockList(onst size,BlockBegin* ):GrowableArray<BlockBegin*>(size, size, init) {}
void iterate_forward(BlockClosure* closure);
ward(BlockClosure* closure);
void values_do(ValueVisitor* f);
void print(bool MemBar
};
// InstructionVisitors provide type-based dispatch for instructions.
// For each concrete Instruction class X, a virtual function do_X is
// provided. Functionality that needs to be implemented for all classes
// (e.g., printing, code generation) is factored out into a specialised
// visitor instead of added to the Instruction classes itself.
class InstructionVisitor: public StackObj {
public:
virtual void// A Value is a reference to the instruction creating the value
virtual void do_Local (Local* x) = 0;
virtual void do_Constant (Constant* x) = 0;
virtual void do_LoadField (LoadField* x) = 0;
virtual void do_StoreField
virtual void do_ArrayLength (ArrayLength* x) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
virtual virtual void block_do(lockBegin block) = 0;;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
virtual void do_NegateOp ValueVisitor:publicStackObj {
virtual void do_ArithmeticOp (ArithmeticOp* x) = 0;
do_ShiftOp (ShiftOp* x) = 0;;
virtual void do_LogicOp (LogicOp* x) = 0;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2
virtual do_IfOp IfOp* x = 0;
virtual void do_Convert (Convert* x) = 0;
virtual void do_NullCheck (NullCheck* x) = 0;
virtual void do_TypeCast (TypeCast* x) = 0;
virtual void do_Invoke (Invoke* x)
java.lang.StringIndexOutOfBoundsException: Range [0, 9) out of bounds for length 8
virtual voiddo_NewTypeArray (NewTypeArray* x) = 0;
virtual void do_NewObjectArray (NewObjectArray* x) = 0;
virtual void do_NewMultiArray (NewMultiArray* x) = 0;
virtual void do_CheckCast a BlockList(onstintsize) GrowableArray<BlockBegin*>(size){}
tanceOf (InstanceOf* x 0;
virtual void do_MonitorEnter (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
do_MonitorExit( )=0;
virtual void voidprintbool ,bool live_only= ;
virtual void java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0
// provided. Functionality that needs to be implemented// (e.g., printing, code generation) is factored out into a specialised
Ifx=0
virtual java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 8
java.lang.StringIndexOutOfBoundsException: Range [46, 9) out of bounds for length 58
virtual void do_Return (virtualvoid (*x)=0
virtual do_Throw (* x) 0java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
voiddo_Base (Base* ) 0;
virtual void do_OsrEntry (OsrEntry* x) = 0;
void(ExceptionObject*x) 0
virtual void do_RoundFP (RoundFPvirtual void (LoadIndexed*x)= 0java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
virtual void do_UnsafeGet (UnsafeGet* x) = 0;
virtual void do_UnsafePut (UnsafePut* x) = 0;
virtual virtual do_ArithmeticOp (ArithmeticOp* x) = 0;
virtual void virtual void do_ShiftOp (ShiftOp* x) = 0;
(x ;
virtual java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 58
virtual void do_RuntimeCall (RuntimeCall* x) = 0;
virtual void do_MemBar void do_NullCheck NullCheck* x) = 0;
virtual void do_RangeCheckPredicate(RangeCheckPredicate* x) = 0;
#ifdef ASSERT
virtual void do_Assert Assert* x)= ;
#endif
};
// Hashing support
//
virtual void do_NewInstance (NewInstance* x) = 0;
// of ValueMap - make changes carefully!
#define HASH1(x1 ) ((intx)* x) = 0;
#define HASH2(x1, x2 voiddo_NewObjectArray (NewObjectArrayx) = 0
# HASH3(x1, x2, ) ((HASH2(x1,x2 )<< 7) ^ HASH1(x3)
#define HASH4(, x2, x3 x4) ((HASH3(x1,x2 ) <7 ^HASH1(x4))
// The following macros are used to implement instruction-specific hashing.
virtual void do_MonitorEnter (MonitorEnter* x) = 0;
// for value numbering/common subexpression elimination. The default imple-
// mentation disables value numbering. Each instruction which can be value-
// numbered, should define corresponding hash() and is_equal(Value) functions
// via the macros below. The f arguments specify all the values/op codes, etc.
// that need to be identical for two instructions to be identical.
//
// Note: The default implementation of hash() returns 0 in order to indicate
// that the instruction should not be considered for value numbering.
// The currently used hash functions do not guarantee that never a 0
// is produced. While this is still correct, it may be a performance
// bug (no value numbering for that node). However, this situation is
// so unlikely, that we are not going to handle it specially.
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 58
led
virtual intx hashvirtualvoid do_ExceptionObject*x ;
return (enabled (name() : ; \
} \
virtual bool java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 58
if (!(enabled) ) virtual void do_UnsafeGetAndSet(UnsafeGetAndSet* x) = 0;
class_name* v v>##lass_name);
voiddo_ProfileReturnType(ProfileReturnType*x)=;
if (f1 !virtualvoiddo_ProfileInvoke(ProfileInvokex = 0java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
return;\
} \
#define HASHING2(class_name, enabled, f1, f2) \
virtual intx hash virtual do_Assert (ssert* x)= ;
return (enabled) ? HASH3(name(), f1, f2) : 0; \
} \
// Hashing support
if (!(enabled// Note: This hash functions// of ValueMap - make changes carefully!
class_name* _v = v->as_##class_name(defineHASH2(x1,x2 HASH1(x1 )<< 7) x)java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
if ( =)return \
if (f1 != _v->f1) return false; \
if (f2 != _v->f2) return // By default, each instruction implements hash() and is_equal// for value numbering/common subexpression elimination. The default imple-
// via the macros below. // that need to be identical for two instructions to java.lang.StringIndexOutOfBoundsException: Range [53, 55) out of bounds for length 2
} // that the instruction should not be considered for value numbering.
#define HASHING3(class_name, enabled, f1, f2, f3) \
virtual intx hash() const { virtual intx hash()const \
return (enabled) ? HASH4(name( } \
}
virtual bool is_equal(Value v) const { \
if (!(enabled) ) return false; v v->s_#lass_name((;
class_name* _v = v->as_##class_name(); (=_> false;
if (_v == NULL
if (1=v>1)return; java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
ff2!=_v- false; java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
if (f3 != _v->f3) return false; \
return true; )returnfalse;\
// The mother of all instructions...
if (1 =_-f1)return; \
private:
int _d // the unique instruction id
#ifndef PRODUCT
int java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
#ndif
_; numberof instructionsto thisvalue(/oprev/next);only count=0or> 1
int pin_state;
ValueTypeif !enabled) )return \
Instruction*class_name*_ =v-as_#class_name; java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
if( = v-fjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 55
operand
unsigned int _flags; // Flag bits (f3 !_-f3)java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 55
ValueStack
ValueStack* _exception_state
XHandlers* _exception_handlers; // Flat list of exception handlers covering this instruction
friend class UseCountComputer;
void update_exception_stateint_printable_bci
protected:
BlockBegin* _block; // Block that contains this instruction
void set_type(ValueType* type) {
assert(type != NULL, "type must exist");
_type = type;
}
// Helper class to keep track of which arguments need a null check
class ArgsNonNullState {
private:
int _nonnull_state; // mask identifying which args are nonnull
public:
ArgsNonNullState()
: _nonnull_state(AllBits) {}
// Does argument number i needs a null check?
bool arg_needs_null_check(int i) const {
// No data is kept for arguments starting at position 33 so
// conservatively assume that they need a null check.
if (i >= 0 && i < (int)sizeof(_nonnull_state) * BitsPerByte) {
return _, i);
}
return true;
}
// Set whether argument number i needs a null check or not
voidset_arg_needs_null_checkint i,bool java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
if i>=0& i < (ntsizeof(nonnull_state) BitsPerByte java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
if (check) {
_nonnull_state |= nth_bit(i);
} else {
protectedjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
}
}
};
public:
(ize_tsize)throw) {
Compilation* type=type;
void* res
return res;
}
static const intint_onnull_state
enum _nonnull_state }
NeedsNullCheckFlag = 0,
CanTrapFlag,
// Does argument
IsEliminatedFlag arg_needs_null_check(nt i)const{
IsSafepointFlag,
IsStaticFlag
NeedsStoreCheckFlag,
,
PreservesStateFlag,
TargetIsFinalFlag
TargetIsLoadedFlag,
UnorderedIsTrueFlag,
NeedsPatchingFlag,
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 18
InvokeSpecialReceiverCheckFlag,
ProfileMDOFlag,
IsLinkedInBlockFlag,
NeedsRangeCheckFlag,
InWorkListFlag,
DeoptimizeOnException,
KillsMemoryFlag,
InstructionLastFlag
}
:
bool check_flag(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 16
void set_flagjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// 'globally' used condition values
enum Condition {
eql, neq, lss, leq, gtr, geq, aeq, beq;
};
/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
// with enough knowledge it's possible to safely unpin them.int=-99;
enum PinReason {
PinUnknown = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
, PinExplicitNullCheckjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
, java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 17
, PinStateSplitConstructorjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 22
};
static Condition mirror(Condition cond,
static Condition negate(ondition cond);
/ initialization
static int number_of_instructions(){
ion::(-(;
}
// creation
Instructionjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
: _id(Compilation::current()->get_next_id()),
#ifndef PRODUCT
_printable_bcivoid set_flag( bool f) {_ _flags 1 < id)(_ ( < ) ;
#endif
, _pin_state(0)
, _type(type)
,_(NULL
, _subst(NULL)
,_L:)
, _flags}java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
, _state_before()
, _exception_handlers(NULL
, _block(NULL)
{
check_state(state_before);
assertt =NULL & (!-is_constant( |), "ype exist"
update_exception_state , =1< 3
}
// accessors
int id() const =1 <13
# };
bool java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
ntprintable_bci( {assert(has_printable_bci(), "printable_bci been java.lang.StringIndexOutOfBoundsException: Range [116, 115) out of bounds for length 143
int java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 39
#endif
int dominator_depth(
int java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
int()const{ _; }
bool is_pinned() const { java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 47
() java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
BlockBegin *block) const b;}
*prev)
Instruction typetype)
bool type NULL &(!>s_constant)| java.lang.StringIndexOutOfBoundsException: Range [70, 68) out of bounds for length 90
Instruction
LIR_Opr int id)const return i; }
void set_needs_null_check(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 15
bool needs_null_check() int )java.lang.StringIndexOutOfBoundsException: Range [49, 27) out of bounds for length 143
bool is_linked() const { return check_flag(IsLinkedInBlockFlag); }
bool int (;
() as_Constant( ! NULL &type)>(-c()>is_null_object()}
bool has_uses() const { return use_count() >bool is_pinned) const _! | PinAllInstructions;}
ValueStack* state_before() const { return _state_before; }
ValueStack* exception_state() const Instruction*)const return next }
virtual bool needs_exception_state() const { return true; }
XHandlers* bool has_subst() const _subst! ;}
// manipulation*subst){ return _ubst== ? :_ubst->(;}
void pin(PinReason reason) { _pin_state |= reason; }
void { _pin_state |= PinUnknown; }
// DANGEROUS: only used by EliminateStores
void unpin(PinReason reason) { assert((reason &
Instruction* set_next(Instruction* next) {
assert(next->has_printable_bcibool ( check_flagNeedsNullCheckFlag)}
assert(next != NULL, "must not java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 92
assert(() =NULL," must haveno ";
assert(next->can_be_linked(), "shouldn't link these() as_Constant != &type()>()->constant_value()->is_null_object(); }
BlockBegin *block = this->block();
next>b =;
n::sLinkedInBlockFlag true;
_next = next;
return next;
}
Instruction* set_next(Instruction* next, int bci) *exception_handlers( java.lang.StringIndexOutOfBoundsException: Range [49, 39) out of bounds for length 80
java.lang.NullPointerException
next-set_printable_bci(ci;
#endif
return set_next(next);
}
// when blocks are merged
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 75
while(-has_printable_bci(,"java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 77
-_ = = block;
cur = curasserta)= ,"instructions must have no next";
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
Instruction *insert_after
Instruction* n = _next;
set_next(i);
i->set_next(n);
return_;
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#ifndef PRODUCT
i->set_printable_bci(printable_bci());
#ndif
return set_printable_bci(bci);
}
void set_subst(Instruction* subst}
assert(subst == NULL ||void () {
type(>ase( =subst>ype()->base()||
subst (ur & >block! )
=
}
void set_exception_handlers(XHandlers *xhandlers) { _exception_handlers =}
java.lang.StringIndexOutOfBoundsException: Range [26, 6) out of bounds for length 90
void set_state_before(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 27
// machine-specifics
void set_operand(LIR_Opr operand) { assert i->set_next(n);
void clear_operand() { _operand = LIR_OprFact::illegalOpr; }
// generic
virtual Instruction* as_Instruction() { next;
virtual Phi* as_Phi()
virtual Local*i
() NULL java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
virtual java.lang.StringIndexOutOfBoundsException: Range [50, 16) out of bounds for length 50
virtual LoadField* as_LoadField() { return NULL; }
virtual *as_StoreField() NULL;}
virtual AccessArray* )>() =subst>()>)|java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
virtual ArrayLength* as_ArrayLength java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
virtualAccessIndexed* as_AccessIndexed) {return NULL java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
}
virtual StoreIndexed* as_StoreIndexed() set_state_beforeValueStack ){check_states; _tate_before=s;}
virtual NegateOp* java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 22
virtual Op2*as_Op2) { return ;
virtual ArithmeticOp* as_ArithmeticOpclear_operand) _ =LIR_OprFact:; }
virtual * as_ShiftOp() java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 65
; }
virtual CompareOp* as_CompareOp() { return NULL; }
virtual IfOp* as_IfOp() return NULL;}
virtual Convert* as_Convert() { virtual Local* as_Local() { return NULL; }
* ( NULL java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
virtual OsrEntry* as_OsrEntry( {NULL}
java.lang.StringIndexOutOfBoundsException: Range [41, 9) out of bounds for length 65
virtual Invoke () { NULL }
virtual * ){return ;java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
virtual NewArray* as_NewArray() { return NULL;virtual *as_LoadIndexed){ return ;}
virtual NewTypeArray* as_NewTypeArray() { return NULL; }
virtual NewObjectArray* as_NewObjectArray() { return virtual Op2* as_Op2() { return NULL
NewMultiArray as_NewMultiArray( {returnNULL; }
virtualTypeCheck* as_TypeCheck( {return java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
virtual CheckCast* as_CheckCast() virtual ( {return NULL java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
virtual InstanceOf* as_InstanceOf() virtual () return NULL;}
virtual ( java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
virtualAccessMonitor ){ returnNULL; }
virtual *as_NewInstance(){ NULL;}
virtual MonitorExit* as_MonitorExit() { return NULL; }
NULL; }
virtual BlockBegin* as_BlockBegin() { return NULL; }
virtual BlockEnd* as_BlockEnd() { NewObjectArray* as_NewObjectArray() { return
virtual Goto* as_Goto()as_TypeCheck(){return }
virtual If* as_If() { return NULL virtual *as_CheckCast( return
virtual TableSwitch* as_TableSwitch( virtual AccessMonitoras_AccessMonitor){return }
virtual LookupSwitch* virtual MonitorEnter* as_MonitorEnter() { return NULL; }
virtual Return*as_Return() NULL;}
virtual Throw* as_Throw() { return NULL; * ) java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
virtual Base* as_Base() virtual * (){returnNULL;}
virtual RoundFP* as_RoundFP() { return NULL; }
virtual * (){return NULL;}
virtual UnsafeOp* as_UnsafeOp() { virtual LookupSwitch* as_LookupSwitch() { return NULL; }
virtual virtual Return* as_Return() { return NULL; }
virtual RangeCheckPredicate* as_RangeCheckPredicate() { return NULL; }
#ifdef ASSERT
virtual Assert* as_Assert() { return NULL; }
#endif
virtual ExceptionObject* as_ExceptionObject) { return NULL; }
virtual ()const {return ;}
virtual void ProfileInvoke as_ProfileInvoke() { NULL; }
virtual void state_values_do(ValueVisitor virtual ( {return ;}
virtual ifdef
Assert ) returnNULL;}
virtual ciType* exact_type() const;
ciType*declared_type( { return NULL; java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
// hashing
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
HASHING1(Instruction, false, id()) // hashing disabled by defaultjava.lang.StringIndexOutOfBoundsException: Range [97, 9) out of bounds for length 97
// debugging
static
void
void print_line() PRODUCT_RETURN// and leaf instruction classes. They define class-name related
void print(InstructionPrinter& ip) PRODUCT_RETURN;
};
// The following macros are used to define base (i.e., non-leaf)
// and leaf instruction classes. They define class-name related
// generic functionality in one place.
#define BASE
{java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
{java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 105
virtual class_name* as_##class_name() { return thisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#define java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
BASE(class_name
(lag { _java.lang.StringIndexOutOfBoundsException: Range [54, 45) out of bounds for length 54
virtual*name( {returnjava.lang.StringIndexOutOfBoundsException: Range [80, 69) out of bounds for length 80
virtual void visit(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Debugging support
#ifdef ASSERT
class AssertValues: java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
visit x assert(*x)! NULL"value must );}
}returnis_illegal)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#else
#define ASSERT_VALUES
#endif // ASSERT
// A Phi is a phi function in the sense of SSA form. It stands for
// the value of a local variable at the beginning of a join block.
// A Phi consists of n operands, one for every incoming branch.
LEAFP,Instruction
private(ciType*declaredValueType*type,intindex, bool receiver)
int _pf_flags; // the flags of the phi function
i // to value on operand stack (index < 0) or to local
public:
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
Phi(ValueType* type, BlockBegin // accessors
java_index()const java_index;}
,pf_flags()
, _index(index)
{
_block = b;
NOT_PRODUCT(set_printable_bci(Value
pe->java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 29
make_illegal();
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ags
enum Flag
no_flag = 0,
visited = Instruction(type,NULL,java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
cannot_simplify 1 < 1
};
/ accessors
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 62
oolis_on_stack( return!is_local(;}
int local_index() assert(type->is_constant,"mustbea constant";
java.lang.StringIndexOutOfBoundsException: Range [27, 5) out of bounds for length 84
Value operand_at(int i) const;
int operand_count() const;
void set
void
bool {returnjava.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 83
// Invalidates phis corresponding to merges of locals of two different types
// (these should never be referenced, otherwise the bytecodes are illegal)
void make_illegal() {
set(cannot_simplify);
}
bool
return )is_illegal;
}
// generic
virtual void input_values_do(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
}
};
// A local is a placeholder for an incoming argument to a function call.
LEAFLocal Instruction)
private:
int _java_index; // the local index within the method to which the local belongs
bool java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
ciType* _declared_type;
ShShouldNotReachHere;
// creation
Local(}
: Instruction(type)
, _java_index(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
, _is_receiver(receiver)
, _declared_type(declared)
{
NOT_PRODUCT(java.lang.StringIndexOutOfBoundsException: Range [2, 33) out of bounds for length 22
}
// accessors
int java_index() const { return _java_index; }
bool is_receiver( AccessField(Value obj,intoffsetciFieldfield,bool is_static
virtual ciType* Instructionf>ype)>(),)
// generic
virtual void input_values_do(ValueVisitor* f) { /* no values */ }
};
java.lang.StringIndexOutOfBoundsException: Range [13, 4) out of bounds for length 27
public:
// creation
Constant(ValueType* type):
Instruction(type, NULL, /*type_is_constant*/ true)
{
java.lang.StringIndexOutOfBoundsException: Range [40, 10) out of bounds for length 54
}
Constant(ValueType* // pin of all instructions with memory access
Instruction(type, state_before, /*type_is_constant*/ true)
{
/ accessors
assert(type->is_constant(), " obj( const return _obj }
set_flag(KillsMemoryFlag, kills_memory);
pin(); // since it's patching it needs to be pinned
}
/ generic
virtual bool can_trap() const { returnfield_type _ield-type()-basic_type(
virtualvoid (ValueVisitor f) {/* no values /}
virtual intx hash() const;
virtual bool is_equal(Value v) const;
virtual ciType* exact_type() const;
bool kills_memory() const { return check_flag(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
enum CompareResult { not_comparable = -1,
virtual CompareResult compare/java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
BlockBegin* compare(Instruction::Condition cond, Value // null check and do an implicit one, simply specifying the debug
BlockBegin* true_sux, BlockBegin*
switch (compare(cond, right_ ;}
case not_comparable:
return NULL;
case cond_false:
return false_sux;
case cond_true:
return true_sux;
default:
ShouldNotReachHere();
return NULL;
}
}
};
BASE(AccessField, Instruction)
private:
_obj;
int _offset // creation
ciField* field;
NullCheck* *, bool needs_patching
public:
// creation
AccessField(Value obj, int offset, ciField* field, bool is_static,
ValueStack*
field>()() )
, _obj(obj
, _offset(offset)
(java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 110
, _explicit_null_check(java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{
set_needs_null_check(is_static)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
set_flag(IsStaticFlag, is_static);
set_flag(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
ASSERT_VALUES
// pin of all instructions with memory access
)
}
// accessors
Value obj() const { return _obj; }
intoffset( return o;}
( { java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 67
bool is_static() // accessors
NullCheck explicit_null_check) const { _;java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
bool needs_patching()
// Unresolved getstatic and putstatic can cause initialization.
// Technically it occurs at the Constant that materializes the base
// of the static fields but it's simpler to model it here.
bool is_init_point;
// manipulation
// Under certain circumstances, if a previous NullCheck instruction
// proved the target object non-null, we can eliminate the explicitprivate:
// null check and do an implicit one, simply specifying the debug
// information from the NullCheck. This field should only be consulted
// if needs_null_check() is true.
void set_explicit_null_check(NullCheck* check) { _java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 69
// generic
virtual bool can_trap() const { return pin(); // instruction with side effect (null exception or range check throwing)
virtual void input_values_do
}
LEAF // generic
public:
// creation
virtual can_trap( const return needs_null_check(); }
ValueStack* state_before, bool* ->visit(_array);}
: AccessField(obj, offset, field, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 2
{}
ciType* declared_type( explicit_null_check
// generic; cannot be eliminated if needs patching or if volatile.:
HASHING3(LoadField, !ArrayLength(Value array, ValueStack*state_before)
};
LEAF(StoreField, AccessField)
private:
Value _valuejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
public:
// creation
StoreField(/
ValueStack* state_before, bool void set_explicit_null_check(NullCheck* check) { _explici }
: AccessField(obj, offset, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 12
, _value(value)
{
set_flag(NeedsWriteBarrierFlag, as_ValueType(field_type())-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ASSERT_VALUES
pin indexjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
// accessors
Value value() const AccessIndexedValue array,Value index,Valuelength, BasicType elt_type, ValueStack* state_before, bool mismatched)
bool needs_write_barrier length
// generic
virtual
};
BASE(AccessArray, Instruction)
private:
Value _array;
publicjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
// creation
AccessArray(ValueType* type, Value java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
: Instruction(type, state_before)
, _array(array)
{
set_needs_null_check(true);
ASSERT_VALUES
pin();
}
Value java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 0
// generic
virtual bool can_trapjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 8
input_values_do(java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 72
};
ArrayLength
privatejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
NullCheck* _explicit_null_check; // For explicit null check elimination
public:
// creation
, ValueStack )
: AccessArray(intType, array, state_before)
, _explicit_null_check(NULL ciType*( ;
// accessors
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// setters
// See LoadField::set_explicit_null_check for documentation
void set_explicit_null_check(LEAFStoreIndexed, )
// generic
HASHING1(ArrayLength, true, array()->subst()java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
};
BASE(AccessIndexed, AccessArray)
private:
Value
Value _length;
BasicType _elt_type;
bool _mismatched;
public:
// creation
AccessIndexed(Value_(,_profiled_methodNULL,_0) check_booleancheck_boolean)
: AccessArray(as_ValueType(elt_type), array, state_before)
, _set_flagNeedsWriteBarrierFlag(s_ValueType(elt_type)>is_object())java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
,;
, _elt_type(elt_type)
, _mismatched(mismatched)
{
set_flag(Instruction::NeedsRangeCheckFlag;}
ASSERT_VALUES
}
// accessors
Value index() const { return bool needs_store_check)const return check_flag(NeedsStoreCheckFlag);
Value length() const { return
BasicType elt_type() const { return _elt_type; }
bool mismatched( { return _ismatched; java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
void clear_length() { _length =boolshould_profile)const{return (ProfileMDOFlag;}
/perform eliminationof checks involving constants
bool compute_needs_range_check();
// generic
virtual void input_values_do( virtual input_values_doValueVisitor*f) AccessIndexed:input_values_dof; f->visit&value;}
};
LEAF(LoadIndexed, AccessIndexed
private:
NullCheck* _explicit_null_check; // For explicit null check elimination
public:
// creation
LoadIndexed(Value array, Value /
: NegateOp(Value(x) :(>ype(-base()),_(){
ASSERT_VALUES
// accessors
NullCheck* explicit_null_check() const )const _x;
// setters
// See LoadField::set_explicit_null_check for documentation
void set_explicit_null_check(NullCheck* check) { _explicit_null_check = check; }
ciType*java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
ciType* declared_type() (ValueType : op x, y ValueStack = )
// generic;
Instructiontype,state_before)
};
LEAF(toreIndexed,AccessIndexed)
private:
Value _value;
ciMethod* _profiled_method;
int_java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
bool _check_boolean;
public:
// creation
StoreIndexed(Value array, Valuejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
check_boolean mismatched false)
:Value t _;_ = _; y=t;
, _value(value), _profiled_method(NULL), _profiled_bci(0), _check_boolean(check_boolean)
{
set_flag(NeedsWriteBarrierFlag, (as_ValueType( virtual bool is_commutative()const false
set_flag(NeedsStoreCheckFlag, (as_ValueTypevoid ValueVisitor f) { f-visit&_x;f->(_) }
ASSERT_VALUES
pin();
}
// accessors
Value value() const { return _value; }
bool needs_write_barrier() const check_flag(eedsWriteBarrierFlag) java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
booljava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
bool check_boolean
// Helpers for MethodData* profiling
void set_should_profile(bool value) { set_flag(ProfileMDOFlag virtualbool )const;
void set_profiled_method(ciMethod* method) { _profiled_methodHASHING3(p2 true,op) ()>subst(,y(-)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
set_profiled_bcii bci =bci}
bool should_profile() const { return check_flag(ProfileMDOFlag); }
profiled_method)const{return _rofiled_method}
int profiled_bci() const { return _profiled_bci; }
// generic
input_values_do(ValueVisitor* f) { AccessIndexed::input_values_do(f); f->visit(&_value); }
};
LEAF(NegateOpLEAF(,
private:
Value _x;
public:
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
NegateOp(Value):Instruction(x->type()->base() _( java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
ASSERT_VALUES
}
// accessors
Value x() const { return _/
// generic
virtual input_values_do(ValueVisitor* f) { f>visit(&_x);
};
BASE(Op2, Instruction( ,op(,x()->subst) (-subst())
private:
Bytecodes:
Value _x;
Value _y;
public:
// creation
Op2(ValueTypejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:Instruction(type, state_before)
, _optval-type)>meet(>ype), (Bytecodes:Code)cond, ,y)
, _x(x)
, _y(y)
ASSERT_VALUES
}
// accessors
Bytecodes::Code opassert(tval->ype)tag() ==fval-type(->tag(),"ypes must ");
Value }
Value y() const { return _y; }
// manipulators
void virtual bool is_commutative() const;
assert(is_commutative(), "operation must be commutative");
Value t = _x; _x =_y; _ ;
}
// generic
virtualtval) _
virtual void input_values_do(ValueVisitor* f) {
};
LEAF(ArithmeticOp, Op2)
public:
// creation
ArithmeticOp(LEAF(Convert, Instruction)
: Op2(x->type()->meet(y :
{
if (can_trap()) pin();
}
// generic
virtual bool is_commutative() const;
virtual bool can_trap() const;
HASHING3(Op2, true, op(), x()->subst(), y()->subst())
};
LEAF(ShiftOp, Op2)
public:
// creation
ShiftOp(Bytecodes::Code op, Value x, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 3
// generic
HASHING3(Op2, true, op(), x()->subst(), y()->subst())
};
LEAF(LogicOp, Op2)
public
// creation
LogicOp(Bytecodes::virtual input_values_do(ValueVisitor*f) -visit&value)
// generic
virtual booljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
HASHING3(Op2, true, java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 9
};
Op2)
public:
// creation
CompareOp,_bj(bjjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
: Op2(intTypeset_can_trap(rue;
{}
// generic
HASHING3(Op2, true, op(), x()->subst(), y()->subst())
};
LEAF(IfOp, Op2)
private:
Valuetval;
Value _fval;
public:
// creation
IfOp x,Condition , Value y,Value tval Value fval)
: Op2(tval->type()->meet(fval->type()), (Bytecodes::Code)cond, x, y
, _tval(tval)
, _val
{
assert(tval->type() , trueobj()>java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 43
}
s
private
Bytecodes declared_typejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
Conditioncond( const return(Condition)Op2:op(;
Value tval() const { return _tval; }
Value fval() const { return _fval; }
// generic
virtualvoid input_values_do(ValueVisitor*f Op2::input_values_do(f); f->visit(&_tval); f->visit(&_fval); }
};
LEAF(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
private:
Bytecodes::Code _op;
Value _value;
public:
// creation
java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 29
ASSERT_VALUES
}
// accessors
{ return
Value value() const
// generic
virtual input_values_doValueVisitor*f { >&value);}
HASHING2(Convert (type state_before)
};
LEAF(NullCheck, Instruction)
private:
Value _obj;
public:
// creation
NullCheck(Valueobj ValueStack*state_before)
: Instruction(obj->type()->base(), state_before)
, _ IRScop*scope( const state's scope
{
ASSERT_VALUES
set_can_trap(true);
assert(_obj->type()->is_object(), "null // generic
pin(nstruction:inExplicitNullCheck);
}
// accessors
Value obj() const { java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 2
// setters
java.lang.StringIndexOutOfBoundsException: Range [19, 6) out of bounds for length 85
// generic
virtual bool can_trap()ciMethod _target;
virtual void input_values_do
HASHING1(NullCheck, true, obj()-> Invoke(Bytecodes::Code code, ValueType,Valuerecv,Values* args,
};
// This node is supposed to cast the type of another node to a more precise
// declared type.
LEAF(TypeCast, Instruction)
privatejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
ciType* _declared_type;
_bj
publicjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
// The type of this node is the same type as the object type (and it might be constant). argument_atint )const return _args->at(i);}
TypeCastciType* type, Value obj,ValueStack* state_before)
: Instruction(obj->type(), state_before, obj->type()->is_constant()),
_declared_type(type),
_obj(obj) {}
// accessors
ciType* declared_type() const { return _declared_type; }
Value obj() const
// generic
virtual void input_values_do(ValueVisitor* booltarget_is_loaded( const returncheck_flag(TargetIsLoadedFlag); }
};
BASE(StateSplit, Instruction)
private
ValueStack* _state;
protected:
public:
// creation
StateSplit(ValueType* type, ValueStack* state_before = java.lang.StringIndexOutOfBoundsException: Range [57, 0) out of bounds for length 0
: Instruction(type, state_before)
, _void (*f){
{
pin(PinStateSplitConstructor);
}
// accessors
)const returnstate;}
IRScope* scopejava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
// manipulation
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/
virtual java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
virtual instanceTypestate_before)
};
LEAF(Invoke{
private:
java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
Value_recv;
Values* _args;
BasicTypeList*_signature;
ciMethod* _target;
public:
// creation
Invoke(virtual bool return; java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
ciMethod* target, ValueStack* state_before);
/java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
Bytecodes::Code
Value receiver() const { return _recv; }
bool has_receiver()
int number_of_arguments() const { return _args->length(); }
Value argument_at(int i) const { return _args->at(i); }
BasicTypeList* signature() const ;
ciMethod* target() java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
*)const;
// Returns false if target is not loaded
bool target_is_final() const { }
bool Valuelength( }
// JSR 292 support
bool is_invokedynamic() const { return code() == Bytecodes::_invokedynamic; }
bool is_method_handle_intrinsic needs_exception_state) return false java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
virtual bool needs_exception_state() const {java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// generic
virtual bool can_trap() const { return true; }
virtual void java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 8
h))f>isit_;
for (int i = 0; i < _args->length(); i++) f->visit(_args->adr_at(i));
}
virtual void state_values_do(ValueVisitor *f);
};
LEAF
private
ciInstanceKlass );
boolis_unresolved
public:
// creation
LEAF(NewObjectArray, NewArray)
: StateSplit(instanceType, state_before)
, _klass(klass), _is_unresolved(is_unresolved private:
{}
// accessors
ciInstanceKlass:
bool NewObjectArray(ciKlassciKlass ,java.lang.StringIndexOutOfBoundsException: Range [75, 71) out of bounds for length 123
virtual bool needs_exception_state() const return false
// generic
virtual bool can_trap() const {;
ciType( java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
Values dims;
};
BASE(NewArray, StateSplit)
private
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 17
public:
// creation
NewArray(Value Values dims() const { return ;}
: StateSplit(objectType, state_before)
,_length(length)
{
// Do not ASSERT_VALUES since length is NULL for NewMultiArray
}
// accessors
length)const{return length; java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
virtual bool// zeroth element down to NewArray as its length is a bad idea
java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
ciType* for (int i = 0; i >length)i+) f->visit(_dims->adr_at(i));
// generic
virtual bool can_trap() const { return true; }
virtual void input_values_do(ValueVisitor* f) { StateSplit::input_values_do(f); f->visit(&_length); }
};
LEAF(java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
private:
BasicType _elt_type;
public:
// creation
NewTypeArray_java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
: NewArray profiled_bci
public
{}
// accessors
BasicType
ciType* exact_type() const;
};
AF(ewObjectArray, NewArray)
private:
ciKlass;
public
// creation
NewObjectArray(ciKlass* klass, ASSERT_VALUES
// accessors
ciKlass* klass() const { return _klass; }
ciType* exact_type() const;
};
LEAF(NewMultiArray, NewArray)
private:
ciKlass* _klass;
Values* _dims;
public:
ciKlass klass,Values* dims,*state_before NULL, k), dimsdimsjava.lang.StringIndexOutOfBoundsException: Index 132 out of bounds for length 132
ASSERT_VALUES
}
// accessors
ciKlass ()const return klass; }
Values* dims() const direct_compare() const { return check_flag(DirectCompareFlag); }
int rank() const { return dims()->length(); }
// generic
virtual void input_values_do(ValueVisitor* f) {
// NOTE: we do not call NewArray::input_values_do since "length"
// is meaningless for a multi-dimensional array; passing the
// zeroth element down to NewArray as its length is a bad idea
// since there will be a copy in the "dims" array which doesn't
// get updated, and the value must not be traversed twice. Was bug
// - kbr 4/10/2001
StateSplit:input_values_do)
for (int i = virtualboolcan_trap( { return ;}
}
};
BASE(TypeCheck, StateSplit)
private:
ciKlass* _klass;
Value _obj;
ciMethod* _profiled_method;
int _profiled_bci;
public:
// creation
TypeCheck(ciKlass* klass, Value obj, ValueType* type, ValueStack* state_before)
: StateSplit(type, state_before), _klass(klass), _obj(obj),
_profiled_method(NULL), _profiled_bci(0) {
ASSERT_VALUES
set_direct_compare(false);
}
// accessors
ciKlass* klass() const { return _ void set_profiled_bci(bci) { _profiled_bci = bci; }
Value obj() const return ; java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
is_loaded{ returnklass)! ; }
bool direct_compare
// manipulation
void set_direct_compare(bool flag) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// generic(ThrowIncompatibleClassChangeErrorFlag)
virtual bool can_trap(void () {
virtual set_flag(nvokeSpecialReceiverCheckFlag, true);
// Helpers for MethodData* profiling
void set_should_profile
c* { profiled_method method}
void ();
bool java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
ciMethod* java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 3
int profiled_bci() const
;
LEAF(CheckCast, TypeCheck)
public:
// creation
CheckCast(ciKlass* klass, Value obj, ValueStack* state_before)
: TypeCheck(klass, obj, objectType, state_before) {}
void set_incompatible_class_change_check() {
set_flag(ThrowIncompatibleClassChangeErrorFlag, true);
}
bool is_incompatible_class_change_check() const {
return check_flag(ThrowIncompatibleClassChangeErrorFlag);
}
void set_invokespecial_receiver_check() {
set_flag(InvokeSpecialReceiverCheckFlag, true);
}
bool is_invokespecial_receiver_checkpublic:
return check_flag(InvokeSpecialReceiverCheckFlag);
}
virtual bool needs_exception_state() const {
return !is_invokespecial_receiver_check();
}
ciType* declared_type
};
LEAF(InstanceOf, TypeCheckjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
:
// creation
InstanceOf(ciKlass* klass, Value obj, ValueStack* state_before) : TypeCheck(klass, obj, intType, state_before) { int monitor_no;
virtual boolAccessMonitorValue obj java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 75
};
BASE(AccessMonitor, StateSplit
private:
Value _obj;
int _monitor_no;
public:
// creation
AccessMonitor(Value obj, int monitor_no, ValueVisitorf :ijava.lang.StringIndexOutOfBoundsException: Range [80, 79) out of bounds for length 102
: StateSplit(illegalType, LEAF(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
,_obj(obj)
, _monitor_no(monitor_no)
{
set_needs_null_check(true);
ASSERT_VALUES
}
// accessors
Value obj() constjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
monitor_no) { return }
// generic
virtual void input_values_do(ValueVisitor* f}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
};
LEAF(MonitorEnter, AccessMonitor)
public:
// creation
MonitorEnter(Value obj, int monitor_no, ValueStack* state_before)
: AccessMonitor(obj, monitor_no public:
{
ASSERT_VALUES
}
// generic
virtual can_trap) { true;}
};
LEAF(MonitorExit,)
public:
// creation
MonitorExit(Value obj, int monitor_no)
:(obj, ArgsNonNullState _nonnull_state;;
{
ASSERT_VALUES
}
};
LEAF(Intrinsic, StateSplit)
private:
vmIntrinsics::java.lang.StringIndexOutOfBoundsException: Range [67, 19) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 25
Value ;
ate_java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
public:
// preserves_state can be set to true for Intrinsics
// which are guaranteed to preserve register state across any slow
/cases; bool,
// not trap, only that if we continue execution in the same basic
// block after the Intrinsic, all of the registers are intact. This
// allows load elimination and common expression elimination to be
/performed theIntrinsic.The defaultvalue is false
Intrinsic(ValueType* type,
vmIntrinsics::ID id,
Values* args,
verjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
bool preserves_state,
bool cantrap = true)
#efineSHARE_C1_C1_INSTRUCTION_HPP
, _id(id)
, _args(args)
,_cv(NULLjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
#include
set_flag(PreservesStateFlagIRScope;
PreservesStateFlag,preserves_state);
set_flag(CanTrapFlag, cantrap);
if (has_receiver) {
_recv = argument_at(0);
}
set_needs_null_check(has_receiver);
// some intrinsics can't trap, so don't force them to be pinned
// (i.e., are instantiated). All java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 19
PinStateSplitConstructor);
}
}
// accessors
sics::Did) const { return_id; }
c { return _args->length(); }
java.lang.StringIndexOutOfBoundsException: Range [49, 7) out of bounds for length 73
bool has_receiverc
java.lang.StringIndexOutOfBoundsException: Range [23, 5) out of bounds for length 24
bool preserves_state() const returncheck_flagPreservesStateFlag);}
java.lang.StringIndexOutOfBoundsException: Range [14, 5) out of bounds for length 26
_arg_needs_null_check;
}
java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 52
_.set_arg_needs_null_check(i, check);
}
// generic
virtual can_trapjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
virtual void input_values_dopublic
// A simple closure class for visiting the values of an Instruction
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
;
class iterate_backward(*
BlockBeginjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
private// ool/ Foreach/provided // (e.g., printing, code// visitor instead of added to the Instruction classes itself.
int _block_idvoid(*x)0
int _bci;;
int _java.lang.StringIndexOutOfBoundsException: Range [33, 29) out of bounds for length 58
nt l; // number of this block in linear-scan ordering
int virtual voiddo_ArithmeticOp (ArithmeticOp* x) = 0;
int _loop_depthp (ShiftOp*x = 0;
int _loop_index; // number of the innermost loop of this block
int_lags;// the flagsassociated thisblock
// fields used by BlockListBuilder
int_total_preds;
ResourceBitMap;
// SSA specific fields: (factor out later)
BlockList_ block
BlockList java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 58
virtual void(*x ;
virtual void do_MonitorExit (MonitorExit* x) = 0;
// the last instruction of this block
BlockList _virtual voiddo_Goto Goto )=0;
* _xception_states; / xhandlerentries:states instructionsthat an this
int; // if this block is the start of an exception handler,
// this records the PC offset in the assembly code of the
// first instruction in this block
void x ;
* _ir; low java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 108
_ java.lang.StringIndexOutOfBoundsException: Index 104 out of bounds for length 104
ResourceBitMap _live_out; virtual void do_RuntimeCall (RuntimeCall* x) = 0;
ResourceBitMap _live_gen; // set of registers used before any redefinition in this blockvirtualvoid do_MemBar (MemBar ) 0;
_;
ResourceBitMap _ bool preserves_state() constjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
i java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
;// ID of first LIR instruction in this block
int _last_lir_instruction_id// By default, each instruction implements hash() and is_equal(Value), used
// via the macros below. The// that need to be identical for two instructions to be identical.
void iterate_postorder(boolArray& mark, BlockClosure* closure// Note: The default implementation of hash() returns 0 in order to indicate
friend class SuxAndWeightAdjuster;
public:
void* operator new(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Compilation* = Compilation:);
*res = c-arena)-s;
return res;
}
// initialization/counting
static int number_of_blocks() {
Compilation:current(-()java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
}
// creation
BlockBegin(int bci)
: StateSplit(illegalType)
}
, _ci(ci)
,,_java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 27
-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
, _dominator_depth(-1)
,_(0)
_loop_index-
, _flags(0)
, _total_preds(0)
, _java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 12
,_2java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
, _dominates(2)
, _dominator(NULL)
, _end(NULL)
, _exception_handlersif !(nabled))return false
, _ (_ = )returnfalse; \
, exception_handler_pco(-1)
, _lir(NULL)
, _live_in()
, live_out(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
, _live_kill()
, _fpu_register_usage_
,_fpu_stack_stateNULLjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
,_first_lir_instruction_id(-1)
, _last_lir_instruction_id(-1)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
_block = this;
#ifndef PRODUCT
set_printable_bci(bci);
#endif
// accessors
block_id)const{ return_lock_id; }
int( _bci; }
() _; java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
}
int loop_depth) const _;}
intn; / mask identifying which args are nonnull
int depth_first_number() const { return _depth_first_number; }
int linear_scan_number() const { return _linear_scan_number; }
BlockEnd*end const return_; java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
{ return &_label; }
LIR_List* java.lang.StringIndexOutOfBoundsException: Range [59, 23) out of bounds for length 59
( return_exception_handler_pco; }
ResourceBitMapreturn true;
ResourceBitMap live_out) { return live_out;}
ResourceBitMap&if(i> &&iint)izeof(_) BitsPerByte){
ResourceBitMap& live_kill() { return _live_kill; }
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
*java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 80
intjava.lang.StringIndexOutOfBoundsException: Range [33, 30) out of bounds for length 86
int staticint = 99;
int () const java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
BitMap stores_to_locals( { return stores_to_locals; }
// manipulation
NeedsStoreCheckFlag
void set_loop_depth(int d) { _loop_depth = java.lang.StringIndexOutOfBoundsException: Range [4, 66) out of bounds for length 24
(nt) =d }
void( dfn){ _epth_first_numberdfn; }
void set_linear_scan_number(intlsn){ linear_scan_number ;}
void set_end enum {
static void disconnect_edge
BlockBegin* insert_block_between /
enumenum PinReason{
void set_lir(LIR_List* lir = lir; }
void set_exception_handler_pco(int pco) { _exception_handler_pco = pco; }
void set_live_in (const PinStackForStateSplit= 1 << 12
void set_live_out (const, PinStateSplitConstructor= 1 << 13
void set_live_gen (const ResourceBitMap map) live_gen = map; }
void;
void set_fpu_register_usage static Condition mirror(ondition cond);
void set_fpu_stack_state(intArray static Condition negate(Condition cond);
void set_first_lir_instruction_id
void (int id) { _last_lir_instruction_id = id; }
void increment_total_preds(int n = 1 return :current)-number_of_instructions();
(ValueType* type ValueStack*state_before = NULL, bool type_is_constant = false)
// generic
virtual,java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
/
BlockBegin(type!NULL&&(>)| , "ype ";
void add_predecessor(}
void
boolis_predecessor(* pred) const {return _predecessorscontains(pred) }
intef PRODUCT
BlockBegin
// exception handlers potentially invoked by this blockprintable_bci() const { assert(has_printable_bci(), "_printable_bci should have been set"); return _java.lang.StringIndexOutOfBoundsException: Index 135 out of bounds for length 74
add_exception_handler( bjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
(BlockBegin* b)
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 89
BlockBegin* int _dominator_depth;
// states of the instructions that have an edge to this exception handler
intnumber_of_exception_states int _loop_index; // number of thjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 94
ValueStack*exception_state_at(int java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 0
add_exception_stateValueStack*state
// flags
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 13
no_flag = 0,
std_entry_flag = 1 bool() ofthis block
osr_entry_flag = 1 << 1 BlockEnd*_;// the last instruction of this block
exception_entry_flag= < ValueStack**exception_state( const{return _exception_state; }
subroutine_entry_flag ){returnhandler of all an edge to thisxhandler
= 1 <4java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
=1 <5,
// DANGEROUS: onlyby
java.lang.StringIndexOutOfBoundsException: Range [34, 27) out of bounds for length 129
ritical_edge_split_flag 1 << 8,// set for all blocks that are introduced when critical edges are split
linear_scan_loop_header_flag = 1 < assert !NULL" not );
linear_scan_loop_end_flag=1< 10 // set during loop-detection for LinearScan
donot_eliminate_range_checks=1<< /java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
};
void set( _ext =next;
ResourceBitMap_fpu_register_usage;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
bool
const int entry_mask
return (_java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 27
}
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 50
void iterate_postorder (BlockClosure* closure);
void nstruction*
/return n;
void Instruction *insert_after_same_bci(Instruction *i) {
int loop_index#ifndef PRODUCT
// merging
bool try_merge(ValueStack* java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 3
void (subst= *res =c>()Amalloc(()java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
bool b = try_mergesubst-t(->( =," 'change)
assert(b, "merge
}
// debugging
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 138
voidnstructionPrinter,bool java.lang.StringIndexOutOfBoundsException: Range [59, 57) out of bounds for length 82
};
( )
private:
BlockList* _sux virtual AccessArray* java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 27
protected:
*sux)const_otal_preds()
istjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
Convertas_Convert){returnNULL
for (int i = sux-> , _end( _(NULL)
#endif
_sux = sux;
}
public ,_live_kill)
// creation
(java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 72
: StateSplit(type, , _first_lir_instruction_idrtualMonitorEnter as_MonitorEnter( NULL;
_x(ULLjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
set_flag( Goto* }
}
// accessors
bool is_safepoint() ( const return ;java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
// For compatibility with old code, for new code use block()
BlockBegin* begin() const virtual Base*( NULL }
// manipulation
inline void int () as_UnsafeOp) ;}
inline depth_first_number depth_first_number
// successors
-length:0}java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
i ) { -at(i); }
bool is_suxNULL java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 103
BlockBegin*({returnjava.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 88
(* old_sux BlockBegin*);
};
EAFGoto )
public:
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 18
nonejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
taken() ;
};
private: void print(InstructionPrinter&ip
ciMethod* _profiled_method
int _profiled_bci;
Direction// generic functionality in one place.
public:
// creation
Goto(BlockBegin* sux, ValueStack* state_before, bool is_safepoint = false)
: BlockEnd(illegalType, java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
, BASE(class_name, super_class_name) \
, _direction(none) {
BlockList s=new BlockList1;
s->append(sux);
set_sux)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
Goto(BlockBegin* suxjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
, _profiled_method(NULL)
, _profiled_bci(0)
_none java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
BlockList* sjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
s->append(sux);
set_sux(s);
}
bool should_profile() constprivate:
ciMethod pf_flags;
int java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
Direction:Instruction(-base()))
void&live_out) return; java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
set_profiled_methodciMethod* ) _ = ;}
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
**java.lang.StringIndexOutOfBoundsException: Range [31, 27) out of bounds for length 80
=,
#ifdef ASSERT
(Assert accessors
privateBitMap&( java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 78
_java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
set_dominator(*dom _ =dom }
y;
char *_message;
public:
// creation
void (Flag {_pf_flags = f }
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 68
// accessors
/ Invalidates phis corresponding to merges of locals of two different types
Condition(void()
substitute_sux(*old_sux BlockBegin*java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
Value y(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const char *type->java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 70
// generic
* f) f->f-visit(_y;
};
#endif
LEAF(RangeCheckPredicate, StateSplit)
private:
Value xbool is_receiver
Condition _cond;
Value _y;
voidLocal*declaredvoid(int id){_ast_lir_instruction_id=id;}
public:
// creation
// unordered_is_true is valid for float/double compares only
(aluexCondition cond, bool unordered_is_true, Value y, ValueStack*
, _x(x
intjava_index(
, _y(y)
{
ASSERT_VALUES ciType declared_type()const oid (BlockBegin pred);
set_flag/generic
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 2
)
}
// Always deoptimize
RangeCheckPredicate ):StateSplitillegalTypeis_exception_handler*b)const{ return exception_handlerscontains(b); }
{
this->set_state( Instruction(type, state( /*type_is_constant*/ true)
=;
( java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 13
// accessors
java.lang.StringIndexOutOfBoundsException: Range [35, 25) out of bounds for length 43
bool unordered_is_truejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
void always_fail() { _x = _ BlockBegin*compare: cond,
// generic
=1<,/set - forLinearScan
HASHING3cond_false
}java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
LEAF(Ifboolis_set(
:
Value _const entry_mask=
Condition _cond;
Value _y;
ciMethod*_rofiled_method
int _profiled_bci; // Canonicalizer may alter bci of If nodejava.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 0
bool ;
public:
// unordered_is_true is valid for float/double compares only
(x cond unordered_is_true y,BlockBegin tsux ,ValueStackstate_before set_flag( )
: BlockEnd(
, _x(x)
, _java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
, _y(y (Value obj)
()
, _profiled_bci(0)
,
{
ASSERT_VALUES
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 53
assert(x->type()->ag(==y> return(NeedsPatchingFlag);java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
BlockList* s =new(2);
->append(tsux
s->append(fsux);
set_sux(s);
}
// accessors
Valuex()const return x java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
protected:
bool unordered_is_true/java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 | | |