From 3f561e29a9c90811f18f364d262e5e1915884202 Mon Sep 17 00:00:00 2001 From: Sharath Ballal Date: Fri, 8 Dec 2017 15:41:11 +0530 Subject: [PATCH 01/88] 8193124: SA: Testcases for clhsdb jdis and findpc commands Reviewed-by: sundar, cjplummer, jgeorge --- .../jtreg/serviceability/sa/ClhsdbFindPC.java | 108 ++++++++++++++++++ .../jtreg/serviceability/sa/ClhsdbJdis.java | 95 +++++++++++++++ 2 files changed, 203 insertions(+) create mode 100644 test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java create mode 100644 test/hotspot/jtreg/serviceability/sa/ClhsdbJdis.java diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java new file mode 100644 index 00000000000..30a2959ba19 --- /dev/null +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; + +import jdk.test.lib.apps.LingeredApp; + +/* + * @test + * @bug 8193124 + * @summary Test the clhsdb 'findpc' command + * @library /test/lib + * @run main/othervm ClhsdbFindPC + */ + +public class ClhsdbFindPC { + + private static void testFindPC(boolean withXcomp) throws Exception { + LingeredApp theApp = null; + try { + ClhsdbLauncher test = new ClhsdbLauncher(); + theApp = withXcomp ? LingeredApp.startApp(List.of("-Xcomp")) + : LingeredApp.startApp(List.of("-Xint")); + System.out.print("Started LingeredApp "); + if (withXcomp) { + System.out.print("(-Xcomp) "); + } else { + System.out.print("(-Xint) "); + } + System.out.println("with pid " + theApp.getPid()); + + // Run 'jstack -v' command to get the pc + List cmds = List.of("jstack -v"); + String output = test.run(theApp.getPid(), cmds, null, null); + + // Test the 'findpc' command passing in the pc obtained from + // the 'jstack -v' command + cmds = new ArrayList(); + + // Output could be null if the test was skipped due to + // attach permission issues. + if (output != null) { + String cmdStr = null; + String[] parts = output.split("LingeredApp.main"); + String[] tokens = parts[1].split(" "); + for (String token : tokens) { + if (token.contains("pc")) { + String[] address = token.split("="); + // address[1] represents the address of the Method + cmdStr = "findpc " + address[1].replace(",",""); + cmds.add(cmdStr); + break; + } + } + + Map> expStrMap = new HashMap<>(); + if (withXcomp) { + expStrMap.put(cmdStr, List.of( + "In code in NMethod for jdk/test/lib/apps/LingeredApp.main", + "content:", + "oops:", + "frame size:")); + } else { + expStrMap.put(cmdStr, List.of( + "In interpreter codelet", + "invoke return entry points")); + } + + test.run(theApp.getPid(), cmds, expStrMap, null); + } + } catch (Exception ex) { + throw new RuntimeException("Test ERROR " + ex, ex); + } finally { + LingeredApp.stopApp(theApp); + } + } + + public static void main(String[] args) throws Exception { + System.out.println("Starting the ClhsdbFindPC test"); + testFindPC(true); + testFindPC(false); + System.out.println("Test PASSED"); + } +} + diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbJdis.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbJdis.java new file mode 100644 index 00000000000..5d8c0bdcf7b --- /dev/null +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbJdis.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; + +import jdk.test.lib.apps.LingeredApp; + +/* + * @test + * @bug 8193124 + * @summary Test the clhsdb 'jdis' command + * @library /test/lib + * @run main/othervm ClhsdbJdis + */ + +public class ClhsdbJdis { + + public static void main(String[] args) throws Exception { + LingeredApp theApp = null; + System.out.println("Starting the ClhsdbJdis test"); + + try { + ClhsdbLauncher test = new ClhsdbLauncher(); + theApp = LingeredApp.startApp(); + System.out.println("Started LingeredApp with pid " + theApp.getPid()); + + // Run 'jstack -v' command to get the Method Address + List cmds = List.of("jstack -v"); + String output = test.run(theApp.getPid(), cmds, null, null); + + // Test the 'jdis' command passing in the address obtained from + // the 'jstack -v' command + cmds = new ArrayList(); + + // Output could be null if the test was skipped due to + // attach permission issues. + if (output != null) { + String cmdStr = null; + String[] parts = output.split("LingeredApp.main"); + String[] tokens = parts[1].split(" "); + for (String token : tokens) { + if (token.contains("Method")) { + String[] address = token.split("="); + // address[1] represents the address of the Method + cmdStr = "jdis " + address[1]; + cmds.add(cmdStr); + break; + } + } + + Map> expStrMap = new HashMap<>(); + expStrMap.put(cmdStr, List.of( + "public static void main(java.lang.String[])", + "Holder Class", + "public class jdk.test.lib.apps.LingeredApp @", + "Bytecode", + "line bci bytecode", + "Exception Table", + "start bci end bci handler bci catch type", + "Constant Pool of [public class jdk.test.lib.apps.LingeredApp @")); + + test.run(theApp.getPid(), cmds, expStrMap, null); + } + } catch (Exception ex) { + throw new RuntimeException("Test ERROR " + ex, ex); + } finally { + LingeredApp.stopApp(theApp); + } + System.out.println("Test PASSED"); + } +} + From b0138d81ade5cd659eb7ba2a63ec95eecf15eae9 Mon Sep 17 00:00:00 2001 From: "Daniel D. Daugherty" Date: Fri, 8 Dec 2017 15:24:47 -0500 Subject: [PATCH 02/88] 8193135: get rid of redundant _smr_ prefix/infix in ThreadSMRSupport stuff Reviewed-by: stefank, gtriantafill, coleenp --- src/hotspot/share/runtime/java.cpp | 4 +- src/hotspot/share/runtime/thread.cpp | 8 +- src/hotspot/share/runtime/threadSMR.cpp | 431 +++++++++--------- src/hotspot/share/runtime/threadSMR.hpp | 81 ++-- .../share/runtime/threadSMR.inline.hpp | 28 +- ...dThreadsListHandleInErrorHandlingTest.java | 2 +- .../runtime/Thread/TestThreadDumpSMRInfo.java | 8 +- 7 files changed, 281 insertions(+), 281 deletions(-) diff --git a/src/hotspot/share/runtime/java.cpp b/src/hotspot/share/runtime/java.cpp index 4edb5d82604..4f76467a0f0 100644 --- a/src/hotspot/share/runtime/java.cpp +++ b/src/hotspot/share/runtime/java.cpp @@ -357,7 +357,7 @@ void print_statistics() { MemTracker::final_report(tty); } - ThreadsSMRSupport::log_smr_statistics(); + ThreadsSMRSupport::log_statistics(); } #else // PRODUCT MODE STATISTICS @@ -399,7 +399,7 @@ void print_statistics() { Method::print_touched_methods(tty); } - ThreadsSMRSupport::log_smr_statistics(); + ThreadsSMRSupport::log_statistics(); } #endif diff --git a/src/hotspot/share/runtime/thread.cpp b/src/hotspot/share/runtime/thread.cpp index e95bd2f2e88..a66018c412d 100644 --- a/src/hotspot/share/runtime/thread.cpp +++ b/src/hotspot/share/runtime/thread.cpp @@ -3473,7 +3473,7 @@ static inline void *prefetch_and_load_ptr(void **addr, intx prefetch_interval) { X = (JavaThread*)prefetch_and_load_ptr((void**)MACRO_current_p, (intx)MACRO_scan_interval)) // All JavaThreads -#define ALL_JAVA_THREADS(X) DO_JAVA_THREADS(ThreadsSMRSupport::get_smr_java_thread_list(), X) +#define ALL_JAVA_THREADS(X) DO_JAVA_THREADS(ThreadsSMRSupport::get_java_thread_list(), X) // All JavaThreads + all non-JavaThreads (i.e., every thread in the system) void Threads::threads_do(ThreadClosure* tc) { @@ -4382,7 +4382,7 @@ void Threads::remove(JavaThread* p) { // that we do not remove thread without safepoint code notice { MutexLocker ml(Threads_lock); - assert(ThreadsSMRSupport::get_smr_java_thread_list()->includes(p), "p must be present"); + assert(ThreadsSMRSupport::get_java_thread_list()->includes(p), "p must be present"); // Maintain fast thread list ThreadsSMRSupport::remove_thread(p); @@ -4610,7 +4610,7 @@ void Threads::print_on(outputStream* st, bool print_stacks, } #endif // INCLUDE_SERVICES - ThreadsSMRSupport::print_smr_info_on(st); + ThreadsSMRSupport::print_info_on(st); st->cr(); ALL_JAVA_THREADS(p) { @@ -4679,7 +4679,7 @@ class PrintOnErrorClosure : public ThreadClosure { // memory (even in resource area), it might deadlock the error handler. void Threads::print_on_error(outputStream* st, Thread* current, char* buf, int buflen) { - ThreadsSMRSupport::print_smr_info_on(st); + ThreadsSMRSupport::print_info_on(st); st->cr(); bool found_current = false; diff --git a/src/hotspot/share/runtime/threadSMR.cpp b/src/hotspot/share/runtime/threadSMR.cpp index faafbbae05e..7c2a0f29cdc 100644 --- a/src/hotspot/share/runtime/threadSMR.cpp +++ b/src/hotspot/share/runtime/threadSMR.cpp @@ -31,131 +31,131 @@ #include "utilities/globalDefinitions.hpp" #include "utilities/resourceHash.hpp" -Monitor* ThreadsSMRSupport::_smr_delete_lock = - new Monitor(Monitor::special, "smr_delete_lock", +Monitor* ThreadsSMRSupport::_delete_lock = + new Monitor(Monitor::special, "Thread_SMR_delete_lock", false /* allow_vm_block */, Monitor::_safepoint_check_never); // The '_cnt', '_max' and '_times" fields are enabled via // -XX:+EnableThreadSMRStatistics: -// # of parallel threads in _smr_delete_lock->wait(). +// # of parallel threads in _delete_lock->wait(). // Impl note: Hard to imagine > 64K waiting threads so this could be 16-bit, // but there is no nice 16-bit _FORMAT support. -uint ThreadsSMRSupport::_smr_delete_lock_wait_cnt = 0; +uint ThreadsSMRSupport::_delete_lock_wait_cnt = 0; -// Max # of parallel threads in _smr_delete_lock->wait(). -// Impl note: See _smr_delete_lock_wait_cnt note. -uint ThreadsSMRSupport::_smr_delete_lock_wait_max = 0; +// Max # of parallel threads in _delete_lock->wait(). +// Impl note: See _delete_lock_wait_cnt note. +uint ThreadsSMRSupport::_delete_lock_wait_max = 0; -// Flag to indicate when an _smr_delete_lock->notify() is needed. -// Impl note: See _smr_delete_lock_wait_cnt note. -volatile uint ThreadsSMRSupport::_smr_delete_notify = 0; +// Flag to indicate when an _delete_lock->notify() is needed. +// Impl note: See _delete_lock_wait_cnt note. +volatile uint ThreadsSMRSupport::_delete_notify = 0; // # of threads deleted over VM lifetime. // Impl note: Atomically incremented over VM lifetime so use unsigned for more // range. Unsigned 64-bit would be more future proof, but 64-bit atomic inc // isn't available everywhere (or is it?). -volatile uint ThreadsSMRSupport::_smr_deleted_thread_cnt = 0; +volatile uint ThreadsSMRSupport::_deleted_thread_cnt = 0; // Max time in millis to delete a thread. // Impl note: 16-bit might be too small on an overloaded machine. Use // unsigned since this is a time value. Set via Atomic::cmpxchg() in a // loop for correctness. -volatile uint ThreadsSMRSupport::_smr_deleted_thread_time_max = 0; +volatile uint ThreadsSMRSupport::_deleted_thread_time_max = 0; // Cumulative time in millis to delete threads. // Impl note: Atomically added to over VM lifetime so use unsigned for more // range. Unsigned 64-bit would be more future proof, but 64-bit atomic inc // isn't available everywhere (or is it?). -volatile uint ThreadsSMRSupport::_smr_deleted_thread_times = 0; +volatile uint ThreadsSMRSupport::_deleted_thread_times = 0; -ThreadsList* volatile ThreadsSMRSupport::_smr_java_thread_list = new ThreadsList(0); +ThreadsList* volatile ThreadsSMRSupport::_java_thread_list = new ThreadsList(0); // # of ThreadsLists allocated over VM lifetime. // Impl note: We allocate a new ThreadsList for every thread create and // every thread delete so we need a bigger type than the -// _smr_deleted_thread_cnt field. -uint64_t ThreadsSMRSupport::_smr_java_thread_list_alloc_cnt = 1; +// _deleted_thread_cnt field. +uint64_t ThreadsSMRSupport::_java_thread_list_alloc_cnt = 1; // # of ThreadsLists freed over VM lifetime. -// Impl note: See _smr_java_thread_list_alloc_cnt note. -uint64_t ThreadsSMRSupport::_smr_java_thread_list_free_cnt = 0; +// Impl note: See _java_thread_list_alloc_cnt note. +uint64_t ThreadsSMRSupport::_java_thread_list_free_cnt = 0; // Max size ThreadsList allocated. // Impl note: Max # of threads alive at one time should fit in unsigned 32-bit. -uint ThreadsSMRSupport::_smr_java_thread_list_max = 0; +uint ThreadsSMRSupport::_java_thread_list_max = 0; // Max # of nested ThreadsLists for a thread. // Impl note: Hard to imagine > 64K nested ThreadsLists so this could be // 16-bit, but there is no nice 16-bit _FORMAT support. -uint ThreadsSMRSupport::_smr_nested_thread_list_max = 0; +uint ThreadsSMRSupport::_nested_thread_list_max = 0; // # of ThreadsListHandles deleted over VM lifetime. // Impl note: Atomically incremented over VM lifetime so use unsigned for // more range. There will be fewer ThreadsListHandles than threads so // unsigned 32-bit should be fine. -volatile uint ThreadsSMRSupport::_smr_tlh_cnt = 0; +volatile uint ThreadsSMRSupport::_tlh_cnt = 0; // Max time in millis to delete a ThreadsListHandle. // Impl note: 16-bit might be too small on an overloaded machine. Use // unsigned since this is a time value. Set via Atomic::cmpxchg() in a // loop for correctness. -volatile uint ThreadsSMRSupport::_smr_tlh_time_max = 0; +volatile uint ThreadsSMRSupport::_tlh_time_max = 0; // Cumulative time in millis to delete ThreadsListHandles. // Impl note: Atomically added to over VM lifetime so use unsigned for more // range. Unsigned 64-bit would be more future proof, but 64-bit atomic inc // isn't available everywhere (or is it?). -volatile uint ThreadsSMRSupport::_smr_tlh_times = 0; +volatile uint ThreadsSMRSupport::_tlh_times = 0; -ThreadsList* ThreadsSMRSupport::_smr_to_delete_list = NULL; +ThreadsList* ThreadsSMRSupport::_to_delete_list = NULL; // # of parallel ThreadsLists on the to-delete list. // Impl note: Hard to imagine > 64K ThreadsLists needing to be deleted so // this could be 16-bit, but there is no nice 16-bit _FORMAT support. -uint ThreadsSMRSupport::_smr_to_delete_list_cnt = 0; +uint ThreadsSMRSupport::_to_delete_list_cnt = 0; // Max # of parallel ThreadsLists on the to-delete list. -// Impl note: See _smr_to_delete_list_cnt note. -uint ThreadsSMRSupport::_smr_to_delete_list_max = 0; +// Impl note: See _to_delete_list_cnt note. +uint ThreadsSMRSupport::_to_delete_list_max = 0; // 'inline' functions first so the definitions are before first use: -inline void ThreadsSMRSupport::add_smr_deleted_thread_times(uint add_value) { - Atomic::add(add_value, &_smr_deleted_thread_times); +inline void ThreadsSMRSupport::add_deleted_thread_times(uint add_value) { + Atomic::add(add_value, &_deleted_thread_times); } -inline void ThreadsSMRSupport::inc_smr_deleted_thread_cnt() { - Atomic::inc(&_smr_deleted_thread_cnt); +inline void ThreadsSMRSupport::inc_deleted_thread_cnt() { + Atomic::inc(&_deleted_thread_cnt); } -inline void ThreadsSMRSupport::inc_smr_java_thread_list_alloc_cnt() { - _smr_java_thread_list_alloc_cnt++; +inline void ThreadsSMRSupport::inc_java_thread_list_alloc_cnt() { + _java_thread_list_alloc_cnt++; } -inline void ThreadsSMRSupport::update_smr_deleted_thread_time_max(uint new_value) { +inline void ThreadsSMRSupport::update_deleted_thread_time_max(uint new_value) { while (true) { - uint cur_value = _smr_deleted_thread_time_max; + uint cur_value = _deleted_thread_time_max; if (new_value <= cur_value) { // No need to update max value so we're done. break; } - if (Atomic::cmpxchg(new_value, &_smr_deleted_thread_time_max, cur_value) == cur_value) { + if (Atomic::cmpxchg(new_value, &_deleted_thread_time_max, cur_value) == cur_value) { // Updated max value so we're done. Otherwise try it all again. break; } } } -inline void ThreadsSMRSupport::update_smr_java_thread_list_max(uint new_value) { - if (new_value > _smr_java_thread_list_max) { - _smr_java_thread_list_max = new_value; +inline void ThreadsSMRSupport::update_java_thread_list_max(uint new_value) { + if (new_value > _java_thread_list_max) { + _java_thread_list_max = new_value; } } -inline ThreadsList* ThreadsSMRSupport::xchg_smr_java_thread_list(ThreadsList* new_list) { - return (ThreadsList*)Atomic::xchg(new_list, &_smr_java_thread_list); +inline ThreadsList* ThreadsSMRSupport::xchg_java_thread_list(ThreadsList* new_list) { + return (ThreadsList*)Atomic::xchg(new_list, &_java_thread_list); } @@ -268,7 +268,7 @@ class ScanHazardPtrGatherProtectedThreadsClosure : public ThreadClosure { } // The current JavaThread has a hazard ptr (ThreadsList reference) - // which might be _smr_java_thread_list or it might be an older + // which might be _java_thread_list or it might be an older // ThreadsList that has been removed but not freed. In either case, // the hazard ptr is protecting all the JavaThreads on that // ThreadsList. @@ -347,7 +347,7 @@ class ScanHazardPtrPrintMatchingThreadsClosure : public ThreadClosure { if (Thread::is_hazard_ptr_tagged(current_list)) return; // The current JavaThread has a hazard ptr (ThreadsList reference) - // which might be _smr_java_thread_list or it might be an older + // which might be _java_thread_list or it might be an older // ThreadsList that has been removed but not freed. In either case, // the hazard ptr is protecting all the JavaThreads on that // ThreadsList, but we only care about matching a specific JavaThread. @@ -476,7 +476,7 @@ ThreadsListHandle::~ThreadsListHandle() { if (EnableThreadSMRStatistics) { _timer.stop(); uint millis = (uint)_timer.milliseconds(); - ThreadsSMRSupport::update_smr_tlh_stats(millis); + ThreadsSMRSupport::update_tlh_stats(millis); } } @@ -574,12 +574,12 @@ ThreadsList *ThreadsSMRSupport::acquire_stable_list_fast_path(Thread *self) { ThreadsList* threads; // Stable recording of a hazard ptr for SMR. This code does not use - // locks so its use of the _smr_java_thread_list & _threads_hazard_ptr + // locks so its use of the _java_thread_list & _threads_hazard_ptr // fields is racy relative to code that uses those fields with locks. // OrderAccess and Atomic functions are used to deal with those races. // while (true) { - threads = get_smr_java_thread_list(); + threads = get_java_thread_list(); // Publish a tagged hazard ptr to denote that the hazard ptr is not // yet verified as being stable. Due to the fence after the hazard @@ -590,9 +590,9 @@ ThreadsList *ThreadsSMRSupport::acquire_stable_list_fast_path(Thread *self) { ThreadsList* unverified_threads = Thread::tag_hazard_ptr(threads); self->set_threads_hazard_ptr(unverified_threads); - // If _smr_java_thread_list has changed, we have lost a race with + // If _java_thread_list has changed, we have lost a race with // Threads::add() or Threads::remove() and have to try again. - if (get_smr_java_thread_list() != threads) { + if (get_java_thread_list() != threads) { continue; } @@ -634,15 +634,15 @@ ThreadsList *ThreadsSMRSupport::acquire_stable_list_nested_path(Thread *self) { { // Only grab the Threads_lock if we don't already own it. MutexLockerEx ml(Threads_lock->owned_by_self() ? NULL : Threads_lock); - node = new NestedThreadsList(get_smr_java_thread_list()); + node = new NestedThreadsList(get_java_thread_list()); // We insert at the front of the list to match up with the delete // in release_stable_list(). node->set_next(self->get_nested_threads_hazard_ptr()); self->set_nested_threads_hazard_ptr(node); if (EnableThreadSMRStatistics) { self->inc_nested_threads_hazard_ptr_cnt(); - if (self->nested_threads_hazard_ptr_cnt() > _smr_nested_thread_list_max) { - _smr_nested_thread_list_max = self->nested_threads_hazard_ptr_cnt(); + if (self->nested_threads_hazard_ptr_cnt() > _nested_thread_list_max) { + _nested_thread_list_max = self->nested_threads_hazard_ptr_cnt(); } } } @@ -652,25 +652,101 @@ ThreadsList *ThreadsSMRSupport::acquire_stable_list_nested_path(Thread *self) { } void ThreadsSMRSupport::add_thread(JavaThread *thread){ - ThreadsList *new_list = ThreadsList::add_thread(ThreadsSMRSupport::get_smr_java_thread_list(), thread); + ThreadsList *new_list = ThreadsList::add_thread(ThreadsSMRSupport::get_java_thread_list(), thread); if (EnableThreadSMRStatistics) { - ThreadsSMRSupport::inc_smr_java_thread_list_alloc_cnt(); - ThreadsSMRSupport::update_smr_java_thread_list_max(new_list->length()); + ThreadsSMRSupport::inc_java_thread_list_alloc_cnt(); + ThreadsSMRSupport::update_java_thread_list_max(new_list->length()); } - // Initial _smr_java_thread_list will not generate a "Threads::add" mesg. + // Initial _java_thread_list will not generate a "Threads::add" mesg. log_debug(thread, smr)("tid=" UINTX_FORMAT ": Threads::add: new ThreadsList=" INTPTR_FORMAT, os::current_thread_id(), p2i(new_list)); - ThreadsList *old_list = ThreadsSMRSupport::xchg_smr_java_thread_list(new_list); - ThreadsSMRSupport::smr_free_list(old_list); + ThreadsList *old_list = ThreadsSMRSupport::xchg_java_thread_list(new_list); + ThreadsSMRSupport::free_list(old_list); } -// set_smr_delete_notify() and clear_smr_delete_notify() are called -// under the protection of the smr_delete_lock, but we also use an +// set_delete_notify() and clear_delete_notify() are called +// under the protection of the delete_lock, but we also use an // Atomic operation to ensure the memory update is seen earlier than -// when the smr_delete_lock is dropped. +// when the delete_lock is dropped. // -void ThreadsSMRSupport::clear_smr_delete_notify() { - Atomic::dec(&_smr_delete_notify); +void ThreadsSMRSupport::clear_delete_notify() { + Atomic::dec(&_delete_notify); +} + +bool ThreadsSMRSupport::delete_notify() { + // Use load_acquire() in order to see any updates to _delete_notify + // earlier than when delete_lock is grabbed. + return (OrderAccess::load_acquire(&_delete_notify) != 0); +} + +// Safely free a ThreadsList after a Threads::add() or Threads::remove(). +// The specified ThreadsList may not get deleted during this call if it +// is still in-use (referenced by a hazard ptr). Other ThreadsLists +// in the chain may get deleted by this call if they are no longer in-use. +void ThreadsSMRSupport::free_list(ThreadsList* threads) { + assert_locked_or_safepoint(Threads_lock); + + threads->set_next_list(_to_delete_list); + _to_delete_list = threads; + if (EnableThreadSMRStatistics) { + _to_delete_list_cnt++; + if (_to_delete_list_cnt > _to_delete_list_max) { + _to_delete_list_max = _to_delete_list_cnt; + } + } + + // Hash table size should be first power of two higher than twice the length of the ThreadsList + int hash_table_size = MIN2((int)get_java_thread_list()->length(), 32) << 1; + hash_table_size--; + hash_table_size |= hash_table_size >> 1; + hash_table_size |= hash_table_size >> 2; + hash_table_size |= hash_table_size >> 4; + hash_table_size |= hash_table_size >> 8; + hash_table_size |= hash_table_size >> 16; + hash_table_size++; + + // Gather a hash table of the current hazard ptrs: + ThreadScanHashtable *scan_table = new ThreadScanHashtable(hash_table_size); + ScanHazardPtrGatherThreadsListClosure scan_cl(scan_table); + Threads::threads_do(&scan_cl); + + // Walk through the linked list of pending freeable ThreadsLists + // and free the ones that are not referenced from hazard ptrs. + ThreadsList* current = _to_delete_list; + ThreadsList* prev = NULL; + ThreadsList* next = NULL; + bool threads_is_freed = false; + while (current != NULL) { + next = current->next_list(); + if (!scan_table->has_entry((void*)current)) { + // This ThreadsList is not referenced by a hazard ptr. + if (prev != NULL) { + prev->set_next_list(next); + } + if (_to_delete_list == current) { + _to_delete_list = next; + } + + log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::free_list: threads=" INTPTR_FORMAT " is freed.", os::current_thread_id(), p2i(current)); + if (current == threads) threads_is_freed = true; + delete current; + if (EnableThreadSMRStatistics) { + _java_thread_list_free_cnt++; + _to_delete_list_cnt--; + } + } else { + prev = current; + } + current = next; + } + + if (!threads_is_freed) { + // Only report "is not freed" on the original call to + // free_list() for this ThreadsList. + log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::free_list: threads=" INTPTR_FORMAT " is not freed.", os::current_thread_id(), p2i(threads)); + } + + delete scan_table; } // Return true if the specified JavaThread is protected by a hazard @@ -681,7 +757,7 @@ bool ThreadsSMRSupport::is_a_protected_JavaThread(JavaThread *thread) { // Hash table size should be first power of two higher than twice // the length of the Threads list. - int hash_table_size = MIN2((int)get_smr_java_thread_list()->length(), 32) << 1; + int hash_table_size = MIN2((int)get_java_thread_list()->length(), 32) << 1; hash_table_size--; hash_table_size |= hash_table_size >> 1; hash_table_size |= hash_table_size >> 2; @@ -736,10 +812,10 @@ void ThreadsSMRSupport::release_stable_list_fast_path(Thread *self) { self->set_threads_hazard_ptr(NULL); // We use double-check locking to reduce traffic on the system - // wide smr_delete_lock. - if (ThreadsSMRSupport::smr_delete_notify()) { + // wide Thread-SMR delete_lock. + if (ThreadsSMRSupport::delete_notify()) { // An exiting thread might be waiting in smr_delete(); we need to - // check with smr_delete_lock to be sure. + // check with delete_lock to be sure. release_stable_list_wake_up((char *) "regular hazard ptr"); } } @@ -772,7 +848,7 @@ void ThreadsSMRSupport::release_stable_list_nested_path(Thread *self) { } // An exiting thread might be waiting in smr_delete(); we need to - // check with smr_delete_lock to be sure. + // check with delete_lock to be sure. release_stable_list_wake_up((char *) "nested hazard ptr"); log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::release_stable_list: delete NestedThreadsList node containing ThreadsList=" INTPTR_FORMAT, os::current_thread_id(), p2i(node->t_list())); @@ -781,21 +857,21 @@ void ThreadsSMRSupport::release_stable_list_nested_path(Thread *self) { } // Wake up portion of the release stable ThreadsList protocol; -// uses the smr_delete_lock(). +// uses the delete_lock(). // void ThreadsSMRSupport::release_stable_list_wake_up(char *log_str) { assert(log_str != NULL, "sanity check"); - // Note: smr_delete_lock is held in smr_delete() for the entire + // Note: delete_lock is held in smr_delete() for the entire // hazard ptr search so that we do not lose this notify() if // the exiting thread has to wait. That code path also holds - // Threads_lock (which was grabbed before smr_delete_lock) so that + // Threads_lock (which was grabbed before delete_lock) so that // threads_do() can be called. This means the system can't start a // safepoint which means this thread can't take too long to get to - // a safepoint because of being blocked on smr_delete_lock. + // a safepoint because of being blocked on delete_lock. // - MonitorLockerEx ml(ThreadsSMRSupport::smr_delete_lock(), Monitor::_no_safepoint_check_flag); - if (ThreadsSMRSupport::smr_delete_notify()) { + MonitorLockerEx ml(ThreadsSMRSupport::delete_lock(), Monitor::_no_safepoint_check_flag); + if (ThreadsSMRSupport::delete_notify()) { // Notify any exiting JavaThreads that are waiting in smr_delete() // that we've released a ThreadsList. ml.notify_all(); @@ -804,23 +880,23 @@ void ThreadsSMRSupport::release_stable_list_wake_up(char *log_str) { } void ThreadsSMRSupport::remove_thread(JavaThread *thread) { - ThreadsList *new_list = ThreadsList::remove_thread(ThreadsSMRSupport::get_smr_java_thread_list(), thread); + ThreadsList *new_list = ThreadsList::remove_thread(ThreadsSMRSupport::get_java_thread_list(), thread); if (EnableThreadSMRStatistics) { - ThreadsSMRSupport::inc_smr_java_thread_list_alloc_cnt(); + ThreadsSMRSupport::inc_java_thread_list_alloc_cnt(); // This list is smaller so no need to check for a "longest" update. } - // Final _smr_java_thread_list will not generate a "Threads::remove" mesg. + // Final _java_thread_list will not generate a "Threads::remove" mesg. log_debug(thread, smr)("tid=" UINTX_FORMAT ": Threads::remove: new ThreadsList=" INTPTR_FORMAT, os::current_thread_id(), p2i(new_list)); - ThreadsList *old_list = ThreadsSMRSupport::xchg_smr_java_thread_list(new_list); - ThreadsSMRSupport::smr_free_list(old_list); + ThreadsList *old_list = ThreadsSMRSupport::xchg_java_thread_list(new_list); + ThreadsSMRSupport::free_list(old_list); } -// See note for clear_smr_delete_notify(). +// See note for clear_delete_notify(). // -void ThreadsSMRSupport::set_smr_delete_notify() { - Atomic::inc(&_smr_delete_notify); +void ThreadsSMRSupport::set_delete_notify() { + Atomic::inc(&_delete_notify); } // Safely delete a JavaThread when it is no longer in use by a @@ -842,16 +918,16 @@ void ThreadsSMRSupport::smr_delete(JavaThread *thread) { MutexLockerEx ml(Threads_lock, Mutex::_no_safepoint_check_flag); // Cannot use a MonitorLockerEx helper here because we have // to drop the Threads_lock first if we wait. - ThreadsSMRSupport::smr_delete_lock()->lock_without_safepoint_check(); - // Set the smr_delete_notify flag after we grab smr_delete_lock + ThreadsSMRSupport::delete_lock()->lock_without_safepoint_check(); + // Set the delete_notify flag after we grab delete_lock // and before we scan hazard ptrs because we're doing // double-check locking in release_stable_list(). - ThreadsSMRSupport::set_smr_delete_notify(); + ThreadsSMRSupport::set_delete_notify(); if (!is_a_protected_JavaThread(thread)) { // This is the common case. - ThreadsSMRSupport::clear_smr_delete_notify(); - ThreadsSMRSupport::smr_delete_lock()->unlock(); + ThreadsSMRSupport::clear_delete_notify(); + ThreadsSMRSupport::delete_lock()->unlock(); break; } if (!has_logged_once) { @@ -865,22 +941,22 @@ void ThreadsSMRSupport::smr_delete(JavaThread *thread) { } // We have to drop the Threads_lock to wait or delete the thread if (EnableThreadSMRStatistics) { - _smr_delete_lock_wait_cnt++; - if (_smr_delete_lock_wait_cnt > _smr_delete_lock_wait_max) { - _smr_delete_lock_wait_max = _smr_delete_lock_wait_cnt; + _delete_lock_wait_cnt++; + if (_delete_lock_wait_cnt > _delete_lock_wait_max) { + _delete_lock_wait_max = _delete_lock_wait_cnt; } } // Wait for a release_stable_list() call before we check again. No // safepoint check, no timeout, and not as suspend equivalent flag // because this JavaThread is not on the Threads list. - ThreadsSMRSupport::smr_delete_lock()->wait(Mutex::_no_safepoint_check_flag, 0, + ThreadsSMRSupport::delete_lock()->wait(Mutex::_no_safepoint_check_flag, 0, !Mutex::_as_suspend_equivalent_flag); if (EnableThreadSMRStatistics) { - _smr_delete_lock_wait_cnt--; + _delete_lock_wait_cnt--; } - ThreadsSMRSupport::clear_smr_delete_notify(); - ThreadsSMRSupport::smr_delete_lock()->unlock(); + ThreadsSMRSupport::clear_delete_notify(); + ThreadsSMRSupport::delete_lock()->unlock(); // Retry the whole scenario. } @@ -893,166 +969,89 @@ void ThreadsSMRSupport::smr_delete(JavaThread *thread) { if (EnableThreadSMRStatistics) { timer.stop(); uint millis = (uint)timer.milliseconds(); - ThreadsSMRSupport::inc_smr_deleted_thread_cnt(); - ThreadsSMRSupport::add_smr_deleted_thread_times(millis); - ThreadsSMRSupport::update_smr_deleted_thread_time_max(millis); + ThreadsSMRSupport::inc_deleted_thread_cnt(); + ThreadsSMRSupport::add_deleted_thread_times(millis); + ThreadsSMRSupport::update_deleted_thread_time_max(millis); } log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::smr_delete: thread=" INTPTR_FORMAT " is deleted.", os::current_thread_id(), p2i(thread)); } -bool ThreadsSMRSupport::smr_delete_notify() { - // Use load_acquire() in order to see any updates to _smr_delete_notify - // earlier than when smr_delete_lock is grabbed. - return (OrderAccess::load_acquire(&_smr_delete_notify) != 0); -} - -// Safely free a ThreadsList after a Threads::add() or Threads::remove(). -// The specified ThreadsList may not get deleted during this call if it -// is still in-use (referenced by a hazard ptr). Other ThreadsLists -// in the chain may get deleted by this call if they are no longer in-use. -void ThreadsSMRSupport::smr_free_list(ThreadsList* threads) { - assert_locked_or_safepoint(Threads_lock); - - threads->set_next_list(_smr_to_delete_list); - _smr_to_delete_list = threads; - if (EnableThreadSMRStatistics) { - _smr_to_delete_list_cnt++; - if (_smr_to_delete_list_cnt > _smr_to_delete_list_max) { - _smr_to_delete_list_max = _smr_to_delete_list_cnt; - } - } - - // Hash table size should be first power of two higher than twice the length of the ThreadsList - int hash_table_size = MIN2((int)get_smr_java_thread_list()->length(), 32) << 1; - hash_table_size--; - hash_table_size |= hash_table_size >> 1; - hash_table_size |= hash_table_size >> 2; - hash_table_size |= hash_table_size >> 4; - hash_table_size |= hash_table_size >> 8; - hash_table_size |= hash_table_size >> 16; - hash_table_size++; - - // Gather a hash table of the current hazard ptrs: - ThreadScanHashtable *scan_table = new ThreadScanHashtable(hash_table_size); - ScanHazardPtrGatherThreadsListClosure scan_cl(scan_table); - Threads::threads_do(&scan_cl); - - // Walk through the linked list of pending freeable ThreadsLists - // and free the ones that are not referenced from hazard ptrs. - ThreadsList* current = _smr_to_delete_list; - ThreadsList* prev = NULL; - ThreadsList* next = NULL; - bool threads_is_freed = false; - while (current != NULL) { - next = current->next_list(); - if (!scan_table->has_entry((void*)current)) { - // This ThreadsList is not referenced by a hazard ptr. - if (prev != NULL) { - prev->set_next_list(next); - } - if (_smr_to_delete_list == current) { - _smr_to_delete_list = next; - } - - log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::smr_free_list: threads=" INTPTR_FORMAT " is freed.", os::current_thread_id(), p2i(current)); - if (current == threads) threads_is_freed = true; - delete current; - if (EnableThreadSMRStatistics) { - _smr_java_thread_list_free_cnt++; - _smr_to_delete_list_cnt--; - } - } else { - prev = current; - } - current = next; - } - - if (!threads_is_freed) { - // Only report "is not freed" on the original call to - // smr_free_list() for this ThreadsList. - log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::smr_free_list: threads=" INTPTR_FORMAT " is not freed.", os::current_thread_id(), p2i(threads)); - } - - delete scan_table; -} - // Debug, logging, and printing stuff at the end: // Log Threads class SMR info. -void ThreadsSMRSupport::log_smr_statistics() { +void ThreadsSMRSupport::log_statistics() { LogTarget(Info, thread, smr) log; if (log.is_enabled()) { LogStream out(log); - print_smr_info_on(&out); + print_info_on(&out); } } // Print Threads class SMR info. -void ThreadsSMRSupport::print_smr_info_on(outputStream* st) { +void ThreadsSMRSupport::print_info_on(outputStream* st) { // Only grab the Threads_lock if we don't already own it // and if we are not reporting an error. MutexLockerEx ml((Threads_lock->owned_by_self() || VMError::is_error_reported()) ? NULL : Threads_lock); st->print_cr("Threads class SMR info:"); - st->print_cr("_smr_java_thread_list=" INTPTR_FORMAT ", length=%u, " - "elements={", p2i(_smr_java_thread_list), - _smr_java_thread_list->length()); - print_smr_info_elements_on(st, _smr_java_thread_list); + st->print_cr("_java_thread_list=" INTPTR_FORMAT ", length=%u, " + "elements={", p2i(_java_thread_list), + _java_thread_list->length()); + print_info_elements_on(st, _java_thread_list); st->print_cr("}"); - if (_smr_to_delete_list != NULL) { - st->print_cr("_smr_to_delete_list=" INTPTR_FORMAT ", length=%u, " - "elements={", p2i(_smr_to_delete_list), - _smr_to_delete_list->length()); - print_smr_info_elements_on(st, _smr_to_delete_list); + if (_to_delete_list != NULL) { + st->print_cr("_to_delete_list=" INTPTR_FORMAT ", length=%u, " + "elements={", p2i(_to_delete_list), + _to_delete_list->length()); + print_info_elements_on(st, _to_delete_list); st->print_cr("}"); - for (ThreadsList *t_list = _smr_to_delete_list->next_list(); + for (ThreadsList *t_list = _to_delete_list->next_list(); t_list != NULL; t_list = t_list->next_list()) { st->print("next-> " INTPTR_FORMAT ", length=%u, " "elements={", p2i(t_list), t_list->length()); - print_smr_info_elements_on(st, t_list); + print_info_elements_on(st, t_list); st->print_cr("}"); } } if (!EnableThreadSMRStatistics) { return; } - st->print_cr("_smr_java_thread_list_alloc_cnt=" UINT64_FORMAT "," - "_smr_java_thread_list_free_cnt=" UINT64_FORMAT "," - "_smr_java_thread_list_max=%u, " - "_smr_nested_thread_list_max=%u", - _smr_java_thread_list_alloc_cnt, - _smr_java_thread_list_free_cnt, - _smr_java_thread_list_max, - _smr_nested_thread_list_max); - if (_smr_tlh_cnt > 0) { - st->print_cr("_smr_tlh_cnt=%u" - ", _smr_tlh_times=%u" - ", avg_smr_tlh_time=%0.2f" - ", _smr_tlh_time_max=%u", - _smr_tlh_cnt, _smr_tlh_times, - ((double) _smr_tlh_times / _smr_tlh_cnt), - _smr_tlh_time_max); + st->print_cr("_java_thread_list_alloc_cnt=" UINT64_FORMAT "," + "_java_thread_list_free_cnt=" UINT64_FORMAT "," + "_java_thread_list_max=%u, " + "_nested_thread_list_max=%u", + _java_thread_list_alloc_cnt, + _java_thread_list_free_cnt, + _java_thread_list_max, + _nested_thread_list_max); + if (_tlh_cnt > 0) { + st->print_cr("_tlh_cnt=%u" + ", _tlh_times=%u" + ", avg_tlh_time=%0.2f" + ", _tlh_time_max=%u", + _tlh_cnt, _tlh_times, + ((double) _tlh_times / _tlh_cnt), + _tlh_time_max); } - if (_smr_deleted_thread_cnt > 0) { - st->print_cr("_smr_deleted_thread_cnt=%u" - ", _smr_deleted_thread_times=%u" - ", avg_smr_deleted_thread_time=%0.2f" - ", _smr_deleted_thread_time_max=%u", - _smr_deleted_thread_cnt, _smr_deleted_thread_times, - ((double) _smr_deleted_thread_times / _smr_deleted_thread_cnt), - _smr_deleted_thread_time_max); + if (_deleted_thread_cnt > 0) { + st->print_cr("_deleted_thread_cnt=%u" + ", _deleted_thread_times=%u" + ", avg_deleted_thread_time=%0.2f" + ", _deleted_thread_time_max=%u", + _deleted_thread_cnt, _deleted_thread_times, + ((double) _deleted_thread_times / _deleted_thread_cnt), + _deleted_thread_time_max); } - st->print_cr("_smr_delete_lock_wait_cnt=%u, _smr_delete_lock_wait_max=%u", - _smr_delete_lock_wait_cnt, _smr_delete_lock_wait_max); - st->print_cr("_smr_to_delete_list_cnt=%u, _smr_to_delete_list_max=%u", - _smr_to_delete_list_cnt, _smr_to_delete_list_max); + st->print_cr("_delete_lock_wait_cnt=%u, _delete_lock_wait_max=%u", + _delete_lock_wait_cnt, _delete_lock_wait_max); + st->print_cr("_to_delete_list_cnt=%u, _to_delete_list_max=%u", + _to_delete_list_cnt, _to_delete_list_max); } // Print ThreadsList elements (4 per line). -void ThreadsSMRSupport::print_smr_info_elements_on(outputStream* st, - ThreadsList* t_list) { +void ThreadsSMRSupport::print_info_elements_on(outputStream* st, ThreadsList* t_list) { uint cnt = 0; JavaThreadIterator jti(t_list); for (JavaThread *jt = jti.first(); jt != NULL; jt = jti.next()) { diff --git a/src/hotspot/share/runtime/threadSMR.hpp b/src/hotspot/share/runtime/threadSMR.hpp index cb41daf4d6f..bb22f72d192 100644 --- a/src/hotspot/share/runtime/threadSMR.hpp +++ b/src/hotspot/share/runtime/threadSMR.hpp @@ -81,67 +81,68 @@ // class ThreadsSMRSupport : AllStatic { // The coordination between ThreadsSMRSupport::release_stable_list() and - // ThreadsSMRSupport::smr_delete() uses the smr_delete_lock in order to + // ThreadsSMRSupport::smr_delete() uses the delete_lock in order to // reduce the traffic on the Threads_lock. - static Monitor* _smr_delete_lock; + static Monitor* _delete_lock; // The '_cnt', '_max' and '_times" fields are enabled via // -XX:+EnableThreadSMRStatistics (see thread.cpp for a // description about each field): - static uint _smr_delete_lock_wait_cnt; - static uint _smr_delete_lock_wait_max; - // The smr_delete_notify flag is used for proper double-check - // locking in order to reduce the traffic on the smr_delete_lock. - static volatile uint _smr_delete_notify; - static volatile uint _smr_deleted_thread_cnt; - static volatile uint _smr_deleted_thread_time_max; - static volatile uint _smr_deleted_thread_times; - static ThreadsList* volatile _smr_java_thread_list; - static uint64_t _smr_java_thread_list_alloc_cnt; - static uint64_t _smr_java_thread_list_free_cnt; - static uint _smr_java_thread_list_max; - static uint _smr_nested_thread_list_max; - static volatile uint _smr_tlh_cnt; - static volatile uint _smr_tlh_time_max; - static volatile uint _smr_tlh_times; - static ThreadsList* _smr_to_delete_list; - static uint _smr_to_delete_list_cnt; - static uint _smr_to_delete_list_max; + static uint _delete_lock_wait_cnt; + static uint _delete_lock_wait_max; + // The delete_notify flag is used for proper double-check + // locking in order to reduce the traffic on the system wide + // Thread-SMR delete_lock. + static volatile uint _delete_notify; + static volatile uint _deleted_thread_cnt; + static volatile uint _deleted_thread_time_max; + static volatile uint _deleted_thread_times; + static ThreadsList* volatile _java_thread_list; + static uint64_t _java_thread_list_alloc_cnt; + static uint64_t _java_thread_list_free_cnt; + static uint _java_thread_list_max; + static uint _nested_thread_list_max; + static volatile uint _tlh_cnt; + static volatile uint _tlh_time_max; + static volatile uint _tlh_times; + static ThreadsList* _to_delete_list; + static uint _to_delete_list_cnt; + static uint _to_delete_list_max; static ThreadsList *acquire_stable_list_fast_path(Thread *self); static ThreadsList *acquire_stable_list_nested_path(Thread *self); - static void add_smr_deleted_thread_times(uint add_value); - static void add_smr_tlh_times(uint add_value); - static void clear_smr_delete_notify(); - static void inc_smr_deleted_thread_cnt(); - static void inc_smr_java_thread_list_alloc_cnt(); - static void inc_smr_tlh_cnt(); + static void add_deleted_thread_times(uint add_value); + static void add_tlh_times(uint add_value); + static void clear_delete_notify(); + static Monitor* delete_lock() { return _delete_lock; } + static bool delete_notify(); + static void free_list(ThreadsList* threads); + static void inc_deleted_thread_cnt(); + static void inc_java_thread_list_alloc_cnt(); + static void inc_tlh_cnt(); static bool is_a_protected_JavaThread(JavaThread *thread); static void release_stable_list_fast_path(Thread *self); static void release_stable_list_nested_path(Thread *self); static void release_stable_list_wake_up(char *log_str); - static void set_smr_delete_notify(); - static Monitor* smr_delete_lock() { return _smr_delete_lock; } - static bool smr_delete_notify(); - static void smr_free_list(ThreadsList* threads); - static void update_smr_deleted_thread_time_max(uint new_value); - static void update_smr_java_thread_list_max(uint new_value); - static void update_smr_tlh_time_max(uint new_value); - static ThreadsList* xchg_smr_java_thread_list(ThreadsList* new_list); + static void set_delete_notify(); + static void update_deleted_thread_time_max(uint new_value); + static void update_java_thread_list_max(uint new_value); + static void update_tlh_time_max(uint new_value); + static ThreadsList* xchg_java_thread_list(ThreadsList* new_list); public: static ThreadsList *acquire_stable_list(Thread *self, bool is_ThreadsListSetter); static void add_thread(JavaThread *thread); - static ThreadsList* get_smr_java_thread_list(); + static ThreadsList* get_java_thread_list(); static bool is_a_protected_JavaThread_with_lock(JavaThread *thread); static void release_stable_list(Thread *self); static void remove_thread(JavaThread *thread); static void smr_delete(JavaThread *thread); - static void update_smr_tlh_stats(uint millis); + static void update_tlh_stats(uint millis); // Logging and printing support: - static void log_smr_statistics(); - static void print_smr_info_elements_on(outputStream* st, ThreadsList* t_list); - static void print_smr_info_on(outputStream* st); + static void log_statistics(); + static void print_info_elements_on(outputStream* st, ThreadsList* t_list); + static void print_info_on(outputStream* st); }; // A fast list of JavaThreads. diff --git a/src/hotspot/share/runtime/threadSMR.inline.hpp b/src/hotspot/share/runtime/threadSMR.inline.hpp index d516cd39308..e0420e764b6 100644 --- a/src/hotspot/share/runtime/threadSMR.inline.hpp +++ b/src/hotspot/share/runtime/threadSMR.inline.hpp @@ -53,24 +53,24 @@ inline void ThreadsList::threads_do(T *cl) const { } // These three inlines are private to ThreadsSMRSupport, but -// they are called by public inline update_smr_tlh_stats() below: +// they are called by public inline update_tlh_stats() below: -inline void ThreadsSMRSupport::add_smr_tlh_times(uint add_value) { - Atomic::add(add_value, &_smr_tlh_times); +inline void ThreadsSMRSupport::add_tlh_times(uint add_value) { + Atomic::add(add_value, &_tlh_times); } -inline void ThreadsSMRSupport::inc_smr_tlh_cnt() { - Atomic::inc(&_smr_tlh_cnt); +inline void ThreadsSMRSupport::inc_tlh_cnt() { + Atomic::inc(&_tlh_cnt); } -inline void ThreadsSMRSupport::update_smr_tlh_time_max(uint new_value) { +inline void ThreadsSMRSupport::update_tlh_time_max(uint new_value) { while (true) { - uint cur_value = _smr_tlh_time_max; + uint cur_value = _tlh_time_max; if (new_value <= cur_value) { // No need to update max value so we're done. break; } - if (Atomic::cmpxchg(new_value, &_smr_tlh_time_max, cur_value) == cur_value) { + if (Atomic::cmpxchg(new_value, &_tlh_time_max, cur_value) == cur_value) { // Updated max value so we're done. Otherwise try it all again. break; } @@ -85,8 +85,8 @@ inline ThreadsList* ThreadsListSetter::list() { return ret; } -inline ThreadsList* ThreadsSMRSupport::get_smr_java_thread_list() { - return (ThreadsList*)OrderAccess::load_acquire(&_smr_java_thread_list); +inline ThreadsList* ThreadsSMRSupport::get_java_thread_list() { + return (ThreadsList*)OrderAccess::load_acquire(&_java_thread_list); } inline bool ThreadsSMRSupport::is_a_protected_JavaThread_with_lock(JavaThread *thread) { @@ -94,10 +94,10 @@ inline bool ThreadsSMRSupport::is_a_protected_JavaThread_with_lock(JavaThread *t return is_a_protected_JavaThread(thread); } -inline void ThreadsSMRSupport::update_smr_tlh_stats(uint millis) { - ThreadsSMRSupport::inc_smr_tlh_cnt(); - ThreadsSMRSupport::add_smr_tlh_times(millis); - ThreadsSMRSupport::update_smr_tlh_time_max(millis); +inline void ThreadsSMRSupport::update_tlh_stats(uint millis) { + ThreadsSMRSupport::inc_tlh_cnt(); + ThreadsSMRSupport::add_tlh_times(millis); + ThreadsSMRSupport::update_tlh_time_max(millis); } #endif // SHARE_VM_RUNTIME_THREADSMR_INLINE_HPP diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java index c0f2e0b7b2b..6f9c66688cf 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/NestedThreadsListHandleInErrorHandlingTest.java @@ -89,7 +89,7 @@ public class NestedThreadsListHandleInErrorHandlingTest { // We should have a section of Threads class SMR info: Pattern.compile("Threads class SMR info:"), // We should have one nested ThreadsListHandle: - Pattern.compile(".*, _smr_nested_thread_list_max=1"), + Pattern.compile(".*, _nested_thread_list_max=1"), // The current thread (marked with '=>') in the threads list // should show a hazard ptr: Pattern.compile("=>.* JavaThread \"main\" .*_threads_hazard_ptr=0x[0-9A-Fa-f][0-9A-Fa-f]*, _nested_threads_hazard_ptr_cnt=1, _nested_threads_hazard_ptrs=0x.*"), diff --git a/test/hotspot/jtreg/runtime/Thread/TestThreadDumpSMRInfo.java b/test/hotspot/jtreg/runtime/Thread/TestThreadDumpSMRInfo.java index 02b673bc299..663d1273bd4 100644 --- a/test/hotspot/jtreg/runtime/Thread/TestThreadDumpSMRInfo.java +++ b/test/hotspot/jtreg/runtime/Thread/TestThreadDumpSMRInfo.java @@ -45,7 +45,7 @@ public class TestThreadDumpSMRInfo { // Here's a sample "Threads class SMR info" section: // // Threads class SMR info: - // _smr_java_thread_list=0x0000000000ce8da0, length=23, elements={ + // _java_thread_list=0x0000000000ce8da0, length=23, elements={ // 0x000000000043a800, 0x0000000000aee800, 0x0000000000b06800, 0x0000000000b26000, // 0x0000000000b28800, 0x0000000000b2b000, 0x0000000000b2e000, 0x0000000000b30000, // 0x0000000000b32800, 0x0000000000b35000, 0x0000000000b3f000, 0x0000000000b41800, @@ -53,9 +53,9 @@ public class TestThreadDumpSMRInfo { // 0x0000000000b55800, 0x0000000000b57800, 0x0000000000b5a000, 0x0000000000b5c800, // 0x0000000000cc8800, 0x0000000000fd9800, 0x0000000000ef4800 // } - // _smr_java_thread_list_alloc_cnt=24, _smr_java_thread_list_free_cnt=23, _smr_java_thread_list_max=23, _smr_nested_thread_list_max=0 - // _smr_delete_lock_wait_cnt=0, _smr_delete_lock_wait_max=0 - // _smr_to_delete_list_cnt=0, _smr_to_delete_list_max=1 + // _java_thread_list_alloc_cnt=24, _java_thread_list_free_cnt=23, _java_thread_list_max=23, _nested_thread_list_max=0 + // _delete_lock_wait_cnt=0, _delete_lock_wait_max=0 + // _to_delete_list_cnt=0, _to_delete_list_max=1 final static String HEADER_STR = "Threads class SMR info:"; From 915b2cd1f2d0e9da1984704d4c618835e914a9b5 Mon Sep 17 00:00:00 2001 From: Calvin Cheung Date: Fri, 8 Dec 2017 15:14:08 -0800 Subject: [PATCH 03/88] 8192989: runtime/appcds/javaldr/ArrayTest.java crashes with assert(k->is_instance_klass()) Disable loading array classes from the class list Reviewed-by: iklam, jiangli --- .../share/classfile/classListParser.cpp | 58 +++++++++---------- .../share/classfile/classListParser.hpp | 2 +- src/hotspot/share/memory/metaspaceShared.cpp | 16 ++--- .../runtime/appcds/javaldr/ArrayTest.java | 16 +++-- 4 files changed, 50 insertions(+), 42 deletions(-) diff --git a/src/hotspot/share/classfile/classListParser.cpp b/src/hotspot/share/classfile/classListParser.cpp index b1fa759ae10..86b8e581d1c 100644 --- a/src/hotspot/share/classfile/classListParser.cpp +++ b/src/hotspot/share/classfile/classListParser.cpp @@ -315,12 +315,13 @@ InstanceKlass* ClassListParser::load_class_from_source(Symbol* class_name, TRAPS return k; } -InstanceKlass* ClassListParser::load_current_class(TRAPS) { +Klass* ClassListParser::load_current_class(TRAPS) { TempNewSymbol class_name_symbol = SymbolTable::new_symbol(_class_name, THREAD); guarantee(!HAS_PENDING_EXCEPTION, "Exception creating a symbol."); - InstanceKlass *klass = NULL; + Klass *klass = NULL; if (!is_loading_from_source()) { + // Load classes for the boot/platform/app loaders only. if (is_super_specified()) { error("If source location is not specified, super class must not be specified"); } @@ -330,40 +331,36 @@ InstanceKlass* ClassListParser::load_current_class(TRAPS) { bool non_array = !FieldType::is_array(class_name_symbol); - Handle s = java_lang_String::create_from_symbol(class_name_symbol, CHECK_0); - // Translate to external class name format, i.e., convert '/' chars to '.' - Handle string = java_lang_String::externalize_classname(s, CHECK_0); JavaValue result(T_OBJECT); - InstanceKlass* spec_klass = non_array ? - SystemDictionary::ClassLoader_klass() : SystemDictionary::Class_klass(); - Symbol* method_name = non_array ? - vmSymbols::loadClass_name() : vmSymbols::forName_name(); - Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); - if (non_array) { + // At this point, we are executing in the context of the boot loader. We + // cannot call Class.forName because that is context dependent and + // would load only classes for the boot loader. + // + // Instead, let's call java_system_loader().loadClass() directly, which will + // delegate to the correct loader (boot, platform or app) depending on + // the class name. + + Handle s = java_lang_String::create_from_symbol(class_name_symbol, CHECK_0); + // ClassLoader.loadClass() wants external class name format, i.e., convert '/' chars to '.' + Handle ext_class_name = java_lang_String::externalize_classname(s, CHECK_0); + Handle loader = Handle(THREAD, SystemDictionary::java_system_loader()); + JavaCalls::call_virtual(&result, loader, //SystemDictionary::java_system_loader(), - spec_klass, - method_name, //vmSymbols::loadClass_name(), + SystemDictionary::ClassLoader_klass(), + vmSymbols::loadClass_name(), vmSymbols::string_class_signature(), - string, + ext_class_name, THREAD); } else { - JavaCalls::call_static(&result, - spec_klass, - method_name, - vmSymbols::string_class_signature(), - string, - CHECK_NULL); + // array classes are not supported in class list. + THROW_NULL(vmSymbols::java_lang_ClassNotFoundException()); } assert(result.get_type() == T_OBJECT, "just checking"); oop obj = (oop) result.get_jobject(); if (!HAS_PENDING_EXCEPTION && (obj != NULL)) { - if (non_array) { - klass = InstanceKlass::cast(java_lang_Class::as_Klass(obj)); - } else { - klass = static_cast(java_lang_Class::array_klass_acquire(obj)); - } + klass = java_lang_Class::as_Klass(obj); } else { // load classes in bootclasspath/a if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; @@ -372,7 +369,7 @@ InstanceKlass* ClassListParser::load_current_class(TRAPS) { if (non_array) { Klass* k = SystemDictionary::resolve_or_null(class_name_symbol, CHECK_NULL); if (k != NULL) { - klass = InstanceKlass::cast(k); + klass = k; } else { if (!HAS_PENDING_EXCEPTION) { THROW_NULL(vmSymbols::java_lang_ClassNotFoundException()); @@ -388,14 +385,15 @@ InstanceKlass* ClassListParser::load_current_class(TRAPS) { } } - if (klass != NULL && is_id_specified()) { + if (klass != NULL && klass->is_instance_klass() && is_id_specified()) { + InstanceKlass* ik = InstanceKlass::cast(klass); int id = this->id(); - SystemDictionaryShared::update_shared_entry(klass, id); + SystemDictionaryShared::update_shared_entry(ik, id); InstanceKlass* old = table()->lookup(id); - if (old != NULL && old != klass) { + if (old != NULL && old != ik) { error("Duplicated ID %d for class %s", id, _class_name); } - table()->add(id, klass); + table()->add(id, ik); } return klass; diff --git a/src/hotspot/share/classfile/classListParser.hpp b/src/hotspot/share/classfile/classListParser.hpp index e6d48f41c8d..4fe9750749e 100644 --- a/src/hotspot/share/classfile/classListParser.hpp +++ b/src/hotspot/share/classfile/classListParser.hpp @@ -136,7 +136,7 @@ public: return _class_name; } - InstanceKlass* load_current_class(TRAPS); + Klass* load_current_class(TRAPS); bool is_loading_from_source(); diff --git a/src/hotspot/share/memory/metaspaceShared.cpp b/src/hotspot/share/memory/metaspaceShared.cpp index 7d90abd4aae..3b76707b95c 100644 --- a/src/hotspot/share/memory/metaspaceShared.cpp +++ b/src/hotspot/share/memory/metaspaceShared.cpp @@ -1627,14 +1627,16 @@ int MetaspaceShared::preload_classes(const char* class_list_path, TRAPS) { log_trace(cds)("Shared spaces preloaded: %s", klass->external_name()); } - InstanceKlass* ik = InstanceKlass::cast(klass); + if (klass->is_instance_klass()) { + InstanceKlass* ik = InstanceKlass::cast(klass); - // Link the class to cause the bytecodes to be rewritten and the - // cpcache to be created. The linking is done as soon as classes - // are loaded in order that the related data structures (klass and - // cpCache) are located together. - try_link_class(ik, THREAD); - guarantee(!HAS_PENDING_EXCEPTION, "exception in link_class"); + // Link the class to cause the bytecodes to be rewritten and the + // cpcache to be created. The linking is done as soon as classes + // are loaded in order that the related data structures (klass and + // cpCache) are located together. + try_link_class(ik, THREAD); + guarantee(!HAS_PENDING_EXCEPTION, "exception in link_class"); + } class_count++; } diff --git a/test/hotspot/jtreg/runtime/appcds/javaldr/ArrayTest.java b/test/hotspot/jtreg/runtime/appcds/javaldr/ArrayTest.java index 3deb59b3219..bc9e52792dd 100644 --- a/test/hotspot/jtreg/runtime/appcds/javaldr/ArrayTest.java +++ b/test/hotspot/jtreg/runtime/appcds/javaldr/ArrayTest.java @@ -44,7 +44,9 @@ public class ArrayTest { static String arrayClasses[] = { "ArrayTestHelper", "[Ljava/lang/Comparable;", - "[I" + "[I", + "[[[Ljava/lang/Object;", + "[[B" }; public static void main(String[] args) throws Exception { @@ -56,7 +58,12 @@ public class ArrayTest { String bootClassPath = "-Xbootclasspath/a:" + whiteBoxJar; // create an archive containing array classes - TestCommon.dump(appJar, TestCommon.list(arrayClasses), bootClassPath, "-verbose:class"); + OutputAnalyzer output = TestCommon.dump(appJar, TestCommon.list(arrayClasses), bootClassPath, "-verbose:class"); + // we currently don't support array classes during CDS dump + output.shouldContain("Preload Warning: Cannot find [Ljava/lang/Comparable;") + .shouldContain("Preload Warning: Cannot find [I") + .shouldContain("Preload Warning: Cannot find [[[Ljava/lang/Object;") + .shouldContain("Preload Warning: Cannot find [[B"); List argsList = new ArrayList(); argsList.add("-XX:+UnlockDiagnosticVMOptions"); @@ -67,12 +74,13 @@ public class ArrayTest { argsList.add("-verbose:class"); argsList.add("ArrayTestHelper"); // the following are input args to the ArrayTestHelper. - for (int i = 0; i < arrayClasses.length; i++) { + // skip checking array classes during run time + for (int i = 0; i < 1; i++) { argsList.add(arrayClasses[i]); } String[] opts = new String[argsList.size()]; opts = argsList.toArray(opts); - OutputAnalyzer output = TestCommon.execCommon(opts); + output = TestCommon.execCommon(opts); TestCommon.checkExec(output); } } From 200e63f32c824e07cb703420f3e3f99c5f1ecfa8 Mon Sep 17 00:00:00 2001 From: Chris Plummer Date: Sat, 9 Dec 2017 07:50:50 -0800 Subject: [PATCH 04/88] 8191229: serviceability/jvmti/GetOwnedMonitorInfo/GetOwnedMonitorInfoTest.java fails with NoClassDefFoundError Call FindClass() when we are in the proper classloader context Reviewed-by: sspitsyn, dholmes, amenkov --- .../libGetOwnedMonitorInfoTest.c | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo/libGetOwnedMonitorInfoTest.c b/test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo/libGetOwnedMonitorInfoTest.c index a18e8240903..5147fae5304 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo/libGetOwnedMonitorInfoTest.c +++ b/test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo/libGetOwnedMonitorInfoTest.c @@ -49,6 +49,7 @@ extern "C" { static volatile jboolean event_has_posted = JNI_FALSE; static volatile jint status = PASSED; +static volatile jclass testClass = NULL; static jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved); @@ -66,16 +67,10 @@ static void ShowErrorMessage(jvmtiEnv *jvmti, jvmtiError errCode, const char *me } static jboolean CheckLockObject(JNIEnv *env, jobject monitor) { - jclass testClass; - - testClass = (*env)->FindClass(env, TEST_CLASS); if (testClass == NULL) { - fprintf(stderr, "MonitorContendedEnter: " TEST_CLASS " not found\n"); - status = FAILED; - event_has_posted = JNI_TRUE; + // JNI_OnLoad has not been called yet, so can't possibly be an instance of TEST_CLASS. return JNI_FALSE; } - return (*env)->IsInstanceOf(env, monitor, testClass); } @@ -171,7 +166,26 @@ Agent_OnAttach(JavaVM *jvm, char *options, void *reserved) { JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) { - return JNI_VERSION_1_8; + jint res; + JNIEnv *env; + + res = JNI_ENV_PTR(jvm)->GetEnv(JNI_ENV_ARG(jvm, (void **) &env), + JNI_VERSION_9); + if (res != JNI_OK || env == NULL) { + fprintf(stderr, "Error: GetEnv call failed(%d)!\n", res); + return JNI_ERR; + } + + testClass = (*env)->FindClass(env, TEST_CLASS); + if (testClass != NULL) { + testClass = (*env)->NewGlobalRef(env, testClass); + } + if (testClass == NULL) { + fprintf(stderr, "Error: Could not load class %s!\n", TEST_CLASS); + return JNI_ERR; + } + + return JNI_VERSION_9; } static @@ -185,7 +199,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { printf("Agent_OnLoad started\n"); res = JNI_ENV_PTR(jvm)->GetEnv(JNI_ENV_ARG(jvm, (void **) &jvmti), - JVMTI_VERSION_1); + JVMTI_VERSION_9); if (res != JNI_OK || jvmti == NULL) { fprintf(stderr, "Error: wrong result of a valid call to GetEnv!\n"); return JNI_ERR; @@ -221,6 +235,7 @@ jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) { return JNI_ERR; } + memset(&callbacks, 0, sizeof(callbacks)); callbacks.MonitorContendedEnter = &MonitorContendedEnter; callbacks.MonitorContendedEntered = &MonitorContendedEntered; From d8a31c4cb8a618bf60767f336deed3c8f9beb556 Mon Sep 17 00:00:00 2001 From: Man Cao Date: Tue, 12 Dec 2017 11:55:57 -0500 Subject: [PATCH 05/88] 8193386: CompressedClassSize too large with MaxMetaspace Reviewed-by: ysuenaga, coleenp --- src/hotspot/share/memory/metaspace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/share/memory/metaspace.cpp b/src/hotspot/share/memory/metaspace.cpp index 18de6beaef9..bb11f40c9c5 100644 --- a/src/hotspot/share/memory/metaspace.cpp +++ b/src/hotspot/share/memory/metaspace.cpp @@ -3695,7 +3695,6 @@ void Metaspace::ergo_initialize() { MaxMetaspaceExpansion = align_down_bounded(MaxMetaspaceExpansion, _commit_alignment); CompressedClassSpaceSize = align_down_bounded(CompressedClassSpaceSize, _reserve_alignment); - set_compressed_class_space_size(CompressedClassSpaceSize); // Initial virtual space size will be calculated at global_initialize() size_t min_metaspace_sz = @@ -3714,6 +3713,7 @@ void Metaspace::ergo_initialize() { min_metaspace_sz); } + set_compressed_class_space_size(CompressedClassSpaceSize); } void Metaspace::global_initialize() { From 8ab2ee6ab156da1dd9936f1769b4e6e6a848fa8d Mon Sep 17 00:00:00 2001 From: Tobias Hartmann Date: Tue, 12 Dec 2017 19:05:02 +0100 Subject: [PATCH 06/88] 8193363: TestDumpReplay.java fails with product builds Added missing -XX:+IgnoreUnrecognizedVMOptions Reviewed-by: kvn --- test/hotspot/jtreg/compiler/ciReplay/TestDumpReplay.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/compiler/ciReplay/TestDumpReplay.java b/test/hotspot/jtreg/compiler/ciReplay/TestDumpReplay.java index d1f03a8429e..2a19d15a20a 100644 --- a/test/hotspot/jtreg/compiler/ciReplay/TestDumpReplay.java +++ b/test/hotspot/jtreg/compiler/ciReplay/TestDumpReplay.java @@ -27,7 +27,8 @@ * @modules java.base/jdk.internal.misc:+open * @build sun.hotspot.WhiteBox * @run main ClassFileInstaller sun.hotspot.WhiteBox - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions + * -Xbootclasspath/a:. -XX:+WhiteBoxAPI * -Xbatch -XX:-TieredCompilation -XX:+AlwaysIncrementalInline * -XX:CompileCommand=compileonly,compiler.ciReplay.TestDumpReplay::* * compiler.ciReplay.TestDumpReplay From b1001c7d7dd5511f86e9799141ba99367ade394e Mon Sep 17 00:00:00 2001 From: David Holmes Date: Tue, 12 Dec 2017 19:06:19 -0500 Subject: [PATCH 07/88] 8193222: EnsureLocalCapacity() should maintain capacity requests through multiple calls Reviewed-by: coleenp, dcubed --- make/test/JtregNativeHotspot.gmk | 1 + src/hotspot/share/prims/jniCheck.cpp | 5 +- .../TestCheckedEnsureLocalCapacity.java | 85 +++++++++++++++++++ .../libTestCheckedEnsureLocalCapacity.c | 49 +++++++++++ 4 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 test/hotspot/jtreg/runtime/jni/checked/TestCheckedEnsureLocalCapacity.java create mode 100644 test/hotspot/jtreg/runtime/jni/checked/libTestCheckedEnsureLocalCapacity.c diff --git a/make/test/JtregNativeHotspot.gmk b/make/test/JtregNativeHotspot.gmk index 8cf3b0ed6f3..b171e568eea 100644 --- a/make/test/JtregNativeHotspot.gmk +++ b/make/test/JtregNativeHotspot.gmk @@ -113,6 +113,7 @@ ifeq ($(TOOLCHAIN_TYPE), solstudio) BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHandshakeTransitionTest := -lc BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHasNoEntryPoint := -lc BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libReturnError := -lc + BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libTestCheckedEnsureLocalCapacity := -lc endif ifeq ($(OPENJDK_TARGET_OS), linux) diff --git a/src/hotspot/share/prims/jniCheck.cpp b/src/hotspot/share/prims/jniCheck.cpp index 34281a7a071..2e1a0dbd917 100644 --- a/src/hotspot/share/prims/jniCheck.cpp +++ b/src/hotspot/share/prims/jniCheck.cpp @@ -826,7 +826,10 @@ JNI_ENTRY_CHECKED(jint, } jint result = UNCHECKED()->EnsureLocalCapacity(env, capacity); if (result == JNI_OK) { - add_planned_handle_capacity(thr->active_handles(), capacity); + // increase local ref capacity if needed + if ((size_t)capacity > thr->active_handles()->get_planned_capacity()) { + add_planned_handle_capacity(thr->active_handles(), capacity); + } } functionExit(thr); return result; diff --git a/test/hotspot/jtreg/runtime/jni/checked/TestCheckedEnsureLocalCapacity.java b/test/hotspot/jtreg/runtime/jni/checked/TestCheckedEnsureLocalCapacity.java new file mode 100644 index 00000000000..87e5d7d1baf --- /dev/null +++ b/test/hotspot/jtreg/runtime/jni/checked/TestCheckedEnsureLocalCapacity.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* @test + * @bug 8193222 + * @summary Check EnsureLocalCapacity doesn't shrink unexpectedly + * @library /test/lib + * @run main/othervm/native TestCheckedEnsureLocalCapacity launch + */ +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.process.OutputAnalyzer; + +public class TestCheckedEnsureLocalCapacity { + + static { + System.loadLibrary("TestCheckedEnsureLocalCapacity"); + } + + // Calls EnsureLocalCapacity(capacity) and then creates "copies" number + // of LocalRefs to "o". + // If capacity > copies no warning should ensue (with the bug fixed). + // If copies > capacity + warning-threshold then we still get a warning. + private static native void ensureCapacity(Object o, int capacity, int copies); + + private static int[][] testArgs = { + { 60, 45 }, // good: capacity > copies + { 1, 45 } // bad: copies >> capacity + }; + + private static final String EXCEED_WARNING = + "^WARNING: JNI local refs: \\d++, exceeds capacity:"; + + private static final String WARNING = "^WARNING: "; + + public static void main(String[] args) throws Throwable { + if (args.length == 2) { + ensureCapacity(new Object(), + Integer.parseInt(args[0]), + Integer.parseInt(args[1])); + return; + } + + // No warning + ProcessTools.executeTestJvm("-Xcheck:jni", + "TestCheckedEnsureLocalCapacity", + Integer.toString(testArgs[0][0]), + Integer.toString(testArgs[0][1])). + shouldHaveExitValue(0). + // check no capacity warning + stdoutShouldNotMatch(EXCEED_WARNING). + // check no other warning + stdoutShouldNotMatch(WARNING). + reportDiagnosticSummary(); + + // Warning + ProcessTools.executeTestJvm("-Xcheck:jni", + "TestCheckedEnsureLocalCapacity", + Integer.toString(testArgs[1][0]), + Integer.toString(testArgs[1][1])). + shouldHaveExitValue(0). + // check for capacity warning + stdoutShouldMatch(EXCEED_WARNING). + reportDiagnosticSummary(); + } +} diff --git a/test/hotspot/jtreg/runtime/jni/checked/libTestCheckedEnsureLocalCapacity.c b/test/hotspot/jtreg/runtime/jni/checked/libTestCheckedEnsureLocalCapacity.c new file mode 100644 index 00000000000..08ec8d9455c --- /dev/null +++ b/test/hotspot/jtreg/runtime/jni/checked/libTestCheckedEnsureLocalCapacity.c @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#include +#include + +void reduceLocalCapacity(JNIEnv* env) { + puts("reduceLocalCapacity: setting to 1"); + (*env)->EnsureLocalCapacity(env,1); +} + +JNIEXPORT void JNICALL +Java_TestCheckedEnsureLocalCapacity_ensureCapacity(JNIEnv *env, + jobject unused, + jobject target, + jint capacity, + jint copies) { + int i; + printf("ensureCapacity: setting to %d\n", capacity); + (*env)->EnsureLocalCapacity(env, capacity); // set high + reduceLocalCapacity(env); // sets low + + printf("ensureCapacity: creating %d LocalRefs\n", copies); + for (i = 0; i < copies; i++) { + target = (*env)->NewLocalRef(env, target); + } + + puts("ensureCapacity: done"); +} From 0fa3f5ebf8acd000a704e7b7ac210f1afb2083af Mon Sep 17 00:00:00 2001 From: "Daniel D. Daugherty" Date: Tue, 12 Dec 2017 21:27:06 -0500 Subject: [PATCH 08/88] 8193407: jdk/hs fails Solaris slowdebug test-image build Add a missing '-lc' option for libCNLookUp. Reviewed-by: dholmes, kvn --- make/test/JtregNativeHotspot.gmk | 1 + 1 file changed, 1 insertion(+) diff --git a/make/test/JtregNativeHotspot.gmk b/make/test/JtregNativeHotspot.gmk index 8cf3b0ed6f3..486401fb4d3 100644 --- a/make/test/JtregNativeHotspot.gmk +++ b/make/test/JtregNativeHotspot.gmk @@ -113,6 +113,7 @@ ifeq ($(TOOLCHAIN_TYPE), solstudio) BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHandshakeTransitionTest := -lc BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libHasNoEntryPoint := -lc BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libReturnError := -lc + BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCNLookUp := -lc endif ifeq ($(OPENJDK_TARGET_OS), linux) From eb417da9531dcff6d82d5afd9e22fc8833ab1d00 Mon Sep 17 00:00:00 2001 From: Brent Christian Date: Fri, 8 Dec 2017 13:04:43 -0800 Subject: [PATCH 09/88] 8193271: ProblemList tools/launcher/TestXcheckJNIWarnings.java Reviewed-by: darcy --- test/jdk/ProblemList.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index a8d5eee330b..a29f5df566c 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -257,6 +257,7 @@ javax/sound/sampled/Mixers/DisabledAssertionCrash.java 7067310 generic-all tools/pack200/CommandLineTests.java 8059906 generic-all tools/launcher/FXLauncherTest.java 8068049 linux-all,macosx-all +tools/launcher/TestXcheckJNIWarnings.java 8190984 solaris-all tools/jimage/JImageExtractTest.java 8170120 generic-all tools/jimage/JImageListTest.java 8170120 generic-all From 276093653ad4797b29d827705d50ecf2f3fb614b Mon Sep 17 00:00:00 2001 From: Brent Christian Date: Tue, 12 Dec 2017 21:46:06 -0500 Subject: [PATCH 10/88] 8190984: tools/launcher/TestXcheckJNIWarnings.java WARNING was found in the output Reviewed-by: dholmes, mchung --- src/java.base/share/native/libjava/System.c | 3 +++ test/jdk/ProblemList.txt | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java.base/share/native/libjava/System.c b/src/java.base/share/native/libjava/System.c index 07e638862db..9116b8d8265 100644 --- a/src/java.base/share/native/libjava/System.c +++ b/src/java.base/share/native/libjava/System.c @@ -186,6 +186,9 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props) jobject ret = NULL; jstring jVMVal = NULL; + if ((*env)->EnsureLocalCapacity(env, 50) < 0) { + return NULL; + } sprops = GetJavaProperties(env); CHECK_NULL_RETURN(sprops, NULL); diff --git a/test/jdk/ProblemList.txt b/test/jdk/ProblemList.txt index a29f5df566c..a8d5eee330b 100644 --- a/test/jdk/ProblemList.txt +++ b/test/jdk/ProblemList.txt @@ -257,7 +257,6 @@ javax/sound/sampled/Mixers/DisabledAssertionCrash.java 7067310 generic-all tools/pack200/CommandLineTests.java 8059906 generic-all tools/launcher/FXLauncherTest.java 8068049 linux-all,macosx-all -tools/launcher/TestXcheckJNIWarnings.java 8190984 solaris-all tools/jimage/JImageExtractTest.java 8170120 generic-all tools/jimage/JImageListTest.java 8170120 generic-all From 16d95cbf9dcc8f7812514e25e5e5002d2fc26a16 Mon Sep 17 00:00:00 2001 From: Nils Eliasson Date: Wed, 13 Dec 2017 10:21:21 +0100 Subject: [PATCH 11/88] 8192971: LockCompilationTest fails intermittently Remove all unnecessary compilations Reviewed-by: kvn, thartmann --- .../compiler/whitebox/LockCompilationTest.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java b/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java index 077cbf54e5c..594fe3cb9c5 100644 --- a/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java +++ b/test/hotspot/jtreg/compiler/whitebox/LockCompilationTest.java @@ -33,6 +33,7 @@ * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI -XX:-UseCounterDecay + * -XX:CompileCommand=compileonly,*SimpleTestCaseHelper::method * compiler.whitebox.LockCompilationTest */ @@ -46,20 +47,7 @@ public class LockCompilationTest extends CompilerWhiteBoxTest { // This case waits for 5 seconds and verifies that the method hasn't been // compiled during that time. Only do that for one of the test cases. - // Only compile SimpleTestCaseHelper.method and exclude all other to ensure no - // contention on the compile queue causes problems. - String directive = - "[{ match:\"*SimpleTestCaseHelper.method\", Exclude:false}, " + - " { match:\"*.*\", Exclude:true}]"; - if (WHITE_BOX.addCompilerDirective(directive) != 2) { - throw new RuntimeException("Could not add directive"); - } - try { - CompilerWhiteBoxTest.main(LockCompilationTest::new, new String[] {"METHOD_TEST"}); - } finally { - WHITE_BOX.removeCompilerDirective(2); - } - + CompilerWhiteBoxTest.main(LockCompilationTest::new, new String[] {"METHOD_TEST"}); } private LockCompilationTest(TestCase testCase) { From 35417330245f7fb9e531ffe971dc66c22ee6559d Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Wed, 13 Dec 2017 07:14:18 -0500 Subject: [PATCH 12/88] 8193053: jvm crash by G1CMBitMapClosure::do_addr We were adding an unloaded mirror to the SATB collection set in remove_handle. Reviewed-by: hseigel, kbarrett --- .../share/classfile/classLoaderData.cpp | 31 +++++++++++++++++-- .../share/classfile/classLoaderData.hpp | 3 +- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp index 06c5d947cd0..865ab45e305 100644 --- a/src/hotspot/share/classfile/classLoaderData.cpp +++ b/src/hotspot/share/classfile/classLoaderData.cpp @@ -574,9 +574,9 @@ void ClassLoaderData::unload() { ls.cr(); } - // In some rare cases items added to this list will not be freed elsewhere. - // To keep it simple, just free everything in it here. - free_deallocate_list(); + // Some items on the _deallocate_list need to free their C heap structures + // if they are not already on the _klasses list. + unload_deallocate_list(); // Clean up global class iterator for compiler static_klass_iterator.adjust_saved_class(this); @@ -755,6 +755,7 @@ OopHandle ClassLoaderData::add_handle(Handle h) { } void ClassLoaderData::remove_handle(OopHandle h) { + assert(!is_unloading(), "Do not remove a handle for a CLD that is unloading"); oop* ptr = h.ptr_raw(); if (ptr != NULL) { assert(_handles.contains(ptr), "Got unexpected handle " PTR_FORMAT, p2i(ptr)); @@ -799,6 +800,7 @@ void ClassLoaderData::add_to_deallocate_list(Metadata* m) { void ClassLoaderData::free_deallocate_list() { // Don't need lock, at safepoint assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint"); + assert(!is_unloading(), "only called for ClassLoaderData that are not unloading"); if (_deallocate_list == NULL) { return; } @@ -828,6 +830,29 @@ void ClassLoaderData::free_deallocate_list() { } } +// This is distinct from free_deallocate_list. For class loader data that are +// unloading, this frees the C heap memory for constant pools on the list. If there +// were C heap memory allocated for methods, it would free that too. The C heap memory +// for InstanceKlasses on this list is freed in the ClassLoaderData destructor. +void ClassLoaderData::unload_deallocate_list() { + // Don't need lock, at safepoint + assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint"); + assert(is_unloading(), "only called for ClassLoaderData that are unloading"); + if (_deallocate_list == NULL) { + return; + } + // Go backwards because this removes entries that are freed. + for (int i = _deallocate_list->length() - 1; i >= 0; i--) { + Metadata* m = _deallocate_list->at(i); + assert (!m->on_stack(), "wouldn't be unloading if this were so"); + _deallocate_list->remove_at(i); + // Only constant pool entries have C heap memory to free. + if (m->is_constantPool()) { + ((ConstantPool*)m)->release_C_heap_structures(); + } + } +} + // These anonymous class loaders are to contain classes used for JSR292 ClassLoaderData* ClassLoaderData::anonymous_class_loader_data(oop loader, TRAPS) { // Add a new class loader data to the graph. diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp index fc142452165..79d6c63f599 100644 --- a/src/hotspot/share/classfile/classLoaderData.hpp +++ b/src/hotspot/share/classfile/classLoaderData.hpp @@ -307,7 +307,8 @@ class ClassLoaderData : public CHeapObj { void packages_do(void f(PackageEntry*)); // Deallocate free list during class unloading. - void free_deallocate_list(); + void free_deallocate_list(); // for the classes that are not unloaded + void unload_deallocate_list(); // for the classes that are unloaded // Allocate out of this class loader data MetaWord* allocate(size_t size); From 0c05e5a478b1849f9ec5d6c3229ebe8efa7572f7 Mon Sep 17 00:00:00 2001 From: Vladimir Ivanov Date: Wed, 13 Dec 2017 19:32:48 +0300 Subject: [PATCH 13/88] 8190869: C2: missing strength reduction of Math.pow(x, 2.0D) to x*x Reviewed-by: kvn --- src/hotspot/cpu/x86/macroAssembler_x86_pow.cpp | 13 +++++++++++++ src/hotspot/share/opto/library_call.cpp | 15 ++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/hotspot/cpu/x86/macroAssembler_x86_pow.cpp b/src/hotspot/cpu/x86/macroAssembler_x86_pow.cpp index 12b38d8c5ef..c0a2ea19e28 100644 --- a/src/hotspot/cpu/x86/macroAssembler_x86_pow.cpp +++ b/src/hotspot/cpu/x86/macroAssembler_x86_pow.cpp @@ -765,6 +765,11 @@ ALIGNED_(8) juint _log2_pow[] = 0xfefa39efUL, 0x3fe62e42UL, 0xfefa39efUL, 0xbfe62e42UL }; +ALIGNED_(8) juint _DOUBLE2[] = +{ + 0x00000000UL, 0x40000000UL +}; + //registers, // input: xmm0, xmm1 // scratch: xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7 @@ -803,6 +808,7 @@ void MacroAssembler::fast_pow(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xm address HIGHMASK_LOG_X = (address)_HIGHMASK_LOG_X; address HALFMASK = (address)_HALFMASK; address log2 = (address)_log2_pow; + address DOUBLE2 = (address)_DOUBLE2; bind(start); @@ -810,6 +816,13 @@ void MacroAssembler::fast_pow(XMMRegister xmm0, XMMRegister xmm1, XMMRegister xm movsd(Address(rsp, 8), xmm0); movsd(Address(rsp, 16), xmm1); + // Special case: pow(x, 2.0) => x * x + movdq(tmp1, xmm1); + cmp64(tmp1, ExternalAddress(DOUBLE2)); + jccb(Assembler::notEqual, B1_2); + mulsd(xmm0, xmm0); + jmp(B1_5); + bind(B1_2); pextrw(eax, xmm0, 3); xorpd(xmm2, xmm2); diff --git a/src/hotspot/share/opto/library_call.cpp b/src/hotspot/share/opto/library_call.cpp index bb4ed6cef8e..98bc277018b 100644 --- a/src/hotspot/share/opto/library_call.cpp +++ b/src/hotspot/share/opto/library_call.cpp @@ -1789,10 +1789,19 @@ bool LibraryCallKit::inline_math_native(vmIntrinsics::ID id) { return StubRoutines::dexp() != NULL ? runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dexp(), "dexp") : runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dexp), "EXP"); - case vmIntrinsics::_dpow: - return StubRoutines::dpow() != NULL ? - runtime_math(OptoRuntime::Math_DD_D_Type(), StubRoutines::dpow(), "dpow") : + case vmIntrinsics::_dpow: { + Node* exp = round_double_node(argument(2)); + const TypeD* d = _gvn.type(exp)->isa_double_constant(); + if (d != NULL && d->getd() == 2.0) { + // Special case: pow(x, 2.0) => x * x + Node* base = round_double_node(argument(0)); + set_result(_gvn.transform(new MulDNode(base, base))); + return true; + } + return StubRoutines::dexp() != NULL ? + runtime_math(OptoRuntime::Math_DD_D_Type(), StubRoutines::dpow(), "dpow") : runtime_math(OptoRuntime::Math_DD_D_Type(), FN_PTR(SharedRuntime::dpow), "POW"); + } #undef FN_PTR // These intrinsics are not yet correctly implemented From c11f132abe050315c0c5e78321e039df510e32f6 Mon Sep 17 00:00:00 2001 From: Vladimir Kozlov Date: Wed, 13 Dec 2017 11:59:55 -0800 Subject: [PATCH 14/88] 8191788: add jdk.internal.vm.compiler to --limit-modules if -Djvmci.Compiler=graal is in the command line Skip tests which use --limit-modules when Graal is used as JIT compiler. Reviewed-by: alanb, mchung, dholmes, ccheung, dnsimon --- .hgignore | 2 ++ .../jtreg/runtime/SharedArchiveFile/BootAppendTests.java | 2 +- .../jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java | 2 +- .../runtime/appcds/jigsaw/classpathtests/BootAppendTests.java | 2 +- .../runtime/appcds/jigsaw/classpathtests/ClassPathTests.java | 2 +- .../jigsaw/classpathtests/EmptyClassInBootClassPath.java | 2 +- .../jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java | 2 +- test/jdk/TEST.ROOT | 1 + test/jdk/com/sun/tools/attach/modules/Driver.java | 1 + test/jdk/java/lang/String/concat/WithSecurityManager.java | 3 ++- .../System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java | 1 + test/jdk/java/lang/instrument/TestAgentWithLimitMods.java | 3 ++- .../ManagementFactory/DefaultManagementProviderTest.java | 1 + test/jdk/java/net/SocketOption/OptionsTest.java | 3 ++- test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java | 1 + .../java/nio/channels/DatagramChannel/SocketOptionTests.java | 3 ++- .../nio/channels/ServerSocketChannel/SocketOptionTests.java | 3 ++- .../jdk/java/nio/channels/SocketChannel/SocketOptionTests.java | 3 ++- test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java | 1 + test/jdk/tools/launcher/modules/listmods/ListModsTest.java | 1 + .../modules/showmoduleresolution/ShowModuleResolutionTest.java | 1 + 21 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.hgignore b/.hgignore index 95446e54dcf..35f87bf0e30 100644 --- a/.hgignore +++ b/.hgignore @@ -11,3 +11,5 @@ nbproject/private/ test/nashorn/script/external test/nashorn/lib NashornProfile.txt +.*/JTreport/.* +.*/JTwork/.* diff --git a/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java b/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java index 9cf2534d485..287d3b30ce4 100644 --- a/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java +++ b/test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java @@ -23,7 +23,7 @@ /** * @test - * @requires vm.cds + * @requires vm.cds & !vm.graal.enabled * @summary Testing -Xbootclasspath/a support for CDS * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) * @library /test/lib diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java index 2513d0e5a19..a88eb2fa414 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/JigsawOptionsCombo.java @@ -27,7 +27,7 @@ * @summary Test combinations of jigsaw options that affect the use of AppCDS * * AppCDS does not support uncompressed oops - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library /test/lib .. * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java index 71392801fda..e35a7182590 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/BootAppendTests.java @@ -25,7 +25,7 @@ /** * @test * @summary AppCDS tests for testing -Xbootclasspath/a - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java index 6f929ab227f..b50cfb6bf74 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/ClassPathTests.java @@ -24,7 +24,7 @@ /** * @test - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library ../.. * @library /test/lib * @modules java.base/jdk.internal.misc diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java index a635603473e..63daf117cb1 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java @@ -29,7 +29,7 @@ * 2) app loader will load the class from the jimage by default; * app loader will load the class from the bootclasspath if the * "--limit-modules java.base" option is specified - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library /test/lib /test/hotspot/jtreg/runtime/appcds * @modules java.base/jdk.internal.misc * java.management diff --git a/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java b/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java index 434ddfcfae6..6cceed1ae93 100644 --- a/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java +++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsTests.java @@ -24,7 +24,7 @@ /** * @test - * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true) + * @requires ((vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)) & !vm.graal.enabled * @library ../.. * @library /test/lib * @modules java.base/jdk.internal.misc diff --git a/test/jdk/TEST.ROOT b/test/jdk/TEST.ROOT index 2f00dbb7f82..0f089f11145 100644 --- a/test/jdk/TEST.ROOT +++ b/test/jdk/TEST.ROOT @@ -36,6 +36,7 @@ requires.extraPropDefns.vmOpts = -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI requires.properties= \ sun.arch.data.model \ java.runtime.name \ + vm.graal.enabled \ vm.cds # Minimum jtreg version diff --git a/test/jdk/com/sun/tools/attach/modules/Driver.java b/test/jdk/com/sun/tools/attach/modules/Driver.java index 7323709fcf0..94d37531c55 100644 --- a/test/jdk/com/sun/tools/attach/modules/Driver.java +++ b/test/jdk/com/sun/tools/attach/modules/Driver.java @@ -23,6 +23,7 @@ /** * @test + * @requires !vm.graal.enabled * @modules jdk.attach * @build m/* Agent * @run main/othervm -Djdk.attach.allowAttachSelf m/p.Main jmx javaagent diff --git a/test/jdk/java/lang/String/concat/WithSecurityManager.java b/test/jdk/java/lang/String/concat/WithSecurityManager.java index 2835a3813f4..475cc1938b7 100644 --- a/test/jdk/java/lang/String/concat/WithSecurityManager.java +++ b/test/jdk/java/lang/String/concat/WithSecurityManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, 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 @@ -27,6 +27,7 @@ import java.security.Permission; * @test * @summary String concatenation fails with a custom SecurityManager that uses concatenation * @bug 8155090 8158851 + * @requires !vm.graal.enabled * * @compile WithSecurityManager.java * diff --git a/test/jdk/java/lang/System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java b/test/jdk/java/lang/System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java index 998b1fc6759..a9f35d22597 100644 --- a/test/jdk/java/lang/System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java +++ b/test/jdk/java/lang/System/LoggerFinder/LoggerFinderAPI/LoggerFinderAPI.java @@ -46,6 +46,7 @@ import java.util.ResourceBundle; * throwing NullPointerException. The test uses --limit-module * to force the selection of one or the other. * @author danielfuchs + * @requires !vm.graal.enabled * @build LoggerFinderAPI * @run main/othervm --limit-modules java.base,java.logging * -Djava.util.logging.SimpleFormatter.format=LOG-%4$s:-[%2$s]-%5$s%6$s%n diff --git a/test/jdk/java/lang/instrument/TestAgentWithLimitMods.java b/test/jdk/java/lang/instrument/TestAgentWithLimitMods.java index ddf51b54399..1ca4f3825e5 100644 --- a/test/jdk/java/lang/instrument/TestAgentWithLimitMods.java +++ b/test/jdk/java/lang/instrument/TestAgentWithLimitMods.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, 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 @@ -24,6 +24,7 @@ /** * * @test + * @requires !vm.graal.enabled * @summary Tests that the -javaagent option adds the java.instrument into * the module graph * diff --git a/test/jdk/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java b/test/jdk/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java index e9ccd515a88..f09a51e3c0e 100644 --- a/test/jdk/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java +++ b/test/jdk/java/lang/management/ManagementFactory/DefaultManagementProviderTest.java @@ -26,6 +26,7 @@ * @bug 8151099 * @summary Verify platform MXBeans initialized properly with java.management * module only. No other management provider + * @requires !vm.graal.enabled * @modules java.management * @run main/othervm --limit-modules=java.management DefaultManagementProviderTest */ diff --git a/test/jdk/java/net/SocketOption/OptionsTest.java b/test/jdk/java/net/SocketOption/OptionsTest.java index 232873372ee..214c2d920f1 100644 --- a/test/jdk/java/net/SocketOption/OptionsTest.java +++ b/test/jdk/java/net/SocketOption/OptionsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, 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 @@ -24,6 +24,7 @@ /* * @test * @bug 8036979 8072384 8044773 + * @requires !vm.graal.enabled * @run main/othervm -Xcheck:jni OptionsTest * @run main/othervm -Xcheck:jni -Djava.net.preferIPv4Stack=true OptionsTest * @run main/othervm --limit-modules=java.base OptionsTest diff --git a/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java b/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java index e07cf66dd61..407811bb494 100644 --- a/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java +++ b/test/jdk/java/net/SocketOption/UnsupportedOptionsTest.java @@ -32,6 +32,7 @@ import java.util.List; * @bug 8143554 8044773 * @summary Test checks that UnsupportedOperationException for unsupported * SOCKET_OPTIONS is thrown by both getOption() and setOption() methods. + * @requires !vm.graal.enabled * @run main UnsupportedOptionsTest * @run main/othervm --limit-modules=java.base UnsupportedOptionsTest */ diff --git a/test/jdk/java/nio/channels/DatagramChannel/SocketOptionTests.java b/test/jdk/java/nio/channels/DatagramChannel/SocketOptionTests.java index abb8b174979..00a232d9fd2 100644 --- a/test/jdk/java/nio/channels/DatagramChannel/SocketOptionTests.java +++ b/test/jdk/java/nio/channels/DatagramChannel/SocketOptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -24,6 +24,7 @@ /* @test * @bug 4640544 8044773 * @summary Unit test for setOption/getOption/options methods + * @requires !vm.graal.enabled * @run main SocketOptionTests * @run main/othervm --limit-modules=java.base SocketOptionTests */ diff --git a/test/jdk/java/nio/channels/ServerSocketChannel/SocketOptionTests.java b/test/jdk/java/nio/channels/ServerSocketChannel/SocketOptionTests.java index 1687b73f04a..126d669d4c2 100644 --- a/test/jdk/java/nio/channels/ServerSocketChannel/SocketOptionTests.java +++ b/test/jdk/java/nio/channels/ServerSocketChannel/SocketOptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -25,6 +25,7 @@ * @bug 4640544 8044773 * @summary Unit test for ServerSocketChannel setOption/getOption/options * methods. + * @requires !vm.graal.enabled * @run main SocketOptionTests * @run main/othervm --limit-modules=java.base SocketOptionTests */ diff --git a/test/jdk/java/nio/channels/SocketChannel/SocketOptionTests.java b/test/jdk/java/nio/channels/SocketChannel/SocketOptionTests.java index 5e75ad9a93a..38b242bb4d3 100644 --- a/test/jdk/java/nio/channels/SocketChannel/SocketOptionTests.java +++ b/test/jdk/java/nio/channels/SocketChannel/SocketOptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2017, 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 @@ -25,6 +25,7 @@ * @bug 4640544 8044773 * @summary Unit test to check SocketChannel setOption/getOption/options * methods. + * @requires !vm.graal.enabled * @run main SocketOptionTests * @run main/othervm --limit-modules=java.base SocketOptionTests */ diff --git a/test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java b/test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java index e898837c72e..d697067b1f9 100644 --- a/test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java +++ b/test/jdk/tools/launcher/modules/limitmods/LimitModsTest.java @@ -23,6 +23,7 @@ /** * @test + * @requires !vm.graal.enabled * @library /lib/testlibrary /test/lib * @modules java.desktop java.logging jdk.compiler * @build LimitModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.* diff --git a/test/jdk/tools/launcher/modules/listmods/ListModsTest.java b/test/jdk/tools/launcher/modules/listmods/ListModsTest.java index 913f17ee8a9..38be89358a8 100644 --- a/test/jdk/tools/launcher/modules/listmods/ListModsTest.java +++ b/test/jdk/tools/launcher/modules/listmods/ListModsTest.java @@ -23,6 +23,7 @@ /** * @test + * @requires !vm.graal.enabled * @library /lib/testlibrary /test/lib * @modules java.se * @build ListModsTest jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.* diff --git a/test/jdk/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java b/test/jdk/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java index 0d2a1c4c3ed..d6eaedc693b 100644 --- a/test/jdk/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java +++ b/test/jdk/tools/launcher/modules/showmoduleresolution/ShowModuleResolutionTest.java @@ -23,6 +23,7 @@ /** * @test + * @requires !vm.graal.enabled * @modules jdk.jdeps jdk.zipfs * @library /lib/testlibrary * @build ShowModuleResolutionTest jdk.testlibrary.* From f287b874f2435db3cbc48f02361e01c50c28cb19 Mon Sep 17 00:00:00 2001 From: Igor Veresov Date: Wed, 13 Dec 2017 12:28:22 -0800 Subject: [PATCH 15/88] 8193439: Update Graal Reviewed-by: kvn --- .../.mx.graal/suite.py | 6 +- .../core/aarch64/AArch64LIRKindTool.java | 2 +- .../graalvm/compiler/core/common/LIRKind.java | 74 ++++++--- .../core/common/util/CompilationAlarm.java | 14 +- .../compiler/core/sparc/SPARCLIRKindTool.java | 2 +- .../core/test/CooperativePhaseTest.java | 149 ------------------ .../compiler/core/test/CountedLoopTest.java | 2 +- .../graalvm/compiler/debug/Assertions.java | 4 +- .../src/org/graalvm/compiler/graph/Graph.java | 5 + .../AArch64HotSpotForeignCallsProvider.java | 4 + .../aarch64/AArch64HotSpotLIRGenerator.java | 4 +- .../AMD64HotSpotForeignCallsProvider.java | 4 + .../amd64/AMD64HotSpotLIRKindTool.java | 5 +- .../SPARCHotSpotForeignCallsProvider.java | 4 + .../sparc/SPARCHotSpotLIRGenerator.java | 2 +- .../hotspot/test/CRC32CSubstitutionsTest.java | 94 +++++++++++ .../hotspot/test/CheckGraalIntrinsics.java | 7 + .../hotspot/test/JVMCIInfopointErrorTest.java | 8 +- .../hotspot/GraalHotSpotVMConfig.java | 1 + .../compiler/hotspot/HotSpotHostBackend.java | 4 +- .../hotspot/HotSpotReferenceMapBuilder.java | 9 +- .../meta/HotSpotGraphBuilderPlugins.java | 10 ++ .../replacements/CRC32CSubstitutions.java | 64 ++++++++ .../jtt/bytecode/BC_idiv_overflow.java | 47 ++++++ .../jtt/bytecode/BC_ldiv_overflow.java | 47 ++++++ .../org/graalvm/compiler/nodes/IfNode.java | 36 ++++- .../nodes/calc/IntegerDivRemNode.java | 3 +- .../common/ProfileCompiledMethodsPhase.java | 2 +- .../compiler/printer/GraphPrinter.java | 17 +- .../StandardGraphBuilderPlugins.java | 18 +++ .../replacements/classfile/Classfile.java | 8 +- .../virtual/phases/ea/GraphEffectList.java | 10 +- 32 files changed, 452 insertions(+), 214 deletions(-) delete mode 100644 src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java create mode 100644 src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32CSubstitutionsTest.java create mode 100644 src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32CSubstitutions.java create mode 100644 src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv_overflow.java create mode 100644 src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv_overflow.java diff --git a/src/jdk.internal.vm.compiler/.mx.graal/suite.py b/src/jdk.internal.vm.compiler/.mx.graal/suite.py index e8df78c52c0..b1dc74b7d5f 100644 --- a/src/jdk.internal.vm.compiler/.mx.graal/suite.py +++ b/src/jdk.internal.vm.compiler/.mx.graal/suite.py @@ -107,7 +107,6 @@ suite = { "subDir" : "share/classes", "dependencies" : ["JVMCI_SERVICES", "JVMCI_API", "org.graalvm.util"], "sourceDirs" : ["src"], - "dependencies" : ["org.graalvm.util"], "checkstyle" : "org.graalvm.compiler.graph", "uses" : ["org.graalvm.compiler.options.OptionDescriptors"], "javaCompliance" : "1.8", @@ -148,6 +147,7 @@ suite = { "dependencies" : [ "JVMCI_API", "org.graalvm.compiler.serviceprovider", + "org.graalvm.graphio", "org.graalvm.compiler.options" ], "annotationProcessors" : ["GRAAL_OPTIONS_PROCESSOR"], @@ -291,7 +291,6 @@ suite = { "subDir" : "share/classes", "sourceDirs" : ["src"], "dependencies" : [ - "org.graalvm.compiler.core.aarch64", "org.graalvm.compiler.hotspot", "org.graalvm.compiler.replacements.aarch64", ], @@ -435,6 +434,7 @@ suite = { "mx:JUNIT", "org.graalvm.compiler.api.test", "org.graalvm.compiler.graph", + "org.graalvm.graphio", ], "annotationProcessors" : ["GRAAL_NODEINFO_PROCESSOR"], "javaCompliance" : "1.8", @@ -945,6 +945,7 @@ suite = { "dependencies" : [ "org.graalvm.compiler.lir.jtt", "org.graalvm.compiler.lir.amd64", + "org.graalvm.compiler.core.amd64", "JVMCI_HOTSPOT" ], "checkstyle" : "org.graalvm.compiler.graph", @@ -1019,7 +1020,6 @@ suite = { "subDir" : "share/classes", "sourceDirs" : ["src"], "dependencies" : [ - "org.graalvm.graphio", "org.graalvm.compiler.core", "org.graalvm.compiler.java", ], diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java index 71f55db33c5..5616a5e36ea 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64LIRKindTool.java @@ -68,7 +68,7 @@ public class AArch64LIRKindTool implements LIRKindTool { @Override public LIRKind getNarrowOopKind() { - return LIRKind.reference(AArch64Kind.DWORD); + return LIRKind.compressedReference(AArch64Kind.DWORD); } @Override diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java index 688a328a006..cb0c4009fb5 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/LIRKind.java @@ -33,8 +33,9 @@ import jdk.vm.ci.meta.ValueKind; /** * Represents the type of values in the LIR. It is composed of a {@link PlatformKind} that gives the - * low level representation of the value, and a {@link #referenceMask} that describes the location - * of object references in the value, and optionally a {@link #derivedReferenceBase}. + * low level representation of the value, a {@link #referenceMask} that describes the location of + * object references in the value, a {@link #referenceCompressionMask} that indicates which of these + * references are compressed references, and for derived references a {@link #derivedReferenceBase}. * *

Constructing {@link LIRKind} instances

* @@ -52,7 +53,7 @@ import jdk.vm.ci.meta.ValueKind; * compare-and-swap. For convert operations, {@link LIRKind#combine} should be used. *

* If it is known that the result will be a reference (e.g. pointer arithmetic where the end result - * is a valid oop), {@link LIRKind#reference} should be used. + * is a valid oop), {@link #reference} or {@link LIRKind#compressedReference} should be used. *

* If it is known that the result will neither be a reference nor be derived from a reference, * {@link LIRKind#value} can be used. If the operation producing this value has inputs, this is very @@ -64,19 +65,28 @@ import jdk.vm.ci.meta.ValueKind; */ public final class LIRKind extends ValueKind { + /** + * The location of object references in the value. If the value is a vector type, each bit + * represents one component of the vector. + */ private final int referenceMask; + /** Mask with 1-bits indicating which references in {@link #referenceMask} are compressed. */ + private final int referenceCompressionMask; + private AllocatableValue derivedReferenceBase; private static final int UNKNOWN_REFERENCE = -1; public static final LIRKind Illegal = unknownReference(ValueKind.Illegal.getPlatformKind()); - private LIRKind(PlatformKind platformKind, int referenceMask, AllocatableValue derivedReferenceBase) { + private LIRKind(PlatformKind platformKind, int referenceMask, int referenceCompressionMask, AllocatableValue derivedReferenceBase) { super(platformKind); this.referenceMask = referenceMask; + this.referenceCompressionMask = referenceCompressionMask; this.derivedReferenceBase = derivedReferenceBase; + assert this.referenceCompressionMask == 0 || this.referenceMask == this.referenceCompressionMask : "mixing compressed and uncompressed references is untested"; assert derivedReferenceBase == null || !derivedReferenceBase.getValueKind(LIRKind.class).isDerivedReference() : "derived reference can't have another derived reference as base"; } @@ -86,15 +96,23 @@ public final class LIRKind extends ValueKind { * reference. Otherwise, {@link #combine(Value...)} should be used instead. */ public static LIRKind value(PlatformKind platformKind) { - return new LIRKind(platformKind, 0, null); + return new LIRKind(platformKind, 0, 0, null); } /** - * Create a {@link LIRKind} of type {@code platformKind} that contains a single tracked oop - * reference. + * Create a {@link LIRKind} of type {@code platformKind} that contains a single, tracked, + * uncompressed oop reference. */ public static LIRKind reference(PlatformKind platformKind) { - return derivedReference(platformKind, null); + return derivedReference(platformKind, null, false); + } + + /** + * Create a {@link LIRKind} of type {@code platformKind} that contains a single, tracked, + * compressed oop reference. + */ + public static LIRKind compressedReference(PlatformKind platformKind) { + return derivedReference(platformKind, null, true); } /** @@ -112,10 +130,12 @@ public final class LIRKind extends ValueKind { /** * Create a {@link LIRKind} of type {@code platformKind} that contains a derived reference. */ - public static LIRKind derivedReference(PlatformKind platformKind, AllocatableValue base) { + public static LIRKind derivedReference(PlatformKind platformKind, AllocatableValue base, boolean compressed) { int length = platformKind.getVectorLength(); assert 0 < length && length < 32 : "vector of " + length + " references not supported"; - return new LIRKind(platformKind, (1 << length) - 1, base); + int referenceMask = (1 << length) - 1; + int referenceCompressionMask = (compressed ? referenceMask : 0); + return new LIRKind(platformKind, referenceMask, referenceCompressionMask, base); } /** @@ -125,7 +145,7 @@ public final class LIRKind extends ValueKind { * used instead to automatically propagate this information. */ public static LIRKind unknownReference(PlatformKind platformKind) { - return new LIRKind(platformKind, UNKNOWN_REFERENCE, null); + return new LIRKind(platformKind, UNKNOWN_REFERENCE, UNKNOWN_REFERENCE, null); } /** @@ -139,9 +159,9 @@ public final class LIRKind extends ValueKind { return makeUnknownReference(); } else { if (isValue()) { - return derivedReference(getPlatformKind(), base); + return derivedReference(getPlatformKind(), base, false); } else { - return new LIRKind(getPlatformKind(), referenceMask, base); + return new LIRKind(getPlatformKind(), referenceMask, referenceCompressionMask, base); } } } @@ -240,7 +260,7 @@ public final class LIRKind extends ValueKind { return mergeKind; } /* {@code mergeKind} is a reference. */ - if (mergeKind.referenceMask != inputKind.referenceMask) { + if (mergeKind.referenceMask != inputKind.referenceMask || mergeKind.referenceCompressionMask != inputKind.referenceCompressionMask) { /* * Reference masks do not match so the result can only be an unknown reference. */ @@ -284,9 +304,11 @@ public final class LIRKind extends ValueKind { } else { // reference type int newLength = Math.min(32, newPlatformKind.getVectorLength()); - int newReferenceMask = referenceMask & (0xFFFFFFFF >>> (32 - newLength)); + int lengthMask = 0xFFFFFFFF >>> (32 - newLength); + int newReferenceMask = referenceMask & lengthMask; + int newReferenceCompressionMask = referenceCompressionMask & lengthMask; assert newReferenceMask != UNKNOWN_REFERENCE; - return new LIRKind(newPlatformKind, newReferenceMask, derivedReferenceBase); + return new LIRKind(newPlatformKind, newReferenceMask, newReferenceCompressionMask, derivedReferenceBase); } } @@ -308,12 +330,14 @@ public final class LIRKind extends ValueKind { // repeat reference mask to fill new kind int newReferenceMask = 0; + int newReferenceCompressionMask = 0; for (int i = 0; i < newLength; i += getPlatformKind().getVectorLength()) { newReferenceMask |= referenceMask << i; + newReferenceCompressionMask |= referenceCompressionMask << i; } assert newReferenceMask != UNKNOWN_REFERENCE; - return new LIRKind(newPlatformKind, newReferenceMask, derivedReferenceBase); + return new LIRKind(newPlatformKind, newReferenceMask, newReferenceCompressionMask, derivedReferenceBase); } } @@ -322,7 +346,7 @@ public final class LIRKind extends ValueKind { * {@link LIRKind#unknownReference}. */ public LIRKind makeUnknownReference() { - return new LIRKind(getPlatformKind(), UNKNOWN_REFERENCE, null); + return new LIRKind(getPlatformKind(), UNKNOWN_REFERENCE, UNKNOWN_REFERENCE, null); } /** @@ -384,6 +408,17 @@ public final class LIRKind extends ValueKind { return !isUnknownReference() && (referenceMask & 1 << idx) != 0; } + /** + * Check whether the {@code idx}th part of this value is a compressed reference. + * + * @param idx The index into the vector if this is a vector kind. Must be 0 if this is a scalar + * kind. + */ + public boolean isCompressedReference(int idx) { + assert 0 <= idx && idx < getPlatformKind().getVectorLength() : "invalid index " + idx + " in " + this; + return !isUnknownReference() && (referenceCompressionMask & (1 << idx)) != 0; + } + /** * Check whether this kind is a value type that doesn't need to be tracked at safepoints. */ @@ -432,6 +467,7 @@ public final class LIRKind extends ValueKind { result = prime * result + ((getPlatformKind() == null) ? 0 : getPlatformKind().hashCode()); result = prime * result + ((getDerivedReferenceBase() == null) ? 0 : getDerivedReferenceBase().hashCode()); result = prime * result + referenceMask; + result = prime * result + referenceCompressionMask; return result; } @@ -445,7 +481,7 @@ public final class LIRKind extends ValueKind { } LIRKind other = (LIRKind) obj; - if (getPlatformKind() != other.getPlatformKind() || referenceMask != other.referenceMask) { + if (getPlatformKind() != other.getPlatformKind() || referenceMask != other.referenceMask || referenceCompressionMask != other.referenceCompressionMask) { return false; } if (isDerivedReference()) { diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java index b0dc7fd691d..426bb8d055d 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/util/CompilationAlarm.java @@ -22,6 +22,7 @@ */ package org.graalvm.compiler.core.common.util; +import org.graalvm.compiler.debug.Assertions; import org.graalvm.compiler.options.Option; import org.graalvm.compiler.options.OptionKey; import org.graalvm.compiler.options.OptionType; @@ -34,7 +35,8 @@ public final class CompilationAlarm implements AutoCloseable { public static class Options { // @formatter:off - @Option(help = "Time limit in seconds before a compilation expires (0 to disable the limit).", type = OptionType.Debug) + @Option(help = "Time limit in seconds before a compilation expires (0 to disable the limit). " + + "The compilation alarm will be implicitly disabled if assertions are enabled.", type = OptionType.Debug) public static final OptionKey CompilationExpirationPeriod = new OptionKey<>(300); // @formatter:on } @@ -85,15 +87,16 @@ public final class CompilationAlarm implements AutoCloseable { /** * Starts an alarm for setting a time limit on a compilation if there isn't already an active - * alarm and {@link CompilationAlarm.Options#CompilationExpirationPeriod}{@code > 0}. The - * returned value can be used in a try-with-resource statement to disable the alarm once the - * compilation is finished. + * alarm, if assertions are disabled and + * {@link CompilationAlarm.Options#CompilationExpirationPeriod}{@code > 0}. The returned value + * can be used in a try-with-resource statement to disable the alarm once the compilation is + * finished. * * @return a {@link CompilationAlarm} if there was no current alarm for the calling thread * before this call otherwise {@code null} */ public static CompilationAlarm trackCompilationPeriod(OptionValues options) { - int period = Options.CompilationExpirationPeriod.getValue(options); + int period = Assertions.assertionsEnabled() ? 0 : Options.CompilationExpirationPeriod.getValue(options); if (period > 0) { CompilationAlarm current = currentAlarm.get(); if (current == null) { @@ -105,4 +108,5 @@ public final class CompilationAlarm implements AutoCloseable { } return null; } + } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java index d24c4215f48..e772b2282d3 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCLIRKindTool.java @@ -68,7 +68,7 @@ public class SPARCLIRKindTool implements LIRKindTool { @Override public LIRKind getNarrowOopKind() { - return LIRKind.reference(SPARCKind.WORD); + return LIRKind.compressedReference(SPARCKind.WORD); } @Override diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java deleted file mode 100644 index 5a8f6418b37..00000000000 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CooperativePhaseTest.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 2016, 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. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package org.graalvm.compiler.core.test; - -import static org.graalvm.compiler.core.common.util.CompilationAlarm.Options.CompilationExpirationPeriod; - -import org.graalvm.compiler.core.common.RetryableBailoutException; -import org.graalvm.compiler.core.common.util.CompilationAlarm; -import org.graalvm.compiler.debug.GraalError; -import org.graalvm.compiler.nodes.StructuredGraph; -import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions; -import org.graalvm.compiler.options.OptionValues; -import org.graalvm.compiler.phases.Phase; -import org.junit.Test; - -public class CooperativePhaseTest extends GraalCompilerTest { - - public static void snippet() { - // dummy snippet - } - - private static class CooperativePhase extends Phase { - - @Override - protected void run(StructuredGraph graph) { - CompilationAlarm compilationAlarm = CompilationAlarm.current(); - while (true) { - sleep(200); - if (compilationAlarm.hasExpired()) { - return; - } - } - } - - } - - private static class UnCooperativePhase extends Phase { - - @Override - protected void run(StructuredGraph graph) { - CompilationAlarm compilationAlarm = CompilationAlarm.current(); - while (true) { - sleep(200); - if (compilationAlarm.hasExpired()) { - throw new RetryableBailoutException("Expiring..."); - } - } - } - - } - - private static class PartiallyCooperativePhase extends Phase { - - @Override - protected void run(StructuredGraph graph) { - CompilationAlarm compilationAlarm = CompilationAlarm.current(); - for (int i = 0; i < 10; i++) { - sleep(200); - if (compilationAlarm.hasExpired()) { - throw new RuntimeException("Phase must not exit in the timeout path"); - } - } - } - } - - private static class CooperativePhaseWithoutAlarm extends Phase { - - @Override - protected void run(StructuredGraph graph) { - CompilationAlarm compilationAlarm = CompilationAlarm.current(); - if (compilationAlarm.hasExpired()) { - throw new RuntimeException("Phase must not exit in the timeout path"); - } - } - } - - private static void sleep(long millis) { - try { - Thread.sleep(millis); - } catch (InterruptedException e) { - GraalError.shouldNotReachHere(e.getCause()); - } - } - - @Test(timeout = 60_000) - @SuppressWarnings("try") - public void test01() { - initializeForTimeout(); - OptionValues initialOptions = getInitialOptions(); - OptionValues options = new OptionValues(initialOptions, CompilationExpirationPeriod, 1/* sec */); - try (CompilationAlarm c1 = CompilationAlarm.trackCompilationPeriod(options)) { - StructuredGraph g = parseEager("snippet", AllowAssumptions.NO, options); - new CooperativePhase().apply(g); - } - } - - @Test(expected = RetryableBailoutException.class, timeout = 60_000) - @SuppressWarnings("try") - public void test02() { - initializeForTimeout(); - OptionValues initialOptions = getInitialOptions(); - OptionValues options = new OptionValues(initialOptions, CompilationExpirationPeriod, 1/* sec */); - try (CompilationAlarm c1 = CompilationAlarm.trackCompilationPeriod(options)) { - StructuredGraph g = parseEager("snippet", AllowAssumptions.NO, options); - new UnCooperativePhase().apply(g); - } - } - - @Test(timeout = 60_000) - @SuppressWarnings("try") - public void test03() { - initializeForTimeout(); - // 0 disables alarm utility - OptionValues initialOptions = getInitialOptions(); - OptionValues options = new OptionValues(initialOptions, CompilationExpirationPeriod, 0); - try (CompilationAlarm c1 = CompilationAlarm.trackCompilationPeriod(options)) { - StructuredGraph g = parseEager("snippet", AllowAssumptions.NO, options); - new PartiallyCooperativePhase().apply(g); - } - } - - @Test(timeout = 60_000) - @SuppressWarnings("try") - public void test04() { - initializeForTimeout(); - StructuredGraph g = parseEager("snippet", AllowAssumptions.NO); - new CooperativePhaseWithoutAlarm().apply(g); - } -} diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java index 877e98aae84..31ceb066d07 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java @@ -264,7 +264,7 @@ public class CountedLoopTest extends GraalCompilerTest { } @Override - protected boolean checkMidTierGraph(StructuredGraph graph) { + protected boolean checkHighTierGraph(StructuredGraph graph) { LoopsData loops = new LoopsData(graph); loops.detectedCountedLoops(); for (IVPropertyNode node : graph.getNodes().filter(IVPropertyNode.class)) { diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Assertions.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Assertions.java index c4acd5ff2a8..7e9afb0f2fe 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Assertions.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.debug/src/org/graalvm/compiler/debug/Assertions.java @@ -54,8 +54,8 @@ public class Assertions { // @formatter:off public static class Options { - @Option(help = "Enable expensive assertions. (Require normal assertions enabled)", type = OptionType.Debug) - public static final OptionKey DetailedAsserts = new OptionKey<>(true); + @Option(help = "Enable expensive assertions if normal assertions (i.e. -ea or -esa) are enabled.", type = OptionType.Debug) + public static final OptionKey DetailedAsserts = new OptionKey<>(false); } // @formatter:on diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java index 092a84a3aff..ed07cb925db 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.graph/src/org/graalvm/compiler/graph/Graph.java @@ -472,6 +472,11 @@ public class Graph { } } + public T addWithoutUniqueWithInputs(T node) { + addInputs(node); + return addHelper(node); + } + private final class AddInputsFilter extends Node.EdgeVisitor { @Override diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java index 054fb34bda9..aff7f0ee6fb 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotForeignCallsProvider.java @@ -30,6 +30,7 @@ import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.JUMP_ADDRES import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEffect.PRESERVES_REGISTERS; import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.LEAF; import static org.graalvm.compiler.hotspot.replacements.CRC32Substitutions.UPDATE_BYTES_CRC32; +import static org.graalvm.compiler.hotspot.replacements.CRC32CSubstitutions.UPDATE_BYTES_CRC32C; import static org.graalvm.word.LocationIdentity.any; import org.graalvm.compiler.core.common.LIRKind; @@ -79,6 +80,9 @@ public class AArch64HotSpotForeignCallsProvider extends HotSpotHostForeignCallsP if (config.useCRC32Intrinsics) { registerForeignCall(UPDATE_BYTES_CRC32, config.updateBytesCRC32Stub, NativeCall, PRESERVES_REGISTERS, LEAF, NOT_REEXECUTABLE, any()); } + if (config.useCRC32CIntrinsics) { + registerForeignCall(UPDATE_BYTES_CRC32C, config.updateBytesCRC32C, NativeCall, PRESERVES_REGISTERS, LEAF, NOT_REEXECUTABLE, any()); + } super.initialize(providers, options); } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java index 2ed6e3408c0..3e9d19ae1a4 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotLIRGenerator.java @@ -30,8 +30,8 @@ import java.util.function.Function; import org.graalvm.compiler.asm.Label; import org.graalvm.compiler.asm.aarch64.AArch64Address.AddressingMode; -import org.graalvm.compiler.asm.aarch64.AArch64Assembler.PrefetchMode; import org.graalvm.compiler.asm.aarch64.AArch64Assembler.ConditionFlag; +import org.graalvm.compiler.asm.aarch64.AArch64Assembler.PrefetchMode; import org.graalvm.compiler.core.aarch64.AArch64ArithmeticLIRGenerator; import org.graalvm.compiler.core.aarch64.AArch64LIRGenerator; import org.graalvm.compiler.core.aarch64.AArch64LIRKindTool; @@ -202,7 +202,7 @@ public class AArch64HotSpotLIRGenerator extends AArch64LIRGenerator implements H assert inputKind.getPlatformKind() == AArch64Kind.QWORD; if (inputKind.isReference(0)) { // oop - Variable result = newVariable(LIRKind.reference(AArch64Kind.DWORD)); + Variable result = newVariable(LIRKind.compressedReference(AArch64Kind.DWORD)); append(new AArch64HotSpotMove.CompressPointer(result, asAllocatable(pointer), getProviders().getRegisters().getHeapBaseRegister().asValue(), encoding, nonNull)); return result; } else { diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java index e92e17485dc..d1caa3b8d0e 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotForeignCallsProvider.java @@ -33,6 +33,7 @@ import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEff import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.LEAF; import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.LEAF_NOFP; import static org.graalvm.compiler.hotspot.replacements.CRC32Substitutions.UPDATE_BYTES_CRC32; +import static org.graalvm.compiler.hotspot.replacements.CRC32CSubstitutions.UPDATE_BYTES_CRC32C; import static org.graalvm.word.LocationIdentity.any; import org.graalvm.compiler.core.common.LIRKind; @@ -99,6 +100,9 @@ public class AMD64HotSpotForeignCallsProvider extends HotSpotHostForeignCallsPro // This stub does callee saving registerForeignCall(UPDATE_BYTES_CRC32, config.updateBytesCRC32Stub, NativeCall, PRESERVES_REGISTERS, LEAF_NOFP, NOT_REEXECUTABLE, any()); } + if (config.useCRC32CIntrinsics) { + registerForeignCall(UPDATE_BYTES_CRC32C, config.updateBytesCRC32C, NativeCall, PRESERVES_REGISTERS, LEAF_NOFP, NOT_REEXECUTABLE, any()); + } super.initialize(providers, options); } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java index 095a2a2e056..403ffa09eb2 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotLIRKindTool.java @@ -22,14 +22,15 @@ */ package org.graalvm.compiler.hotspot.amd64; -import jdk.vm.ci.amd64.AMD64Kind; import org.graalvm.compiler.core.amd64.AMD64LIRKindTool; import org.graalvm.compiler.core.common.LIRKind; +import jdk.vm.ci.amd64.AMD64Kind; + public class AMD64HotSpotLIRKindTool extends AMD64LIRKindTool { @Override public LIRKind getNarrowOopKind() { - return LIRKind.reference(AMD64Kind.DWORD); + return LIRKind.compressedReference(AMD64Kind.DWORD); } @Override diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java index 795119fe9ab..a82a1f62912 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotForeignCallsProvider.java @@ -34,6 +34,7 @@ import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.JUMP_ADDRES import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.RegisterEffect.PRESERVES_REGISTERS; import static org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage.Transition.LEAF_NOFP; import static org.graalvm.compiler.hotspot.replacements.CRC32Substitutions.UPDATE_BYTES_CRC32; +import static org.graalvm.compiler.hotspot.replacements.CRC32CSubstitutions.UPDATE_BYTES_CRC32C; import static org.graalvm.word.LocationIdentity.any; import org.graalvm.compiler.core.common.LIRKind; @@ -87,6 +88,9 @@ public class SPARCHotSpotForeignCallsProvider extends HotSpotHostForeignCallsPro // This stub does callee saving registerForeignCall(UPDATE_BYTES_CRC32, config.updateBytesCRC32Stub, NativeCall, PRESERVES_REGISTERS, LEAF_NOFP, NOT_REEXECUTABLE, any()); } + if (config.useCRC32CIntrinsics) { + registerForeignCall(UPDATE_BYTES_CRC32C, config.updateBytesCRC32C, NativeCall, PRESERVES_REGISTERS, LEAF_NOFP, NOT_REEXECUTABLE, any()); + } super.initialize(providers, options); } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java index 793935718a5..7665a7e95a0 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotLIRGenerator.java @@ -307,7 +307,7 @@ public class SPARCHotSpotLIRGenerator extends SPARCLIRGenerator implements HotSp assert inputKind.getPlatformKind() == XWORD : inputKind; if (inputKind.isReference(0)) { // oop - Variable result = newVariable(LIRKind.reference(WORD)); + Variable result = newVariable(LIRKind.compressedReference(WORD)); append(new SPARCHotSpotMove.CompressPointer(result, asAllocatable(pointer), getProviders().getRegisters().getHeapBaseRegister().asValue(), encoding, nonNull)); return result; } else { diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32CSubstitutionsTest.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32CSubstitutionsTest.java new file mode 100644 index 00000000000..7d333e52141 --- /dev/null +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CRC32CSubstitutionsTest.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2007, 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.graalvm.compiler.hotspot.test; + +import java.io.DataInputStream; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.util.zip.Checksum; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; + +import org.graalvm.compiler.test.GraalTest; +import org.graalvm.compiler.core.test.GraalCompilerTest; + +import org.junit.Test; + +import static org.junit.Assume.assumeFalse; + +/** + * Tests compiled calls to {@link java.util.zip.CRC32C}. + */ +@SuppressWarnings("javadoc") +public class CRC32CSubstitutionsTest extends GraalCompilerTest { + + public static long updateBytes(byte[] input, int offset, int end) throws Throwable { + Class crcClass = Class.forName("java.util.zip.CRC32C"); + MethodHandle newMH = MethodHandles.publicLookup().findConstructor(crcClass, MethodType.methodType(void.class)); + Checksum crc = (Checksum) newMH.invoke(); + crc.update(input, offset, end); + return crc.getValue(); + } + + @Test + public void test1() throws Throwable { + assumeFalse(GraalTest.Java8OrEarlier); + String classfileName = CRC32CSubstitutionsTest.class.getSimpleName().replace('.', '/') + ".class"; + InputStream s = CRC32CSubstitutionsTest.class.getResourceAsStream(classfileName); + byte[] buf = new byte[s.available()]; + new DataInputStream(s).readFully(buf); + int end = buf.length; + for (int offset = 0; offset < buf.length; offset++) { + test("updateBytes", buf, offset, end); + } + } + + public static long updateByteBuffer(ByteBuffer buffer) throws Throwable { + Class crcClass = Class.forName("java.util.zip.CRC32C"); + MethodHandle newMH = MethodHandles.publicLookup().findConstructor(crcClass, MethodType.methodType(void.class)); + MethodHandle updateMH = MethodHandles.publicLookup().findVirtual(crcClass, "update", MethodType.methodType(void.class, ByteBuffer.class)); + Checksum crc = (Checksum) newMH.invoke(); + buffer.rewind(); + updateMH.invokeExact(crc, buffer); // Checksum.update(ByteBuffer) is also available since 9 + return crc.getValue(); + } + + @Test + public void test2() throws Throwable { + assumeFalse(GraalTest.Java8OrEarlier); + String classfileName = CRC32CSubstitutionsTest.class.getSimpleName().replace('.', '/') + ".class"; + InputStream s = CRC32CSubstitutionsTest.class.getResourceAsStream(classfileName); + byte[] buf = new byte[s.available()]; + new DataInputStream(s).readFully(buf); + + ByteBuffer directBuf = ByteBuffer.allocateDirect(buf.length); + directBuf.put(buf); + ByteBuffer heapBuf = ByteBuffer.wrap(buf); + + test("updateByteBuffer", directBuf); + test("updateByteBuffer", heapBuf); + } + +} diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java index 8802c18dc3f..e076a01cf3f 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java @@ -466,6 +466,13 @@ public class CheckGraalIntrinsics extends GraalTest { } } + // CRC32C intrinsics + if (!config.useCRC32CIntrinsics) { + add(IGNORE, + "java/util/zip/CRC32C.updateBytes(I[BII)I", + "java/util/zip/CRC32C.updateDirectByteBuffer(IJII)I"); + } + // AES intrinsics if (!config.useAESIntrinsics) { if (isJDK9OrHigher()) { diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java index d0ad9c8c978..17aec82b3d5 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/JVMCIInfopointErrorTest.java @@ -33,9 +33,9 @@ import org.graalvm.compiler.code.CompilationResult; import org.graalvm.compiler.core.common.LIRKind; import org.graalvm.compiler.core.common.type.StampFactory; import org.graalvm.compiler.core.test.GraalCompilerTest; -import org.graalvm.compiler.debug.DebugHandlersFactory; import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.debug.DebugContext.Scope; +import org.graalvm.compiler.debug.DebugHandlersFactory; import org.graalvm.compiler.graph.NodeClass; import org.graalvm.compiler.hotspot.HotSpotCompiledCodeBuilder; import org.graalvm.compiler.lir.FullInfopointOp; @@ -150,7 +150,7 @@ public class JVMCIInfopointErrorTest extends GraalCompilerTest { codeCache.addCode(method, compiledCode, null, null); } - @Test(expected = JVMCIError.class) + @Test(expected = Error.class) public void testInvalidShortOop() { test((tool, state, safepoint) -> { PlatformKind kind = tool.target().arch.getPlatformKind(JavaKind.Short); @@ -163,14 +163,14 @@ public class JVMCIInfopointErrorTest extends GraalCompilerTest { }); } - @Test(expected = JVMCIError.class) + @Test(expected = Error.class) public void testInvalidShortDerivedOop() { test((tool, state, safepoint) -> { Variable baseOop = tool.newVariable(LIRKind.fromJavaKind(tool.target().arch, JavaKind.Object)); tool.append(new ValueDef(baseOop)); PlatformKind kind = tool.target().arch.getPlatformKind(JavaKind.Short); - LIRKind lirKind = LIRKind.derivedReference(kind, baseOop); + LIRKind lirKind = LIRKind.derivedReference(kind, baseOop, false); Variable var = tool.newVariable(lirKind); tool.append(new ValueDef(var)); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java index 97c0c281bc4..cad06750b47 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java @@ -165,6 +165,7 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess { public final boolean usePopCountInstruction = getFlag("UsePopCountInstruction", Boolean.class); public final boolean useAESIntrinsics = getFlag("UseAESIntrinsics", Boolean.class); public final boolean useCRC32Intrinsics = getFlag("UseCRC32Intrinsics", Boolean.class); + public final boolean useCRC32CIntrinsics = isJDK8 ? false : getFlag("UseCRC32CIntrinsics", Boolean.class); public final boolean threadLocalHandshakes = getFlag("ThreadLocalHandshakes", Boolean.class, false); private final boolean useMultiplyToLenIntrinsic = getFlag("UseMultiplyToLenIntrinsic", Boolean.class); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java index 968e81506ad..3b2c0b23c40 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotHostBackend.java @@ -45,6 +45,7 @@ import jdk.vm.ci.code.CallingConvention; import jdk.vm.ci.common.InitTimer; import jdk.vm.ci.hotspot.HotSpotCallingConventionType; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime; +import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.JavaType; import jdk.vm.ci.runtime.JVMCICompiler; @@ -142,7 +143,8 @@ public abstract class HotSpotHostBackend extends HotSpotBackend { @Override public ReferenceMapBuilder newReferenceMapBuilder(int totalFrameSize) { - return new HotSpotReferenceMapBuilder(totalFrameSize, config.maxOopMapStackOffset); + int uncompressedReferenceSize = getTarget().arch.getPlatformKind(JavaKind.Object).getSizeInBytes(); + return new HotSpotReferenceMapBuilder(totalFrameSize, config.maxOopMapStackOffset, uncompressedReferenceSize); } } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java index 97fc0fd01ed..364d12e9a1b 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReferenceMapBuilder.java @@ -22,15 +22,15 @@ */ package org.graalvm.compiler.hotspot; -import static org.graalvm.compiler.lir.LIRValueUtil.isJavaConstant; import static jdk.vm.ci.code.ValueUtil.asRegister; import static jdk.vm.ci.code.ValueUtil.asStackSlot; import static jdk.vm.ci.code.ValueUtil.isRegister; +import static org.graalvm.compiler.lir.LIRValueUtil.isJavaConstant; import java.util.ArrayList; -import org.graalvm.compiler.core.common.PermanentBailoutException; import org.graalvm.compiler.core.common.LIRKind; +import org.graalvm.compiler.core.common.PermanentBailoutException; import org.graalvm.compiler.debug.GraalError; import org.graalvm.compiler.lir.LIRFrameState; import org.graalvm.compiler.lir.Variable; @@ -52,8 +52,10 @@ public final class HotSpotReferenceMapBuilder extends ReferenceMapBuilder { private final int totalFrameSize; private final int maxOopMapStackOffset; + private final int uncompressedReferenceSize; - public HotSpotReferenceMapBuilder(int totalFrameSize, int maxOopMapStackOffset) { + public HotSpotReferenceMapBuilder(int totalFrameSize, int maxOopMapStackOffset, int uncompressedReferenceSize) { + this.uncompressedReferenceSize = uncompressedReferenceSize; this.objectValues = new ArrayList<>(); this.objectCount = 0; this.maxOopMapStackOffset = maxOopMapStackOffset; @@ -116,6 +118,7 @@ public final class HotSpotReferenceMapBuilder extends ReferenceMapBuilder { for (int i = 0; i < kind.getPlatformKind().getVectorLength(); i++) { if (kind.isReference(i)) { + assert kind.isCompressedReference(i) ? (bytes < uncompressedReferenceSize) : (bytes == uncompressedReferenceSize); objects[idx] = toLocation(obj, i * bytes); derivedBase[idx] = base; sizeInBytes[idx] = bytes; diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java index 84dcaad7b8f..2861fd7610f 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java @@ -46,6 +46,7 @@ import org.graalvm.compiler.hotspot.nodes.CurrentJavaThreadNode; import org.graalvm.compiler.hotspot.replacements.AESCryptSubstitutions; import org.graalvm.compiler.hotspot.replacements.BigIntegerSubstitutions; import org.graalvm.compiler.hotspot.replacements.CRC32Substitutions; +import org.graalvm.compiler.hotspot.replacements.CRC32CSubstitutions; import org.graalvm.compiler.hotspot.replacements.CallSiteTargetNode; import org.graalvm.compiler.hotspot.replacements.CipherBlockChainingSubstitutions; import org.graalvm.compiler.hotspot.replacements.ClassGetHubNode; @@ -165,6 +166,7 @@ public class HotSpotGraphBuilderPlugins { registerConstantPoolPlugins(invocationPlugins, wordTypes, config, replacementBytecodeProvider); registerAESPlugins(invocationPlugins, config, replacementBytecodeProvider); registerCRC32Plugins(invocationPlugins, config, replacementBytecodeProvider); + registerCRC32CPlugins(invocationPlugins, config, replacementBytecodeProvider); registerBigIntegerPlugins(invocationPlugins, config, replacementBytecodeProvider); registerSHAPlugins(invocationPlugins, config, replacementBytecodeProvider); registerUnsafePlugins(invocationPlugins, replacementBytecodeProvider); @@ -530,4 +532,12 @@ public class HotSpotGraphBuilderPlugins { } } } + + private static void registerCRC32CPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) { + if (config.useCRC32CIntrinsics) { + Registration r = new Registration(plugins, "java.util.zip.CRC32C", bytecodeProvider); + r.registerMethodSubstitution(CRC32CSubstitutions.class, "updateBytes", int.class, byte[].class, int.class, int.class); + r.registerMethodSubstitution(CRC32CSubstitutions.class, "updateDirectByteBuffer", int.class, long.class, int.class, int.class); + } + } } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32CSubstitutions.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32CSubstitutions.java new file mode 100644 index 00000000000..3c872a724c8 --- /dev/null +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/CRC32CSubstitutions.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2012, 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.graalvm.compiler.hotspot.replacements; + +import static org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.arrayBaseOffset; + +import org.graalvm.compiler.api.replacements.ClassSubstitution; +import org.graalvm.compiler.api.replacements.MethodSubstitution; +import org.graalvm.compiler.core.common.spi.ForeignCallDescriptor; +import org.graalvm.compiler.graph.Node.ConstantNodeParameter; +import org.graalvm.compiler.graph.Node.NodeIntrinsic; +import org.graalvm.compiler.hotspot.nodes.ComputeObjectAddressNode; +import org.graalvm.compiler.nodes.extended.ForeignCallNode; +import org.graalvm.compiler.word.Word; +import org.graalvm.word.WordBase; +import org.graalvm.word.WordFactory; + +import jdk.vm.ci.meta.JavaKind; + +// JaCoCo Exclude + +/** + * Substitutions for java.util.zip.CRC32C. + */ +@ClassSubstitution(className = "java.util.zip.CRC32C", optional = true) +public class CRC32CSubstitutions { + + @MethodSubstitution + static int updateBytes(int crc, byte[] b, int off, int end) { + Word bufAddr = WordFactory.unsigned(ComputeObjectAddressNode.get(b, arrayBaseOffset(JavaKind.Byte) + off)); + return updateBytesCRC32(UPDATE_BYTES_CRC32C, crc, bufAddr, end - off); + } + + @MethodSubstitution + static int updateDirectByteBuffer(int crc, long addr, int off, int end) { + WordBase bufAddr = WordFactory.unsigned(addr).add(off); + return updateBytesCRC32(UPDATE_BYTES_CRC32C, crc, bufAddr, end - off); + } + + public static final ForeignCallDescriptor UPDATE_BYTES_CRC32C = new ForeignCallDescriptor("updateBytesCRC32C", int.class, int.class, WordBase.class, int.class); + + @NodeIntrinsic(ForeignCallNode.class) + public static native int updateBytesCRC32(@ConstantNodeParameter ForeignCallDescriptor descriptor, int crc, WordBase buf, int length); +} diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv_overflow.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv_overflow.java new file mode 100644 index 00000000000..17b8ad6daee --- /dev/null +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_idiv_overflow.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.graalvm.compiler.jtt.bytecode; + +import org.junit.Test; + +import org.graalvm.compiler.jtt.JTTTest; + +/* + */ +public class BC_idiv_overflow extends JTTTest { + + public static int test(int a, int b) { + return a / (b | 1); + } + + @Test + public void run0() throws Throwable { + runTest("test", Integer.MIN_VALUE, -1); + } + + @Test + public void run1() throws Throwable { + runTest("test", Integer.MIN_VALUE, 1); + } + +} diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv_overflow.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv_overflow.java new file mode 100644 index 00000000000..fa87695711a --- /dev/null +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/bytecode/BC_ldiv_overflow.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.graalvm.compiler.jtt.bytecode; + +import org.junit.Test; + +import org.graalvm.compiler.jtt.JTTTest; + +/* + */ +public class BC_ldiv_overflow extends JTTTest { + + public static long test(long a, long b) { + return a / (b | 1); + } + + @Test + public void run0() throws Throwable { + runTest("test", Long.MIN_VALUE, -1L); + } + + @Test + public void run1() throws Throwable { + runTest("test", Long.MIN_VALUE, 1L); + } + +} diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java index ff7428f7799..3b65fc3ad7c 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java @@ -30,8 +30,6 @@ import java.util.Arrays; import java.util.Iterator; import java.util.List; -import jdk.vm.ci.meta.MetaAccessProvider; -import jdk.vm.ci.meta.ResolvedJavaType; import org.graalvm.compiler.core.common.calc.Condition; import org.graalvm.compiler.core.common.type.IntegerStamp; import org.graalvm.compiler.core.common.type.Stamp; @@ -67,7 +65,9 @@ import org.graalvm.util.Equivalence; import jdk.vm.ci.meta.Constant; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.JavaKind; +import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.PrimitiveConstant; +import jdk.vm.ci.meta.ResolvedJavaType; /** * The {@code IfNode} represents a branch that can go one of two directions depending on the outcome @@ -416,6 +416,7 @@ public final class IfNode extends ControlSplitNode implements Simplifiable, LIRL if (result.graph() == null) { result = graph().addOrUniqueWithInputs(result); } + result = proxyReplacement(result); /* * This optimization can be performed even if multiple values merge at this phi * since the two inputs get simplified into one. @@ -698,6 +699,7 @@ public final class IfNode extends ControlSplitNode implements Simplifiable, LIRL ValueNode falseValue = singlePhi.valueAt(falseEnd); ValueNode conditional = canonicalizeConditionalCascade(tool, trueValue, falseValue); if (conditional != null) { + conditional = proxyReplacement(conditional); singlePhi.setValueAt(trueEnd, conditional); removeThroughFalseBranch(tool, merge); return true; @@ -729,6 +731,36 @@ public final class IfNode extends ControlSplitNode implements Simplifiable, LIRL return false; } + private ValueNode proxyReplacement(ValueNode replacement) { + /* + * Special case: Every empty diamond we collapse to a conditional node can potentially + * contain loop exit nodes on both branches. See the graph below: The two loop exits + * (instanceof begin node) exit the same loop. The resulting phi is defined outside the + * loop, but the resulting conditional node will be inside the loop, so we need to proxy the + * resulting conditional node. Callers of this method ensure that true and false successor + * have no usages, therefore a and b in the graph below can never be proxies themselves. + */ + // @formatter:off + // +--+ + // |If| + // +--+ +-----+ +-----+ + // +----+ +----+ | a | | b | + // |Lex | |Lex | +----^+ +^----+ + // +----+ +----+ | | + // +-------+ +---+ + // | Merge +---------+Phi| + // +-------+ +---+ + // @formatter:on + if (this.graph().hasValueProxies()) { + if (trueSuccessor instanceof LoopExitNode && falseSuccessor instanceof LoopExitNode) { + assert ((LoopExitNode) trueSuccessor).loopBegin() == ((LoopExitNode) falseSuccessor).loopBegin(); + assert trueSuccessor.usages().isEmpty() && falseSuccessor.usages().isEmpty(); + return this.graph().addOrUnique(new ValueProxyNode(replacement, (LoopExitNode) trueSuccessor)); + } + } + return replacement; + } + protected void removeThroughFalseBranch(SimplifierTool tool, AbstractMergeNode merge) { AbstractBeginNode trueBegin = trueSuccessor(); LogicNode conditionNode = condition(); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java index 7a25afd4025..d494c49dde9 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/IntegerDivRemNode.java @@ -60,7 +60,8 @@ public abstract class IntegerDivRemNode extends FixedBinaryNode implements Lower // Assigning canDeopt during constructor, because it must never change during lifetime of // the node. - this.canDeopt = ((IntegerStamp) getY().stamp(NodeView.DEFAULT)).contains(0); + IntegerStamp yStamp = (IntegerStamp) getY().stamp(NodeView.DEFAULT); + this.canDeopt = yStamp.contains(0) || yStamp.contains(-1); } public final Op getOp() { diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java index 1f632ea2faf..e57ee577539 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ProfileCompiledMethodsPhase.java @@ -121,7 +121,7 @@ public class ProfileCompiledMethodsPhase extends Phase { private static void addSectionCounters(FixedWithNextNode start, Collection sectionBlocks, Collection> childLoops, ScheduleResult schedule, ControlFlowGraph cfg) { HashSet blocks = new HashSet<>(sectionBlocks); - for (Loop loop : childLoops) { + for (Loop loop : childLoops) { blocks.removeAll(loop.getBlocks()); } double weight = getSectionWeight(schedule, blocks) / cfg.blockFor(start).probability(); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java index 979dd3e85ee..7cb7b9dc0ec 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.printer/src/org/graalvm/compiler/printer/GraphPrinter.java @@ -194,15 +194,26 @@ interface GraphPrinter extends Closeable, JavaConstantFormatter { static String constantToString(Object value) { Class c = value.getClass(); + String suffix = ""; if (c.isArray()) { return constantArrayToString(value); } else if (value instanceof Enum) { return ((Enum) value).name(); } else if (isToStringTrusted(c)) { - return value.toString(); + try { + return value.toString(); + } catch (Throwable t) { + suffix = "[toString error: " + t.getClass().getName() + "]"; + if (isToStringTrusted(t.getClass())) { + try { + suffix = "[toString error: " + t + "]"; + } catch (Throwable t2) { + // No point in going further + } + } + } } - return MetaUtil.getSimpleName(c, true) + "@" + Integer.toHexString(System.identityHashCode(value)); - + return MetaUtil.getSimpleName(c, true) + "@" + Integer.toHexString(System.identityHashCode(value)) + suffix; } static String constantArrayToString(Object array) { diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java index ba074f3a9c4..55708c96e59 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java @@ -141,6 +141,7 @@ public class StandardGraphBuilderPlugins { registerJMHBlackholePlugins(plugins, bytecodeProvider); registerJFRThrowablePlugins(plugins, bytecodeProvider); registerMethodHandleImplPlugins(plugins, snippetReflection, bytecodeProvider); + registerJcovCollectPlugins(plugins, bytecodeProvider); } private static final Field STRING_VALUE_FIELD; @@ -910,4 +911,21 @@ public class StandardGraphBuilderPlugins { } }); } + + /** + * Registers a plugin to ignore {@code com.sun.tdk.jcov.runtime.Collect.hit} within an + * intrinsic. + */ + private static void registerJcovCollectPlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) { + Registration r = new Registration(plugins, "com.sun.tdk.jcov.runtime.Collect", bytecodeProvider); + r.register1("hit", int.class, new InvocationPlugin() { + @Override + public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode object) { + if (b.parsingIntrinsic()) { + return true; + } + return false; + } + }); + } } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java index c983a1b466c..bdc74fb15dc 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -46,8 +46,8 @@ public class Classfile { private final ResolvedJavaType type; private final List codeAttributes; - private static final int MAJOR_VERSION_JAVA_MIN = 51; - private static final int MAJOR_VERSION_JAVA_MAX = 54; + private static final int MAJOR_VERSION_JAVA7 = 51; + private static final int MAJOR_VERSION_JAVA10 = 54; private static final int MAGIC = 0xCAFEBABE; /** @@ -65,7 +65,7 @@ public class Classfile { int minor = stream.readUnsignedShort(); int major = stream.readUnsignedShort(); - if (major < MAJOR_VERSION_JAVA_MIN || major > MAJOR_VERSION_JAVA_MAX) { + if (major < MAJOR_VERSION_JAVA7 || major > MAJOR_VERSION_JAVA10) { throw new UnsupportedClassVersionError("Unsupported class file version: " + major + "." + minor); } diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java index 9dae16eef14..30b94e9f0eb 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/GraphEffectList.java @@ -34,7 +34,6 @@ import org.graalvm.compiler.nodes.IfNode; import org.graalvm.compiler.nodes.NodeView; import org.graalvm.compiler.nodes.PhiNode; import org.graalvm.compiler.nodes.PiNode; -import org.graalvm.compiler.nodes.ProxyNode; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.ValueNode; import org.graalvm.compiler.nodes.debug.DynamicCounterNode; @@ -116,14 +115,7 @@ public final class GraphEffectList extends EffectList { */ public void addFloatingNode(ValueNode node, @SuppressWarnings("unused") String cause) { add("add floating node", graph -> { - if (node instanceof ProxyNode) { - ProxyNode proxyNode = (ProxyNode) node; - ValueNode value = proxyNode.value(); - if (!value.isAlive()) { - graph.addWithoutUnique(value); - } - } - graph.addWithoutUnique(node); + graph.addWithoutUniqueWithInputs(node); }); } From bfe4e0e4a2996daccad275bb5554fd9486c8e0ed Mon Sep 17 00:00:00 2001 From: Dean Long Date: Wed, 13 Dec 2017 20:35:09 -0800 Subject: [PATCH 16/88] 8193323: Crash in "failed dependencies, but counter didn't change" with enabled UseJVMCICompiler Reviewed-by: kvn --- src/hotspot/share/compiler/compileBroker.cpp | 24 ++++++++++++------- src/hotspot/share/jvmci/jvmciCompilerToVM.cpp | 4 ++++ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp index a1354fe08f4..b62ccd936bb 100644 --- a/src/hotspot/share/compiler/compileBroker.cpp +++ b/src/hotspot/share/compiler/compileBroker.cpp @@ -1852,17 +1852,23 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) { TraceTime t1("compilation", &time); EventCompilation event; - JVMCIEnv env(task, system_dictionary_modification_counter); - methodHandle method(thread, target_handle); - jvmci->compile_method(method, osr_bci, &env); + // Skip redefined methods + if (target_handle->is_old()) { + failure_reason = "redefined method"; + retry_message = "not retryable"; + compilable = ciEnv::MethodCompilable_never; + } else { + JVMCIEnv env(task, system_dictionary_modification_counter); + methodHandle method(thread, target_handle); + jvmci->compile_method(method, osr_bci, &env); - post_compile(thread, task, event, task->code() != NULL, NULL); - - failure_reason = env.failure_reason(); - if (!env.retryable()) { - retry_message = "not retryable"; - compilable = ciEnv::MethodCompilable_not_at_tier; + failure_reason = env.failure_reason(); + if (!env.retryable()) { + retry_message = "not retryable"; + compilable = ciEnv::MethodCompilable_not_at_tier; + } } + post_compile(thread, task, event, task->code() != NULL, NULL); } else #endif // INCLUDE_JVMCI diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp index c0509df788b..fb89dba68f4 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp @@ -761,6 +761,10 @@ C2V_END C2V_VMENTRY(jboolean, isCompilable,(JNIEnv *, jobject, jobject jvmci_method)) methodHandle method = CompilerToVM::asMethod(jvmci_method); + // Skip redefined methods + if (method->is_old()) { + return false; + } return !method->is_not_compilable(CompLevel_full_optimization); C2V_END From 64a1914e1cc3e5a5c5b1601cd7630ac4be7132e2 Mon Sep 17 00:00:00 2001 From: Jini George Date: Thu, 14 Dec 2017 12:49:47 +0530 Subject: [PATCH 17/88] 8192985: SA: Test cases for the clhsdb 'inspect', 'scanoops' and 'printas' commands Create tests for the clhsdb commands: inspect, scanoops and printas Reviewed-by: sspitsyn, sballal, cjplummer --- .../serviceability/sa/ClhsdbInspect.java | 98 ++++++++++++++ .../serviceability/sa/ClhsdbPrintAs.java | 127 ++++++++++++++++++ .../serviceability/sa/ClhsdbScanOops.java | 116 ++++++++++++++++ 3 files changed, 341 insertions(+) create mode 100644 test/hotspot/jtreg/serviceability/sa/ClhsdbInspect.java create mode 100644 test/hotspot/jtreg/serviceability/sa/ClhsdbPrintAs.java create mode 100644 test/hotspot/jtreg/serviceability/sa/ClhsdbScanOops.java diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbInspect.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbInspect.java new file mode 100644 index 00000000000..8697b21860d --- /dev/null +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbInspect.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; +import jdk.test.lib.apps.LingeredApp; + +/* + * @test + * @bug 8192985 + * @summary Test the clhsdb 'inspect' command + * @library /test/lib + * @run main/othervm ClhsdbInspect + */ + +public class ClhsdbInspect { + + public static void main(String[] args) throws Exception { + System.out.println("Starting the ClhsdbInspect test"); + + LingeredAppWithLock theApp = null; + try { + ClhsdbLauncher test = new ClhsdbLauncher(); + + theApp = new LingeredAppWithLock(); + LingeredApp.startApp(null, theApp); + System.out.println("Started LingeredApp with pid " + theApp.getPid()); + + // Run the 'jstack -v' command to get the address of a Method* + // and the oop address of a java.lang.ref.ReferenceQueue$Lock + // object + List cmds = List.of("jstack -v"); + + String jstackOutput = test.run(theApp.getPid(), cmds, null, null); + + if (jstackOutput == null) { + // Output could be null due to attach permission issues + // and if we are skipping this. + LingeredApp.stopApp(theApp); + return; + } + + String addressString = null; + Map tokensMap = new HashMap<>(); + tokensMap.put("waiting to lock", + "instance of Oop for java/lang/Class"); + tokensMap.put("Method\\*=", "Type is Method"); + tokensMap.put("waiting to re-lock in wait", + "instance of Oop for java/lang/ref/ReferenceQueue$Lock"); + + for (String key: tokensMap.keySet()) { + cmds = new ArrayList(); + Map> expStrMap = new HashMap<>(); + + String[] snippets = jstackOutput.split(key); + String[] tokens = snippets[1].split(" "); + for (String token: tokens) { + if (token.contains("0x")) { + addressString = token.replace("<", "").replace(">", ""); + break; + } + } + + String cmd = "inspect " + addressString; + cmds.add(cmd); + expStrMap.put(cmd, List.of(tokensMap.get(key))); + test.run(theApp.getPid(), cmds, expStrMap, null); + } + } catch (Exception ex) { + throw new RuntimeException("Test ERROR " + ex, ex); + } finally { + LingeredApp.stopApp(theApp); + } + System.out.println("Test PASSED"); + } +} diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbPrintAs.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbPrintAs.java new file mode 100644 index 00000000000..525c57c781c --- /dev/null +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbPrintAs.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; +import jdk.test.lib.apps.LingeredApp; + +/* + * @test + * @bug 8192985 + * @summary Test the clhsdb 'printas' command + * @library /test/lib + * @run main/othervm ClhsdbPrintAs + */ + +public class ClhsdbPrintAs { + + public static void main(String[] args) throws Exception { + System.out.println("Starting the ClhsdbPrintAs test"); + + LingeredApp theApp = null; + try { + ClhsdbLauncher test = new ClhsdbLauncher(); + theApp = LingeredApp.startApp(); + System.out.println("Started LingeredApp with pid " + theApp.getPid()); + + // Run the 'jstack -v' command to get the address of a the Method* + // representing LingeredApp.main + List cmds = List.of("jstack -v"); + Map> expStrMap; + + String jstackOutput = test.run(theApp.getPid(), cmds, null, null); + + if (jstackOutput == null) { + // Output could be null due to attach permission issues + // and if we are skipping this. + LingeredApp.stopApp(theApp); + return; + } + + String[] snippets = jstackOutput.split("LingeredApp.main"); + String addressString = null; + + String[] tokens = snippets[1].split("Method\\*="); + String[] words = tokens[1].split(" "); + addressString = words[0]; + + cmds = new ArrayList(); + expStrMap = new HashMap<>(); + + String cmd = "printas Method " + addressString; + cmds.add(cmd); + expStrMap.put(cmd, List.of + ("ConstMethod", "MethodCounters", "Method::_access_flags")); + + // Run the printas Method command to obtain the address + // of ConstMethod* + String methodDetailsOutput = test.run(theApp.getPid(), cmds, expStrMap, null); + snippets = methodDetailsOutput.split("ConstMethod*"); + + tokens = snippets[1].split(" "); + for (String token : tokens) { + if (token.contains("0x")) { + addressString = token.replace("\n", ""); + break; + } + } + + cmds = new ArrayList(); + expStrMap = new HashMap<>(); + + cmd = "printas ConstMethod " + addressString; + cmds.add(cmd); + expStrMap.put(cmd, List.of + ("ConstantPool", "_max_locals", "_flags")); + + // Run the printas constMethod command to obtain the address + // of ConstantPool* + String constMethodDetailsOutput = test.run(theApp.getPid(), cmds, expStrMap, null); + snippets = constMethodDetailsOutput.split("ConstantPool*"); + + tokens = snippets[1].split(" "); + for (String token : tokens) { + if (token.contains("0x")) { + addressString = token.replace("\n", ""); + break; + } + } + + cmds = new ArrayList(); + expStrMap = new HashMap<>(); + + cmd = "printas ConstantPool " + addressString; + cmds.add(cmd); + expStrMap.put(cmd, List.of + ("ConstantPoolCache", "_pool_holder", "InstanceKlass*")); + test.run(theApp.getPid(), cmds, expStrMap, null); + } catch (Exception ex) { + throw new RuntimeException("Test ERROR " + ex, ex); + } finally { + LingeredApp.stopApp(theApp); + } + System.out.println("Test PASSED"); + } +} diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbScanOops.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbScanOops.java new file mode 100644 index 00000000000..3eba0e7217a --- /dev/null +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbScanOops.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; +import jdk.test.lib.Utils; +import jdk.test.lib.apps.LingeredApp; + +/* + * @test + * @bug 8192985 + * @summary Test the clhsdb 'scanoops' command + * @library /test/lib + * @run main/othervm/timeout=1200 ClhsdbScanOops + */ + +public class ClhsdbScanOops { + + private static void testWithGcType(String gc) throws Exception { + + LingeredApp theApp = null; + + try { + ClhsdbLauncher test = new ClhsdbLauncher(); + List vmArgs = new ArrayList(); + vmArgs.add(gc); + theApp = LingeredApp.startApp(vmArgs); + + System.out.println ("Started LingeredApp with the GC option " + gc + + " and pid " + theApp.getPid()); + + // Run the 'universe' command to get the address ranges + List cmds = List.of("universe"); + + String universeOutput = test.run(theApp.getPid(), cmds, null, null); + + if (universeOutput == null) { + // Output could be null due to attach permission issues + // and if we are skipping this. + LingeredApp.stopApp(theApp); + return; + } + + cmds = new ArrayList(); + Map> expStrMap = new HashMap<>(); + Map> unExpStrMap = new HashMap<>(); + + String startAddress = null; + String endAddress = null; + String[] snippets = null; + + if (gc.contains("UseParallelGC")) { + snippets = universeOutput.split("eden = "); + } else { + snippets = universeOutput.split("eden \\["); + } + String[] words = snippets[1].split(","); + // Get the addresses from Eden + startAddress = words[0].replace("[", ""); + endAddress = words[1]; + String cmd = "scanoops " + startAddress + " " + endAddress; + cmds.add(cmd); + + expStrMap.put(cmd, List.of + ("java/lang/Object", "java/lang/Class", "java/lang/Thread", + "java/lang/String", "[B", "[I")); + + // Test the 'type' option also + // scanoops java/lang/String + // Ensure that only the java/lang/String oops are printed. + cmd = cmd + " java/lang/String"; + cmds.add(cmd); + expStrMap.put(cmd, List.of("java/lang/String")); + unExpStrMap.put(cmd, List.of("java/lang/Thread")); + + test.run(theApp.getPid(), cmds, expStrMap, unExpStrMap); + } catch (Exception ex) { + throw new RuntimeException("Test ERROR " + ex, ex); + } finally { + LingeredApp.stopApp(theApp); + } + } + + public static void main(String[] args) throws Exception { + System.out.println("Starting the ClhsdbScanOops test"); + try { + testWithGcType("-XX:+UseParallelGC"); + testWithGcType("-XX:+UseSerialGC"); + } catch (Exception e) { + throw new Error("Test failed with " + e); + } + System.out.println("Test PASSED"); + } +} From 3c55f378ca76902c3ea057296e5758ba8f2206c3 Mon Sep 17 00:00:00 2001 From: Leo Korinth Date: Wed, 6 Dec 2017 11:11:16 +0100 Subject: [PATCH 18/88] 8133805: Remove the bot_updates parameter from G1Allocator's allocation methods Reviewed-by: tschatzl, sjohanss --- src/hotspot/share/gc/g1/g1AllocRegion.cpp | 22 ++++----- src/hotspot/share/gc/g1/g1AllocRegion.hpp | 47 +++++++------------ .../share/gc/g1/g1AllocRegion.inline.hpp | 40 +++++++--------- src/hotspot/share/gc/g1/g1Allocator.cpp | 12 ++--- .../share/gc/g1/g1Allocator.inline.hpp | 6 +-- 5 files changed, 50 insertions(+), 77 deletions(-) diff --git a/src/hotspot/share/gc/g1/g1AllocRegion.cpp b/src/hotspot/share/gc/g1/g1AllocRegion.cpp index 3f70a68c4fb..12e93ff0918 100644 --- a/src/hotspot/share/gc/g1/g1AllocRegion.cpp +++ b/src/hotspot/share/gc/g1/g1AllocRegion.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, 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 @@ -42,17 +42,17 @@ void G1AllocRegion::setup(G1CollectedHeap* g1h, HeapRegion* dummy_region) { // Make sure that any allocation attempt on this region will fail // and will not trigger any asserts. - assert(allocate(dummy_region, 1, false) == NULL, "should fail"); - assert(par_allocate(dummy_region, 1, false) == NULL, "should fail"); - assert(allocate(dummy_region, 1, true) == NULL, "should fail"); - assert(par_allocate(dummy_region, 1, true) == NULL, "should fail"); + assert(dummy_region->allocate_no_bot_updates(1) == NULL, "should fail"); + assert(dummy_region->allocate(1) == NULL, "should fail"); + DEBUG_ONLY(size_t assert_tmp); + assert(dummy_region->par_allocate_no_bot_updates(1, 1, &assert_tmp) == NULL, "should fail"); + assert(dummy_region->par_allocate(1, 1, &assert_tmp) == NULL, "should fail"); _g1h = g1h; _dummy_region = dummy_region; } -size_t G1AllocRegion::fill_up_remaining_space(HeapRegion* alloc_region, - bool bot_updates) { +size_t G1AllocRegion::fill_up_remaining_space(HeapRegion* alloc_region) { assert(alloc_region != NULL && alloc_region != _dummy_region, "pre-condition"); size_t result = 0; @@ -74,7 +74,7 @@ size_t G1AllocRegion::fill_up_remaining_space(HeapRegion* alloc_region, size_t min_word_size_to_fill = CollectedHeap::min_fill_size(); while (free_word_size >= min_word_size_to_fill) { - HeapWord* dummy = par_allocate(alloc_region, free_word_size, bot_updates); + HeapWord* dummy = par_allocate(alloc_region, free_word_size); if (dummy != NULL) { // If the allocation was successful we should fill in the space. CollectedHeap::fill_with_object(dummy, free_word_size); @@ -110,7 +110,7 @@ size_t G1AllocRegion::retire(bool fill_up) { "the alloc region should never be empty"); if (fill_up) { - result = fill_up_remaining_space(alloc_region, _bot_updates); + result = fill_up_remaining_space(alloc_region); } assert_alloc_region(alloc_region->used() >= _used_bytes_before, "invariant"); @@ -135,7 +135,7 @@ HeapWord* G1AllocRegion::new_alloc_region_and_allocate(size_t word_size, new_alloc_region->reset_pre_dummy_top(); // Need to do this before the allocation _used_bytes_before = new_alloc_region->used(); - HeapWord* result = allocate(new_alloc_region, word_size, _bot_updates); + HeapWord* result = allocate(new_alloc_region, word_size); assert_alloc_region(result != NULL, "the allocation should succeeded"); OrderAccess::storestore(); @@ -301,7 +301,7 @@ HeapRegion* OldGCAllocRegion::release() { // possible object. In this case this region will not be retained, so the // original problem cannot occur. if (to_allocate_words >= G1CollectedHeap::min_fill_size()) { - HeapWord* dummy = attempt_allocation(to_allocate_words, true /* bot_updates */); + HeapWord* dummy = attempt_allocation(to_allocate_words); CollectedHeap::fill_with_object(dummy, to_allocate_words); } } diff --git a/src/hotspot/share/gc/g1/g1AllocRegion.hpp b/src/hotspot/share/gc/g1/g1AllocRegion.hpp index afcb2a340c8..81aec1b197b 100644 --- a/src/hotspot/share/gc/g1/g1AllocRegion.hpp +++ b/src/hotspot/share/gc/g1/g1AllocRegion.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, 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 @@ -83,37 +83,27 @@ private: // whether the _alloc_region is NULL or not. static HeapRegion* _dummy_region; - // Some of the methods below take a bot_updates parameter. Its value - // should be the same as the _bot_updates field. The idea is that - // the parameter will be a constant for a particular alloc region - // and, given that these methods will be hopefully inlined, the - // compiler should compile out the test. - // Perform a non-MT-safe allocation out of the given region. - static inline HeapWord* allocate(HeapRegion* alloc_region, - size_t word_size, - bool bot_updates); + inline HeapWord* allocate(HeapRegion* alloc_region, + size_t word_size); // Perform a MT-safe allocation out of the given region. - static inline HeapWord* par_allocate(HeapRegion* alloc_region, - size_t word_size, - bool bot_updates); + inline HeapWord* par_allocate(HeapRegion* alloc_region, + size_t word_size); // Perform a MT-safe allocation out of the given region, with the given // minimum and desired size. Returns the actual size allocated (between // minimum and desired size) in actual_word_size if the allocation has been // successful. - static inline HeapWord* par_allocate(HeapRegion* alloc_region, - size_t min_word_size, - size_t desired_word_size, - size_t* actual_word_size, - bool bot_updates); + inline HeapWord* par_allocate(HeapRegion* alloc_region, + size_t min_word_size, + size_t desired_word_size, + size_t* actual_word_size); // Ensure that the region passed as a parameter has been filled up // so that noone else can allocate out of it any more. // Returns the number of bytes that have been wasted by filled up // the space. - static size_t fill_up_remaining_space(HeapRegion* alloc_region, - bool bot_updates); + size_t fill_up_remaining_space(HeapRegion* alloc_region); // After a region is allocated by alloc_new_region, this // method is used to set it as the active alloc_region @@ -160,8 +150,7 @@ public: // First-level allocation: Should be called without holding a // lock. It will try to allocate lock-free out of the active region, // or return NULL if it was unable to. - inline HeapWord* attempt_allocation(size_t word_size, - bool bot_updates); + inline HeapWord* attempt_allocation(size_t word_size); // Perform an allocation out of the current allocation region, with the given // minimum and desired size. Returns the actual size allocated (between // minimum and desired size) in actual_word_size if the allocation has been @@ -170,8 +159,7 @@ public: // out of the active region, or return NULL if it was unable to. inline HeapWord* attempt_allocation(size_t min_word_size, size_t desired_word_size, - size_t* actual_word_size, - bool bot_updates); + size_t* actual_word_size); // Second-level allocation: Should be called while holding a // lock. It will try to first allocate lock-free out of the active @@ -179,23 +167,20 @@ public: // alloc region with a new one. We require that the caller takes the // appropriate lock before calling this so that it is easier to make // it conform to its locking protocol. - inline HeapWord* attempt_allocation_locked(size_t word_size, - bool bot_updates); + inline HeapWord* attempt_allocation_locked(size_t word_size); // Same as attempt_allocation_locked(size_t, bool), but allowing specification // of minimum word size of the block in min_word_size, and the maximum word // size of the allocation in desired_word_size. The actual size of the block is // returned in actual_word_size. inline HeapWord* attempt_allocation_locked(size_t min_word_size, size_t desired_word_size, - size_t* actual_word_size, - bool bot_updates); + size_t* actual_word_size); // Should be called to allocate a new region even if the max of this // type of regions has been reached. Should only be called if other // allocation attempts have failed and we are not holding a valid // active region. - inline HeapWord* attempt_allocation_force(size_t word_size, - bool bot_updates); + inline HeapWord* attempt_allocation_force(size_t word_size); // Should be called before we start using this object. void init(); @@ -236,7 +221,7 @@ protected: virtual void retire_region(HeapRegion* alloc_region, size_t allocated_bytes); virtual size_t retire(bool fill_up); -public: + G1GCAllocRegion(const char* name, bool bot_updates, G1EvacStats* stats, InCSetState::in_cset_state_t purpose) : G1AllocRegion(name, bot_updates), _stats(stats), _purpose(purpose) { assert(stats != NULL, "Must pass non-NULL PLAB statistics"); diff --git a/src/hotspot/share/gc/g1/g1AllocRegion.inline.hpp b/src/hotspot/share/gc/g1/g1AllocRegion.inline.hpp index c9a4d4058e5..1c08b8e2896 100644 --- a/src/hotspot/share/gc/g1/g1AllocRegion.inline.hpp +++ b/src/hotspot/share/gc/g1/g1AllocRegion.inline.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2017, 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 @@ -37,52 +37,47 @@ inline HeapWord* G1AllocRegion::allocate(HeapRegion* alloc_region, - size_t word_size, - bool bot_updates) { + size_t word_size) { assert(alloc_region != NULL, "pre-condition"); - if (!bot_updates) { + if (!_bot_updates) { return alloc_region->allocate_no_bot_updates(word_size); } else { return alloc_region->allocate(word_size); } } -inline HeapWord* G1AllocRegion::par_allocate(HeapRegion* alloc_region, size_t word_size, bool bot_updates) { +inline HeapWord* G1AllocRegion::par_allocate(HeapRegion* alloc_region, size_t word_size) { size_t temp; - return par_allocate(alloc_region, word_size, word_size, &temp, bot_updates); + return par_allocate(alloc_region, word_size, word_size, &temp); } inline HeapWord* G1AllocRegion::par_allocate(HeapRegion* alloc_region, size_t min_word_size, size_t desired_word_size, - size_t* actual_word_size, - bool bot_updates) { + size_t* actual_word_size) { assert(alloc_region != NULL, "pre-condition"); assert(!alloc_region->is_empty(), "pre-condition"); - if (!bot_updates) { + if (!_bot_updates) { return alloc_region->par_allocate_no_bot_updates(min_word_size, desired_word_size, actual_word_size); } else { return alloc_region->par_allocate(min_word_size, desired_word_size, actual_word_size); } } -inline HeapWord* G1AllocRegion::attempt_allocation(size_t word_size, bool bot_updates) { +inline HeapWord* G1AllocRegion::attempt_allocation(size_t word_size) { size_t temp; - return attempt_allocation(word_size, word_size, &temp, bot_updates); + return attempt_allocation(word_size, word_size, &temp); } inline HeapWord* G1AllocRegion::attempt_allocation(size_t min_word_size, size_t desired_word_size, - size_t* actual_word_size, - bool bot_updates) { - assert_alloc_region(bot_updates == _bot_updates, "pre-condition"); - + size_t* actual_word_size) { HeapRegion* alloc_region = _alloc_region; assert_alloc_region(alloc_region != NULL, "not initialized properly"); - HeapWord* result = par_allocate(alloc_region, min_word_size, desired_word_size, actual_word_size, bot_updates); + HeapWord* result = par_allocate(alloc_region, min_word_size, desired_word_size, actual_word_size); if (result != NULL) { trace("alloc", min_word_size, desired_word_size, *actual_word_size, result); return result; @@ -91,19 +86,18 @@ inline HeapWord* G1AllocRegion::attempt_allocation(size_t min_word_size, return NULL; } -inline HeapWord* G1AllocRegion::attempt_allocation_locked(size_t word_size, bool bot_updates) { +inline HeapWord* G1AllocRegion::attempt_allocation_locked(size_t word_size) { size_t temp; - return attempt_allocation_locked(word_size, word_size, &temp, bot_updates); + return attempt_allocation_locked(word_size, word_size, &temp); } inline HeapWord* G1AllocRegion::attempt_allocation_locked(size_t min_word_size, size_t desired_word_size, - size_t* actual_word_size, - bool bot_updates) { + size_t* actual_word_size) { // First we have to redo the allocation, assuming we're holding the // appropriate lock, in case another thread changed the region while // we were waiting to get the lock. - HeapWord* result = attempt_allocation(min_word_size, desired_word_size, actual_word_size, bot_updates); + HeapWord* result = attempt_allocation(min_word_size, desired_word_size, actual_word_size); if (result != NULL) { return result; } @@ -119,9 +113,7 @@ inline HeapWord* G1AllocRegion::attempt_allocation_locked(size_t min_word_size, return NULL; } -inline HeapWord* G1AllocRegion::attempt_allocation_force(size_t word_size, - bool bot_updates) { - assert_alloc_region(bot_updates == _bot_updates, "pre-condition"); +inline HeapWord* G1AllocRegion::attempt_allocation_force(size_t word_size) { assert_alloc_region(_alloc_region != NULL, "not initialized properly"); trace("forcing alloc", word_size, word_size); diff --git a/src/hotspot/share/gc/g1/g1Allocator.cpp b/src/hotspot/share/gc/g1/g1Allocator.cpp index b486ad356bc..2e46425f3f8 100644 --- a/src/hotspot/share/gc/g1/g1Allocator.cpp +++ b/src/hotspot/share/gc/g1/g1Allocator.cpp @@ -190,14 +190,12 @@ HeapWord* G1Allocator::survivor_attempt_allocation(size_t min_word_size, HeapWord* result = survivor_gc_alloc_region(context)->attempt_allocation(min_word_size, desired_word_size, - actual_word_size, - false /* bot_updates */); + actual_word_size); if (result == NULL && !survivor_is_full(context)) { MutexLockerEx x(FreeList_lock, Mutex::_no_safepoint_check_flag); result = survivor_gc_alloc_region(context)->attempt_allocation_locked(min_word_size, desired_word_size, - actual_word_size, - false /* bot_updates */); + actual_word_size); if (result == NULL) { set_survivor_full(context); } @@ -217,14 +215,12 @@ HeapWord* G1Allocator::old_attempt_allocation(size_t min_word_size, HeapWord* result = old_gc_alloc_region(context)->attempt_allocation(min_word_size, desired_word_size, - actual_word_size, - true /* bot_updates */); + actual_word_size); if (result == NULL && !old_is_full(context)) { MutexLockerEx x(FreeList_lock, Mutex::_no_safepoint_check_flag); result = old_gc_alloc_region(context)->attempt_allocation_locked(min_word_size, desired_word_size, - actual_word_size, - true /* bot_updates */); + actual_word_size); if (result == NULL) { set_old_full(context); } diff --git a/src/hotspot/share/gc/g1/g1Allocator.inline.hpp b/src/hotspot/share/gc/g1/g1Allocator.inline.hpp index 6f05a21d9a3..d04343b158c 100644 --- a/src/hotspot/share/gc/g1/g1Allocator.inline.hpp +++ b/src/hotspot/share/gc/g1/g1Allocator.inline.hpp @@ -30,18 +30,18 @@ #include "gc/shared/plab.inline.hpp" HeapWord* G1Allocator::attempt_allocation(size_t word_size, AllocationContext_t context) { - return mutator_alloc_region(context)->attempt_allocation(word_size, false /* bot_updates */); + return mutator_alloc_region(context)->attempt_allocation(word_size); } HeapWord* G1Allocator::attempt_allocation_locked(size_t word_size, AllocationContext_t context) { - HeapWord* result = mutator_alloc_region(context)->attempt_allocation_locked(word_size, false /* bot_updates */); + HeapWord* result = mutator_alloc_region(context)->attempt_allocation_locked(word_size); assert(result != NULL || mutator_alloc_region(context)->get() == NULL, "Must not have a mutator alloc region if there is no memory, but is " PTR_FORMAT, p2i(mutator_alloc_region(context)->get())); return result; } HeapWord* G1Allocator::attempt_allocation_force(size_t word_size, AllocationContext_t context) { - return mutator_alloc_region(context)->attempt_allocation_force(word_size, false /* bot_updates */); + return mutator_alloc_region(context)->attempt_allocation_force(word_size); } inline HeapWord* G1PLABAllocator::plab_allocate(InCSetState dest, From 5dd68ed125526e4e02348105ab330cab7f0d72f8 Mon Sep 17 00:00:00 2001 From: Ioi Lam Date: Wed, 13 Dec 2017 15:37:48 -0800 Subject: [PATCH 19/88] 8165603: runtime/appcds/UseAppCDS.java: failed to clean up files after test when running with agentvm Reviewed-by: mseledtsov, dholmes --- test/hotspot/jtreg/ProblemList.txt | 1 - .../jtreg/runtime/appcds/MultiReleaseJars.java | 13 +++++++------ .../runtime/appcds/SharedArchiveConsistency.java | 12 ++++-------- test/hotspot/jtreg/runtime/appcds/UseAppCDS.java | 14 ++++++++------ .../appcds/cacheObject/RedefineClassTest.java | 1 - .../runtime/appcds/jvmti/InstrumentationTest.java | 6 +++--- .../jtreg/runtime/appcds/test-classes/Util.java | 14 +++++++------- 7 files changed, 29 insertions(+), 32 deletions(-) diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index a07b9c9e792..d56bd6c0a14 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -77,7 +77,6 @@ runtime/CompressedOops/UseCompressedOops.java 8079353 generic-all # This test is disabled since it will stress NMT and timeout during normal testing runtime/NMT/MallocStressTest.java 8166548 generic-all runtime/SharedArchiveFile/DefaultUseWithClient.java 8154204 generic-all -runtime/AppCDS/UseAppCDS.java 8165603 windows-all ############################################################################# diff --git a/test/hotspot/jtreg/runtime/appcds/MultiReleaseJars.java b/test/hotspot/jtreg/runtime/appcds/MultiReleaseJars.java index fdc6ef06492..21085ddde3f 100644 --- a/test/hotspot/jtreg/runtime/appcds/MultiReleaseJars.java +++ b/test/hotspot/jtreg/runtime/appcds/MultiReleaseJars.java @@ -72,13 +72,14 @@ public class MultiReleaseJars { if (contents == null) { throw new java.lang.RuntimeException("No input for writing to file" + file); } - FileOutputStream fos = new FileOutputStream(file); - PrintStream ps = new PrintStream(fos); - for (String str : contents) { - ps.println(str); + try ( + FileOutputStream fos = new FileOutputStream(file); + PrintStream ps = new PrintStream(fos) + ) { + for (String str : contents) { + ps.println(str); + } } - ps.close(); - fos.close(); } /* version.jar entries and files: diff --git a/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java b/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java index e7b1dac98ed..3e8642daecd 100644 --- a/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java +++ b/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java @@ -245,11 +245,10 @@ public class SharedArchiveConsistency { // Copy file with bytes deleted or inserted // del -- true, deleted, false, inserted public static void copyFile(File from, File to, boolean del) throws Exception { - FileChannel inputChannel = null; - FileChannel outputChannel = null; - try { - inputChannel = new FileInputStream(from).getChannel(); - outputChannel = new FileOutputStream(to).getChannel(); + try ( + FileChannel inputChannel = new FileInputStream(from).getChannel(); + FileChannel outputChannel = new FileOutputStream(to).getChannel() + ) { long size = inputChannel.size(); int init_size = getFileHeaderSize(inputChannel); outputChannel.transferFrom(inputChannel, 0, init_size); @@ -264,9 +263,6 @@ public class SharedArchiveConsistency { outputChannel.write(ByteBuffer.wrap(new byte[n])); outputChannel.transferFrom(inputChannel, init_size + n , size - init_size); } - } finally { - inputChannel.close(); - outputChannel.close(); } } diff --git a/test/hotspot/jtreg/runtime/appcds/UseAppCDS.java b/test/hotspot/jtreg/runtime/appcds/UseAppCDS.java index 639c06de59c..6db1a1c34cc 100644 --- a/test/hotspot/jtreg/runtime/appcds/UseAppCDS.java +++ b/test/hotspot/jtreg/runtime/appcds/UseAppCDS.java @@ -108,12 +108,14 @@ public class UseAppCDS { public static List toClassNames(String filename) throws IOException { ArrayList classes = new ArrayList<>(); - BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(filename))); - for (; ; ) { - String line = br.readLine(); - if (line == null) - break; - classes.add(line.replaceAll("/", ".")); + try (BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(filename)))) { + for (; ; ) { + String line = br.readLine(); + if (line == null) { + break; + } + classes.add(line.replaceAll("/", ".")); + } } return classes; } diff --git a/test/hotspot/jtreg/runtime/appcds/cacheObject/RedefineClassTest.java b/test/hotspot/jtreg/runtime/appcds/cacheObject/RedefineClassTest.java index bfcd82f5742..05177441a59 100644 --- a/test/hotspot/jtreg/runtime/appcds/cacheObject/RedefineClassTest.java +++ b/test/hotspot/jtreg/runtime/appcds/cacheObject/RedefineClassTest.java @@ -43,7 +43,6 @@ import com.sun.tools.attach.VirtualMachine; import com.sun.tools.attach.VirtualMachineDescriptor; import java.io.File; -import java.io.FileOutputStream; import java.util.List; import jdk.test.lib.Asserts; import jdk.test.lib.cds.CDSOptions; diff --git a/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationTest.java b/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationTest.java index 1e869c28929..4121fe17e67 100644 --- a/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationTest.java +++ b/test/hotspot/jtreg/runtime/appcds/jvmti/InstrumentationTest.java @@ -182,9 +182,9 @@ public class InstrumentationTest { // We use the flagFile to prevent the child process to make progress, until we have // attached to it. File f = new File(flagFile); - FileOutputStream o = new FileOutputStream(f); - o.write(1); - o.close(); + try (FileOutputStream o = new FileOutputStream(f)) { + o.write(1); + } if (!f.exists()) { throw new RuntimeException("Failed to create " + f); } diff --git a/test/hotspot/jtreg/runtime/appcds/test-classes/Util.java b/test/hotspot/jtreg/runtime/appcds/test-classes/Util.java index 4289c765257..29bb3b2b06e 100644 --- a/test/hotspot/jtreg/runtime/appcds/test-classes/Util.java +++ b/test/hotspot/jtreg/runtime/appcds/test-classes/Util.java @@ -39,7 +39,7 @@ public class Util { throws FileNotFoundException, IOException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { - DataInputStream dis = new DataInputStream(new FileInputStream(clsFile)); + try (DataInputStream dis = new DataInputStream(new FileInputStream(clsFile))) { byte[] buff = new byte[(int)clsFile.length()]; dis.readFully(buff); replace(buff, fromString, toString); @@ -57,6 +57,7 @@ public class Util { System.out.println("Loaded : " + cls); return cls; + } } /** @@ -146,11 +147,10 @@ public class Util { JarFile jf = new JarFile(jarFile); JarEntry ent = jf.getJarEntry(className.replace('.', '/') + ".class"); - DataInputStream dis = new DataInputStream(jf.getInputStream(ent)); - byte[] buff = new byte[(int)ent.getSize()]; - dis.readFully(buff); - dis.close(); - - return buff; + try (DataInputStream dis = new DataInputStream(jf.getInputStream(ent))) { + byte[] buff = new byte[(int)ent.getSize()]; + dis.readFully(buff); + return buff; + } } } From dfbf4c7a612f424d744ae6d63417bbccb9e5c5e3 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 14 Dec 2017 13:16:33 -0800 Subject: [PATCH 20/88] 8193525: Intermittent failures of TestModulePackages.java Reviewed-by: darcy --- .../jdk/javadoc/doclet/testModules/TestModulePackages.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/langtools/jdk/javadoc/doclet/testModules/TestModulePackages.java b/test/langtools/jdk/javadoc/doclet/testModules/TestModulePackages.java index 2d11284aba0..4ae83788053 100644 --- a/test/langtools/jdk/javadoc/doclet/testModules/TestModulePackages.java +++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModulePackages.java @@ -26,7 +26,9 @@ * @bug 8178070 * @summary Test packages table in module summary pages * @library /tools/lib ../lib - * @modules jdk.javadoc/jdk.javadoc.internal.tool + * @modules jdk.compiler/com.sun.tools.javac.api + * jdk.compiler/com.sun.tools.javac.main + * jdk.javadoc/jdk.javadoc.internal.tool * @build toolbox.ModuleBuilder toolbox.ToolBox JavadocTester * @run main TestModulePackages */ From 063f19b329b0686ec9d0f37b711be40ae0d6387e Mon Sep 17 00:00:00 2001 From: Lana Steuck Date: Fri, 15 Dec 2017 16:38:40 +0000 Subject: [PATCH 21/88] Added tag jdk-10+36 for changeset cb54a299aa91 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 0a1b78991e9..b4df4956421 100644 --- a/.hgtags +++ b/.hgtags @@ -460,3 +460,4 @@ a2008587c13fa05fa2dbfcb09fe987576fbedfd1 jdk-10+32 bbd692ad4fa300ecca7939ffbe3b1d5e52a28cc6 jdk-10+33 89deac44e51517841491ba86ff44aa82a5ca96b3 jdk-10+34 d8c634b016c628622c9abbdc6bf50509e5dedbec jdk-10+35 +cb54a299aa91419cb7caef3992592e7b22488163 jdk-10+36 From d2db163edbb5ff2bceffdccf69a6ae4c963eccf8 Mon Sep 17 00:00:00 2001 From: Roland Westrelin Date: Fri, 15 Dec 2017 10:26:45 -0800 Subject: [PATCH 22/88] 8193518: C2: Vector registers sometimes corrupted at safepoint Reviewed-by: neliasso, thartmann, kvn --- src/hotspot/share/opto/compile.hpp | 6 +++--- src/hotspot/share/opto/superword.cpp | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp index c21ee7e61e5..7f49319a3d9 100644 --- a/src/hotspot/share/opto/compile.hpp +++ b/src/hotspot/share/opto/compile.hpp @@ -378,7 +378,7 @@ class Compile : public Phase { bool _has_stringbuilder; // True StringBuffers or StringBuilders are allocated bool _has_boxed_value; // True if a boxed object is allocated bool _has_reserved_stack_access; // True if the method or an inlined method is annotated with ReservedStackAccess - int _max_vector_size; // Maximum size of generated vectors + uint _max_vector_size; // Maximum size of generated vectors uint _trap_hist[trapHistLength]; // Cumulative traps bool _trap_can_recompile; // Have we emitted a recompiling trap? uint _decompile_count; // Cumulative decompilation counts. @@ -656,8 +656,8 @@ class Compile : public Phase { void set_has_boxed_value(bool z) { _has_boxed_value = z; } bool has_reserved_stack_access() const { return _has_reserved_stack_access; } void set_has_reserved_stack_access(bool z) { _has_reserved_stack_access = z; } - int max_vector_size() const { return _max_vector_size; } - void set_max_vector_size(int s) { _max_vector_size = s; } + uint max_vector_size() const { return _max_vector_size; } + void set_max_vector_size(uint s) { _max_vector_size = s; } void set_trap_count(uint r, uint c) { assert(r < trapHistLength, "oob"); _trap_hist[r] = c; } uint trap_count(uint r) const { assert(r < trapHistLength, "oob"); return _trap_hist[r]; } bool trap_can_recompile() const { return _trap_can_recompile; } diff --git a/src/hotspot/share/opto/superword.cpp b/src/hotspot/share/opto/superword.cpp index 497f058a275..25ffb67f017 100644 --- a/src/hotspot/share/opto/superword.cpp +++ b/src/hotspot/share/opto/superword.cpp @@ -2442,7 +2442,9 @@ void SuperWord::output() { } }//for (int i = 0; i < _block.length(); i++) - C->set_max_vector_size(max_vlen_in_bytes); + if (max_vlen_in_bytes > C->max_vector_size()) { + C->set_max_vector_size(max_vlen_in_bytes); + } if (max_vlen_in_bytes > 0) { cl->mark_loop_vectorized(); } From 25e03a8e65c7669a6f7fe51462780b054bbcdbd5 Mon Sep 17 00:00:00 2001 From: Vivek Deshpande Date: Fri, 15 Dec 2017 10:44:06 -0800 Subject: [PATCH 23/88] 8190934: Regressions on Haswell Xeon due to JDK-8178811 Reviewed-by: neliasso, kvn --- src/hotspot/cpu/x86/x86_64.ad | 28 ++++++++++++++++--------- src/hotspot/share/opto/compile.cpp | 1 + src/hotspot/share/opto/compile.hpp | 5 ++++- src/hotspot/share/opto/library_call.cpp | 20 ++++++++++++++++++ 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/src/hotspot/cpu/x86/x86_64.ad b/src/hotspot/cpu/x86/x86_64.ad index f1bd471b0f6..e7b1a545b59 100644 --- a/src/hotspot/cpu/x86/x86_64.ad +++ b/src/hotspot/cpu/x86/x86_64.ad @@ -547,8 +547,12 @@ source %{ #define __ _masm. +static bool generate_vzeroupper(Compile* C) { + return (VM_Version::supports_vzeroupper() && (C->max_vector_size() > 16 || C->clear_upper_avx() == true)) ? true: false; // Generate vzeroupper +} + static int clear_avx_size() { - return (VM_Version::supports_vzeroupper()) ? 3: 0; // vzeroupper + return generate_vzeroupper(Compile::current()) ? 3: 0; // vzeroupper } // !!!!! Special hack to get all types of calls to specify the byte offset @@ -931,7 +935,7 @@ int MachPrologNode::reloc() const void MachEpilogNode::format(PhaseRegAlloc* ra_, outputStream* st) const { Compile* C = ra_->C; - if (VM_Version::supports_vzeroupper()) { + if (generate_vzeroupper(C)) { st->print("vzeroupper"); st->cr(); st->print("\t"); } @@ -971,9 +975,11 @@ void MachEpilogNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const Compile* C = ra_->C; MacroAssembler _masm(&cbuf); - // Clear upper bits of YMM registers when current compiled code uses - // wide vectors to avoid AVX <-> SSE transition penalty during call. - __ vzeroupper(); + if (generate_vzeroupper(C)) { + // Clear upper bits of YMM registers when current compiled code uses + // wide vectors to avoid AVX <-> SSE transition penalty during call. + __ vzeroupper(); + } int framesize = C->frame_size_in_bytes(); assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned"); @@ -2112,11 +2118,13 @@ encode %{ enc_class clear_avx %{ debug_only(int off0 = cbuf.insts_size()); - // Clear upper bits of YMM registers to avoid AVX <-> SSE transition penalty - // Clear upper bits of YMM registers when current compiled code uses - // wide vectors to avoid AVX <-> SSE transition penalty during call. - MacroAssembler _masm(&cbuf); - __ vzeroupper(); + if (generate_vzeroupper(Compile::current())) { + // Clear upper bits of YMM registers to avoid AVX <-> SSE transition penalty + // Clear upper bits of YMM registers when current compiled code uses + // wide vectors to avoid AVX <-> SSE transition penalty during call. + MacroAssembler _masm(&cbuf); + __ vzeroupper(); + } debug_only(int off1 = cbuf.insts_size()); assert(off1 - off0 == clear_avx_size(), "correct size prediction"); %} diff --git a/src/hotspot/share/opto/compile.cpp b/src/hotspot/share/opto/compile.cpp index 8e5da8a4028..913a1c9a0df 100644 --- a/src/hotspot/share/opto/compile.cpp +++ b/src/hotspot/share/opto/compile.cpp @@ -1094,6 +1094,7 @@ void Compile::Init(int aliaslevel) { _major_progress = true; // start out assuming good things will happen set_has_unsafe_access(false); set_max_vector_size(0); + set_clear_upper_avx(false); //false as default for clear upper bits of ymm registers Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist)); set_decompile_count(0); diff --git a/src/hotspot/share/opto/compile.hpp b/src/hotspot/share/opto/compile.hpp index 7f49319a3d9..7bd7a99b07a 100644 --- a/src/hotspot/share/opto/compile.hpp +++ b/src/hotspot/share/opto/compile.hpp @@ -379,6 +379,7 @@ class Compile : public Phase { bool _has_boxed_value; // True if a boxed object is allocated bool _has_reserved_stack_access; // True if the method or an inlined method is annotated with ReservedStackAccess uint _max_vector_size; // Maximum size of generated vectors + bool _clear_upper_avx; // Clear upper bits of ymm registers using vzeroupper uint _trap_hist[trapHistLength]; // Cumulative traps bool _trap_can_recompile; // Have we emitted a recompiling trap? uint _decompile_count; // Cumulative decompilation counts. @@ -656,8 +657,10 @@ class Compile : public Phase { void set_has_boxed_value(bool z) { _has_boxed_value = z; } bool has_reserved_stack_access() const { return _has_reserved_stack_access; } void set_has_reserved_stack_access(bool z) { _has_reserved_stack_access = z; } - uint max_vector_size() const { return _max_vector_size; } + uint max_vector_size() const { return _max_vector_size; } void set_max_vector_size(uint s) { _max_vector_size = s; } + bool clear_upper_avx() const { return _clear_upper_avx; } + void set_clear_upper_avx(bool s) { _clear_upper_avx = s; } void set_trap_count(uint r, uint c) { assert(r < trapHistLength, "oob"); _trap_hist[r] = c; } uint trap_count(uint r) const { assert(r < trapHistLength, "oob"); return _trap_hist[r]; } bool trap_can_recompile() const { return _trap_can_recompile; } diff --git a/src/hotspot/share/opto/library_call.cpp b/src/hotspot/share/opto/library_call.cpp index bb4ed6cef8e..1287c6a1853 100644 --- a/src/hotspot/share/opto/library_call.cpp +++ b/src/hotspot/share/opto/library_call.cpp @@ -328,6 +328,13 @@ class LibraryCallKit : public GraphKit { bool inline_profileBoolean(); bool inline_isCompileConstant(); + void clear_upper_avx() { +#ifdef X86 + if (UseAVX >= 2) { + C->set_clear_upper_avx(true); + } +#endif + } }; //---------------------------make_vm_intrinsic---------------------------- @@ -1082,6 +1089,7 @@ Node* LibraryCallKit::make_string_method_node(int opcode, Node* str1_start, Node // All these intrinsics have checks. C->set_has_split_ifs(true); // Has chance for split-if optimization + clear_upper_avx(); return _gvn.transform(result); } @@ -1156,6 +1164,8 @@ bool LibraryCallKit::inline_array_equals(StrIntrinsicNode::ArgEnc ae) { const TypeAryPtr* mtype = (ae == StrIntrinsicNode::UU) ? TypeAryPtr::CHARS : TypeAryPtr::BYTES; set_result(_gvn.transform(new AryEqNode(control(), memory(mtype), arg1, arg2, ae))); + clear_upper_avx(); + return true; } @@ -1227,6 +1237,7 @@ bool LibraryCallKit::inline_preconditions_checkIndex() { result = _gvn.transform(result); set_result(result); replace_in_map(index, result); + clear_upper_avx(); return true; } @@ -1325,6 +1336,7 @@ bool LibraryCallKit::inline_string_indexOfI(StrIntrinsicNode::ArgEnc ae) { set_control(_gvn.transform(region)); record_for_igvn(region); set_result(_gvn.transform(phi)); + clear_upper_avx(); return true; } @@ -1488,6 +1500,8 @@ bool LibraryCallKit::inline_string_copy(bool compress) { if (compress) { set_result(_gvn.transform(count)); } + clear_upper_avx(); + return true; } @@ -1585,6 +1599,8 @@ bool LibraryCallKit::inline_string_toBytesU() { if (!stopped()) { set_result(newcopy); } + clear_upper_avx(); + return true; } @@ -5286,6 +5302,8 @@ bool LibraryCallKit::inline_arraycopy() { assert(validated, "shouldn't transform if all arguments not validated"); set_all_memory(n); } + clear_upper_avx(); + return true; } @@ -5406,6 +5424,8 @@ bool LibraryCallKit::inline_encodeISOArray() { Node* res_mem = _gvn.transform(new SCMemProjNode(enc)); set_memory(res_mem, mtype); set_result(enc); + clear_upper_avx(); + return true; } From 108cfd6c194ec23891278a17b123ce633399adc2 Mon Sep 17 00:00:00 2001 From: Dmitry Markov Date: Fri, 15 Dec 2017 21:49:33 +0000 Subject: [PATCH 24/88] 8154405: AccessControlException by URLPermission check Reviewed-by: serb, ssadetsky, mullan --- .../share/classes/java/awt/Toolkit.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/java.desktop/share/classes/java/awt/Toolkit.java b/src/java.desktop/share/classes/java/awt/Toolkit.java index 489ee4ff695..7a4372ace66 100644 --- a/src/java.desktop/share/classes/java/awt/Toolkit.java +++ b/src/java.desktop/share/classes/java/awt/Toolkit.java @@ -673,11 +673,13 @@ public abstract class Toolkit { *

* This method first checks if there is a security manager installed. * If so, the method calls the security manager's - * {@code checkPermission} method with the - * url.openConnection().getPermission() permission to ensure - * that the access to the image is allowed. For compatibility - * with pre-1.2 security managers, if the access is denied with - * {@code FilePermission} or {@code SocketPermission}, + * {@code checkPermission} method with the corresponding + * permission to ensure that the access to the image is allowed. + * If the connection to the specified URL requires + * either {@code URLPermission} or {@code SocketPermission}, + * then {@code URLPermission} is used for security checks. + * For compatibility with pre-1.2 security managers, if the access + * is denied with {@code FilePermission} or {@code SocketPermission}, * the method throws the {@code SecurityException} * if the corresponding 1.1-style SecurityManager.checkXXX method * also denies permission. @@ -717,11 +719,13 @@ public abstract class Toolkit { *

* This method first checks if there is a security manager installed. * If so, the method calls the security manager's - * {@code checkPermission} method with the - * url.openConnection().getPermission() permission to ensure - * that the image creation is allowed. For compatibility - * with pre-1.2 security managers, if the access is denied with - * {@code FilePermission} or {@code SocketPermission}, + * {@code checkPermission} method with the corresponding + * permission to ensure that the image creation is allowed. + * If the connection to the specified URL requires + * either {@code URLPermission} or {@code SocketPermission}, + * then {@code URLPermission} is used for security checks. + * For compatibility with pre-1.2 security managers, if the access + * is denied with {@code FilePermission} or {@code SocketPermission}, * the method throws {@code SecurityException} * if the corresponding 1.1-style SecurityManager.checkXXX method * also denies permission. From 7b054f30b8907e494ce6f009b177ffac904541f2 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Tue, 19 Dec 2017 10:03:36 +0000 Subject: [PATCH 25/88] 8193758: Update copyright headers of files in src tree that are missing Classpath exception Reviewed-by: mchung, mr, jjg, iris, prr --- .../BlacklistedCertsConverter.java | 4 +- .../EquivMapsGenerator.java | 4 +- .../classes/java/lang/PublicMethods.java | 4 +- .../classes/java/lang/StringConcatHelper.java | 4 +- .../lang/invoke/StringConcatException.java | 4 +- .../loader/AbstractClassLoaderValue.java | 4 +- .../jdk/internal/loader/ClassLoaderValue.java | 4 +- .../ssl/ExtendedMasterSecretExtension.java | 5 ++- .../common/awt/systemscale/systemScale.c | 44 ++++++++++--------- .../common/awt/systemscale/systemScale.h | 44 ++++++++++--------- .../common/awt/systemscale/systemScale.cpp | 44 ++++++++++--------- .../common/awt/systemscale/systemScale.h | 44 ++++++++++--------- .../sun/tools/javac/api/JavacTaskPool.java | 4 +- .../jshell/debug/InternalDebugControl.java | 4 +- 14 files changed, 122 insertions(+), 95 deletions(-) diff --git a/make/jdk/src/classes/build/tools/blacklistedcertsconverter/BlacklistedCertsConverter.java b/make/jdk/src/classes/build/tools/blacklistedcertsconverter/BlacklistedCertsConverter.java index 9f8ce873c57..54c60eb43d1 100644 --- a/make/jdk/src/classes/build/tools/blacklistedcertsconverter/BlacklistedCertsConverter.java +++ b/make/jdk/src/classes/build/tools/blacklistedcertsconverter/BlacklistedCertsConverter.java @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java b/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java index f1fa4e02397..86f22439fdc 100644 --- a/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java +++ b/make/jdk/src/classes/build/tools/generatelsrequivmaps/EquivMapsGenerator.java @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/src/java.base/share/classes/java/lang/PublicMethods.java b/src/java.base/share/classes/java/lang/PublicMethods.java index 02e0d051b7d..eee131c206a 100644 --- a/src/java.base/share/classes/java/lang/PublicMethods.java +++ b/src/java.base/share/classes/java/lang/PublicMethods.java @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/src/java.base/share/classes/java/lang/StringConcatHelper.java b/src/java.base/share/classes/java/lang/StringConcatHelper.java index 809fab8eed5..159d657a2e9 100644 --- a/src/java.base/share/classes/java/lang/StringConcatHelper.java +++ b/src/java.base/share/classes/java/lang/StringConcatHelper.java @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/src/java.base/share/classes/java/lang/invoke/StringConcatException.java b/src/java.base/share/classes/java/lang/invoke/StringConcatException.java index 1cf0a66e370..ff86911b262 100644 --- a/src/java.base/share/classes/java/lang/invoke/StringConcatException.java +++ b/src/java.base/share/classes/java/lang/invoke/StringConcatException.java @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/src/java.base/share/classes/jdk/internal/loader/AbstractClassLoaderValue.java b/src/java.base/share/classes/jdk/internal/loader/AbstractClassLoaderValue.java index fe1342cf662..49e3ce3d7a0 100644 --- a/src/java.base/share/classes/jdk/internal/loader/AbstractClassLoaderValue.java +++ b/src/java.base/share/classes/jdk/internal/loader/AbstractClassLoaderValue.java @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/src/java.base/share/classes/jdk/internal/loader/ClassLoaderValue.java b/src/java.base/share/classes/jdk/internal/loader/ClassLoaderValue.java index a1f55f01872..f4b2d2a3995 100644 --- a/src/java.base/share/classes/jdk/internal/loader/ClassLoaderValue.java +++ b/src/java.base/share/classes/jdk/internal/loader/ClassLoaderValue.java @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/src/java.base/share/classes/sun/security/ssl/ExtendedMasterSecretExtension.java b/src/java.base/share/classes/sun/security/ssl/ExtendedMasterSecretExtension.java index bf7f7aefd75..f4d6a9ce98c 100644 --- a/src/java.base/share/classes/sun/security/ssl/ExtendedMasterSecretExtension.java +++ b/src/java.base/share/classes/sun/security/ssl/ExtendedMasterSecretExtension.java @@ -1,11 +1,12 @@ /* * Copyright (c) 2017, Red Hat, Inc. and/or its affiliates. - * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/src/java.desktop/unix/native/common/awt/systemscale/systemScale.c b/src/java.desktop/unix/native/common/awt/systemscale/systemScale.c index f7bea414e63..d0a9f5c4c07 100644 --- a/src/java.desktop/unix/native/common/awt/systemscale/systemScale.c +++ b/src/java.desktop/unix/native/common/awt/systemscale/systemScale.c @@ -1,25 +1,27 @@ /* -* Copyright (c) 2016, 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. -* -* This code is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* version 2 for more details (a copy is included in the LICENSE file that -* accompanied this code). -* -* You should have received a copy of the GNU General Public License version -* 2 along with this work; if not, write to the Free Software Foundation, -* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -* -* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -* or visit www.oracle.com if you need additional information or have any -* questions. -*/ + * Copyright (c) 2016, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ #include "systemScale.h" #include "jni.h" diff --git a/src/java.desktop/unix/native/common/awt/systemscale/systemScale.h b/src/java.desktop/unix/native/common/awt/systemscale/systemScale.h index b9c2b4f3f65..10de165f413 100644 --- a/src/java.desktop/unix/native/common/awt/systemscale/systemScale.h +++ b/src/java.desktop/unix/native/common/awt/systemscale/systemScale.h @@ -1,25 +1,27 @@ /* -* Copyright (c) 2016, 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. -* -* This code is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* version 2 for more details (a copy is included in the LICENSE file that -* accompanied this code). -* -* You should have received a copy of the GNU General Public License version -* 2 along with this work; if not, write to the Free Software Foundation, -* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -* -* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -* or visit www.oracle.com if you need additional information or have any -* questions. -*/ + * Copyright (c) 2016, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ #ifndef _AWT_SYSTEMSCALE_H #define _AWT_SYSTEMSCALE_H diff --git a/src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp b/src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp index 60eecd74437..f8ea087883c 100644 --- a/src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp +++ b/src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp @@ -1,25 +1,27 @@ /* -* Copyright (c) 2016, 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. -* -* This code is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* version 2 for more details (a copy is included in the LICENSE file that -* accompanied this code). -* -* You should have received a copy of the GNU General Public License version -* 2 along with this work; if not, write to the Free Software Foundation, -* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -* -* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -* or visit www.oracle.com if you need additional information or have any -* questions. -*/ + * Copyright (c) 2016, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ #include "systemScale.h" #include #pragma comment(lib, "d2d1") diff --git a/src/java.desktop/windows/native/common/awt/systemscale/systemScale.h b/src/java.desktop/windows/native/common/awt/systemscale/systemScale.h index cc3cb8878c9..2dc840d0564 100644 --- a/src/java.desktop/windows/native/common/awt/systemscale/systemScale.h +++ b/src/java.desktop/windows/native/common/awt/systemscale/systemScale.h @@ -1,25 +1,27 @@ /* -* Copyright (c) 2016, 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. -* -* This code is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -* version 2 for more details (a copy is included in the LICENSE file that -* accompanied this code). -* -* You should have received a copy of the GNU General Public License version -* 2 along with this work; if not, write to the Free Software Foundation, -* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -* -* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -* or visit www.oracle.com if you need additional information or have any -* questions. -*/ + * Copyright (c) 2016, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ #ifndef _AWT_SYSTEM_SCALE_H #define _AWT_SYSTEM_SCALE_H #include diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskPool.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskPool.java index 22861d8e35f..cba3ae808ce 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskPool.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTaskPool.java @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/src/jdk.jshell/share/classes/jdk/internal/jshell/debug/InternalDebugControl.java b/src/jdk.jshell/share/classes/jdk/internal/jshell/debug/InternalDebugControl.java index 48acdba965e..29b35fd2f41 100644 --- a/src/jdk.jshell/share/classes/jdk/internal/jshell/debug/InternalDebugControl.java +++ b/src/jdk.jshell/share/classes/jdk/internal/jshell/debug/InternalDebugControl.java @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or From f711280a47622be5c6c23dd0f9ed4ea7fd82572f Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Fri, 15 Dec 2017 14:08:15 +0100 Subject: [PATCH 26/88] 8193515: AIX: new Harfbuzz 1.7.1 version fails to compile with xlC Reviewed-by: prr, simonis --- .../harfbuzz/hb-ot-shape-complex-arabic-fallback.hh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh index 1719c99b09b..5fe13951cf7 100644 --- a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh +++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-ot-shape-complex-arabic-fallback.hh @@ -77,7 +77,13 @@ arabic_fallback_synthesize_lookup_single (const hb_ot_shape_plan_t *plan HB_UNUS /* Bubble-sort or something equally good! * May not be good-enough for presidential candidate interviews, but good-enough for us... */ + +#if defined(_AIX) + /* Workaround AIX xlC 12 compilation problems caused by the overloaded versions of 'cmp' in IntType */ + hb_stable_sort (&glyphs[0], num_glyphs, (int(*)(const OT::GlyphID*, const OT::GlyphID *)) OT::GlyphID::cmp, &substitutes[0]); +#else hb_stable_sort (&glyphs[0], num_glyphs, OT::GlyphID::cmp, &substitutes[0]); +#endif OT::Supplier glyphs_supplier (glyphs, num_glyphs); OT::Supplier substitutes_supplier (substitutes, num_glyphs); @@ -126,7 +132,13 @@ arabic_fallback_synthesize_lookup_ligature (const hb_ot_shape_plan_t *plan HB_UN first_glyphs_indirection[num_first_glyphs] = first_glyph_idx; num_first_glyphs++; } + +#if defined(_AIX) + /* Workaround AIX xlC 12 compilation problems caused by the overloaded versions of 'cmp' in IntType */ + hb_stable_sort (&first_glyphs[0], num_first_glyphs, (int(*)(const OT::GlyphID *, const OT::GlyphID *)) OT::GlyphID::cmp, &first_glyphs_indirection[0]); +#else hb_stable_sort (&first_glyphs[0], num_first_glyphs, OT::GlyphID::cmp, &first_glyphs_indirection[0]); +#endif /* Now that the first-glyphs are sorted, walk again, populate ligatures. */ for (unsigned int i = 0; i < num_first_glyphs; i++) From ede41aa311e41a66eb15cd833d2ba4c0cdac4232 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Wed, 20 Dec 2017 15:33:31 +0000 Subject: [PATCH 27/88] 8057650: uniform error diagnostics for inconsistent inherited method signatures Consolidate diagnostics for bad overrides Reviewed-by: vromero --- .../com/sun/tools/javac/comp/Check.java | 20 ++++++++++--------- .../tools/javac/resources/compiler.properties | 15 +++++++++----- test/langtools/tools/javac/BadCovar.out | 2 +- .../javac/InconsistentInheritedSignature.out | 2 +- .../OverrideChecks/InconsistentReturn.out | 2 +- .../tools/javac/defaultMethods/Neg01.out | 2 +- .../tools/javac/defaultMethods/Neg02.out | 2 +- .../tools/javac/defaultMethods/Neg14.out | 2 +- .../IncompatibleDescsInFunctionalIntf.java | 3 ++- .../diags/examples/TypesIncompatible.java | 3 ++- .../TypesIncompatibleAbstractDefault.java | 3 ++- .../TypesIncompatibleUnrelatedDefaults.java | 3 ++- .../javac/generics/6294779/T6294779c.out | 2 +- .../javac/generics/abstract/T4717181c.out | 2 +- .../generics/rawOverride/7157798/Test3.out | 10 +++++----- .../generics/typevars/4856983/T4856983a.out | 2 +- .../generics/typevars/4856983/T4856983b.out | 2 +- .../generics/typevars/6199146/T6199146.out | 2 +- .../generics/wildcards/7034495/T7034495.out | 2 +- .../tools/javac/lambda/BadConv04.out | 2 +- .../BridgeMethodsTemplateTest.java | 6 +++--- .../javac/lambda/funcInterfaces/NonSAM2.out | 2 +- .../tools/javac/miranda/4711056/T1.out | 2 +- 23 files changed, 52 insertions(+), 41 deletions(-) diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java index 4f1d7142bbb..b3999f56571 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java @@ -1976,8 +1976,8 @@ public class Check { types.covariantReturnType(rt2, rt1, types.noWarnings)) || checkCommonOverriderIn(s1,s2,site); if (!compat) { - log.error(pos, Errors.TypesIncompatibleDiffRet(t1, t2, s2.name + - "(" + types.memberType(t2, s2).getParameterTypes() + ")")); + log.error(pos, Errors.TypesIncompatible(t1, t2, + Fragments.IncompatibleDiffRet(s2.name, types.memberType(t2, s2).getParameterTypes()))); return s2; } } else if (checkNameClash((ClassSymbol)site.tsym, s1, s2) && @@ -2563,20 +2563,22 @@ public class Check { //strong semantics - issue an error if two sibling interfaces //have two override-equivalent defaults - or if one is abstract //and the other is default - String errKey; + Fragment diagKey; Symbol s1 = defaults.first(); Symbol s2; if (defaults.size() > 1) { - errKey = "types.incompatible.unrelated.defaults"; s2 = defaults.toList().tail.head; + diagKey = Fragments.IncompatibleUnrelatedDefaults(Kinds.kindName(site.tsym), site, + m.name, types.memberType(site, m).getParameterTypes(), + s1.location(), s2.location()); + } else { - errKey = "types.incompatible.abstract.default"; s2 = abstracts.first(); + diagKey = Fragments.IncompatibleAbstractDefault(Kinds.kindName(site.tsym), site, + m.name, types.memberType(site, m).getParameterTypes(), + s1.location(), s2.location()); } - log.error(pos, errKey, - Kinds.kindName(site.tsym), site, - m.name, types.memberType(site, m).getParameterTypes(), - s1.location(), s2.location()); + log.error(pos, Errors.TypesIncompatible(s1.location().type, s2.location().type, diagKey)); break; } } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties index de2600eaa3f..3ca606e2581 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -1136,16 +1136,21 @@ compiler.err.type.var.more.than.once=\ compiler.err.type.var.more.than.once.in.result=\ type variable {0} occurs more than once in type of {1}; cannot be left uninstantiated -# 0: type, 1: type, 2: string -compiler.err.types.incompatible.diff.ret=\ - types {0} and {1} are incompatible; both define {2}, but with unrelated return types +# 0: type, 1: type, 2: fragment +compiler.err.types.incompatible=\ + types {0} and {1} are incompatible;\n\ + {2} + +# 0: name, 1: list of type +compiler.misc.incompatible.diff.ret=\ + both define {0}({1}), but with unrelated return types # 0: kind name, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol -compiler.err.types.incompatible.unrelated.defaults=\ +compiler.misc.incompatible.unrelated.defaults=\ {0} {1} inherits unrelated defaults for {2}({3}) from types {4} and {5} # 0: kind name, 1: type, 2: name, 3: list of type, 4: symbol, 5: symbol -compiler.err.types.incompatible.abstract.default=\ +compiler.misc.incompatible.abstract.default=\ {0} {1} inherits abstract and default for {2}({3}) from types {4} and {5} # 0: name, 1: kind name, 2: symbol diff --git a/test/langtools/tools/javac/BadCovar.out b/test/langtools/tools/javac/BadCovar.out index 29bdbcc3d94..59fd5fa10d6 100644 --- a/test/langtools/tools/javac/BadCovar.out +++ b/test/langtools/tools/javac/BadCovar.out @@ -1,2 +1,2 @@ -BadCovar.java:22:10: compiler.err.types.incompatible.diff.ret: bad.covar.B, bad.covar.A, f() +BadCovar.java:22:10: compiler.err.types.incompatible: bad.covar.B, bad.covar.A, (compiler.misc.incompatible.diff.ret: f, ) 1 error diff --git a/test/langtools/tools/javac/InconsistentInheritedSignature.out b/test/langtools/tools/javac/InconsistentInheritedSignature.out index b4fd9a96d08..fe908134e1f 100644 --- a/test/langtools/tools/javac/InconsistentInheritedSignature.out +++ b/test/langtools/tools/javac/InconsistentInheritedSignature.out @@ -1,2 +1,2 @@ -InconsistentInheritedSignature.java:17:1: compiler.err.types.incompatible.diff.ret: I2, I1, f() +InconsistentInheritedSignature.java:17:1: compiler.err.types.incompatible: I2, I1, (compiler.misc.incompatible.diff.ret: f, ) 1 error diff --git a/test/langtools/tools/javac/OverrideChecks/InconsistentReturn.out b/test/langtools/tools/javac/OverrideChecks/InconsistentReturn.out index 6adccb4a11f..788cbb9fd53 100644 --- a/test/langtools/tools/javac/OverrideChecks/InconsistentReturn.out +++ b/test/langtools/tools/javac/OverrideChecks/InconsistentReturn.out @@ -1,2 +1,2 @@ -InconsistentReturn.java:17:1: compiler.err.types.incompatible.diff.ret: I2, I1, f() +InconsistentReturn.java:17:1: compiler.err.types.incompatible: I2, I1, (compiler.misc.incompatible.diff.ret: f, ) 1 error diff --git a/test/langtools/tools/javac/defaultMethods/Neg01.out b/test/langtools/tools/javac/defaultMethods/Neg01.out index ca44ab6bec9..533ff91d83b 100644 --- a/test/langtools/tools/javac/defaultMethods/Neg01.out +++ b/test/langtools/tools/javac/defaultMethods/Neg01.out @@ -1,2 +1,2 @@ -Neg01.java:14:12: compiler.err.types.incompatible.unrelated.defaults: kindname.class, Neg01.AB, m, , Neg01.IA, Neg01.IB +Neg01.java:14:12: compiler.err.types.incompatible: Neg01.IA, Neg01.IB, (compiler.misc.incompatible.unrelated.defaults: kindname.class, Neg01.AB, m, , Neg01.IA, Neg01.IB) 1 error diff --git a/test/langtools/tools/javac/defaultMethods/Neg02.out b/test/langtools/tools/javac/defaultMethods/Neg02.out index 3fb05ab2adc..8f54fee405c 100644 --- a/test/langtools/tools/javac/defaultMethods/Neg02.out +++ b/test/langtools/tools/javac/defaultMethods/Neg02.out @@ -1,2 +1,2 @@ -Neg02.java:16:13: compiler.err.types.incompatible.unrelated.defaults: kindname.class, Neg02.X, m, , Neg02.A, Neg02.B +Neg02.java:16:13: compiler.err.types.incompatible: Neg02.A, Neg02.B, (compiler.misc.incompatible.unrelated.defaults: kindname.class, Neg02.X, m, , Neg02.A, Neg02.B) 1 error diff --git a/test/langtools/tools/javac/defaultMethods/Neg14.out b/test/langtools/tools/javac/defaultMethods/Neg14.out index 0d595aa7cf4..8267072400f 100644 --- a/test/langtools/tools/javac/defaultMethods/Neg14.out +++ b/test/langtools/tools/javac/defaultMethods/Neg14.out @@ -1,2 +1,2 @@ -Neg14.java:10:14: compiler.err.types.incompatible.abstract.default: kindname.class, Neg14.AB, m, , Neg14.IB, Neg14.IA +Neg14.java:10:14: compiler.err.types.incompatible: Neg14.IB, Neg14.IA, (compiler.misc.incompatible.abstract.default: kindname.class, Neg14.AB, m, , Neg14.IB, Neg14.IA) 1 error diff --git a/test/langtools/tools/javac/diags/examples/IncompatibleDescsInFunctionalIntf.java b/test/langtools/tools/javac/diags/examples/IncompatibleDescsInFunctionalIntf.java index 4873516465d..cce894569c5 100644 --- a/test/langtools/tools/javac/diags/examples/IncompatibleDescsInFunctionalIntf.java +++ b/test/langtools/tools/javac/diags/examples/IncompatibleDescsInFunctionalIntf.java @@ -21,7 +21,8 @@ * questions. */ -// key: compiler.err.types.incompatible.diff.ret +// key: compiler.err.types.incompatible +// key: compiler.misc.incompatible.diff.ret // key: compiler.err.prob.found.req // key: compiler.misc.incompatible.descs.in.functional.intf // key: compiler.misc.descriptor diff --git a/test/langtools/tools/javac/diags/examples/TypesIncompatible.java b/test/langtools/tools/javac/diags/examples/TypesIncompatible.java index e4197624038..e1795c95f9f 100644 --- a/test/langtools/tools/javac/diags/examples/TypesIncompatible.java +++ b/test/langtools/tools/javac/diags/examples/TypesIncompatible.java @@ -21,7 +21,8 @@ * questions. */ -// key: compiler.err.types.incompatible.diff.ret +// key: compiler.err.types.incompatible +// key: compiler.misc.incompatible.diff.ret interface A { int m(); diff --git a/test/langtools/tools/javac/diags/examples/TypesIncompatibleAbstractDefault.java b/test/langtools/tools/javac/diags/examples/TypesIncompatibleAbstractDefault.java index d94a88ef7bb..162f8467920 100644 --- a/test/langtools/tools/javac/diags/examples/TypesIncompatibleAbstractDefault.java +++ b/test/langtools/tools/javac/diags/examples/TypesIncompatibleAbstractDefault.java @@ -21,7 +21,8 @@ * questions. */ -// key: compiler.err.types.incompatible.abstract.default +// key: compiler.err.types.incompatible +// key: compiler.misc.incompatible.abstract.default class TypesIncompatibleAbstractDefault { interface A { diff --git a/test/langtools/tools/javac/diags/examples/TypesIncompatibleUnrelatedDefaults.java b/test/langtools/tools/javac/diags/examples/TypesIncompatibleUnrelatedDefaults.java index 28c75bc644b..c03971abeb1 100644 --- a/test/langtools/tools/javac/diags/examples/TypesIncompatibleUnrelatedDefaults.java +++ b/test/langtools/tools/javac/diags/examples/TypesIncompatibleUnrelatedDefaults.java @@ -21,7 +21,8 @@ * questions. */ -// key: compiler.err.types.incompatible.unrelated.defaults +// key: compiler.err.types.incompatible +// key: compiler.misc.incompatible.unrelated.defaults class TypesIncompatibleUnrelatedDefaults { interface A { diff --git a/test/langtools/tools/javac/generics/6294779/T6294779c.out b/test/langtools/tools/javac/generics/6294779/T6294779c.out index 244b9f7fffe..7cc14e45eb0 100644 --- a/test/langtools/tools/javac/generics/6294779/T6294779c.out +++ b/test/langtools/tools/javac/generics/6294779/T6294779c.out @@ -1,2 +1,2 @@ -T6294779c.java:29:5: compiler.err.types.incompatible.diff.ret: T6294779c.I2, T6294779c.I1, get() +T6294779c.java:29:5: compiler.err.types.incompatible: T6294779c.I2, T6294779c.I1, (compiler.misc.incompatible.diff.ret: get, ) 1 error diff --git a/test/langtools/tools/javac/generics/abstract/T4717181c.out b/test/langtools/tools/javac/generics/abstract/T4717181c.out index 4ac9fbc1165..aacb51a4bc1 100644 --- a/test/langtools/tools/javac/generics/abstract/T4717181c.out +++ b/test/langtools/tools/javac/generics/abstract/T4717181c.out @@ -1,2 +1,2 @@ -T4717181c.java:15:21: compiler.err.types.incompatible.diff.ret: T4717181c.A, T4717181c.A, f(java.lang.Integer) +T4717181c.java:15:21: compiler.err.types.incompatible: T4717181c.A, T4717181c.A, (compiler.misc.incompatible.diff.ret: f, java.lang.Integer) 1 error diff --git a/test/langtools/tools/javac/generics/rawOverride/7157798/Test3.out b/test/langtools/tools/javac/generics/rawOverride/7157798/Test3.out index 80960df0a78..8426040b22f 100644 --- a/test/langtools/tools/javac/generics/rawOverride/7157798/Test3.out +++ b/test/langtools/tools/javac/generics/rawOverride/7157798/Test3.out @@ -1,6 +1,6 @@ -Test3.java:14:1: compiler.err.types.incompatible.diff.ret: B, A, m() -Test3.java:19:1: compiler.err.types.incompatible.diff.ret: D, C, m() -Test3.java:27:1: compiler.err.types.incompatible.diff.ret: E, B, m() -Test3.java:33:1: compiler.err.types.incompatible.diff.ret: F, E, m() -Test3.java:37:1: compiler.err.types.incompatible.diff.ret: F, E, m() +Test3.java:14:1: compiler.err.types.incompatible: B, A, (compiler.misc.incompatible.diff.ret: m, ) +Test3.java:19:1: compiler.err.types.incompatible: D, C, (compiler.misc.incompatible.diff.ret: m, ) +Test3.java:27:1: compiler.err.types.incompatible: E, B, (compiler.misc.incompatible.diff.ret: m, ) +Test3.java:33:1: compiler.err.types.incompatible: F, E, (compiler.misc.incompatible.diff.ret: m, ) +Test3.java:37:1: compiler.err.types.incompatible: F, E, (compiler.misc.incompatible.diff.ret: m, ) 5 errors diff --git a/test/langtools/tools/javac/generics/typevars/4856983/T4856983a.out b/test/langtools/tools/javac/generics/typevars/4856983/T4856983a.out index f359892417f..490167c79fa 100644 --- a/test/langtools/tools/javac/generics/typevars/4856983/T4856983a.out +++ b/test/langtools/tools/javac/generics/typevars/4856983/T4856983a.out @@ -1,2 +1,2 @@ -T4856983a.java:13:6: compiler.err.types.incompatible.diff.ret: I2, I1, m() +T4856983a.java:13:6: compiler.err.types.incompatible: I2, I1, (compiler.misc.incompatible.diff.ret: m, ) 1 error diff --git a/test/langtools/tools/javac/generics/typevars/4856983/T4856983b.out b/test/langtools/tools/javac/generics/typevars/4856983/T4856983b.out index 256af27c696..5f8e361769f 100644 --- a/test/langtools/tools/javac/generics/typevars/4856983/T4856983b.out +++ b/test/langtools/tools/javac/generics/typevars/4856983/T4856983b.out @@ -1,2 +1,2 @@ -T4856983b.java:12:24: compiler.err.types.incompatible.diff.ret: I2, I1, m() +T4856983b.java:12:24: compiler.err.types.incompatible: I2, I1, (compiler.misc.incompatible.diff.ret: m, ) 1 error diff --git a/test/langtools/tools/javac/generics/typevars/6199146/T6199146.out b/test/langtools/tools/javac/generics/typevars/6199146/T6199146.out index d487e95ab65..99f434fd606 100644 --- a/test/langtools/tools/javac/generics/typevars/6199146/T6199146.out +++ b/test/langtools/tools/javac/generics/typevars/6199146/T6199146.out @@ -1,2 +1,2 @@ -T6199146.java:9:25: compiler.err.types.incompatible.diff.ret: T6199146.I2, T6199146.I1, getFoo() +T6199146.java:9:25: compiler.err.types.incompatible: T6199146.I2, T6199146.I1, (compiler.misc.incompatible.diff.ret: getFoo, ) 1 error diff --git a/test/langtools/tools/javac/generics/wildcards/7034495/T7034495.out b/test/langtools/tools/javac/generics/wildcards/7034495/T7034495.out index 58aa1f67616..59ac8fbfa1d 100644 --- a/test/langtools/tools/javac/generics/wildcards/7034495/T7034495.out +++ b/test/langtools/tools/javac/generics/wildcards/7034495/T7034495.out @@ -1,2 +1,2 @@ -T7034495.java:40:17: compiler.err.types.incompatible.diff.ret: T7034495.B, T7034495.A, foo() +T7034495.java:40:17: compiler.err.types.incompatible: T7034495.B, T7034495.A, (compiler.misc.incompatible.diff.ret: foo, ) 1 error diff --git a/test/langtools/tools/javac/lambda/BadConv04.out b/test/langtools/tools/javac/lambda/BadConv04.out index 4eae22a993a..0978ee9b3f8 100644 --- a/test/langtools/tools/javac/lambda/BadConv04.out +++ b/test/langtools/tools/javac/lambda/BadConv04.out @@ -1,3 +1,3 @@ -BadConv04.java:19:5: compiler.err.types.incompatible.diff.ret: BadConv04.I2, BadConv04.I1, m() +BadConv04.java:19:5: compiler.err.types.incompatible: BadConv04.I2, BadConv04.I1, (compiler.misc.incompatible.diff.ret: m, ) BadConv04.java:21:13: compiler.err.prob.found.req: (compiler.misc.incompatible.descs.in.functional.intf: kindname.interface, BadConv04.SAM,{(compiler.misc.descriptor: m, , long, ),(compiler.misc.descriptor: m, , int, )}) 2 errors diff --git a/test/langtools/tools/javac/lambda/bridge/template_tests/BridgeMethodsTemplateTest.java b/test/langtools/tools/javac/lambda/bridge/template_tests/BridgeMethodsTemplateTest.java index 9d6913edf5f..a4be15d320b 100644 --- a/test/langtools/tools/javac/lambda/bridge/template_tests/BridgeMethodsTemplateTest.java +++ b/test/langtools/tools/javac/lambda/bridge/template_tests/BridgeMethodsTemplateTest.java @@ -1001,18 +1001,18 @@ public class BridgeMethodsTemplateTest extends BridgeMethodTestCase { public void testA5() throws IOException, ReflectiveOperationException { compileSpec("C(A(Id0),Jd0)", - "compiler.err.types.incompatible.unrelated.defaults"); + "compiler.err.types.incompatible"); } public void testA6() throws IOException, ReflectiveOperationException { compileSpec("C(A(Ia0,Jd0))", "compiler.err.does.not.override.abstract", - "compiler.err.types.incompatible.abstract.default"); + "compiler.err.types.incompatible"); } public void testA7() throws IOException, ReflectiveOperationException { compileSpec("C(A(Id0,Jd0))", - "compiler.err.types.incompatible.unrelated.defaults"); + "compiler.err.types.incompatible"); } public void testA8() throws IOException, ReflectiveOperationException { diff --git a/test/langtools/tools/javac/lambda/funcInterfaces/NonSAM2.out b/test/langtools/tools/javac/lambda/funcInterfaces/NonSAM2.out index 8360f7c4475..7e3df37f96b 100644 --- a/test/langtools/tools/javac/lambda/funcInterfaces/NonSAM2.out +++ b/test/langtools/tools/javac/lambda/funcInterfaces/NonSAM2.out @@ -1,4 +1,4 @@ -NonSAM2.java:13:1: compiler.err.types.incompatible.diff.ret: Bar1, Foo1, getAge(java.lang.String) +NonSAM2.java:13:1: compiler.err.types.incompatible: Bar1, Foo1, (compiler.misc.incompatible.diff.ret: getAge, java.lang.String) NonSAM2.java:15:1: compiler.err.name.clash.same.erasure.no.override: getOldest, java.util.List, C, getOldest, java.util.List, A NonSAM2.java:17:1: compiler.err.name.clash.same.erasure.no.override: getOldest, java.util.List, D, getOldest, java.util.List, A NonSAM2.java:21:1: compiler.err.name.clash.same.erasure.no.override: m, T2, Bar2, m, T1, Foo2 diff --git a/test/langtools/tools/javac/miranda/4711056/T1.out b/test/langtools/tools/javac/miranda/4711056/T1.out index b9edac1ee51..af4b8f906d9 100644 --- a/test/langtools/tools/javac/miranda/4711056/T1.out +++ b/test/langtools/tools/javac/miranda/4711056/T1.out @@ -1,2 +1,2 @@ -T4.java:3:10: compiler.err.types.incompatible.diff.ret: iclss01004_2, iclss01004_1, foo(int) +T4.java:3:10: compiler.err.types.incompatible: iclss01004_2, iclss01004_1, (compiler.misc.incompatible.diff.ret: foo, int) 1 error From c4f1bb00198ed09fa2c31076ce812331310730a5 Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Wed, 20 Dec 2017 08:05:04 -0800 Subject: [PATCH 28/88] 8193842: Replace Files.copy(InputStream,OutputStream) with InputStream.transferTo(OutputStream) Reviewed-by: clanger, alanb --- .../share/classes/java/nio/file/Files.java | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/java.base/share/classes/java/nio/file/Files.java b/src/java.base/share/classes/java/nio/file/Files.java index c7e0dcf9938..41ac57fa3cf 100644 --- a/src/java.base/share/classes/java/nio/file/Files.java +++ b/src/java.base/share/classes/java/nio/file/Files.java @@ -2954,22 +2954,6 @@ public final class Files { return newBufferedWriter(path, StandardCharsets.UTF_8, options); } - /** - * Reads all bytes from an input stream and writes them to an output stream. - */ - private static long copy(InputStream source, OutputStream sink) - throws IOException - { - long nread = 0L; - byte[] buf = new byte[BUFFER_SIZE]; - int n; - while ((n = source.read(buf)) > 0) { - sink.write(buf, 0, n); - nread += n; - } - return nread; - } - /** * Copies all bytes from an input stream to a file. On return, the input * stream will be at end of stream. @@ -3082,7 +3066,7 @@ public final class Files { // do the copy try (OutputStream out = ostream) { - return copy(in, out); + return in.transferTo(out); } } @@ -3124,7 +3108,7 @@ public final class Files { Objects.requireNonNull(out); try (InputStream in = newInputStream(source)) { - return copy(in, out); + return in.transferTo(out); } } From 3851e0e0308ab300153706646cba48edd24faf98 Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Wed, 20 Dec 2017 17:36:50 +0100 Subject: [PATCH 29/88] 8193371: Use Dynalink REMOVE operation in Nashorn Reviewed-by: hannesw, sundar --- .../dynalink/beans/AbstractJavaLinker.java | 27 +-- .../jdk/dynalink/beans/BeanLinker.java | 25 +- .../internal/codegen/AssignSymbols.java | 64 +----- .../internal/codegen/CodeGenerator.java | 54 +++++ .../codegen/LocalVariableTypesCalculator.java | 19 +- .../internal/codegen/MethodEmitter.java | 66 +++++- .../jdk/nashorn/internal/ir/RuntimeNode.java | 6 - .../internal/runtime/ScriptObject.java | 12 + .../internal/runtime/ScriptRuntime.java | 87 ++----- .../nashorn/internal/runtime/Undefined.java | 15 ++ .../runtime/linker/JSObjectLinker.java | 26 ++- .../runtime/linker/NashornBottomLinker.java | 42 +++- .../linker/NashornCallSiteDescriptor.java | 47 ++-- test/nashorn/script/basic/JDK-8193371.js | 215 ++++++++++++++++++ .../script/basic/JDK-8193371.js.EXPECTED | 6 + 15 files changed, 523 insertions(+), 188 deletions(-) create mode 100644 test/nashorn/script/basic/JDK-8193371.js create mode 100644 test/nashorn/script/basic/JDK-8193371.js.EXPECTED diff --git a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AbstractJavaLinker.java b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AbstractJavaLinker.java index f648a81f0ca..bc5c0645588 100644 --- a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AbstractJavaLinker.java +++ b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AbstractJavaLinker.java @@ -414,20 +414,21 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker { protected GuardedInvocationComponent getGuardedInvocationComponent(final ComponentLinkRequest req) throws Exception { - if (!req.namespaces.isEmpty()) { - final Namespace ns = req.namespaces.get(0); - final Operation op = req.baseOperation; - if (op == StandardOperation.GET) { - if (ns == StandardNamespace.PROPERTY) { - return getPropertyGetter(req.popNamespace()); - } else if (ns == StandardNamespace.METHOD) { - return getMethodGetter(req.popNamespace()); - } - } else if (op == StandardOperation.SET && ns == StandardNamespace.PROPERTY) { - return getPropertySetter(req.popNamespace()); - } + if (req.namespaces.isEmpty()) { + return null; } - return null; + final Namespace ns = req.namespaces.get(0); + final Operation op = req.baseOperation; + if (op == StandardOperation.GET) { + if (ns == StandardNamespace.PROPERTY) { + return getPropertyGetter(req.popNamespace()); + } else if (ns == StandardNamespace.METHOD) { + return getMethodGetter(req.popNamespace()); + } + } else if (op == StandardOperation.SET && ns == StandardNamespace.PROPERTY) { + return getPropertySetter(req.popNamespace()); + } + return getNextComponent(req.popNamespace()); } GuardedInvocationComponent getNextComponent(final ComponentLinkRequest req) throws Exception { diff --git a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/BeanLinker.java b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/BeanLinker.java index cff9cc12df6..d46bd105b67 100644 --- a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/BeanLinker.java +++ b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/BeanLinker.java @@ -136,24 +136,21 @@ class BeanLinker extends AbstractJavaLinker implements TypeBasedGuardingDynamicL @Override protected GuardedInvocationComponent getGuardedInvocationComponent(final ComponentLinkRequest req) throws Exception { - final GuardedInvocationComponent superGic = super.getGuardedInvocationComponent(req); - if(superGic != null) { - return superGic; + if (req.namespaces.isEmpty()) { + return null; } - if (!req.namespaces.isEmpty()) { + final Namespace ns = req.namespaces.get(0); + if (ns == StandardNamespace.ELEMENT) { final Operation op = req.baseOperation; - final Namespace ns = req.namespaces.get(0); - if (ns == StandardNamespace.ELEMENT) { - if (op == StandardOperation.GET) { - return getElementGetter(req.popNamespace()); - } else if (op == StandardOperation.SET) { - return getElementSetter(req.popNamespace()); - } else if (op == StandardOperation.REMOVE) { - return getElementRemover(req.popNamespace()); - } + if (op == StandardOperation.GET) { + return getElementGetter(req.popNamespace()); + } else if (op == StandardOperation.SET) { + return getElementSetter(req.popNamespace()); + } else if (op == StandardOperation.REMOVE) { + return getElementRemover(req.popNamespace()); } } - return null; + return super.getGuardedInvocationComponent(req); } @Override diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java index 7d37330dd88..f01c7f9c259 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java @@ -59,6 +59,7 @@ import java.util.ListIterator; import java.util.Map; import java.util.Set; import jdk.nashorn.internal.ir.AccessNode; +import jdk.nashorn.internal.ir.BaseNode; import jdk.nashorn.internal.ir.BinaryNode; import jdk.nashorn.internal.ir.Block; import jdk.nashorn.internal.ir.CatchNode; @@ -735,72 +736,13 @@ final class AssignSymbols extends SimpleNodeVisitor implements Loggable { @Override public Node leaveUnaryNode(final UnaryNode unaryNode) { - switch (unaryNode.tokenType()) { - case DELETE: - return leaveDELETE(unaryNode); - case TYPEOF: + if (unaryNode.tokenType() == TokenType.TYPEOF) { return leaveTYPEOF(unaryNode); - default: + } else { return super.leaveUnaryNode(unaryNode); } } - private Node leaveDELETE(final UnaryNode unaryNode) { - final FunctionNode currentFunctionNode = lc.getCurrentFunction(); - final boolean strictMode = currentFunctionNode.isStrict(); - final Expression rhs = unaryNode.getExpression(); - final Expression strictFlagNode = (Expression)LiteralNode.newInstance(unaryNode, strictMode).accept(this); - - Request request = Request.DELETE; - final List args = new ArrayList<>(); - - if (rhs instanceof IdentNode) { - final IdentNode ident = (IdentNode)rhs; - // If this is a declared variable or a function parameter, delete always fails (except for globals). - final String name = ident.getName(); - final Symbol symbol = ident.getSymbol(); - - if (symbol.isThis()) { - // Can't delete "this", ignore and return true - return LiteralNode.newInstance(unaryNode, true); - } - final Expression literalNode = LiteralNode.newInstance(unaryNode, name); - final boolean failDelete = strictMode || (!symbol.isScope() && (symbol.isParam() || (symbol.isVar() && !symbol.isProgramLevel()))); - - if (!failDelete) { - args.add(compilerConstantIdentifier(SCOPE)); - } - args.add(literalNode); - args.add(strictFlagNode); - - if (failDelete) { - request = Request.FAIL_DELETE; - } else if ((symbol.isGlobal() && !symbol.isFunctionDeclaration()) || symbol.isProgramLevel()) { - request = Request.SLOW_DELETE; - } - } else if (rhs instanceof AccessNode) { - final Expression base = ((AccessNode)rhs).getBase(); - final String property = ((AccessNode)rhs).getProperty(); - - args.add(base); - args.add(LiteralNode.newInstance(unaryNode, property)); - args.add(strictFlagNode); - - } else if (rhs instanceof IndexNode) { - final IndexNode indexNode = (IndexNode)rhs; - final Expression base = indexNode.getBase(); - final Expression index = indexNode.getIndex(); - - args.add(base); - args.add(index); - args.add(strictFlagNode); - - } else { - throw new AssertionError("Unexpected delete with " + rhs.getClass().getName() + " expression"); - } - return new RuntimeNode(unaryNode, request, args); - } - @Override public Node leaveForNode(final ForNode forNode) { if (forNode.isForInOrOf()) { diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java index 43074a2c735..20669563256 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java @@ -151,6 +151,7 @@ import jdk.nashorn.internal.runtime.Undefined; import jdk.nashorn.internal.runtime.UnwarrantedOptimismException; import jdk.nashorn.internal.runtime.arrays.ArrayData; import jdk.nashorn.internal.runtime.linker.LinkerCallSite; +import jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor; import jdk.nashorn.internal.runtime.logging.DebugLogger; import jdk.nashorn.internal.runtime.logging.Loggable; import jdk.nashorn.internal.runtime.logging.Logger; @@ -1141,6 +1142,12 @@ final class CodeGenerator extends NodeOperatorVisitor LARGE_STRING_THRESHOLD) { // use removeIndex for extremely long names + return load(name).dynamicRemoveIndex(flags); + } + + debug("dynamic_remove", name, Type.BOOLEAN, getProgramPoint(flags)); + + popType(Type.OBJECT); + // Type is widened to OBJECT then coerced back to BOOLEAN + method.visitInvokeDynamicInsn(NameCodec.encode(name), + Type.getMethodDescriptor(Type.OBJECT, Type.OBJECT), LINKERBOOTSTRAP, flags | dynRemoveOperation(isIndex)); + + pushType(Type.OBJECT); + convert(Type.BOOLEAN); //most probably a nop + + return this; + } + + /** * Dynamic getter for indexed structures. Pop index and receiver from stack, * generate appropriate signatures based on types * @@ -2341,6 +2366,35 @@ public class MethodEmitter { LINKERBOOTSTRAP, flags | NashornCallSiteDescriptor.SET_ELEMENT); } + /** + * Dynamic remover for indexed structures. Pop index and receiver from stack, + * generate appropriate signatures based on types + * + * @param flags call site flags for getter + * + * @return the method emitter + */ + MethodEmitter dynamicRemoveIndex(final int flags) { + debug("dynamic_remove_index", peekType(1), "[", peekType(), "]", getProgramPoint(flags)); + + Type index = peekType(); + if (index.isObject() || index.isBoolean()) { + index = Type.OBJECT; //e.g. string->object + convert(Type.OBJECT); + } + popType(); + + popType(Type.OBJECT); + + final String signature = Type.getMethodDescriptor(Type.OBJECT, Type.OBJECT /*e.g STRING->OBJECT*/, index); + + method.visitInvokeDynamicInsn(EMPTY_NAME, signature, LINKERBOOTSTRAP, flags | dynRemoveOperation(true)); + pushType(Type.OBJECT); + convert(Type.BOOLEAN); + + return this; + } + /** * Load a key value in the proper form. * @@ -2520,6 +2574,10 @@ public class MethodEmitter { return isIndex ? NashornCallSiteDescriptor.SET_ELEMENT : NashornCallSiteDescriptor.SET_PROPERTY; } + private static int dynRemoveOperation(final boolean isIndex) { + return isIndex ? NashornCallSiteDescriptor.REMOVE_ELEMENT : NashornCallSiteDescriptor.REMOVE_PROPERTY; + } + private Type emitLocalVariableConversion(final LocalVariableConversion conversion, final boolean onlySymbolLiveValue) { final Type from = conversion.getFrom(); final Type to = conversion.getTo(); diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/RuntimeNode.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/RuntimeNode.java index 76a9253ce30..afc52bf3f9a 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/RuntimeNode.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/RuntimeNode.java @@ -54,12 +54,6 @@ public class RuntimeNode extends Expression { TYPEOF, /** Reference error type */ REFERENCE_ERROR, - /** Delete operator */ - DELETE(TokenType.DELETE, Type.BOOLEAN, 1), - /** Delete operator for slow scopes */ - SLOW_DELETE(TokenType.DELETE, Type.BOOLEAN, 1, false), - /** Delete operator that always fails -- see Lower */ - FAIL_DELETE(TokenType.DELETE, Type.BOOLEAN, 1, false), /** === operator with at least one object */ EQ_STRICT(TokenType.EQ_STRICT, Type.BOOLEAN, 2, true), /** == operator with at least one object */ diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java index 40b8c67d9a6..3431a4ff8f8 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java @@ -189,6 +189,8 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { /** Method handle for generic property setter */ public static final Call GENERIC_SET = virtualCallNoLookup(ScriptObject.class, "set", void.class, Object.class, Object.class, int.class); + public static final Call DELETE = virtualCall(MethodHandles.lookup(), ScriptObject.class, "delete", boolean.class, Object.class, boolean.class); + static final MethodHandle[] SET_SLOW = new MethodHandle[] { findOwnMH_V("set", void.class, Object.class, int.class, int.class), findOwnMH_V("set", void.class, Object.class, double.class, int.class), @@ -202,6 +204,9 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { static final MethodHandle EXTENSION_CHECK = findOwnMH_V("extensionCheck", boolean.class, boolean.class, String.class); static final MethodHandle ENSURE_SPILL_SIZE = findOwnMH_V("ensureSpillSize", Object.class, int.class); + private static final GuardedInvocation DELETE_GUARDED = new GuardedInvocation(MH.insertArguments(DELETE.methodHandle(), 2, false), NashornGuards.getScriptObjectGuard()); + private static final GuardedInvocation DELETE_GUARDED_STRICT = new GuardedInvocation(MH.insertArguments(DELETE.methodHandle(), 2, true), NashornGuards.getScriptObjectGuard()); + /** * Constructor */ @@ -1869,6 +1874,13 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { return desc.getOperation() instanceof NamedOperation ? findSetMethod(desc, request) : findSetIndexMethod(desc, request); + case REMOVE: + final GuardedInvocation inv = NashornCallSiteDescriptor.isStrict(desc) ? DELETE_GUARDED_STRICT : DELETE_GUARDED; + final Object name = NamedOperation.getName(desc.getOperation()); + if (name != null) { + return inv.replaceMethods(MH.insertArguments(inv.getInvocation(), 1, name), inv.getGuard()); + } + return inv; case CALL: return findCallMethod(desc, request); case NEW: diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java index 8a914ddfd03..d82e03bb92e 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java @@ -135,6 +135,16 @@ public final class ScriptRuntime { */ public static final Call INVALIDATE_RESERVED_BUILTIN_NAME = staticCallNoLookup(ScriptRuntime.class, "invalidateReservedBuiltinName", void.class, String.class); + /** + * Used to perform failed delete under strict mode + */ + public static final Call STRICT_FAIL_DELETE = staticCallNoLookup(ScriptRuntime.class, "strictFailDelete", boolean.class, String.class); + + /** + * Used to find the scope for slow delete + */ + public static final Call SLOW_DELETE = staticCallNoLookup(ScriptRuntime.class, "slowDelete", boolean.class, ScriptObject.class, String.class); + /** * Converts a switch tag value to a simple integer. deflt value if it can't. * @@ -779,88 +789,41 @@ public final class ScriptRuntime { throw referenceError("cant.be.used.as.lhs", Objects.toString(msg)); } - /** - * ECMA 11.4.1 - delete operation, generic implementation - * - * @param obj object with property to delete - * @param property property to delete - * @param strict are we in strict mode - * - * @return true if property was successfully found and deleted - */ - public static boolean DELETE(final Object obj, final Object property, final Object strict) { - if (obj instanceof ScriptObject) { - return ((ScriptObject)obj).delete(property, Boolean.TRUE.equals(strict)); - } - - if (obj instanceof Undefined) { - return ((Undefined)obj).delete(property, false); - } - - if (obj == null) { - throw typeError("cant.delete.property", safeToString(property), "null"); - } - - if (obj instanceof ScriptObjectMirror) { - return ((ScriptObjectMirror)obj).delete(property); - } - - if (JSType.isPrimitive(obj)) { - return ((ScriptObject) JSType.toScriptObject(obj)).delete(property, Boolean.TRUE.equals(strict)); - } - - if (obj instanceof JSObject) { - ((JSObject)obj).removeMember(Objects.toString(property)); - return true; - } - - // if object is not reference type, vacuously delete is successful. - return true; - } - /** * ECMA 11.4.1 - delete operator, implementation for slow scopes * * This implementation of 'delete' walks the scope chain to find the scope that contains the - * property to be deleted, then invokes delete on it. + * property to be deleted, then invokes delete on it. Always used on scopes, never strict. * * @param obj top scope object * @param property property to delete - * @param strict are we in strict mode * * @return true if property was successfully found and deleted */ - public static boolean SLOW_DELETE(final Object obj, final Object property, final Object strict) { - if (obj instanceof ScriptObject) { - ScriptObject sobj = (ScriptObject) obj; - final String key = property.toString(); - while (sobj != null && sobj.isScope()) { - final FindProperty find = sobj.findProperty(key, false); - if (find != null) { - return sobj.delete(key, Boolean.TRUE.equals(strict)); - } - sobj = sobj.getProto(); + public static boolean slowDelete(final ScriptObject obj, final String property) { + ScriptObject sobj = obj; + while (sobj != null && sobj.isScope()) { + final FindProperty find = sobj.findProperty(property, false); + if (find != null) { + return sobj.delete(property, false); } + sobj = sobj.getProto(); } - return DELETE(obj, property, strict); + return obj.delete(property, false); } /** * ECMA 11.4.1 - delete operator, special case * - * This is 'delete' that always fails. We have to check strict mode and throw error. - * That is why this is a runtime function. Or else we could have inlined 'false'. + * This is 'delete' on a scope; it always fails under strict mode. + * It always throws an exception, but is declared to return a boolean + * to be compatible with the delete operator type. * * @param property property to delete - * @param strict are we in strict mode - * - * @return false always + * @return nothing, always throws an exception. */ - public static boolean FAIL_DELETE(final Object property, final Object strict) { - if (Boolean.TRUE.equals(strict)) { - throw syntaxError("strict.cant.delete", safeToString(property)); - } - return false; + public static boolean strictFailDelete(final String property) { + throw syntaxError("strict.cant.delete", property); } /** diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Undefined.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Undefined.java index 48a9f9251b4..5cb460d76f1 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Undefined.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Undefined.java @@ -112,6 +112,11 @@ public final class Undefined extends DefaultPropertyAccess { return findSetIndexMethod(desc); } return findSetMethod(desc); + case REMOVE: + if (!(desc.getOperation() instanceof NamedOperation)) { + return findDeleteIndexMethod(desc); + } + return findDeleteMethod(desc); default: } return null; @@ -124,6 +129,7 @@ public final class Undefined extends DefaultPropertyAccess { private static final MethodHandle GET_METHOD = findOwnMH("get", Object.class, Object.class); private static final MethodHandle SET_METHOD = MH.insertArguments(findOwnMH("set", void.class, Object.class, Object.class, int.class), 3, NashornCallSiteDescriptor.CALLSITE_STRICT); + private static final MethodHandle DELETE_METHOD = MH.insertArguments(findOwnMH("delete", boolean.class, Object.class, boolean.class), 2, false); private static GuardedInvocation findGetMethod(final CallSiteDescriptor desc) { return new GuardedInvocation(MH.insertArguments(GET_METHOD, 1, NashornCallSiteDescriptor.getOperand(desc)), UNDEFINED_GUARD).asType(desc); @@ -141,6 +147,15 @@ public final class Undefined extends DefaultPropertyAccess { return new GuardedInvocation(SET_METHOD, UNDEFINED_GUARD).asType(desc); } + private static GuardedInvocation findDeleteMethod(final CallSiteDescriptor desc) { + return new GuardedInvocation(MH.insertArguments(DELETE_METHOD, 1, NashornCallSiteDescriptor.getOperand(desc)), UNDEFINED_GUARD).asType(desc); + } + + private static GuardedInvocation findDeleteIndexMethod(final CallSiteDescriptor desc) { + return new GuardedInvocation(DELETE_METHOD, UNDEFINED_GUARD).asType(desc); + } + + @Override public Object get(final Object key) { throw typeError("cant.read.property.of.undefined", ScriptRuntime.safeToString(key)); diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java index 1200ebba363..eeb6edd3dd9 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java @@ -31,7 +31,7 @@ import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.util.Map; -import javax.script.Bindings; +import java.util.Objects; import jdk.dynalink.CallSiteDescriptor; import jdk.dynalink.Operation; import jdk.dynalink.StandardOperation; @@ -64,11 +64,10 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { return canLinkTypeStatic(type); } - static boolean canLinkTypeStatic(final Class type) { - // can link JSObject also handles Map, Bindings to make + private static boolean canLinkTypeStatic(final Class type) { + // can link JSObject also handles Map (this includes Bindings) to make // sure those are not JSObjects. return Map.class.isAssignableFrom(type) || - Bindings.class.isAssignableFrom(type) || JSObject.class.isAssignableFrom(type); } @@ -84,7 +83,7 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { if (self instanceof JSObject) { inv = lookup(desc, request, linkerServices); inv = inv.replaceMethods(linkerServices.filterInternalObjects(inv.getInvocation()), inv.getGuard()); - } else if (self instanceof Map || self instanceof Bindings) { + } else if (self instanceof Map) { // guard to make sure the Map or Bindings does not turn into JSObject later! final GuardedInvocation beanInv = nashornBeansLinker.getGuardedInvocation(request, linkerServices); inv = new GuardedInvocation(beanInv.getInvocation(), @@ -116,6 +115,13 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { return name != null ? findSetMethod(name) : findSetIndexMethod(); } break; + case REMOVE: + if (NashornCallSiteDescriptor.hasStandardNamespace(desc)) { + return new GuardedInvocation( + name == null ? JSOBJECTLINKER_DEL : MH.insertArguments(JSOBJECTLINKER_DEL, 1, name), + IS_JSOBJECT_GUARD); + } + break; case CALL: return findCallMethod(desc); case NEW: @@ -206,6 +212,15 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { } } + @SuppressWarnings("unused") + private static boolean del(final Object jsobj, final Object key) { + if (jsobj instanceof ScriptObjectMirror) { + return ((ScriptObjectMirror)jsobj).delete(key); + } + ((JSObject) jsobj).removeMember(Objects.toString(key)); + return true; + } + private static int getIndex(final Number n) { final double value = n.doubleValue(); return JSType.isRepresentableAsInt(value) ? (int)value : -1; @@ -245,6 +260,7 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { private static final MethodHandle IS_JSOBJECT_GUARD = findOwnMH_S("isJSObject", boolean.class, Object.class); private static final MethodHandle JSOBJECTLINKER_GET = findOwnMH_S("get", Object.class, MethodHandle.class, Object.class, Object.class); private static final MethodHandle JSOBJECTLINKER_PUT = findOwnMH_S("put", Void.TYPE, Object.class, Object.class, Object.class); + private static final MethodHandle JSOBJECTLINKER_DEL = findOwnMH_S("del", boolean.class, Object.class, Object.class); // method handles of JSObject class private static final MethodHandle JSOBJECT_GETMEMBER = findJSObjectMH_V("getMember", Object.class, String.class); diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java index bd4ab24fe27..481919317ad 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java @@ -39,11 +39,13 @@ import jdk.dynalink.CallSiteDescriptor; import jdk.dynalink.NamedOperation; import jdk.dynalink.Operation; import jdk.dynalink.beans.BeansLinker; +import jdk.dynalink.beans.StaticClass; import jdk.dynalink.linker.GuardedInvocation; import jdk.dynalink.linker.GuardingDynamicLinker; import jdk.dynalink.linker.GuardingTypeConverterFactory; import jdk.dynalink.linker.LinkRequest; import jdk.dynalink.linker.LinkerServices; +import jdk.dynalink.linker.support.Guards; import jdk.dynalink.linker.support.Lookup; import jdk.nashorn.internal.codegen.types.Type; import jdk.nashorn.internal.runtime.ECMAException; @@ -86,12 +88,16 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo MH.dropArguments(EMPTY_PROP_SETTER, 0, Object.class); private static final MethodHandle THROW_STRICT_PROPERTY_SETTER; + private static final MethodHandle THROW_STRICT_PROPERTY_REMOVER; private static final MethodHandle THROW_OPTIMISTIC_UNDEFINED; + private static final MethodHandle MISSING_PROPERTY_REMOVER; static { final Lookup lookup = new Lookup(MethodHandles.lookup()); THROW_STRICT_PROPERTY_SETTER = lookup.findOwnStatic("throwStrictPropertySetter", void.class, Object.class, Object.class); + THROW_STRICT_PROPERTY_REMOVER = lookup.findOwnStatic("throwStrictPropertyRemover", boolean.class, Object.class, Object.class); THROW_OPTIMISTIC_UNDEFINED = lookup.findOwnStatic("throwOptimisticUndefined", Object.class, int.class); + MISSING_PROPERTY_REMOVER = lookup.findOwnStatic("missingPropertyRemover", boolean.class, Object.class, Object.class); } private static GuardedInvocation linkBean(final LinkRequest linkRequest) throws Exception { @@ -124,6 +130,7 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo static MethodHandle linkMissingBeanMember(final LinkRequest linkRequest, final LinkerServices linkerServices) throws Exception { final CallSiteDescriptor desc = linkRequest.getCallSiteDescriptor(); final String operand = NashornCallSiteDescriptor.getOperand(desc); + final boolean strict = NashornCallSiteDescriptor.isStrict(desc); switch (NashornCallSiteDescriptor.getStandardOperation(desc)) { case GET: if (NashornCallSiteDescriptor.isOptimistic(desc)) { @@ -133,13 +140,17 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo } return getInvocation(EMPTY_ELEM_GETTER, linkerServices, desc); case SET: - final boolean strict = NashornCallSiteDescriptor.isStrict(desc); if (strict) { return adaptThrower(bindOperand(THROW_STRICT_PROPERTY_SETTER, operand), desc); } else if (operand != null) { return getInvocation(EMPTY_PROP_SETTER, linkerServices, desc); } return getInvocation(EMPTY_ELEM_SETTER, linkerServices, desc); + case REMOVE: + if (strict) { + return adaptThrower(bindOperand(THROW_STRICT_PROPERTY_REMOVER, operand), desc); + } + return getInvocation(bindOperand(MISSING_PROPERTY_REMOVER, operand), linkerServices, desc); default: throw new AssertionError("unknown call type " + desc); } @@ -162,6 +173,33 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo throw createTypeError(self, name, "cant.set.property"); } + @SuppressWarnings("unused") + private static boolean throwStrictPropertyRemover(final Object self, final Object name) { + if (isNonConfigurableProperty(self, name)) { + throw createTypeError(self, name, "cant.delete.property"); + } + return true; + } + + @SuppressWarnings("unused") + private static boolean missingPropertyRemover(final Object self, final Object name) { + return !isNonConfigurableProperty(self, name); + } + + // Corresponds to ECMAScript 5.1 8.12.7 [[Delete]] point 3 check for "isConfigurable" (but negated) + private static boolean isNonConfigurableProperty(final Object self, final Object name) { + if (self instanceof StaticClass) { + final Class clazz = ((StaticClass)self).getRepresentedClass(); + return BeansLinker.getReadableStaticPropertyNames(clazz).contains(name) || + BeansLinker.getWritableStaticPropertyNames(clazz).contains(name) || + BeansLinker.getStaticMethodNames(clazz).contains(name); + } + final Class clazz = self.getClass(); + return BeansLinker.getReadableInstancePropertyNames(clazz).contains(name) || + BeansLinker.getWritableInstancePropertyNames(clazz).contains(name) || + BeansLinker.getInstanceMethodNames(clazz).contains(name); + } + private static ECMAException createTypeError(final Object self, final Object name, final String msg) { return typeError(msg, String.valueOf(name), ScriptRuntime.safeToString(self)); } @@ -215,6 +253,8 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo throw typeError(NashornCallSiteDescriptor.isMethodFirstOperation(desc) ? "no.such.function" : "cant.get.property", getArgument(linkRequest), "null"); case SET: throw typeError("cant.set.property", getArgument(linkRequest), "null"); + case REMOVE: + throw typeError("cant.delete.property", getArgument(linkRequest), "null"); default: throw new AssertionError("unknown call type " + desc); } diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java index f01faa921a8..28db284c0ca 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java @@ -29,6 +29,7 @@ import static jdk.dynalink.StandardNamespace.ELEMENT; import static jdk.dynalink.StandardNamespace.METHOD; import static jdk.dynalink.StandardNamespace.PROPERTY; import static jdk.dynalink.StandardOperation.GET; +import static jdk.dynalink.StandardOperation.REMOVE; import static jdk.dynalink.StandardOperation.SET; import java.lang.invoke.MethodHandles; @@ -63,7 +64,7 @@ import jdk.nashorn.internal.runtime.ScriptRuntime; * form of static methods. */ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { - // Lowest three bits describe the operation + // Lowest four bits describe the operation /** Property getter operation {@code obj.prop} */ public static final int GET_PROPERTY = 0; /** Element getter operation {@code obj[index]} */ @@ -76,12 +77,16 @@ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { public static final int SET_PROPERTY = 4; /** Element setter operation {@code obj[index] = value} */ public static final int SET_ELEMENT = 5; + /** Property remove operation {@code delete obj.prop} */ + public static final int REMOVE_PROPERTY = 6; + /** Element remove operation {@code delete obj[index]} */ + public static final int REMOVE_ELEMENT = 7; /** Call operation {@code fn(args...)} */ - public static final int CALL = 6; + public static final int CALL = 8; /** New operation {@code new Constructor(args...)} */ - public static final int NEW = 7; + public static final int NEW = 9; - private static final int OPERATION_MASK = 7; + private static final int OPERATION_MASK = 15; // Correspond to the operation indices above. private static final Operation[] OPERATIONS = new Operation[] { @@ -91,42 +96,44 @@ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { GET.withNamespaces(METHOD, ELEMENT, PROPERTY), SET.withNamespaces(PROPERTY, ELEMENT), SET.withNamespaces(ELEMENT, PROPERTY), + REMOVE.withNamespaces(PROPERTY, ELEMENT), + REMOVE.withNamespaces(ELEMENT, PROPERTY), StandardOperation.CALL, StandardOperation.NEW }; /** Flags that the call site references a scope variable (it's an identifier reference or a var declaration, not a * property access expression. */ - public static final int CALLSITE_SCOPE = 1 << 3; + public static final int CALLSITE_SCOPE = 1 << 4; /** Flags that the call site is in code that uses ECMAScript strict mode. */ - public static final int CALLSITE_STRICT = 1 << 4; + public static final int CALLSITE_STRICT = 1 << 5; /** Flags that a property getter or setter call site references a scope variable that is located at a known distance * in the scope chain. Such getters and setters can often be linked more optimally using these assumptions. */ - public static final int CALLSITE_FAST_SCOPE = 1 << 5; + public static final int CALLSITE_FAST_SCOPE = 1 << 6; /** Flags that a callsite type is optimistic, i.e. we might get back a wider return value than encoded in the * descriptor, and in that case we have to throw an UnwarrantedOptimismException */ - public static final int CALLSITE_OPTIMISTIC = 1 << 6; + public static final int CALLSITE_OPTIMISTIC = 1 << 7; /** Is this really an apply that we try to call as a call? */ - public static final int CALLSITE_APPLY_TO_CALL = 1 << 7; + public static final int CALLSITE_APPLY_TO_CALL = 1 << 8; /** Does this a callsite for a variable declaration? */ - public static final int CALLSITE_DECLARE = 1 << 8; + public static final int CALLSITE_DECLARE = 1 << 9; /** Flags that the call site is profiled; Contexts that have {@code "profile.callsites"} boolean property set emit * code where call sites have this flag set. */ - public static final int CALLSITE_PROFILE = 1 << 9; + public static final int CALLSITE_PROFILE = 1 << 10; /** Flags that the call site is traced; Contexts that have {@code "trace.callsites"} property set emit code where * call sites have this flag set. */ - public static final int CALLSITE_TRACE = 1 << 10; + public static final int CALLSITE_TRACE = 1 << 11; /** Flags that the call site linkage miss (and thus, relinking) is traced; Contexts that have the keyword * {@code "miss"} in their {@code "trace.callsites"} property emit code where call sites have this flag set. */ - public static final int CALLSITE_TRACE_MISSES = 1 << 11; + public static final int CALLSITE_TRACE_MISSES = 1 << 12; /** Flags that entry/exit to/from the method linked at call site are traced; Contexts that have the keyword * {@code "enterexit"} in their {@code "trace.callsites"} property emit code where call sites have this flag set. */ - public static final int CALLSITE_TRACE_ENTEREXIT = 1 << 12; + public static final int CALLSITE_TRACE_ENTEREXIT = 1 << 13; /** Flags that values passed as arguments to and returned from the method linked at call site are traced; Contexts * that have the keyword {@code "values"} in their {@code "trace.callsites"} property emit code where call sites * have this flag set. */ - public static final int CALLSITE_TRACE_VALUES = 1 << 13; + public static final int CALLSITE_TRACE_VALUES = 1 << 14; //we could have more tracing flags here, for example CALLSITE_TRACE_SCOPE, but bits are a bit precious //right now given the program points @@ -138,10 +145,10 @@ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { * TODO: rethink if we need the various profile/trace flags or the linker can use the Context instead to query its * trace/profile settings. */ - public static final int CALLSITE_PROGRAM_POINT_SHIFT = 14; + public static final int CALLSITE_PROGRAM_POINT_SHIFT = 15; /** - * Maximum program point value. We have 18 bits left over after flags, and + * Maximum program point value. We have 17 bits left over after flags, and * it should be plenty. Program points are local to a single function. Every * function maps to a single JVM bytecode method that can have at most 65535 * bytes. (Large functions are synthetically split into smaller functions.) @@ -222,8 +229,10 @@ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { case 3: return "GET_METHOD_ELEMENT"; case 4: return "SET_PROPERTY"; case 5: return "SET_ELEMENT"; - case 6: return "CALL"; - case 7: return "NEW"; + case 6: return "REMOVE_PROPERTY"; + case 7: return "REMOVE_ELEMENT"; + case 8: return "CALL"; + case 9: return "NEW"; default: throw new AssertionError(); } } diff --git a/test/nashorn/script/basic/JDK-8193371.js b/test/nashorn/script/basic/JDK-8193371.js new file mode 100644 index 00000000000..615aa872df7 --- /dev/null +++ b/test/nashorn/script/basic/JDK-8193371.js @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2017 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8193371: Use Dynalink REMOVE operation in Nashorn + * + * @test + * @run + */ + +// This test exercises new functionality enabled by the issue, namely removal of elements from Java lists and maps. + +var ArrayList = java.util.ArrayList; +var HashMap = java.util.HashMap; +var listOf = java.util.List.of; +var mapOf = java.util.Map.of; + +// Remove from a list +(function() { + var a = new ArrayList(listOf("foo", "bar", "baz")); + Assert.assertFalse(delete a.add); + + // Delete actual element + Assert.assertTrue(delete a[1]); + Assert.assertEquals(a, listOf("foo", "baz")); + + // Gracefully ignore silly indices + Assert.assertTrue(delete a[5]); + Assert.assertTrue(delete a[-1]); + Assert.assertTrue(delete a["whatever"]); + Assert.assertTrue(delete a.whatever); + + // Gracefully ignore attempts at deleting methods and properties + Assert.assertFalse(delete a.add); + Assert.assertFalse(delete a.class); + + Assert.assertEquals(a, listOf("foo", "baz")); + + print("List passed.") +})(); + +// Remove from a list, strict +(function() { + "use strict"; + + var a = new ArrayList(listOf("foo", "bar", "baz")); + + // Delete actual element + Assert.assertTrue(delete a[1]); + Assert.assertEquals(a, listOf("foo", "baz")); + + // Gracefully ignore silly indices + Assert.assertTrue(delete a[5]); + Assert.assertTrue(delete a[-1]); + Assert.assertTrue(delete a["whatever"]); + Assert.assertTrue(delete a.whatever); + + // Fail deleting methods and properties + try { delete a.add; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + try { delete a.class; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + + Assert.assertEquals(a, listOf("foo", "baz")); + + print("Strict list passed.") +})(); + +// Remove from a map +(function() { + var m = new HashMap(mapOf("a", 1, "b", 2, "c", 3)); + + // Delete actual elements + Assert.assertTrue(delete m.a); + Assert.assertEquals(m, mapOf("b", 2, "c", 3)); + var key = "b" + Assert.assertTrue(delete m[key]); + Assert.assertEquals(m, mapOf("c", 3)); + + // Gracefully ignore silly indices + Assert.assertTrue(delete m.x); + Assert.assertTrue(delete m[5]); + Assert.assertTrue(delete m[-1]); + Assert.assertTrue(delete m["whatever"]); + + // Gracefully ignore attempts at deleting methods and properties + Assert.assertFalse(delete m.put); + Assert.assertFalse(delete m.class); + + Assert.assertEquals(m, mapOf("c", 3)); + print("Map passed.") +})(); + +// Remove from a map, strict +(function() { + "use strict"; + + var m = new HashMap(mapOf("a", 1, "b", 2, "c", 3)); + + // Delete actual elements + Assert.assertTrue(delete m.a); + Assert.assertEquals(m, mapOf("b", 2, "c", 3)); + var key = "b" + Assert.assertTrue(delete m[key]); + Assert.assertEquals(m, mapOf("c", 3)); + + // Gracefully ignore silly indices + Assert.assertTrue(delete m.x); + Assert.assertTrue(delete m[5]); + Assert.assertTrue(delete m[-1]); + Assert.assertTrue(delete m["whatever"]); + + // Fail deleting methods and properties + try { delete m.size; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + try { delete m.class; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + + // Somewhat counterintuitive, but if we define an element of a map, we can + // delete it, however then the method surfaces, and we can't delete that. + m.size = 4 + Assert.assertTrue(delete m.size) + try { delete m.size; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + + Assert.assertEquals(m, mapOf("c", 3)); + + print("Strict map passed.") +})(); + +// Remove from arrays and beans +(function() { + var a = new (Java.type("int[]"))(2) + a[0] = 42 + a[1] = 13 + + // Huh, Dynalink doesn't expose .clone() on Java arrays? + var c = new (Java.type("int[]"))(2) + c[0] = 42 + c[1] = 13 + + // passes vacuously, but does nothing + Assert.assertTrue(delete a[0]) + Assert.assertEquals(a, c); + + var b = new java.util.BitSet() + b.set(2) + // does nothing + Assert.assertFalse(delete b.get) + // Method is still there and operational + Assert.assertTrue(b.get(2)) + + // passes vacuously for non-existant property + Assert.assertTrue(delete b.foo) + + // statics + var Calendar = java.util.Calendar + Assert.assertFalse(delete Calendar.UNDECIMBER) // field + Assert.assertFalse(delete Calendar.availableLocales) // property + Assert.assertFalse(delete Calendar.getInstance) // method + Assert.assertTrue(delete Calendar.BLAH) // no such thing + + print("Beans passed.") +})(); + +// Remove from arrays and beans, strict +(function() { + "use strict"; + + var a = new (Java.type("int[]"))(2) + a[0] = 42 + a[1] = 13 + + var c = new (Java.type("int[]"))(2) + c[0] = 42 + c[1] = 13 + + // passes vacuously, but does nothing + Assert.assertTrue(delete a[0]) + Assert.assertEquals(a, c); + + var b = new java.util.BitSet() + b.set(2) + // fails to delete a method + try { delete b.get; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + // Method is still there and operational + Assert.assertTrue(b.get(2)) + + // passes vacuously for non-existant property + Assert.assertTrue(delete b.foo) + + // statics + var Calendar = java.util.Calendar + try { delete Calendar.UNDECIMBER; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + try { delete Calendar.availableLocales; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + try { delete Calendar.getInstance; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + Assert.assertTrue(delete Calendar.BLAH) // no such thing + + print("Strict beans passed.") +})(); diff --git a/test/nashorn/script/basic/JDK-8193371.js.EXPECTED b/test/nashorn/script/basic/JDK-8193371.js.EXPECTED new file mode 100644 index 00000000000..0cca3c6ac30 --- /dev/null +++ b/test/nashorn/script/basic/JDK-8193371.js.EXPECTED @@ -0,0 +1,6 @@ +List passed. +Strict list passed. +Map passed. +Strict map passed. +Beans passed. +Strict beans passed. From 038b5f571c5cd4f2d615ffbfe4973b10966cb729 Mon Sep 17 00:00:00 2001 From: Paul Sandoz Date: Wed, 20 Dec 2017 09:14:06 -0800 Subject: [PATCH 30/88] 8191913: Bump classfile version number to 55 Co-authored-by: Erik Joelsson Reviewed-by: dholmes, darcy --- make/Main.gmk | 7 +-- make/autoconf/buildjdk-spec.gmk.in | 1 + make/autoconf/flags.m4 | 4 +- make/autoconf/generated-configure.sh | 51 +++++++++++-------- make/autoconf/jdk-version.m4 | 7 +++ make/autoconf/platform.m4 | 8 +++ make/autoconf/spec.gmk.in | 9 ++++ make/autoconf/version-numbers | 2 + make/copy/Copy-java.base.gmk | 14 +++++ make/copy/CopyCommon.gmk | 14 ++--- make/gensrc/GensrcX11Wrappers.gmk | 8 +-- make/hotspot/lib/CompileJvm.gmk | 4 +- .../share/classfile/classFileParser.cpp | 12 ++--- .../com/sun/java/util/jar/pack/Constants.java | 6 ++- .../jdk/internal/module/ModuleInfo.java | 2 +- .../org/objectweb/asm/ClassReader.java | 2 +- .../internal/org/objectweb/asm/Opcodes.java | 1 + ...tants.h => classfile_constants.h.template} | 6 +-- src/java.base/share/native/libjava/System.c | 7 +-- .../com/sun/tools/javac/jvm/ClassFile.java | 3 +- .../com/sun/tools/javac/jvm/Target.java | 2 +- .../replacements/classfile/Classfile.java | 2 +- .../sun/tools/java/RuntimeConstants.java | 2 +- .../runtime/classFileParserBug/Class55.jasm | 43 ++++++++++++++++ .../lang/module/ClassFileVersionsTest.java | 8 ++- .../tools/javac/6330997/T6330997.java | 4 +- .../javac/classfiles/ClassVersionChecker.java | 15 +++--- .../tools/javac/versions/Versions.java | 23 +++++---- 28 files changed, 184 insertions(+), 83 deletions(-) rename src/java.base/share/native/include/{classfile_constants.h => classfile_constants.h.template} (99%) create mode 100644 test/hotspot/jtreg/runtime/classFileParserBug/Class55.jasm diff --git a/make/Main.gmk b/make/Main.gmk index 9e4917b4553..0dc06bd98ef 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -637,7 +637,7 @@ else # Declare dependencies between hotspot-* targets $(foreach v, $(JVM_VARIANTS), \ $(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \ - $(eval hotspot-$v-libs: hotspot-$v-gensrc) \ + $(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \ ) hotspot-ide-project: hotspot exploded-image @@ -691,8 +691,9 @@ else jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc # The swing beans need to have java base properly generated to avoid errors - # in javadoc. - java.desktop-gensrc-src: java.base-gensrc + # in javadoc. The X11 wrappers need the java.base include files to have been + # copied and processed. + java.desktop-gensrc-src: java.base-gensrc java.base-copy # The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler # needs classes from the current JDK. diff --git a/make/autoconf/buildjdk-spec.gmk.in b/make/autoconf/buildjdk-spec.gmk.in index aceaef7c452..b01d00b7c35 100644 --- a/make/autoconf/buildjdk-spec.gmk.in +++ b/make/autoconf/buildjdk-spec.gmk.in @@ -55,6 +55,7 @@ OPENJDK_TARGET_CPU_ARCH := @OPENJDK_BUILD_CPU_ARCH@ OPENJDK_TARGET_CPU_BITS := @OPENJDK_BUILD_CPU_BITS@ OPENJDK_TARGET_CPU_ENDIAN := @OPENJDK_BUILD_CPU_ENDIAN@ OPENJDK_TARGET_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@ +OPENJDK_TARGET_OS_INCLUDE_SUBDIR := @OPENJDK_BUILD_OS_INCLUDE_SUBDIR@ HOTSPOT_TARGET_OS := @HOTSPOT_BUILD_OS@ HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_BUILD_OS_TYPE@ diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4 index b1c2982aa65..85a014bdbd5 100644 --- a/make/autoconf/flags.m4 +++ b/make/autoconf/flags.m4 @@ -1162,9 +1162,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER], # Setup some hard coded includes $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \ - -I${TOPDIR}/src/java.base/share/native/include \ - -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS/native/include \ - -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/include \ + -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \ -I${TOPDIR}/src/java.base/share/native/libjava \ -I${TOPDIR}/src/java.base/$OPENJDK_$1_OS_TYPE/native/libjava \ -I${TOPDIR}/src/hotspot/share/include \ diff --git a/make/autoconf/generated-configure.sh b/make/autoconf/generated-configure.sh index e11acdc166a..224b90c8025 100644 --- a/make/autoconf/generated-configure.sh +++ b/make/autoconf/generated-configure.sh @@ -887,6 +887,8 @@ JAVA BOOT_JDK JAVA_CHECK JAVAC_CHECK +VERSION_CLASSFILE_MINOR +VERSION_CLASSFILE_MAJOR VENDOR_VERSION_STRING VERSION_DATE VERSION_IS_GA @@ -968,6 +970,7 @@ JDK_VARIANT USERNAME TOPDIR PATH_SEP +OPENJDK_BUILD_OS_INCLUDE_SUBDIR HOTSPOT_BUILD_CPU_DEFINE HOTSPOT_BUILD_CPU_ARCH HOTSPOT_BUILD_CPU @@ -978,6 +981,7 @@ OPENJDK_BUILD_CPU_OSARCH OPENJDK_BUILD_CPU_ISADIR OPENJDK_BUILD_CPU_LEGACY_LIB OPENJDK_BUILD_CPU_LEGACY +OPENJDK_TARGET_OS_INCLUDE_SUBDIR HOTSPOT_TARGET_CPU_DEFINE HOTSPOT_TARGET_CPU_ARCH HOTSPOT_TARGET_CPU @@ -1093,7 +1097,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -1383,7 +1386,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1636,15 +1638,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1782,7 +1775,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1935,7 +1928,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -5185,7 +5177,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1513206608 +DATE_WHEN_GENERATED=1513362567 ############################################################################### # @@ -16316,6 +16308,14 @@ $as_echo "$COMPILE_TYPE" >&6; } fi + # For historical reasons, the OS include directories have odd names. + OPENJDK_TARGET_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS" + if test "x$OPENJDK_TARGET_OS" = "xwindows"; then + OPENJDK_TARGET_OS_INCLUDE_SUBDIR="win32" + elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then + OPENJDK_TARGET_OS_INCLUDE_SUBDIR="darwin" + fi + # Also store the legacy naming of the cpu. @@ -16467,6 +16467,14 @@ $as_echo "$COMPILE_TYPE" >&6; } fi + # For historical reasons, the OS include directories have odd names. + OPENJDK_BUILD_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS" + if test "x$OPENJDK_TARGET_OS" = "xwindows"; then + OPENJDK_BUILD_OS_INCLUDE_SUBDIR="win32" + elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then + OPENJDK_BUILD_OS_INCLUDE_SUBDIR="darwin" + fi + @@ -25457,6 +25465,10 @@ fi VENDOR_VERSION_STRING="$with_vendor_version_string" fi + # We could define --with flags for these, if really needed + VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR" + VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5 $as_echo_n "checking for version string... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5 @@ -25478,6 +25490,9 @@ $as_echo "$VERSION_STRING" >&6; } + + + ############################################################################### # # Setup BootJDK, used to bootstrap the build. @@ -52888,9 +52903,7 @@ fi # Setup some hard coded includes COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \ - -I${TOPDIR}/src/java.base/share/native/include \ - -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \ - -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \ + -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \ -I${TOPDIR}/src/java.base/share/native/libjava \ -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \ -I${TOPDIR}/src/hotspot/share/include \ @@ -53771,9 +53784,7 @@ fi # Setup some hard coded includes OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \ -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \ - -I${TOPDIR}/src/java.base/share/native/include \ - -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \ - -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \ + -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \ -I${TOPDIR}/src/java.base/share/native/libjava \ -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava \ -I${TOPDIR}/src/hotspot/share/include \ diff --git a/make/autoconf/jdk-version.m4 b/make/autoconf/jdk-version.m4 index dff742576b1..772dc592d7b 100644 --- a/make/autoconf/jdk-version.m4 +++ b/make/autoconf/jdk-version.m4 @@ -331,6 +331,10 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS], VENDOR_VERSION_STRING="$with_vendor_version_string" fi + # We could define --with flags for these, if really needed + VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR" + VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR" + AC_MSG_CHECKING([for version string]) AC_MSG_RESULT([$VERSION_STRING]) @@ -348,4 +352,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS], AC_SUBST(VERSION_IS_GA) AC_SUBST(VERSION_DATE) AC_SUBST(VENDOR_VERSION_STRING) + AC_SUBST(VERSION_CLASSFILE_MAJOR) + AC_SUBST(VERSION_CLASSFILE_MINOR) + ]) diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4 index f62f94daace..654ce9b2b4e 100644 --- a/make/autoconf/platform.m4 +++ b/make/autoconf/platform.m4 @@ -478,6 +478,14 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER], fi AC_SUBST(HOTSPOT_$1_CPU_DEFINE) + # For historical reasons, the OS include directories have odd names. + OPENJDK_$1_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS" + if test "x$OPENJDK_TARGET_OS" = "xwindows"; then + OPENJDK_$1_OS_INCLUDE_SUBDIR="win32" + elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then + OPENJDK_$1_OS_INCLUDE_SUBDIR="darwin" + fi + AC_SUBST(OPENJDK_$1_OS_INCLUDE_SUBDIR) ]) AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES], diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in index 23fcefca74e..383a0f83f33 100644 --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in @@ -78,6 +78,7 @@ OPENJDK_TARGET_CPU_ISADIR:=@OPENJDK_TARGET_CPU_ISADIR@ OPENJDK_TARGET_CPU_LEGACY:=@OPENJDK_TARGET_CPU_LEGACY@ OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@ OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@ +OPENJDK_TARGET_OS_INCLUDE_SUBIDR:=@OPENJDK_TARGET_OS_INCLUDE_SUBDIR@ HOTSPOT_TARGET_OS := @HOTSPOT_TARGET_OS@ HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_TARGET_OS_TYPE@ @@ -100,6 +101,8 @@ OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@ OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@ OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@ +OPENJDK_BUILD_OS_INCLUDE_SUBIDR:=@OPENJDK_TARGET_OS_INCLUDE_SUBDIR@ + # Target platform value in ModuleTarget class file attribute. OPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@ @@ -175,6 +178,10 @@ VERSION_DATE := @VERSION_DATE@ # Vendor version string VENDOR_VERSION_STRING := @VENDOR_VERSION_STRING@ +# Class-file version +VERSION_CLASSFILE_MAJOR := @VERSION_CLASSFILE_MAJOR@ +VERSION_CLASSFILE_MINOR := @VERSION_CLASSFILE_MINOR@ + # Convenience CFLAGS settings for passing version information into native programs. VERSION_CFLAGS := \ -DVERSION_FEATURE=$(VERSION_FEATURE) \ @@ -190,6 +197,8 @@ VERSION_CFLAGS := \ -DVERSION_SPECIFICATION='"$(VERSION_SPECIFICATION)"' \ -DVERSION_DATE='"$(VERSION_DATE)"' \ -DVENDOR_VERSION_STRING='"$(VENDOR_VERSION_STRING)"' \ + -DVERSION_CLASSFILE_MAJOR=$(VERSION_CLASSFILE_MAJOR) \ + -DVERSION_CLASSFILE_MINOR=$(VERSION_CLASSFILE_MINOR) \ # # Platform naming variables diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers index 60d565c1805..fb748470c00 100644 --- a/make/autoconf/version-numbers +++ b/make/autoconf/version-numbers @@ -30,6 +30,8 @@ DEFAULT_VERSION_INTERIM=0 DEFAULT_VERSION_UPDATE=0 DEFAULT_VERSION_PATCH=0 DEFAULT_VERSION_DATE=2018-03-20 +DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" +DEFAULT_VERSION_CLASSFILE_MINOR=0 LAUNCHER_NAME=openjdk PRODUCT_NAME=OpenJDK diff --git a/make/copy/Copy-java.base.gmk b/make/copy/Copy-java.base.gmk index 74759879179..096f6c0e903 100644 --- a/make/copy/Copy-java.base.gmk +++ b/make/copy/Copy-java.base.gmk @@ -24,6 +24,7 @@ # include CopyCommon.gmk +include TextFileProcessing.gmk $(eval $(call IncludeCustomExtension, copy/Copy-java.base.gmk)) @@ -244,3 +245,16 @@ ifeq ($(ENABLE_LIBFFI_BUNDLING), true) endif ################################################################################ +# Generate classfile_constants.h + +$(eval $(call SetupTextFileProcessing, CREATE_CLASSFILE_CONSTANTS_H, \ + SOURCE_FILES := $(TOPDIR)/src/java.base/share/native/include/classfile_constants.h.template, \ + OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/modules_include/java.base/classfile_constants.h, \ + REPLACEMENTS := \ + @@VERSION_CLASSFILE_MAJOR@@ => $(VERSION_CLASSFILE_MAJOR) ; \ + @@VERSION_CLASSFILE_MINOR@@ => $(VERSION_CLASSFILE_MINOR) ; , \ +)) + +TARGETS += $(CREATE_CLASSFILE_CONSTANTS_H) + +################################################################################ diff --git a/make/copy/CopyCommon.gmk b/make/copy/CopyCommon.gmk index 2956e9ddf92..6d4cdbaf747 100644 --- a/make/copy/CopyCommon.gmk +++ b/make/copy/CopyCommon.gmk @@ -39,20 +39,12 @@ ifneq ($(wildcard $(INCLUDE_SOURCE_DIR)/*), ) $(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE, \ SRC := $(INCLUDE_SOURCE_DIR), \ DEST := $(INCLUDE_TARGET_DIR), \ - FILES := $(shell $(FIND) $(INCLUDE_SOURCE_DIR) -type f), \ + FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_DIR))), \ )) TARGETS += $(COPY_EXPORTED_INCLUDE) endif -# For historical reasons, the OS include directories have odd names. -INCLUDE_TARGET_OS_SUBDIR := $(OPENJDK_TARGET_OS) -ifeq ($(OPENJDK_TARGET_OS), windows) - INCLUDE_TARGET_OS_SUBDIR := win32 -else ifeq ($(OPENJDK_TARGET_OS), macosx) - INCLUDE_TARGET_OS_SUBDIR := darwin -endif - # Use the most specific of OS and OS_TYPE. INCLUDE_SOURCE_OS_DIR := $(TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/native/include ifeq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), ) @@ -62,8 +54,8 @@ endif ifneq ($(wildcard $(INCLUDE_SOURCE_OS_DIR)/*), ) $(eval $(call SetupCopyFiles, COPY_EXPORTED_INCLUDE_OS, \ SRC := $(INCLUDE_SOURCE_OS_DIR), \ - DEST := $(INCLUDE_TARGET_DIR)/$(INCLUDE_TARGET_OS_SUBDIR), \ - FILES := $(shell $(FIND) $(INCLUDE_SOURCE_OS_DIR) -type f), \ + DEST := $(INCLUDE_TARGET_DIR)/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR), \ + FILES := $(filter %.h, $(call CacheFind, $(INCLUDE_SOURCE_OS_DIR))), \ )) TARGETS += $(COPY_EXPORTED_INCLUDE_OS) diff --git a/make/gensrc/GensrcX11Wrappers.gmk b/make/gensrc/GensrcX11Wrappers.gmk index e506c5c01ff..ca95d0edae9 100644 --- a/make/gensrc/GensrcX11Wrappers.gmk +++ b/make/gensrc/GensrcX11Wrappers.gmk @@ -92,10 +92,10 @@ ifneq ($(COMPILE_TYPE), cross) endif SIZER_CFLAGS := \ - -I${TOPDIR}/src/hotspot/share/include \ - -I${TOPDIR}/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \ - -I$(TOPDIR)/src/java.base/share/native/include \ - -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \ + -I$(TOPDIR)/src/hotspot/share/include \ + -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \ + -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \ + -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \ -I$(TOPDIR)/src/java.base/share/native/libjava \ -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ -I$(TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_TYPE)/native/common/awt \ diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk index 77ee5d99df1..7be0c043f4a 100644 --- a/make/hotspot/lib/CompileJvm.gmk +++ b/make/hotspot/lib/CompileJvm.gmk @@ -59,8 +59,8 @@ JVM_CFLAGS_INCLUDES += \ -I$(TOPDIR)/src/hotspot/share/precompiled \ -I$(TOPDIR)/src/hotspot/share/include \ -I$(TOPDIR)/src/hotspot/os/$(HOTSPOT_TARGET_OS_TYPE)/include \ - -I$(TOPDIR)/src/java.base/share/native/include \ - -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/include \ + -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base \ + -I$(SUPPORT_OUTPUTDIR)/modules_include/java.base/$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \ -I$(TOPDIR)/src/java.base/share/native/libjimage \ # diff --git a/src/hotspot/share/classfile/classFileParser.cpp b/src/hotspot/share/classfile/classFileParser.cpp index 6326ca1e76a..e39d0ee7d66 100644 --- a/src/hotspot/share/classfile/classFileParser.cpp +++ b/src/hotspot/share/classfile/classFileParser.cpp @@ -86,8 +86,6 @@ #define JAVA_CLASSFILE_MAGIC 0xCAFEBABE #define JAVA_MIN_SUPPORTED_VERSION 45 -#define JAVA_MAX_SUPPORTED_VERSION 54 -#define JAVA_MAX_SUPPORTED_MINOR_VERSION 0 // Used for two backward compatibility reasons: // - to check for new additions to the class file format in JDK1.5 @@ -110,6 +108,8 @@ #define JAVA_10_VERSION 54 +#define JAVA_11_VERSION 55 + void ClassFileParser::set_class_bad_constant_seen(short bad_constant) { assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION, "Unexpected bad constant pool entry"); @@ -4642,11 +4642,11 @@ static bool has_illegal_visibility(jint flags) { } static bool is_supported_version(u2 major, u2 minor){ - const u2 max_version = JAVA_MAX_SUPPORTED_VERSION; + const u2 max_version = JVM_CLASSFILE_MAJOR_VERSION; return (major >= JAVA_MIN_SUPPORTED_VERSION) && (major <= max_version) && ((major != max_version) || - (minor <= JAVA_MAX_SUPPORTED_MINOR_VERSION)); + (minor <= JVM_CLASSFILE_MINOR_VERSION)); } void ClassFileParser::verify_legal_field_modifiers(jint flags, @@ -5808,8 +5808,8 @@ void ClassFileParser::parse_stream(const ClassFileStream* const stream, _class_name->as_C_string(), _major_version, _minor_version, - JAVA_MAX_SUPPORTED_VERSION, - JAVA_MAX_SUPPORTED_MINOR_VERSION); + JVM_CLASSFILE_MAJOR_VERSION, + JVM_CLASSFILE_MINOR_VERSION); return; } diff --git a/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java b/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java index 5eb79adb6ae..6d2922fb337 100644 --- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java +++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Constants.java @@ -48,6 +48,7 @@ class Constants { 1.8 to 1.8.X 52,0 1.9 to 1.9.X 53,0 1.10 to 1.10.X 54,0 + 1.11 to 1.11.X 55,0 */ public static final Package.Version JAVA_MIN_CLASS_VERSION = @@ -71,6 +72,9 @@ class Constants { public static final Package.Version JAVA10_MAX_CLASS_VERSION = Package.Version.of(54, 00); + public static final Package.Version JAVA11_MAX_CLASS_VERSION = + Package.Version.of(55, 00); + public static final int JAVA_PACKAGE_MAGIC = 0xCAFED00D; public static final Package.Version JAVA5_PACKAGE_VERSION = @@ -87,7 +91,7 @@ class Constants { // upper limit, should point to the latest class version public static final Package.Version JAVA_MAX_CLASS_VERSION = - JAVA10_MAX_CLASS_VERSION; + JAVA11_MAX_CLASS_VERSION; // upper limit should point to the latest package version, for version info!. public static final Package.Version MAX_PACKAGE_VERSION = diff --git a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java b/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java index 942af76b69d..230695206f0 100644 --- a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java +++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java @@ -64,7 +64,7 @@ import static jdk.internal.module.ClassFileConstants.*; public final class ModuleInfo { private final int JAVA_MIN_SUPPORTED_VERSION = 53; - private final int JAVA_MAX_SUPPORTED_VERSION = 54; + private final int JAVA_MAX_SUPPORTED_VERSION = 55; private static final JavaLangModuleAccess JLMA = SharedSecrets.getJavaLangModuleAccess(); diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java index 47e1f6d4b15..22b475f9db9 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java @@ -185,7 +185,7 @@ public class ClassReader { public ClassReader(final byte[] b, final int off, final int len) { this.b = b; // checks the class version - if (readShort(off + 6) > Opcodes.V10) { + if (readShort(off + 6) > Opcodes.V11) { throw new IllegalArgumentException(); } // parses the constant pool diff --git a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java index 7ce9d9210c8..8b3ab18626c 100644 --- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java +++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/Opcodes.java @@ -90,6 +90,7 @@ public interface Opcodes { int V1_8 = 0 << 16 | 52; int V9 = 0 << 16 | 53; int V10 = 0 << 16 | 54; + int V11 = 0 << 16 | 55; // access flags diff --git a/src/java.base/share/native/include/classfile_constants.h b/src/java.base/share/native/include/classfile_constants.h.template similarity index 99% rename from src/java.base/share/native/include/classfile_constants.h rename to src/java.base/share/native/include/classfile_constants.h.template index 3b63f31c6e8..1046b54b37a 100644 --- a/src/java.base/share/native/include/classfile_constants.h +++ b/src/java.base/share/native/include/classfile_constants.h.template @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2017, 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 @@ -31,8 +31,8 @@ extern "C" { #endif /* Classfile version number for this information */ -#define JVM_CLASSFILE_MAJOR_VERSION 54 -#define JVM_CLASSFILE_MINOR_VERSION 0 +#define JVM_CLASSFILE_MAJOR_VERSION @@VERSION_CLASSFILE_MAJOR@@ +#define JVM_CLASSFILE_MINOR_VERSION @@VERSION_CLASSFILE_MINOR@@ /* Flags */ diff --git a/src/java.base/share/native/libjava/System.c b/src/java.base/share/native/libjava/System.c index 07e638862db..ea432ff6f8e 100644 --- a/src/java.base/share/native/libjava/System.c +++ b/src/java.base/share/native/libjava/System.c @@ -114,9 +114,6 @@ Java_java_lang_System_identityHashCode(JNIEnv *env, jobject this, jobject x) #define VENDOR_URL_BUG "http://bugreport.java.com/bugreport/" #endif -#define JAVA_MAX_SUPPORTED_VERSION 54 -#define JAVA_MAX_SUPPORTED_MINOR_VERSION 0 - #ifdef JAVA_SPECIFICATION_VENDOR /* Third party may NOT overwrite this. */ #error "ERROR: No override of JAVA_SPECIFICATION_VENDOR is allowed" #else @@ -219,8 +216,8 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props) PUTPROP(props, "java.vendor.url", VENDOR_URL); PUTPROP(props, "java.vendor.url.bug", VENDOR_URL_BUG); - jio_snprintf(buf, sizeof(buf), "%d.%d", JAVA_MAX_SUPPORTED_VERSION, - JAVA_MAX_SUPPORTED_MINOR_VERSION); + jio_snprintf(buf, sizeof(buf), "%d.%d", JVM_CLASSFILE_MAJOR_VERSION, + JVM_CLASSFILE_MINOR_VERSION); PUTPROP(props, "java.class.version", buf); if (sprops->awt_toolkit) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java index 6e80995e509..bdb8a8bafa3 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassFile.java @@ -111,7 +111,8 @@ public class ClassFile { V51(51, 0), // JDK 1.7 V52(52, 0), // JDK 1.8: lambda, type annos, param names V53(53, 0), // JDK 1.9: modules, indy string concat - V54(54, 0); // JDK 10 + V54(54, 0), // JDK 10 + V55(55, 0); // JDK 11: constant dynamic Version(int major, int minor) { this.major = major; this.minor = minor; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java index 418d0746088..2c7654df778 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java @@ -67,7 +67,7 @@ public enum Target { JDK1_10("1.10", 54, 0), /** JDK 11. */ - JDK1_11("11", 54, 0); // Initially an alias for JDK_10 + JDK1_11("11", 55, 0); private static final Context.Key targetKey = new Context.Key<>(); diff --git a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java index c983a1b466c..48cacb64383 100644 --- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java +++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java @@ -47,7 +47,7 @@ public class Classfile { private final List codeAttributes; private static final int MAJOR_VERSION_JAVA_MIN = 51; - private static final int MAJOR_VERSION_JAVA_MAX = 54; + private static final int MAJOR_VERSION_JAVA_MAX = 55; private static final int MAGIC = 0xCAFEBABE; /** diff --git a/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java b/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java index 85b903d670a..8216220d5d8 100644 --- a/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java +++ b/src/jdk.rmic/share/classes/sun/tools/java/RuntimeConstants.java @@ -67,7 +67,7 @@ public interface RuntimeConstants { /* Class File Constants */ int JAVA_MAGIC = 0xcafebabe; int JAVA_MIN_SUPPORTED_VERSION = 45; - int JAVA_MAX_SUPPORTED_VERSION = 54; + int JAVA_MAX_SUPPORTED_VERSION = 55; int JAVA_MAX_SUPPORTED_MINOR_VERSION = 0; /* Generate class file version for 1.1 by default */ diff --git a/test/hotspot/jtreg/runtime/classFileParserBug/Class55.jasm b/test/hotspot/jtreg/runtime/classFileParserBug/Class55.jasm new file mode 100644 index 00000000000..42af9b3206c --- /dev/null +++ b/test/hotspot/jtreg/runtime/classFileParserBug/Class55.jasm @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8173382 + * @summary Check that the JVM accepts class files with version 55 + * @run main Class55 + */ + +super public class Class55 version 55:0 { + + public Method "":"()V" stack 1 locals 1 { + aload_0; + invokespecial Method java/lang/Object."":"()V"; + return; + } + + public static Method main:"([Ljava/lang/String;)V" stack 0 locals 1 { + return; + } + +} // end Class Class55 diff --git a/test/jdk/java/lang/module/ClassFileVersionsTest.java b/test/jdk/java/lang/module/ClassFileVersionsTest.java index c7808adb223..e5a74e30a38 100644 --- a/test/jdk/java/lang/module/ClassFileVersionsTest.java +++ b/test/jdk/java/lang/module/ClassFileVersionsTest.java @@ -54,6 +54,8 @@ public class ClassFileVersionsTest { { 53, 0, Set.of(STATIC, TRANSITIVE) }, { 54, 0, Set.of() }, // JDK 10 + + { 55, 0, Set.of()}, // JDK 11 }; } @@ -69,7 +71,11 @@ public class ClassFileVersionsTest { { 54, 0, Set.of(TRANSITIVE) }, { 54, 0, Set.of(STATIC, TRANSITIVE) }, - { 55, 0, Set.of()}, // JDK 11 + { 55, 0, Set.of(STATIC) }, // JDK 11 + { 55, 0, Set.of(TRANSITIVE) }, + { 55, 0, Set.of(STATIC, TRANSITIVE) }, + + { 56, 0, Set.of()}, // JDK 12 }; } diff --git a/test/langtools/tools/javac/6330997/T6330997.java b/test/langtools/tools/javac/6330997/T6330997.java index 3e4d8e535ed..fdaf5db698e 100644 --- a/test/langtools/tools/javac/6330997/T6330997.java +++ b/test/langtools/tools/javac/6330997/T6330997.java @@ -32,8 +32,8 @@ * jdk.compiler/com.sun.tools.javac.main * jdk.compiler/com.sun.tools.javac.util * @clean T1 T2 - * @compile -source 10 -target 10 T1.java - * @compile -source 10 -target 10 T2.java + * @compile -source 10 -target 11 T1.java + * @compile -source 10 -target 11 T2.java * @run main/othervm T6330997 */ diff --git a/test/langtools/tools/javac/classfiles/ClassVersionChecker.java b/test/langtools/tools/javac/classfiles/ClassVersionChecker.java index 4a6cf188c89..f9f1e18fdd9 100644 --- a/test/langtools/tools/javac/classfiles/ClassVersionChecker.java +++ b/test/langtools/tools/javac/classfiles/ClassVersionChecker.java @@ -23,7 +23,7 @@ /* * @test - * @bug 7157626 8001112 8188870 + * @bug 7157626 8001112 8188870 8173382 * @summary Test major version for all legal combinations for -source and -target * @author sgoel * @@ -38,7 +38,7 @@ import java.util.regex.*; public class ClassVersionChecker { int errors; - String[] jdk = {"", "1.6", "1.7", "1.8", "1.9", "1.10"}; + String[] jdk = {"", "1.6", "1.7", "1.8", "1.9", "1.10", "11"}; File javaFile = null; public static void main(String[] args) throws Throwable { @@ -58,11 +58,12 @@ public class ClassVersionChecker { * -1 => invalid combinations */ int[][] ver = - {{54, -1, -1, -1, -1, -1}, - {54, 50, 51, 52, 53, 54}, - {54, -1, 51, 52, 53, 54}, - {54, -1, -1, 52, 53, 54}, - {54, -1, -1, -1, 53, 54}}; + {{55, -1, -1, -1, -1, -1, -1}, + {55, 50, 51, 52, 53, 54, 55}, + {55, -1, 51, 52, 53, 54, 55}, + {55, -1, -1, 52, 53, 54, 55}, + {55, -1, -1, -1, 53, 54, 55}, + {55, -1, -1, -1, -1, 54, 55}}; // Loop to run all possible combinations of source/target values for (int i = 0; i< ver.length; i++) { diff --git a/test/langtools/tools/javac/versions/Versions.java b/test/langtools/tools/javac/versions/Versions.java index 8e3fc8b026b..ea5e9a9959d 100644 --- a/test/langtools/tools/javac/versions/Versions.java +++ b/test/langtools/tools/javac/versions/Versions.java @@ -23,7 +23,7 @@ /* * @test - * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546 8188870 8173382 + * @bug 4981566 5028634 5094412 6304984 7025786 7025789 8001112 8028545 8000961 8030610 8028546 8188870 8173382 8173382 * @summary Check interpretation of -target and -source options * @modules java.compiler * jdk.compiler @@ -64,13 +64,13 @@ public class Versions { String TC = ""; System.out.println("Version.java: Starting"); - check("54.0"); - check("54.0", "-source 1.6"); - check("54.0", "-source 1.7"); - check("54.0", "-source 1.8"); - check("54.0", "-source 1.9"); - check("54.0", "-source 1.10"); - check("54.0", "-source 11"); + check("55.0"); + check("55.0", "-source 1.6"); + check("55.0", "-source 1.7"); + check("55.0", "-source 1.8"); + check("55.0", "-source 1.9"); + check("55.0", "-source 1.10"); + check("55.0", "-source 11"); check_source_target(true, "50.0", "6", "6"); check_source_target(true, "51.0", "6", "7"); @@ -87,7 +87,12 @@ public class Versions { check_source_target(true, "54.0", "8", "10"); check_source_target(true, "54.0", "9", "10"); check_source_target(true, "54.0", "10", "10"); - check_source_target(false, "54.0", "11", "11"); + check_source_target(false, "55.0", "6", "11"); + check_source_target(false, "55.0", "7", "11"); + check_source_target(false, "55.0", "8", "11"); + check_source_target(false, "55.0", "9", "11"); + check_source_target(false, "55.0", "10", "11"); + check_source_target(false, "55.0", "11", "11"); checksrc16("-source 1.6"); checksrc16("-source 6"); From fb9db6b02de7eabdc13ae9af47dfe58467fc4580 Mon Sep 17 00:00:00 2001 From: Paul Sandoz Date: Wed, 20 Dec 2017 09:14:52 -0800 Subject: [PATCH 31/88] 8193085: Vectorize the nio Buffer equals and compareTo implementations Reviewed-by: alanb --- src/hotspot/share/classfile/vmSymbols.hpp | 4 +- .../share/classes/java/nio/Bits.java | 58 +- .../share/classes/java/nio/Buffer.java | 11 + .../classes/java/nio/BufferMismatch.java | 198 +++++ .../nio/ByteBufferAs-X-Buffer.java.template | 23 +- .../nio/Direct-X-Buffer-bin.java.template | 6 +- .../java/nio/Direct-X-Buffer.java.template | 56 +- .../java/nio/Heap-X-Buffer.java.template | 83 +-- .../classes/java/nio/StringCharBuffer.java | 26 + .../classes/java/nio/X-Buffer.java.template | 39 +- .../share/classes/java/util/Arrays.java | 1 + .../internal}/util/ArraysSupport.java | 126 ++-- .../java/nio/Buffer/EqualsCompareTest.java | 686 ++++++++++++++++++ 13 files changed, 1122 insertions(+), 195 deletions(-) create mode 100644 src/java.base/share/classes/java/nio/BufferMismatch.java rename src/java.base/share/classes/{java => jdk/internal}/util/ArraysSupport.java (83%) create mode 100644 test/jdk/java/nio/Buffer/EqualsCompareTest.java diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp index 65246e04bae..ddc54315ade 100644 --- a/src/hotspot/share/classfile/vmSymbols.hpp +++ b/src/hotspot/share/classfile/vmSymbols.hpp @@ -996,8 +996,8 @@ do_name( montgomerySquare_name, "implMontgomerySquare") \ do_signature(montgomerySquare_signature, "([I[IIJ[I)[I") \ \ - do_class(java_util_ArraysSupport, "java/util/ArraysSupport") \ - do_intrinsic(_vectorizedMismatch, java_util_ArraysSupport, vectorizedMismatch_name, vectorizedMismatch_signature, F_S)\ + do_class(jdk_internal_util_ArraysSupport, "jdk/internal/util/ArraysSupport") \ + do_intrinsic(_vectorizedMismatch, jdk_internal_util_ArraysSupport, vectorizedMismatch_name, vectorizedMismatch_signature, F_S)\ do_name(vectorizedMismatch_name, "vectorizedMismatch") \ do_signature(vectorizedMismatch_signature, "(Ljava/lang/Object;JLjava/lang/Object;JII)I") \ \ diff --git a/src/java.base/share/classes/java/nio/Bits.java b/src/java.base/share/classes/java/nio/Bits.java index dfe6a8f13a7..fff84e9e58d 100644 --- a/src/java.base/share/classes/java/nio/Bits.java +++ b/src/java.base/share/classes/java/nio/Bits.java @@ -63,38 +63,38 @@ class Bits { // package-private // -- Unsafe access -- - private static final Unsafe unsafe = Unsafe.getUnsafe(); + private static final Unsafe UNSAFE = Unsafe.getUnsafe(); static Unsafe unsafe() { - return unsafe; + return UNSAFE; } // -- Processor and memory-system properties -- - private static final ByteOrder byteOrder - = unsafe.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN; + private static final ByteOrder BYTE_ORDER + = UNSAFE.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN; static ByteOrder byteOrder() { - return byteOrder; + return BYTE_ORDER; } - private static int pageSize = -1; + private static int PAGE_SIZE = -1; static int pageSize() { - if (pageSize == -1) - pageSize = unsafe().pageSize(); - return pageSize; + if (PAGE_SIZE == -1) + PAGE_SIZE = unsafe().pageSize(); + return PAGE_SIZE; } static int pageCount(long size) { return (int)(size + (long)pageSize() - 1L) / pageSize(); } - private static boolean unaligned = unsafe.unalignedAccess(); + private static boolean UNALIGNED = UNSAFE.unalignedAccess(); static boolean unaligned() { - return unaligned; + return UNALIGNED; } @@ -103,11 +103,11 @@ class Bits { // package-private // A user-settable upper limit on the maximum amount of allocatable // direct buffer memory. This value may be changed during VM // initialization if it is launched with "-XX:MaxDirectMemorySize=". - private static volatile long maxMemory = VM.maxDirectMemory(); - private static final AtomicLong reservedMemory = new AtomicLong(); - private static final AtomicLong totalCapacity = new AtomicLong(); - private static final AtomicLong count = new AtomicLong(); - private static volatile boolean memoryLimitSet; + private static volatile long MAX_MEMORY = VM.maxDirectMemory(); + private static final AtomicLong RESERVED_MEMORY = new AtomicLong(); + private static final AtomicLong TOTAL_CAPACITY = new AtomicLong(); + private static final AtomicLong COUNT = new AtomicLong(); + private static volatile boolean MEMORY_LIMIT_SET; // max. number of sleeps during try-reserving with exponentially // increasing delay before throwing OutOfMemoryError: @@ -120,9 +120,9 @@ class Bits { // package-private // which a process may access. All sizes are specified in bytes. static void reserveMemory(long size, int cap) { - if (!memoryLimitSet && VM.initLevel() >= 1) { - maxMemory = VM.maxDirectMemory(); - memoryLimitSet = true; + if (!MEMORY_LIMIT_SET && VM.initLevel() >= 1) { + MAX_MEMORY = VM.maxDirectMemory(); + MEMORY_LIMIT_SET = true; } // optimist! @@ -200,10 +200,10 @@ class Bits { // package-private // actual memory usage, which will differ when buffers are page // aligned. long totalCap; - while (cap <= maxMemory - (totalCap = totalCapacity.get())) { - if (totalCapacity.compareAndSet(totalCap, totalCap + cap)) { - reservedMemory.addAndGet(size); - count.incrementAndGet(); + while (cap <= MAX_MEMORY - (totalCap = TOTAL_CAPACITY.get())) { + if (TOTAL_CAPACITY.compareAndSet(totalCap, totalCap + cap)) { + RESERVED_MEMORY.addAndGet(size); + COUNT.incrementAndGet(); return true; } } @@ -213,9 +213,9 @@ class Bits { // package-private static void unreserveMemory(long size, int cap) { - long cnt = count.decrementAndGet(); - long reservedMem = reservedMemory.addAndGet(-size); - long totalCap = totalCapacity.addAndGet(-cap); + long cnt = COUNT.decrementAndGet(); + long reservedMem = RESERVED_MEMORY.addAndGet(-size); + long totalCap = TOTAL_CAPACITY.addAndGet(-cap); assert cnt >= 0 && reservedMem >= 0 && totalCap >= 0; } @@ -234,15 +234,15 @@ class Bits { // package-private } @Override public long getCount() { - return Bits.count.get(); + return Bits.COUNT.get(); } @Override public long getTotalCapacity() { - return Bits.totalCapacity.get(); + return Bits.TOTAL_CAPACITY.get(); } @Override public long getMemoryUsed() { - return Bits.reservedMemory.get(); + return Bits.RESERVED_MEMORY.get(); } }; } diff --git a/src/java.base/share/classes/java/nio/Buffer.java b/src/java.base/share/classes/java/nio/Buffer.java index 1f6bef17960..1217ca78a74 100644 --- a/src/java.base/share/classes/java/nio/Buffer.java +++ b/src/java.base/share/classes/java/nio/Buffer.java @@ -26,6 +26,7 @@ package java.nio; import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.misc.Unsafe; import java.util.Spliterator; @@ -181,6 +182,8 @@ import java.util.Spliterator; */ public abstract class Buffer { + // Cached unsafe-access object + static final Unsafe UNSAFE = Bits.unsafe(); /** * The characteristics of Spliterators that traverse and split elements @@ -616,6 +619,14 @@ public abstract class Buffer { // -- Package-private methods for bounds checking, etc. -- + /** + * + * @return the base reference, paired with the address + * field, which in combination can be used for unsafe access into a heap + * buffer or direct byte buffer (and views of). + */ + abstract Object base(); + /** * Checks the current position against the limit, throwing a {@link * BufferUnderflowException} if it is not smaller than the limit, and then diff --git a/src/java.base/share/classes/java/nio/BufferMismatch.java b/src/java.base/share/classes/java/nio/BufferMismatch.java new file mode 100644 index 00000000000..c1260f62a19 --- /dev/null +++ b/src/java.base/share/classes/java/nio/BufferMismatch.java @@ -0,0 +1,198 @@ +/* + * Copyright (c) 2017, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package java.nio; + +import jdk.internal.util.ArraysSupport; + +/** + * Mismatch methods for buffers + */ +final class BufferMismatch { + + static int mismatch(ByteBuffer a, int aOff, ByteBuffer b, int bOff, int length) { + int i = 0; + if (length > 7) { + i = ArraysSupport.vectorizedMismatch( + a.base(), a.address + aOff, + b.base(), b.address + bOff, + length, + ArraysSupport.LOG2_ARRAY_BYTE_INDEX_SCALE); + if (i >= 0) return i; + i = length - ~i; + } + for (; i < length; i++) { + if (a.get(aOff + i) != b.get(bOff + i)) + return i; + } + return -1; + } + + static int mismatch(CharBuffer a, int aOff, CharBuffer b, int bOff, int length) { + int i = 0; + // Ensure only heap or off-heap buffer instances use the + // vectorized mismatch. If either buffer is a StringCharBuffer + // (order is null) then the slow path is taken + if (length > 3 && a.charRegionOrder() == b.charRegionOrder() + && a.charRegionOrder() != null && b.charRegionOrder() != null) { + i = ArraysSupport.vectorizedMismatch( + a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_CHAR_INDEX_SCALE), + b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_CHAR_INDEX_SCALE), + length, + ArraysSupport.LOG2_ARRAY_CHAR_INDEX_SCALE); + if (i >= 0) return i; + i = length - ~i; + } + for (; i < length; i++) { + if (a.get(aOff + i) != b.get(bOff + i)) + return i; + } + return -1; + } + + static int mismatch(ShortBuffer a, int aOff, ShortBuffer b, int bOff, int length) { + int i = 0; + if (length > 3 && a.order() == b.order()) { + i = ArraysSupport.vectorizedMismatch( + a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_SHORT_INDEX_SCALE), + b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_SHORT_INDEX_SCALE), + length, + ArraysSupport.LOG2_ARRAY_SHORT_INDEX_SCALE); + if (i >= 0) return i; + i = length - ~i; + } + for (; i < length; i++) { + if (a.get(aOff + i) != b.get(bOff + i)) + return i; + } + return -1; + } + + static int mismatch(IntBuffer a, int aOff, IntBuffer b, int bOff, int length) { + int i = 0; + if (length > 1 && a.order() == b.order()) { + i = ArraysSupport.vectorizedMismatch( + a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_INT_INDEX_SCALE), + b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_INT_INDEX_SCALE), + length, + ArraysSupport.LOG2_ARRAY_INT_INDEX_SCALE); + if (i >= 0) return i; + i = length - ~i; + } + for (; i < length; i++) { + if (a.get(aOff + i) != b.get(bOff + i)) + return i; + } + return -1; + } + + static int mismatch(FloatBuffer a, int aOff, FloatBuffer b, int bOff, int length) { + int i = 0; + if (length > 1 && a.order() == b.order()) { + i = ArraysSupport.vectorizedMismatch( + a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_FLOAT_INDEX_SCALE), + b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_FLOAT_INDEX_SCALE), + length, + ArraysSupport.LOG2_ARRAY_FLOAT_INDEX_SCALE); + // Mismatched + if (i >= 0) { + // Check if mismatch is not associated with two NaN values; and + // is not associated with +0 and -0 + float av = a.get(aOff + i); + float bv = b.get(bOff + i); + if (av != bv && (!Float.isNaN(av) || !Float.isNaN(bv))) + return i; + + // Fall back to slow mechanism + // ISSUE: Consider looping over vectorizedMismatch adjusting ranges + // However, requires that returned value be relative to input ranges + i++; + } + // Matched + else { + i = length - ~i; + } + } + for (; i < length; i++) { + float av = a.get(aOff + i); + float bv = b.get(bOff + i); + if (av != bv && (!Float.isNaN(av) || !Float.isNaN(bv))) + return i; + } + return -1; + } + + static int mismatch(LongBuffer a, int aOff, LongBuffer b, int bOff, int length) { + int i = 0; + if (length > 0 && a.order() == b.order()) { + i = ArraysSupport.vectorizedMismatch( + a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_LONG_INDEX_SCALE), + b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_LONG_INDEX_SCALE), + length, + ArraysSupport.LOG2_ARRAY_LONG_INDEX_SCALE); + return i >= 0 ? i : -1; + } + for (; i < length; i++) { + if (a.get(aOff + i) != b.get(bOff + i)) + return i; + } + return -1; + } + + static int mismatch(DoubleBuffer a, int aOff, DoubleBuffer b, int bOff, int length) { + int i = 0; + if (length > 0 && a.order() == b.order()) { + i = ArraysSupport.vectorizedMismatch( + a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_DOUBLE_INDEX_SCALE), + b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_DOUBLE_INDEX_SCALE), + length, + ArraysSupport.LOG2_ARRAY_DOUBLE_INDEX_SCALE); + // Mismatched + if (i >= 0) { + // Check if mismatch is not associated with two NaN values; and + // is not associated with +0 and -0 + double av = a.get(aOff + i); + double bv = b.get(bOff + i); + if (av != bv && (!Double.isNaN(av) || !Double.isNaN(bv))) + return i; + + // Fall back to slow mechanism + // ISSUE: Consider looping over vectorizedMismatch adjusting ranges + // However, requires that returned value be relative to input ranges + i++; + } + // Matched + else { + return -1; + } + } + for (; i < length; i++) { + double av = a.get(aOff + i); + double bv = b.get(bOff + i); + if (av != bv && (!Double.isNaN(av) || !Double.isNaN(bv))) + return i; + } + return -1; + } +} diff --git a/src/java.base/share/classes/java/nio/ByteBufferAs-X-Buffer.java.template b/src/java.base/share/classes/java/nio/ByteBufferAs-X-Buffer.java.template index 3ceb4122b62..b390448b110 100644 --- a/src/java.base/share/classes/java/nio/ByteBufferAs-X-Buffer.java.template +++ b/src/java.base/share/classes/java/nio/ByteBufferAs-X-Buffer.java.template @@ -36,9 +36,6 @@ class ByteBufferAs$Type$Buffer$RW$$BO$ // package-private #if[rw] - // Cached unsafe-access object - private static final Unsafe unsafe = Bits.unsafe(); - protected final ByteBuffer bb; #end[rw] @@ -74,6 +71,11 @@ class ByteBufferAs$Type$Buffer$RW$$BO$ // package-private #end[rw] } + @Override + Object base() { + return bb.hb; + } + public $Type$Buffer slice() { int pos = this.position(); int lim = this.limit(); @@ -117,20 +119,20 @@ class ByteBufferAs$Type$Buffer$RW$$BO$ // package-private } public $type$ get() { - $memtype$ x = unsafe.get$Memtype$Unaligned(bb.hb, byteOffset(nextGetIndex()), + $memtype$ x = UNSAFE.get$Memtype$Unaligned(bb.hb, byteOffset(nextGetIndex()), {#if[boB]?true:false}); return $fromBits$(x); } public $type$ get(int i) { - $memtype$ x = unsafe.get$Memtype$Unaligned(bb.hb, byteOffset(checkIndex(i)), + $memtype$ x = UNSAFE.get$Memtype$Unaligned(bb.hb, byteOffset(checkIndex(i)), {#if[boB]?true:false}); return $fromBits$(x); } #if[streamableType] $type$ getUnchecked(int i) { - $memtype$ x = unsafe.get$Memtype$Unaligned(bb.hb, byteOffset(i), + $memtype$ x = UNSAFE.get$Memtype$Unaligned(bb.hb, byteOffset(i), {#if[boB]?true:false}); return $fromBits$(x); } @@ -141,7 +143,7 @@ class ByteBufferAs$Type$Buffer$RW$$BO$ // package-private public $Type$Buffer put($type$ x) { #if[rw] $memtype$ y = $toBits$(x); - unsafe.put$Memtype$Unaligned(bb.hb, byteOffset(nextPutIndex()), y, + UNSAFE.put$Memtype$Unaligned(bb.hb, byteOffset(nextPutIndex()), y, {#if[boB]?true:false}); return this; #else[rw] @@ -152,7 +154,7 @@ class ByteBufferAs$Type$Buffer$RW$$BO$ // package-private public $Type$Buffer put(int i, $type$ x) { #if[rw] $memtype$ y = $toBits$(x); - unsafe.put$Memtype$Unaligned(bb.hb, byteOffset(checkIndex(i)), y, + UNSAFE.put$Memtype$Unaligned(bb.hb, byteOffset(checkIndex(i)), y, {#if[boB]?true:false}); return this; #else[rw] @@ -241,4 +243,9 @@ class ByteBufferAs$Type$Buffer$RW$$BO$ // package-private #end[boL] } +#if[char] + ByteOrder charRegionOrder() { + return order(); + } +#end[char] } diff --git a/src/java.base/share/classes/java/nio/Direct-X-Buffer-bin.java.template b/src/java.base/share/classes/java/nio/Direct-X-Buffer-bin.java.template index 6179776100d..cacadb101df 100644 --- a/src/java.base/share/classes/java/nio/Direct-X-Buffer-bin.java.template +++ b/src/java.base/share/classes/java/nio/Direct-X-Buffer-bin.java.template @@ -32,7 +32,7 @@ class XXX { #if[rw] private $type$ get$Type$(long a) { - $memtype$ x = unsafe.get$Memtype$Unaligned(null, a, bigEndian); + $memtype$ x = UNSAFE.get$Memtype$Unaligned(null, a, bigEndian); return $fromBits$(x); } @@ -49,7 +49,7 @@ class XXX { private ByteBuffer put$Type$(long a, $type$ x) { #if[rw] $memtype$ y = $toBits$(x); - unsafe.put$Memtype$Unaligned(null, a, y, bigEndian); + UNSAFE.put$Memtype$Unaligned(null, a, y, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -81,7 +81,7 @@ class XXX { int rem = (off <= lim ? lim - off : 0); int size = rem >> $LG_BYTES_PER_VALUE$; - if (!unaligned && ((address + off) % $BYTES_PER_VALUE$ != 0)) { + if (!UNALIGNED && ((address + off) % $BYTES_PER_VALUE$ != 0)) { return (bigEndian ? ($Type$Buffer)(new ByteBufferAs$Type$Buffer$RW$B(this, -1, diff --git a/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template b/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template index 68ec8340e0d..5fa9be47b20 100644 --- a/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template +++ b/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template @@ -28,7 +28,6 @@ package java.nio; import java.io.FileDescriptor; -import jdk.internal.misc.Unsafe; import jdk.internal.misc.VM; import jdk.internal.ref.Cleaner; import sun.nio.ch.DirectBuffer; @@ -45,14 +44,11 @@ class Direct$Type$Buffer$RW$$BO$ #if[rw] - // Cached unsafe-access object - protected static final Unsafe unsafe = Bits.unsafe(); - // Cached array base offset - private static final long arrayBaseOffset = (long)unsafe.arrayBaseOffset($type$[].class); + private static final long ARRAY_BASE_OFFSET = UNSAFE.arrayBaseOffset($type$[].class); // Cached unaligned-access capability - protected static final boolean unaligned = Bits.unaligned(); + protected static final boolean UNALIGNED = Bits.unaligned(); // Base address, used in all indexing calculations // NOTE: moved up to Buffer.java for speed in JNI GetDirectBufferAddress @@ -73,8 +69,6 @@ class Direct$Type$Buffer$RW$$BO$ implements Runnable { - private static Unsafe unsafe = Unsafe.getUnsafe(); - private long address; private long size; private int capacity; @@ -91,7 +85,7 @@ class Direct$Type$Buffer$RW$$BO$ // Paranoia return; } - unsafe.freeMemory(address); + UNSAFE.freeMemory(address); address = 0; Bits.unreserveMemory(size, capacity); } @@ -124,12 +118,12 @@ class Direct$Type$Buffer$RW$$BO$ long base = 0; try { - base = unsafe.allocateMemory(size); + base = UNSAFE.allocateMemory(size); } catch (OutOfMemoryError x) { Bits.unreserveMemory(size, cap); throw x; } - unsafe.setMemory(base, size, (byte) 0); + UNSAFE.setMemory(base, size, (byte) 0); if (pa && (base % ps != 0)) { // Round up to page boundary address = base + ps - (base & (ps - 1)); @@ -206,6 +200,11 @@ class Direct$Type$Buffer$RW$$BO$ #end[rw] } + @Override + Object base() { + return null; + } + public $Type$Buffer slice() { int pos = this.position(); int lim = this.limit(); @@ -258,16 +257,16 @@ class Direct$Type$Buffer$RW$$BO$ } public $type$ get() { - return $fromBits$($swap$(unsafe.get$Swaptype$(ix(nextGetIndex())))); + return $fromBits$($swap$(UNSAFE.get$Swaptype$(ix(nextGetIndex())))); } public $type$ get(int i) { - return $fromBits$($swap$(unsafe.get$Swaptype$(ix(checkIndex(i))))); + return $fromBits$($swap$(UNSAFE.get$Swaptype$(ix(checkIndex(i))))); } #if[streamableType] $type$ getUnchecked(int i) { - return $fromBits$($swap$(unsafe.get$Swaptype$(ix(i)))); + return $fromBits$($swap$(UNSAFE.get$Swaptype$(ix(i)))); } #end[streamableType] @@ -282,10 +281,10 @@ class Direct$Type$Buffer$RW$$BO$ if (length > rem) throw new BufferUnderflowException(); - long dstOffset = arrayBaseOffset + ((long)offset << $LG_BYTES_PER_VALUE$); + long dstOffset = ARRAY_BASE_OFFSET + ((long)offset << $LG_BYTES_PER_VALUE$); #if[!byte] if (order() != ByteOrder.nativeOrder()) - unsafe.copySwapMemory(null, + UNSAFE.copySwapMemory(null, ix(pos), dst, dstOffset, @@ -293,7 +292,7 @@ class Direct$Type$Buffer$RW$$BO$ (long)1 << $LG_BYTES_PER_VALUE$); else #end[!byte] - unsafe.copyMemory(null, + UNSAFE.copyMemory(null, ix(pos), dst, dstOffset, @@ -312,7 +311,7 @@ class Direct$Type$Buffer$RW$$BO$ public $Type$Buffer put($type$ x) { #if[rw] - unsafe.put$Swaptype$(ix(nextPutIndex()), $swap$($toBits$(x))); + UNSAFE.put$Swaptype$(ix(nextPutIndex()), $swap$($toBits$(x))); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -321,7 +320,7 @@ class Direct$Type$Buffer$RW$$BO$ public $Type$Buffer put(int i, $type$ x) { #if[rw] - unsafe.put$Swaptype$(ix(checkIndex(i)), $swap$($toBits$(x))); + UNSAFE.put$Swaptype$(ix(checkIndex(i)), $swap$($toBits$(x))); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -347,7 +346,7 @@ class Direct$Type$Buffer$RW$$BO$ if (srem > rem) throw new BufferOverflowException(); - unsafe.copyMemory(sb.ix(spos), ix(pos), (long)srem << $LG_BYTES_PER_VALUE$); + UNSAFE.copyMemory(sb.ix(spos), ix(pos), (long)srem << $LG_BYTES_PER_VALUE$); sb.position(spos + srem); position(pos + srem); } else if (src.hb != null) { @@ -380,10 +379,10 @@ class Direct$Type$Buffer$RW$$BO$ if (length > rem) throw new BufferOverflowException(); - long srcOffset = arrayBaseOffset + ((long)offset << $LG_BYTES_PER_VALUE$); + long srcOffset = ARRAY_BASE_OFFSET + ((long)offset << $LG_BYTES_PER_VALUE$); #if[!byte] if (order() != ByteOrder.nativeOrder()) - unsafe.copySwapMemory(src, + UNSAFE.copySwapMemory(src, srcOffset, null, ix(pos), @@ -391,7 +390,7 @@ class Direct$Type$Buffer$RW$$BO$ (long)1 << $LG_BYTES_PER_VALUE$); else #end[!byte] - unsafe.copyMemory(src, + UNSAFE.copyMemory(src, srcOffset, null, ix(pos), @@ -413,7 +412,7 @@ class Direct$Type$Buffer$RW$$BO$ assert (pos <= lim); int rem = (pos <= lim ? lim - pos : 0); - unsafe.copyMemory(ix(pos), ix(0), (long)rem << $LG_BYTES_PER_VALUE$); + UNSAFE.copyMemory(ix(pos), ix(0), (long)rem << $LG_BYTES_PER_VALUE$); position(rem); limit(capacity()); discardMark(); @@ -490,17 +489,22 @@ class Direct$Type$Buffer$RW$$BO$ #end[!byte] +#if[char] + ByteOrder charRegionOrder() { + return order(); + } +#end[char] #if[byte] byte _get(int i) { // package-private - return unsafe.getByte(address + i); + return UNSAFE.getByte(address + i); } void _put(int i, byte b) { // package-private #if[rw] - unsafe.putByte(address + i, b); + UNSAFE.putByte(address + i, b); #else[rw] throw new ReadOnlyBufferException(); #end[rw] diff --git a/src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template b/src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template index 69e65a099c7..7f2a2597ba3 100644 --- a/src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template +++ b/src/java.base/share/classes/java/nio/Heap-X-Buffer.java.template @@ -27,8 +27,6 @@ package java.nio; -import jdk.internal.misc.Unsafe; - /** #if[rw] * A read/write Heap$Type$Buffer. @@ -43,6 +41,11 @@ import jdk.internal.misc.Unsafe; class Heap$Type$Buffer$RW$ extends {#if[ro]?Heap}$Type$Buffer { + // Cached array base offset + private static final long ARRAY_BASE_OFFSET = UNSAFE.arrayBaseOffset($type$[].class); + + // Cached array base offset + private static final long ARRAY_INDEX_SCALE = UNSAFE.arrayIndexScale($type$[].class); // For speed these fields are actually declared in X-Buffer; // these declarations are here as documentation @@ -53,16 +56,6 @@ class Heap$Type$Buffer$RW$ #end[rw] */ -#if[byte] - - // Cached unsafe-access object - private static final Unsafe unsafe = Bits.unsafe(); - - // Cached array base offset - private static final long arrayBaseOffset = unsafe.arrayBaseOffset($type$[].class); - -#end[byte] - Heap$Type$Buffer$RW$(int cap, int lim) { // package-private #if[rw] super(-1, 0, lim, cap, new $type$[cap], 0); @@ -70,13 +63,11 @@ class Heap$Type$Buffer$RW$ hb = new $type$[cap]; offset = 0; */ + this.address = ARRAY_BASE_OFFSET; #else[rw] super(cap, lim); this.isReadOnly = true; #end[rw] -#if[byte] - this.address = arrayBaseOffset; -#end[byte] } Heap$Type$Buffer$RW$($type$[] buf, int off, int len) { // package-private @@ -86,13 +77,11 @@ class Heap$Type$Buffer$RW$ hb = buf; offset = 0; */ + this.address = ARRAY_BASE_OFFSET; #else[rw] super(buf, off, len); this.isReadOnly = true; #end[rw] -#if[byte] - this.address = arrayBaseOffset; -#end[byte] } protected Heap$Type$Buffer$RW$($type$[] buf, @@ -105,13 +94,11 @@ class Heap$Type$Buffer$RW$ hb = buf; offset = off; */ + this.address = ARRAY_BASE_OFFSET + off * ARRAY_INDEX_SCALE; #else[rw] super(buf, mark, pos, lim, cap, off); this.isReadOnly = true; #end[rw] -#if[byte] - this.address = arrayBaseOffset + off; -#end[byte] } public $Type$Buffer slice() { @@ -296,18 +283,18 @@ class Heap$Type$Buffer$RW$ #if[rw] public char getChar() { - return unsafe.getCharUnaligned(hb, byteOffset(nextGetIndex(2)), bigEndian); + return UNSAFE.getCharUnaligned(hb, byteOffset(nextGetIndex(2)), bigEndian); } public char getChar(int i) { - return unsafe.getCharUnaligned(hb, byteOffset(checkIndex(i, 2)), bigEndian); + return UNSAFE.getCharUnaligned(hb, byteOffset(checkIndex(i, 2)), bigEndian); } #end[rw] public $Type$Buffer putChar(char x) { #if[rw] - unsafe.putCharUnaligned(hb, byteOffset(nextPutIndex(2)), x, bigEndian); + UNSAFE.putCharUnaligned(hb, byteOffset(nextPutIndex(2)), x, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -316,7 +303,7 @@ class Heap$Type$Buffer$RW$ public $Type$Buffer putChar(int i, char x) { #if[rw] - unsafe.putCharUnaligned(hb, byteOffset(checkIndex(i, 2)), x, bigEndian); + UNSAFE.putCharUnaligned(hb, byteOffset(checkIndex(i, 2)), x, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -347,18 +334,18 @@ class Heap$Type$Buffer$RW$ #if[rw] public short getShort() { - return unsafe.getShortUnaligned(hb, byteOffset(nextGetIndex(2)), bigEndian); + return UNSAFE.getShortUnaligned(hb, byteOffset(nextGetIndex(2)), bigEndian); } public short getShort(int i) { - return unsafe.getShortUnaligned(hb, byteOffset(checkIndex(i, 2)), bigEndian); + return UNSAFE.getShortUnaligned(hb, byteOffset(checkIndex(i, 2)), bigEndian); } #end[rw] public $Type$Buffer putShort(short x) { #if[rw] - unsafe.putShortUnaligned(hb, byteOffset(nextPutIndex(2)), x, bigEndian); + UNSAFE.putShortUnaligned(hb, byteOffset(nextPutIndex(2)), x, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -367,7 +354,7 @@ class Heap$Type$Buffer$RW$ public $Type$Buffer putShort(int i, short x) { #if[rw] - unsafe.putShortUnaligned(hb, byteOffset(checkIndex(i, 2)), x, bigEndian); + UNSAFE.putShortUnaligned(hb, byteOffset(checkIndex(i, 2)), x, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -398,18 +385,18 @@ class Heap$Type$Buffer$RW$ #if[rw] public int getInt() { - return unsafe.getIntUnaligned(hb, byteOffset(nextGetIndex(4)), bigEndian); + return UNSAFE.getIntUnaligned(hb, byteOffset(nextGetIndex(4)), bigEndian); } public int getInt(int i) { - return unsafe.getIntUnaligned(hb, byteOffset(checkIndex(i, 4)), bigEndian); + return UNSAFE.getIntUnaligned(hb, byteOffset(checkIndex(i, 4)), bigEndian); } #end[rw] public $Type$Buffer putInt(int x) { #if[rw] - unsafe.putIntUnaligned(hb, byteOffset(nextPutIndex(4)), x, bigEndian); + UNSAFE.putIntUnaligned(hb, byteOffset(nextPutIndex(4)), x, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -418,7 +405,7 @@ class Heap$Type$Buffer$RW$ public $Type$Buffer putInt(int i, int x) { #if[rw] - unsafe.putIntUnaligned(hb, byteOffset(checkIndex(i, 4)), x, bigEndian); + UNSAFE.putIntUnaligned(hb, byteOffset(checkIndex(i, 4)), x, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -449,18 +436,18 @@ class Heap$Type$Buffer$RW$ #if[rw] public long getLong() { - return unsafe.getLongUnaligned(hb, byteOffset(nextGetIndex(8)), bigEndian); + return UNSAFE.getLongUnaligned(hb, byteOffset(nextGetIndex(8)), bigEndian); } public long getLong(int i) { - return unsafe.getLongUnaligned(hb, byteOffset(checkIndex(i, 8)), bigEndian); + return UNSAFE.getLongUnaligned(hb, byteOffset(checkIndex(i, 8)), bigEndian); } #end[rw] public $Type$Buffer putLong(long x) { #if[rw] - unsafe.putLongUnaligned(hb, byteOffset(nextPutIndex(8)), x, bigEndian); + UNSAFE.putLongUnaligned(hb, byteOffset(nextPutIndex(8)), x, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -469,7 +456,7 @@ class Heap$Type$Buffer$RW$ public $Type$Buffer putLong(int i, long x) { #if[rw] - unsafe.putLongUnaligned(hb, byteOffset(checkIndex(i, 8)), x, bigEndian); + UNSAFE.putLongUnaligned(hb, byteOffset(checkIndex(i, 8)), x, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -500,12 +487,12 @@ class Heap$Type$Buffer$RW$ #if[rw] public float getFloat() { - int x = unsafe.getIntUnaligned(hb, byteOffset(nextGetIndex(4)), bigEndian); + int x = UNSAFE.getIntUnaligned(hb, byteOffset(nextGetIndex(4)), bigEndian); return Float.intBitsToFloat(x); } public float getFloat(int i) { - int x = unsafe.getIntUnaligned(hb, byteOffset(checkIndex(i, 4)), bigEndian); + int x = UNSAFE.getIntUnaligned(hb, byteOffset(checkIndex(i, 4)), bigEndian); return Float.intBitsToFloat(x); } @@ -514,7 +501,7 @@ class Heap$Type$Buffer$RW$ public $Type$Buffer putFloat(float x) { #if[rw] int y = Float.floatToRawIntBits(x); - unsafe.putIntUnaligned(hb, byteOffset(nextPutIndex(4)), y, bigEndian); + UNSAFE.putIntUnaligned(hb, byteOffset(nextPutIndex(4)), y, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -524,7 +511,7 @@ class Heap$Type$Buffer$RW$ public $Type$Buffer putFloat(int i, float x) { #if[rw] int y = Float.floatToRawIntBits(x); - unsafe.putIntUnaligned(hb, byteOffset(checkIndex(i, 4)), y, bigEndian); + UNSAFE.putIntUnaligned(hb, byteOffset(checkIndex(i, 4)), y, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -555,12 +542,12 @@ class Heap$Type$Buffer$RW$ #if[rw] public double getDouble() { - long x = unsafe.getLongUnaligned(hb, byteOffset(nextGetIndex(8)), bigEndian); + long x = UNSAFE.getLongUnaligned(hb, byteOffset(nextGetIndex(8)), bigEndian); return Double.longBitsToDouble(x); } public double getDouble(int i) { - long x = unsafe.getLongUnaligned(hb, byteOffset(checkIndex(i, 8)), bigEndian); + long x = UNSAFE.getLongUnaligned(hb, byteOffset(checkIndex(i, 8)), bigEndian); return Double.longBitsToDouble(x); } @@ -569,7 +556,7 @@ class Heap$Type$Buffer$RW$ public $Type$Buffer putDouble(double x) { #if[rw] long y = Double.doubleToRawLongBits(x); - unsafe.putLongUnaligned(hb, byteOffset(nextPutIndex(8)), y, bigEndian); + UNSAFE.putLongUnaligned(hb, byteOffset(nextPutIndex(8)), y, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -579,7 +566,7 @@ class Heap$Type$Buffer$RW$ public $Type$Buffer putDouble(int i, double x) { #if[rw] long y = Double.doubleToRawLongBits(x); - unsafe.putLongUnaligned(hb, byteOffset(checkIndex(i, 8)), y, bigEndian); + UNSAFE.putLongUnaligned(hb, byteOffset(checkIndex(i, 8)), y, bigEndian); return this; #else[rw] throw new ReadOnlyBufferException(); @@ -643,7 +630,11 @@ class Heap$Type$Buffer$RW$ public ByteOrder order() { return ByteOrder.nativeOrder(); } - #end[!byte] +#if[char] + ByteOrder charRegionOrder() { + return order(); + } +#end[char] } diff --git a/src/java.base/share/classes/java/nio/StringCharBuffer.java b/src/java.base/share/classes/java/nio/StringCharBuffer.java index 71f4b368d29..26b355bc819 100644 --- a/src/java.base/share/classes/java/nio/StringCharBuffer.java +++ b/src/java.base/share/classes/java/nio/StringCharBuffer.java @@ -127,4 +127,30 @@ class StringCharBuffer // package-private return ByteOrder.nativeOrder(); } + ByteOrder charRegionOrder() { + return null; + } + + public boolean equals(Object ob) { + if (this == ob) + return true; + if (!(ob instanceof CharBuffer)) + return false; + CharBuffer that = (CharBuffer)ob; + if (this.remaining() != that.remaining()) + return false; + return BufferMismatch.mismatch(this, this.position(), + that, that.position(), + this.remaining()) < 0; + } + + public int compareTo(CharBuffer that) { + int i = BufferMismatch.mismatch(this, this.position(), + that, that.position(), + Math.min(this.remaining(), that.remaining())); + if (i >= 0) { + return Character.compare(this.get(this.position() + i), that.get(this.position() + i)); + } + return this.remaining() - that.remaining(); + } } diff --git a/src/java.base/share/classes/java/nio/X-Buffer.java.template b/src/java.base/share/classes/java/nio/X-Buffer.java.template index 0a39543a88e..96e05d6a663 100644 --- a/src/java.base/share/classes/java/nio/X-Buffer.java.template +++ b/src/java.base/share/classes/java/nio/X-Buffer.java.template @@ -36,6 +36,8 @@ import java.util.stream.StreamSupport; import java.util.stream.$Streamtype$Stream; #end[streamableType] +import jdk.internal.util.ArraysSupport; + /** * $A$ $type$ buffer. * @@ -287,6 +289,11 @@ public abstract class $Type$Buffer this(mark, pos, lim, cap, null, 0); } + @Override + Object base() { + return hb; + } + #if[byte] /** @@ -1297,19 +1304,9 @@ public abstract class $Type$Buffer $Type$Buffer that = ($Type$Buffer)ob; if (this.remaining() != that.remaining()) return false; - int p = this.position(); - for (int i = this.limit() - 1, j = that.limit() - 1; i >= p; i--, j--) - if (!equals(this.get(i), that.get(j))) - return false; - return true; - } - - private static boolean equals($type$ x, $type$ y) { -#if[floatingPointType] - return (x == y) || ($Fulltype$.isNaN(x) && $Fulltype$.isNaN(y)); -#else[floatingPointType] - return x == y; -#end[floatingPointType] + return BufferMismatch.mismatch(this, this.position(), + that, that.position(), + this.remaining()) < 0; } /** @@ -1336,11 +1333,11 @@ public abstract class $Type$Buffer * is less than, equal to, or greater than the given buffer */ public int compareTo($Type$Buffer that) { - int n = this.position() + Math.min(this.remaining(), that.remaining()); - for (int i = this.position(), j = that.position(); i < n; i++, j++) { - int cmp = compare(this.get(i), that.get(j)); - if (cmp != 0) - return cmp; + int i = BufferMismatch.mismatch(this, this.position(), + that, that.position(), + Math.min(this.remaining(), that.remaining())); + if (i >= 0) { + return compare(this.get(this.position() + i), that.get(this.position() + i)); } return this.remaining() - that.remaining(); } @@ -1571,6 +1568,12 @@ public abstract class $Type$Buffer #end[!byte] +#if[char] + // The order or null if the buffer does not cover a memory region, + // such as StringCharBuffer + abstract ByteOrder charRegionOrder(); +#end[char] + #if[byte] boolean bigEndian // package-private diff --git a/src/java.base/share/classes/java/util/Arrays.java b/src/java.base/share/classes/java/util/Arrays.java index e1571cc613f..74011566f26 100644 --- a/src/java.base/share/classes/java/util/Arrays.java +++ b/src/java.base/share/classes/java/util/Arrays.java @@ -26,6 +26,7 @@ package java.util; import jdk.internal.HotSpotIntrinsicCandidate; +import jdk.internal.util.ArraysSupport; import java.lang.reflect.Array; import java.util.concurrent.ForkJoinPool; diff --git a/src/java.base/share/classes/java/util/ArraysSupport.java b/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java similarity index 83% rename from src/java.base/share/classes/java/util/ArraysSupport.java rename to src/java.base/share/classes/jdk/internal/util/ArraysSupport.java index 31612a7d4f8..cc051df7d31 100644 --- a/src/java.base/share/classes/java/util/ArraysSupport.java +++ b/src/java.base/share/classes/jdk/internal/util/ArraysSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017 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 @@ -22,7 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -package java.util; +package jdk.internal.util; import jdk.internal.HotSpotIntrinsicCandidate; import jdk.internal.misc.Unsafe; @@ -50,19 +50,19 @@ import jdk.internal.misc.Unsafe; * responsibility of the caller (direct or otherwise) to perform such checks * before calling this method. */ -class ArraysSupport { +public class ArraysSupport { static final Unsafe U = Unsafe.getUnsafe(); private static final boolean BIG_ENDIAN = U.isBigEndian(); - private static final int LOG2_ARRAY_BOOLEAN_INDEX_SCALE = exactLog2(Unsafe.ARRAY_BOOLEAN_INDEX_SCALE); - private static final int LOG2_ARRAY_BYTE_INDEX_SCALE = exactLog2(Unsafe.ARRAY_BYTE_INDEX_SCALE); - private static final int LOG2_ARRAY_CHAR_INDEX_SCALE = exactLog2(Unsafe.ARRAY_CHAR_INDEX_SCALE); - private static final int LOG2_ARRAY_SHORT_INDEX_SCALE = exactLog2(Unsafe.ARRAY_SHORT_INDEX_SCALE); - private static final int LOG2_ARRAY_INT_INDEX_SCALE = exactLog2(Unsafe.ARRAY_INT_INDEX_SCALE); - private static final int LOG2_ARRAY_LONG_INDEX_SCALE = exactLog2(Unsafe.ARRAY_LONG_INDEX_SCALE); - private static final int LOG2_ARRAY_FLOAT_INDEX_SCALE = exactLog2(Unsafe.ARRAY_FLOAT_INDEX_SCALE); - private static final int LOG2_ARRAY_DOUBLE_INDEX_SCALE = exactLog2(Unsafe.ARRAY_DOUBLE_INDEX_SCALE); + public static final int LOG2_ARRAY_BOOLEAN_INDEX_SCALE = exactLog2(Unsafe.ARRAY_BOOLEAN_INDEX_SCALE); + public static final int LOG2_ARRAY_BYTE_INDEX_SCALE = exactLog2(Unsafe.ARRAY_BYTE_INDEX_SCALE); + public static final int LOG2_ARRAY_CHAR_INDEX_SCALE = exactLog2(Unsafe.ARRAY_CHAR_INDEX_SCALE); + public static final int LOG2_ARRAY_SHORT_INDEX_SCALE = exactLog2(Unsafe.ARRAY_SHORT_INDEX_SCALE); + public static final int LOG2_ARRAY_INT_INDEX_SCALE = exactLog2(Unsafe.ARRAY_INT_INDEX_SCALE); + public static final int LOG2_ARRAY_LONG_INDEX_SCALE = exactLog2(Unsafe.ARRAY_LONG_INDEX_SCALE); + public static final int LOG2_ARRAY_FLOAT_INDEX_SCALE = exactLog2(Unsafe.ARRAY_FLOAT_INDEX_SCALE); + public static final int LOG2_ARRAY_DOUBLE_INDEX_SCALE = exactLog2(Unsafe.ARRAY_DOUBLE_INDEX_SCALE); private static final int LOG2_BYTE_BIT_SIZE = exactLog2(Byte.SIZE); @@ -107,10 +107,10 @@ class ArraysSupport { * the tail of the two arrays. */ @HotSpotIntrinsicCandidate - static int vectorizedMismatch(Object a, long aOffset, - Object b, long bOffset, - int length, - int log2ArrayIndexScale) { + public static int vectorizedMismatch(Object a, long aOffset, + Object b, long bOffset, + int length, + int log2ArrayIndexScale) { // assert a.getClass().isArray(); // assert b.getClass().isArray(); // assert 0 <= length <= sizeOf(a) @@ -161,9 +161,9 @@ class ArraysSupport { // Booleans // Each boolean element takes up one byte - static int mismatch(boolean[] a, - boolean[] b, - int length) { + public static int mismatch(boolean[] a, + boolean[] b, + int length) { int i = 0; if (length > 7) { i = vectorizedMismatch( @@ -181,9 +181,9 @@ class ArraysSupport { return -1; } - static int mismatch(boolean[] a, int aFromIndex, - boolean[] b, int bFromIndex, - int length) { + public static int mismatch(boolean[] a, int aFromIndex, + boolean[] b, int bFromIndex, + int length) { int i = 0; if (length > 7) { int aOffset = Unsafe.ARRAY_BOOLEAN_BASE_OFFSET + aFromIndex; @@ -219,9 +219,9 @@ class ArraysSupport { * no mismatch. The index will be within the range of (inclusive) 0 to * (exclusive) the smaller of the two array lengths. */ - static int mismatch(byte[] a, - byte[] b, - int length) { + public static int mismatch(byte[] a, + byte[] b, + int length) { // ISSUE: defer to index receiving methods if performance is good // assert length <= a.length // assert length <= b.length @@ -264,9 +264,9 @@ class ArraysSupport { * otherwise -1 if no mismatch. The index will be within the range of * (inclusive) 0 to (exclusive) the smaller of the two array bounds. */ - static int mismatch(byte[] a, int aFromIndex, - byte[] b, int bFromIndex, - int length) { + public static int mismatch(byte[] a, int aFromIndex, + byte[] b, int bFromIndex, + int length) { // assert 0 <= aFromIndex < a.length // assert 0 <= aFromIndex + length <= a.length // assert 0 <= bFromIndex < b.length @@ -295,9 +295,9 @@ class ArraysSupport { // Chars - static int mismatch(char[] a, - char[] b, - int length) { + public static int mismatch(char[] a, + char[] b, + int length) { int i = 0; if (length > 3) { i = vectorizedMismatch( @@ -315,9 +315,9 @@ class ArraysSupport { return -1; } - static int mismatch(char[] a, int aFromIndex, - char[] b, int bFromIndex, - int length) { + public static int mismatch(char[] a, int aFromIndex, + char[] b, int bFromIndex, + int length) { int i = 0; if (length > 3) { int aOffset = Unsafe.ARRAY_CHAR_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_CHAR_INDEX_SCALE); @@ -340,9 +340,9 @@ class ArraysSupport { // Shorts - static int mismatch(short[] a, - short[] b, - int length) { + public static int mismatch(short[] a, + short[] b, + int length) { int i = 0; if (length > 3) { i = vectorizedMismatch( @@ -360,9 +360,9 @@ class ArraysSupport { return -1; } - static int mismatch(short[] a, int aFromIndex, - short[] b, int bFromIndex, - int length) { + public static int mismatch(short[] a, int aFromIndex, + short[] b, int bFromIndex, + int length) { int i = 0; if (length > 3) { int aOffset = Unsafe.ARRAY_SHORT_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_SHORT_INDEX_SCALE); @@ -385,9 +385,9 @@ class ArraysSupport { // Ints - static int mismatch(int[] a, - int[] b, - int length) { + public static int mismatch(int[] a, + int[] b, + int length) { int i = 0; if (length > 1) { i = vectorizedMismatch( @@ -405,9 +405,9 @@ class ArraysSupport { return -1; } - static int mismatch(int[] a, int aFromIndex, - int[] b, int bFromIndex, - int length) { + public static int mismatch(int[] a, int aFromIndex, + int[] b, int bFromIndex, + int length) { int i = 0; if (length > 1) { int aOffset = Unsafe.ARRAY_INT_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_INT_INDEX_SCALE); @@ -430,15 +430,15 @@ class ArraysSupport { // Floats - static int mismatch(float[] a, - float[] b, - int length) { + public static int mismatch(float[] a, + float[] b, + int length) { return mismatch(a, 0, b, 0, length); } - static int mismatch(float[] a, int aFromIndex, - float[] b, int bFromIndex, - int length) { + public static int mismatch(float[] a, int aFromIndex, + float[] b, int bFromIndex, + int length) { int i = 0; if (length > 1) { int aOffset = Unsafe.ARRAY_FLOAT_BASE_OFFSET + (aFromIndex << LOG2_ARRAY_FLOAT_INDEX_SCALE); @@ -475,9 +475,9 @@ class ArraysSupport { // Long - static int mismatch(long[] a, - long[] b, - int length) { + public static int mismatch(long[] a, + long[] b, + int length) { if (length == 0) { return -1; } @@ -488,9 +488,9 @@ class ArraysSupport { return i >= 0 ? i : -1; } - static int mismatch(long[] a, int aFromIndex, - long[] b, int bFromIndex, - int length) { + public static int mismatch(long[] a, int aFromIndex, + long[] b, int bFromIndex, + int length) { if (length == 0) { return -1; } @@ -506,15 +506,15 @@ class ArraysSupport { // Double - static int mismatch(double[] a, - double[] b, - int length) { + public static int mismatch(double[] a, + double[] b, + int length) { return mismatch(a, 0, b, 0, length); } - static int mismatch(double[] a, int aFromIndex, - double[] b, int bFromIndex, - int length) { + public static int mismatch(double[] a, int aFromIndex, + double[] b, int bFromIndex, + int length) { if (length == 0) { return -1; } diff --git a/test/jdk/java/nio/Buffer/EqualsCompareTest.java b/test/jdk/java/nio/Buffer/EqualsCompareTest.java new file mode 100644 index 00000000000..11cc028f425 --- /dev/null +++ b/test/jdk/java/nio/Buffer/EqualsCompareTest.java @@ -0,0 +1,686 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import org.testng.Assert; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.CharBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; +import java.nio.ShortBuffer; +import java.util.HashMap; +import java.util.Map; +import java.util.function.BiFunction; +import java.util.function.LongFunction; +import java.util.stream.IntStream; + +/* + * @test + * @bug 8193085 + * @summary tests for buffer equals and compare + * @run testng EqualsCompareTest + */ + +public class EqualsCompareTest { + + // Maximum width in bits + static final int MAX_WIDTH = 512; + + static final Map typeToWidth; + + static { + typeToWidth = new HashMap<>(); + typeToWidth.put(byte.class, Byte.SIZE); + typeToWidth.put(short.class, Short.SIZE); + typeToWidth.put(char.class, Character.SIZE); + typeToWidth.put(int.class, Integer.SIZE); + typeToWidth.put(long.class, Long.SIZE); + typeToWidth.put(float.class, Float.SIZE); + typeToWidth.put(double.class, Double.SIZE); + } + + static int arraySizeFor(Class type) { + assert type.isPrimitive(); + return 4 * MAX_WIDTH / typeToWidth.get(type); + } + + enum BufferKind { + HEAP, + HEAP_VIEW, + DIRECT; + } + + static abstract class BufferType { + final BufferKind k; + final Class bufferType; + final Class elementType; + + final MethodHandle eq; + final MethodHandle cmp; + + final MethodHandle getter; + final MethodHandle setter; + + BufferType(BufferKind k, Class bufferType, Class elementType) { + this.k = k; + this.bufferType = bufferType; + this.elementType = elementType; + + var lookup = MethodHandles.lookup(); + try { + eq = lookup.findVirtual(bufferType, "equals", MethodType.methodType(boolean.class, Object.class)); + cmp = lookup.findVirtual(bufferType, "compareTo", MethodType.methodType(int.class, bufferType)); + + getter = lookup.findVirtual(bufferType, "get", MethodType.methodType(elementType, int.class)); + setter = lookup.findVirtual(bufferType, "put", MethodType.methodType(bufferType, int.class, elementType)); + } + catch (Exception e) { + throw new AssertionError(e); + } + } + + @Override + public String toString() { + return bufferType.getName() + " " + k; + } + + T construct(int length) { + return construct(length, ByteOrder.BIG_ENDIAN); + } + + abstract T construct(int length, ByteOrder bo); + + @SuppressWarnings("unchecked") + T slice(T a, int from, int to) { + return (T) a.position(from).limit(to).slice(); + } + + @SuppressWarnings("unchecked") + E get(T a, int i) { + try { + return (E) getter.invoke(a, i); + } + catch (RuntimeException | Error e) { + throw e; + } + catch (Throwable t) { + throw new Error(t); + } + } + + void set(T a, int i, Object v) { + try { + setter.invoke(a, i, convert(v)); + } + catch (RuntimeException | Error e) { + throw e; + } + catch (Throwable t) { + throw new Error(t); + } + } + + abstract Object convert(Object o); + + boolean equals(T a, T b) { + try { + return (boolean) eq.invoke(a, b); + } + catch (RuntimeException | Error e) { + throw e; + } + catch (Throwable t) { + throw new Error(t); + } + } + + int compare(T a, T b) { + try { + return (int) cmp.invoke(a, b); + } + catch (RuntimeException | Error e) { + throw e; + } + catch (Throwable t) { + throw new Error(t); + } + } + + boolean pairWiseEquals(T a, T b) { + if (a.remaining() != b.remaining()) + return false; + int p = a.position(); + for (int i = a.limit() - 1, j = b.limit() - 1; i >= p; i--, j--) + if (!get(a, i).equals(get(b, j))) + return false; + return true; + } + + static class Bytes extends BufferType { + Bytes(BufferKind k) { + super(k, ByteBuffer.class, byte.class); + } + + @Override + ByteBuffer construct(int length, ByteOrder bo) { + switch (k) { + case DIRECT: + return ByteBuffer.allocateDirect(length).order(bo); + default: + case HEAP_VIEW: + case HEAP: + return ByteBuffer.allocate(length).order(bo); + } + } + + @Override + Object convert(Object o) { + return o instanceof Integer + ? ((Integer) o).byteValue() + : o; + } + } + + static class Chars extends BufferType { + Chars(BufferKind k) { + super(k, CharBuffer.class, char.class); + } + + @Override + CharBuffer construct(int length, ByteOrder bo) { + switch (k) { + case DIRECT: + return ByteBuffer.allocateDirect(length * Character.BYTES). + order(bo). + asCharBuffer(); + case HEAP_VIEW: + return ByteBuffer.allocate(length * Character.BYTES). + order(bo). + asCharBuffer(); + default: + case HEAP: + return CharBuffer.allocate(length); + } + } + + @Override + Object convert(Object o) { + return o instanceof Integer + ? (char) ((Integer) o).intValue() + : o; + } + + CharBuffer transformToStringBuffer(CharBuffer c) { + char[] chars = new char[c.remaining()]; + c.get(chars); + return CharBuffer.wrap(new String(chars)); + } + } + + static class Shorts extends BufferType { + Shorts(BufferKind k) { + super(k, ShortBuffer.class, short.class); + } + + @Override + ShortBuffer construct(int length, ByteOrder bo) { + switch (k) { + case DIRECT: + return ByteBuffer.allocateDirect(length * Short.BYTES). + order(bo). + asShortBuffer(); + case HEAP_VIEW: + return ByteBuffer.allocate(length * Short.BYTES). + order(bo). + asShortBuffer(); + default: + case HEAP: + return ShortBuffer.allocate(length); + } + } + + @Override + Object convert(Object o) { + return o instanceof Integer + ? ((Integer) o).shortValue() + : o; + } + } + + static class Ints extends BufferType { + Ints(BufferKind k) { + super(k, IntBuffer.class, int.class); + } + + @Override + IntBuffer construct(int length, ByteOrder bo) { + switch (k) { + case DIRECT: + return ByteBuffer.allocateDirect(length * Integer.BYTES). + order(bo). + asIntBuffer(); + case HEAP_VIEW: + return ByteBuffer.allocate(length * Integer.BYTES). + order(bo). + asIntBuffer(); + default: + case HEAP: + return IntBuffer.allocate(length); + } + } + + Object convert(Object o) { + return o; + } + } + + static class Floats extends BufferType { + Floats(BufferKind k) { + super(k, FloatBuffer.class, float.class); + } + + @Override + FloatBuffer construct(int length, ByteOrder bo) { + switch (k) { + case DIRECT: + return ByteBuffer.allocateDirect(length * Float.BYTES). + order(bo). + asFloatBuffer(); + case HEAP_VIEW: + return ByteBuffer.allocate(length * Float.BYTES). + order(bo). + asFloatBuffer(); + default: + case HEAP: + return FloatBuffer.allocate(length); + } + } + + @Override + Object convert(Object o) { + return o instanceof Integer + ? ((Integer) o).floatValue() + : o; + } + + @Override + boolean pairWiseEquals(FloatBuffer a, FloatBuffer b) { + if (a.remaining() != b.remaining()) + return false; + int p = a.position(); + for (int i = a.limit() - 1, j = b.limit() - 1; i >= p; i--, j--) { + float av = a.get(i); + float bv = b.get(j); + if (av != bv && (!Float.isNaN(av) || !Float.isNaN(bv))) + return false; + } + return true; + } + } + + static class Longs extends BufferType { + Longs(BufferKind k) { + super(k, LongBuffer.class, long.class); + } + + @Override + LongBuffer construct(int length, ByteOrder bo) { + switch (k) { + case DIRECT: + return ByteBuffer.allocateDirect(length * Long.BYTES). + order(bo). + asLongBuffer(); + case HEAP_VIEW: + return ByteBuffer.allocate(length * Long.BYTES). + order(bo). + asLongBuffer(); + default: + case HEAP: + return LongBuffer.allocate(length); + } + } + + @Override + Object convert(Object o) { + return o instanceof Integer + ? ((Integer) o).longValue() + : o; + } + } + + static class Doubles extends BufferType { + Doubles(BufferKind k) { + super(k, DoubleBuffer.class, double.class); + } + + @Override + DoubleBuffer construct(int length, ByteOrder bo) { + switch (k) { + case DIRECT: + return ByteBuffer.allocateDirect(length * Double.BYTES). + order(bo). + asDoubleBuffer(); + case HEAP_VIEW: + return ByteBuffer.allocate(length * Double.BYTES). + order(bo). + asDoubleBuffer(); + default: + case HEAP: + return DoubleBuffer.allocate(length); + } + } + + @Override + Object convert(Object o) { + return o instanceof Integer + ? ((Integer) o).doubleValue() + : o; + } + + @Override + boolean pairWiseEquals(DoubleBuffer a, DoubleBuffer b) { + if (a.remaining() != b.remaining()) + return false; + int p = a.position(); + for (int i = a.limit() - 1, j = b.limit() - 1; i >= p; i--, j--) { + double av = a.get(i); + double bv = b.get(j); + if (av != bv && (!Double.isNaN(av) || !Double.isNaN(bv))) + return false; + } + return true; + } + } + } + + + static Object[][] bufferTypes; + + @DataProvider + public static Object[][] bufferTypesProvider() { + if (bufferTypes == null) { + bufferTypes = new Object[][]{ + {new BufferType.Bytes(BufferKind.HEAP)}, + {new BufferType.Bytes(BufferKind.DIRECT)}, + {new BufferType.Chars(BufferKind.HEAP)}, + {new BufferType.Chars(BufferKind.HEAP_VIEW)}, + {new BufferType.Chars(BufferKind.DIRECT)}, + {new BufferType.Shorts(BufferKind.HEAP)}, + {new BufferType.Shorts(BufferKind.HEAP_VIEW)}, + {new BufferType.Shorts(BufferKind.DIRECT)}, + {new BufferType.Ints(BufferKind.HEAP)}, + {new BufferType.Ints(BufferKind.HEAP_VIEW)}, + {new BufferType.Ints(BufferKind.DIRECT)}, + {new BufferType.Floats(BufferKind.HEAP)}, + {new BufferType.Floats(BufferKind.HEAP_VIEW)}, + {new BufferType.Floats(BufferKind.DIRECT)}, + {new BufferType.Longs(BufferKind.HEAP)}, + {new BufferType.Longs(BufferKind.HEAP_VIEW)}, + {new BufferType.Longs(BufferKind.DIRECT)}, + {new BufferType.Doubles(BufferKind.HEAP)}, + {new BufferType.Doubles(BufferKind.HEAP_VIEW)}, + {new BufferType.Doubles(BufferKind.DIRECT)}, + }; + } + return bufferTypes; + } + + + static Object[][] floatbufferTypes; + + @DataProvider + public static Object[][] floatBufferTypesProvider() { + if (floatbufferTypes == null) { + LongFunction bTof = rb -> Float.intBitsToFloat((int) rb); + LongFunction bToD = Double::longBitsToDouble; + + floatbufferTypes = new Object[][]{ + // canonical and non-canonical NaNs + // If conversion is a signalling NaN it may be subject to conversion to a + // quiet NaN on some processors, even if a copy is performed + // The tests assume that if conversion occurs it does not convert to the + // canonical NaN + new Object[]{new BufferType.Floats(BufferKind.HEAP), 0x7fc00000L, 0x7f800001L, bTof}, + new Object[]{new BufferType.Floats(BufferKind.HEAP_VIEW), 0x7fc00000L, 0x7f800001L, bTof}, + new Object[]{new BufferType.Floats(BufferKind.DIRECT), 0x7fc00000L, 0x7f800001L, bTof}, + new Object[]{new BufferType.Doubles(BufferKind.HEAP), 0x7ff8000000000000L, 0x7ff0000000000001L, bToD}, + new Object[]{new BufferType.Doubles(BufferKind.HEAP_VIEW), 0x7ff8000000000000L, 0x7ff0000000000001L, bToD}, + new Object[]{new BufferType.Doubles(BufferKind.DIRECT), 0x7ff8000000000000L, 0x7ff0000000000001L, bToD}, + + // +0.0 and -0.0 + new Object[]{new BufferType.Floats(BufferKind.HEAP), 0x0L, 0x80000000L, bTof}, + new Object[]{new BufferType.Floats(BufferKind.HEAP_VIEW), 0x0L, 0x80000000L, bTof}, + new Object[]{new BufferType.Floats(BufferKind.DIRECT), 0x0L, 0x80000000L, bTof}, + new Object[]{new BufferType.Doubles(BufferKind.HEAP), 0x0L, 0x8000000000000000L, bToD}, + new Object[]{new BufferType.Doubles(BufferKind.HEAP_VIEW), 0x0L, 0x8000000000000000L, bToD}, + new Object[]{new BufferType.Doubles(BufferKind.DIRECT), 0x0L, 0x8000000000000000L, bToD}, + }; + } + return floatbufferTypes; + } + + + static Object[][] charBufferTypes; + + @DataProvider + public static Object[][] charBufferTypesProvider() { + if (charBufferTypes == null) { + charBufferTypes = new Object[][]{ + {new BufferType.Chars(BufferKind.HEAP)}, + {new BufferType.Chars(BufferKind.HEAP_VIEW)}, + {new BufferType.Chars(BufferKind.DIRECT)}, + }; + } + return charBufferTypes; + } + + + // Tests all primitive buffers + @Test(dataProvider = "bufferTypesProvider") + + void testBuffers(BufferType bufferType) { + // Test with buffers of the same byte order (BE) + BiFunction, Integer, Buffer> constructor = (at, s) -> { + Buffer a = at.construct(s); + for (int x = 0; x < s; x++) { + at.set(a, x, x % 8); + } + return a; + }; + + testBufferType(bufferType, constructor, constructor); + + // Test with buffers of different byte order + if (bufferType.elementType != byte.class && + (bufferType.k == BufferKind.HEAP_VIEW || + bufferType.k == BufferKind.DIRECT)) { + + BiFunction, Integer, Buffer> leConstructor = (at, s) -> { + Buffer a = at.construct(s, ByteOrder.LITTLE_ENDIAN); + for (int x = 0; x < s; x++) { + at.set(a, x, x % 8); + } + return a; + }; + testBufferType(bufferType, constructor, leConstructor); + } + } + + // Tests float and double buffers with edge-case values (NaN, -0.0, +0.0) + @Test(dataProvider = "floatBufferTypesProvider") + public void testFloatBuffers( + BufferType bufferType, + long rawBitsA, long rawBitsB, + LongFunction bitsToFloat) { + Object av = bitsToFloat.apply(rawBitsA); + Object bv = bitsToFloat.apply(rawBitsB); + + BiFunction, Integer, Buffer> allAs = (at, s) -> { + Buffer b = at.construct(s); + for (int x = 0; x < s; x++) { + at.set(b, x, av); + } + return b; + }; + + BiFunction, Integer, Buffer> allBs = (at, s) -> { + Buffer b = at.construct(s); + for (int x = 0; x < s; x++) { + at.set(b, x, bv); + } + return b; + }; + + BiFunction, Integer, Buffer> halfBs = (at, s) -> { + Buffer b = at.construct(s); + for (int x = 0; x < s / 2; x++) { + at.set(b, x, bv); + } + for (int x = s / 2; x < s; x++) { + at.set(b, x, 1); + } + return b; + }; + + // Sanity check + int size = arraySizeFor(bufferType.elementType); + Assert.assertTrue(bufferType.pairWiseEquals(allAs.apply(bufferType, size), + allBs.apply(bufferType, size))); + Assert.assertTrue(bufferType.equals(allAs.apply(bufferType, size), + allBs.apply(bufferType, size))); + + testBufferType(bufferType, allAs, allBs); + testBufferType(bufferType, allAs, halfBs); + } + + // Tests CharBuffer for region sources and CharSequence sources + @Test(dataProvider = "charBufferTypesProvider") + public void testCharBuffers(BufferType.Chars charBufferType) { + + BiFunction constructor = (at, s) -> { + CharBuffer a = at.construct(s); + for (int x = 0; x < s; x++) { + at.set(a, x, x % 8); + } + return a; + }; + + BiFunction constructorX = constructor. + andThen(charBufferType::transformToStringBuffer); + + testBufferType(charBufferType, constructor, constructorX); + } + + + > + void testBufferType(BT bt, + BiFunction aConstructor, + BiFunction bConstructor) { + int n = arraySizeFor(bt.elementType); + + for (int s : ranges(0, n)) { + B a = aConstructor.apply(bt, s); + B b = bConstructor.apply(bt, s); + + for (int aFrom : ranges(0, s)) { + for (int aTo : ranges(aFrom, s)) { + int aLength = aTo - aFrom; + + B as = aLength != s + ? bt.slice(a, aFrom, aTo) + : a; + + for (int bFrom : ranges(0, s)) { + for (int bTo : ranges(bFrom, s)) { + int bLength = bTo - bFrom; + + B bs = bLength != s + ? bt.slice(b, bFrom, bTo) + : b; + + boolean eq = bt.pairWiseEquals(as, bs); + Assert.assertEquals(bt.equals(as, bs), eq); + Assert.assertEquals(bt.equals(bs, as), eq); + if (eq) { + Assert.assertEquals(bt.compare(as, bs), 0); + Assert.assertEquals(bt.compare(bs, as), 0); + } + else { + int aCb = bt.compare(as, bs); + int bCa = bt.compare(bs, as); + int v = Integer.signum(aCb) * Integer.signum(bCa); + Assert.assertTrue(v == -1); + } + } + } + + if (aLength > 0 && !a.isReadOnly()) { + for (int i = aFrom; i < aTo; i++) { + B c = aConstructor.apply(bt, a.capacity()); + B cs = aLength != s + ? bt.slice(c, aFrom, aTo) + : c; + + // Create common prefix with a length of i - aFrom + bt.set(c, i, -1); + + Assert.assertFalse(bt.equals(c, a)); + + int cCa = bt.compare(cs, as); + int aCc = bt.compare(as, cs); + int v = Integer.signum(cCa) * Integer.signum(aCc); + Assert.assertTrue(v == -1); + } + } + } + } + } + } + + static int[] ranges(int from, int to) { + int width = to - from; + switch (width) { + case 0: + return new int[]{}; + case 1: + return new int[]{from, to}; + case 2: + return new int[]{from, from + 1, to}; + case 3: + return new int[]{from, from + 1, from + 2, to}; + default: + return IntStream.of(from, from + 1, from + 2, to / 2 - 1, to / 2, to / 2 + 1, to - 2, to - 1, to) + .filter(i -> i >= from && i <= to) + .distinct().toArray(); + } + } +} From 7cd32cad8934124b07b96c455eb7813b8abb5d2f Mon Sep 17 00:00:00 2001 From: David Holmes Date: Wed, 20 Dec 2017 22:36:21 -0500 Subject: [PATCH 32/88] 8193838: Update jtreg requiredVersion to 4.2 b11 for JDK 11 and 12 support Reviewed-by: alanb, sspitsyn --- make/conf/jib-profiles.js | 2 +- test/hotspot/jtreg/TEST.ROOT | 2 +- test/jaxp/TEST.ROOT | 2 +- test/jdk/TEST.ROOT | 2 +- test/langtools/TEST.ROOT | 2 +- test/nashorn/TEST.ROOT | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js index 5066599a924..d01fdaeaa16 100644 --- a/make/conf/jib-profiles.js +++ b/make/conf/jib-profiles.js @@ -829,7 +829,7 @@ var getJibProfilesDependencies = function (input, common) { jtreg: { server: "javare", revision: "4.2", - build_number: "b10", + build_number: "b11", checksum_file: "MD5_VALUES", file: "jtreg_bin-4.2.zip", environment_name: "JT_HOME", diff --git a/test/hotspot/jtreg/TEST.ROOT b/test/hotspot/jtreg/TEST.ROOT index c7ccaf2f4de..651ebdf6849 100644 --- a/test/hotspot/jtreg/TEST.ROOT +++ b/test/hotspot/jtreg/TEST.ROOT @@ -58,7 +58,7 @@ requires.properties= \ docker.support # Minimum jtreg version -requiredVersion=4.2 b08 +requiredVersion=4.2 b11 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../../ notation to reach them diff --git a/test/jaxp/TEST.ROOT b/test/jaxp/TEST.ROOT index e2f049d3487..4bf95e20e90 100644 --- a/test/jaxp/TEST.ROOT +++ b/test/jaxp/TEST.ROOT @@ -23,7 +23,7 @@ modules=java.xml groups=TEST.groups # Minimum jtreg version -requiredVersion=4.2 b08 +requiredVersion=4.2 b11 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../ notation to reach them diff --git a/test/jdk/TEST.ROOT b/test/jdk/TEST.ROOT index 0aceb5f4710..aa1807b2941 100644 --- a/test/jdk/TEST.ROOT +++ b/test/jdk/TEST.ROOT @@ -39,7 +39,7 @@ requires.properties= \ vm.cds # Minimum jtreg version -requiredVersion=4.2 b09 +requiredVersion=4.2 b11 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../ notation to reach them diff --git a/test/langtools/TEST.ROOT b/test/langtools/TEST.ROOT index 83af0bdffe2..0260ea81ffe 100644 --- a/test/langtools/TEST.ROOT +++ b/test/langtools/TEST.ROOT @@ -15,7 +15,7 @@ keys=intermittent randomness groups=TEST.groups # Minimum jtreg version -requiredVersion=4.2 b08 +requiredVersion=4.2 b11 # Use new module options useNewOptions=true diff --git a/test/nashorn/TEST.ROOT b/test/nashorn/TEST.ROOT index a0e6922a263..be0097f85e3 100644 --- a/test/nashorn/TEST.ROOT +++ b/test/nashorn/TEST.ROOT @@ -8,7 +8,7 @@ keys=intermittent randomness groups=TEST.groups # Minimum jtreg version -requiredVersion=4.2 b08 +requiredVersion=4.2 b11 # Use new module options useNewOptions=true From 755fa4beb78575440418e6752627733171d951d6 Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Thu, 21 Dec 2017 05:51:38 +0000 Subject: [PATCH 33/88] 8193683: Increase the number of clones in the CloneableDigest Reviewed-by: coffeys, wetmore --- .../sun/security/ssl/HandshakeHash.java | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/java.base/share/classes/sun/security/ssl/HandshakeHash.java b/src/java.base/share/classes/sun/security/ssl/HandshakeHash.java index 2a3775da7df..ba86dd87875 100644 --- a/src/java.base/share/classes/sun/security/ssl/HandshakeHash.java +++ b/src/java.base/share/classes/sun/security/ssl/HandshakeHash.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2017, 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 @@ -108,7 +108,29 @@ final class HandshakeHash { * a hash for the certificate verify message is required. */ HandshakeHash(boolean needCertificateVerify) { - clonesNeeded = needCertificateVerify ? 4 : 3; + // We may rework the code later, but for now we use hard-coded number + // of clones if the underlying MessageDigests are not cloneable. + // + // The number used here is based on the current handshake protocols and + // implementation. It may be changed if the handshake processe gets + // changed in the future, for example adding a new extension that + // requires handshake hash. Please be careful about the number of + // clones if additional handshak hash is required in the future. + // + // For the current implementation, the handshake hash is required for + // the following items: + // . CertificateVerify handshake message (optional) + // . client Finished handshake message + // . server Finished Handshake message + // . the extended Master Secret extension [RFC 7627] + // + // Note that a late call to server setNeedClientAuth dose not update + // the number of clones. We may address the issue later. + // + // Note for safety, we allocate one more clone for the current + // implementation. We may consider it more carefully in the future + // for the exact number or rework the code in a different way. + clonesNeeded = needCertificateVerify ? 5 : 4; } void reserve(ByteBuffer input) { @@ -335,7 +357,8 @@ final class HandshakeHash { if (finMD != null) return; try { - finMD = CloneableDigest.getDigest(normalizeAlgName(s), 2); + // See comment in the contructor. + finMD = CloneableDigest.getDigest(normalizeAlgName(s), 4); } catch (NoSuchAlgorithmException e) { throw new Error(e); } From 3e0afd207dbc5d849228ae8e3603c51811671a17 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Thu, 21 Dec 2017 15:58:45 -0500 Subject: [PATCH 34/88] 8193216: Filer should warn if processors redefine symbols from the classpath or sourcepath Reviewed-by: vromero --- .../tools/javac/processing/JavacFiler.java | 10 +-- .../warnings/TypeAlreadyExists/A.java | 24 +++++++ .../warnings/TypeAlreadyExists/B.java | 26 ++++++++ .../TestProcTypeAlreadyExistsWarning.java | 66 +++++++++++++++++++ .../warnings/TypeAlreadyExists/warn.out | 2 + 5 files changed, 123 insertions(+), 5 deletions(-) create mode 100644 test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/A.java create mode 100644 test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/B.java create mode 100644 test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/TestProcTypeAlreadyExistsWarning.java create mode 100644 test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/warn.out diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java index a723d811ed5..c410067db8c 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacFiler.java @@ -712,20 +712,20 @@ public class JavacFiler implements Filer, Closeable { } private void checkNameAndExistence(ModuleSymbol mod, String typename, boolean allowUnnamedPackageInfo) throws FilerException { - // TODO: Check if type already exists on source or class path? - // If so, use warning message key proc.type.already.exists checkName(typename, allowUnnamedPackageInfo); - ClassSymbol existing; + ClassSymbol existing = elementUtils.getTypeElement(typename); boolean alreadySeen = aggregateGeneratedSourceNames.contains(Pair.of(mod, typename)) || aggregateGeneratedClassNames.contains(Pair.of(mod, typename)) || initialClassNames.contains(typename) || - ((existing = elementUtils.getTypeElement(typename)) != null && - initialInputs.contains(existing.sourcefile)); + (existing != null && initialInputs.contains(existing.sourcefile)); if (alreadySeen) { if (lint) log.warning(Warnings.ProcTypeRecreate(typename)); throw new FilerException("Attempt to recreate a file for type " + typename); } + if (lint && existing != null) { + log.warning("proc.type.already.exists", typename); + } if (!mod.isUnnamed() && !typename.contains(".")) { throw new FilerException("Attempt to create a type in unnamed package of a named module: " + typename); } diff --git a/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/A.java b/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/A.java new file mode 100644 index 00000000000..055b50353d8 --- /dev/null +++ b/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/A.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2017, Google Inc. 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +public class A {} diff --git a/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/B.java b/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/B.java new file mode 100644 index 00000000000..3d5379bb9a7 --- /dev/null +++ b/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/B.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2017, Google Inc. 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +class B { + A a; +} diff --git a/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/TestProcTypeAlreadyExistsWarning.java b/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/TestProcTypeAlreadyExistsWarning.java new file mode 100644 index 00000000000..97f9270e1bd --- /dev/null +++ b/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/TestProcTypeAlreadyExistsWarning.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2017, Google Inc. 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8193216 + * @summary Filer should warn if processors redefine symbols from the classpath or sourcepath + * @library /tools/javac/lib + * @modules java.compiler + * jdk.compiler + * @build JavacTestingAbstractProcessor TestProcTypeAlreadyExistsWarning + * @compile A.java + * @compile/ref=warn.out -XDrawDiagnostics -Xlint:processing -processor TestProcTypeAlreadyExistsWarning B.java + */ + +import static java.nio.charset.StandardCharsets.UTF_8; + +import java.io.IOError; +import java.io.IOException; +import java.io.OutputStream; +import java.util.Set; +import javax.annotation.processing.RoundEnvironment; +import javax.annotation.processing.SupportedAnnotationTypes; +import javax.lang.model.element.TypeElement; + +@SupportedAnnotationTypes("*") +public class TestProcTypeAlreadyExistsWarning extends JavacTestingAbstractProcessor { + + int round = 0; + + @Override + public boolean process(Set annotations, RoundEnvironment roundEnv) { + round++; + + if (round == 1) { + try (OutputStream os = + processingEnv.getFiler().createSourceFile("A").openOutputStream()) { + os.write("class A {}".getBytes(UTF_8)); + } catch (IOException e) { + throw new IOError(e); + } + } + + return false; + } +} diff --git a/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/warn.out b/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/warn.out new file mode 100644 index 00000000000..aaef118b960 --- /dev/null +++ b/test/langtools/tools/javac/processing/warnings/TypeAlreadyExists/warn.out @@ -0,0 +1,2 @@ +- compiler.warn.proc.type.already.exists: A +1 warning From 64cef020e79997726b344a383d86d5e208cd4fda Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Thu, 21 Dec 2017 15:04:45 -0800 Subject: [PATCH 35/88] 8193780: (ref) Remove the undocumented "jdk.lang.ref.disableClearBeforeEnqueue" system property Reviewed-by: alanb --- .../share/classes/java/lang/ref/Reference.java | 11 +---------- test/jdk/java/lang/ref/ReferenceEnqueue.java | 8 +------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/java.base/share/classes/java/lang/ref/Reference.java b/src/java.base/share/classes/java/lang/ref/Reference.java index 5125e7cb553..2ead79fb636 100644 --- a/src/java.base/share/classes/java/lang/ref/Reference.java +++ b/src/java.base/share/classes/java/lang/ref/Reference.java @@ -140,14 +140,6 @@ public abstract class Reference { } } - /* - * system property to disable clearing before enqueuing. - */ - private static final class ClearBeforeEnqueue { - static final boolean DISABLE = - Boolean.getBoolean("jdk.lang.ref.disableClearBeforeEnqueue"); - } - /* * Atomically get and clear (set to null) the VM's pending list. */ @@ -299,8 +291,7 @@ public abstract class Reference { * it was not registered with a queue when it was created */ public boolean enqueue() { - if (!ClearBeforeEnqueue.DISABLE) - this.referent = null; + this.referent = null; return this.queue.enqueue(this); } diff --git a/test/jdk/java/lang/ref/ReferenceEnqueue.java b/test/jdk/java/lang/ref/ReferenceEnqueue.java index ddc89fc7f27..c405c5c8a05 100644 --- a/test/jdk/java/lang/ref/ReferenceEnqueue.java +++ b/test/jdk/java/lang/ref/ReferenceEnqueue.java @@ -25,7 +25,6 @@ * @bug 4268317 8132306 8175797 * @summary Test if Reference.enqueue() works properly with GC * @run main ReferenceEnqueue - * @run main/othervm -Djdk.lang.ref.disableClearBeforeEnqueue=true ReferenceEnqueue */ import java.lang.ref.*; @@ -87,8 +86,6 @@ public class ReferenceEnqueue { final ReferenceQueue queue = new ReferenceQueue<>(); final List> refs = new ArrayList<>(); final int iterations = 1000; - final boolean disableClearBeforeEnqueue = - Boolean.getBoolean("jdk.lang.ref.disableClearBeforeEnqueue"); ExplicitEnqueue() { this.refs.add(new SoftReference<>(new Object(), queue)); @@ -101,10 +98,7 @@ public class ReferenceEnqueue { if (ref.enqueue() == false) { throw new RuntimeException("Error: enqueue failed"); } - if (disableClearBeforeEnqueue && ref.get() == null) { - throw new RuntimeException("Error: clearing should be disabled"); - } - if (!disableClearBeforeEnqueue && ref.get() != null) { + if (ref.get() != null) { throw new RuntimeException("Error: referent must be cleared"); } } From 8e4276d62870a5217c9bc2fcf52fa2967d222598 Mon Sep 17 00:00:00 2001 From: Mandy Chung Date: Thu, 21 Dec 2017 15:18:49 -0800 Subject: [PATCH 36/88] 8193767: Improve javadoc in ResourceBundle working with modules Reviewed-by: alanb, naoto --- .../classes/java/util/ResourceBundle.java | 227 ++++++++++-------- .../spi/AbstractResourceBundleProvider.java | 32 +-- .../java/util/spi/ResourceBundleProvider.java | 128 ++++++++-- 3 files changed, 245 insertions(+), 142 deletions(-) diff --git a/src/java.base/share/classes/java/util/ResourceBundle.java b/src/java.base/share/classes/java/util/ResourceBundle.java index b361ceefff4..e902b3e45e8 100644 --- a/src/java.base/share/classes/java/util/ResourceBundle.java +++ b/src/java.base/share/classes/java/util/ResourceBundle.java @@ -204,58 +204,70 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; * known concrete subclasses {@code ListResourceBundle} and * {@code PropertyResourceBundle} are thread-safe. * - *

Resource Bundles in Named Modules

+ *

Resource Bundles and Named Modules

* - * When resource bundles are deployed in named modules, the following - * module-specific requirements and restrictions are applied. + * Resource bundles can be deployed in modules in the following ways: * - *
    - *
  • Code in a named module that calls {@link #getBundle(String, Locale)} - * will locate resource bundles in the caller's module (caller module).
  • - *
  • If resource bundles are deployed in named modules separate from - * the caller module, those resource bundles need to be loaded from service - * providers of {@link ResourceBundleProvider}. The caller module must declare - * "{@code uses}" and the service interface name is the concatenation of the - * package name of the base name, string "{@code .spi.}", the simple class - * name of the base name, and the string "{@code Provider}". The - * bundle provider modules containing resource bundles must - * declare "{@code provides}" with the service interface name and - * its implementation class name. For example, if the base name is - * "{@code com.example.app.MyResources}", the caller module must declare - * "{@code uses com.example.app.spi.MyResourcesProvider;}" and a module containing resource - * bundles must declare "{@code provides com.example.app.spi.MyResourcesProvider - * with com.example.app.internal.MyResourcesProviderImpl;}" - * where {@code com.example.app.internal.MyResourcesProviderImpl} is an - * implementation class of {@code com.example.app.spi.MyResourcesProvider}.
  • - *
  • If you want to use non-standard formats in named modules, such as XML, - * {@link ResourceBundleProvider} needs to be used.
  • - *
  • The {@code getBundle} method with a {@code ClassLoader} may not be able to - * find resource bundles using the given {@code ClassLoader} in named modules. - * The {@code getBundle} method with a {@code Module} can be used, instead.
  • - *
  • {@code ResourceBundle.Control} is not supported in named modules. - * If the {@code getBundle} method with a {@code ResourceBundle.Control} is called - * in a named module, the method will throw an {@code UnsupportedOperationException}. - * Any service providers of {@link ResourceBundleControlProvider} are ignored in - * named modules. - *
  • - *
+ *

Resource bundles together with an application

* - *

ResourceBundleProvider Service Providers

+ * Resource bundles can be deployed together with an application in the same + * module. In that case, the resource bundles are loaded + * by code in the module by calling the {@link #getBundle(String)} + * or {@link #getBundle(String, Locale)} method. * - * The {@code getBundle} factory methods load service providers of - * {@link ResourceBundleProvider}, if available, using {@link ServiceLoader}. - * The service type is designated by - * {@code + ".spi." + + "Provider"}. For - * example, if the base name is "{@code com.example.app.MyResources}", the service - * type is {@code com.example.app.spi.MyResourcesProvider}. - *

- * In named modules, the loaded service providers for the given base name are - * used to load resource bundles. If no service provider is available, or if - * none of the service providers returns a resource bundle and the caller module - * doesn't have its own service provider, the {@code getBundle} factory method - * searches for resource bundles that are local in the caller module and that - * are visible to the class loader of the caller module. The resource bundle - * formats for local module searching are "java.class" and "java.properties". + *

Resource bundles as service providers

+ * + * Resource bundles can be deployed in one or more service provider modules + * and they can be located using {@link ServiceLoader}. + * A {@linkplain ResourceBundleProvider service} interface or class must be + * defined. The caller module declares that it uses the service, the service + * provider modules declare that they provide implementations of the service. + * Refer to {@link ResourceBundleProvider} for developing resource bundle + * services and deploying resource bundle providers. + * The module obtaining the resource bundle can be a resource bundle + * provider itself; in which case this module only locates the resource bundle + * via service provider mechanism. + * + *

A {@linkplain ResourceBundleProvider resource bundle provider} can + * provide resource bundles in any format such XML which replaces the need + * of {@link Control ResourceBundle.Control}. + * + *

Resource bundles in other modules and class path

+ * + * Resource bundles in a named module may be encapsulated so that + * it cannot be located by code in other modules. Resource bundles + * in unnamed modules and class path are open for any module to access. + * Resource bundle follows the resource encapsulation rules as specified + * in {@link Module#getResourceAsStream(String)}. + * + *

The {@code getBundle} factory methods with no {@code Control} parameter + * locate and load resource bundles from + * {@linkplain ResourceBundleProvider service providers}. + * It may continue the search as if calling {@link Module#getResourceAsStream(String)} + * to find the named resource from a given module and calling + * {@link ClassLoader#getResourceAsStream(String)}; refer to + * the specification of the {@code getBundle} method for details. + * Only non-encapsulated resource bundles of "{@code java.class}" + * or "{@code java.properties}" format are searched. + * + *

If the caller module is a + * + * resource bundle provider, it does not fall back to the + * class loader search. + * + *

Resource bundles in automatic modules

+ * + * A common format of resource bundles is in {@linkplain PropertyResourceBundle + * .properties} file format. Typically {@code .properties} resource bundles + * are packaged in a JAR file. Resource bundle only JAR file can be readily + * deployed as an + * automatic module. For example, if the JAR file contains the + * entry "{@code p/q/Foo_ja.properties}" and no {@code .class} entry, + * when resolved and defined as an automatic module, no package is derived + * for this module. This allows resource bundles in {@code .properties} + * format packaged in one or more JAR files that may contain entries + * in the same directory and can be resolved successfully as + * automatic modules. * *

ResourceBundle.Control

* @@ -268,6 +280,14 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; * {@link #getBundle(String, Locale, ClassLoader, Control) getBundle} * factory method for details. * + *

{@link ResourceBundle.Control} is designed for an application deployed + * in an unnamed module, for example to support resource bundles in + * non-standard formats or package localized resources in a non-traditional + * convention. {@link ResourceBundleProvider} is the replacement for + * {@code ResourceBundle.Control} when migrating to modules. + * {@code UnsupportedOperationException} will be thrown when a factory + * method that takes the {@code ResourceBundle.Control} parameter is called. + * *

For the {@code getBundle} factory * methods that take no {@link Control} instance, their default behavior of resource bundle loading @@ -815,14 +835,10 @@ public abstract class ResourceBundle { /** * Gets a resource bundle using the specified base name, the default locale, - * and the caller's class loader. Calling this method is equivalent to calling + * and the caller module. Calling this method is equivalent to calling *

- * getBundle(baseName, Locale.getDefault(), this.getClass().getClassLoader()), + * getBundle(baseName, Locale.getDefault(), callerModule), *
- * except that getClassLoader() is run with the security - * privileges of ResourceBundle. - * See {@link #getBundle(String, Locale, ClassLoader) getBundle} - * for a complete description of the search and instantiation strategy. * * @param baseName the base name of the resource bundle, a fully qualified class name * @exception java.lang.NullPointerException @@ -830,6 +846,9 @@ public abstract class ResourceBundle { * @exception MissingResourceException * if no resource bundle for the specified base name can be found * @return a resource bundle for the given base name and the default locale + * + * @see Resource Bundle Search and Loading Strategy + * @see Resource Bundles and Named Modules */ @CallerSensitive public static final ResourceBundle getBundle(String baseName) @@ -887,14 +906,10 @@ public abstract class ResourceBundle { /** * Gets a resource bundle using the specified base name and locale, - * and the caller's class loader. Calling this method is equivalent to calling + * and the caller module. Calling this method is equivalent to calling *
- * getBundle(baseName, locale, this.getClass().getClassLoader()), + * getBundle(baseName, locale, callerModule), *
- * except that getClassLoader() is run with the security - * privileges of ResourceBundle. - * See {@link #getBundle(String, Locale, ClassLoader) getBundle} - * for a complete description of the search and instantiation strategy. * * @param baseName * the base name of the resource bundle, a fully qualified class name @@ -905,6 +920,9 @@ public abstract class ResourceBundle { * @exception MissingResourceException * if no resource bundle for the specified base name can be found * @return a resource bundle for the given base name and locale + * + * @see Resource Bundle Search and Loading Strategy + * @see Resource Bundles and Named Modules */ @CallerSensitive public static final ResourceBundle getBundle(String baseName, @@ -922,19 +940,6 @@ public abstract class ResourceBundle { * getBundle(baseName, Locale.getDefault(), module) * * - *

Resource bundles in named modules may be encapsulated. When - * the resource bundle is loaded from a provider, the caller module - * must have an appropriate uses clause in its module descriptor - * to declare that the module uses implementations of - * {@code + ".spi." + + "Provider"}. - * Otherwise, it will load the resource bundles that are local in the - * given module or that are visible to the class loader of the given module - * (refer to the Resource Bundles in Named Modules - * section for details). - * When the resource bundle is loaded from the specified module, it is - * subject to the encapsulation rules specified by - * {@link Module#getResourceAsStream Module.getResourceAsStream}. - * * @param baseName the base name of the resource bundle, * a fully qualified class name * @param module the module for which the resource bundle is searched @@ -950,6 +955,8 @@ public abstract class ResourceBundle { * @since 9 * @spec JPMS * @see ResourceBundleProvider + * @see Resource Bundle Search and Loading Strategy + * @see Resource Bundles and Named Modules */ @CallerSensitive public static ResourceBundle getBundle(String baseName, Module module) { @@ -963,14 +970,15 @@ public abstract class ResourceBundle { * on behalf of the specified module. * *

Resource bundles in named modules may be encapsulated. When - * the resource bundle is loaded from a provider, the caller module + * the resource bundle is loaded from a + * {@linkplain ResourceBundleProvider service provider}, the caller module * must have an appropriate uses clause in its module descriptor - * to declare that the module uses implementations of - * {@code + ".spi." + + "Provider"}. + * to declare that the module uses of {@link ResourceBundleProvider} + * for the named resource bundle. * Otherwise, it will load the resource bundles that are local in the - * given module or that are visible to the class loader of the given module - * (refer to the Resource Bundles in Named Modules - * section for details). + * given module as if calling {@link Module#getResourceAsStream(String)} + * or that are visible to the class loader of the given module + * as if calling {@link ClassLoader#getResourceAsStream(String)}. * When the resource bundle is loaded from the specified module, it is * subject to the encapsulation rules specified by * {@link Module#getResourceAsStream Module.getResourceAsStream}. @@ -1000,6 +1008,8 @@ public abstract class ResourceBundle { * @return a resource bundle for the given base name and locale in the module * @since 9 * @spec JPMS + * @see Resource Bundle Search and Loading Strategy + * @see Resource Bundles and Named Modules */ @CallerSensitive public static ResourceBundle getBundle(String baseName, Locale targetLocale, Module module) { @@ -1060,28 +1070,25 @@ public abstract class ResourceBundle { * Gets a resource bundle using the specified base name, locale, and class * loader. * - *

This method behaves the same as calling - * {@link #getBundle(String, Locale, ClassLoader, Control)} passing a - * default instance of {@link Control} unless another {@link Control} is - * provided with the {@link ResourceBundleControlProvider} SPI. Refer to the - * description of modifying the default - * behavior. + *

When this method is called from a named module and the given + * loader is the class loader of the caller module, this is equivalent + * to calling: + *

+     * getBundle(baseName, targetLocale, callerModule)
+     * 
* - *

The following describes the default - * behavior. + * otherwise, this is equivalent to calling: + *

+     * getBundle(baseName, targetLocale, loader, control)
+     * 
+ * where {@code control} is the default instance of {@link Control} unless + * a {@code Control} instance is provided by + * {@link ResourceBundleControlProvider} SPI. Refer to the + * description of modifying the default + * behavior. The following describes the default behavior. * *

- * Resource bundles in a named module are private to that module. If - * the caller is in a named module, this method will find resource bundles - * from the service providers of {@link java.util.spi.ResourceBundleProvider} - * if any. Otherwise, it will load the resource bundles that are visible to - * the given {@code loader} (refer to the - * Resource Bundles in Named Modules section - * for details). - * If the caller is in a named module and the given {@code loader} is - * different than the caller's class loader, or if the caller is not in - * a named module, this method will not find resource bundles from named - * modules. + * Resource Bundle Search and Loading Strategy * *

getBundle uses the base name, the specified locale, and * the default locale (obtained from {@link java.util.Locale#getDefault() @@ -1201,7 +1208,7 @@ public abstract class ResourceBundle { * *

Note:The baseName argument should be a fully * qualified class name. However, for compatibility with earlier versions, - * Sun's Java SE Runtime Environments do not verify this, and so it is + * Java SE Runtime Environments do not verify this, and so it is * possible to access PropertyResourceBundles by specifying a * path name (using "/") instead of a fully qualified class name (using * "."). @@ -1248,7 +1255,7 @@ public abstract class ResourceBundle { * * @apiNote If the caller module is a named module and the given * {@code loader} is the caller module's class loader, this method is - * equivalent to {@code getBundle(baseName, locale)}; otherwise, it will not + * equivalent to {@code getBundle(baseName, locale)}; otherwise, it may not * find resource bundles from named modules. * Use {@link #getBundle(String, Locale, Module)} to load resource bundles * on behalf on a specific module instead. @@ -1264,6 +1271,7 @@ public abstract class ResourceBundle { * @since 1.2 * @revised 9 * @spec JPMS + * @see Resource Bundles and Named Modules */ @CallerSensitive public static ResourceBundle getBundle(String baseName, Locale locale, @@ -1278,9 +1286,9 @@ public abstract class ResourceBundle { /** * Returns a resource bundle using the specified base name, target - * locale, class loader and control. Unlike the {@linkplain - * #getBundle(String, Locale, ClassLoader) getBundle - * factory methods with no control argument}, the given + * locale, class loader and control. Unlike the {@link + * #getBundle(String, Locale, ClassLoader) getBundle} + * factory methods with no {@code control} argument, the given * control specifies how to locate and instantiate resource * bundles. Conceptually, the bundle loading process with the given * control is performed in the following steps. @@ -2365,7 +2373,14 @@ public abstract class ResourceBundle { * the callback methods provides the information necessary for the * factory methods to perform the default behavior. - * Note that this class is not supported in named modules. + * + *

{@link ResourceBundle.Control} is designed for an application deployed + * in an unnamed module, for example to support resource bundles in + * non-standard formats or package localized resources in a non-traditional + * convention. {@link ResourceBundleProvider} is the replacement for + * {@code ResourceBundle.Control} when migrating to modules. + * {@code UnsupportedOperationException} will be thrown when a factory + * method that takes the {@code ResourceBundle.Control} parameter is called. * *

In addition to the callback methods, the {@link * #toBundleName(String, Locale) toBundleName} and {@link @@ -2501,8 +2516,8 @@ public abstract class ResourceBundle { * } * * - * @apiNote {@code ResourceBundle.Control} is not supported - * in named modules. If the {@code ResourceBundle.getBundle} method with + * @apiNote {@code ResourceBundle.Control} is not supported + * in named modules. If the {@code ResourceBundle.getBundle} method with * a {@code ResourceBundle.Control} is called in a named module, the method * will throw an {@link UnsupportedOperationException}. Any service providers * of {@link ResourceBundleControlProvider} are ignored in named modules. diff --git a/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java b/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java index 937d233e267..2c543c63bcf 100644 --- a/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java +++ b/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java @@ -45,42 +45,46 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION; * *

* Resource bundles can be packaged in one or more - * named modules, bundle modules. The consumer of the + * named modules, service provider modules. The consumer of the * resource bundle is the one calling {@link ResourceBundle#getBundle(String)}. * In order for the consumer module to load a resource bundle * "{@code com.example.app.MyResources}" provided by another module, * it will use the {@linkplain java.util.ServiceLoader service loader} - * mechanism. A service interface named "{@code com.example.app.MyResourcesProvider}" - * must be defined and a bundle provider module will provide an - * implementation class of "{@code com.example.app.MyResourcesProvider}" + * mechanism. A service interface named "{@code com.example.app.spi.MyResourcesProvider}" + * must be defined and a service provider module will provide an + * implementation class of "{@code com.example.app.spi.MyResourcesProvider}" * as follows: * - *


- * import com.example.app.MyResourcesProvider;
+ * 
+ * {@code import com.example.app.spi.MyResourcesProvider;
  * class MyResourcesProviderImpl extends AbstractResourceBundleProvider
  *     implements MyResourcesProvider
  * {
+ *     public MyResourcesProviderImpl() {
+ *         super("java.properties");
+ *     }
+ *     // this provider maps the resource bundle to per-language package
  *     protected String toBundleName(String baseName, Locale locale) {
- *         // return the bundle name per the naming of the resource bundle
- *         :
+ *         return "p." + locale.getLanguage() + "." + baseName;
  *     }
  *
  *     public ResourceBundle getBundle(String baseName, Locale locale) {
- *         // this module only provides bundles in french
+ *         // this module only provides bundles in French
  *         if (locale.equals(Locale.FRENCH)) {
  *              return super.getBundle(baseName, locale);
  *         }
+ *         // otherwise return null
  *         return null;
  *     }
- * }
+ * }}
* - * @see - * Resource Bundles in Named Modules - * @see - * ResourceBundleProvider Service Providers + * Refer to {@link ResourceBundleProvider} for details. * + * @see + * Resource Bundles and Named Modules * @since 9 * @spec JPMS + */ public abstract class AbstractResourceBundleProvider implements ResourceBundleProvider { private static final JavaUtilResourceBundleAccess RB_ACCESS = diff --git a/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java b/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java index 0cb0bccd4a6..62fa501c538 100644 --- a/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java +++ b/src/java.base/share/classes/java/util/spi/ResourceBundleProvider.java @@ -29,33 +29,117 @@ import java.util.Locale; import java.util.ResourceBundle; /** - * {@code ResourceBundleProvider} is a provider interface that is used for - * loading resource bundles for named modules. Implementation classes of - * this interface are loaded with {@link java.util.ServiceLoader ServiceLoader} - * during a call to the - * {@link ResourceBundle#getBundle(String, Locale, ClassLoader) - * ResourceBundle.getBundle} method. The provider service type is determined by - * {@code + ".spi." + + "Provider"}. + * {@code ResourceBundleProvider} is a service provider interface for + * resource bundles. It is used by + * {@link ResourceBundle#getBundle(String) ResourceBundle.getBundle} + * factory methods to locate and load the service providers that are deployed as + * modules via {@link java.util.ServiceLoader ServiceLoader}. * - *

- * For example, if the base name is "com.example.app.MyResources", - * {@code com.example.app.spi.MyResourcesProvider} will be the provider service type: - *

{@code
+ * 

Developing resource bundle services

+ * + * A service for a resource bundle of a given {@code baseName} must have + * a fully-qualified class name of the form: + *
+ * {@code + ".spi." + + "Provider"} + *
+ * + * The service type is in a {@code spi} subpackage as it may be packaged in + * a module separate from the resource bundle providers. + * For example, the service for a resource bundle named + * {@code com.example.app.MyResources} must be + * {@code com.example.app.spi.MyResourcesProvider}: + * + *
+ * {@code package com.example.app.spi;
  * public interface MyResourcesProvider extends ResourceBundleProvider {
  * }
- * }
+ * }
* - *

- * This providers's {@link #getBundle(String, Locale) getBundle} method is called - * through the resource bundle loading process instead of {@link - * java.util.ResourceBundle.Control#newBundle(String, Locale, String, ClassLoader, boolean) - * ResourceBundle.Control.newBundle()}. Refer to {@link ResourceBundle} for - * details. + *

Deploying resource bundle service providers

* - * @see - * Resource Bundles in Named Modules - * @see - * ResourceBundleProvider Service Providers + * Resource bundles can be deployed in one or more service providers + * in modules. For example, a provider for a service + * named "{@code com.example.app.spi.MyResourcesProvider}" + * has the following implementation class: + * + *
+ * {@code import com.example.app.spi.MyResourcesProvider;
+ * class MyResourcesProviderImpl extends AbstractResourceBundleProvider
+ *     implements MyResourcesProvider
+ * {
+ *     public MyResourcesProviderImpl() {
+ *         super("java.properties");
+ *     }
+ *     // this provider maps the resource bundle to per-language package
+ *     protected String toBundleName(String baseName, Locale locale) {
+ *         return "p." + locale.getLanguage() + "." + baseName;
+ *     }
+ *
+ *     public ResourceBundle getBundle(String baseName, Locale locale) {
+ *         // this module only provides bundles in French
+ *         if (locale.equals(Locale.FRENCH)) {
+ *              return super.getBundle(baseName, locale);
+ *         }
+ *         // otherwise return null
+ *         return null;
+ *     }
+ * }}
+ * + * This example provides "{@code com.example.app.MyResources}" + * resource bundle of the French locale. Traditionally resource bundles of + * all locales are packaged in the same package as the resource bundle base name. + * When deploying resource bundles in more than one modules and two modules + * containing a package of the same name, split package, + * is not supported, resource bundles in each module can be packaged in + * a different package as shown in this example where this provider packages + * the resource bundles in per-language package, i.e. {@code com.example.app.fr} + * for French locale. + * + *

A provider can provide more than one services, each of which is a service + * for a resource bundle of a different base name. + * + *

{@link AbstractResourceBundleProvider} + * provides the basic implementation for {@code ResourceBundleProvider} + * and a subclass can override the {@link + * AbstractResourceBundleProvider#toBundleName(String, Locale) toBundleName} + * method to return a provider-specific location of the resource to be loaded, + * for example, per-language package. + * A provider can override {@link #getBundle ResourceBundleProvider.getBundle} + * method for example to only search the known supported locales or + * return resource bundles in other formats such as XML. + * + *

The module declaration of this provider module specifies the following + * directive: + *

+ *     provides com.example.app.spi.MyResourcesProvider with com.example.impl.MyResourcesProviderImpl;
+ * 
+ * + *

Obtaining resource bundles from providers

+ * + * The module declaration of the consumer module that calls one of the + * {@code ResourceBundle.getBundle} factory methods to obtain a resource + * bundle from service providers must specify the following directive: + *
+ *     uses com.example.app.spi.MyResourcesProvider;
+ * 
+ * + * {@link ResourceBundle#getBundle(String, Locale) + * ResourceBundle.getBundle("com.example.app.MyResource", locale)} + * locates and loads the providers for {@code com.example.app.spi.MyResourcesProvider} + * service and then invokes {@link #getBundle(String, Locale) + * ResourceBundleProvider.getBundle("com.example.app.MyResource", locale)} to + * find the resource bundle of the given base name and locale. + * If the consumer module is a resource bundle service provider for + * {@code com.example.app.spi.MyResourcesProvider}, {@code ResourceBundle.getBundle} + * will locate resource bundles only from service providers. + * Otherwise, {@code ResourceBundle.getBundle} may continue the search of + * the resource bundle in other modules and class path per the specification + * of the {@code ResourceBundle.getBundle} method being called. + * + * @see AbstractResourceBundleProvider + * @see + * Resource Bundles and Named Modules + * @see java.util.ServiceLoader * @since 9 * @spec JPMS */ From bc0b016989c878ed7bf9263704be61985e0956b5 Mon Sep 17 00:00:00 2001 From: Tobias Hartmann Date: Fri, 15 Dec 2017 16:51:13 +0100 Subject: [PATCH 37/88] 8193608: Quarantine test/hotspot/jtreg/compiler/codegen/Test6896617.java until JDK-8193479 is fixed Added test to ProblemList.txt Reviewed-by: vlivanov --- test/hotspot/jtreg/ProblemList.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index a07b9c9e792..576f582ca41 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -42,6 +42,7 @@ compiler/ciReplay/TestSAServer.java 8029528 generic-all compiler/codecache/stress/OverloadCompileQueueTest.java 8166554 generic-all +compiler/codegen/Test6896617.java 8193479 generic-all compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java 8140405 generic-all compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java 8158860 generic-all compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java 8163894 generic-all From 2ef82abdb612a48f68710c28999f031ecca988f3 Mon Sep 17 00:00:00 2001 From: Michael McMahon Date: Tue, 19 Dec 2017 15:48:49 +0000 Subject: [PATCH 38/88] 8192966: HttpClient should reuse TCP connection for h2c connections Reviewed-by: dfuchs --- .../classes/jdk/incubator/http/Exchange.java | 5 +- .../jdk/incubator/http/ExchangeImpl.java | 7 ++ .../jdk/incubator/http/Http2ClientImpl.java | 106 ++++++++---------- .../jdk/incubator/http/Http2Connection.java | 25 ++++- .../incubator/http/PlainHttpConnection.java | 2 +- .../jdk/incubator/http/ResponseContent.java | 2 +- .../http2/server/Http2TestServer.java | 15 ++- 7 files changed, 91 insertions(+), 71 deletions(-) diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java index 2cead021166..f073ee3e183 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Exchange.java @@ -373,13 +373,16 @@ final class Exchange { client.client2(), this, e::drainLeftOverBytes) .thenCompose((Http2Connection c) -> { - c.putConnection(); + boolean cached = c.offerConnection(); Stream s = c.getStream(1); + if (s == null) { // s can be null if an exception occurred // asynchronously while sending the preface. Throwable t = c.getRecordedCause(); if (t != null) { + if (!cached) + c.close(); return MinimalFuture.failedFuture( new IOException("Can't get stream 1: " + t, t)); } diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java index 3b4b6fc6983..80f6bd304ef 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ExchangeImpl.java @@ -98,6 +98,7 @@ abstract class ExchangeImpl { HttpConnection connection) { DEBUG_LOGGER.log(Level.DEBUG, "handling HTTP/2 connection creation result"); + boolean secure = exchange.request().secure(); if (t != null) { DEBUG_LOGGER.log(Level.DEBUG, "handling HTTP/2 connection creation failed: %s", @@ -116,6 +117,12 @@ abstract class ExchangeImpl { return CompletableFuture.failedFuture(t); } } + if (secure && c== null) { + DEBUG_LOGGER.log(Level.DEBUG, "downgrading to HTTP/1.1 "); + CompletableFuture> ex = + createHttp1Exchange(exchange, null); + return ex; + } if (c == null) { // no existing connection. Send request with HTTP 1 and then // upgrade if successful diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2ClientImpl.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2ClientImpl.java index 500ad84e63b..ee4907e22cd 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2ClientImpl.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2ClientImpl.java @@ -65,96 +65,78 @@ class Http2ClientImpl { /* Map key is "scheme:host:port" */ private final Map connections = new ConcurrentHashMap<>(); - private final Set opening = Collections.synchronizedSet(new HashSet<>()); - private final Map>> waiting = - Collections.synchronizedMap(new HashMap<>()); - - private void addToWaiting(String key, CompletableFuture cf) { - synchronized (waiting) { - Set> waiters = waiting.get(key); - if (waiters == null) { - waiters = new HashSet<>(); - waiting.put(key, waiters); - } - waiters.add(cf); - } - } + private final Set failures = Collections.synchronizedSet(new HashSet<>()); /** - * If a https request then async waits until a connection is opened. - * Returns null if the request is 'http' as a different (upgrade) - * mechanism is used. + * When HTTP/2 requested only. The following describes the aggregate behavior including the + * calling code. In all cases, the HTTP2 connection cache + * is checked first for a suitable connection and that is returned if available. + * If not, a new connection is opened, except in https case when a previous negotiate failed. + * In that case, we want to continue using http/1.1. When a connection is to be opened and + * if multiple requests are sent in parallel then each will open a new connection. * - * Only one connection per destination is created. Blocks when opening - * connection, or when waiting for connection to be opened. - * First thread opens the connection and notifies the others when done. + * If negotiation/upgrade succeeds then + * one connection will be put in the cache and the others will be closed + * after the initial request completes (not strictly necessary for h2, only for h2c) * - * If the request is secure (https) then we open the connection here. - * If not, then the more complicated upgrade from 1.1 to 2 happens (not here) - * In latter case, when the Http2Connection is connected, putConnection() must - * be called to store it. + * If negotiate/upgrade fails, then any opened connections remain open (as http/1.1) + * and will be used and cached in the http/1 cache. Note, this method handles the + * https failure case only (by completing the CF with an ALPN exception, handled externally) + * The h2c upgrade is handled externally also. + * + * Specific CF behavior of this method. + * 1. completes with ALPN exception: h2 negotiate failed for first time. failure recorded. + * 2. completes with other exception: failure not recorded. Caller must handle + * 3. completes normally with null: no connection in cache for h2c or h2 failed previously + * 4. completes normally with connection: h2 or h2c connection in cache. Use it. */ CompletableFuture getConnectionFor(HttpRequestImpl req) { URI uri = req.uri(); InetSocketAddress proxy = req.proxy(); String key = Http2Connection.keyFor(uri, proxy); - synchronized (opening) { + synchronized (this) { Http2Connection connection = connections.get(key); if (connection != null) { // fast path if connection already exists return CompletableFuture.completedFuture(connection); } - if (!req.secure()) { + if (!req.secure() || failures.contains(key)) { + // secure: negotiate failed before. Use http/1.1 + // !secure: no connection available in cache. Attempt upgrade return MinimalFuture.completedFuture(null); } - - if (!opening.contains(key)) { - debug.log(Level.DEBUG, "Opening: %s", key); - opening.add(key); - } else { - CompletableFuture cf = new MinimalFuture<>(); - addToWaiting(key, cf); - return cf; - } } return Http2Connection .createAsync(req, this) .whenComplete((conn, t) -> { - debug.log(Level.DEBUG, - "waking up dependents with created connection"); - synchronized (opening) { - Set> waiters = waiting.remove(key); - debug.log(Level.DEBUG, "Opening completed: %s", key); - opening.remove(key); - if (t == null && conn != null) - putConnection(conn); - final Throwable cause = Utils.getCompletionCause(t); - if (waiters == null) { - debug.log(Level.DEBUG, "no dependent to wake up"); - return; - } else if (cause instanceof Http2Connection.ALPNException) { - waiters.forEach((cf1) -> cf1.completeAsync(() -> null, - client.theExecutor())); - } else if (cause != null) { - debug.log(Level.DEBUG, - () -> "waking up dependants: failed: " + cause); - waiters.forEach((cf1) -> cf1.completeExceptionally(cause)); - } else { - debug.log(Level.DEBUG, "waking up dependants: succeeded"); - waiters.forEach((cf1) -> cf1.completeAsync(() -> conn, - client.theExecutor())); + synchronized (Http2ClientImpl.this) { + if (conn != null) { + offerConnection(conn); + } else { + Throwable cause = Utils.getCompletionCause(t); + if (cause instanceof Http2Connection.ALPNException) + failures.add(key); } } }); } /* - * TODO: If there isn't a connection to the same destination, then - * store it. If there is already a connection, then close it + * Cache the given connection, if no connection to the same + * destination exists. If one exists, then we let the initial stream + * complete but allow it to close itself upon completion. + * This situation should not arise with https because the request + * has not been sent as part of the initial alpn negotiation */ - void putConnection(Http2Connection c) { - connections.put(c.key(), c); + boolean offerConnection(Http2Connection c) { + String key = c.key(); + Http2Connection c1 = connections.putIfAbsent(key, c); + if (c1 != null) { + c.setSingleStream(true); + return false; + } + return true; } void deleteConnection(Http2Connection c) { diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java index d4522b20979..823cb236c28 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java @@ -116,6 +116,8 @@ class Http2Connection { Utils.getHpackLogger(this::dbgString, DEBUG_HPACK); static final ByteBuffer EMPTY_TRIGGER = ByteBuffer.allocate(0); + private boolean singleStream; // used only for stream 1, then closed + /* * ByteBuffer pooling strategy for HTTP/2 protocol: * @@ -202,7 +204,6 @@ class Http2Connection { prefaceSent = true; } } - } volatile boolean closed; @@ -397,6 +398,14 @@ class Http2Connection { return aconn.getALPN().thenCompose(checkAlpnCF); } + synchronized boolean singleStream() { + return singleStream; + } + + synchronized void setSingleStream(boolean use) { + singleStream = use; + } + static String keyFor(HttpConnection connection) { boolean isProxy = connection.isProxied(); boolean isSecure = connection.isSecure(); @@ -429,6 +438,10 @@ class Http2Connection { // P indicates proxy // Eg: "S:H:foo.com:80" static String keyString(boolean secure, boolean proxy, String host, int port) { + if (secure && port == -1) + port = 443; + else if (!secure && port == -1) + port = 80; return (secure ? "S:" : "C:") + (proxy ? "P:" : "H:") + host + ":" + port; } @@ -436,8 +449,8 @@ class Http2Connection { return this.key; } - void putConnection() { - client2.putConnection(this); + boolean offerConnection() { + return client2.offerConnection(this); } private HttpPublisher publisher() { @@ -464,6 +477,7 @@ class Http2Connection { } void close() { + Log.logTrace("Closing HTTP/2 connection: to {0}", connection.address()); GoAwayFrame f = new GoAwayFrame(0, ErrorFrame.NO_ERROR, "Requested by user".getBytes()); // TODO: set last stream. For now zero ok. sendFrame(f); @@ -680,7 +694,12 @@ class Http2Connection { // corresponding entry in the window controller. windowController.removeStream(streamid); } + if (singleStream() && streams.isEmpty()) { + // should be only 1 stream, but there might be more if server push + close(); + } } + /** * Increments this connection's send Window by the amount in the given frame. */ diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainHttpConnection.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainHttpConnection.java index a8281835b8a..528b8dea035 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainHttpConnection.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/PlainHttpConnection.java @@ -84,7 +84,7 @@ class PlainHttpConnection extends HttpConnection { boolean finished = chan.finishConnect(); assert finished : "Expected channel to be connected"; debug.log(Level.DEBUG, - "ConnectEvent: connect finished: %s", finished); + "ConnectEvent: connect finished: %s Local addr: %s", finished, chan.getLocalAddress()); connected = true; // complete async since the event runs on the SelectorManager thread cf.completeAsync(() -> null, client().theExecutor()); diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseContent.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseContent.java index d95e51d3963..2a35ffb3eb0 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseContent.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseContent.java @@ -401,8 +401,8 @@ class ResponseContent { pusher.onSubscribe(this.sub = sub); try { if (contentLength == 0) { - pusher.onComplete(); onFinished.run(); + pusher.onComplete(); onComplete.accept(null); } } catch (Throwable t) { diff --git a/test/jdk/java/net/httpclient/http2/server/Http2TestServer.java b/test/jdk/java/net/httpclient/http2/server/Http2TestServer.java index 721cb960d99..019db437720 100644 --- a/test/jdk/java/net/httpclient/http2/server/Http2TestServer.java +++ b/test/jdk/java/net/httpclient/http2/server/Http2TestServer.java @@ -170,7 +170,7 @@ public class Http2TestServer implements AutoCloseable { return new ServerSocket(port); } - public void stop() { + public synchronized void stop() { // TODO: clean shutdown GoAway stopping = true; System.err.printf("Server stopping %d connections\n", connections.size()); @@ -205,6 +205,15 @@ public class Http2TestServer implements AutoCloseable { return serverName; } + private synchronized void putConnection(InetSocketAddress addr, Http2TestServerConnection c) { + if (!stopping) + connections.put(addr, c); + } + + private synchronized void removeConnection(InetSocketAddress addr, Http2TestServerConnection c) { + connections.remove(addr, c); + } + /** * Starts a thread which waits for incoming connections. */ @@ -216,7 +225,7 @@ public class Http2TestServer implements AutoCloseable { InetSocketAddress addr = (InetSocketAddress) socket.getRemoteSocketAddress(); Http2TestServerConnection c = new Http2TestServerConnection(this, socket, exchangeSupplier); - connections.put(addr, c); + putConnection(addr, c); try { c.run(); } catch (Throwable e) { @@ -224,7 +233,7 @@ public class Http2TestServer implements AutoCloseable { // the connection might not have been closed // and if so then the client might wait // forever. - connections.remove(addr, c); + removeConnection(addr, c); c.close(ErrorFrame.PROTOCOL_ERROR); System.err.println("TestServer: start exception: " + e); //throw e; From 281beca855bea169c3175860ab951ee73012e128 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Tue, 19 Dec 2017 21:35:30 +0530 Subject: [PATCH 39/88] 8193779: Fix copyright header in nashorn builtin scripts Reviewed-by: alanb, hannesw --- .../nashorn/internal/runtime/resources/mozilla_compat.js | 4 +++- .../jdk/nashorn/internal/runtime/resources/parser.js | 4 +++- .../script/trusted/classfilter_mozilla_compat.js.EXPECTED | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/mozilla_compat.js b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/mozilla_compat.js index a829e4c54f9..dadef9bbc61 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/mozilla_compat.js +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/mozilla_compat.js @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/parser.js b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/parser.js index 94d02aba67b..bd511f0e009 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/parser.js +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/parser.js @@ -4,7 +4,9 @@ * * 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. + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or diff --git a/test/nashorn/script/trusted/classfilter_mozilla_compat.js.EXPECTED b/test/nashorn/script/trusted/classfilter_mozilla_compat.js.EXPECTED index 7491e443b91..19db7152c22 100644 --- a/test/nashorn/script/trusted/classfilter_mozilla_compat.js.EXPECTED +++ b/test/nashorn/script/trusted/classfilter_mozilla_compat.js.EXPECTED @@ -1,12 +1,12 @@ class jdk.nashorn.javaadapters.javax_script_ScriptContext -TypeError: Java.extend needs at least one type argument. in nashorn:mozilla_compat.js at line number 39 +TypeError: Java.extend needs at least one type argument. in nashorn:mozilla_compat.js at line number 41 class jdk.nashorn.javaadapters.java_util_ArrayList class jdk.nashorn.javaadapters.java_util_ArrayList [JavaClass java.lang.Integer] -TypeError: [object JavaPackage] is not a Java class in nashorn:mozilla_compat.js at line number 373 at column number 16 +TypeError: [object JavaPackage] is not a Java class in nashorn:mozilla_compat.js at line number 375 at column number 16 [JavaClass java.util.HashSet] [JavaClass java.util.HashSet] [JavaClass java.lang.Integer] -ReferenceError: "Integer" is not defined in nashorn:mozilla_compat.js at line number 67 +ReferenceError: "Integer" is not defined in nashorn:mozilla_compat.js at line number 69 [JavaClass java.util.HashMap] [JavaClass java.util.HashMap] From 1b33afc091c7780a43a06a3c18ea5dcc9452b562 Mon Sep 17 00:00:00 2001 From: Mark Reinhold Date: Tue, 19 Dec 2017 08:51:11 -0800 Subject: [PATCH 40/88] 8193764: Cannot set COMPANY_NAME when configuring a build Reviewed-by: erikj, martin, tbell --- make/autoconf/generated-configure.sh | 21 +++++++++++++++++++-- make/autoconf/jdk-version.m4 | 13 ++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/make/autoconf/generated-configure.sh b/make/autoconf/generated-configure.sh index e11acdc166a..ee9544d4eac 100644 --- a/make/autoconf/generated-configure.sh +++ b/make/autoconf/generated-configure.sh @@ -901,10 +901,10 @@ VERSION_PATCH VERSION_UPDATE VERSION_INTERIM VERSION_FEATURE +COMPANY_NAME MACOSX_BUNDLE_ID_BASE MACOSX_BUNDLE_NAME_BASE HOTSPOT_VM_DISTRO -COMPANY_NAME JDK_RC_PLATFORM_NAME PRODUCT_SUFFIX PRODUCT_NAME @@ -1147,6 +1147,7 @@ with_build_number with_version_major with_version_minor with_version_security +with_vendor_name with_version_string with_version_pre with_version_opt @@ -2083,6 +2084,7 @@ Optional Packages: compatibility and is ignored --with-version-security Deprecated. Option is kept for backwards compatibility and is ignored + --with-vendor-name Set vendor name [not specified] --with-version-string Set version string [calculated] --with-version-pre Set the base part of the version 'PRE' field (pre-release identifier) ['internal'] @@ -5185,7 +5187,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1513206608 +DATE_WHEN_GENERATED=1513702260 ############################################################################### # @@ -25055,6 +25057,21 @@ fi + # The vendor name, if any + +# Check whether --with-vendor-name was given. +if test "${with_vendor_name+set}" = set; then : + withval=$with_vendor_name; +fi + + if test "x$with_vendor_name" = xyes; then + as_fn_error $? "--with-vendor-name must have a value" "$LINENO" 5 + elif ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ; then + as_fn_error $? "--with--vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5 + else + COMPANY_NAME="$with_vendor_name" + fi + # Override version from arguments diff --git a/make/autoconf/jdk-version.m4 b/make/autoconf/jdk-version.m4 index dff742576b1..c2e300e861a 100644 --- a/make/autoconf/jdk-version.m4 +++ b/make/autoconf/jdk-version.m4 @@ -74,11 +74,22 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS], AC_SUBST(PRODUCT_NAME) AC_SUBST(PRODUCT_SUFFIX) AC_SUBST(JDK_RC_PLATFORM_NAME) - AC_SUBST(COMPANY_NAME) AC_SUBST(HOTSPOT_VM_DISTRO) AC_SUBST(MACOSX_BUNDLE_NAME_BASE) AC_SUBST(MACOSX_BUNDLE_ID_BASE) + # The vendor name, if any + AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name], + [Set vendor name @<:@not specified@:>@])]) + if test "x$with_vendor_name" = xyes; then + AC_MSG_ERROR([--with-vendor-name must have a value]) + elif [ ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ]; then + AC_MSG_ERROR([--with--vendor-name contains non-printing characters: $with_vendor_name]) + else + COMPANY_NAME="$with_vendor_name" + fi + AC_SUBST(COMPANY_NAME) + # Override version from arguments # If --with-version-string is set, process it first. It is possible to From fc13efa1f3199ec1af3217a7f9ad3b065da06748 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Mon, 18 Dec 2017 10:21:38 +0000 Subject: [PATCH 41/88] 8193698: Null handling in BodyPublisher, BodyHandler, and BodySubscriber convenience static factory methods Reviewed-by: dfuchs --- .../incubator/http/BufferingSubscriber.java | 2 +- .../jdk/incubator/http/HttpResponse.java | 27 ++-- .../jdk/incubator/http/RequestPublishers.java | 5 +- .../incubator/http/ResponseSubscribers.java | 2 +- .../RequestProcessorExceptions.java | 91 ----------- .../SubscriberPublisherAPIExceptions.java | 146 ++++++++++++++++++ 6 files changed, 161 insertions(+), 112 deletions(-) delete mode 100644 test/jdk/java/net/httpclient/RequestProcessorExceptions.java create mode 100644 test/jdk/java/net/httpclient/SubscriberPublisherAPIExceptions.java diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java index 270da1688cc..da96d7d883a 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java @@ -80,7 +80,7 @@ class BufferingSubscriber implements HttpResponse.BodySubscriber BufferingSubscriber(HttpResponse.BodySubscriber downstreamSubscriber, int bufferSize) { - this.downstreamSubscriber = downstreamSubscriber; + this.downstreamSubscriber = Objects.requireNonNull(downstreamSubscriber); this.bufferSize = bufferSize; synchronized (buffersLock) { internalBuffers = new ArrayList<>(); diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java index 70fa5d25273..06145410fda 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java @@ -344,24 +344,14 @@ public abstract class HttpResponse { * Returns a {@code BodyHandler} that returns a * {@link BodySubscriber BodySubscriber}{@code } obtained from * {@link BodySubscriber#asString(Charset) BodySubscriber.asString(Charset)}. - * If a charset is provided, the body is decoded using it. If charset is - * {@code null} then the handler tries to determine the character set - * from the {@code Content-encoding} header. If that charset is not - * supported then {@link java.nio.charset.StandardCharsets#UTF_8 UTF_8} - * is used. + * The body is decoded using the given character set. * - * @param charset The name of the charset to interpret the body as. If - * {@code null} then the charset is determined from the - * Content-encoding header. + * @param charset the character set to convert the body with * @return a response body handler */ public static BodyHandler asString(Charset charset) { - return (status, headers) -> { - if (charset != null) { - return BodySubscriber.asString(charset); - } - return BodySubscriber.asString(charsetFrom(headers)); - }; + Objects.requireNonNull(charset); + return (status, headers) -> BodySubscriber.asString(charset); } /** @@ -386,11 +376,11 @@ public abstract class HttpResponse { */ public static BodyHandler asFile(Path file, OpenOption... openOptions) { Objects.requireNonNull(file); + List opts = List.of(openOptions); SecurityManager sm = System.getSecurityManager(); if (sm != null) { String fn = pathForSecurityCheck(file); sm.checkWrite(fn); - List opts = Arrays.asList(openOptions); if (opts.contains(StandardOpenOption.DELETE_ON_CLOSE)) sm.checkDelete(fn); if (opts.contains(StandardOpenOption.READ)) @@ -450,11 +440,11 @@ public abstract class HttpResponse { public static BodyHandler asFileDownload(Path directory, OpenOption... openOptions) { Objects.requireNonNull(directory); + List opts = List.of(openOptions); SecurityManager sm = System.getSecurityManager(); if (sm != null) { String fn = pathForSecurityCheck(directory); sm.checkWrite(fn); - List opts = Arrays.asList(openOptions); if (opts.contains(StandardOpenOption.DELETE_ON_CLOSE)) sm.checkDelete(fn); if (opts.contains(StandardOpenOption.READ)) @@ -494,6 +484,7 @@ public abstract class HttpResponse { * @return a response body handler */ public static BodyHandler asByteArrayConsumer(Consumer> consumer) { + Objects.requireNonNull(consumer); return (status, headers) -> BodySubscriber.asByteArrayConsumer(consumer); } @@ -547,6 +538,7 @@ public abstract class HttpResponse { */ public static BodyHandler buffering(BodyHandler downstreamHandler, int bufferSize) { + Objects.requireNonNull(downstreamHandler); if (bufferSize <= 0) throw new IllegalArgumentException("must be greater than 0"); return (status, headers) -> BodySubscriber @@ -613,6 +605,7 @@ public abstract class HttpResponse { * @return a body subscriber */ public static BodySubscriber asString(Charset charset) { + Objects.requireNonNull(charset); return new ResponseSubscribers.ByteArraySubscriber<>( bytes -> new String(bytes, charset) ); @@ -662,11 +655,11 @@ public abstract class HttpResponse { */ public static BodySubscriber asFile(Path file, OpenOption... openOptions) { Objects.requireNonNull(file); + List opts = List.of(openOptions); SecurityManager sm = System.getSecurityManager(); if (sm != null) { String fn = pathForSecurityCheck(file); sm.checkWrite(fn); - List opts = Arrays.asList(openOptions); if (opts.contains(StandardOpenOption.DELETE_ON_CLOSE)) sm.checkDelete(fn); if (opts.contains(StandardOpenOption.READ)) diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/RequestPublishers.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/RequestPublishers.java index d79310d3549..c13dd94f626 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/RequestPublishers.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/RequestPublishers.java @@ -43,6 +43,7 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; +import java.util.Objects; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.Flow; import java.util.function.Supplier; @@ -109,7 +110,7 @@ class RequestPublishers { private volatile long contentLength; IterablePublisher(Iterable content) { - this.content = content; + this.content = Objects.requireNonNull(content); } // The ByteBufferIterator will iterate over the byte[] arrays in @@ -323,7 +324,7 @@ class RequestPublishers { private final Supplier streamSupplier; InputStreamPublisher(Supplier streamSupplier) { - this.streamSupplier = streamSupplier; + this.streamSupplier = Objects.requireNonNull(streamSupplier); } @Override diff --git a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseSubscribers.java b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseSubscribers.java index 466f8d82c06..17d50a33128 100644 --- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseSubscribers.java +++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseSubscribers.java @@ -62,7 +62,7 @@ class ResponseSubscribers { private final AtomicBoolean subscribed = new AtomicBoolean(); ConsumerSubscriber(Consumer> consumer) { - this.consumer = consumer; + this.consumer = Objects.requireNonNull(consumer); } @Override diff --git a/test/jdk/java/net/httpclient/RequestProcessorExceptions.java b/test/jdk/java/net/httpclient/RequestProcessorExceptions.java deleted file mode 100644 index c84d5b059c1..00000000000 --- a/test/jdk/java/net/httpclient/RequestProcessorExceptions.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2017, 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. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @run testng RequestProcessorExceptions - */ - -import java.io.FileNotFoundException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.List; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; -import static jdk.incubator.http.HttpRequest.BodyPublisher.fromByteArray; -import static jdk.incubator.http.HttpRequest.BodyPublisher.fromFile; - -public class RequestProcessorExceptions { - - @DataProvider(name = "byteArrayOOBs") - public Object[][] byteArrayOOBs() { - return new Object[][] { - { new byte[100], 1, 100 }, - { new byte[100], -1, 10 }, - { new byte[100], 99, 2 }, - { new byte[1], -100, 1 } }; - } - - @Test(dataProvider = "byteArrayOOBs", expectedExceptions = IndexOutOfBoundsException.class) - public void fromByteArrayCheck(byte[] buf, int offset, int length) { - fromByteArray(buf, offset, length); - } - - @DataProvider(name = "nonExistentFiles") - public Object[][] nonExistentFiles() { - List paths = List.of(Paths.get("doesNotExist"), - Paths.get("tsixEtoNseod"), - Paths.get("doesNotExist2")); - paths.forEach(p -> { - if (Files.exists(p)) - throw new AssertionError("Unexpected " + p); - }); - - return paths.stream().map(p -> new Object[] { p }).toArray(Object[][]::new); - } - - @Test(dataProvider = "nonExistentFiles", expectedExceptions = FileNotFoundException.class) - public void fromFileCheck(Path path) throws Exception { - fromFile(path); - } - - // --- - - /* Main entry point for standalone testing of the main functional test. */ - public static void main(String... args) throws Exception { - RequestProcessorExceptions t = new RequestProcessorExceptions(); - for (Object[] objs : t.byteArrayOOBs()) { - try { - t.fromByteArrayCheck((byte[]) objs[0], (int) objs[1], (int) objs[2]); - throw new RuntimeException("fromByteArrayCheck failed"); - } catch (IndexOutOfBoundsException expected) { /* Ok */ } - } - for (Object[] objs : t.nonExistentFiles()) { - try { - t.fromFileCheck((Path) objs[0]); - throw new RuntimeException("fromFileCheck failed"); - } catch (FileNotFoundException expected) { /* Ok */ } - } - } -} diff --git a/test/jdk/java/net/httpclient/SubscriberPublisherAPIExceptions.java b/test/jdk/java/net/httpclient/SubscriberPublisherAPIExceptions.java new file mode 100644 index 00000000000..69463ad6ee7 --- /dev/null +++ b/test/jdk/java/net/httpclient/SubscriberPublisherAPIExceptions.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.io.FileNotFoundException; +import java.nio.ByteBuffer; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.OpenOption; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.Flow; +import jdk.incubator.http.HttpHeaders; +import jdk.incubator.http.HttpRequest.BodyPublisher; +import jdk.incubator.http.HttpResponse.BodyHandler; +import jdk.incubator.http.HttpResponse.BodySubscriber; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; +import static java.nio.charset.StandardCharsets.UTF_8; +import static java.nio.file.StandardOpenOption.CREATE; +import static java.nio.file.StandardOpenOption.WRITE; +import static org.testng.Assert.assertThrows; + +/* + * @test + * @summary Basic tests for API specified exceptions from Publisher, Handler, + * and Subscriber convenience static factory methods. + * @run testng SubscriberPublisherAPIExceptions + */ + +public class SubscriberPublisherAPIExceptions { + + static final Class NPE = NullPointerException.class; + static final Class IAE = IllegalArgumentException.class; + static final Class IOB = IndexOutOfBoundsException.class; + + @Test + public void publisherAPIExceptions() { + assertThrows(NPE, () -> BodyPublisher.fromByteArray(null)); + assertThrows(NPE, () -> BodyPublisher.fromByteArray(null, 0, 1)); + assertThrows(IOB, () -> BodyPublisher.fromByteArray(new byte[100], 0, 101)); + assertThrows(IOB, () -> BodyPublisher.fromByteArray(new byte[100], 1, 100)); + assertThrows(IOB, () -> BodyPublisher.fromByteArray(new byte[100], -1, 10)); + assertThrows(IOB, () -> BodyPublisher.fromByteArray(new byte[100], 99, 2)); + assertThrows(IOB, () -> BodyPublisher.fromByteArray(new byte[1], -100, 1)); + assertThrows(NPE, () -> BodyPublisher.fromByteArrays(null)); + assertThrows(NPE, () -> BodyPublisher.fromFile(null)); + assertThrows(NPE, () -> BodyPublisher.fromInputStream(null)); + assertThrows(NPE, () -> BodyPublisher.fromString(null)); + assertThrows(NPE, () -> BodyPublisher.fromString("A", null)); + assertThrows(NPE, () -> BodyPublisher.fromString(null, UTF_8)); + assertThrows(NPE, () -> BodyPublisher.fromString(null, null)); + } + + @DataProvider(name = "nonExistentFiles") + public Object[][] nonExistentFiles() { + List paths = List.of(Paths.get("doesNotExist"), + Paths.get("tsixEtoNseod"), + Paths.get("doesNotExist2")); + paths.forEach(p -> { + if (Files.exists(p)) + throw new AssertionError("Unexpected " + p); + }); + + return paths.stream().map(p -> new Object[] { p }).toArray(Object[][]::new); + } + + @Test(dataProvider = "nonExistentFiles", expectedExceptions = FileNotFoundException.class) + public void fromFileCheck(Path path) throws Exception { + BodyPublisher.fromFile(path); + } + + @Test + public void handlerAPIExceptions() { + Path path = Paths.get(".").resolve("tt"); + assertThrows(NPE, () -> BodyHandler.asByteArrayConsumer(null)); + assertThrows(NPE, () -> BodyHandler.asFile(null)); + assertThrows(NPE, () -> BodyHandler.asFile(null, CREATE, WRITE)); + assertThrows(NPE, () -> BodyHandler.asFile(path, (OpenOption[])null)); + assertThrows(NPE, () -> BodyHandler.asFile(path, new OpenOption[] {null})); + assertThrows(NPE, () -> BodyHandler.asFile(path, new OpenOption[] {CREATE, null})); + assertThrows(NPE, () -> BodyHandler.asFile(path, new OpenOption[] {null, CREATE})); + assertThrows(NPE, () -> BodyHandler.asFile(null, (OpenOption[])null)); + assertThrows(NPE, () -> BodyHandler.asFileDownload(null, CREATE, WRITE)); + assertThrows(NPE, () -> BodyHandler.asFileDownload(path, (OpenOption[])null)); + assertThrows(NPE, () -> BodyHandler.asFileDownload(path, new OpenOption[] {null})); + assertThrows(NPE, () -> BodyHandler.asFileDownload(path, new OpenOption[] {CREATE, null})); + assertThrows(NPE, () -> BodyHandler.asFileDownload(path, new OpenOption[] {null, CREATE})); + assertThrows(NPE, () -> BodyHandler.asFileDownload(null, (OpenOption[])null)); + assertThrows(NPE, () -> BodyHandler.asString(null)); + assertThrows(NPE, () -> BodyHandler.buffering(null, 1)); + assertThrows(IAE, () -> BodyHandler.buffering(new NoOpHandler(), 0)); + assertThrows(IAE, () -> BodyHandler.buffering(new NoOpHandler(), -1)); + assertThrows(IAE, () -> BodyHandler.buffering(new NoOpHandler(), Integer.MIN_VALUE)); + } + + @Test + public void subscriberAPIExceptions() { + Path path = Paths.get(".").resolve("tt"); + assertThrows(NPE, () -> BodySubscriber.asByteArrayConsumer(null)); + assertThrows(NPE, () -> BodySubscriber.asFile(null)); + assertThrows(NPE, () -> BodySubscriber.asFile(null, CREATE, WRITE)); + assertThrows(NPE, () -> BodySubscriber.asFile(path, (OpenOption[])null)); + assertThrows(NPE, () -> BodySubscriber.asFile(path, new OpenOption[] {null})); + assertThrows(NPE, () -> BodySubscriber.asFile(path, new OpenOption[] {CREATE, null})); + assertThrows(NPE, () -> BodySubscriber.asFile(path, new OpenOption[] {null, CREATE})); + assertThrows(NPE, () -> BodySubscriber.asFile(null, (OpenOption[])null)); + assertThrows(NPE, () -> BodySubscriber.asString(null)); + assertThrows(NPE, () -> BodySubscriber.buffering(null, 1)); + assertThrows(IAE, () -> BodySubscriber.buffering(new NoOpSubscriber(), 0)); + assertThrows(IAE, () -> BodySubscriber.buffering(new NoOpSubscriber(), -1)); + assertThrows(IAE, () -> BodySubscriber.buffering(new NoOpSubscriber(), Integer.MIN_VALUE)); + } + + static class NoOpHandler implements BodyHandler { + @Override public BodySubscriber apply(int code, HttpHeaders hrds) { return null; } + } + + static class NoOpSubscriber implements BodySubscriber { + @Override public void onSubscribe(Flow.Subscription subscription) { } + @Override public void onNext(List item) { } + @Override public void onError(Throwable throwable) { } + @Override public void onComplete() { } + @Override public CompletableFuture getBody() { return null; } + } +} From 5dee8bee7201cb5a74f75bb2c458b30b76559492 Mon Sep 17 00:00:00 2001 From: Robbin Ehn Date: Mon, 18 Dec 2017 12:11:01 +0100 Subject: [PATCH 42/88] 8193514: UseMembar should not be obsoleted yet Reviewed-by: dcubed, acorn, mdoerr --- src/hotspot/share/runtime/arguments.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index c1427e3aa77..a8ad10d820d 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -497,7 +497,7 @@ static SpecialFlag const special_jvm_flags[] = { { "MaxRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() }, { "MinRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() }, { "InitialRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() }, - { "UseMembar", JDK_Version::jdk(10), JDK_Version::jdk(11), JDK_Version::jdk(12) }, + { "UseMembar", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() }, { "FastTLABRefill", JDK_Version::jdk(10), JDK_Version::jdk(11), JDK_Version::jdk(12) }, { "SafepointSpinBeforeYield", JDK_Version::jdk(10), JDK_Version::jdk(11), JDK_Version::jdk(12) }, { "DeferThrSuspendLoopCount", JDK_Version::jdk(10), JDK_Version::jdk(11), JDK_Version::jdk(12) }, From a37fb7b9427bd2cf86aa51fd0e0f0198dfc342cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Walln=C3=B6fer?= Date: Wed, 20 Dec 2017 21:40:11 +0100 Subject: [PATCH 43/88] 8193508: Expressions in split literals must never be optimistic Reviewed-by: jlaskey, sundar --- .../internal/codegen/CodeGenerator.java | 12 ++- .../codegen/CodeGeneratorLexicalContext.java | 20 ++-- .../codegen/OptimisticTypesCalculator.java | 19 ++++ .../nashorn/internal/codegen/Splitter.java | 26 +++--- .../nashorn/internal/ir/GetSplitState.java | 2 + .../jdk/nashorn/internal/ir/LiteralNode.java | 2 + .../jdk/nashorn/internal/ir/ObjectNode.java | 2 + test/nashorn/script/basic/JDK-8193508.js | 93 +++++++++++++++++++ 8 files changed, 150 insertions(+), 26 deletions(-) create mode 100644 test/nashorn/script/basic/JDK-8193508.js diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java index 43074a2c735..2d86f1ef0b0 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java @@ -1279,7 +1279,7 @@ final class CodeGenerator extends NodeOperatorVisitor>> unwarrantedOptimismHandlers = new ArrayDeque<>(); private final Deque slotTypesDescriptors = new ArrayDeque<>(); - private final IntDeque splitNodes = new IntDeque(); + private final IntDeque splitLiterals = new IntDeque(); /** A stack tracking the next free local variable slot in the blocks. There's one entry for every block * currently on the lexical context stack. */ @@ -89,18 +89,18 @@ final class CodeGeneratorLexicalContext extends LexicalContext { if (((FunctionNode)node).inDynamicContext()) { dynamicScopeCount++; } - splitNodes.push(0); + splitLiterals.push(0); } return super.push(node); } - void enterSplitNode() { - splitNodes.getAndIncrement(); + void enterSplitLiteral() { + splitLiterals.getAndIncrement(); pushFreeSlots(methodEmitters.peek().getUsedSlotsWithLiveTemporaries()); } - void exitSplitNode() { - final int count = splitNodes.decrementAndGet(); + void exitSplitLiteral() { + final int count = splitLiterals.decrementAndGet(); assert count >= 0; } @@ -115,8 +115,8 @@ final class CodeGeneratorLexicalContext extends LexicalContext { dynamicScopeCount--; assert dynamicScopeCount >= 0; } - assert splitNodes.peek() == 0; - splitNodes.pop(); + assert splitLiterals.peek() == 0; + splitLiterals.pop(); } return popped; } @@ -125,8 +125,8 @@ final class CodeGeneratorLexicalContext extends LexicalContext { return dynamicScopeCount > 0; } - boolean inSplitNode() { - return !splitNodes.isEmpty() && splitNodes.peek() > 0; + boolean inSplitLiteral() { + return !splitLiterals.isEmpty() && splitLiterals.peek() > 0; } MethodEmitter pushMethodEmitter(final MethodEmitter newMethod) { diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java index a026f2d2c57..42f017f3bcd 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/OptimisticTypesCalculator.java @@ -42,8 +42,10 @@ import jdk.nashorn.internal.ir.IdentNode; import jdk.nashorn.internal.ir.IfNode; import jdk.nashorn.internal.ir.IndexNode; import jdk.nashorn.internal.ir.JoinPredecessorExpression; +import jdk.nashorn.internal.ir.LiteralNode; import jdk.nashorn.internal.ir.LoopNode; import jdk.nashorn.internal.ir.Node; +import jdk.nashorn.internal.ir.ObjectNode; import jdk.nashorn.internal.ir.Optimistic; import jdk.nashorn.internal.ir.PropertyNode; import jdk.nashorn.internal.ir.Symbol; @@ -189,6 +191,23 @@ final class OptimisticTypesCalculator extends SimpleNodeVisitor { return true; } + @Override + public boolean enterObjectNode(ObjectNode objectNode) { + if (objectNode.getSplitRanges() != null) { + return false; + } + return super.enterObjectNode(objectNode); + } + + @Override + public boolean enterLiteralNode(LiteralNode literalNode) { + if (literalNode.isArray() && ((LiteralNode.ArrayLiteralNode) literalNode).getSplitRanges() != null) { + return false; + } + + return super.enterLiteralNode(literalNode); + } + @Override public boolean enterWhileNode(final WhileNode whileNode) { // Test is never optimistic (always coerced to boolean). diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Splitter.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Splitter.java index 2b43cac7c16..7f3680eb543 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Splitter.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Splitter.java @@ -112,7 +112,7 @@ final class Splitter extends SimpleNodeVisitor implements Loggable { assert lc.isEmpty() : "LexicalContext not empty"; if (weight >= SPLIT_THRESHOLD) { - log.info("Splitting '", functionNode.getName(), "' as its weight ", weight, " exceeds split threshold ", SPLIT_THRESHOLD); + log.info("Splitting function '", functionNode.getName(), "' as its weight ", weight, " exceeds split threshold ", SPLIT_THRESHOLD); functionNode = (FunctionNode)functionNode.accept(this); if (functionNode.isSplit()) { @@ -287,7 +287,7 @@ final class Splitter extends SimpleNodeVisitor implements Loggable { @SuppressWarnings("rawtypes") @Override public Node leaveLiteralNode(final LiteralNode literal) { - long weight = WeighNodes.weigh(literal); + final long weight = WeighNodes.weigh(literal); if (weight < SPLIT_THRESHOLD) { return literal; @@ -310,14 +310,14 @@ final class Splitter extends SimpleNodeVisitor implements Loggable { final int postset = postsets[i]; final Node element = value[postset]; - weight = WeighNodes.weigh(element); - totalWeight += WeighNodes.AASTORE_WEIGHT + weight; + final long elementWeight = WeighNodes.weigh(element); + totalWeight += WeighNodes.AASTORE_WEIGHT + elementWeight; if (totalWeight >= SPLIT_THRESHOLD) { - final CompileUnit unit = compiler.findUnit(totalWeight - weight); + final CompileUnit unit = compiler.findUnit(totalWeight - elementWeight); ranges.add(new Splittable.SplitRange(unit, lo, i)); lo = i; - totalWeight = weight; + totalWeight = elementWeight; } } @@ -326,6 +326,8 @@ final class Splitter extends SimpleNodeVisitor implements Loggable { ranges.add(new Splittable.SplitRange(unit, lo, postsets.length)); } + log.info("Splitting array literal in '", functionNode.getName(), "' as its weight ", weight, " exceeds split threshold ", SPLIT_THRESHOLD); + return arrayLiteralNode.setSplitRanges(lc, ranges); } @@ -334,7 +336,7 @@ final class Splitter extends SimpleNodeVisitor implements Loggable { @Override public Node leaveObjectNode(final ObjectNode objectNode) { - long weight = WeighNodes.weigh(objectNode); + final long weight = WeighNodes.weigh(objectNode); if (weight < SPLIT_THRESHOLD) { return objectNode; @@ -355,14 +357,14 @@ final class Splitter extends SimpleNodeVisitor implements Loggable { final boolean isConstant = LiteralNode.isConstant(property.getValue()); if (!isConstant || !isSpillObject) { - weight = isConstant ? 0 : WeighNodes.weigh(property.getValue()); - totalWeight += WeighNodes.AASTORE_WEIGHT + weight; + final long propertyWeight = isConstant ? 0 : WeighNodes.weigh(property.getValue()); + totalWeight += WeighNodes.AASTORE_WEIGHT + propertyWeight; if (totalWeight >= SPLIT_THRESHOLD) { - final CompileUnit unit = compiler.findUnit(totalWeight - weight); + final CompileUnit unit = compiler.findUnit(totalWeight - propertyWeight); ranges.add(new Splittable.SplitRange(unit, lo, i)); lo = i; - totalWeight = weight; + totalWeight = propertyWeight; } } } @@ -372,6 +374,8 @@ final class Splitter extends SimpleNodeVisitor implements Loggable { ranges.add(new Splittable.SplitRange(unit, lo, properties.size())); } + log.info("Splitting object node in '", functionNode.getName(), "' as its weight ", weight, " exceeds split threshold ", SPLIT_THRESHOLD); + return objectNode.setSplitRanges(lc, ranges); } diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/GetSplitState.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/GetSplitState.java index 29c11b48eab..6e360291aa1 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/GetSplitState.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/GetSplitState.java @@ -27,6 +27,7 @@ package jdk.nashorn.internal.ir; import jdk.nashorn.internal.codegen.CompilerConstants; import jdk.nashorn.internal.codegen.types.Type; +import jdk.nashorn.internal.ir.annotations.Ignore; import jdk.nashorn.internal.ir.visitor.NodeVisitor; import jdk.nashorn.internal.runtime.Scope; @@ -39,6 +40,7 @@ public final class GetSplitState extends Expression { private static final long serialVersionUID = 1L; /** The sole instance of this AST node. */ + @Ignore public final static GetSplitState INSTANCE = new GetSplitState(); private GetSplitState() { diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/LiteralNode.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/LiteralNode.java index 6f6bb7b1f96..ceedab09862 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/LiteralNode.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/LiteralNode.java @@ -30,6 +30,7 @@ import java.util.Collections; import java.util.List; import jdk.nashorn.internal.codegen.types.ArrayType; import jdk.nashorn.internal.codegen.types.Type; +import jdk.nashorn.internal.ir.annotations.Ignore; import jdk.nashorn.internal.ir.annotations.Immutable; import jdk.nashorn.internal.ir.visitor.NodeVisitor; import jdk.nashorn.internal.objects.NativeArray; @@ -633,6 +634,7 @@ public abstract class LiteralNode extends Expression implements PropertyKey { private final int[] postsets; /** Ranges for splitting up large literals in code generation */ + @Ignore private final List splitRanges; /** Does this array literal have a spread element? */ diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/ObjectNode.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/ObjectNode.java index 81e333c326c..a38d6e2a629 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/ObjectNode.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/ObjectNode.java @@ -29,6 +29,7 @@ import java.util.Collections; import java.util.List; import java.util.RandomAccess; import jdk.nashorn.internal.codegen.types.Type; +import jdk.nashorn.internal.ir.annotations.Ignore; import jdk.nashorn.internal.ir.annotations.Immutable; import jdk.nashorn.internal.ir.visitor.NodeVisitor; @@ -43,6 +44,7 @@ public final class ObjectNode extends Expression implements LexicalContextNode, private final List elements; /** Ranges for splitting large literals over multiple compile units in codegen. */ + @Ignore private final List splitRanges; /** diff --git a/test/nashorn/script/basic/JDK-8193508.js b/test/nashorn/script/basic/JDK-8193508.js new file mode 100644 index 00000000000..fcdbc6823a1 --- /dev/null +++ b/test/nashorn/script/basic/JDK-8193508.js @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2017, 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8193508: Expressions in split literals must never be optimistic + * + * @test + * @run + * @option -Dnashorn.compiler.splitter.threshold=100 + * @fork + */ + +function f() { + return 'a'; +} + +var o = { + a: f(), + b: 1, + c: 2, + d: 3, + e: 4, + f: 5, + g: f(), + h: 1, + i: 2, + j: 3, + k: 4, + l: 5, + m: f(), + n: 1, + o: 2, + p: 3, + q: 4, + r: 5, + s: f(), + t: 1, + u: 2, + v: 3, + w: 4, + x: 5, + y: f(), + z: 1, + A: 2, + B: 3, + C: 4, + D: 5, + E: f(), + F: 1, + G: 2, + H: 3, + I: 4, + J: 5, + K: f(), + L: 1, + M: 2, + N: 3, + O: 4, + P: 5, + Q: f(), + R: 1, + S: 2, + T: 3, + U: 4, + V: 5, + W: f(), + X: 1, + Y: 2, + Z: 3 +}; + +Assert.assertTrue(o.a === 'a'); + From 949659e43b9d03eb99aeb987180c2115f1442492 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Tue, 19 Dec 2017 15:56:28 -0500 Subject: [PATCH 44/88] 8193622: JFR test TestUnloadingEventClass.java times out intermittently Previous change was leaving scratch classes on CLD::_klasses list which are reported to tracing Reviewed-by: gtriantafill, dcubed, mgronlun --- src/hotspot/share/classfile/classLoaderData.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp index 865ab45e305..fd5c0632143 100644 --- a/src/hotspot/share/classfile/classLoaderData.cpp +++ b/src/hotspot/share/classfile/classLoaderData.cpp @@ -831,9 +831,10 @@ void ClassLoaderData::free_deallocate_list() { } // This is distinct from free_deallocate_list. For class loader data that are -// unloading, this frees the C heap memory for constant pools on the list. If there -// were C heap memory allocated for methods, it would free that too. The C heap memory -// for InstanceKlasses on this list is freed in the ClassLoaderData destructor. +// unloading, this frees the C heap memory for items on the list, and unlinks +// scratch or error classes so that unloading events aren't triggered for these +// classes. The metadata is removed with the unloading metaspace. +// There isn't C heap memory allocated for methods, so nothing is done for them. void ClassLoaderData::unload_deallocate_list() { // Don't need lock, at safepoint assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint"); @@ -846,9 +847,15 @@ void ClassLoaderData::unload_deallocate_list() { Metadata* m = _deallocate_list->at(i); assert (!m->on_stack(), "wouldn't be unloading if this were so"); _deallocate_list->remove_at(i); - // Only constant pool entries have C heap memory to free. if (m->is_constantPool()) { ((ConstantPool*)m)->release_C_heap_structures(); + } else if (m->is_klass()) { + InstanceKlass* ik = (InstanceKlass*)m; + // also releases ik->constants() C heap memory + InstanceKlass::release_C_heap_structures(ik); + // Remove the class so unloading events aren't triggered for + // this class (scratch or error class) in do_unloading(). + remove_class(ik); } } } From 4a79a36b6d4eb73d3c24d0086fb23a2468d8c83c Mon Sep 17 00:00:00 2001 From: David Holmes Date: Tue, 19 Dec 2017 17:31:53 -0500 Subject: [PATCH 45/88] 8193840: Add compiler/c2/Test8007294.java to the problem list Reviewed-by: coleenp --- test/hotspot/jtreg/ProblemList.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index 576f582ca41..23b54e214a6 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -51,6 +51,7 @@ compiler/startup/SmallCodeCacheStartup.java 8134286 generic-all compiler/tiered/LevelTransitionTest.java 8067651 generic-all compiler/types/correctness/CorrectnessTest.java 8066173 generic-all compiler/types/correctness/OffTest.java 8066173 generic-all +compiler/c2/Test8007294.java 8192992 generic-all # aot test intermittently failing in jprt 8175791 compiler/aot/DeoptimizationTest.java 8175791 windows-all From 388f422efde6f419e8d4b40a6980f94c2e337f73 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Thu, 21 Dec 2017 09:29:24 -0800 Subject: [PATCH 46/88] 8193568: @LastModified tag in license header Reviewed-by: rriggs --- .../com/sun/org/apache/bcel/internal/ExceptionConst.java | 2 +- .../com/sun/org/apache/bcel/internal/classfile/Utility.java | 2 +- .../sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java | 2 +- .../com/sun/org/apache/bcel/internal/generic/ATHROW.java | 2 +- .../com/sun/org/apache/bcel/internal/generic/IDIV.java | 2 +- .../com/sun/org/apache/bcel/internal/generic/IREM.java | 2 +- .../com/sun/org/apache/bcel/internal/generic/LDIV.java | 2 +- .../com/sun/org/apache/bcel/internal/generic/LREM.java | 2 +- .../sun/org/apache/bcel/internal/generic/MONITORENTER.java | 2 +- .../sun/org/apache/bcel/internal/generic/MONITOREXIT.java | 2 +- .../com/sun/org/apache/bcel/internal/generic/MethodGen.java | 2 +- .../com/sun/org/apache/bcel/internal/generic/NEWARRAY.java | 2 +- .../org/apache/bcel/internal/generic/ReturnInstruction.java | 2 +- .../com/sun/org/apache/bcel/internal/util/BCELFactory.java | 2 +- .../sun/org/apache/bcel/internal/util/InstructionFinder.java | 2 +- .../com/sun/org/apache/xalan/internal/lib/ExsltDatetime.java | 2 +- .../com/sun/org/apache/xalan/internal/res/XSLMessages.java | 2 +- .../org/apache/xalan/internal/utils/ConfigurationError.java | 3 ++- .../sun/org/apache/xalan/internal/utils/ObjectFactory.java | 2 +- .../com/sun/org/apache/xalan/internal/xsltc/Translet.java | 2 +- .../apache/xalan/internal/xsltc/compiler/ApplyTemplates.java | 2 +- .../apache/xalan/internal/xsltc/compiler/AttributeSet.java | 2 +- .../internal/xsltc/compiler/AttributeValueTemplate.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java | 2 +- .../apache/xalan/internal/xsltc/compiler/BooleanCall.java | 2 +- .../apache/xalan/internal/xsltc/compiler/CallTemplate.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/CastCall.java | 2 +- .../apache/xalan/internal/xsltc/compiler/CeilingCall.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/compiler/Choose.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/ConcatCall.java | 2 +- .../apache/xalan/internal/xsltc/compiler/ContainsCall.java | 2 +- .../apache/xalan/internal/xsltc/compiler/DocumentCall.java | 2 +- .../xalan/internal/xsltc/compiler/ElementAvailableCall.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/Expression.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/FilterExpr.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/FloorCall.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/FlowList.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/ForEach.java | 2 +- .../xalan/internal/xsltc/compiler/FormatNumberCall.java | 2 +- .../xalan/internal/xsltc/compiler/FunctionAvailableCall.java | 2 +- .../apache/xalan/internal/xsltc/compiler/FunctionCall.java | 2 +- .../apache/xalan/internal/xsltc/compiler/GenerateIdCall.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/compiler/Import.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/Include.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/compiler/Key.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/KeyCall.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/LangCall.java | 2 +- .../apache/xalan/internal/xsltc/compiler/LiteralElement.java | 2 +- .../apache/xalan/internal/xsltc/compiler/LocalNameCall.java | 2 +- .../apache/xalan/internal/xsltc/compiler/LogicalExpr.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/Message.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/compiler/Mode.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/NameBase.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/NameCall.java | 2 +- .../xalan/internal/xsltc/compiler/NamespaceUriCall.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/NotCall.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/compiler/Number.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/NumberCall.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/compiler/Parser.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/Predicate.java | 2 +- .../xsltc/compiler/ProcessingInstructionPattern.java | 2 +- .../apache/xalan/internal/xsltc/compiler/RelationalExpr.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/RoundCall.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/compiler/Sort.java | 2 +- .../apache/xalan/internal/xsltc/compiler/StartsWithCall.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/compiler/Step.java | 2 +- .../apache/xalan/internal/xsltc/compiler/StepPattern.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/StringCall.java | 2 +- .../xalan/internal/xsltc/compiler/StringLengthCall.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/Stylesheet.java | 2 +- .../apache/xalan/internal/xsltc/compiler/SymbolTable.java | 2 +- .../apache/xalan/internal/xsltc/compiler/SyntaxTreeNode.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/Template.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/TestSeq.java | 2 +- .../xalan/internal/xsltc/compiler/TopLevelElement.java | 4 +++- .../apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java | 2 +- .../apache/xalan/internal/xsltc/compiler/UnionPathExpr.java | 2 +- .../xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java | 2 +- .../xalan/internal/xsltc/compiler/UnsupportedElement.java | 2 +- .../xalan/internal/xsltc/compiler/UseAttributeSets.java | 2 +- .../apache/xalan/internal/xsltc/compiler/VariableBase.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/Whitespace.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/XPathLexer.java | 4 +++- .../sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java | 2 +- .../apache/xalan/internal/xsltc/compiler/XslAttribute.java | 2 +- .../xalan/internal/xsltc/compiler/util/BooleanType.java | 2 +- .../apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java | 2 +- .../apache/xalan/internal/xsltc/compiler/util/IntType.java | 2 +- .../xalan/internal/xsltc/compiler/util/InternalError.java | 3 ++- .../xalan/internal/xsltc/compiler/util/MethodGenerator.java | 2 +- .../xalan/internal/xsltc/compiler/util/MethodType.java | 2 +- .../xalan/internal/xsltc/compiler/util/NodeSetType.java | 2 +- .../apache/xalan/internal/xsltc/compiler/util/NodeType.java | 2 +- .../xalan/internal/xsltc/compiler/util/ObjectType.java | 2 +- .../apache/xalan/internal/xsltc/compiler/util/RealType.java | 2 +- .../xalan/internal/xsltc/compiler/util/ReferenceType.java | 2 +- .../xalan/internal/xsltc/compiler/util/ResultTreeType.java | 2 +- .../xalan/internal/xsltc/compiler/util/StringStack.java | 2 +- .../xalan/internal/xsltc/compiler/util/StringType.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/util/Type.java | 2 +- .../org/apache/xalan/internal/xsltc/compiler/util/Util.java | 2 +- .../apache/xalan/internal/xsltc/compiler/util/VoidType.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java | 2 +- .../org/apache/xalan/internal/xsltc/dom/LoadDocument.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/dom/NodeCounter.java | 2 +- .../org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java | 3 ++- .../xalan/internal/xsltc/dom/NodeSortRecordFactory.java | 4 +++- .../com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java | 2 +- .../xalan/internal/xsltc/runtime/AbstractTranslet.java | 2 +- .../apache/xalan/internal/xsltc/runtime/BasisLibrary.java | 3 ++- .../xalan/internal/xsltc/runtime/InternalRuntimeError.java | 3 ++- .../xsltc/runtime/output/TransletOutputHandlerFactory.java | 2 +- .../internal/xsltc/runtime/output/WriterOutputBuffer.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/trax/DOM2SAX.java | 2 +- .../sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java | 2 +- .../org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java | 2 +- .../xalan/internal/xsltc/trax/TransformerFactoryImpl.java | 2 +- .../apache/xalan/internal/xsltc/trax/TransformerImpl.java | 2 +- .../org/apache/xalan/internal/xsltc/trax/XSLTCSource.java | 2 +- .../com/sun/org/apache/xerces/internal/dom/AttributeMap.java | 2 +- .../sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java | 2 +- .../org/apache/xerces/internal/dom/DOMConfigurationImpl.java | 2 +- .../xerces/internal/dom/DOMImplementationListImpl.java | 2 +- .../xerces/internal/dom/DOMImplementationSourceImpl.java | 2 +- .../org/apache/xerces/internal/dom/DOMMessageFormatter.java | 2 +- .../sun/org/apache/xerces/internal/dom/DOMNormalizer.java | 2 +- .../org/apache/xerces/internal/dom/DOMStringListImpl.java | 2 +- .../xerces/internal/dom/DOMXSImplementationSourceImpl.java | 2 +- .../sun/org/apache/xerces/internal/dom/DeepNodeListImpl.java | 2 +- .../org/apache/xerces/internal/dom/DeferredDocumentImpl.java | 2 +- .../apache/xerces/internal/dom/DeferredDocumentTypeImpl.java | 2 +- .../com/sun/org/apache/xerces/internal/dom/DocumentImpl.java | 2 +- .../sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java | 2 +- .../com/sun/org/apache/xerces/internal/dom/RangeImpl.java | 2 +- .../com/sun/org/apache/xerces/internal/impl/Constants.java | 2 +- .../org/apache/xerces/internal/impl/XMLDTDScannerImpl.java | 2 +- .../xerces/internal/impl/XMLDocumentFragmentScannerImpl.java | 2 +- .../apache/xerces/internal/impl/XMLDocumentScannerImpl.java | 2 +- .../org/apache/xerces/internal/impl/XMLEntityManager.java | 2 +- .../org/apache/xerces/internal/impl/XMLErrorReporter.java | 2 +- .../org/apache/xerces/internal/impl/XMLNamespaceBinder.java | 2 +- .../com/sun/org/apache/xerces/internal/impl/XMLScanner.java | 2 +- .../sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java | 2 +- .../apache/xerces/internal/impl/dtd/XMLDTDDescription.java | 2 +- .../org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java | 2 +- .../org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java | 2 +- .../org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java | 2 +- .../xerces/internal/impl/dtd/models/DFAContentModel.java | 2 +- .../apache/xerces/internal/impl/dv/DatatypeException.java | 2 +- .../com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java | 2 +- .../sun/org/apache/xerces/internal/impl/dv/util/Base64.java | 2 +- .../apache/xerces/internal/impl/dv/util/ByteListImpl.java | 2 +- .../org/apache/xerces/internal/impl/dv/xs/BaseDVFactory.java | 2 +- .../internal/impl/dv/xs/ExtendedSchemaDVFactoryImpl.java | 2 +- .../org/apache/xerces/internal/impl/dv/xs/FullDVFactory.java | 2 +- .../sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java | 2 +- .../xerces/internal/impl/dv/xs/SchemaDVFactoryImpl.java | 2 +- .../apache/xerces/internal/impl/dv/xs/XSSimpleTypeDecl.java | 2 +- .../apache/xerces/internal/impl/msg/XMLMessageFormatter.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_de.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_es.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_fr.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_it.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_ja.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_ko.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_sv.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java | 2 +- .../xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java | 2 +- .../impl/validation/ConfigurableValidationState.java | 2 +- .../xerces/internal/impl/validation/ValidationManager.java | 2 +- .../xerces/internal/impl/validation/ValidationState.java | 2 +- .../apache/xerces/internal/impl/xpath/regex/RegexParser.java | 2 +- .../org/apache/xerces/internal/impl/xs/AttributePSVImpl.java | 2 +- .../org/apache/xerces/internal/impl/xs/ElementPSVImpl.java | 2 +- .../org/apache/xerces/internal/impl/xs/PSVIErrorList.java | 2 +- .../org/apache/xerces/internal/impl/xs/SchemaGrammar.java | 2 +- .../xerces/internal/impl/xs/SubstitutionGroupHandler.java | 2 +- .../org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java | 2 +- .../apache/xerces/internal/impl/xs/XMLSchemaValidator.java | 2 +- .../apache/xerces/internal/impl/xs/XSComplexTypeDecl.java | 2 +- .../org/apache/xerces/internal/impl/xs/XSConstraints.java | 2 +- .../org/apache/xerces/internal/impl/xs/XSGrammarBucket.java | 2 +- .../apache/xerces/internal/impl/xs/XSMessageFormatter.java | 2 +- .../sun/org/apache/xerces/internal/impl/xs/XSModelImpl.java | 2 +- .../org/apache/xerces/internal/impl/xs/models/CMBuilder.java | 2 +- .../org/apache/xerces/internal/impl/xs/models/XSAllCM.java | 2 +- .../apache/xerces/internal/impl/xs/models/XSCMValidator.java | 2 +- .../org/apache/xerces/internal/impl/xs/models/XSDFACM.java | 2 +- .../org/apache/xerces/internal/impl/xs/models/XSEmptyCM.java | 2 +- .../org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java | 2 +- .../xerces/internal/impl/xs/opti/SchemaParsingConfig.java | 2 +- .../xerces/internal/impl/xs/traversers/StAXSchemaParser.java | 2 +- .../internal/impl/xs/traversers/XSAttributeChecker.java | 2 +- .../internal/impl/xs/traversers/XSDAbstractTraverser.java | 2 +- .../internal/impl/xs/traversers/XSDElementTraverser.java | 2 +- .../xerces/internal/impl/xs/traversers/XSDHandler.java | 2 +- .../internal/impl/xs/traversers/XSDSimpleTypeTraverser.java | 2 +- .../internal/impl/xs/traversers/XSDUniqueOrKeyTraverser.java | 2 +- .../xerces/internal/impl/xs/traversers/XSDocumentInfo.java | 2 +- .../apache/xerces/internal/impl/xs/util/LSInputListImpl.java | 2 +- .../apache/xerces/internal/impl/xs/util/ObjectListImpl.java | 2 +- .../apache/xerces/internal/impl/xs/util/ShortListImpl.java | 2 +- .../apache/xerces/internal/impl/xs/util/StringListImpl.java | 2 +- .../apache/xerces/internal/impl/xs/util/XSGrammarPool.java | 2 +- .../apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java | 2 +- .../xerces/internal/impl/xs/util/XSObjectListImpl.java | 2 +- .../sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java | 2 +- .../apache/xerces/internal/jaxp/UnparsedEntityHandler.java | 2 +- .../xerces/internal/jaxp/validation/AbstractXMLSchema.java | 2 +- .../xerces/internal/jaxp/validation/DOMResultBuilder.java | 2 +- .../xerces/internal/jaxp/validation/DOMValidatorHelper.java | 2 +- .../jaxp/validation/JAXPValidationMessageFormatter.java | 2 +- .../xerces/internal/jaxp/validation/SimpleXMLSchema.java | 2 +- .../internal/jaxp/validation/SoftReferenceGrammarPool.java | 2 +- .../internal/jaxp/validation/ValidatorHandlerImpl.java | 2 +- .../internal/jaxp/validation/WeakReferenceXMLSchema.java | 2 +- .../xerces/internal/jaxp/validation/WrappedSAXException.java | 3 ++- .../apache/xerces/internal/parsers/AbstractDOMParser.java | 2 +- .../xerces/internal/parsers/BasicParserConfiguration.java | 2 +- .../org/apache/xerces/internal/parsers/DOMParserImpl.java | 2 +- .../apache/xerces/internal/parsers/XML11Configuration.java | 2 +- .../xerces/internal/parsers/XML11DTDConfiguration.java | 2 +- .../internal/parsers/XML11NonValidatingConfiguration.java | 2 +- .../apache/xerces/internal/parsers/XMLGrammarPreparser.java | 2 +- .../org/apache/xerces/internal/util/AugmentationsImpl.java | 2 +- .../xerces/internal/util/DOMEntityResolverWrapper.java | 2 +- .../xerces/internal/util/DatatypeMessageFormatter.java | 2 +- .../xerces/internal/util/JAXPNamespaceContextWrapper.java | 2 +- .../org/apache/xerces/internal/util/NamespaceSupport.java | 2 +- .../org/apache/xerces/internal/util/SAXMessageFormatter.java | 2 +- .../com/sun/org/apache/xerces/internal/util/SymbolHash.java | 2 +- .../org/apache/xerces/internal/utils/ConfigurationError.java | 3 ++- .../sun/org/apache/xerces/internal/utils/ObjectFactory.java | 2 +- .../internal/xinclude/MultipleScopeNamespaceSupport.java | 2 +- .../org/apache/xerces/internal/xinclude/XIncludeHandler.java | 2 +- .../xerces/internal/xinclude/XIncludeMessageFormatter.java | 2 +- .../apache/xerces/internal/xinclude/XIncludeTextReader.java | 2 +- .../sun/org/apache/xerces/internal/xni/Augmentations.java | 2 +- .../sun/org/apache/xerces/internal/xni/NamespaceContext.java | 2 +- .../xerces/internal/xpointer/XPointerMessageFormatter.java | 2 +- .../com/sun/org/apache/xerces/internal/xs/LSInputList.java | 3 ++- .../com/sun/org/apache/xerces/internal/xs/ShortList.java | 3 ++- .../com/sun/org/apache/xerces/internal/xs/StringList.java | 3 ++- .../com/sun/org/apache/xerces/internal/xs/XSNamedMap.java | 3 ++- .../org/apache/xerces/internal/xs/XSNamespaceItemList.java | 3 ++- .../com/sun/org/apache/xerces/internal/xs/XSObjectList.java | 3 ++- .../org/apache/xerces/internal/xs/datatypes/ByteList.java | 2 +- .../org/apache/xerces/internal/xs/datatypes/ObjectList.java | 2 +- .../org/apache/xml/internal/dtm/ref/CustomStringPool.java | 2 +- .../sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java | 3 ++- .../sun/org/apache/xml/internal/dtm/ref/DTMDocumentImpl.java | 3 ++- .../org/apache/xml/internal/dtm/ref/DTMManagerDefault.java | 5 +++-- .../com/sun/org/apache/xml/internal/dtm/ref/DTMNodeList.java | 5 +++-- .../sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java | 2 +- .../sun/org/apache/xml/internal/dtm/ref/DTMStringPool.java | 5 +++-- .../xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java | 5 +++-- .../sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java | 5 +++-- .../sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM.java | 3 ++- .../org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java | 3 ++- .../org/apache/xml/internal/dtm/ref/sax2dtm/SAX2RTFDTM.java | 5 +++-- .../com/sun/org/apache/xml/internal/res/XMLMessages.java | 2 +- .../apache/xml/internal/serialize/BaseMarkupSerializer.java | 3 ++- .../org/apache/xml/internal/serialize/DOMSerializerImpl.java | 3 ++- .../com/sun/org/apache/xml/internal/serialize/Encodings.java | 3 ++- .../org/apache/xml/internal/serialize/SerializerFactory.java | 3 ++- .../sun/org/apache/xml/internal/serialize/XMLSerializer.java | 3 ++- .../com/sun/org/apache/xml/internal/serializer/CharInfo.java | 2 +- .../org/apache/xml/internal/serializer/EmptySerializer.java | 2 +- .../sun/org/apache/xml/internal/serializer/Encodings.java | 2 +- .../apache/xml/internal/serializer/NamespaceMappings.java | 2 +- .../xml/internal/serializer/OutputPropertiesFactory.java | 2 +- .../apache/xml/internal/serializer/SerializerFactory.java | 2 +- .../sun/org/apache/xml/internal/serializer/ToSAXHandler.java | 2 +- .../com/sun/org/apache/xml/internal/serializer/ToStream.java | 2 +- .../org/apache/xml/internal/serializer/ToUnknownStream.java | 2 +- .../apache/xml/internal/serializer/XSLOutputAttributes.java | 2 +- .../apache/xml/internal/serializer/dom3/DOM3TreeWalker.java | 2 +- .../xml/internal/serializer/dom3/DOMStringListImpl.java | 2 +- .../xml/internal/serializer/dom3/NamespaceSupport.java | 2 +- .../org/apache/xml/internal/serializer/utils/Messages.java | 2 +- .../sun/org/apache/xml/internal/serializer/utils/URI.java | 2 +- .../com/sun/org/apache/xml/internal/utils/DOMBuilder.java | 2 +- .../com/sun/org/apache/xml/internal/utils/ObjectPool.java | 2 +- .../classes/com/sun/org/apache/xml/internal/utils/QName.java | 2 +- .../sun/org/apache/xml/internal/utils/StringComparable.java | 2 +- .../org/apache/xml/internal/utils/StylesheetPIHandler.java | 3 ++- .../classes/com/sun/org/apache/xml/internal/utils/URI.java | 2 +- .../sun/org/apache/xml/internal/utils/XMLReaderManager.java | 3 ++- .../com/sun/org/apache/xpath/internal/Expression.java | 3 ++- .../sun/org/apache/xpath/internal/ExtensionsProvider.java | 2 +- .../classes/com/sun/org/apache/xpath/internal/NodeSet.java | 2 +- .../com/sun/org/apache/xpath/internal/SourceTreeManager.java | 3 ++- .../com/sun/org/apache/xpath/internal/VariableStack.java | 2 +- .../classes/com/sun/org/apache/xpath/internal/XPath.java | 2 +- .../com/sun/org/apache/xpath/internal/XPathContext.java | 2 +- .../com/sun/org/apache/xpath/internal/XPathException.java | 2 +- .../com/sun/org/apache/xpath/internal/axes/AxesWalker.java | 3 ++- .../org/apache/xpath/internal/axes/FilterExprIterator.java | 4 +++- .../apache/xpath/internal/axes/FilterExprIteratorSimple.java | 3 ++- .../sun/org/apache/xpath/internal/axes/FilterExprWalker.java | 2 +- .../com/sun/org/apache/xpath/internal/axes/IteratorPool.java | 2 +- .../sun/org/apache/xpath/internal/axes/LocPathIterator.java | 2 +- .../org/apache/xpath/internal/axes/MatchPatternIterator.java | 3 ++- .../com/sun/org/apache/xpath/internal/axes/NodeSequence.java | 3 ++- .../org/apache/xpath/internal/axes/PredicatedNodeTest.java | 4 +++- .../org/apache/xpath/internal/axes/UnionChildIterator.java | 3 ++- .../org/apache/xpath/internal/axes/UnionPathIterator.java | 2 +- .../sun/org/apache/xpath/internal/axes/WalkerFactory.java | 3 ++- .../sun/org/apache/xpath/internal/axes/WalkingIterator.java | 3 ++- .../apache/xpath/internal/axes/WalkingIteratorSorted.java | 2 +- .../org/apache/xpath/internal/compiler/FunctionTable.java | 3 ++- .../com/sun/org/apache/xpath/internal/compiler/Lexer.java | 3 ++- .../com/sun/org/apache/xpath/internal/compiler/OpMap.java | 3 ++- .../sun/org/apache/xpath/internal/functions/FuncCurrent.java | 2 +- .../org/apache/xpath/internal/functions/FuncExtFunction.java | 2 +- .../sun/org/apache/xpath/internal/functions/FuncFalse.java | 2 +- .../sun/org/apache/xpath/internal/functions/FuncHere.java | 3 ++- .../sun/org/apache/xpath/internal/functions/FuncLast.java | 2 +- .../org/apache/xpath/internal/functions/FuncPosition.java | 2 +- .../apache/xpath/internal/functions/FuncSystemProperty.java | 2 +- .../sun/org/apache/xpath/internal/functions/FuncTrue.java | 2 +- .../org/apache/xpath/internal/functions/Function2Args.java | 2 +- .../org/apache/xpath/internal/functions/Function3Args.java | 2 +- .../apache/xpath/internal/functions/FunctionMultiArgs.java | 2 +- .../org/apache/xpath/internal/functions/FunctionOneArg.java | 2 +- .../apache/xpath/internal/jaxp/JAXPExtensionsProvider.java | 2 +- .../com/sun/org/apache/xpath/internal/objects/XNodeSet.java | 2 +- .../com/sun/org/apache/xpath/internal/objects/XObject.java | 2 +- .../xpath/internal/objects/XRTreeFragSelectWrapper.java | 3 ++- .../sun/org/apache/xpath/internal/operations/Operation.java | 3 ++- .../org/apache/xpath/internal/operations/UnaryOperation.java | 3 ++- .../sun/org/apache/xpath/internal/operations/Variable.java | 3 ++- .../xpath/internal/patterns/ContextMatchStepPattern.java | 3 ++- .../org/apache/xpath/internal/patterns/FunctionPattern.java | 2 +- .../com/sun/org/apache/xpath/internal/patterns/NodeTest.java | 2 +- .../sun/org/apache/xpath/internal/patterns/StepPattern.java | 2 +- .../sun/org/apache/xpath/internal/patterns/UnionPattern.java | 2 +- 338 files changed, 402 insertions(+), 344 deletions(-) diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java index d79d75635e3..c8f20a863fe 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/ExceptionConst.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -24,6 +23,7 @@ package com.sun.org.apache.bcel.internal; /** * Exception constants. * @since 6.0 (intended to replace the InstructionConstant interface) + * @LastModified: Oct 2017 */ public final class ExceptionConst { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java index 7da4bc88510..f17135bc202 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/Utility.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -44,6 +43,7 @@ import com.sun.org.apache.bcel.internal.util.ByteSequence; * Utility functions that do not really belong to any class in particular. * * @version $Id: Utility.java 1751107 2016-07-03 02:41:18Z dbrosius $ + * @LastModified: Oct 2017 */ // @since 6.0 methods are no longer final public abstract class Utility { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java index e268ed6ed09..524ddacaeaf 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ARRAYLENGTH.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst; *
Stack: ..., arrayref -> ..., length
* * @version $Id: ARRAYLENGTH.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public class ARRAYLENGTH extends Instruction implements ExceptionThrower, StackProducer, StackConsumer /* since 6.0 */ { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java index bc623c9b5c5..dae9ed2ebfe 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ATHROW.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst; *
Stack: ..., objectref -> objectref
* * @version $Id: ATHROW.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public class ATHROW extends Instruction implements UnconditionalBranch, ExceptionThrower { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java index ad00630531e..c28690f4edd 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IDIV.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst; *
Stack: ..., value1, value2 -> result
* * @version $Id: IDIV.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public class IDIV extends ArithmeticInstruction implements ExceptionThrower { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java index edfd3ef2847..167e3631a97 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/IREM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst; *
Stack: ..., value1, value2 -> result
* * @version $Id: IREM.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public class IREM extends ArithmeticInstruction implements ExceptionThrower { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java index befeb427f56..3a4a43476a3 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LDIV.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,6 +28,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst; * ..., result.word1, result.word2 * * @version $Id: LDIV.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public class LDIV extends ArithmeticInstruction implements ExceptionThrower { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java index ab64cbdfbde..231c9a5d7c6 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/LREM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst; *
Stack: ..., value1, value2 -> result
* * @version $Id: LREM.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public class LREM extends ArithmeticInstruction implements ExceptionThrower { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java index 55c9b43f0b6..a333345a023 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITORENTER.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst; *
Stack: ..., objectref -> ...
* * @version $Id: MONITORENTER.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public class MONITORENTER extends Instruction implements ExceptionThrower, StackConsumer { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java index 4542da3fd33..0fb1c40c779 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MONITOREXIT.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst; *
Stack: ..., objectref -> ...
* * @version $Id: MONITOREXIT.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public class MONITOREXIT extends Instruction implements ExceptionThrower, StackConsumer { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java index 9948c7f30fe..277f11c8ee8 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/MethodGen.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -59,6 +58,7 @@ import java.util.Stack; * @version $Id: MethodGen.java 1749603 2016-06-21 20:50:19Z ggregory $ * @see InstructionList * @see Method + * @LastModified: Oct 2017 */ public class MethodGen extends FieldGenOrMethodGen { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java index 4edf59be840..9094ff0e2e7 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/NEWARRAY.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.io.IOException; * type must be one of T_INT, T_SHORT, ... * * @version $Id: NEWARRAY.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public class NEWARRAY extends Instruction implements AllocationInstruction, ExceptionThrower, StackProducer { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java index 67cdd90e5f2..f26fdb9c2a8 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/ReturnInstruction.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import com.sun.org.apache.bcel.internal.ExceptionConst; * Super class for the xRETURN family of instructions. * * @version $Id: ReturnInstruction.java 1747278 2016-06-07 17:28:43Z britter $ + * @LastModified: Oct 2017 */ public abstract class ReturnInstruction extends Instruction implements ExceptionThrower, TypedInstruction, StackConsumer { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java index 7149cd29503..cb505c7cba3 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/BCELFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -66,6 +65,7 @@ import com.sun.org.apache.bcel.internal.generic.Type; * * @see BCELifier * @version $Id: BCELFactory.java 1749603 2016-06-21 20:50:19Z ggregory $ + * @LastModified: Oct 2017 */ class BCELFactory extends EmptyVisitor { diff --git a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java index 63e28039ee9..e1877474da9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java +++ b/src/java.xml/share/classes/com/sun/org/apache/bcel/internal/util/InstructionFinder.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -66,6 +65,7 @@ import java.util.regex.Pattern; * @version $Id: InstructionFinder.java 1749603 2016-06-21 20:50:19Z ggregory $ * @see com.sun.org.apache.bcel.internal.generic.Instruction * @see InstructionList + * @LastModified: Oct 2017 */ public class InstructionFinder { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDatetime.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDatetime.java index 4e8f766f0a1..f8ce5a924d6 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDatetime.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/lib/ExsltDatetime.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -45,6 +44,7 @@ import com.sun.org.apache.xpath.internal.objects.XObject; * * @see EXSLT * @xsl.usage general + * @LastModified: Nov 2017 */ public class ExsltDatetime diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLMessages.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLMessages.java index 69fd302c3dc..ef84aa0557c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLMessages.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/res/XSLMessages.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import jdk.xml.internal.SecuritySupport; * be called XalanMessages, or some such. * * @xsl.usage internal + * @LastModified: Sep 2017 */ public class XSLMessages extends XPATHMessages { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java index 53986898e16..8444d43d203 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -23,6 +22,8 @@ package com.sun.org.apache.xalan.internal.utils; /** * A configuration error. This was an internal class in ObjectFactory previously + * + * @LastModified: Oct 2017 */ public final class ConfigurationError extends Error { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java index eb6672c270a..0e1eedda43a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import jdk.xml.internal.SecuritySupport; * class and modified to be used as a general utility for creating objects * dynamically. * + * @LastModified: Oct 2017 */ public class ObjectFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java index 109e43a4c5a..c827703752f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/Translet.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,6 +26,7 @@ import com.sun.org.apache.xml.internal.serializer.SerializationHandler; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public interface Translet { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyTemplates.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyTemplates.java index 45f082f1ae4..228348b44e4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyTemplates.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyTemplates.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class ApplyTemplates extends Instruction { private Expression _select; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java index 6812385191f..cd5ef47e268 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,6 +42,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Nov 2017 */ final class AttributeSet extends TopLevelElement { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValueTemplate.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValueTemplate.java index 94b0c73dca0..5d57f1320a8 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValueTemplate.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeValueTemplate.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,6 +42,7 @@ import java.util.StringTokenizer; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class AttributeValueTemplate extends AttributeValue { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java index b61c668b31f..2781f4cfbcb 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BinOpExpr.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Nov 2017 */ final class BinOpExpr extends Expression { public static final int PLUS = 0; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java index d3bcbe1ba7d..4eae92e3ead 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/BooleanCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class BooleanCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java index f9fb4eb8ffe..beac3640767 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Erwin Bolwidt + * @LastModified: Oct 2017 */ final class CallTemplate extends Instruction { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java index d3f9855ea9d..5b85ff0934c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CastCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import java.util.List; /** * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class CastCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java index a722c40e76d..e0fb68ad3df 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/CeilingCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class CeilingCall extends FunctionCall { public CeilingCall(QName fname, List arguments) { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Choose.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Choose.java index dcebf35dc89..28831e5be06 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Choose.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Choose.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -45,6 +44,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class Choose extends Instruction { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java index 8c0f8c03bad..dd1ad68eb0a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ConcatCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class ConcatCall extends FunctionCall { public ConcatCall(QName fname, List arguments) { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java index 62e47d6e0cb..90e35c445ad 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ContainsCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class ContainsCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java index 9a406671f8c..33e0b472fd9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/DocumentCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class DocumentCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java index 9e3c77a94fc..126bb0d5717 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ElementAvailableCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class ElementAvailableCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java index 85b17243f27..c94a0ae461f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Expression.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,7 @@ import java.util.List; * @author Santiago Pericas-Geertsen * @author Morten Jorgensen * @author Erwin Bolwidt + * @LastModified: Oct 2017 */ abstract class Expression extends SyntaxTreeNode { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java index 92e83abbb57..de0123c7da4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,6 +42,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Nov 2017 */ class FilterExpr extends Expression { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java index b00c9b05148..ff177604d23 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FloorCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,6 +28,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class FloorCall extends FunctionCall { public FloorCall(QName fname, List arguments) { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java index 74a8b5a832a..f5a452cd346 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FlowList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class FlowList { private List _elements; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java index cffc13a9349..a35b19481b9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ForEach.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -48,6 +47,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class ForEach extends Instruction { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java index 88342551adf..f63c425ebf1 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FormatNumberCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class FormatNumberCall extends FunctionCall { private Expression _value; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java index bcee236a83c..5e2bed87608 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionAvailableCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import java.util.List; /** * @author G. Todd Miller * @author Santiago Pericas-Geertsen + * @LastModified: Nov 2017 */ final class FunctionAvailableCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java index ade55416067..cd7c9e49834 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -63,6 +62,7 @@ import jdk.xml.internal.JdkXmlFeatures; * @author Morten Jorgensen * @author Erwin Bolwidt * @author Todd Miller + * @LastModified: Nov 2017 */ class FunctionCall extends Expression { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java index 3e1145f8fc9..00c0a28cc95 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/GenerateIdCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class GenerateIdCall extends FunctionCall { public GenerateIdCall(QName fname, List arguments) { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Import.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Import.java index 562ce2fa305..667b8d215b2 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Import.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Import.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,7 @@ import org.xml.sax.XMLReader; * @author Morten Jorgensen * @author Erwin Bolwidt * @author Gunnlaugur Briem + * @LastModified: Sep 2017 */ final class Import extends TopLevelElement { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Include.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Include.java index fb6b9c91a72..9c638140e9e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Include.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Include.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,7 @@ import org.xml.sax.XMLReader; * @author Morten Jorgensen * @author Erwin Bolwidt * @author Gunnlaugur Briem + * @LastModified: Sep 2017 */ final class Include extends TopLevelElement { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Key.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Key.java index f0cd15ed21e..0b880f2c2f1 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Key.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Key.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -52,6 +51,7 @@ import com.sun.org.apache.xml.internal.utils.XML11Char; /** * @author Morten Jorgensen * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class Key extends TopLevelElement { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java index 97fb4232967..8a649f247c6 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/KeyCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import java.util.List; /** * @author Morten Jorgensen * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class KeyCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java index c231a86c392..edce2ca68bb 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LangCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import java.util.List; /** * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class LangCall extends FunctionCall { private Expression _lang; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralElement.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralElement.java index 1b56ea72e28..80fdb4a3b8a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralElement.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LiteralElement.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,6 +42,7 @@ import java.util.Set; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class LiteralElement extends Instruction { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java index 53537b79553..09faa0d2998 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LocalNameCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class LocalNameCall extends NameBase { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java index 27d9f3ae297..43c3332aedc 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/LogicalExpr.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Nov 2017 */ final class LogicalExpr extends Expression { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Message.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Message.java index 4b578abee91..fb1e54fe317 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Message.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Message.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Nov 2017 */ final class Message extends Instruction { private boolean _terminate = false; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Mode.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Mode.java index b6363668a0f..5bd99bcd854 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Mode.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Mode.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -63,6 +62,7 @@ import java.util.Set; * @author Morten Jorgensen * @author Erwin Bolwidt * @author G. Todd Miller + * @LastModified: Nov 2017 */ final class Mode implements Constants { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java index dfb2ff6f925..f80e94b4139 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameBase.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import java.util.List; /** * @author Morten Jorgensen * @author Erwin Bolwidt + * @LastModified: Oct 2017 */ class NameBase extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java index 99d93294eb8..bdea39c6096 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NameCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class NameCall extends NameBase { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java index b6acab53085..52696144076 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NamespaceUriCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import java.util.List; /** * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class NamespaceUriCall extends NameBase { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java index 87578c76fde..091b84ec195 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NotCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class NotCall extends FunctionCall { public NotCall(QName fname, List arguments) { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java index 214bb449dc6..4d192a65ec7 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Number.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -54,6 +53,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Nov 2017 */ final class Number extends Instruction implements Closure { private static final int LEVEL_SINGLE = 0; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java index 35024c41d4f..52b63512b47 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/NumberCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class NumberCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java index 0b3116ac153..558ee1ddce2 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -67,6 +66,7 @@ import org.xml.sax.helpers.AttributesImpl; * @author G. Todd Miller * @author Morten Jorgensen * @author Erwin Bolwidt + * @LastModified: Nov 2017 */ public class Parser implements Constants, ContentHandler { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java index fd4541bcc76..c30dcc580d7 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Predicate.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -52,6 +51,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class Predicate extends Expression implements Closure { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java index 1dc815d1d15..9591674e638 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/ProcessingInstructionPattern.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,6 +39,7 @@ import com.sun.org.apache.xml.internal.dtm.DTM; /** * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class ProcessingInstructionPattern extends StepPattern { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java index c732f1225bd..e98f1ad0c46 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RelationalExpr.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -44,6 +43,7 @@ import com.sun.org.apache.xalan.internal.xsltc.runtime.Operators; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class RelationalExpr extends Expression { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java index 9d8a42c8c90..58f81237fe8 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/RoundCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class RoundCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java index 1d6544ef48b..e9abb50d062 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -59,6 +58,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Nov 2017 */ final class Sort extends Instruction implements Closure { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java index 7203ef9363a..1cbc71c4de3 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StartsWithCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class StartsWithCall extends FunctionCall { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java index 35819b4fc97..e1a00b86e0f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Step.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -48,6 +47,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class Step extends RelativeLocationPath { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java index 94e74d44758..216356b0786 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StepPattern.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -58,6 +57,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Erwin Bolwidt + * @LastModified: Oct 2017 */ class StepPattern extends RelativePathPattern { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java index 8336f641276..c97a553d988 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class StringCall extends FunctionCall { public StringCall(QName fname, List arguments) { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java index a9db991a8a5..0805724a46f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/StringLengthCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class StringLengthCall extends FunctionCall { public StringLengthCall(QName fname, List arguments) { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java index 2b4e3419469..b4cc7c6bc28 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -66,6 +65,7 @@ import java.util.StringTokenizer; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ public final class Stylesheet extends SyntaxTreeNode { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SymbolTable.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SymbolTable.java index 88a1efa33a5..3e3b6c1f4eb 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SymbolTable.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SymbolTable.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import java.util.StringTokenizer; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class SymbolTable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SyntaxTreeNode.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SyntaxTreeNode.java index 9bc3b6f1521..022491f6b49 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SyntaxTreeNode.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/SyntaxTreeNode.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -58,6 +57,7 @@ import org.xml.sax.helpers.AttributesImpl; * @author Morten Jorensen * @author Erwin Bolwidt * @author John Howard + * @LastModified: Nov 2017 */ public abstract class SyntaxTreeNode implements Constants { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Template.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Template.java index 4140cd151f3..fc2d4088ffc 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Template.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Template.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,7 @@ import java.util.List; * @author Santiago Pericas-Geertsen * @author Morten Jorgensen * @author Erwin Bolwidt + * @LastModified: Oct 2017 */ public final class Template extends TopLevelElement { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TestSeq.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TestSeq.java index adfb9a25785..166d0d614f5 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TestSeq.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TestSeq.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -48,6 +47,7 @@ import java.util.Map; * @author Santiago Pericas-Geertsen * @author Erwin Bolwidt * @author Morten Jorgensen + * @LastModified: Nov 2017 */ final class TestSeq { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java index 61299ddb93d..50be4fd9169 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/TopLevelElement.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,9 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Util; import java.util.ArrayList; import java.util.List; +/** + * @LastModified: Oct 2017 + */ class TopLevelElement extends SyntaxTreeNode { /* diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java index c178176ee7c..e310e3dd7c0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnaryOpExpr.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.util.TypeCheckError; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ final class UnaryOpExpr extends Expression { private Expression _left; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java index cd8621cf5f9..b697fd46b19 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnionPathExpr.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -39,6 +38,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Nov 2017 */ final class UnionPathExpr extends Expression { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java index 8f11821333b..bfc0ac0046e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnparsedEntityUriCall.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class UnparsedEntityUriCall extends FunctionCall { private Expression _entity; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnsupportedElement.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnsupportedElement.java index 724a491b522..aa24e00930d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnsupportedElement.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UnsupportedElement.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -39,6 +38,7 @@ import java.util.List; /** * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class UnsupportedElement extends SyntaxTreeNode { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java index f4ab76a3f57..b90adf7eae3 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/UseAttributeSets.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import java.util.StringTokenizer; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class UseAttributeSets extends Instruction { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java index 6f9c73fbc4c..4e971e0b48a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/VariableBase.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -48,6 +47,7 @@ import java.util.List; * @author Morten Jorgensen * @author Erwin Bolwidt * @author John Howard + * @LastModified: Oct 2017 */ class VariableBase extends TopLevelElement { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java index f33d8fd343d..0311d2c2298 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/Whitespace.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,6 +42,7 @@ import java.util.StringTokenizer; /** * @author Morten Jorgensen + * @LastModified: Oct 2017 */ final class Whitespace extends TopLevelElement { // Three possible actions for the translet: diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java index 6cb022649af..b22852eed08 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XPathLexer.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,9 @@ package com.sun.org.apache.xalan.internal.xsltc.compiler; import com.sun.java_cup.internal.runtime.Symbol; +/** + * @LastModified: Oct 2017 + */ class XPathLexer implements com.sun.java_cup.internal.runtime.Scanner { private final int YY_BUFFER_SIZE = 512; private final int YY_F = -1; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java index b908ae9dac4..fc0f18ea8fe 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -59,6 +58,7 @@ import org.xml.sax.XMLReader; * @author G. Todd Miller * @author Morten Jorgensen * @author John Howard (johnh@schemasoft.com) + * @LastModified: Oct 2017 */ public final class XSLTC { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XslAttribute.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XslAttribute.java index d11bf86e4c6..502b1a53784 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XslAttribute.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XslAttribute.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -50,6 +49,7 @@ import java.util.List; * @author Morten Jorgensen * @author Erwin Bolwidt * @author Gunnlaugur Briem + * @LastModified: Oct 2017 */ final class XslAttribute extends Instruction { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java index 8b839cdc375..a7f5adccdb8 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -48,6 +47,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class BooleanType extends Type { protected BooleanType() {} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java index a5418384a24..e66c0905e0b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ErrorMsg.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import jdk.xml.internal.SecuritySupport; * @author G. Todd Miller * @author Erwin Bolwidt * @author Morten Jorgensen + * @LastModified: Sep 2017 */ public final class ErrorMsg { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java index 85570bb1f73..df866f8252f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/IntType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -50,6 +49,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.FlowList; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class IntType extends NumberType { protected IntType() {} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java index 4bda6b4f757..5083959d47a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -24,6 +23,8 @@ package com.sun.org.apache.xalan.internal.xsltc.compiler.util; /** * Marks a class of errors in which XSLTC has reached some incorrect internal * state from which it cannot recover. + * + * @LastModified: Oct 2017 */ public class InternalError extends Error { private static final long serialVersionUID = -6690855975016554786L; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java index 5df01fa3b2e..062d42310f4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -76,6 +75,7 @@ import java.util.Stack; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Nov 2017 */ public class MethodGenerator extends MethodGen implements com.sun.org.apache.xalan.internal.xsltc.compiler.Constants { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodType.java index 965d12abdfc..e6f45e2f2e1 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,6 +26,7 @@ import java.util.List; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class MethodType extends Type { private final Type _resultType; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSetType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSetType.java index 70535ab251b..b07bc7f78e0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSetType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeSetType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.FlowList; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class NodeSetType extends Type { protected NodeSetType() {} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeType.java index f950b02cad4..24ddc140529 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/NodeType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.NodeTest; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class NodeType extends Type { private final int _type; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java index 98434161887..438b6cfa3aa 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants; /** * @author Todd Miller * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class ObjectType extends Type { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java index 845856f43ab..ca42fe2b35a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,6 +42,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.FlowList; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class RealType extends NumberType { protected RealType() {} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java index 7c18d79ab77..201bb73a76f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -39,6 +38,7 @@ import com.sun.org.apache.xml.internal.dtm.DTM; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Erwin Bolwidt + * @LastModified: Oct 2017 */ public final class ReferenceType extends Type { protected ReferenceType() {} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java index 195a21450d8..be412a43412 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.FlowList; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ public final class ResultTreeType extends Type { private final String _methodName; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringStack.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringStack.java index af637633583..227ddea0bcc 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringStack.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringStack.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -26,6 +25,7 @@ import java.util.Stack; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class StringStack extends Stack { static final long serialVersionUID = -1506910875640317898L; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringType.java index 7a15982690a..61d88173591 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -39,6 +38,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.FlowList; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public class StringType extends Type { protected StringType() {} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java index 5fa87758664..ad508b71682 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Type.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.NodeTest; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ public abstract class Type implements Constants { public static final Type Int = new IntType(); diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java index 7304a771466..b02aad4f2fd 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/Util.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import jdk.xml.internal.SecuritySupport; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Sep 2017 */ public final class Util { private static char filesep; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/VoidType.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/VoidType.java index b80480e1867..02715f0c9e9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/VoidType.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/VoidType.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,6 +28,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants; /** * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public final class VoidType extends Type { protected VoidType() {} diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java index 6477ed47da5..10f7648f3a0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,7 @@ import java.util.StringTokenizer; * deprecated. * @author Morten Jorgensen * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public class KeyIndex extends DTMAxisIteratorBase { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/LoadDocument.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/LoadDocument.java index 72bcf64463d..e0aa231ff38 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/LoadDocument.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/LoadDocument.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,6 +39,7 @@ import jdk.xml.internal.SecuritySupport; /** * @author Morten Jorgensen + * @LastModified: Sep 2017 */ public final class LoadDocument { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeCounter.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeCounter.java index 3dbf2e7467c..33b73f23592 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeCounter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeCounter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.util.List; * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen + * @LastModified: Oct 2017 */ public abstract class NodeCounter { public static final int END = DTM.NULL; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java index 659e1fc468d..02ab362bc17 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecord.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,8 @@ import jdk.xml.internal.SecuritySupport; /** * Base class for sort records containing application specific sort keys + * + * @LastModified: Oct 2017 */ public abstract class NodeSortRecord { public static final int COMPARE_STRING = 0; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java index 0a0663422ab..e7cbb69ecac 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/NodeSortRecordFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,9 @@ import java.lang.reflect.InvocationTargetException; import java.text.Collator; import java.util.Locale; +/** + * @LastModified: Oct 2017 + */ public class NodeSortRecordFactory { private static int DESCENDING = "descending".length(); diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java index 623bfe389af..e8ee560f250 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/SAXImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -69,6 +68,7 @@ import org.xml.sax.SAXException; * @author Santiago Pericas-Geertsen * @author Morten Jorgensen * @author Douglas Sellers + * @LastModified: Oct 2017 */ public final class SAXImpl extends SAX2DTM2 implements DOMEnhancedForDTM, DOMBuilder diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java index d73bc078b8f..a994f8fc99b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -55,6 +54,7 @@ import org.w3c.dom.Document; * @author Morten Jorgensen * @author G. Todd Miller * @author John Howard, JohnH@schemasoft.com + * @LastModified: Oct 2017 */ public abstract class AbstractTranslet implements Translet { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java index 8ad45ad2f84..16c9a226868 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -61,6 +60,8 @@ import org.xml.sax.SAXException; /** * Standard XSLT functions. All standard functions expect the current node * and the DOM as their last two arguments. + * + * @LastModified: Sep 2017 */ public final class BasisLibrary { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/InternalRuntimeError.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/InternalRuntimeError.java index f185c07882e..6d52571debe 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/InternalRuntimeError.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/InternalRuntimeError.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -25,6 +24,8 @@ package com.sun.org.apache.xalan.internal.xsltc.runtime; /** * Class to express failed assertions and similar for the xsltc runtime. * As java.lang.AssertionError was introduced in JDK 1.4 we can't use that yet. + * + * @LastModified: Oct 2017 */ public class InternalRuntimeError extends Error { private static final long serialVersionUID = 2802784919179095307L; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java index 985d6080578..13e12bbf157 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -49,6 +48,7 @@ import org.xml.sax.ext.LexicalHandler; /** * @author Santiago Pericas-Geertsen + * @LastModified: Oct 2017 */ public class TransletOutputHandlerFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/WriterOutputBuffer.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/WriterOutputBuffer.java index d3b9f853ad5..d986bfdac4f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/WriterOutputBuffer.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/WriterOutputBuffer.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import jdk.xml.internal.SecuritySupport; /** * @author Santiago Pericas-Geertsen + * @LastModified: Sep 2017 */ class WriterOutputBuffer implements OutputBuffer { private static final int KB = 1024; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/DOM2SAX.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/DOM2SAX.java index f4db1f39288..10e2efba05e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/DOM2SAX.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/DOM2SAX.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -46,6 +45,7 @@ import org.xml.sax.helpers.AttributesImpl; /** * @author G. Todd Miller + * @LastModified: Oct 2017 */ public class DOM2SAX implements XMLReader, Locator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java index 0c33fb7ac13..486fe56f810 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -46,6 +45,7 @@ import org.xml.sax.ext.Locator2; * @author G. Todd Miller * @author Sunitha Reddy * @author Huizhe Wang + * @LastModified: Nov 2017 */ public class SAX2DOM implements ContentHandler, LexicalHandler, Constants { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java index 617cdd32e57..55dabb73e65 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -69,6 +68,7 @@ import jdk.xml.internal.SecuritySupport; * @author G. Todd Millerj * @author Jochen Cordes * @author Santiago Pericas-Geertsen + * @LastModified: Nov 2017 */ public final class TemplatesImpl implements Templates, Serializable { static final long serialVersionUID = 673094361519270707L; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java index 54173e4dacd..8e722d26367 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -89,6 +88,7 @@ import org.xml.sax.helpers.XMLReaderFactory; * @author G. Todd Miller * @author Morten Jorgensen * @author Santiago Pericas-Geertsen + * @LastModified: Nov 2017 */ @SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory public class TransformerFactoryImpl diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java index 24462cffe8f..f72116aa0a8 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -95,6 +94,7 @@ import org.xml.sax.ext.LexicalHandler; * @author Morten Jorgensen * @author G. Todd Miller * @author Santiago Pericas-Geertsen + * @LastModified: Nov 2017 */ public final class TransformerImpl extends Transformer implements DOMCache, ErrorListener diff --git a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/XSLTCSource.java b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/XSLTCSource.java index 792ae0f760a..598340a8ab4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/XSLTCSource.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/XSLTCSource.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import org.xml.sax.SAXException; /** * @author Morten Jorgensen + * @LastModified: Nov 2017 */ public final class XSLTCSource implements Source { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java index 2a22624db6e..adc78c15039 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,6 +39,7 @@ import org.w3c.dom.Node; * * @xerces.internal * + * @LastModified: Oct 2017 */ public class AttributeMap extends NamedNodeMapImpl { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java index 0a32efbec4f..2b981207a98 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -84,6 +83,7 @@ import org.w3c.dom.ls.LSSerializer; * @author Andy Clark, IBM * @author Ralf Pfeiffer, IBM * @since PR-DOM-Level-1-19980818. + * @LastModified: Nov 2017 */ public class CoreDocumentImpl extends ParentNode implements Document { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java index ee031ee2cae..8771325f6bf 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -71,6 +70,7 @@ import org.w3c.dom.ls.LSResourceResolver; * * @author Elena Litani, IBM * @author Neeraj Bajaj, Sun Microsystems. + * @LastModified: Oct 2017 */ public class DOMConfigurationImpl extends ParserConfigurationSettings implements XMLParserConfiguration, DOMConfiguration { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java index e100ecb2dc4..a634f57319f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import org.w3c.dom.DOMImplementationList; * * @author Neil Delima, IBM * @since DOM Level 3 Core + * @LastModified: Oct 2017 */ public class DOMImplementationListImpl implements DOMImplementationList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationSourceImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationSourceImpl.java index acd83ed4802..97523c1a933 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationSourceImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationSourceImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,6 +39,7 @@ import org.w3c.dom.DOMImplementationSource; * * @xerces.internal * + * @LastModified: Oct 2017 */ public class DOMImplementationSourceImpl implements DOMImplementationSource { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMMessageFormatter.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMMessageFormatter.java index d2c94549707..90917d29c12 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMMessageFormatter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMMessageFormatter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import jdk.xml.internal.SecuritySupport; * @xerces.internal * * @author Sandy Gao, IBM + * @LastModified: Sep 2017 */ public class DOMMessageFormatter { public static final String DOM_DOMAIN = "http://www.w3.org/dom/DOMTR"; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java index dd3c3978283..3dacb16ee48 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -97,6 +96,7 @@ import org.w3c.dom.Text; * * @author Elena Litani, IBM * @author Neeraj Bajaj, Sun Microsystems, inc. + * @LastModified: Nov 2017 */ public class DOMNormalizer implements XMLDocumentHandler { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMStringListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMStringListImpl.java index 5530fc51c6a..a6d4f6defca 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMStringListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMStringListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import org.w3c.dom.DOMStringList; * @xerces.internal * * @author Neil Delima, IBM + * @LastModified: Nov 2017 */ public class DOMStringListImpl implements DOMStringList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMXSImplementationSourceImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMXSImplementationSourceImpl.java index de335632768..2c7397136da 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMXSImplementationSourceImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMXSImplementationSourceImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import org.w3c.dom.DOMImplementationList; * @xerces.internal * * @author Elena Litani, IBM + * @LastModified: Oct 2017 */ public class DOMXSImplementationSourceImpl extends DOMImplementationSourceImpl { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeepNodeListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeepNodeListImpl.java index b1339c03447..99f7c5aedb2 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeepNodeListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeepNodeListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -72,6 +71,7 @@ import org.w3c.dom.NodeList; * @xerces.internal * * @since PR-DOM-Level-1-19980818. + * @LastModified: Oct 2017 */ public class DeepNodeListImpl implements NodeList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java index 3661f5a8c65..c8cc9c2bcd9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,6 +42,7 @@ import org.w3c.dom.Node; * @xerces.internal * * @since PR-DOM-Level-1-19980818. + * @LastModified: Oct 2017 */ public class DeferredDocumentImpl extends DocumentImpl diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentTypeImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentTypeImpl.java index be164613472..e91ed7b3a62 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentTypeImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DeferredDocumentTypeImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,6 +42,7 @@ import org.w3c.dom.Node; * @xerces.internal * * @since PR-DOM-Level-1-19980818. + * @LastModified: Oct 2017 */ public class DeferredDocumentTypeImpl extends DocumentTypeImpl diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java index 2395fa9c0fc..f7467cbcf83 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -85,6 +84,7 @@ import org.w3c.dom.traversal.TreeWalker; * @author Andy Clark, IBM * @author Ralf Pfeiffer, IBM * @since PR-DOM-Level-1-19980818. + * @LastModified: Nov 2017 */ public class DocumentImpl extends CoreDocumentImpl diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java index b748bd26d90..051237b2561 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -57,6 +56,7 @@ import org.w3c.dom.Node; * @xerces.internal * * @since PR-DOM-Level-1-19980818. + * @LastModified: Oct 2017 */ public class NamedNodeMapImpl implements NamedNodeMap, Serializable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeImpl.java index 0cc2ffec765..c22b4932c8a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/RangeImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import org.w3c.dom.ranges.RangeException; * * @xerces.internal * + * @LastModified: Oct 2017 */ public class RangeImpl implements Range { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/Constants.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/Constants.java index 8c34331e589..85ed8281c6d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/Constants.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/Constants.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.NoSuchElementException; * * @author Andy Clark, IBM * + * @LastModified: Oct 2017 */ public final class Constants { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java index 45723ce6a79..da5ee58fc4b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -64,6 +63,7 @@ import java.io.IOException; * @author Glenn Marcy, IBM * @author Eric Ye, IBM * + * @LastModified: Nov 2017 */ public class XMLDTDScannerImpl extends XMLScanner diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java index 7e626bd3fc6..31a2e9d01f2 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* @@ -72,6 +71,7 @@ import jdk.xml.internal.SecuritySupport; * @author Eric Ye, IBM * @author Sunitha Reddy, SUN Microsystems * + * @LastModified: Sep 2017 */ public class XMLDocumentFragmentScannerImpl extends XMLScanner diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java index da8ffd5b002..8976375f76c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* @@ -65,6 +64,7 @@ import jdk.xml.internal.SecuritySupport; * Refer to the table in unit-test javax.xml.stream.XMLStreamReaderTest.SupportDTD for changes * related to property SupportDTD. * @author Joe Wang, Sun Microsystems + * @LastModified: Sep 2017 */ public class XMLDocumentScannerImpl extends XMLDocumentFragmentScannerImpl{ diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java index 095b615736a..e13fa8fbfa9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -90,6 +89,7 @@ import org.xml.sax.InputSource; * @author K.Venugopal SUN Microsystems * @author Neeraj Bajaj SUN Microsystems * @author Sunitha Reddy SUN Microsystems + * @LastModified: Oct 2017 */ public class XMLEntityManager implements XMLComponent, XMLEntityResolver { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLErrorReporter.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLErrorReporter.java index e9555dcc387..51c4fd3fd5d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLErrorReporter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLErrorReporter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -71,6 +70,7 @@ import org.xml.sax.ErrorHandler; * @author Eric Ye, IBM * @author Andy Clark, IBM * + * @LastModified: Nov 2017 */ public class XMLErrorReporter implements XMLComponent { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.java index 03c2bdbca52..0eba7ebb8ac 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -57,6 +56,7 @@ import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource; * * @author Andy Clark, IBM * + * @LastModified: Nov 2017 */ public class XMLNamespaceBinder implements XMLComponent, XMLDocumentFilter { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java index 503911c8720..d9ee34af9df 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLScanner.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -68,6 +67,7 @@ import com.sun.xml.internal.stream.Entity; * @author Eric Ye, IBM * @author K.Venugopal SUN Microsystems * @author Sunitha Reddy, SUN Microsystems + * @LastModified: Nov 2017 */ public abstract class XMLScanner implements XMLComponent { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java index f4f5e87a55e..690a5f81e74 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -63,6 +62,7 @@ import java.util.Random; * @author Andy Clark, IBM * @author Neil Graham, IBM * + * @LastModified: Oct 2017 */ public class DTDGrammar implements XMLDTDHandler, XMLDTDContentModelHandler, EntityState, Grammar { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java index a40e9dc36c0..7505c7e52db 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import java.util.List; * @xerces.internal * * @author Neil Graham, IBM + * @LastModified: Oct 2017 */ public class XMLDTDDescription extends XMLResourceIdentifierImpl implements com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java index 1d5fb55b2bf..1afd2490e8b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -68,6 +67,7 @@ import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource; * @author Neil Graham, IBM * @author Michael Glavassevich, IBM * + * @LastModified: Nov 2017 */ public class XMLDTDLoader extends XMLDTDProcessor diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java index b6070dcff62..89595b49254 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDProcessor.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -72,6 +71,7 @@ import java.util.StringTokenizer; * * @author Neil Graham, IBM * + * @LastModified: Nov 2017 */ public class XMLDTDProcessor implements XMLComponent, XMLDTDFilter, XMLDTDContentModelFilter { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java index bbd830413f5..e32696a053e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDValidator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -85,6 +84,7 @@ import java.util.Iterator; * @author Jeffrey Rodriguez IBM * @author Neil Graham, IBM * + * @LastModified: Nov 2017 */ public class XMLDTDValidator implements XMLComponent, XMLDocumentFilter, XMLDTDValidatorFilter, RevalidationHandler { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java index 212ddfa020b..9ba1a764831 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dtd/models/DFAContentModel.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -41,6 +40,7 @@ import java.util.Map; * * @xerces.internal * + * @LastModified: Oct 2017 */ public class DFAContentModel implements ContentModelValidator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.java index e9b4f327dc6..4e99689ab02 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/DatatypeException.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Sandy Gao, IBM * + * @LastModified: Sep 2017 */ public class DatatypeException extends Exception { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java index f7516d3dc07..fe7736c4315 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/XSFacets.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import java.util.List; * * @author Sandy Gao, IBM * + * @LastModified: Oct 2017 */ public class XSFacets { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/Base64.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/Base64.java index 6eca170685a..5bddff8b89e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/Base64.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/Base64.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ package com.sun.org.apache.xerces.internal.impl.dv.util; * * @author Jeffrey Rodriguez * @author Sandy Gao + * @LastModified: Nov 2017 */ public final class Base64 { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java index 489f5566b8e..272fc636260 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.util.AbstractList; * * @author Ankit Pasricha, IBM * + * @LastModified: Oct 2017 */ public class ByteListImpl extends AbstractList implements ByteList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BaseDVFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BaseDVFactory.java index d93a25b652f..10a63f721bf 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BaseDVFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/BaseDVFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import com.sun.org.apache.xerces.internal.xs.XSObjectList; * @author Neeraj Bajaj, Sun Microsystems, inc. * @author Sandy Gao, IBM * + * @LastModified: Nov 2017 */ public class BaseDVFactory extends SchemaDVFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ExtendedSchemaDVFactoryImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ExtendedSchemaDVFactoryImpl.java index 7be412474d3..bfa1f12d4ea 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ExtendedSchemaDVFactoryImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ExtendedSchemaDVFactoryImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import com.sun.org.apache.xerces.internal.util.SymbolHash; * * @author Khaled Noaman, IBM * + * @LastModified: Nov 2017 */ public class ExtendedSchemaDVFactoryImpl extends BaseSchemaDVFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FullDVFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FullDVFactory.java index f6e48c8c738..4d4aa17b09e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FullDVFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/FullDVFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import com.sun.org.apache.xerces.internal.xs.XSConstants; * @author Neeraj Bajaj, Sun Microsystems, inc. * @author Sandy Gao, IBM * + * @LastModified: Nov 2017 */ public class FullDVFactory extends BaseDVFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java index a7ec401a18f..254d6c2f9c9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import java.util.AbstractList; * @author Neeraj Bajaj, Sun Microsystems, inc. * @author Sandy Gao, IBM * + * @LastModified: Oct 2017 */ public class ListDV extends TypeValidator{ diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDVFactoryImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDVFactoryImpl.java index f25a56ffbe8..fc2657e2044 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDVFactoryImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/SchemaDVFactoryImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import com.sun.org.apache.xerces.internal.util.SymbolHash; * @author Neeraj Bajaj, Sun Microsystems, inc. * @author Sandy Gao, IBM * + * @LastModified: Nov 2017 */ public class SchemaDVFactoryImpl extends BaseSchemaDVFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/XSSimpleTypeDecl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/XSSimpleTypeDecl.java index 5bfe93192aa..fb185ed121e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/XSSimpleTypeDecl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/dv/xs/XSSimpleTypeDecl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -64,6 +63,7 @@ import org.w3c.dom.TypeInfo; * @author Sandy Gao, IBM * @author Neeraj Bajaj, Sun Microsystems, inc. * + * @LastModified: Nov 2017 */ public class XSSimpleTypeDecl implements XSSimpleType, TypeInfo { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter.java index f4bb567ccfa..fb0dc153a7d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_de.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_de.java index e157cc675df..93bf12cf214 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_de.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_de.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_de implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_es.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_es.java index c686f5e6d92..4955eaf12b1 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_es.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_es.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_es implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_fr.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_fr.java index 56566fd8ce5..b6e4d6aafd0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_fr.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_fr.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_fr implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_it.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_it.java index 8c5d0171c1a..5369d56a490 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_it.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_it.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_it implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ja.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ja.java index f3220dfb799..178cf4d46c9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ja.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ja.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_ja implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java index b37cc8b5667..c5e8b0c59e9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_ko implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java index 266e3579b62..7fafa34a9f7 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_pt_BR.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_pt_BR implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_sv.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_sv.java index e188eecb5a4..180a7c7082c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_sv.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_sv.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_sv implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java index bb6ecc867b7..83eccf9a107 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_CN.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_zh_CN implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java index 5e233542243..b578cea53d2 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_zh_TW.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Eric Ye, IBM * + * @LastModified: Sep 2017 */ public class XMLMessageFormatter_zh_TW implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ConfigurableValidationState.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ConfigurableValidationState.java index d5a3df1f7b9..b07756d555b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ConfigurableValidationState.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ConfigurableValidationState.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import java.util.Iterator; * @xerces.internal * * @author Peter McCracken, IBM + * @LastModified: Oct 2017 */ public final class ConfigurableValidationState extends ValidationState { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationManager.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationManager.java index 4c63bff2b95..e4a19e89f95 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationManager.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationManager.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import java.util.List; * @xerces.internal * * @author Elena Litani, IBM + * @LastModified: Oct 2017 */ public class ValidationManager { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationState.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationState.java index 01ba6e92d2f..b0fa2bbc735 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationState.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationState.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import java.util.Locale; * @xerces.internal * * @author Elena Litani, IBM + * @LastModified: Oct 2017 */ public class ValidationState implements ValidationContext { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/RegexParser.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/RegexParser.java index 412e6c49883..147cae0c751 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/RegexParser.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/RegexParser.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import jdk.xml.internal.SecuritySupport; * * @xerces.internal * + * @LastModified: Sep 2017 */ class RegexParser { static final int T_CHAR = 0; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/AttributePSVImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/AttributePSVImpl.java index eea1c16f81b..0dac1ba6c18 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/AttributePSVImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/AttributePSVImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,6 +39,7 @@ import com.sun.org.apache.xerces.internal.xs.XSValue; * @xerces.internal * * @author Elena Litani IBM + * @LastModified: Nov 2017 */ public class AttributePSVImpl implements AttributePSVI { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/ElementPSVImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/ElementPSVImpl.java index a402841d179..dd8d22a6237 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/ElementPSVImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/ElementPSVImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -47,6 +46,7 @@ import com.sun.org.apache.xerces.internal.xs.XSValue; * @xerces.internal * * @author Elena Litani IBM + * @LastModified: Nov 2017 */ public class ElementPSVImpl implements ElementPSVI { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/PSVIErrorList.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/PSVIErrorList.java index 435d9d6826f..b4d13d7b4f5 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/PSVIErrorList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/PSVIErrorList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.AbstractList; * * @author Michael Glavassevich, IBM * + * @LastModified: Oct 2017 */ final class PSVIErrorList extends AbstractList implements StringList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaGrammar.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaGrammar.java index bfe5ed15603..5d6f2ee0fbc 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaGrammar.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SchemaGrammar.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -78,6 +77,7 @@ import org.xml.sax.SAXException; * @author Sandy Gao, IBM * @author Elena Litani, IBM * + * @LastModified: Oct 2017 */ public class SchemaGrammar implements XSGrammar, XSNamespaceItem { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SubstitutionGroupHandler.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SubstitutionGroupHandler.java index 62a5200c7ec..0fc097d0b36 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SubstitutionGroupHandler.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SubstitutionGroupHandler.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -39,6 +38,7 @@ import java.util.Map; * * @author Sandy Gao, IBM * + * @LastModified: Nov 2017 */ public class SubstitutionGroupHandler { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java index 3d5f22e10f7..3ccec0aceee 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -102,6 +101,7 @@ import org.xml.sax.InputSource; * @xerces.internal * * @author Neil Graham, IBM + * @LastModified: Sep 2017 */ public class XMLSchemaLoader implements XMLGrammarLoader, XMLComponent, XSElementDeclHelper, diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java index ab0073b8a9d..5e365a8ad32 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -112,6 +111,7 @@ import jdk.xml.internal.JdkXmlUtils; * @author Elena Litani IBM * @author Andy Clark IBM * @author Neeraj Bajaj, Sun Microsystems, inc. + * @LastModified: Nov 2017 */ public class XMLSchemaValidator implements XMLComponent, XMLDocumentFilter, FieldActivator, RevalidationHandler, XSElementDeclHelper { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSComplexTypeDecl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSComplexTypeDecl.java index 79d8002ec32..d50595644ed 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSComplexTypeDecl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSComplexTypeDecl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import org.w3c.dom.TypeInfo; * * @author Elena Litani, IBM * @author Sandy Gao, IBM + * @LastModified: Nov 2017 */ public class XSComplexTypeDecl implements XSComplexTypeDefinition, TypeInfo { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSConstraints.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSConstraints.java index 2dbce9eac1a..d0bea0bd401 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSConstraints.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSConstraints.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -46,6 +45,7 @@ import java.util.List; * * @author Sandy Gao, IBM * + * @LastModified: Nov 2017 */ public class XSConstraints { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSGrammarBucket.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSGrammarBucket.java index 9ce1ac78052..c0f80123547 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSGrammarBucket.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSGrammarBucket.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.util.Map; * @xerces.internal * * @author Sandy Gao, IBM + * @LastModified: Nov 2017 */ public class XSGrammarBucket { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSMessageFormatter.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSMessageFormatter.java index 71bd7f52482..d254844cb84 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSMessageFormatter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSMessageFormatter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import jdk.xml.internal.SecuritySupport; * @xerces.internal * * @author Elena Litani, IBM + * @LastModified: Sep 2017 */ public class XSMessageFormatter implements MessageFormatter { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSModelImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSModelImpl.java index 9e40605ea6a..43fb3a155a9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSModelImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XSModelImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -58,6 +57,7 @@ import java.util.NoSuchElementException; * * @author Sandy Gao, IBM * + * @LastModified: Oct 2017 */ @SuppressWarnings("unchecked") // method toArray(T[]) public final class XSModelImpl extends AbstractList implements XSModel, XSNamespaceItemList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMBuilder.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMBuilder.java index 38aa2e75ab7..e269da591e1 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMBuilder.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/CMBuilder.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import com.sun.org.apache.xerces.internal.impl.xs.XSParticleDecl; * @author Elena Litani, IBM * @author Sandy Gao, IBM * + * @LastModified: Nov 2017 */ public class CMBuilder { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSAllCM.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSAllCM.java index 87e009c230b..ed0f7600ddb 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSAllCM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSAllCM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import java.util.List; * @xerces.internal * * @author Pavani Mukthipudi, Sun Microsystems Inc. + * @LastModified: Oct 2017 */ public class XSAllCM implements XSCMValidator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMValidator.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMValidator.java index dbecae28051..0d94a7e859d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMValidator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSCMValidator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import java.util.List; * * @author Sandy Gao, IBM * @author Elena Litani, IBM + * @LastModified: Oct 2017 */ public interface XSCMValidator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSDFACM.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSDFACM.java index c263104d879..e038aacb8fe 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSDFACM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSDFACM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -46,6 +45,7 @@ import java.util.Map; * @xerces.internal * * @author Neil Graham, IBM + * @LastModified: Oct 2017 */ public class XSDFACM implements XSCMValidator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSEmptyCM.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSEmptyCM.java index c574a6d225c..7069d9b7c70 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSEmptyCM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/models/XSEmptyCM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import java.util.List; * * @author Elena Litani, Lisa Martin * @author IBM + * @LastModified: Oct 2017 */ public class XSEmptyCM implements XSCMValidator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java index 5c1b7d60975..eb94d8fca47 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -41,6 +40,7 @@ import org.w3c.dom.Node; * @author Rahul Srivastava, Sun Microsystems Inc. * @author Sandy Gao, IBM * + * @LastModified: Oct 2017 */ public class SchemaDOM extends DefaultDocument { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaParsingConfig.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaParsingConfig.java index 9c1207ad88f..bbc9c90a486 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaParsingConfig.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaParsingConfig.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -59,6 +58,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Rahul Srivastava, Sun Microsystems Inc. * + * @LastModified: Sep 2017 */ public class SchemaParsingConfig extends BasicParserConfiguration implements XMLPullParserConfiguration { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/StAXSchemaParser.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/StAXSchemaParser.java index 209f230f697..5100faad69a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/StAXSchemaParser.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/StAXSchemaParser.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -53,6 +52,7 @@ import org.w3c.dom.Document; * * @xerces.internal * + * @LastModified: Oct 2017 */ final class StAXSchemaParser { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java index 9442886abb8..ed099cc4951 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -68,6 +67,7 @@ import org.w3c.dom.Element; * @xerces.internal * * @author Sandy Gao, IBM + * @LastModified: Nov 2017 */ public class XSAttributeChecker { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractTraverser.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractTraverser.java index 819d4ac98cd..fa8e287f355 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractTraverser.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAbstractTraverser.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -60,6 +59,7 @@ import org.w3c.dom.Element; * @author Rahul Srivastava, Sun Microsystems Inc. * @author Neeraj Bajaj, Sun Microsystems Inc. * + * @LastModified: Oct 2017 */ abstract class XSDAbstractTraverser { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDElementTraverser.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDElementTraverser.java index 136daad8dcf..1fc6d6b5381 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDElementTraverser.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDElementTraverser.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -70,6 +69,7 @@ import org.w3c.dom.Element; * * @author Sandy Gao, IBM * + * @LastModified: Oct 2017 */ class XSDElementTraverser extends XSDAbstractTraverser { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java index 3cba576c0a2..9d378b494fb 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDHandler.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -131,6 +130,7 @@ import org.xml.sax.helpers.XMLReaderFactory; * @author Neil Graham, IBM * @author Pavani Mukthipudi, Sun Microsystems * + * @LastModified: Nov 2017 */ @SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory public class XSDHandler { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDSimpleTypeTraverser.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDSimpleTypeTraverser.java index fa485eb5808..a9648915d20 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDSimpleTypeTraverser.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDSimpleTypeTraverser.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -77,6 +76,7 @@ import org.w3c.dom.Element; * @author Neeraj Bajaj, Sun Microsystems, Inc. * @author Sandy Gao, IBM * + * @LastModified: Nov 2017 */ class XSDSimpleTypeTraverser extends XSDAbstractTraverser { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDUniqueOrKeyTraverser.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDUniqueOrKeyTraverser.java index 687504336d0..e8be309430b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDUniqueOrKeyTraverser.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDUniqueOrKeyTraverser.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import org.w3c.dom.Element; * @xerces.internal * * @author Neil Graham, IBM + * @LastModified: Nov 2017 */ class XSDUniqueOrKeyTraverser extends XSDAbstractIDConstraintTraverser { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDocumentInfo.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDocumentInfo.java index d73158a8f5c..4b256d7650b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDocumentInfo.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDocumentInfo.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -44,6 +43,7 @@ import org.w3c.dom.Node; * @xerces.internal * * @author Neil Graham, IBM + * @LastModified: Oct 2017 */ class XSDocumentInfo { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/LSInputListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/LSInputListImpl.java index f4924593104..de2bcf755f4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/LSInputListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/LSInputListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import org.w3c.dom.ls.LSInput; * * @author Michael Glavassevich, IBM * + * @LastModified: Oct 2017 */ @SuppressWarnings("unchecked") // method toArray(T[]) public final class LSInputListImpl extends AbstractList implements LSInputList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ObjectListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ObjectListImpl.java index e6b9b262557..3c44f994e87 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ObjectListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ObjectListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import java.util.AbstractList; * * @xerces.internal * + * @LastModified: Oct 2017 */ @SuppressWarnings("unchecked") // method toArray(T[]) public final class ObjectListImpl extends AbstractList implements ObjectList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java index 5e5369f0960..0b9609a1a91 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/ShortListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.util.AbstractList; * * @author Sandy Gao, IBM * + * @LastModified: Oct 2017 */ public final class ShortListImpl extends AbstractList implements ShortList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/StringListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/StringListImpl.java index 312a4d612b0..e0635ed8e3c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/StringListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/StringListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import java.util.List; * * @author Sandy Gao, IBM * + * @LastModified: Oct 2017 */ @SuppressWarnings("unchecked") // method toArray(T[]) public final class StringListImpl extends AbstractList implements StringList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSGrammarPool.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSGrammarPool.java index cf1b6bdbb0e..f41b9839be9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSGrammarPool.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSGrammarPool.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import java.util.List; * * @xerces.internal * + * @LastModified: Nov 2017 */ public class XSGrammarPool extends XMLGrammarPoolImpl { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java index 34d4fa0d6eb..5fe3a65688a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,6 +39,7 @@ import javax.xml.namespace.QName; * * @author Sandy Gao, IBM * + * @LastModified: Oct 2017 */ public class XSNamedMapImpl extends AbstractMap implements XSNamedMap { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java index d6261f6e56d..1dbaf613429 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import java.util.NoSuchElementException; * * @author Sandy Gao, IBM * + * @LastModified: Oct 2017 */ @SuppressWarnings("unchecked") // method toArray(T[]) public class XSObjectListImpl extends AbstractList implements XSObjectList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java index cffed8d6736..48d8d873989 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -62,6 +61,7 @@ import org.xml.sax.helpers.DefaultHandler; * @author Rajiv Mordani * @author Edwin Goei * + * @LastModified: Oct 2017 */ @SuppressWarnings("deprecation") public class SAXParserImpl extends javax.xml.parsers.SAXParser diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/UnparsedEntityHandler.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/UnparsedEntityHandler.java index 38237a66337..86210461d3c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/UnparsedEntityHandler.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/UnparsedEntityHandler.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,6 +39,7 @@ import java.util.Map; * Events are forwarded to the registered XMLDTDHandler without modification.

* * @author Michael Glavassevich, IBM + * @LastModified: Oct 2017 */ final class UnparsedEntityHandler implements XMLDTDFilter, EntityState { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java index 4b713aa0755..7f35c5ec8aa 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import javax.xml.validation.ValidatorHandler; *

Abstract implementation of Schema for W3C XML Schemas.

* * @author Michael Glavassevich, IBM + * @LastModified: Oct 2017 */ abstract class AbstractXMLSchema extends Schema implements XSGrammarPoolContainer { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultBuilder.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultBuilder.java index bb111609fd0..3b5786f880d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultBuilder.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMResultBuilder.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -66,6 +65,7 @@ import org.w3c.dom.Text; *

DOM result builder.

* * @author Michael Glavassevich, IBM + * @LastModified: Oct 2017 */ final class DOMResultBuilder implements DOMDocumentHandler { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java index 6c0e7841525..1eb8d4a4a79 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -62,6 +61,7 @@ import org.xml.sax.SAXException; *

A validator helper for DOMSources.

* * @author Michael Glavassevich, IBM + * @LastModified: Oct 2017 */ final class DOMValidatorHelper implements ValidatorHelper, EntityState { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/JAXPValidationMessageFormatter.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/JAXPValidationMessageFormatter.java index 8edc75c0163..84fd67d783c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/JAXPValidationMessageFormatter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/JAXPValidationMessageFormatter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import jdk.xml.internal.SecuritySupport; *

Used to format JAXP Validation API error messages using a specified locale.

* * @author Michael Glavassevich, IBM + * @LastModified: Sep 2017 */ final class JAXPValidationMessageFormatter { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SimpleXMLSchema.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SimpleXMLSchema.java index aaee47507b4..9005df99148 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SimpleXMLSchema.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SimpleXMLSchema.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; * contains schema components from one target namespace.

* * @author Michael Glavassevich, IBM + * @LastModified: Nov 2017 */ final class SimpleXMLSchema extends AbstractXMLSchema implements XMLGrammarPool { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SoftReferenceGrammarPool.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SoftReferenceGrammarPool.java index 700c8678f1c..10f3e1bc1ed 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SoftReferenceGrammarPool.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/SoftReferenceGrammarPool.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; * the target namespace for the schema and schema location.

* * @author Michael Glavassevich, IBM + * @LastModified: Nov 2017 */ final class SoftReferenceGrammarPool implements XMLGrammarPool { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java index f04b8959ae4..57b16fb26ef 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -95,6 +94,7 @@ import org.xml.sax.ext.EntityResolver2; * @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) * @author Michael Glavassevich, IBM * + * @LastModified: Oct 2017 */ final class ValidatorHandlerImpl extends ValidatorHandler implements DTDHandler, EntityState, PSVIProvider, ValidatorHelper, XMLDocumentHandler { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WeakReferenceXMLSchema.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WeakReferenceXMLSchema.java index 6363de0aedb..c6f539ed43a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WeakReferenceXMLSchema.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WeakReferenceXMLSchema.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; * its memory.

* * @author Michael Glavassevich, IBM + * @LastModified: Oct 2017 */ final class WeakReferenceXMLSchema extends AbstractXMLSchema { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WrappedSAXException.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WrappedSAXException.java index c8100c25bc5..35cf2b541b9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WrappedSAXException.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/validation/WrappedSAXException.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,8 @@ import org.xml.sax.SAXException; * * @author * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com) + * + * @LastModified: Oct 2017 */ public class WrappedSAXException extends RuntimeException { private static final long serialVersionUID = -3201986204982729962L; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java index 4c4f096b534..0d494699d3e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -85,6 +84,7 @@ import org.xml.sax.SAXException; * @author Andy Clark, IBM * @author Elena Litani, IBM * + * @LastModified: Nov 2017 */ public class AbstractDOMParser extends AbstractXMLDocumentParser { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java index 04b3de813b3..db365b5ac0b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -95,6 +94,7 @@ import java.util.Locale; * @author Arnaud Le Hors, IBM * @author Andy Clark, IBM * + * @LastModified: Oct 2017 */ public abstract class BasicParserConfiguration extends ParserConfigurationSettings diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DOMParserImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DOMParserImpl.java index 12eae6586f3..45fdbf878cb 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DOMParserImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/DOMParserImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -79,6 +78,7 @@ import org.xml.sax.SAXException; * @author Pavani Mukthipudi, Sun Microsystems Inc. * @author Elena Litani, IBM * @author Rahul Srivastava, Sun Microsystems Inc. + * @LastModified: Oct 2017 */ diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java index fc4ad5848fa..2d9de77962c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -78,6 +77,7 @@ import jdk.xml.internal.JdkXmlUtils; * @author Neil Graham, IBM * @author Michael Glavassevich, IBM * + * @LastModified: Oct 2017 */ public class XML11Configuration extends ParserConfigurationSettings implements XMLPullParserConfiguration, XML11Configurable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java index 13d816b273e..7cca0a068a6 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -104,6 +103,7 @@ import java.util.Locale; * @author Michael Glavassevich, IBM * @author John Kim, IBM * + * @LastModified: Oct 2017 */ public class XML11DTDConfiguration extends ParserConfigurationSettings implements XMLPullParserConfiguration, XML11Configurable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java index 5dc29c264b8..ad7229a8750 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -77,6 +76,7 @@ import java.util.Locale; * @author John Kim, IBM * @author Michael Glavassevich, IBM * + * @LastModified: Oct 2017 */ public class XML11NonValidatingConfiguration extends ParserConfigurationSettings implements XMLPullParserConfiguration, XML11Configurable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarPreparser.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarPreparser.java index fed427c3966..2b20c91ad63 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarPreparser.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/parsers/XMLGrammarPreparser.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -50,6 +49,7 @@ import java.util.Map; * * @author Neil Graham, IBM * + * @LastModified: Oct 2017 */ public class XMLGrammarPreparser { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AugmentationsImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AugmentationsImpl.java index b0b125f750b..8984d57ba8c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AugmentationsImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/AugmentationsImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import java.util.Map; *

* * @author Elena Litani, IBM + * @LastModified: Oct 2017 */ public class AugmentationsImpl implements Augmentations{ diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMEntityResolverWrapper.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMEntityResolverWrapper.java index 4041c7cc4ad..27a6950991b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMEntityResolverWrapper.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DOMEntityResolverWrapper.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -45,6 +44,7 @@ import java.io.StringReader; * @author Gopal Sharma, SUN MicroSystems Inc. * @author Elena Litani, IBM * @author Ramesh Mandava, Sun Microsystems + * @LastModified: Nov 2017 */ public class DOMEntityResolverWrapper implements XMLEntityResolver { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java index 19edaa465fa..c114daeb636 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/DatatypeMessageFormatter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import jdk.xml.internal.SecuritySupport; *

Used to format JAXP 1.3 Datatype API error messages using a specified locale.

* * @author Neeraj Bajaj, Sun Microsystems + * @LastModified: Sep 2017 */ public class DatatypeMessageFormatter { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/JAXPNamespaceContextWrapper.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/JAXPNamespaceContextWrapper.java index 51801b89668..dd5a4775f3d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/JAXPNamespaceContextWrapper.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/JAXPNamespaceContextWrapper.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import javax.xml.XMLConstants; * * @author Michael Glavassevich, IBM * + * @LastModified: Oct 2017 */ public final class JAXPNamespaceContextWrapper implements NamespaceContext { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/NamespaceSupport.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/NamespaceSupport.java index c3e93e161fd..05eba5b2560 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/NamespaceSupport.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/NamespaceSupport.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import java.util.NoSuchElementException; * * @author Andy Clark, IBM * + * @LastModified: Oct 2017 */ public class NamespaceSupport implements NamespaceContext { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXMessageFormatter.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXMessageFormatter.java index 9dfbe504aca..4c7c95eb106 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXMessageFormatter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SAXMessageFormatter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Michael Glavassevich, IBM * + * @LastModified: Sep 2017 */ public class SAXMessageFormatter { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SymbolHash.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SymbolHash.java index 264f20a8ab3..d1b12de60c6 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SymbolHash.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/SymbolHash.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,6 +28,7 @@ package com.sun.org.apache.xerces.internal.util; * The hash code uses the same algorithm as SymbolTable class. * * @author Elena Litani + * @LastModified: Nov 2017 */ public class SymbolHash { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java index 13624da511c..f4218a8079d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -23,6 +22,8 @@ package com.sun.org.apache.xerces.internal.utils; /** * A configuration error. This was an internal class in ObjectFactory previously + * + * @LastModified: Oct 2017 */ public final class ConfigurationError extends Error { private static final long serialVersionUID = 8095902236393167968L; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java index 1aafcbed06f..406da3727b0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import jdk.xml.internal.SecuritySupport; * when bundled as part of the JDK. *

* + * @LastModified: Oct 2017 */ public final class ObjectFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/MultipleScopeNamespaceSupport.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/MultipleScopeNamespaceSupport.java index 78af2ffbf36..7b506b72fa6 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/MultipleScopeNamespaceSupport.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/MultipleScopeNamespaceSupport.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import java.util.Enumeration; * * @author Peter McCracken, IBM * + * @LastModified: Oct 2017 */ public class MultipleScopeNamespaceSupport extends NamespaceSupport { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java index 8d436cdcdf7..aaed561b2ad 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -128,6 +127,7 @@ import org.xml.sax.InputSource; * * * @see XIncludeNamespaceSupport + * @LastModified: Nov 2017 */ public class XIncludeHandler implements XMLComponent, XMLDocumentFilter, XMLDTDFilter { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeMessageFormatter.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeMessageFormatter.java index 48ab524c43d..c274c0cf7ba 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeMessageFormatter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeMessageFormatter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import jdk.xml.internal.SecuritySupport; * * @author Peter McCracken, IBM * + * @LastModified: Sep 2017 */ public class XIncludeMessageFormatter implements MessageFormatter { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeTextReader.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeTextReader.java index 3c4aaafcbe2..fbe146fa25e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeTextReader.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xinclude/XIncludeTextReader.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -63,6 +62,7 @@ import java.util.Map; * * * @see XIncludeHandler + * @LastModified: Oct 2017 */ public class XIncludeTextReader { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/Augmentations.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/Augmentations.java index 3a436462ed9..6c90fbe8fe9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/Augmentations.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/Augmentations.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -37,6 +36,7 @@ import java.util.Enumeration; * should not save any reference to the structure. * * @author Elena Litani, IBM + * @LastModified: Oct 2017 */ public interface Augmentations { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/NamespaceContext.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/NamespaceContext.java index d8462d2f158..efaadca35a4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/NamespaceContext.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xni/NamespaceContext.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import java.util.Enumeration; * * @author Andy Clark, IBM * + * @LastModified: Oct 2017 */ public interface NamespaceContext { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/XPointerMessageFormatter.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/XPointerMessageFormatter.java index 86a1ea3d4ff..ecefb14bc37 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/XPointerMessageFormatter.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xpointer/XPointerMessageFormatter.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import jdk.xml.internal.SecuritySupport; * * @xerces.internal * + * @LastModified: Sep 2017 */ final class XPointerMessageFormatter implements MessageFormatter { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/LSInputList.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/LSInputList.java index a2a80282419..bb32a038c69 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/LSInputList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/LSInputList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,8 @@ import org.w3c.dom.ls.LSInput; * The LSInputList interface provides the abstraction of an * ordered collection of LSInputs, without defining or * constraining how this collection is implemented. + * + * @LastModified: Oct 2017 */ public interface LSInputList extends List { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ShortList.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ShortList.java index 0a668148a07..881305ba5cb 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ShortList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/ShortList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -26,6 +25,8 @@ import java.util.List; /** * The ShortList is an immutable ordered collection of * unsigned short. + * + * @LastModified: Oct 2017 */ public interface ShortList extends List { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/StringList.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/StringList.java index 1d2a4c1d657..0ea889a73b0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/StringList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/StringList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -26,6 +25,8 @@ import java.util.List; /** * The StringList is an immutable ordered collection of * GenericString. + * + * @LastModified: Oct 2017 */ public interface StringList extends List { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamedMap.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamedMap.java index c0550935ca5..a4e72103c8b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamedMap.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamedMap.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,8 @@ import javax.xml.namespace.QName; * accessed by name. Note that XSNamedMap does not inherit from * XSObjectList. The XSObjects in * XSNamedMaps are not maintained in any particular order. + * + * @LastModified: Oct 2017 */ public interface XSNamedMap extends Map { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamespaceItemList.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamespaceItemList.java index 1e99d1680f2..7f927ef1c9c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamespaceItemList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSNamespaceItemList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,6 +26,8 @@ import java.util.List; * The XSNamesaceItemList interface provides the abstraction of * an immutable ordered collection of XSNamespaceItems, without * defining or constraining how this collection is implemented. + * + * @LastModified: Oct 2017 */ public interface XSNamespaceItemList extends List { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObjectList.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObjectList.java index a81a68421a1..68fee11831d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObjectList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/XSObjectList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -27,6 +26,8 @@ import java.util.List; * The XSObjectList interface provides the abstraction of an * immutable ordered collection of XSObjects, without defining * or constraining how this collection is implemented. + * + * @LastModified: Oct 2017 */ public interface XSObjectList extends List { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ByteList.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ByteList.java index e0acfd3d210..53246642c38 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ByteList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ByteList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import java.util.List; * * @author Ankit Pasricha, IBM * + * @LastModified: Oct 2017 */ public interface ByteList extends List { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java index 0a30036916b..3dcc532e19b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,6 +28,7 @@ import java.util.List; * * @author Ankit Pasricha, IBM * + * @LastModified: Oct 2017 */ public interface ObjectList extends List { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CustomStringPool.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CustomStringPool.java index 48742c90da5..4b6dc237d98 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CustomStringPool.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/CustomStringPool.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -45,6 +44,7 @@ import java.util.Map; *

* Status: In progress, under discussion. * + * @LastModified: Oct 2017 */ public class CustomStringPool extends DTMStringPool { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java index 1e3799cb0eb..f01a5fa5bc1 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,8 @@ import javax.xml.transform.Source; * The DTMDefaultBase class serves as a helper base for DTMs. * It sets up structures for navigation and type, while leaving data * management and construction to the derived classes. + * + * @LastModified: Oct 2017 */ public abstract class DTMDefaultBase implements DTM { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDocumentImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDocumentImpl.java index ea8fed859ef..a92eadbb395 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDocumentImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMDocumentImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -60,6 +59,8 @@ import org.xml.sax.ext.LexicalHandler; * *

Origin: the implemention is a composite logic based on the DTM of XalanJ1 and * DocImpl, DocumentImpl, ElementImpl, TextImpl, etc. of XalanJ2

+ * + * @LastModified: Oct 2017 */ public class DTMDocumentImpl implements DTM, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java index 4783c3549a1..17de72d23ec 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -71,7 +70,9 @@ import org.xml.sax.helpers.DefaultHandler; * activity (eg, when getDTM() is invoked). The downside of that solution * would be a greater delay before the DTM's storage is actually released * for reuse. - * */ + * + * @LastModified: Nov 2017 + */ public class DTMManagerDefault extends DTMManager { //static final boolean JKESS_XNI_EXPERIMENT=true; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeList.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeList.java index 3ce3eee2593..ed5e8ed886a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeList.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeList.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -53,7 +52,9 @@ import org.w3c.dom.Node; * * *

State: In progress!!

- * */ + * + * @LastModified: Nov 2017 + */ public class DTMNodeList extends DTMNodeListBase { private DTMIterator m_iter; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java index 8d5dd006d36..99139c6e382 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -61,6 +60,7 @@ import org.w3c.dom.UserDataHandler; * DTMNodeProxy may be subclassed further to present specific DOM node types. * * @see org.w3c.dom + * @LastModified: Nov 2017 */ public class DTMNodeProxy implements Node, Document, Text, Element, Attr, diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMStringPool.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMStringPool.java index 3ce354f1eb1..a83ee2ac88e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMStringPool.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/DTMStringPool.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -53,7 +52,9 @@ import java.util.List; * ObjectPool if one was needed.

* *

Status: Passed basic test in main().

- * */ + * + * @LastModified: Oct 2017 + */ public class DTMStringPool { List m_intToString; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java index ac945ac28c8..dfeeb20ed8c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,7 +39,9 @@ import org.xml.sax.XMLReader; *

Usage example: See main().

* *

Status: Passes simple main() unit-test. NEEDS JAVADOC.

- * */ + * + * @LastModified: Oct 2017 + */ public class IncrementalSAXSource_Xerces implements IncrementalSAXSource { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java index af5155d9c1c..b5d4d3aaa65 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -62,7 +61,9 @@ import org.xml.sax.ContentHandler; * Note too that we do not currently attempt to track document * mutation. If you alter the DOM after wrapping DOM2DTM around it, * all bets are off. - * */ + * + * @LastModified: Oct 2017 + */ public class DOM2DTM extends DTMDefaultBaseIterators { static final boolean JJK_DEBUG=false; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM.java index 80bc8aff845..dc31fc531f8 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -63,6 +62,8 @@ import org.xml.sax.ext.LexicalHandler; /** * This class implements a DTM that tends to be optimized more for speed than * for compactness, that is constructed via SAX2 ContentHandler events. + * + * @LastModified: Oct 2017 */ public class SAX2DTM extends DTMDefaultBaseIterators implements EntityResolver, DTDHandler, ContentHandler, ErrorHandler, diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java index 04dd3d2a68b..9df3a747fa2 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -62,6 +61,8 @@ import org.xml.sax.SAXException; *

* %MK% The code in this class is critical to the XSLTC_DTM performance. Be very careful * when making changes here! + * + * @LastModified: Oct 2017 */ public class SAX2DTM2 extends SAX2DTM { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2RTFDTM.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2RTFDTM.java index 232d5d666d5..4561ecbd358 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2RTFDTM.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2RTFDTM.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -58,7 +57,9 @@ import org.xml.sax.SAXException; * %REVIEW% In fact, since the differences are so minor, I think it * may be possible/practical to fold them back into the base * SAX2DTM. Consider that as a future code-size optimization. - * */ + * + * @LastModified: Oct 2017 + */ public class SAX2RTFDTM extends SAX2DTM { /** Set true to monitor SAX events and similar diagnostic info. */ diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLMessages.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLMessages.java index a2fddcdc8ba..6b4ef68f086 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLMessages.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/res/XMLMessages.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,7 @@ import jdk.xml.internal.SecuritySupport; /** * A utility class for issuing XML error messages. * @xsl.usage internal + * @LastModified: Sep 2017 */ public class XMLMessages { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java index 23392b9b32d..8c0cc63944c 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/BaseMarkupSerializer.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -129,6 +128,8 @@ import org.xml.sax.ext.LexicalHandler; * is replaced by that of Xalan. Main class * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. + * + * @LastModified: Nov 2017 */ @Deprecated public abstract class BaseMarkupSerializer diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java index 54913b2644e..b0c5d67939d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -75,6 +74,8 @@ import org.w3c.dom.ls.LSSerializerFilter; * * @deprecated As of JDK 9, Xerces 2.9.0, replaced by * {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl} + * + * @LastModified: Oct 2017 */ @Deprecated public class DOMSerializerImpl implements LSSerializer, DOMConfiguration { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Encodings.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Encodings.java index 2e240a58858..392c8535aae 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Encodings.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/Encodings.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,8 @@ import java.util.concurrent.ConcurrentHashMap; * is replaced by that of Xalan. Main class * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. + * + * @LastModified: Oct 2017 */ @Deprecated class Encodings diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java index 3baf4ca57b1..3d63273d07f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,8 @@ import jdk.xml.internal.SecuritySupport; * is replaced by that of Xalan. Main class * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. + * + * @LastModified: Oct 2017 */ @Deprecated public abstract class SerializerFactory diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java index ee3d3226dc2..31c526b2d92 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/XMLSerializer.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -92,6 +91,8 @@ import org.xml.sax.helpers.AttributesImpl; * is replaced by that of Xalan. Main class * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. + * + * @LastModified: Oct 2017 */ @Deprecated public class XMLSerializer diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/CharInfo.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/CharInfo.java index 59f80d21d8c..ba93113c880 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/CharInfo.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/CharInfo.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -48,6 +47,7 @@ import jdk.xml.internal.SecuritySupport; * DEVELOPERS: See Known Issue in the constructor. * * @xsl.usage internal + * @LastModified: Oct 2017 */ final class CharInfo { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java index e4b0703888d..5c4efce7f17 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/EmptySerializer.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -43,6 +42,7 @@ import org.xml.sax.SAXParseException; * across package boundaries. * * @xsl.usage internal + * @LastModified: Oct 2017 */ public class EmptySerializer implements SerializationHandler { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java index 34dafb6eb2f..79b46734202 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -49,6 +48,7 @@ import jdk.xml.internal.SecuritySupport; * for each encoding. * * @author Assaf Arkin + * @LastModified: Oct 2017 */ public final class Encodings extends Object diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java index a576e374da5..ebe76caed0f 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -61,6 +60,7 @@ import org.xml.sax.SAXException; * This class is public only because it is used by Xalan. It is not a public API * * @xsl.usage internal + * @LastModified: Nov 2017 */ public class NamespaceMappings { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java index e8e914d0778..b1af4542098 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/OutputPropertiesFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -80,6 +79,7 @@ import jdk.xml.internal.SecuritySupport; * @see SerializerFactory * @see Method * @see Serializer + * @LastModified: Oct 2017 */ public final class OutputPropertiesFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java index c488e030f4c..e6e436a9739 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -56,6 +55,7 @@ import org.xml.sax.ContentHandler; * @see OutputPropertiesFactory * @see Method * @see Serializer + * @LastModified: Oct 2017 */ public final class SerializerFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToSAXHandler.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToSAXHandler.java index 2ea819cded7..2db37d9c688 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToSAXHandler.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToSAXHandler.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import org.xml.sax.ext.LexicalHandler; * This class is not a public API. * * @xsl.usage internal + * @LastModified: Oct 2017 */ public abstract class ToSAXHandler extends SerializerBase { public ToSAXHandler() { } diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java index 18480091c20..57f977337c6 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -53,6 +52,7 @@ import org.xml.sax.SAXException; * serializers (xml, html, text ...) that write output to a stream. * * @xsl.usage internal + * @LastModified: Nov 2017 */ abstract public class ToStream extends SerializerBase { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java index b20acc0b0e7..ffcfa2c21fe 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToUnknownStream.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -49,6 +48,7 @@ import org.xml.sax.SAXException; * * This class is not a public API, it is public because it is used within Xalan. * @xsl.usage internal + * @LastModified: Oct 2017 */ public final class ToUnknownStream extends SerializerBase { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/XSLOutputAttributes.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/XSLOutputAttributes.java index 1e1b25de182..b01e43a6a0b 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/XSLOutputAttributes.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/XSLOutputAttributes.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -51,6 +50,7 @@ import java.util.List; * This interface is only used internally within Xalan. * * @xsl.usage internal + * @LastModified: Oct 2017 */ interface XSLOutputAttributes { /** diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java index 679db0e8fbf..a5453aac765 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -63,6 +62,7 @@ import org.xml.sax.helpers.LocatorImpl; * parameters and filters if any during serialization. * * @xsl.usage internal + * @LastModified: Oct 2017 */ final class DOM3TreeWalker { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java index cb5a00ae05e..55b8b6c7e56 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOMStringListImpl.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one @@ -31,6 +30,7 @@ import org.w3c.dom.DOMStringList; * This class implemets the DOM Level 3 Core interface DOMStringList. * * @xsl.usage internal + * @LastModified: Oct 2017 */ final class DOMStringListImpl implements DOMStringList { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java index 006d804ee07..12808d2622a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/NamespaceSupport.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one @@ -36,6 +35,7 @@ import java.util.NoSuchElementException; * @author Andy Clark, IBM * * @version $Id: Exp $ + * @LastModified: Oct 2017 */ public class NamespaceSupport { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/Messages.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/Messages.java index ccd0f447b6f..61fb1fca360 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/Messages.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/Messages.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -90,6 +89,7 @@ import jdk.xml.internal.SecuritySupport; * used in com.sun.org.apache.xml.internal.serializer. * * @xsl.usage internal + * @LastModified: Sep 2017 */ public final class Messages { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/URI.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/URI.java index 616e6abd36a..4bda294c366 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/URI.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/utils/URI.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -62,6 +61,7 @@ import java.util.Objects; * the class is no longer "public". * * @xsl.usage internal + * @LastModified: Oct 2017 */ final class URI { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMBuilder.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMBuilder.java index 7128911916c..95fcab4f2c0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMBuilder.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/DOMBuilder.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2006, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,6 +39,7 @@ import org.xml.sax.ext.LexicalHandler; * that SAX doesn't handle yet) and adds the result to a document * or document fragment. * @xsl.usage general + * @LastModified: Oct 2017 */ public class DOMBuilder implements ContentHandler, LexicalHandler diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java index 3125d5ac578..05944643e28 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/ObjectPool.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import java.util.List; /** * Pool of object of a given type to pick from to help memory usage * @xsl.usage internal + * @LastModified: Oct 2017 */ public class ObjectPool implements java.io.Serializable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/QName.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/QName.java index 80c997451b6..cf03b5aa322 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/QName.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/QName.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -39,6 +38,7 @@ import org.w3c.dom.Element; * is used as the name of the object. The default namespace is not used for * unprefixed names." * @xsl.usage general + * @LastModified: Oct 2017 */ public class QName implements java.io.Serializable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringComparable.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringComparable.java index 1c4ae090851..db6fe80824a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringComparable.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StringComparable.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import java.util.Locale; /** * International friendly string comparison with case-order * @author Igor Hersht, igorh@ca.ibm.com + * @LastModified: Oct 2017 */ public class StringComparable implements Comparable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StylesheetPIHandler.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StylesheetPIHandler.java index d0f8974f9fa..d92028cbeda 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StylesheetPIHandler.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/StylesheetPIHandler.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,8 @@ import org.xml.sax.helpers.DefaultHandler; * Search for the xml-stylesheet processing instructions in an XML document. * @see * Associating Style Sheets with XML documents, Version 1.0 + * + * @LastModified: Oct 2017 */ public class StylesheetPIHandler extends DefaultHandler { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/URI.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/URI.java index 111230f786d..91b50f29ec4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/URI.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/URI.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -58,6 +57,7 @@ import java.util.Objects; * grammar and basic set of operations that can be applied to a URI. * * + * @LastModified: Oct 2017 */ public class URI implements Serializable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java index 4f0d77236ef..e49a85087bf 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,8 @@ import org.xml.sax.helpers.XMLReaderFactory; /** * Creates XMLReader objects and caches them for re-use. * This class follows the singleton pattern. + * + * @LastModified: Sep 2017 */ @SuppressWarnings("deprecation") //org.xml.sax.helpers.XMLReaderFactory public class XMLReaderManager { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Expression.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Expression.java index 36751e91ad4..558f97b29be 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Expression.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/Expression.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -42,6 +41,8 @@ import org.xml.sax.ContentHandler; * construction has completed. An exception to the immutibility rule is iterators * and walkers, which must be cloned in order to be used -- the original must * still be immutable. + * + * @LastModified: Oct 2017 */ public abstract class Expression implements java.io.Serializable, ExpressionNode, XPathVisitable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExtensionsProvider.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExtensionsProvider.java index 9f5f7059f75..e20c80e30dc 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExtensionsProvider.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/ExtensionsProvider.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,6 +28,7 @@ import java.util.List; * Interface that XPath objects can call to obtain access to an * ExtensionsTable. * + * @LastModified: Oct 2017 */ public interface ExtensionsProvider { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSet.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSet.java index 0b2eaacdaeb..aa8eeb170d3 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSet.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/NodeSet.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -56,6 +55,7 @@ import org.w3c.dom.traversal.NodeIterator; * to the same calls; the disadvantage is that some of them may return * less-than-enlightening results when you do so.

* @xsl.usage advanced + * @LastModified: Nov 2017 */ public class NodeSet implements NodeList, NodeIterator, Cloneable, ContextNodeList diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java index 02bcddcfeeb..5376e338272 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/SourceTreeManager.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -39,6 +38,8 @@ import org.xml.sax.helpers.XMLReaderFactory; * This class bottlenecks all management of source trees. The methods * in this class should allow easy garbage collection of source * trees (not yet!), and should centralize parsing for those source trees. + * + * @LastModified: Oct 2017 */ @SuppressWarnings("deprecation") public class SourceTreeManager diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/VariableStack.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/VariableStack.java index f3838eb68fb..6cda51b8ab0 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/VariableStack.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/VariableStack.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; *

This has been changed from the previous incarnations of this * class to be fairly low level.

* @xsl.usage internal + * @LastModified: Nov 2017 */ public class VariableStack implements Cloneable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPath.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPath.java index c3f2d5688a4..8a2c5b813be 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPath.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPath.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -41,6 +40,7 @@ import javax.xml.transform.TransformerException; * The XPath class wraps an expression object and provides general services * for execution of that expression. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class XPath implements Serializable, ExpressionOwner { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java index a07c787d6c3..a39a1840629 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -57,6 +56,7 @@ import org.xml.sax.XMLReader; * *

This class extends DTMManager but does not directly implement it.

* @xsl.usage advanced + * @LastModified: Oct 2017 */ public class XPathContext extends DTMManager // implements ExpressionContext { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathException.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathException.java index cd849a31138..ed38487c1c1 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathException.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathException.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,7 @@ import org.w3c.dom.Node; * all the traces of the nested exceptions, not just the trace * of this object. * @xsl.usage general + * @LastModified: Oct 2017 */ public class XPathException extends TransformerException { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AxesWalker.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AxesWalker.java index 62f6302f8ed..55d39a5c759 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AxesWalker.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/AxesWalker.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,8 @@ import java.util.List; /** * Serves as common interface for axes Walkers, and stores common * state variables. + * + * @LastModified: Oct 2017 */ public class AxesWalker extends PredicatedNodeTest implements Cloneable, PathComponent, ExpressionOwner diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIterator.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIterator.java index 128240381fa..3dd65c029fb 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIterator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIterator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,6 +28,9 @@ import com.sun.org.apache.xpath.internal.XPathVisitor; import com.sun.org.apache.xpath.internal.objects.XNodeSet; import java.util.List; +/** + * @LastModified: Oct 2017 + */ public class FilterExprIterator extends BasicTestIterator { static final long serialVersionUID = 2552176105165737614L; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIteratorSimple.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIteratorSimple.java index e2047020d4a..6b57a7778ae 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIteratorSimple.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprIteratorSimple.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,8 @@ import java.util.List; /** * Class to use for one-step iteration that doesn't have a predicate, and * doesn't need to set the context. + * + * @LastModified: Oct 2017 */ public class FilterExprIteratorSimple extends LocPathIterator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java index 8c9eabcd20a..2f61f070216 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/FilterExprWalker.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import java.util.List; * Walker for the OP_VARIABLE, or OP_EXTFUNCTION, or OP_FUNCTION, or OP_GROUP, * op codes. * @see XPath FilterExpr descriptions + * @LastModified: Oct 2017 */ public class FilterExprWalker extends AxesWalker { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/IteratorPool.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/IteratorPool.java index 0458ef7e72f..c22ae764ad9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/IteratorPool.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/IteratorPool.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,6 +28,7 @@ import java.util.List; /** * Pool of object of a given type to pick from to help memory usage * @xsl.usage internal + * @LastModified: Oct 2017 */ public final class IteratorPool implements java.io.Serializable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java index 5485fb2ff23..835b43b5fa7 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -46,6 +45,7 @@ import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; * the case where the LocPathIterator is "owned" by a UnionPathIterator, * in which case the UnionPathIterator will cache the nodes.

* @xsl.usage advanced + * @LastModified: Nov 2017 */ public abstract class LocPathIterator extends PredicatedNodeTest implements Cloneable, DTMIterator, java.io.Serializable, PathComponent diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java index 881893c66c8..1eb8955de77 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -39,6 +38,8 @@ import com.sun.org.apache.xpath.internal.patterns.StepPattern; * traversal against the LocationPath interpreted as a match pattern. This * class is useful to find nodes in document order that are complex paths * whose steps probably criss-cross each other. + * + * @LastModified: Oct 2017 */ public class MatchPatternIterator extends LocPathIterator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/NodeSequence.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/NodeSequence.java index 77080ed6231..ee88a63d443 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/NodeSequence.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/NodeSequence.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,8 @@ import java.util.List; /** * This class is the dynamic wrapper for a Xalan DTMIterator instance, and * provides random access capabilities. + * + * @LastModified: Oct 2017 */ public class NodeSequence extends XObject implements DTMIterator, Cloneable, PathComponent diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java index a0cf90f3219..418ff527df8 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,9 @@ import com.sun.org.apache.xpath.internal.objects.XObject; import com.sun.org.apache.xpath.internal.patterns.NodeTest; import java.util.List; +/** + * @LastModified: Oct 2017 + */ public abstract class PredicatedNodeTest extends NodeTest implements SubContextList { static final long serialVersionUID = -6193530757296377351L; diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionChildIterator.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionChildIterator.java index c5a31d91705..4389c85d522 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionChildIterator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionChildIterator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,8 @@ import java.util.List; * This class defines a simplified type of union iterator that only * tests along the child axes. If the conditions are right, it is * much faster than using a UnionPathIterator. + * + * @LastModified: Oct 2017 */ public class UnionChildIterator extends ChildTestIterator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java index fb9caaaf67f..7e7276ef048 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -40,6 +39,7 @@ import java.util.List; * As each node is iterated via nextNode(), the node is also stored * in the NodeVector, so that previousNode() can easily be done. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class UnionPathIterator extends LocPathIterator implements Cloneable, DTMIterator, java.io.Serializable, PathComponent diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java index e02c19efff5..fe3756060b4 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -41,6 +40,8 @@ import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; * This class is both a factory for XPath location path expressions, * which are built from the opcode map output, and an analysis engine * for the location path expressions in order to provide optimization hints. + * + * @LastModified: Oct 2017 */ public class WalkerFactory { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java index 75f168a60b5..876f01cafd9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,8 @@ import java.util.List; /** * Location path iterator that uses Walkers. + * + * @LastModified: Oct 2017 */ public class WalkingIterator extends LocPathIterator implements ExpressionOwner diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIteratorSorted.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIteratorSorted.java index 52902ba64ab..e953c094ff2 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIteratorSorted.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/WalkingIteratorSorted.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import java.util.List; /** * This class iterates over set of nodes that needs to be sorted. * @xsl.usage internal + * @LastModified: Oct 2017 */ public class WalkingIteratorSorted extends WalkingIterator { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java index 8d62ef14f73..532d1cf6299 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /** * Licensed to the Apache Software Foundation (ASF) under one @@ -31,6 +30,8 @@ import javax.xml.transform.TransformerException; /** * The function table for XPath. + * + * @LastModified: Oct 2017 */ public class FunctionTable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java index 752c690413c..44422a81ef7 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/Lexer.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -28,6 +27,8 @@ import java.util.List; /** * This class is in charge of lexical processing of the XPath * expression into tokens. + * + * @LastModified: Nov 2017 */ class Lexer { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMap.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMap.java index 8b94e0ba255..d59cd8ef762 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMap.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/OpMap.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -29,6 +28,8 @@ import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; /** * This class represents the data structure basics of the XPath * object. + * + * @LastModified: Nov 2017 */ public class OpMap { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCurrent.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCurrent.java index 084465f9711..89229cbd1a8 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCurrent.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncCurrent.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import java.util.List; /** * Execute the current() function. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class FuncCurrent extends Function { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunction.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunction.java index fb10a52de13..8f41b8ce39e 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunction.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncExtFunction.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -41,6 +40,7 @@ import java.util.List; * the expression executes, it calls ExtensionsTable#extFunction, and then * converts the result to the appropriate XObject. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class FuncExtFunction extends Function { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFalse.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFalse.java index ad76e43d904..67de41af049 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFalse.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncFalse.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import java.util.List; /** * Execute the False() function. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class FuncFalse extends Function { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncHere.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncHere.java index 3e5f14c046d..04c4f35a9b9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncHere.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncHere.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /** * Licensed to the Apache Software Foundation (ASF) under one @@ -36,6 +35,8 @@ import org.w3c.dom.Node; /** * Execute the XML Signature here() function. + * + * @LastModified: Oct 2017 */ public final class FuncHere extends Function { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLast.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLast.java index 1d4117bea4c..59cc0505502 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLast.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncLast.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import java.util.List; /** * Execute the Last() function. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class FuncLast extends Function { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncPosition.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncPosition.java index 16dfbf39704..08b5225c5a9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncPosition.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncPosition.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -34,6 +33,7 @@ import java.util.List; /** * Execute the Position() function. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class FuncPosition extends Function { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java index 0abf80152a4..bad9cf1a311 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Sep 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import jdk.xml.internal.SecuritySupport; /** * Execute the SystemProperty() function. * @xsl.usage advanced + * @LastModified: Sep 2017 */ public class FuncSystemProperty extends FunctionOneArg { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTrue.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTrue.java index 14541721ea3..4f53ff5d49a 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTrue.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FuncTrue.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,7 @@ import java.util.List; /** * Execute the True() function. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class FuncTrue extends Function { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function2Args.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function2Args.java index d3ee6172bff..10dd3fde486 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function2Args.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function2Args.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * Base class for functions that accept two arguments. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class Function2Args extends FunctionOneArg { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function3Args.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function3Args.java index 0d8d315a261..e7d0907a41d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function3Args.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/Function3Args.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * Base class for functions that accept three arguments. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class Function3Args extends Function2Args { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionMultiArgs.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionMultiArgs.java index dc54de06593..f2c20f06f58 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionMultiArgs.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionMultiArgs.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import java.util.List; * Base class for functions that accept an undetermined number of multiple * arguments. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class FunctionMultiArgs extends Function3Args { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionOneArg.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionOneArg.java index ac7c57ad83d..3ecb2628862 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionOneArg.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/functions/FunctionOneArg.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,7 @@ import java.util.List; /** * Base class for functions that accept one argument. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class FunctionOneArg extends Function implements ExpressionOwner { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPExtensionsProvider.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPExtensionsProvider.java index 95797bef33d..3a0467496dd 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPExtensionsProvider.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/JAXPExtensionsProvider.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Nov 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import jdk.xml.internal.JdkXmlFeatures; /** * * @author Ramesh Mandava ( ramesh.mandava@sun.com ) + * @LastModified: Nov 2017 */ public class JAXPExtensionsProvider implements ExtensionsProvider { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSet.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSet.java index d1eafd00c6c..ef5497870e9 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSet.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSet.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -36,6 +35,7 @@ import org.w3c.dom.traversal.NodeIterator; * This class represents an XPath nodeset object, and is capable of * converting the nodeset to other types, such as a string. * @xsl.usage general + * @LastModified: Oct 2017 */ public class XNodeSet extends NodeSequence { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java index 2f8be135d85..1106ebdea4d 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XObject.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -45,6 +44,7 @@ import org.w3c.dom.traversal.NodeIterator; * This class acts as the base class to other XPath type objects, * such as XString, and provides polymorphic casting capabilities. * @xsl.usage general + * @LastModified: Oct 2017 */ public class XObject extends Expression implements Serializable, Cloneable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFragSelectWrapper.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFragSelectWrapper.java index 17adeb33700..4fba2103280 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFragSelectWrapper.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XRTreeFragSelectWrapper.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -32,6 +31,8 @@ import java.util.List; /** * This class makes an select statement act like an result tree fragment. + * + * @LastModified: Oct 2017 */ public class XRTreeFragSelectWrapper extends XRTreeFrag implements Cloneable { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Operation.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Operation.java index 85d0e5d97c0..7218a8ac188 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Operation.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Operation.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,8 @@ import java.util.List; /** * The baseclass for a binary operation. + * + * @LastModified: Oct 2017 */ public class Operation extends Expression implements ExpressionOwner { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/UnaryOperation.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/UnaryOperation.java index fc46d916b54..57aaa9abc68 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/UnaryOperation.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/UnaryOperation.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -31,6 +30,8 @@ import java.util.List; /** * The unary operation base class. + * + * @LastModified: Oct 2017 */ public abstract class UnaryOperation extends Expression implements ExpressionOwner { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Variable.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Variable.java index f1909919074..4aa7ff09264 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Variable.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/operations/Variable.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,8 @@ import javax.xml.transform.TransformerException; /** * The variable reference expression executer. + * + * @LastModified: Oct 2017 */ public class Variable extends Expression implements PathComponent { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/ContextMatchStepPattern.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/ContextMatchStepPattern.java index 7a4ceb41778..75b926de929 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/ContextMatchStepPattern.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/ContextMatchStepPattern.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -30,6 +29,8 @@ import com.sun.org.apache.xpath.internal.axes.WalkerFactory; import com.sun.org.apache.xpath.internal.objects.XObject; /** * Special context node pattern matcher. + * + * @LastModified: Oct 2017 */ public class ContextMatchStepPattern extends StepPattern { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/FunctionPattern.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/FunctionPattern.java index 375dca168b1..841a10fb276 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/FunctionPattern.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/FunctionPattern.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -35,6 +34,7 @@ import java.util.List; /** * Match pattern step that contains a function. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class FunctionPattern extends StepPattern { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTest.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTest.java index 498df9e0b89..be993d27944 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTest.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/NodeTest.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import java.util.List; * This is the basic node test class for both match patterns and location path * steps. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class NodeTest extends Expression { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/StepPattern.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/StepPattern.java index 7f6bd66f86c..2795ca4d083 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/StepPattern.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/StepPattern.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -38,6 +37,7 @@ import java.util.List; /** * This class represents a single pattern match step. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class StepPattern extends NodeTest implements SubContextList, ExpressionOwner { diff --git a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/UnionPattern.java b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/UnionPattern.java index 516cb40442e..1d3e45782a6 100644 --- a/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/UnionPattern.java +++ b/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/patterns/UnionPattern.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * @LastModified: Oct 2017 */ /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,6 +32,7 @@ import java.util.List; * This class represents a union pattern, which can have multiple individual * StepPattern patterns. * @xsl.usage advanced + * @LastModified: Oct 2017 */ public class UnionPattern extends Expression { From e6680338c51a7269437f2676aed106a76b84a294 Mon Sep 17 00:00:00 2001 From: Paul Sandoz Date: Wed, 20 Dec 2017 11:40:45 -0800 Subject: [PATCH 47/88] 8193856: takeWhile produces incorrect result with elements produced by flatMap Reviewed-by: smarks --- .../classes/java/util/stream/WhileOps.java | 10 +++--- .../tests/java/util/stream/WhileOpTest.java | 33 +++++++++++++++++-- 2 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/java.base/share/classes/java/util/stream/WhileOps.java b/src/java.base/share/classes/java/util/stream/WhileOps.java index 1288333df01..0bd23347dec 100644 --- a/src/java.base/share/classes/java/util/stream/WhileOps.java +++ b/src/java.base/share/classes/java/util/stream/WhileOps.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -95,7 +95,7 @@ final class WhileOps { @Override public void accept(T t) { - if (take = predicate.test(t)) { + if (take && (take = predicate.test(t))) { downstream.accept(t); } } @@ -152,7 +152,7 @@ final class WhileOps { @Override public void accept(int t) { - if (take = predicate.test(t)) { + if (take && (take = predicate.test(t))) { downstream.accept(t); } } @@ -209,7 +209,7 @@ final class WhileOps { @Override public void accept(long t) { - if (take = predicate.test(t)) { + if (take && (take = predicate.test(t))) { downstream.accept(t); } } @@ -266,7 +266,7 @@ final class WhileOps { @Override public void accept(double t) { - if (take = predicate.test(t)) { + if (take && (take = predicate.test(t))) { downstream.accept(t); } } diff --git a/test/jdk/java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpTest.java b/test/jdk/java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpTest.java index 5b023b87e79..49f9cb80960 100644 --- a/test/jdk/java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpTest.java +++ b/test/jdk/java/util/stream/test/org/openjdk/tests/java/util/stream/WhileOpTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, 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 @@ -46,7 +46,7 @@ import java.util.stream.TestData; /* * @test - * @bug 8071597 + * @bug 8071597 8193856 */ @Test public class WhileOpTest extends OpTestCase { @@ -361,4 +361,33 @@ public class WhileOpTest extends OpTestCase { } assertTrue(isClosed.get()); } + + @Test(groups = { "serialization-hostile" }) + public void testFlatMapThenTake() { + TestData.OfRef range = TestData.Factory.ofSupplier( + "range", () -> IntStream.range(0, 100).boxed()); + + exerciseOpsMulti(range, + // Reference result + s -> s.takeWhile(e -> e != 50), + // For other results collect into array, + // stream the single array (not the elements), + // then flat map to stream the array elements + s -> Stream.of(s.toArray(Integer[]::new)). + flatMap(Stream::of). + takeWhile(e -> e != 50), + s -> Stream.of(s.mapToInt(e -> e).toArray()). + flatMapToInt(IntStream::of). + takeWhile(e -> e != 50). + mapToObj(e -> e), + s -> Stream.of(s.mapToLong(e -> e).toArray()). + flatMapToLong(LongStream::of). + takeWhile(e -> e != 50L). + mapToObj(e -> (int) e), + s -> Stream.of(s.mapToDouble(e -> e).toArray()). + flatMapToDouble(DoubleStream::of). + takeWhile(e -> e != 50.0). + mapToObj(e -> (int) e) + ); + } } From 59c3bea9f1c8f13fe0c587d4e25fbc0033fd9ac0 Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Wed, 20 Dec 2017 17:36:50 +0100 Subject: [PATCH 48/88] 8193371: Use Dynalink REMOVE operation in Nashorn Reviewed-by: hannesw, sundar --- .../dynalink/beans/AbstractJavaLinker.java | 27 +-- .../jdk/dynalink/beans/BeanLinker.java | 25 +- .../internal/codegen/AssignSymbols.java | 64 +----- .../internal/codegen/CodeGenerator.java | 54 +++++ .../codegen/LocalVariableTypesCalculator.java | 19 +- .../internal/codegen/MethodEmitter.java | 66 +++++- .../jdk/nashorn/internal/ir/RuntimeNode.java | 6 - .../internal/runtime/ScriptObject.java | 12 + .../internal/runtime/ScriptRuntime.java | 87 ++----- .../nashorn/internal/runtime/Undefined.java | 15 ++ .../runtime/linker/JSObjectLinker.java | 26 ++- .../runtime/linker/NashornBottomLinker.java | 42 +++- .../linker/NashornCallSiteDescriptor.java | 47 ++-- test/nashorn/script/basic/JDK-8193371.js | 215 ++++++++++++++++++ .../script/basic/JDK-8193371.js.EXPECTED | 6 + 15 files changed, 523 insertions(+), 188 deletions(-) create mode 100644 test/nashorn/script/basic/JDK-8193371.js create mode 100644 test/nashorn/script/basic/JDK-8193371.js.EXPECTED diff --git a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AbstractJavaLinker.java b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AbstractJavaLinker.java index f648a81f0ca..bc5c0645588 100644 --- a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AbstractJavaLinker.java +++ b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AbstractJavaLinker.java @@ -414,20 +414,21 @@ abstract class AbstractJavaLinker implements GuardingDynamicLinker { protected GuardedInvocationComponent getGuardedInvocationComponent(final ComponentLinkRequest req) throws Exception { - if (!req.namespaces.isEmpty()) { - final Namespace ns = req.namespaces.get(0); - final Operation op = req.baseOperation; - if (op == StandardOperation.GET) { - if (ns == StandardNamespace.PROPERTY) { - return getPropertyGetter(req.popNamespace()); - } else if (ns == StandardNamespace.METHOD) { - return getMethodGetter(req.popNamespace()); - } - } else if (op == StandardOperation.SET && ns == StandardNamespace.PROPERTY) { - return getPropertySetter(req.popNamespace()); - } + if (req.namespaces.isEmpty()) { + return null; } - return null; + final Namespace ns = req.namespaces.get(0); + final Operation op = req.baseOperation; + if (op == StandardOperation.GET) { + if (ns == StandardNamespace.PROPERTY) { + return getPropertyGetter(req.popNamespace()); + } else if (ns == StandardNamespace.METHOD) { + return getMethodGetter(req.popNamespace()); + } + } else if (op == StandardOperation.SET && ns == StandardNamespace.PROPERTY) { + return getPropertySetter(req.popNamespace()); + } + return getNextComponent(req.popNamespace()); } GuardedInvocationComponent getNextComponent(final ComponentLinkRequest req) throws Exception { diff --git a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/BeanLinker.java b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/BeanLinker.java index cff9cc12df6..d46bd105b67 100644 --- a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/BeanLinker.java +++ b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/BeanLinker.java @@ -136,24 +136,21 @@ class BeanLinker extends AbstractJavaLinker implements TypeBasedGuardingDynamicL @Override protected GuardedInvocationComponent getGuardedInvocationComponent(final ComponentLinkRequest req) throws Exception { - final GuardedInvocationComponent superGic = super.getGuardedInvocationComponent(req); - if(superGic != null) { - return superGic; + if (req.namespaces.isEmpty()) { + return null; } - if (!req.namespaces.isEmpty()) { + final Namespace ns = req.namespaces.get(0); + if (ns == StandardNamespace.ELEMENT) { final Operation op = req.baseOperation; - final Namespace ns = req.namespaces.get(0); - if (ns == StandardNamespace.ELEMENT) { - if (op == StandardOperation.GET) { - return getElementGetter(req.popNamespace()); - } else if (op == StandardOperation.SET) { - return getElementSetter(req.popNamespace()); - } else if (op == StandardOperation.REMOVE) { - return getElementRemover(req.popNamespace()); - } + if (op == StandardOperation.GET) { + return getElementGetter(req.popNamespace()); + } else if (op == StandardOperation.SET) { + return getElementSetter(req.popNamespace()); + } else if (op == StandardOperation.REMOVE) { + return getElementRemover(req.popNamespace()); } } - return null; + return super.getGuardedInvocationComponent(req); } @Override diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java index 7d37330dd88..f01c7f9c259 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/AssignSymbols.java @@ -59,6 +59,7 @@ import java.util.ListIterator; import java.util.Map; import java.util.Set; import jdk.nashorn.internal.ir.AccessNode; +import jdk.nashorn.internal.ir.BaseNode; import jdk.nashorn.internal.ir.BinaryNode; import jdk.nashorn.internal.ir.Block; import jdk.nashorn.internal.ir.CatchNode; @@ -735,72 +736,13 @@ final class AssignSymbols extends SimpleNodeVisitor implements Loggable { @Override public Node leaveUnaryNode(final UnaryNode unaryNode) { - switch (unaryNode.tokenType()) { - case DELETE: - return leaveDELETE(unaryNode); - case TYPEOF: + if (unaryNode.tokenType() == TokenType.TYPEOF) { return leaveTYPEOF(unaryNode); - default: + } else { return super.leaveUnaryNode(unaryNode); } } - private Node leaveDELETE(final UnaryNode unaryNode) { - final FunctionNode currentFunctionNode = lc.getCurrentFunction(); - final boolean strictMode = currentFunctionNode.isStrict(); - final Expression rhs = unaryNode.getExpression(); - final Expression strictFlagNode = (Expression)LiteralNode.newInstance(unaryNode, strictMode).accept(this); - - Request request = Request.DELETE; - final List args = new ArrayList<>(); - - if (rhs instanceof IdentNode) { - final IdentNode ident = (IdentNode)rhs; - // If this is a declared variable or a function parameter, delete always fails (except for globals). - final String name = ident.getName(); - final Symbol symbol = ident.getSymbol(); - - if (symbol.isThis()) { - // Can't delete "this", ignore and return true - return LiteralNode.newInstance(unaryNode, true); - } - final Expression literalNode = LiteralNode.newInstance(unaryNode, name); - final boolean failDelete = strictMode || (!symbol.isScope() && (symbol.isParam() || (symbol.isVar() && !symbol.isProgramLevel()))); - - if (!failDelete) { - args.add(compilerConstantIdentifier(SCOPE)); - } - args.add(literalNode); - args.add(strictFlagNode); - - if (failDelete) { - request = Request.FAIL_DELETE; - } else if ((symbol.isGlobal() && !symbol.isFunctionDeclaration()) || symbol.isProgramLevel()) { - request = Request.SLOW_DELETE; - } - } else if (rhs instanceof AccessNode) { - final Expression base = ((AccessNode)rhs).getBase(); - final String property = ((AccessNode)rhs).getProperty(); - - args.add(base); - args.add(LiteralNode.newInstance(unaryNode, property)); - args.add(strictFlagNode); - - } else if (rhs instanceof IndexNode) { - final IndexNode indexNode = (IndexNode)rhs; - final Expression base = indexNode.getBase(); - final Expression index = indexNode.getIndex(); - - args.add(base); - args.add(index); - args.add(strictFlagNode); - - } else { - throw new AssertionError("Unexpected delete with " + rhs.getClass().getName() + " expression"); - } - return new RuntimeNode(unaryNode, request, args); - } - @Override public Node leaveForNode(final ForNode forNode) { if (forNode.isForInOrOf()) { diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java index 2d86f1ef0b0..7ea6d5b15b8 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CodeGenerator.java @@ -151,6 +151,7 @@ import jdk.nashorn.internal.runtime.Undefined; import jdk.nashorn.internal.runtime.UnwarrantedOptimismException; import jdk.nashorn.internal.runtime.arrays.ArrayData; import jdk.nashorn.internal.runtime.linker.LinkerCallSite; +import jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor; import jdk.nashorn.internal.runtime.logging.DebugLogger; import jdk.nashorn.internal.runtime.logging.Loggable; import jdk.nashorn.internal.runtime.logging.Logger; @@ -1141,6 +1142,12 @@ final class CodeGenerator extends NodeOperatorVisitor LARGE_STRING_THRESHOLD) { // use removeIndex for extremely long names + return load(name).dynamicRemoveIndex(flags); + } + + debug("dynamic_remove", name, Type.BOOLEAN, getProgramPoint(flags)); + + popType(Type.OBJECT); + // Type is widened to OBJECT then coerced back to BOOLEAN + method.visitInvokeDynamicInsn(NameCodec.encode(name), + Type.getMethodDescriptor(Type.OBJECT, Type.OBJECT), LINKERBOOTSTRAP, flags | dynRemoveOperation(isIndex)); + + pushType(Type.OBJECT); + convert(Type.BOOLEAN); //most probably a nop + + return this; + } + + /** * Dynamic getter for indexed structures. Pop index and receiver from stack, * generate appropriate signatures based on types * @@ -2341,6 +2366,35 @@ public class MethodEmitter { LINKERBOOTSTRAP, flags | NashornCallSiteDescriptor.SET_ELEMENT); } + /** + * Dynamic remover for indexed structures. Pop index and receiver from stack, + * generate appropriate signatures based on types + * + * @param flags call site flags for getter + * + * @return the method emitter + */ + MethodEmitter dynamicRemoveIndex(final int flags) { + debug("dynamic_remove_index", peekType(1), "[", peekType(), "]", getProgramPoint(flags)); + + Type index = peekType(); + if (index.isObject() || index.isBoolean()) { + index = Type.OBJECT; //e.g. string->object + convert(Type.OBJECT); + } + popType(); + + popType(Type.OBJECT); + + final String signature = Type.getMethodDescriptor(Type.OBJECT, Type.OBJECT /*e.g STRING->OBJECT*/, index); + + method.visitInvokeDynamicInsn(EMPTY_NAME, signature, LINKERBOOTSTRAP, flags | dynRemoveOperation(true)); + pushType(Type.OBJECT); + convert(Type.BOOLEAN); + + return this; + } + /** * Load a key value in the proper form. * @@ -2520,6 +2574,10 @@ public class MethodEmitter { return isIndex ? NashornCallSiteDescriptor.SET_ELEMENT : NashornCallSiteDescriptor.SET_PROPERTY; } + private static int dynRemoveOperation(final boolean isIndex) { + return isIndex ? NashornCallSiteDescriptor.REMOVE_ELEMENT : NashornCallSiteDescriptor.REMOVE_PROPERTY; + } + private Type emitLocalVariableConversion(final LocalVariableConversion conversion, final boolean onlySymbolLiveValue) { final Type from = conversion.getFrom(); final Type to = conversion.getTo(); diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/RuntimeNode.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/RuntimeNode.java index 76a9253ce30..afc52bf3f9a 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/RuntimeNode.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/ir/RuntimeNode.java @@ -54,12 +54,6 @@ public class RuntimeNode extends Expression { TYPEOF, /** Reference error type */ REFERENCE_ERROR, - /** Delete operator */ - DELETE(TokenType.DELETE, Type.BOOLEAN, 1), - /** Delete operator for slow scopes */ - SLOW_DELETE(TokenType.DELETE, Type.BOOLEAN, 1, false), - /** Delete operator that always fails -- see Lower */ - FAIL_DELETE(TokenType.DELETE, Type.BOOLEAN, 1, false), /** === operator with at least one object */ EQ_STRICT(TokenType.EQ_STRICT, Type.BOOLEAN, 2, true), /** == operator with at least one object */ diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java index 40b8c67d9a6..3431a4ff8f8 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptObject.java @@ -189,6 +189,8 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { /** Method handle for generic property setter */ public static final Call GENERIC_SET = virtualCallNoLookup(ScriptObject.class, "set", void.class, Object.class, Object.class, int.class); + public static final Call DELETE = virtualCall(MethodHandles.lookup(), ScriptObject.class, "delete", boolean.class, Object.class, boolean.class); + static final MethodHandle[] SET_SLOW = new MethodHandle[] { findOwnMH_V("set", void.class, Object.class, int.class, int.class), findOwnMH_V("set", void.class, Object.class, double.class, int.class), @@ -202,6 +204,9 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { static final MethodHandle EXTENSION_CHECK = findOwnMH_V("extensionCheck", boolean.class, boolean.class, String.class); static final MethodHandle ENSURE_SPILL_SIZE = findOwnMH_V("ensureSpillSize", Object.class, int.class); + private static final GuardedInvocation DELETE_GUARDED = new GuardedInvocation(MH.insertArguments(DELETE.methodHandle(), 2, false), NashornGuards.getScriptObjectGuard()); + private static final GuardedInvocation DELETE_GUARDED_STRICT = new GuardedInvocation(MH.insertArguments(DELETE.methodHandle(), 2, true), NashornGuards.getScriptObjectGuard()); + /** * Constructor */ @@ -1869,6 +1874,13 @@ public abstract class ScriptObject implements PropertyAccess, Cloneable { return desc.getOperation() instanceof NamedOperation ? findSetMethod(desc, request) : findSetIndexMethod(desc, request); + case REMOVE: + final GuardedInvocation inv = NashornCallSiteDescriptor.isStrict(desc) ? DELETE_GUARDED_STRICT : DELETE_GUARDED; + final Object name = NamedOperation.getName(desc.getOperation()); + if (name != null) { + return inv.replaceMethods(MH.insertArguments(inv.getInvocation(), 1, name), inv.getGuard()); + } + return inv; case CALL: return findCallMethod(desc, request); case NEW: diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java index 8a914ddfd03..d82e03bb92e 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptRuntime.java @@ -135,6 +135,16 @@ public final class ScriptRuntime { */ public static final Call INVALIDATE_RESERVED_BUILTIN_NAME = staticCallNoLookup(ScriptRuntime.class, "invalidateReservedBuiltinName", void.class, String.class); + /** + * Used to perform failed delete under strict mode + */ + public static final Call STRICT_FAIL_DELETE = staticCallNoLookup(ScriptRuntime.class, "strictFailDelete", boolean.class, String.class); + + /** + * Used to find the scope for slow delete + */ + public static final Call SLOW_DELETE = staticCallNoLookup(ScriptRuntime.class, "slowDelete", boolean.class, ScriptObject.class, String.class); + /** * Converts a switch tag value to a simple integer. deflt value if it can't. * @@ -779,88 +789,41 @@ public final class ScriptRuntime { throw referenceError("cant.be.used.as.lhs", Objects.toString(msg)); } - /** - * ECMA 11.4.1 - delete operation, generic implementation - * - * @param obj object with property to delete - * @param property property to delete - * @param strict are we in strict mode - * - * @return true if property was successfully found and deleted - */ - public static boolean DELETE(final Object obj, final Object property, final Object strict) { - if (obj instanceof ScriptObject) { - return ((ScriptObject)obj).delete(property, Boolean.TRUE.equals(strict)); - } - - if (obj instanceof Undefined) { - return ((Undefined)obj).delete(property, false); - } - - if (obj == null) { - throw typeError("cant.delete.property", safeToString(property), "null"); - } - - if (obj instanceof ScriptObjectMirror) { - return ((ScriptObjectMirror)obj).delete(property); - } - - if (JSType.isPrimitive(obj)) { - return ((ScriptObject) JSType.toScriptObject(obj)).delete(property, Boolean.TRUE.equals(strict)); - } - - if (obj instanceof JSObject) { - ((JSObject)obj).removeMember(Objects.toString(property)); - return true; - } - - // if object is not reference type, vacuously delete is successful. - return true; - } - /** * ECMA 11.4.1 - delete operator, implementation for slow scopes * * This implementation of 'delete' walks the scope chain to find the scope that contains the - * property to be deleted, then invokes delete on it. + * property to be deleted, then invokes delete on it. Always used on scopes, never strict. * * @param obj top scope object * @param property property to delete - * @param strict are we in strict mode * * @return true if property was successfully found and deleted */ - public static boolean SLOW_DELETE(final Object obj, final Object property, final Object strict) { - if (obj instanceof ScriptObject) { - ScriptObject sobj = (ScriptObject) obj; - final String key = property.toString(); - while (sobj != null && sobj.isScope()) { - final FindProperty find = sobj.findProperty(key, false); - if (find != null) { - return sobj.delete(key, Boolean.TRUE.equals(strict)); - } - sobj = sobj.getProto(); + public static boolean slowDelete(final ScriptObject obj, final String property) { + ScriptObject sobj = obj; + while (sobj != null && sobj.isScope()) { + final FindProperty find = sobj.findProperty(property, false); + if (find != null) { + return sobj.delete(property, false); } + sobj = sobj.getProto(); } - return DELETE(obj, property, strict); + return obj.delete(property, false); } /** * ECMA 11.4.1 - delete operator, special case * - * This is 'delete' that always fails. We have to check strict mode and throw error. - * That is why this is a runtime function. Or else we could have inlined 'false'. + * This is 'delete' on a scope; it always fails under strict mode. + * It always throws an exception, but is declared to return a boolean + * to be compatible with the delete operator type. * * @param property property to delete - * @param strict are we in strict mode - * - * @return false always + * @return nothing, always throws an exception. */ - public static boolean FAIL_DELETE(final Object property, final Object strict) { - if (Boolean.TRUE.equals(strict)) { - throw syntaxError("strict.cant.delete", safeToString(property)); - } - return false; + public static boolean strictFailDelete(final String property) { + throw syntaxError("strict.cant.delete", property); } /** diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Undefined.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Undefined.java index 48a9f9251b4..5cb460d76f1 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Undefined.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/Undefined.java @@ -112,6 +112,11 @@ public final class Undefined extends DefaultPropertyAccess { return findSetIndexMethod(desc); } return findSetMethod(desc); + case REMOVE: + if (!(desc.getOperation() instanceof NamedOperation)) { + return findDeleteIndexMethod(desc); + } + return findDeleteMethod(desc); default: } return null; @@ -124,6 +129,7 @@ public final class Undefined extends DefaultPropertyAccess { private static final MethodHandle GET_METHOD = findOwnMH("get", Object.class, Object.class); private static final MethodHandle SET_METHOD = MH.insertArguments(findOwnMH("set", void.class, Object.class, Object.class, int.class), 3, NashornCallSiteDescriptor.CALLSITE_STRICT); + private static final MethodHandle DELETE_METHOD = MH.insertArguments(findOwnMH("delete", boolean.class, Object.class, boolean.class), 2, false); private static GuardedInvocation findGetMethod(final CallSiteDescriptor desc) { return new GuardedInvocation(MH.insertArguments(GET_METHOD, 1, NashornCallSiteDescriptor.getOperand(desc)), UNDEFINED_GUARD).asType(desc); @@ -141,6 +147,15 @@ public final class Undefined extends DefaultPropertyAccess { return new GuardedInvocation(SET_METHOD, UNDEFINED_GUARD).asType(desc); } + private static GuardedInvocation findDeleteMethod(final CallSiteDescriptor desc) { + return new GuardedInvocation(MH.insertArguments(DELETE_METHOD, 1, NashornCallSiteDescriptor.getOperand(desc)), UNDEFINED_GUARD).asType(desc); + } + + private static GuardedInvocation findDeleteIndexMethod(final CallSiteDescriptor desc) { + return new GuardedInvocation(DELETE_METHOD, UNDEFINED_GUARD).asType(desc); + } + + @Override public Object get(final Object key) { throw typeError("cant.read.property.of.undefined", ScriptRuntime.safeToString(key)); diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java index 1200ebba363..eeb6edd3dd9 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/JSObjectLinker.java @@ -31,7 +31,7 @@ import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.util.Map; -import javax.script.Bindings; +import java.util.Objects; import jdk.dynalink.CallSiteDescriptor; import jdk.dynalink.Operation; import jdk.dynalink.StandardOperation; @@ -64,11 +64,10 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { return canLinkTypeStatic(type); } - static boolean canLinkTypeStatic(final Class type) { - // can link JSObject also handles Map, Bindings to make + private static boolean canLinkTypeStatic(final Class type) { + // can link JSObject also handles Map (this includes Bindings) to make // sure those are not JSObjects. return Map.class.isAssignableFrom(type) || - Bindings.class.isAssignableFrom(type) || JSObject.class.isAssignableFrom(type); } @@ -84,7 +83,7 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { if (self instanceof JSObject) { inv = lookup(desc, request, linkerServices); inv = inv.replaceMethods(linkerServices.filterInternalObjects(inv.getInvocation()), inv.getGuard()); - } else if (self instanceof Map || self instanceof Bindings) { + } else if (self instanceof Map) { // guard to make sure the Map or Bindings does not turn into JSObject later! final GuardedInvocation beanInv = nashornBeansLinker.getGuardedInvocation(request, linkerServices); inv = new GuardedInvocation(beanInv.getInvocation(), @@ -116,6 +115,13 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { return name != null ? findSetMethod(name) : findSetIndexMethod(); } break; + case REMOVE: + if (NashornCallSiteDescriptor.hasStandardNamespace(desc)) { + return new GuardedInvocation( + name == null ? JSOBJECTLINKER_DEL : MH.insertArguments(JSOBJECTLINKER_DEL, 1, name), + IS_JSOBJECT_GUARD); + } + break; case CALL: return findCallMethod(desc); case NEW: @@ -206,6 +212,15 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { } } + @SuppressWarnings("unused") + private static boolean del(final Object jsobj, final Object key) { + if (jsobj instanceof ScriptObjectMirror) { + return ((ScriptObjectMirror)jsobj).delete(key); + } + ((JSObject) jsobj).removeMember(Objects.toString(key)); + return true; + } + private static int getIndex(final Number n) { final double value = n.doubleValue(); return JSType.isRepresentableAsInt(value) ? (int)value : -1; @@ -245,6 +260,7 @@ final class JSObjectLinker implements TypeBasedGuardingDynamicLinker { private static final MethodHandle IS_JSOBJECT_GUARD = findOwnMH_S("isJSObject", boolean.class, Object.class); private static final MethodHandle JSOBJECTLINKER_GET = findOwnMH_S("get", Object.class, MethodHandle.class, Object.class, Object.class); private static final MethodHandle JSOBJECTLINKER_PUT = findOwnMH_S("put", Void.TYPE, Object.class, Object.class, Object.class); + private static final MethodHandle JSOBJECTLINKER_DEL = findOwnMH_S("del", boolean.class, Object.class, Object.class); // method handles of JSObject class private static final MethodHandle JSOBJECT_GETMEMBER = findJSObjectMH_V("getMember", Object.class, String.class); diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java index bd4ab24fe27..481919317ad 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java @@ -39,11 +39,13 @@ import jdk.dynalink.CallSiteDescriptor; import jdk.dynalink.NamedOperation; import jdk.dynalink.Operation; import jdk.dynalink.beans.BeansLinker; +import jdk.dynalink.beans.StaticClass; import jdk.dynalink.linker.GuardedInvocation; import jdk.dynalink.linker.GuardingDynamicLinker; import jdk.dynalink.linker.GuardingTypeConverterFactory; import jdk.dynalink.linker.LinkRequest; import jdk.dynalink.linker.LinkerServices; +import jdk.dynalink.linker.support.Guards; import jdk.dynalink.linker.support.Lookup; import jdk.nashorn.internal.codegen.types.Type; import jdk.nashorn.internal.runtime.ECMAException; @@ -86,12 +88,16 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo MH.dropArguments(EMPTY_PROP_SETTER, 0, Object.class); private static final MethodHandle THROW_STRICT_PROPERTY_SETTER; + private static final MethodHandle THROW_STRICT_PROPERTY_REMOVER; private static final MethodHandle THROW_OPTIMISTIC_UNDEFINED; + private static final MethodHandle MISSING_PROPERTY_REMOVER; static { final Lookup lookup = new Lookup(MethodHandles.lookup()); THROW_STRICT_PROPERTY_SETTER = lookup.findOwnStatic("throwStrictPropertySetter", void.class, Object.class, Object.class); + THROW_STRICT_PROPERTY_REMOVER = lookup.findOwnStatic("throwStrictPropertyRemover", boolean.class, Object.class, Object.class); THROW_OPTIMISTIC_UNDEFINED = lookup.findOwnStatic("throwOptimisticUndefined", Object.class, int.class); + MISSING_PROPERTY_REMOVER = lookup.findOwnStatic("missingPropertyRemover", boolean.class, Object.class, Object.class); } private static GuardedInvocation linkBean(final LinkRequest linkRequest) throws Exception { @@ -124,6 +130,7 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo static MethodHandle linkMissingBeanMember(final LinkRequest linkRequest, final LinkerServices linkerServices) throws Exception { final CallSiteDescriptor desc = linkRequest.getCallSiteDescriptor(); final String operand = NashornCallSiteDescriptor.getOperand(desc); + final boolean strict = NashornCallSiteDescriptor.isStrict(desc); switch (NashornCallSiteDescriptor.getStandardOperation(desc)) { case GET: if (NashornCallSiteDescriptor.isOptimistic(desc)) { @@ -133,13 +140,17 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo } return getInvocation(EMPTY_ELEM_GETTER, linkerServices, desc); case SET: - final boolean strict = NashornCallSiteDescriptor.isStrict(desc); if (strict) { return adaptThrower(bindOperand(THROW_STRICT_PROPERTY_SETTER, operand), desc); } else if (operand != null) { return getInvocation(EMPTY_PROP_SETTER, linkerServices, desc); } return getInvocation(EMPTY_ELEM_SETTER, linkerServices, desc); + case REMOVE: + if (strict) { + return adaptThrower(bindOperand(THROW_STRICT_PROPERTY_REMOVER, operand), desc); + } + return getInvocation(bindOperand(MISSING_PROPERTY_REMOVER, operand), linkerServices, desc); default: throw new AssertionError("unknown call type " + desc); } @@ -162,6 +173,33 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo throw createTypeError(self, name, "cant.set.property"); } + @SuppressWarnings("unused") + private static boolean throwStrictPropertyRemover(final Object self, final Object name) { + if (isNonConfigurableProperty(self, name)) { + throw createTypeError(self, name, "cant.delete.property"); + } + return true; + } + + @SuppressWarnings("unused") + private static boolean missingPropertyRemover(final Object self, final Object name) { + return !isNonConfigurableProperty(self, name); + } + + // Corresponds to ECMAScript 5.1 8.12.7 [[Delete]] point 3 check for "isConfigurable" (but negated) + private static boolean isNonConfigurableProperty(final Object self, final Object name) { + if (self instanceof StaticClass) { + final Class clazz = ((StaticClass)self).getRepresentedClass(); + return BeansLinker.getReadableStaticPropertyNames(clazz).contains(name) || + BeansLinker.getWritableStaticPropertyNames(clazz).contains(name) || + BeansLinker.getStaticMethodNames(clazz).contains(name); + } + final Class clazz = self.getClass(); + return BeansLinker.getReadableInstancePropertyNames(clazz).contains(name) || + BeansLinker.getWritableInstancePropertyNames(clazz).contains(name) || + BeansLinker.getInstanceMethodNames(clazz).contains(name); + } + private static ECMAException createTypeError(final Object self, final Object name, final String msg) { return typeError(msg, String.valueOf(name), ScriptRuntime.safeToString(self)); } @@ -215,6 +253,8 @@ final class NashornBottomLinker implements GuardingDynamicLinker, GuardingTypeCo throw typeError(NashornCallSiteDescriptor.isMethodFirstOperation(desc) ? "no.such.function" : "cant.get.property", getArgument(linkRequest), "null"); case SET: throw typeError("cant.set.property", getArgument(linkRequest), "null"); + case REMOVE: + throw typeError("cant.delete.property", getArgument(linkRequest), "null"); default: throw new AssertionError("unknown call type " + desc); } diff --git a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java index f01faa921a8..28db284c0ca 100644 --- a/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java +++ b/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java @@ -29,6 +29,7 @@ import static jdk.dynalink.StandardNamespace.ELEMENT; import static jdk.dynalink.StandardNamespace.METHOD; import static jdk.dynalink.StandardNamespace.PROPERTY; import static jdk.dynalink.StandardOperation.GET; +import static jdk.dynalink.StandardOperation.REMOVE; import static jdk.dynalink.StandardOperation.SET; import java.lang.invoke.MethodHandles; @@ -63,7 +64,7 @@ import jdk.nashorn.internal.runtime.ScriptRuntime; * form of static methods. */ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { - // Lowest three bits describe the operation + // Lowest four bits describe the operation /** Property getter operation {@code obj.prop} */ public static final int GET_PROPERTY = 0; /** Element getter operation {@code obj[index]} */ @@ -76,12 +77,16 @@ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { public static final int SET_PROPERTY = 4; /** Element setter operation {@code obj[index] = value} */ public static final int SET_ELEMENT = 5; + /** Property remove operation {@code delete obj.prop} */ + public static final int REMOVE_PROPERTY = 6; + /** Element remove operation {@code delete obj[index]} */ + public static final int REMOVE_ELEMENT = 7; /** Call operation {@code fn(args...)} */ - public static final int CALL = 6; + public static final int CALL = 8; /** New operation {@code new Constructor(args...)} */ - public static final int NEW = 7; + public static final int NEW = 9; - private static final int OPERATION_MASK = 7; + private static final int OPERATION_MASK = 15; // Correspond to the operation indices above. private static final Operation[] OPERATIONS = new Operation[] { @@ -91,42 +96,44 @@ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { GET.withNamespaces(METHOD, ELEMENT, PROPERTY), SET.withNamespaces(PROPERTY, ELEMENT), SET.withNamespaces(ELEMENT, PROPERTY), + REMOVE.withNamespaces(PROPERTY, ELEMENT), + REMOVE.withNamespaces(ELEMENT, PROPERTY), StandardOperation.CALL, StandardOperation.NEW }; /** Flags that the call site references a scope variable (it's an identifier reference or a var declaration, not a * property access expression. */ - public static final int CALLSITE_SCOPE = 1 << 3; + public static final int CALLSITE_SCOPE = 1 << 4; /** Flags that the call site is in code that uses ECMAScript strict mode. */ - public static final int CALLSITE_STRICT = 1 << 4; + public static final int CALLSITE_STRICT = 1 << 5; /** Flags that a property getter or setter call site references a scope variable that is located at a known distance * in the scope chain. Such getters and setters can often be linked more optimally using these assumptions. */ - public static final int CALLSITE_FAST_SCOPE = 1 << 5; + public static final int CALLSITE_FAST_SCOPE = 1 << 6; /** Flags that a callsite type is optimistic, i.e. we might get back a wider return value than encoded in the * descriptor, and in that case we have to throw an UnwarrantedOptimismException */ - public static final int CALLSITE_OPTIMISTIC = 1 << 6; + public static final int CALLSITE_OPTIMISTIC = 1 << 7; /** Is this really an apply that we try to call as a call? */ - public static final int CALLSITE_APPLY_TO_CALL = 1 << 7; + public static final int CALLSITE_APPLY_TO_CALL = 1 << 8; /** Does this a callsite for a variable declaration? */ - public static final int CALLSITE_DECLARE = 1 << 8; + public static final int CALLSITE_DECLARE = 1 << 9; /** Flags that the call site is profiled; Contexts that have {@code "profile.callsites"} boolean property set emit * code where call sites have this flag set. */ - public static final int CALLSITE_PROFILE = 1 << 9; + public static final int CALLSITE_PROFILE = 1 << 10; /** Flags that the call site is traced; Contexts that have {@code "trace.callsites"} property set emit code where * call sites have this flag set. */ - public static final int CALLSITE_TRACE = 1 << 10; + public static final int CALLSITE_TRACE = 1 << 11; /** Flags that the call site linkage miss (and thus, relinking) is traced; Contexts that have the keyword * {@code "miss"} in their {@code "trace.callsites"} property emit code where call sites have this flag set. */ - public static final int CALLSITE_TRACE_MISSES = 1 << 11; + public static final int CALLSITE_TRACE_MISSES = 1 << 12; /** Flags that entry/exit to/from the method linked at call site are traced; Contexts that have the keyword * {@code "enterexit"} in their {@code "trace.callsites"} property emit code where call sites have this flag set. */ - public static final int CALLSITE_TRACE_ENTEREXIT = 1 << 12; + public static final int CALLSITE_TRACE_ENTEREXIT = 1 << 13; /** Flags that values passed as arguments to and returned from the method linked at call site are traced; Contexts * that have the keyword {@code "values"} in their {@code "trace.callsites"} property emit code where call sites * have this flag set. */ - public static final int CALLSITE_TRACE_VALUES = 1 << 13; + public static final int CALLSITE_TRACE_VALUES = 1 << 14; //we could have more tracing flags here, for example CALLSITE_TRACE_SCOPE, but bits are a bit precious //right now given the program points @@ -138,10 +145,10 @@ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { * TODO: rethink if we need the various profile/trace flags or the linker can use the Context instead to query its * trace/profile settings. */ - public static final int CALLSITE_PROGRAM_POINT_SHIFT = 14; + public static final int CALLSITE_PROGRAM_POINT_SHIFT = 15; /** - * Maximum program point value. We have 18 bits left over after flags, and + * Maximum program point value. We have 17 bits left over after flags, and * it should be plenty. Program points are local to a single function. Every * function maps to a single JVM bytecode method that can have at most 65535 * bytes. (Large functions are synthetically split into smaller functions.) @@ -222,8 +229,10 @@ public final class NashornCallSiteDescriptor extends CallSiteDescriptor { case 3: return "GET_METHOD_ELEMENT"; case 4: return "SET_PROPERTY"; case 5: return "SET_ELEMENT"; - case 6: return "CALL"; - case 7: return "NEW"; + case 6: return "REMOVE_PROPERTY"; + case 7: return "REMOVE_ELEMENT"; + case 8: return "CALL"; + case 9: return "NEW"; default: throw new AssertionError(); } } diff --git a/test/nashorn/script/basic/JDK-8193371.js b/test/nashorn/script/basic/JDK-8193371.js new file mode 100644 index 00000000000..615aa872df7 --- /dev/null +++ b/test/nashorn/script/basic/JDK-8193371.js @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2017 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. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8193371: Use Dynalink REMOVE operation in Nashorn + * + * @test + * @run + */ + +// This test exercises new functionality enabled by the issue, namely removal of elements from Java lists and maps. + +var ArrayList = java.util.ArrayList; +var HashMap = java.util.HashMap; +var listOf = java.util.List.of; +var mapOf = java.util.Map.of; + +// Remove from a list +(function() { + var a = new ArrayList(listOf("foo", "bar", "baz")); + Assert.assertFalse(delete a.add); + + // Delete actual element + Assert.assertTrue(delete a[1]); + Assert.assertEquals(a, listOf("foo", "baz")); + + // Gracefully ignore silly indices + Assert.assertTrue(delete a[5]); + Assert.assertTrue(delete a[-1]); + Assert.assertTrue(delete a["whatever"]); + Assert.assertTrue(delete a.whatever); + + // Gracefully ignore attempts at deleting methods and properties + Assert.assertFalse(delete a.add); + Assert.assertFalse(delete a.class); + + Assert.assertEquals(a, listOf("foo", "baz")); + + print("List passed.") +})(); + +// Remove from a list, strict +(function() { + "use strict"; + + var a = new ArrayList(listOf("foo", "bar", "baz")); + + // Delete actual element + Assert.assertTrue(delete a[1]); + Assert.assertEquals(a, listOf("foo", "baz")); + + // Gracefully ignore silly indices + Assert.assertTrue(delete a[5]); + Assert.assertTrue(delete a[-1]); + Assert.assertTrue(delete a["whatever"]); + Assert.assertTrue(delete a.whatever); + + // Fail deleting methods and properties + try { delete a.add; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + try { delete a.class; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + + Assert.assertEquals(a, listOf("foo", "baz")); + + print("Strict list passed.") +})(); + +// Remove from a map +(function() { + var m = new HashMap(mapOf("a", 1, "b", 2, "c", 3)); + + // Delete actual elements + Assert.assertTrue(delete m.a); + Assert.assertEquals(m, mapOf("b", 2, "c", 3)); + var key = "b" + Assert.assertTrue(delete m[key]); + Assert.assertEquals(m, mapOf("c", 3)); + + // Gracefully ignore silly indices + Assert.assertTrue(delete m.x); + Assert.assertTrue(delete m[5]); + Assert.assertTrue(delete m[-1]); + Assert.assertTrue(delete m["whatever"]); + + // Gracefully ignore attempts at deleting methods and properties + Assert.assertFalse(delete m.put); + Assert.assertFalse(delete m.class); + + Assert.assertEquals(m, mapOf("c", 3)); + print("Map passed.") +})(); + +// Remove from a map, strict +(function() { + "use strict"; + + var m = new HashMap(mapOf("a", 1, "b", 2, "c", 3)); + + // Delete actual elements + Assert.assertTrue(delete m.a); + Assert.assertEquals(m, mapOf("b", 2, "c", 3)); + var key = "b" + Assert.assertTrue(delete m[key]); + Assert.assertEquals(m, mapOf("c", 3)); + + // Gracefully ignore silly indices + Assert.assertTrue(delete m.x); + Assert.assertTrue(delete m[5]); + Assert.assertTrue(delete m[-1]); + Assert.assertTrue(delete m["whatever"]); + + // Fail deleting methods and properties + try { delete m.size; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + try { delete m.class; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + + // Somewhat counterintuitive, but if we define an element of a map, we can + // delete it, however then the method surfaces, and we can't delete that. + m.size = 4 + Assert.assertTrue(delete m.size) + try { delete m.size; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + + Assert.assertEquals(m, mapOf("c", 3)); + + print("Strict map passed.") +})(); + +// Remove from arrays and beans +(function() { + var a = new (Java.type("int[]"))(2) + a[0] = 42 + a[1] = 13 + + // Huh, Dynalink doesn't expose .clone() on Java arrays? + var c = new (Java.type("int[]"))(2) + c[0] = 42 + c[1] = 13 + + // passes vacuously, but does nothing + Assert.assertTrue(delete a[0]) + Assert.assertEquals(a, c); + + var b = new java.util.BitSet() + b.set(2) + // does nothing + Assert.assertFalse(delete b.get) + // Method is still there and operational + Assert.assertTrue(b.get(2)) + + // passes vacuously for non-existant property + Assert.assertTrue(delete b.foo) + + // statics + var Calendar = java.util.Calendar + Assert.assertFalse(delete Calendar.UNDECIMBER) // field + Assert.assertFalse(delete Calendar.availableLocales) // property + Assert.assertFalse(delete Calendar.getInstance) // method + Assert.assertTrue(delete Calendar.BLAH) // no such thing + + print("Beans passed.") +})(); + +// Remove from arrays and beans, strict +(function() { + "use strict"; + + var a = new (Java.type("int[]"))(2) + a[0] = 42 + a[1] = 13 + + var c = new (Java.type("int[]"))(2) + c[0] = 42 + c[1] = 13 + + // passes vacuously, but does nothing + Assert.assertTrue(delete a[0]) + Assert.assertEquals(a, c); + + var b = new java.util.BitSet() + b.set(2) + // fails to delete a method + try { delete b.get; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + // Method is still there and operational + Assert.assertTrue(b.get(2)) + + // passes vacuously for non-existant property + Assert.assertTrue(delete b.foo) + + // statics + var Calendar = java.util.Calendar + try { delete Calendar.UNDECIMBER; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + try { delete Calendar.availableLocales; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + try { delete Calendar.getInstance; Assert.fail(); } catch (e) { Assert.assertTrue(e instanceof TypeError) } + Assert.assertTrue(delete Calendar.BLAH) // no such thing + + print("Strict beans passed.") +})(); diff --git a/test/nashorn/script/basic/JDK-8193371.js.EXPECTED b/test/nashorn/script/basic/JDK-8193371.js.EXPECTED new file mode 100644 index 00000000000..0cca3c6ac30 --- /dev/null +++ b/test/nashorn/script/basic/JDK-8193371.js.EXPECTED @@ -0,0 +1,6 @@ +List passed. +Strict list passed. +Map passed. +Strict map passed. +Beans passed. +Strict beans passed. From 7e511aba71634c8a3d044e72e8035a2bbe39cfa1 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Wed, 20 Dec 2017 13:28:23 -0800 Subject: [PATCH 49/88] 8193512: Remove remnants of javah from jdk/jdk repo Reviewed-by: tbell, erikj, alanb, darcy --- make/Images.gmk | 1 - make/RunTestsPrebuiltSpec.gmk | 2 - make/autoconf/boot-jdk.m4 | 1 - make/autoconf/bootcycle-spec.gmk.in | 3 +- make/autoconf/generated-configure.sh | 157 +----------------- make/autoconf/spec.gmk.in | 4 +- make/common/JavaCompilation.gmk | 4 +- make/gensrc/Gensrc-jdk.compiler.gmk | 7 +- make/langtools/build.properties | 3 +- make/langtools/build.xml | 5 +- .../intellij/runConfigurations/javah.xml | 22 --- make/langtools/netbeans/README | 2 +- make/langtools/test/HelloWorld.apt.gold.txt | 5 - make/langtools/test/HelloWorld.java | 7 +- make/langtools/test/bootstrap/javah.sh | 40 ----- make/langtools/test/contents.gold.txt | 2 - make/langtools/test/lib/classes.gold.txt | 15 -- make/langtools/test/lib/javah.sh | 46 ----- make/langtools/test/lib/src.gold.txt | 10 -- .../tools/anttasks/SelectToolTask.java | 3 +- make/nb_native/nbproject/configurations.xml | 32 ---- make/scripts/compare_exceptions.sh.incl | 7 +- 22 files changed, 15 insertions(+), 363 deletions(-) delete mode 100644 make/langtools/intellij/runConfigurations/javah.xml delete mode 100644 make/langtools/test/bootstrap/javah.sh delete mode 100644 make/langtools/test/lib/javah.sh diff --git a/make/Images.gmk b/make/Images.gmk index aa342d1d31d..8a47ff55626 100644 --- a/make/Images.gmk +++ b/make/Images.gmk @@ -210,7 +210,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows) jarsigner.1 \ javac.1 \ javadoc.1 \ - javah.1 \ javap.1 \ jconsole.1 \ jcmd.1 \ diff --git a/make/RunTestsPrebuiltSpec.gmk b/make/RunTestsPrebuiltSpec.gmk index 5194099fd62..75a8f64de05 100644 --- a/make/RunTestsPrebuiltSpec.gmk +++ b/make/RunTestsPrebuiltSpec.gmk @@ -110,7 +110,6 @@ OPENJDK_BUILD_CPU_ENDIAN := $(OPENJDK_TARGET_CPU_ENDIAN) # Java executable definitions JAVA_CMD := $(BOOT_JDK)/bin/java JAVAC_CMD := $(BOOT_JDK)/bin/javac -JAVAH_CMD := $(BOOT_JDK)/bin/javah JAR_CMD := $(BOOT_JDK)/bin/jar JLINK_CMD := $(JDK_OUTPUTDIR)/bin/jlink JMOD_CMD := $(JDK_OUTPUTDIR)/bin/jmod @@ -120,7 +119,6 @@ JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS) JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS) JAVA_JAVAC := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS) JAVAC := $(FIXPATH) $(JAVAC_CMD) -JAVAH := $(FIXPATH) $(JAVAH_CMD) JAR := $(FIXPATH) $(JAR_CMD) JLINK := $(FIXPATH) $(JLINK_CMD) JMOD := $(FIXPATH) $(JMOD_CMD) diff --git a/make/autoconf/boot-jdk.m4 b/make/autoconf/boot-jdk.m4 index 161b0f18f2a..e373091bd10 100644 --- a/make/autoconf/boot-jdk.m4 +++ b/make/autoconf/boot-jdk.m4 @@ -295,7 +295,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK], # Setup tools from the Boot JDK. BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, java) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac) - BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH, javah) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, javadoc) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER, jarsigner) diff --git a/make/autoconf/bootcycle-spec.gmk.in b/make/autoconf/bootcycle-spec.gmk.in index 52768c60ec8..fd9d9997149 100644 --- a/make/autoconf/bootcycle-spec.gmk.in +++ b/make/autoconf/bootcycle-spec.gmk.in @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2017, 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 @@ -52,7 +52,6 @@ SJAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%, $(OUTPUTDIR)%, $(SJAVAC_SERVER_ JAVA_CMD:=$(BOOT_JDK)/bin/java JAVAC_CMD:=$(BOOT_JDK)/bin/javac -JAVAH_CMD:=$(BOOT_JDK)/bin/javah JAR_CMD:=$(BOOT_JDK)/bin/jar JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD) diff --git a/make/autoconf/generated-configure.sh b/make/autoconf/generated-configure.sh index ee9544d4eac..3381ec75b7c 100644 --- a/make/autoconf/generated-configure.sh +++ b/make/autoconf/generated-configure.sh @@ -881,7 +881,6 @@ BOOT_JDK_SOURCETARGET JARSIGNER JAR JAVADOC -JAVAH JAVAC JAVA BOOT_JDK @@ -1093,7 +1092,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -1300,7 +1298,6 @@ SETFILE PKG_CONFIG JAVA JAVAC -JAVAH JAVADOC JAR JARSIGNER @@ -1384,7 +1381,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1637,15 +1633,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1783,7 +1770,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1936,7 +1923,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2271,7 +2257,6 @@ Some influential environment variables: PKG_CONFIG path to pkg-config utility JAVA Override default value for JAVA JAVAC Override default value for JAVAC - JAVAH Override default value for JAVAH JAVADOC Override default value for JAVADOC JAR Override default value for JAR JARSIGNER Override default value for JARSIGNER @@ -5187,7 +5172,7 @@ VS_SDK_PLATFORM_NAME_2013= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1513702260 +DATE_WHEN_GENERATED=1513805283 ############################################################################### # @@ -30920,144 +30905,6 @@ $as_echo "$tool_specified" >&6; } - # Use user overridden value if available, otherwise locate tool in the Boot JDK. - - # Publish this variable in the help. - - - if [ -z "${JAVAH+x}" ]; then - # The variable is not set by user, try to locate tool using the code snippet - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5 -$as_echo_n "checking for javah in Boot JDK... " >&6; } - JAVAH=$BOOT_JDK/bin/javah - if test ! -x $JAVAH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5 -$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;} - as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - - - else - # The variable is set, but is it from the command line or the environment? - - # Try to remove the string !JAVAH! from our list. - try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/} - if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then - # If it failed, the variable was not from the command line. Ignore it, - # but warn the user (except for BASH, which is always set by the calling BASH). - if test "xJAVAH" != xBASH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5 -$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;} - fi - # Try to locate tool using the code snippet - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5 -$as_echo_n "checking for javah in Boot JDK... " >&6; } - JAVAH=$BOOT_JDK/bin/javah - if test ! -x $JAVAH; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5 -$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;} - as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - - - else - # If it succeeded, then it was overridden by the user. We will use it - # for the tool. - - # First remove it from the list of overridden variables, so we can test - # for unknown variables in the end. - CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var" - - # Check if we try to supply an empty value - if test "x$JAVAH" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5 -$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5 -$as_echo_n "checking for JAVAH... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 -$as_echo "disabled" >&6; } - else - # Check if the provided tool contains a complete path. - tool_specified="$JAVAH" - tool_basename="${tool_specified##*/}" - if test "x$tool_basename" = "x$tool_specified"; then - # A command without a complete path is provided, search $PATH. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5 -$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;} - # Extract the first word of "$tool_basename", so it can be a program name with args. -set dummy $tool_basename; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_JAVAH+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $JAVAH in - [\\/]* | ?:[\\/]*) - ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -JAVAH=$ac_cv_path_JAVAH -if test -n "$JAVAH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5 -$as_echo "$JAVAH" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$JAVAH" = x; then - as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5 - fi - else - # Otherwise we believe it is a complete path. Use it as it is. - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5 -$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5 -$as_echo_n "checking for JAVAH... " >&6; } - if test ! -x "$tool_specified"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5 -$as_echo "$tool_specified" >&6; } - fi - fi - fi - - fi - - - # Use user overridden value if available, otherwise locate tool in the Boot JDK. # Publish this variable in the help. diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in index 23fcefca74e..c41d0b164d1 100644 --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in @@ -540,7 +540,6 @@ SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@ # versions of the variables directly. JAVA_CMD:=@JAVA@ JAVAC_CMD:=@JAVAC@ -JAVAH_CMD:=@JAVAH@ JAVADOC_CMD:=@JAVADOC@ JAR_CMD:=@JAR@ JLINK_CMD := @JLINK@ @@ -553,7 +552,6 @@ JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS) JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS) JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS) JAVAC=@FIXPATH@ $(JAVAC_CMD) -JAVAH=@FIXPATH@ $(JAVAH_CMD) JAVADOC=@FIXPATH@ $(JAVADOC_CMD) JAR=@FIXPATH@ $(JAR_CMD) JLINK = @FIXPATH@ $(JLINK_CMD) $(JAVA_TOOL_FLAGS_SMALL) @@ -717,7 +715,7 @@ INSTALL_PREFIX=@prefix@ # Directories containing architecture-dependent files should be relative to exec_prefix INSTALL_EXECPREFIX=@exec_prefix@ -# java,javac,javah,javap etc are installed here. +# java,javac,javap etc are installed here. INSTALL_BINDIR=@bindir@ # Read only architecture-independent data diff --git a/make/common/JavaCompilation.gmk b/make/common/JavaCompilation.gmk index 2495c610e8a..4fbd0d9241e 100644 --- a/make/common/JavaCompilation.gmk +++ b/make/common/JavaCompilation.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2017, 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 @@ -46,7 +46,7 @@ include ZipArchive.gmk # passed to SetupJavaCompilation. This name is used as variable prefix. # # Remaining parameters are named arguments. These include: -# JVM:=The jvm used to run the javac/javah command +# JVM:=The jvm used to run the javac command # JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out # FLAGS:=Flags to be supplied to javac # SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here diff --git a/make/gensrc/Gensrc-jdk.compiler.gmk b/make/gensrc/Gensrc-jdk.compiler.gmk index 7f2bf508252..24be68e89c1 100644 --- a/make/gensrc/Gensrc-jdk.compiler.gmk +++ b/make/gensrc/Gensrc-jdk.compiler.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2017, 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 @@ -28,11 +28,8 @@ include GensrcCommonLangtools.gmk $(eval $(call SetupVersionProperties,JAVAC_VERSION, \ com/sun/tools/javac/resources/version.properties)) -$(eval $(call SetupVersionProperties,JAVAH_VERSION, \ - com/sun/tools/javah/resources/version.properties)) - $(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, \ - $(JAVAC_VERSION) $(JAVAH_VERSION))) + $(JAVAC_VERSION))) $(eval $(call SetupParseProperties,PARSE_PROPERTIES, \ com/sun/tools/javac/resources/compiler.properties)) diff --git a/make/langtools/build.properties b/make/langtools/build.properties index 2b934790e05..f6a3d7fd5ef 100644 --- a/make/langtools/build.properties +++ b/make/langtools/build.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2007, 2017, 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 @@ -60,7 +60,6 @@ full.version = ${release}+${build.number} tool.javac.main.class=com.sun.tools.javac.Main tool.javadoc.main.class=jdk.javadoc.internal.tool.Main tool.javap.main.class=com.sun.tools.javap.Main -tool.javah.main.class=com.sun.tools.javah.Main tool.sjavac.main.class=com.sun.tools.sjavac.Main tool.jshell.main.class=jdk.internal.jshell.tool.JShellToolProvider diff --git a/make/langtools/build.xml b/make/langtools/build.xml index b1a9d032744..841777c49d8 100644 --- a/make/langtools/build.xml +++ b/make/langtools/build.xml @@ -1,6 +1,6 @@