< prev index next >

src/share/vm/opto/stringopts.hpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2015, 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.

@@ -27,10 +27,11 @@
 
 #include "opto/node.hpp"
 #include "opto/phaseX.hpp"
 
 class StringConcat;
+class IdealVariable;
 
 class PhaseStringOpts : public Phase {
   friend class StringConcat;
 
  private:

@@ -38,11 +39,11 @@
 
   // List of dead nodes to clean up aggressively at the end
   Unique_Node_List dead_worklist;
 
   // Memory slices needed for code gen
-  int char_adr_idx;
+  int byte_adr_idx;
 
   // Integer.sizeTable - used for int to String conversion
   ciField* size_table_field;
 
   // A set for use by various stages

@@ -62,15 +63,41 @@
   Node* fetch_static_field(GraphKit& kit, ciField* field);
 
   // Compute the number of characters required to represent the int value
   Node* int_stringSize(GraphKit& kit, Node* value);
 
-  // Copy the characters representing value into char_array starting at start
-  void int_getChars(GraphKit& kit, Node* value, Node* char_array, Node* start, Node* end);
+  // Simplified version of Integer.getChars
+  void getChars(GraphKit& kit, Node* arg, Node* dst_array, BasicType bt, Node* end, Node* final_merge, Node* final_mem, int merge_index = 0);
 
-  // Copy of the contents of the String str into char_array starting at index start.
-  Node* copy_string(GraphKit& kit, Node* str, Node* char_array, Node* start);
+  // Copy the characters representing arg into dst_array starting at start
+  Node* int_getChars(GraphKit& kit, Node* arg, Node* dst_array, Node* dst_coder, Node* start, Node* size);
+
+  // Copy contents of the String str into dst_array starting at index start.
+  Node* copy_string(GraphKit& kit, Node* str, Node* dst_array, Node* dst_coder, Node* start);
+
+  // Copy 'count' bytes/chars from src_array to dst_array starting at index start
+  void arraycopy(GraphKit& kit, IdealKit& ideal, Node* src_array, Node* dst_array, BasicType elembt, Node* start, Node* count);
+
+  // Copy contents of constant src_array to dst_array by emitting individual stores
+  void copy_constant_string(GraphKit& kit, IdealKit& ideal, ciTypeArray* src_array, IdealVariable& count,
+                            bool src_is_byte, Node* dst_array, Node* dst_coder, Node* start);
+
+  // Copy contents of a Latin1 encoded string from src_array to dst_array
+  void copy_latin1_string(GraphKit& kit, IdealKit& ideal, Node* src_array, IdealVariable& count,
+                          Node* dst_array, Node* dst_coder, Node* start);
+
+  // Copy the char into dst_array at index start.
+  Node* copy_char(GraphKit& kit, Node* val, Node* dst_array, Node* dst_coder, Node* start);
+
+  // Allocate a byte array of specified length.
+  Node* allocate_byte_array(GraphKit& kit, IdealKit* ideal, Node* length);
+
+  // Returns the coder of a constant string
+  jbyte get_constant_coder(GraphKit& kit, Node* str);
+
+  // Returns the length of a constant string
+  int get_constant_length(GraphKit& kit, Node* str);
 
   // Clean up any leftover nodes
   void record_dead_node(Node* node);
   void remove_dead_nodes();
 
< prev index next >