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 *
23 */
24
25 #include "precompiled.hpp"
26 #include "code/nmethod.hpp"
27 #include "memory/allocation.hpp"
28 #include "memory/allocation.inline.hpp"
29 #include "memory/resourceArea.hpp"
30 #include "oops/methodData.hpp"
31 #include "oops/method.hpp"
32 #include "oops/oop.inline.hpp"
33 #include "runtime/deoptimization.hpp"
34 #include "runtime/vmThread.hpp"
35 #include "utilities/vmError.hpp"
36 #include "utilities/xmlstream.hpp"
37
38 // Do not assert this condition if there's already another error reported.
39 #define assert_if_no_error(cond, msg) \
40 vmassert((cond) || VMError::is_error_reported(), msg)
41
42 void xmlStream::initialize(outputStream* out) {
43 _out = out;
44 _last_flush = 0;
45 _markup_state = BODY;
46 _text_init._outer_xmlStream = this;
47 _text = &_text_init;
48
49 #ifdef ASSERT
50 _element_depth = 0;
51 int init_len = 100;
52 char* init_buf = NEW_C_HEAP_ARRAY(char, init_len, mtInternal);
53 _element_close_stack_low = init_buf;
|
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 *
23 */
24
25 #include "precompiled.hpp"
26 #include "code/nmethod.hpp"
27 #include "memory/allocation.hpp"
28 #include "memory/allocation.inline.hpp"
29 #include "memory/resourceArea.hpp"
30 #include "oops/methodData.hpp"
31 #include "oops/method.hpp"
32 #include "oops/oop.inline.hpp"
33 #include "runtime/deoptimization.hpp"
34 #include "runtime/handles.inline.hpp"
35 #include "runtime/vmThread.hpp"
36 #include "utilities/vmError.hpp"
37 #include "utilities/xmlstream.hpp"
38
39 // Do not assert this condition if there's already another error reported.
40 #define assert_if_no_error(cond, msg) \
41 vmassert((cond) || VMError::is_error_reported(), msg)
42
43 void xmlStream::initialize(outputStream* out) {
44 _out = out;
45 _last_flush = 0;
46 _markup_state = BODY;
47 _text_init._outer_xmlStream = this;
48 _text = &_text_init;
49
50 #ifdef ASSERT
51 _element_depth = 0;
52 int init_len = 100;
53 char* init_buf = NEW_C_HEAP_ARRAY(char, init_len, mtInternal);
54 _element_close_stack_low = init_buf;
|