< prev index next >
src/hotspot/share/classfile/classFileStream.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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.
@@ -37,16 +37,18 @@
}
ClassFileStream::ClassFileStream(const u1* buffer,
int length,
const char* source,
- bool verify_stream) :
+ bool verify_stream,
+ bool from_modules_image) :
_buffer_start(buffer),
_buffer_end(buffer + length),
_current(buffer),
_source(source),
- _need_verify(verify_stream) {}
+ _need_verify(verify_stream),
+ _from_modules_image(from_modules_image) {}
const u1* ClassFileStream::clone_buffer() const {
u1* const new_buffer_start = NEW_RESOURCE_ARRAY(u1, length());
memcpy(new_buffer_start, _buffer_start, length());
return new_buffer_start;
@@ -68,11 +70,12 @@
const ClassFileStream* ClassFileStream::clone() const {
const u1* const new_buffer_start = clone_buffer();
return new ClassFileStream(new_buffer_start,
length(),
clone_source(),
- need_verify());
+ need_verify(),
+ from_modules_image());
}
u1 ClassFileStream::get_u1(TRAPS) const {
if (_need_verify) {
guarantee_more(1, CHECK_0);
< prev index next >