< prev index next >

src/hotspot/share/c1/c1_GraphBuilder.cpp

Print this page




3151 }
3152 
3153 
3154 ValueStack* GraphBuilder::state_at_entry() {
3155   ValueStack* state = new ValueStack(scope(), NULL);
3156 
3157   // Set up locals for receiver
3158   int idx = 0;
3159   if (!method()->is_static()) {
3160     // we should always see the receiver
3161     state->store_local(idx, new Local(method()->holder(), objectType, idx, true));
3162     idx = 1;
3163   }
3164 
3165   // Set up locals for incoming arguments
3166   ciSignature* sig = method()->signature();
3167   for (int i = 0; i < sig->count(); i++) {
3168     ciType* type = sig->type_at(i);
3169     BasicType basic_type = type->basic_type();
3170     // don't allow T_ARRAY to propagate into locals types
3171     if (basic_type == T_ARRAY) basic_type = T_OBJECT;
3172     ValueType* vt = as_ValueType(basic_type);
3173     state->store_local(idx, new Local(type, vt, idx, false));
3174     idx += type->size();
3175   }
3176 
3177   // lock synchronized method
3178   if (method()->is_synchronized()) {
3179     state->lock(NULL);
3180   }
3181 
3182   return state;
3183 }
3184 
3185 
3186 GraphBuilder::GraphBuilder(Compilation* compilation, IRScope* scope)
3187   : _scope_data(NULL)
3188   , _compilation(compilation)
3189   , _memory(new MemoryBuffer())
3190   , _inline_bailout_msg(NULL)
3191   , _instruction_count(0)




3151 }
3152 
3153 
3154 ValueStack* GraphBuilder::state_at_entry() {
3155   ValueStack* state = new ValueStack(scope(), NULL);
3156 
3157   // Set up locals for receiver
3158   int idx = 0;
3159   if (!method()->is_static()) {
3160     // we should always see the receiver
3161     state->store_local(idx, new Local(method()->holder(), objectType, idx, true));
3162     idx = 1;
3163   }
3164 
3165   // Set up locals for incoming arguments
3166   ciSignature* sig = method()->signature();
3167   for (int i = 0; i < sig->count(); i++) {
3168     ciType* type = sig->type_at(i);
3169     BasicType basic_type = type->basic_type();
3170     // don't allow T_ARRAY to propagate into locals types
3171     if (is_reference_type(basic_type)) basic_type = T_OBJECT;
3172     ValueType* vt = as_ValueType(basic_type);
3173     state->store_local(idx, new Local(type, vt, idx, false));
3174     idx += type->size();
3175   }
3176 
3177   // lock synchronized method
3178   if (method()->is_synchronized()) {
3179     state->lock(NULL);
3180   }
3181 
3182   return state;
3183 }
3184 
3185 
3186 GraphBuilder::GraphBuilder(Compilation* compilation, IRScope* scope)
3187   : _scope_data(NULL)
3188   , _compilation(compilation)
3189   , _memory(new MemoryBuffer())
3190   , _inline_bailout_msg(NULL)
3191   , _instruction_count(0)


< prev index next >