1 /* |
1 /* |
2 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
62 Node* fetch_static_field(GraphKit& kit, ciField* field); |
63 Node* fetch_static_field(GraphKit& kit, ciField* field); |
63 |
64 |
64 // Compute the number of characters required to represent the int value |
65 // Compute the number of characters required to represent the int value |
65 Node* int_stringSize(GraphKit& kit, Node* value); |
66 Node* int_stringSize(GraphKit& kit, Node* value); |
66 |
67 |
67 // Copy the characters representing value into char_array starting at start |
68 // Simplified version of Integer.getChars |
68 void int_getChars(GraphKit& kit, Node* value, Node* char_array, Node* start, Node* end); |
69 void getChars(GraphKit& kit, Node* arg, Node* dst_array, BasicType bt, Node* end, Node* final_merge, Node* final_mem, int merge_index = 0); |
69 |
70 |
70 // Copy of the contents of the String str into char_array starting at index start. |
71 // Copy the characters representing arg into dst_array starting at start |
71 Node* copy_string(GraphKit& kit, Node* str, Node* char_array, Node* start); |
72 Node* int_getChars(GraphKit& kit, Node* arg, Node* dst_array, Node* dst_coder, Node* start, Node* size); |
|
73 |
|
74 // Copy contents of the String str into dst_array starting at index start. |
|
75 Node* copy_string(GraphKit& kit, Node* str, Node* dst_array, Node* dst_coder, Node* start); |
|
76 |
|
77 // Copy 'count' bytes/chars from src_array to dst_array starting at index start |
|
78 void arraycopy(GraphKit& kit, IdealKit& ideal, Node* src_array, Node* dst_array, BasicType elembt, Node* start, Node* count); |
|
79 |
|
80 // Copy contents of constant src_array to dst_array by emitting individual stores |
|
81 void copy_constant_string(GraphKit& kit, IdealKit& ideal, ciTypeArray* src_array, IdealVariable& count, |
|
82 bool src_is_byte, Node* dst_array, Node* dst_coder, Node* start); |
|
83 |
|
84 // Copy contents of a Latin1 encoded string from src_array to dst_array |
|
85 void copy_latin1_string(GraphKit& kit, IdealKit& ideal, Node* src_array, IdealVariable& count, |
|
86 Node* dst_array, Node* dst_coder, Node* start); |
|
87 |
|
88 // Copy the char into dst_array at index start. |
|
89 Node* copy_char(GraphKit& kit, Node* val, Node* dst_array, Node* dst_coder, Node* start); |
|
90 |
|
91 // Allocate a byte array of specified length. |
|
92 Node* allocate_byte_array(GraphKit& kit, IdealKit* ideal, Node* length); |
|
93 |
|
94 // Returns the coder of a constant string |
|
95 jbyte get_constant_coder(GraphKit& kit, Node* str); |
|
96 |
|
97 // Returns the length of a constant string |
|
98 int get_constant_length(GraphKit& kit, Node* str); |
72 |
99 |
73 // Clean up any leftover nodes |
100 // Clean up any leftover nodes |
74 void record_dead_node(Node* node); |
101 void record_dead_node(Node* node); |
75 void remove_dead_nodes(); |
102 void remove_dead_nodes(); |
76 |
103 |