equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 2016, 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. |
1956 } |
1956 } |
1957 |
1957 |
1958 // Initialize the string |
1958 // Initialize the string |
1959 kit.store_String_value(kit.control(), result, dst_array); |
1959 kit.store_String_value(kit.control(), result, dst_array); |
1960 kit.store_String_coder(kit.control(), result, coder); |
1960 kit.store_String_coder(kit.control(), result, coder); |
|
1961 |
|
1962 // The value field is final. Emit a barrier here to ensure that the effect |
|
1963 // of the initialization is committed to memory before any code publishes |
|
1964 // a reference to the newly constructed object (see Parse::do_exits()). |
|
1965 assert(AllocateNode::Ideal_allocation(result, _gvn) != NULL, "should be newly allocated"); |
|
1966 kit.insert_mem_bar(Op_MemBarRelease, result); |
1961 } else { |
1967 } else { |
1962 result = C->top(); |
1968 result = C->top(); |
1963 } |
1969 } |
1964 // hook up the outgoing control and result |
1970 // hook up the outgoing control and result |
1965 kit.replace_call(sc->end(), result); |
1971 kit.replace_call(sc->end(), result); |