< prev index next >
hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
Print this page
rev 10453 : imported patch update dates
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, 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.
@@ -354,11 +354,11 @@
void BlockListBuilder::mark_loops() {
ResourceMark rm;
_active = BitMap(BlockBegin::number_of_blocks()); _active.clear();
_visited = BitMap(BlockBegin::number_of_blocks()); _visited.clear();
- _loop_map = intArray(BlockBegin::number_of_blocks(), 0);
+ _loop_map = intArray(BlockBegin::number_of_blocks(), BlockBegin::number_of_blocks(), 0);
_next_loop_index = 0;
_next_block_number = _blocks.length();
// recursively iterate the control flow graph
mark_loops(_bci2block->at(0), false);
@@ -1351,11 +1351,11 @@
ValueStack* state_before = copy_state_if_bb(is_bb);;
append(new If(ipop(), If::eql, true, key, tsux, fsux, state_before, is_bb));
} else {
// collect successors & keys
BlockList* sux = new BlockList(l + 1, NULL);
- intArray* keys = new intArray(l, 0);
+ intArray* keys = new intArray(l, l, 0);
int i;
bool has_bb = false;
for (i = 0; i < l; i++) {
LookupswitchPair pair = sw.pair_at(i);
if (pair.offset() < 0) has_bb = true;
@@ -1714,22 +1714,22 @@
void GraphBuilder::check_args_for_profiling(Values* obj_args, int expected) {
#ifdef ASSERT
bool ignored_will_link;
ciSignature* declared_signature = NULL;
ciMethod* real_target = method()->get_method_at_bci(bci(), ignored_will_link, &declared_signature);
- assert(expected == obj_args->length() || real_target->is_method_handle_intrinsic(), "missed on arg?");
+ assert(expected == obj_args->max_length() || real_target->is_method_handle_intrinsic(), "missed on arg?");
#endif
}
// Collect arguments that we want to profile in a list
Values* GraphBuilder::collect_args_for_profiling(Values* args, ciMethod* target, bool may_have_receiver) {
int start = 0;
Values* obj_args = args_list_for_profiling(target, start, may_have_receiver);
if (obj_args == NULL) {
return NULL;
}
- int s = obj_args->size();
+ int s = obj_args->max_length();
// if called through method handle invoke, some arguments may have been popped
for (int i = start, j = 0; j < s && i < args->length(); i++) {
if (args->at(i)->type()->is_object_kind()) {
obj_args->push(args->at(i));
j++;
@@ -2162,11 +2162,11 @@
void GraphBuilder::new_multi_array(int dimensions) {
bool will_link;
ciKlass* klass = stream()->get_klass(will_link);
ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
- Values* dims = new Values(dimensions, NULL);
+ Values* dims = new Values(dimensions, dimensions, NULL);
// fill in all dimensions
int i = dimensions;
while (i-- > 0) dims->at_put(i, ipop());
// create array
NewArray* n = new NewMultiArray(klass, dims, state_before);
@@ -3768,13 +3768,13 @@
if (profile_calls()) {
int start = 0;
Values* obj_args = args_list_for_profiling(callee, start, has_receiver);
if (obj_args != NULL) {
- int s = obj_args->size();
+ int s = obj_args->max_length();
// if called through method handle invoke, some arguments may have been popped
- for (int i = args_base+start, j = 0; j < obj_args->size() && i < state()->stack_size(); ) {
+ for (int i = args_base+start, j = 0; j < obj_args->max_length() && i < state()->stack_size(); ) {
Value v = state()->stack_at_inc(i);
if (v->type()->is_object_kind()) {
obj_args->push(v);
j++;
}
@@ -4087,11 +4087,11 @@
data->set_jsr_return_address_local(-1);
// Must clone bci2block list as we will be mutating it in order to
// properly clone all blocks in jsr region as well as exception
// handlers containing rets
BlockList* new_bci2block = new BlockList(bci2block()->length());
- new_bci2block->push_all(bci2block());
+ new_bci2block->appendAll(bci2block());
data->set_bci2block(new_bci2block);
data->set_scope(scope());
data->setup_jsr_xhandlers();
data->set_continuation(continuation());
data->set_jsr_continuation(jsr_continuation);
< prev index next >