1 /*
2 * Copyright (c) 2000, 2014, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
2079
2080
2081 void LIR_OpDelay::print_instr(outputStream* out) const {
2082 _op->print_on(out);
2083 }
2084
2085
2086 // LIR_OpProfileCall
2087 void LIR_OpProfileCall::print_instr(outputStream* out) const {
2088 profiled_method()->name()->print_symbol_on(out);
2089 out->print(".");
2090 profiled_method()->holder()->name()->print_symbol_on(out);
2091 out->print(" @ %d ", profiled_bci());
2092 mdo()->print(out); out->print(" ");
2093 recv()->print(out); out->print(" ");
2094 tmp1()->print(out); out->print(" ");
2095 }
2096
2097 // LIR_OpProfileType
2098 void LIR_OpProfileType::print_instr(outputStream* out) const {
2099 out->print("exact = "); exact_klass()->print_name_on(out);
2100 out->print("current = "); ciTypeEntries::print_ciklass(out, current_klass());
2101 mdp()->print(out); out->print(" ");
2102 obj()->print(out); out->print(" ");
2103 tmp()->print(out); out->print(" ");
2104 }
2105
2106 #endif // PRODUCT
2107
2108 // Implementation of LIR_InsertionBuffer
2109
2110 void LIR_InsertionBuffer::append(int index, LIR_Op* op) {
2111 assert(_index_and_count.length() % 2 == 0, "must have a count for each index");
2112
2113 int i = number_of_insertion_points() - 1;
2114 if (i < 0 || index_at(i) < index) {
2115 append_new(index, 1);
2116 } else {
2117 assert(index_at(i) == index, "can append LIR_Ops in ascending order only");
2118 assert(count_at(i) > 0, "check");
2119 set_count_at(i, count_at(i) + 1);
2120 }
|
1 /*
2 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
2079
2080
2081 void LIR_OpDelay::print_instr(outputStream* out) const {
2082 _op->print_on(out);
2083 }
2084
2085
2086 // LIR_OpProfileCall
2087 void LIR_OpProfileCall::print_instr(outputStream* out) const {
2088 profiled_method()->name()->print_symbol_on(out);
2089 out->print(".");
2090 profiled_method()->holder()->name()->print_symbol_on(out);
2091 out->print(" @ %d ", profiled_bci());
2092 mdo()->print(out); out->print(" ");
2093 recv()->print(out); out->print(" ");
2094 tmp1()->print(out); out->print(" ");
2095 }
2096
2097 // LIR_OpProfileType
2098 void LIR_OpProfileType::print_instr(outputStream* out) const {
2099 out->print("exact = ");
2100 if (exact_klass() == NULL) {
2101 out->print("unknown");
2102 } else {
2103 exact_klass()->print_name_on(out);
2104 }
2105 out->print(" current = "); ciTypeEntries::print_ciklass(out, current_klass());
2106 out->print(" ");
2107 mdp()->print(out); out->print(" ");
2108 obj()->print(out); out->print(" ");
2109 tmp()->print(out); out->print(" ");
2110 }
2111
2112 #endif // PRODUCT
2113
2114 // Implementation of LIR_InsertionBuffer
2115
2116 void LIR_InsertionBuffer::append(int index, LIR_Op* op) {
2117 assert(_index_and_count.length() % 2 == 0, "must have a count for each index");
2118
2119 int i = number_of_insertion_points() - 1;
2120 if (i < 0 || index_at(i) < index) {
2121 append_new(index, 1);
2122 } else {
2123 assert(index_at(i) == index, "can append LIR_Ops in ascending order only");
2124 assert(count_at(i) > 0, "check");
2125 set_count_at(i, count_at(i) + 1);
2126 }
|