1947 #endif
1948
1949 // ciTypeFlow
1950 //
1951 // This is a pass over the bytecodes which computes the following:
1952 // basic block structure
1953 // interpreter type-states (a la the verifier)
1954
1955 // ------------------------------------------------------------------
1956 // ciTypeFlow::ciTypeFlow
1957 ciTypeFlow::ciTypeFlow(ciEnv* env, ciMethod* method, int osr_bci) {
1958 _env = env;
1959 _method = method;
1960 _methodBlocks = method->get_method_blocks();
1961 _max_locals = method->max_locals();
1962 _max_stack = method->max_stack();
1963 _code_size = method->code_size();
1964 _has_irreducible_entry = false;
1965 _osr_bci = osr_bci;
1966 _failure_reason = NULL;
1967 assert(0 <= start_bci() && start_bci() < code_size() , err_msg("correct osr_bci argument: 0 <= %d < %d", start_bci(), code_size()));
1968 _work_list = NULL;
1969
1970 _ciblock_count = _methodBlocks->num_blocks();
1971 _idx_to_blocklist = NEW_ARENA_ARRAY(arena(), GrowableArray<Block*>*, _ciblock_count);
1972 for (int i = 0; i < _ciblock_count; i++) {
1973 _idx_to_blocklist[i] = NULL;
1974 }
1975 _block_map = NULL; // until all blocks are seen
1976 _jsr_count = 0;
1977 _jsr_records = NULL;
1978 }
1979
1980 // ------------------------------------------------------------------
1981 // ciTypeFlow::work_list_next
1982 //
1983 // Get the next basic block from our work list.
1984 ciTypeFlow::Block* ciTypeFlow::work_list_next() {
1985 assert(!work_list_empty(), "work list must not be empty");
1986 Block* next_block = _work_list;
1987 _work_list = next_block->next();
|
1947 #endif
1948
1949 // ciTypeFlow
1950 //
1951 // This is a pass over the bytecodes which computes the following:
1952 // basic block structure
1953 // interpreter type-states (a la the verifier)
1954
1955 // ------------------------------------------------------------------
1956 // ciTypeFlow::ciTypeFlow
1957 ciTypeFlow::ciTypeFlow(ciEnv* env, ciMethod* method, int osr_bci) {
1958 _env = env;
1959 _method = method;
1960 _methodBlocks = method->get_method_blocks();
1961 _max_locals = method->max_locals();
1962 _max_stack = method->max_stack();
1963 _code_size = method->code_size();
1964 _has_irreducible_entry = false;
1965 _osr_bci = osr_bci;
1966 _failure_reason = NULL;
1967 assert(0 <= start_bci() && start_bci() < code_size() , "correct osr_bci argument: 0 <= %d < %d", start_bci(), code_size());
1968 _work_list = NULL;
1969
1970 _ciblock_count = _methodBlocks->num_blocks();
1971 _idx_to_blocklist = NEW_ARENA_ARRAY(arena(), GrowableArray<Block*>*, _ciblock_count);
1972 for (int i = 0; i < _ciblock_count; i++) {
1973 _idx_to_blocklist[i] = NULL;
1974 }
1975 _block_map = NULL; // until all blocks are seen
1976 _jsr_count = 0;
1977 _jsr_records = NULL;
1978 }
1979
1980 // ------------------------------------------------------------------
1981 // ciTypeFlow::work_list_next
1982 //
1983 // Get the next basic block from our work list.
1984 ciTypeFlow::Block* ciTypeFlow::work_list_next() {
1985 assert(!work_list_empty(), "work list must not be empty");
1986 Block* next_block = _work_list;
1987 _work_list = next_block->next();
|