1.1 --- a/src/share/vm/classfile/javaClasses.hpp Mon Mar 24 09:14:14 2014 -0700 1.2 +++ b/src/share/vm/classfile/javaClasses.hpp Tue Mar 18 19:07:22 2014 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -61,10 +61,6 @@ 1.11 1.12 static Handle basic_create(int length, TRAPS); 1.13 1.14 - static void set_value( oop string, typeArrayOop buffer) { 1.15 - assert(initialized, "Must be initialized"); 1.16 - string->obj_field_put(value_offset, (oop)buffer); 1.17 - } 1.18 static void set_offset(oop string, int offset) { 1.19 assert(initialized, "Must be initialized"); 1.20 if (offset_offset > 0) { 1.21 @@ -122,12 +118,26 @@ 1.22 return hash_offset; 1.23 } 1.24 1.25 + static void set_value(oop string, typeArrayOop buffer) { 1.26 + assert(initialized && (value_offset > 0), "Must be initialized"); 1.27 + string->obj_field_put(value_offset, (oop)buffer); 1.28 + } 1.29 + static void set_hash(oop string, unsigned int hash) { 1.30 + assert(initialized && (hash_offset > 0), "Must be initialized"); 1.31 + string->int_field_put(hash_offset, hash); 1.32 + } 1.33 + 1.34 // Accessors 1.35 static typeArrayOop value(oop java_string) { 1.36 assert(initialized && (value_offset > 0), "Must be initialized"); 1.37 assert(is_instance(java_string), "must be java_string"); 1.38 return (typeArrayOop) java_string->obj_field(value_offset); 1.39 } 1.40 + static unsigned int hash(oop java_string) { 1.41 + assert(initialized && (hash_offset > 0), "Must be initialized"); 1.42 + assert(is_instance(java_string), "must be java_string"); 1.43 + return java_string->int_field(hash_offset); 1.44 + } 1.45 static int offset(oop java_string) { 1.46 assert(initialized, "Must be initialized"); 1.47 assert(is_instance(java_string), "must be java_string");