Merge
This commit is contained in:
commit
8fafbaec66
@ -171,3 +171,4 @@ e4f81a817447c3a4f6868f083c81c2fb1b15d44c jdk8-b44
|
||||
1dcb4b7b9373e64e135c12fe1f8699f1f80e51e8 jdk8-b47
|
||||
3f6c72d1c2a6e5c9e7d81c3dc984886678a128ad jdk8-b48
|
||||
c97b99424815c43818e3cc3ffcdd1a60f3198b52 jdk8-b49
|
||||
2fd67618b9a3c847780ed7b9d228e862b6e2824c jdk8-b50
|
||||
|
@ -265,3 +265,5 @@ cf37a594c38db2ea926954154636f9f81da2e032 jdk8-b46
|
||||
bd54fe36b5e50f9ef1e30a5047b27fee5297e268 hs24-b17
|
||||
e3619706a7253540a2d94e9e841acaab8ace7038 jdk8-b49
|
||||
72e0362c3f0cfacbbac8af8a5b9d2e182f21c17b hs24-b18
|
||||
58f237a9e83af6ded0d2e2c81d252cd47c0f4c45 jdk8-b50
|
||||
3b3ad16429701b2eb6712851c2f7c5a726eb2cbe hs24-b19
|
||||
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2012
|
||||
|
||||
HS_MAJOR_VER=24
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=18
|
||||
HS_BUILD_NUMBER=19
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=8
|
||||
|
@ -26,6 +26,139 @@
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include "decoder_machO.hpp"
|
||||
|
||||
#include <cxxabi.h>
|
||||
#include <mach-o/loader.h>
|
||||
#include <mach-o/nlist.h>
|
||||
|
||||
|
||||
bool MachODecoder::demangle(const char* symbol, char *buf, int buflen) {
|
||||
int status;
|
||||
char* result;
|
||||
size_t size = (size_t)buflen;
|
||||
// Don't pass buf to __cxa_demangle. In case of the 'buf' is too small,
|
||||
// __cxa_demangle will call system "realloc" for additional memory, which
|
||||
// may use different malloc/realloc mechanism that allocates 'buf'.
|
||||
if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) {
|
||||
jio_snprintf(buf, buflen, "%s", result);
|
||||
// call c library's free
|
||||
::free(result);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MachODecoder::decode(address addr, char *buf,
|
||||
int buflen, int *offset, const void *mach_base) {
|
||||
struct symtab_command * symt = (struct symtab_command *)
|
||||
mach_find_command((struct mach_header_64 *)mach_base, LC_SYMTAB);
|
||||
if (symt == NULL) {
|
||||
DEBUG_ONLY(tty->print_cr("no symtab in mach file at 0x%lx", mach_base));
|
||||
return false;
|
||||
}
|
||||
uint32_t off = symt->symoff; /* symbol table offset (within this mach file) */
|
||||
uint32_t nsyms = symt->nsyms; /* number of symbol table entries */
|
||||
uint32_t stroff = symt->stroff; /* string table offset */
|
||||
uint32_t strsize = symt->strsize; /* string table size in bytes */
|
||||
|
||||
// iterate through symbol table trying to match our offset
|
||||
|
||||
uint32_t addr_relative = (uintptr_t) mach_base - (uintptr_t) addr; // offset we seek in the symtab
|
||||
void * symtab_addr = (void*) ((uintptr_t) mach_base + off);
|
||||
struct nlist_64 *cur_nlist = (struct nlist_64 *) symtab_addr;
|
||||
struct nlist_64 *last_nlist = cur_nlist; // no size stored in an entry, so keep previously seen nlist
|
||||
|
||||
int32_t found_strx = 0;
|
||||
int32_t found_symval = 0;
|
||||
|
||||
for (uint32_t i=0; i < nsyms; i++) {
|
||||
uint32_t this_value = cur_nlist->n_value;
|
||||
|
||||
if (addr_relative == this_value) {
|
||||
found_strx = cur_nlist->n_un.n_strx;
|
||||
found_symval = this_value;
|
||||
break;
|
||||
} else if (addr_relative > this_value) {
|
||||
// gone past it, use previously seen nlist:
|
||||
found_strx = last_nlist->n_un.n_strx;
|
||||
found_symval = last_nlist->n_value;
|
||||
break;
|
||||
}
|
||||
last_nlist = cur_nlist;
|
||||
cur_nlist = cur_nlist + sizeof(struct nlist_64);
|
||||
}
|
||||
if (found_strx == 0) {
|
||||
return false;
|
||||
}
|
||||
// write the offset:
|
||||
*offset = addr_relative - found_symval;
|
||||
|
||||
// lookup found_strx in the string table
|
||||
char * symname = mach_find_in_stringtable((char*) ((uintptr_t)mach_base + stroff), strsize, found_strx);
|
||||
if (symname) {
|
||||
strncpy(buf, symname, buflen);
|
||||
return true;
|
||||
}
|
||||
DEBUG_ONLY(tty->print_cr("no string or null string found."));
|
||||
return false;
|
||||
}
|
||||
|
||||
void* MachODecoder::mach_find_command(struct mach_header_64 * mach_base, uint32_t command_wanted) {
|
||||
// possibly verify it is a mach_header, use magic number.
|
||||
// commands begin immediately after the header.
|
||||
struct load_command *pos = (struct load_command *) mach_base + sizeof(struct mach_header_64);
|
||||
for (uint32_t i = 0; i < mach_base->ncmds; i++) {
|
||||
struct load_command *this_cmd = (struct load_command *) pos;
|
||||
if (this_cmd->cmd == command_wanted) {
|
||||
return pos;
|
||||
}
|
||||
int cmdsize = this_cmd->cmdsize;
|
||||
pos += cmdsize;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char* MachODecoder::mach_find_in_stringtable(char *strtab, uint32_t tablesize, int strx_wanted) {
|
||||
|
||||
if (strx_wanted == 0) {
|
||||
return NULL;
|
||||
}
|
||||
char *strtab_end = strtab + tablesize;
|
||||
|
||||
// find the first string, skip over the space char
|
||||
// (or the four zero bytes we see e.g. in libclient)
|
||||
if (*strtab == ' ') {
|
||||
strtab++;
|
||||
if (*strtab != 0) {
|
||||
DEBUG_ONLY(tty->print_cr("string table has leading space but no following zero."));
|
||||
return NULL;
|
||||
}
|
||||
strtab++;
|
||||
} else {
|
||||
if ((uint32_t) *strtab != 0) {
|
||||
DEBUG_ONLY(tty->print_cr("string table without leading space or leading int of zero."));
|
||||
return NULL;
|
||||
}
|
||||
strtab+=4;
|
||||
}
|
||||
// read the real strings starting at index 1
|
||||
int cur_strx = 1;
|
||||
while (strtab < strtab_end) {
|
||||
if (cur_strx == strx_wanted) {
|
||||
return strtab;
|
||||
}
|
||||
// find start of next string
|
||||
while (*strtab != 0) {
|
||||
strtab++;
|
||||
}
|
||||
strtab++; // skip the terminating zero
|
||||
cur_strx++;
|
||||
}
|
||||
DEBUG_ONLY(tty->print_cr("string number %d not found.", strx_wanted));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -31,10 +31,25 @@
|
||||
|
||||
// Just a placehold for now, a real implementation should derive
|
||||
// from AbstractDecoder
|
||||
class MachODecoder : public NullDecoder {
|
||||
public:
|
||||
class MachODecoder : public AbstractDecoder {
|
||||
public:
|
||||
MachODecoder() { }
|
||||
~MachODecoder() { }
|
||||
virtual bool can_decode_C_frame_in_vm() const {
|
||||
return true;
|
||||
}
|
||||
virtual bool demangle(const char* symbol, char* buf, int buflen);
|
||||
virtual bool decode(address pc, char* buf, int buflen, int* offset,
|
||||
const void* base);
|
||||
virtual bool decode(address pc, char* buf, int buflen, int* offset,
|
||||
const char* module_path = NULL) {
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
void * mach_find_command(struct mach_header_64 * mach_base, uint32_t command_wanted);
|
||||
char * mach_find_in_stringtable(char *strtab, uint32_t tablesize, int strx_wanted);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1946,10 +1946,16 @@ bool os::address_is_in_vm(address addr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
#define MACH_MAXSYMLEN 256
|
||||
|
||||
bool os::dll_address_to_function_name(address addr, char *buf,
|
||||
int buflen, int *offset) {
|
||||
Dl_info dlinfo;
|
||||
char localbuf[MACH_MAXSYMLEN];
|
||||
|
||||
// dladdr will find names of dynamic functions only, but does
|
||||
// it set dli_fbase with mach_header address when it "fails" ?
|
||||
if (dladdr((void*)addr, &dlinfo) && dlinfo.dli_sname != NULL) {
|
||||
if (buf != NULL) {
|
||||
if(!Decoder::demangle(dlinfo.dli_sname, buf, buflen)) {
|
||||
@ -1965,6 +1971,14 @@ bool os::dll_address_to_function_name(address addr, char *buf,
|
||||
}
|
||||
}
|
||||
|
||||
// Handle non-dymanic manually:
|
||||
if (dlinfo.dli_fbase != NULL &&
|
||||
Decoder::decode(addr, localbuf, MACH_MAXSYMLEN, offset, dlinfo.dli_fbase)) {
|
||||
if(!Decoder::demangle(localbuf, buf, buflen)) {
|
||||
jio_snprintf(buf, buflen, "%s", localbuf);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (buf != NULL) buf[0] = '\0';
|
||||
if (offset != NULL) *offset = -1;
|
||||
return false;
|
||||
|
@ -72,10 +72,10 @@ void WindowsDecoder::initialize() {
|
||||
|
||||
// find out if jvm.dll contains private symbols, by decoding
|
||||
// current function and comparing the result
|
||||
address addr = (address)Decoder::decode;
|
||||
address addr = (address)Decoder::demangle;
|
||||
char buf[MAX_PATH];
|
||||
if (decode(addr, buf, sizeof(buf), NULL)) {
|
||||
_can_decode_in_vm = !strcmp(buf, "Decoder::decode");
|
||||
_can_decode_in_vm = !strcmp(buf, "Decoder::demangle");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,6 +45,10 @@ public:
|
||||
bool can_decode_C_frame_in_vm() const;
|
||||
bool demangle(const char* symbol, char *buf, int buflen);
|
||||
bool decode(address addr, char *buf, int buflen, int* offset, const char* modulepath = NULL);
|
||||
bool decode(address addr, char *buf, int buflen, int* offset, const void* base) {
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
void initialize();
|
||||
|
@ -153,4 +153,47 @@ public:
|
||||
void verify() PRODUCT_RETURN;
|
||||
};
|
||||
|
||||
class CSetChooserParUpdater : public StackObj {
|
||||
private:
|
||||
CollectionSetChooser* _chooser;
|
||||
bool _parallel;
|
||||
uint _chunk_size;
|
||||
uint _cur_chunk_idx;
|
||||
uint _cur_chunk_end;
|
||||
uint _regions_added;
|
||||
size_t _reclaimable_bytes_added;
|
||||
|
||||
public:
|
||||
CSetChooserParUpdater(CollectionSetChooser* chooser,
|
||||
bool parallel, uint chunk_size) :
|
||||
_chooser(chooser), _parallel(parallel), _chunk_size(chunk_size),
|
||||
_cur_chunk_idx(0), _cur_chunk_end(0),
|
||||
_regions_added(0), _reclaimable_bytes_added(0) { }
|
||||
|
||||
~CSetChooserParUpdater() {
|
||||
if (_parallel && _regions_added > 0) {
|
||||
_chooser->update_totals(_regions_added, _reclaimable_bytes_added);
|
||||
}
|
||||
}
|
||||
|
||||
void add_region(HeapRegion* hr) {
|
||||
if (_parallel) {
|
||||
if (_cur_chunk_idx == _cur_chunk_end) {
|
||||
_cur_chunk_idx = _chooser->claim_array_chunk(_chunk_size);
|
||||
_cur_chunk_end = _cur_chunk_idx + _chunk_size;
|
||||
}
|
||||
assert(_cur_chunk_idx < _cur_chunk_end, "invariant");
|
||||
_chooser->set_region(_cur_chunk_idx, hr);
|
||||
_cur_chunk_idx += 1;
|
||||
} else {
|
||||
_chooser->add_region(hr);
|
||||
}
|
||||
_regions_added += 1;
|
||||
_reclaimable_bytes_added += hr->reclaimable_bytes();
|
||||
}
|
||||
|
||||
bool should_add(HeapRegion* hr) { return _chooser->should_add(hr); }
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_COLLECTIONSETCHOOSER_HPP
|
||||
|
||||
|
@ -1226,9 +1226,7 @@ protected:
|
||||
} else {
|
||||
// Starts humongous case: calculate how many regions are part of
|
||||
// this humongous region and then set the bit range.
|
||||
G1CollectedHeap* g1h = G1CollectedHeap::heap();
|
||||
HeapRegion *last_hr = g1h->heap_region_containing_raw(hr->end() - 1);
|
||||
BitMap::idx_t end_index = (BitMap::idx_t) last_hr->hrs_index() + 1;
|
||||
BitMap::idx_t end_index = (BitMap::idx_t) hr->last_hc_index();
|
||||
_region_bm->par_at_put_range(index, end_index, true);
|
||||
}
|
||||
}
|
||||
@ -1645,26 +1643,27 @@ public:
|
||||
size_t freed_bytes() { return _freed_bytes; }
|
||||
|
||||
bool doHeapRegion(HeapRegion *hr) {
|
||||
if (hr->continuesHumongous()) {
|
||||
return false;
|
||||
}
|
||||
// We use a claim value of zero here because all regions
|
||||
// were claimed with value 1 in the FinalCount task.
|
||||
hr->reset_gc_time_stamp();
|
||||
if (!hr->continuesHumongous()) {
|
||||
double start = os::elapsedTime();
|
||||
_regions_claimed++;
|
||||
hr->note_end_of_marking();
|
||||
_max_live_bytes += hr->max_live_bytes();
|
||||
_g1->free_region_if_empty(hr,
|
||||
&_freed_bytes,
|
||||
_local_cleanup_list,
|
||||
_old_proxy_set,
|
||||
_humongous_proxy_set,
|
||||
_hrrs_cleanup_task,
|
||||
true /* par */);
|
||||
double region_time = (os::elapsedTime() - start);
|
||||
_claimed_region_time += region_time;
|
||||
if (region_time > _max_region_time) {
|
||||
_max_region_time = region_time;
|
||||
}
|
||||
_g1->reset_gc_time_stamps(hr);
|
||||
double start = os::elapsedTime();
|
||||
_regions_claimed++;
|
||||
hr->note_end_of_marking();
|
||||
_max_live_bytes += hr->max_live_bytes();
|
||||
_g1->free_region_if_empty(hr,
|
||||
&_freed_bytes,
|
||||
_local_cleanup_list,
|
||||
_old_proxy_set,
|
||||
_humongous_proxy_set,
|
||||
_hrrs_cleanup_task,
|
||||
true /* par */);
|
||||
double region_time = (os::elapsedTime() - start);
|
||||
_claimed_region_time += region_time;
|
||||
if (region_time > _max_region_time) {
|
||||
_max_region_time = region_time;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -1881,6 +1880,7 @@ void ConcurrentMark::cleanup() {
|
||||
} else {
|
||||
g1_par_note_end_task.work(0);
|
||||
}
|
||||
g1h->check_gc_time_stamps();
|
||||
|
||||
if (!cleanup_list_is_empty()) {
|
||||
// The cleanup list is not empty, so we'll have to process it
|
||||
@ -2449,24 +2449,8 @@ public:
|
||||
} else {
|
||||
HeapRegion* hr = _g1h->heap_region_containing(obj);
|
||||
guarantee(hr != NULL, "invariant");
|
||||
bool over_tams = false;
|
||||
bool marked = false;
|
||||
|
||||
switch (_vo) {
|
||||
case VerifyOption_G1UsePrevMarking:
|
||||
over_tams = hr->obj_allocated_since_prev_marking(obj);
|
||||
marked = _g1h->isMarkedPrev(obj);
|
||||
break;
|
||||
case VerifyOption_G1UseNextMarking:
|
||||
over_tams = hr->obj_allocated_since_next_marking(obj);
|
||||
marked = _g1h->isMarkedNext(obj);
|
||||
break;
|
||||
case VerifyOption_G1UseMarkWord:
|
||||
marked = obj->is_gc_marked();
|
||||
break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
bool over_tams = _g1h->allocated_since_marking(obj, hr, _vo);
|
||||
bool marked = _g1h->is_marked(obj, _vo);
|
||||
|
||||
if (over_tams) {
|
||||
str = " >";
|
||||
@ -2502,24 +2486,8 @@ public:
|
||||
_out(out), _vo(vo), _all(all), _hr(hr) { }
|
||||
|
||||
void do_object(oop o) {
|
||||
bool over_tams = false;
|
||||
bool marked = false;
|
||||
|
||||
switch (_vo) {
|
||||
case VerifyOption_G1UsePrevMarking:
|
||||
over_tams = _hr->obj_allocated_since_prev_marking(o);
|
||||
marked = _g1h->isMarkedPrev(o);
|
||||
break;
|
||||
case VerifyOption_G1UseNextMarking:
|
||||
over_tams = _hr->obj_allocated_since_next_marking(o);
|
||||
marked = _g1h->isMarkedNext(o);
|
||||
break;
|
||||
case VerifyOption_G1UseMarkWord:
|
||||
marked = o->is_gc_marked();
|
||||
break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
bool over_tams = _g1h->allocated_since_marking(o, _hr, _vo);
|
||||
bool marked = _g1h->is_marked(o, _vo);
|
||||
bool print_it = _all || over_tams || marked;
|
||||
|
||||
if (print_it) {
|
||||
@ -2533,32 +2501,17 @@ public:
|
||||
|
||||
class PrintReachableRegionClosure : public HeapRegionClosure {
|
||||
private:
|
||||
outputStream* _out;
|
||||
VerifyOption _vo;
|
||||
bool _all;
|
||||
G1CollectedHeap* _g1h;
|
||||
outputStream* _out;
|
||||
VerifyOption _vo;
|
||||
bool _all;
|
||||
|
||||
public:
|
||||
bool doHeapRegion(HeapRegion* hr) {
|
||||
HeapWord* b = hr->bottom();
|
||||
HeapWord* e = hr->end();
|
||||
HeapWord* t = hr->top();
|
||||
HeapWord* p = NULL;
|
||||
|
||||
switch (_vo) {
|
||||
case VerifyOption_G1UsePrevMarking:
|
||||
p = hr->prev_top_at_mark_start();
|
||||
break;
|
||||
case VerifyOption_G1UseNextMarking:
|
||||
p = hr->next_top_at_mark_start();
|
||||
break;
|
||||
case VerifyOption_G1UseMarkWord:
|
||||
// When we are verifying marking using the mark word
|
||||
// TAMS has no relevance.
|
||||
assert(p == NULL, "post-condition");
|
||||
break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
HeapWord* p = _g1h->top_at_mark_start(hr, _vo);
|
||||
_out->print_cr("** ["PTR_FORMAT", "PTR_FORMAT"] top: "PTR_FORMAT" "
|
||||
"TAMS: "PTR_FORMAT, b, e, t, p);
|
||||
_out->cr();
|
||||
@ -2580,20 +2533,9 @@ public:
|
||||
PrintReachableRegionClosure(outputStream* out,
|
||||
VerifyOption vo,
|
||||
bool all) :
|
||||
_out(out), _vo(vo), _all(all) { }
|
||||
_g1h(G1CollectedHeap::heap()), _out(out), _vo(vo), _all(all) { }
|
||||
};
|
||||
|
||||
static const char* verify_option_to_tams(VerifyOption vo) {
|
||||
switch (vo) {
|
||||
case VerifyOption_G1UsePrevMarking:
|
||||
return "PTAMS";
|
||||
case VerifyOption_G1UseNextMarking:
|
||||
return "NTAMS";
|
||||
default:
|
||||
return "NONE";
|
||||
}
|
||||
}
|
||||
|
||||
void ConcurrentMark::print_reachable(const char* str,
|
||||
VerifyOption vo,
|
||||
bool all) {
|
||||
@ -2622,7 +2564,7 @@ void ConcurrentMark::print_reachable(const char* str,
|
||||
}
|
||||
|
||||
outputStream* out = &fout;
|
||||
out->print_cr("-- USING %s", verify_option_to_tams(vo));
|
||||
out->print_cr("-- USING %s", _g1h->top_at_mark_start_str(vo));
|
||||
out->cr();
|
||||
|
||||
out->print_cr("--- ITERATING OVER REGIONS");
|
||||
|
@ -1149,13 +1149,16 @@ HeapWord* G1CollectedHeap::attempt_allocation_at_safepoint(size_t word_size,
|
||||
}
|
||||
|
||||
class PostMCRemSetClearClosure: public HeapRegionClosure {
|
||||
G1CollectedHeap* _g1h;
|
||||
ModRefBarrierSet* _mr_bs;
|
||||
public:
|
||||
PostMCRemSetClearClosure(ModRefBarrierSet* mr_bs) : _mr_bs(mr_bs) {}
|
||||
PostMCRemSetClearClosure(G1CollectedHeap* g1h, ModRefBarrierSet* mr_bs) :
|
||||
_g1h(g1h), _mr_bs(mr_bs) { }
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
r->reset_gc_time_stamp();
|
||||
if (r->continuesHumongous())
|
||||
if (r->continuesHumongous()) {
|
||||
return false;
|
||||
}
|
||||
_g1h->reset_gc_time_stamps(r);
|
||||
HeapRegionRemSet* hrrs = r->rem_set();
|
||||
if (hrrs != NULL) hrrs->clear();
|
||||
// You might think here that we could clear just the cards
|
||||
@ -1168,19 +1171,10 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class PostMCRemSetInvalidateClosure: public HeapRegionClosure {
|
||||
ModRefBarrierSet* _mr_bs;
|
||||
public:
|
||||
PostMCRemSetInvalidateClosure(ModRefBarrierSet* mr_bs) : _mr_bs(mr_bs) {}
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (r->continuesHumongous()) return false;
|
||||
if (r->used_region().word_size() != 0) {
|
||||
_mr_bs->invalidate(r->used_region(), true /*whole heap*/);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
void G1CollectedHeap::clear_rsets_post_compaction() {
|
||||
PostMCRemSetClearClosure rs_clear(this, mr_bs());
|
||||
heap_region_iterate(&rs_clear);
|
||||
}
|
||||
|
||||
class RebuildRSOutOfRegionClosure: public HeapRegionClosure {
|
||||
G1CollectedHeap* _g1h;
|
||||
@ -1229,7 +1223,7 @@ public:
|
||||
if (!hr->isHumongous()) {
|
||||
_hr_printer->post_compaction(hr, G1HRPrinter::Old);
|
||||
} else if (hr->startsHumongous()) {
|
||||
if (hr->capacity() == HeapRegion::GrainBytes) {
|
||||
if (hr->region_num() == 1) {
|
||||
// single humongous region
|
||||
_hr_printer->post_compaction(hr, G1HRPrinter::SingleHumongous);
|
||||
} else {
|
||||
@ -1247,6 +1241,11 @@ public:
|
||||
: _hr_printer(hr_printer) { }
|
||||
};
|
||||
|
||||
void G1CollectedHeap::print_hrs_post_compaction() {
|
||||
PostCompactionPrinterClosure cl(hr_printer());
|
||||
heap_region_iterate(&cl);
|
||||
}
|
||||
|
||||
bool G1CollectedHeap::do_collection(bool explicit_gc,
|
||||
bool clear_all_soft_refs,
|
||||
size_t word_size) {
|
||||
@ -1402,8 +1401,8 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
|
||||
// Since everything potentially moved, we will clear all remembered
|
||||
// sets, and clear all cards. Later we will rebuild remebered
|
||||
// sets. We will also reset the GC time stamps of the regions.
|
||||
PostMCRemSetClearClosure rs_clear(mr_bs());
|
||||
heap_region_iterate(&rs_clear);
|
||||
clear_rsets_post_compaction();
|
||||
check_gc_time_stamps();
|
||||
|
||||
// Resize the heap if necessary.
|
||||
resize_if_necessary_after_full_collection(explicit_gc ? 0 : word_size);
|
||||
@ -1413,9 +1412,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
|
||||
// that all the COMMIT / UNCOMMIT events are generated before
|
||||
// the end GC event.
|
||||
|
||||
PostCompactionPrinterClosure cl(hr_printer());
|
||||
heap_region_iterate(&cl);
|
||||
|
||||
print_hrs_post_compaction();
|
||||
_hr_printer.end_gc(true /* full */, (size_t) total_collections());
|
||||
}
|
||||
|
||||
@ -2263,6 +2260,51 @@ size_t G1CollectedHeap::capacity() const {
|
||||
return _g1_committed.byte_size();
|
||||
}
|
||||
|
||||
void G1CollectedHeap::reset_gc_time_stamps(HeapRegion* hr) {
|
||||
assert(!hr->continuesHumongous(), "pre-condition");
|
||||
hr->reset_gc_time_stamp();
|
||||
if (hr->startsHumongous()) {
|
||||
uint first_index = hr->hrs_index() + 1;
|
||||
uint last_index = hr->last_hc_index();
|
||||
for (uint i = first_index; i < last_index; i += 1) {
|
||||
HeapRegion* chr = region_at(i);
|
||||
assert(chr->continuesHumongous(), "sanity");
|
||||
chr->reset_gc_time_stamp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
class CheckGCTimeStampsHRClosure : public HeapRegionClosure {
|
||||
private:
|
||||
unsigned _gc_time_stamp;
|
||||
bool _failures;
|
||||
|
||||
public:
|
||||
CheckGCTimeStampsHRClosure(unsigned gc_time_stamp) :
|
||||
_gc_time_stamp(gc_time_stamp), _failures(false) { }
|
||||
|
||||
virtual bool doHeapRegion(HeapRegion* hr) {
|
||||
unsigned region_gc_time_stamp = hr->get_gc_time_stamp();
|
||||
if (_gc_time_stamp != region_gc_time_stamp) {
|
||||
gclog_or_tty->print_cr("Region "HR_FORMAT" has GC time stamp = %d, "
|
||||
"expected %d", HR_FORMAT_PARAMS(hr),
|
||||
region_gc_time_stamp, _gc_time_stamp);
|
||||
_failures = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool failures() { return _failures; }
|
||||
};
|
||||
|
||||
void G1CollectedHeap::check_gc_time_stamps() {
|
||||
CheckGCTimeStampsHRClosure cl(_gc_time_stamp);
|
||||
heap_region_iterate(&cl);
|
||||
guarantee(!cl.failures(), "all GC time stamps should have been reset");
|
||||
}
|
||||
#endif // PRODUCT
|
||||
|
||||
void G1CollectedHeap::iterate_dirty_card_closure(CardTableEntryClosure* cl,
|
||||
DirtyCardQueue* into_cset_dcq,
|
||||
bool concurrent,
|
||||
@ -2530,7 +2572,7 @@ public:
|
||||
IterateOopClosureRegionClosure(MemRegion mr, OopClosure* cl)
|
||||
: _mr(mr), _cl(cl) {}
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (! r->continuesHumongous()) {
|
||||
if (!r->continuesHumongous()) {
|
||||
r->oop_iterate(_cl);
|
||||
}
|
||||
return false;
|
||||
@ -2601,14 +2643,9 @@ void G1CollectedHeap::heap_region_iterate(HeapRegionClosure* cl) const {
|
||||
_hrs.iterate(cl);
|
||||
}
|
||||
|
||||
void G1CollectedHeap::heap_region_iterate_from(HeapRegion* r,
|
||||
HeapRegionClosure* cl) const {
|
||||
_hrs.iterate_from(r, cl);
|
||||
}
|
||||
|
||||
void
|
||||
G1CollectedHeap::heap_region_par_iterate_chunked(HeapRegionClosure* cl,
|
||||
uint worker,
|
||||
uint worker_id,
|
||||
uint no_of_par_workers,
|
||||
jint claim_value) {
|
||||
const uint regions = n_regions();
|
||||
@ -2619,7 +2656,9 @@ G1CollectedHeap::heap_region_par_iterate_chunked(HeapRegionClosure* cl,
|
||||
no_of_par_workers == workers()->total_workers(),
|
||||
"Non dynamic should use fixed number of workers");
|
||||
// try to spread out the starting points of the workers
|
||||
const uint start_index = regions / max_workers * worker;
|
||||
const HeapRegion* start_hr =
|
||||
start_region_for_worker(worker_id, no_of_par_workers);
|
||||
const uint start_index = start_hr->hrs_index();
|
||||
|
||||
// each worker will actually look at all regions
|
||||
for (uint count = 0; count < regions; ++count) {
|
||||
@ -2861,6 +2900,17 @@ HeapRegion* G1CollectedHeap::start_cset_region_for_worker(int worker_i) {
|
||||
return result;
|
||||
}
|
||||
|
||||
HeapRegion* G1CollectedHeap::start_region_for_worker(uint worker_i,
|
||||
uint no_of_par_workers) {
|
||||
uint worker_num =
|
||||
G1CollectedHeap::use_parallel_gc_threads() ? no_of_par_workers : 1U;
|
||||
assert(UseDynamicNumberOfGCThreads ||
|
||||
no_of_par_workers == workers()->total_workers(),
|
||||
"Non dynamic should use fixed number of workers");
|
||||
const uint start_index = n_regions() * worker_i / worker_num;
|
||||
return region_at(start_index);
|
||||
}
|
||||
|
||||
void G1CollectedHeap::collection_set_iterate(HeapRegionClosure* cl) {
|
||||
HeapRegion* r = g1_policy()->collection_set();
|
||||
while (r != NULL) {
|
||||
@ -2974,6 +3024,51 @@ void G1CollectedHeap::prepare_for_verify() {
|
||||
g1_rem_set()->prepare_for_verify();
|
||||
}
|
||||
|
||||
bool G1CollectedHeap::allocated_since_marking(oop obj, HeapRegion* hr,
|
||||
VerifyOption vo) {
|
||||
switch (vo) {
|
||||
case VerifyOption_G1UsePrevMarking:
|
||||
return hr->obj_allocated_since_prev_marking(obj);
|
||||
case VerifyOption_G1UseNextMarking:
|
||||
return hr->obj_allocated_since_next_marking(obj);
|
||||
case VerifyOption_G1UseMarkWord:
|
||||
return false;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
return false; // keep some compilers happy
|
||||
}
|
||||
|
||||
HeapWord* G1CollectedHeap::top_at_mark_start(HeapRegion* hr, VerifyOption vo) {
|
||||
switch (vo) {
|
||||
case VerifyOption_G1UsePrevMarking: return hr->prev_top_at_mark_start();
|
||||
case VerifyOption_G1UseNextMarking: return hr->next_top_at_mark_start();
|
||||
case VerifyOption_G1UseMarkWord: return NULL;
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
return NULL; // keep some compilers happy
|
||||
}
|
||||
|
||||
bool G1CollectedHeap::is_marked(oop obj, VerifyOption vo) {
|
||||
switch (vo) {
|
||||
case VerifyOption_G1UsePrevMarking: return isMarkedPrev(obj);
|
||||
case VerifyOption_G1UseNextMarking: return isMarkedNext(obj);
|
||||
case VerifyOption_G1UseMarkWord: return obj->is_gc_marked();
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
return false; // keep some compilers happy
|
||||
}
|
||||
|
||||
const char* G1CollectedHeap::top_at_mark_start_str(VerifyOption vo) {
|
||||
switch (vo) {
|
||||
case VerifyOption_G1UsePrevMarking: return "PTAMS";
|
||||
case VerifyOption_G1UseNextMarking: return "NTAMS";
|
||||
case VerifyOption_G1UseMarkWord: return "NONE";
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
return NULL; // keep some compilers happy
|
||||
}
|
||||
|
||||
class VerifyLivenessOopClosure: public OopClosure {
|
||||
G1CollectedHeap* _g1h;
|
||||
VerifyOption _vo;
|
||||
@ -3061,9 +3156,9 @@ public:
|
||||
|
||||
class VerifyRegionClosure: public HeapRegionClosure {
|
||||
private:
|
||||
bool _par;
|
||||
VerifyOption _vo;
|
||||
bool _failures;
|
||||
bool _par;
|
||||
VerifyOption _vo;
|
||||
bool _failures;
|
||||
public:
|
||||
// _vo == UsePrevMarking -> use "prev" marking information,
|
||||
// _vo == UseNextMarking -> use "next" marking information,
|
||||
@ -3078,8 +3173,6 @@ public:
|
||||
}
|
||||
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
guarantee(_par || r->claim_value() == HeapRegion::InitialClaimValue,
|
||||
"Should be unclaimed at verify points.");
|
||||
if (!r->continuesHumongous()) {
|
||||
bool failures = false;
|
||||
r->verify(_vo, &failures);
|
||||
@ -5612,19 +5705,18 @@ void G1CollectedHeap::free_humongous_region(HeapRegion* hr,
|
||||
size_t hr_capacity = hr->capacity();
|
||||
size_t hr_pre_used = 0;
|
||||
_humongous_set.remove_with_proxy(hr, humongous_proxy_set);
|
||||
// We need to read this before we make the region non-humongous,
|
||||
// otherwise the information will be gone.
|
||||
uint last_index = hr->last_hc_index();
|
||||
hr->set_notHumongous();
|
||||
free_region(hr, &hr_pre_used, free_list, par);
|
||||
|
||||
uint i = hr->hrs_index() + 1;
|
||||
uint num = 1;
|
||||
while (i < n_regions()) {
|
||||
while (i < last_index) {
|
||||
HeapRegion* curr_hr = region_at(i);
|
||||
if (!curr_hr->continuesHumongous()) {
|
||||
break;
|
||||
}
|
||||
assert(curr_hr->continuesHumongous(), "invariant");
|
||||
curr_hr->set_notHumongous();
|
||||
free_region(curr_hr, &hr_pre_used, free_list, par);
|
||||
num += 1;
|
||||
i += 1;
|
||||
}
|
||||
assert(hr_pre_used == hr_used,
|
||||
@ -5732,7 +5824,6 @@ void G1CollectedHeap::verify_dirty_young_list(HeapRegion* head) {
|
||||
|
||||
void G1CollectedHeap::verify_dirty_young_regions() {
|
||||
verify_dirty_young_list(_young_list->first_region());
|
||||
verify_dirty_young_list(_young_list->first_survivor_region());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -375,6 +375,13 @@ private:
|
||||
// this method will be found dead by the marking cycle).
|
||||
void allocate_dummy_regions() PRODUCT_RETURN;
|
||||
|
||||
// Clear RSets after a compaction. It also resets the GC time stamps.
|
||||
void clear_rsets_post_compaction();
|
||||
|
||||
// If the HR printer is active, dump the state of the regions in the
|
||||
// heap after a compaction.
|
||||
void print_hrs_post_compaction();
|
||||
|
||||
// These are macros so that, if the assert fires, we get the correct
|
||||
// line number, file, etc.
|
||||
|
||||
@ -1061,11 +1068,18 @@ public:
|
||||
clear_cset_start_regions();
|
||||
}
|
||||
|
||||
void check_gc_time_stamps() PRODUCT_RETURN;
|
||||
|
||||
void increment_gc_time_stamp() {
|
||||
++_gc_time_stamp;
|
||||
OrderAccess::fence();
|
||||
}
|
||||
|
||||
// Reset the given region's GC timestamp. If it's starts humongous,
|
||||
// also reset the GC timestamp of its corresponding
|
||||
// continues humongous regions too.
|
||||
void reset_gc_time_stamps(HeapRegion* hr);
|
||||
|
||||
void iterate_dirty_card_closure(CardTableEntryClosure* cl,
|
||||
DirtyCardQueue* into_cset_dcq,
|
||||
bool concurrent, int worker_i);
|
||||
@ -1302,11 +1316,6 @@ public:
|
||||
// iteration early if the "doHeapRegion" method returns "true".
|
||||
void heap_region_iterate(HeapRegionClosure* blk) const;
|
||||
|
||||
// Iterate over heap regions starting with r (or the first region if "r"
|
||||
// is NULL), in address order, terminating early if the "doHeapRegion"
|
||||
// method returns "true".
|
||||
void heap_region_iterate_from(HeapRegion* r, HeapRegionClosure* blk) const;
|
||||
|
||||
// Return the region with the given index. It assumes the index is valid.
|
||||
HeapRegion* region_at(uint index) const { return _hrs.at(index); }
|
||||
|
||||
@ -1351,6 +1360,11 @@ public:
|
||||
// starting region for iterating over the current collection set.
|
||||
HeapRegion* start_cset_region_for_worker(int worker_i);
|
||||
|
||||
// This is a convenience method that is used by the
|
||||
// HeapRegionIterator classes to calculate the starting region for
|
||||
// each worker so that they do not all start from the same region.
|
||||
HeapRegion* start_region_for_worker(uint worker_i, uint no_of_par_workers);
|
||||
|
||||
// Iterate over the regions (if any) in the current collection set.
|
||||
void collection_set_iterate(HeapRegionClosure* blk);
|
||||
|
||||
@ -1558,24 +1572,6 @@ public:
|
||||
bool isMarkedPrev(oop obj) const;
|
||||
bool isMarkedNext(oop obj) const;
|
||||
|
||||
// vo == UsePrevMarking -> use "prev" marking information,
|
||||
// vo == UseNextMarking -> use "next" marking information,
|
||||
// vo == UseMarkWord -> use mark word from object header
|
||||
bool is_obj_dead_cond(const oop obj,
|
||||
const HeapRegion* hr,
|
||||
const VerifyOption vo) const {
|
||||
|
||||
switch (vo) {
|
||||
case VerifyOption_G1UsePrevMarking:
|
||||
return is_obj_dead(obj, hr);
|
||||
case VerifyOption_G1UseNextMarking:
|
||||
return is_obj_ill(obj, hr);
|
||||
default:
|
||||
assert(vo == VerifyOption_G1UseMarkWord, "must be");
|
||||
return !obj->is_gc_marked();
|
||||
}
|
||||
}
|
||||
|
||||
// Determine if an object is dead, given the object and also
|
||||
// the region to which the object belongs. An object is dead
|
||||
// iff a) it was not allocated since the last mark and b) it
|
||||
@ -1587,15 +1583,6 @@ public:
|
||||
!isMarkedPrev(obj);
|
||||
}
|
||||
|
||||
// This is used when copying an object to survivor space.
|
||||
// If the object is marked live, then we mark the copy live.
|
||||
// If the object is allocated since the start of this mark
|
||||
// cycle, then we mark the copy live.
|
||||
// If the object has been around since the previous mark
|
||||
// phase, and hasn't been marked yet during this phase,
|
||||
// then we don't mark it, we just wait for the
|
||||
// current marking cycle to get to it.
|
||||
|
||||
// This function returns true when an object has been
|
||||
// around since the previous marking and hasn't yet
|
||||
// been marked during this marking.
|
||||
@ -1613,23 +1600,6 @@ public:
|
||||
// Added if it is in permanent gen it isn't dead.
|
||||
// Added if it is NULL it isn't dead.
|
||||
|
||||
// vo == UsePrevMarking -> use "prev" marking information,
|
||||
// vo == UseNextMarking -> use "next" marking information,
|
||||
// vo == UseMarkWord -> use mark word from object header
|
||||
bool is_obj_dead_cond(const oop obj,
|
||||
const VerifyOption vo) const {
|
||||
|
||||
switch (vo) {
|
||||
case VerifyOption_G1UsePrevMarking:
|
||||
return is_obj_dead(obj);
|
||||
case VerifyOption_G1UseNextMarking:
|
||||
return is_obj_ill(obj);
|
||||
default:
|
||||
assert(vo == VerifyOption_G1UseMarkWord, "must be");
|
||||
return !obj->is_gc_marked();
|
||||
}
|
||||
}
|
||||
|
||||
bool is_obj_dead(const oop obj) const {
|
||||
const HeapRegion* hr = heap_region_containing(obj);
|
||||
if (hr == NULL) {
|
||||
@ -1652,6 +1622,42 @@ public:
|
||||
else return is_obj_ill(obj, hr);
|
||||
}
|
||||
|
||||
// The methods below are here for convenience and dispatch the
|
||||
// appropriate method depending on value of the given VerifyOption
|
||||
// parameter. The options for that parameter are:
|
||||
//
|
||||
// vo == UsePrevMarking -> use "prev" marking information,
|
||||
// vo == UseNextMarking -> use "next" marking information,
|
||||
// vo == UseMarkWord -> use mark word from object header
|
||||
|
||||
bool is_obj_dead_cond(const oop obj,
|
||||
const HeapRegion* hr,
|
||||
const VerifyOption vo) const {
|
||||
switch (vo) {
|
||||
case VerifyOption_G1UsePrevMarking: return is_obj_dead(obj, hr);
|
||||
case VerifyOption_G1UseNextMarking: return is_obj_ill(obj, hr);
|
||||
case VerifyOption_G1UseMarkWord: return !obj->is_gc_marked();
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
return false; // keep some compilers happy
|
||||
}
|
||||
|
||||
bool is_obj_dead_cond(const oop obj,
|
||||
const VerifyOption vo) const {
|
||||
switch (vo) {
|
||||
case VerifyOption_G1UsePrevMarking: return is_obj_dead(obj);
|
||||
case VerifyOption_G1UseNextMarking: return is_obj_ill(obj);
|
||||
case VerifyOption_G1UseMarkWord: return !obj->is_gc_marked();
|
||||
default: ShouldNotReachHere();
|
||||
}
|
||||
return false; // keep some compilers happy
|
||||
}
|
||||
|
||||
bool allocated_since_marking(oop obj, HeapRegion* hr, VerifyOption vo);
|
||||
HeapWord* top_at_mark_start(HeapRegion* hr, VerifyOption vo);
|
||||
bool is_marked(oop obj, VerifyOption vo);
|
||||
const char* top_at_mark_start_str(VerifyOption vo);
|
||||
|
||||
// The following is just to alert the verification code
|
||||
// that a full collection has occurred and that the
|
||||
// remembered sets are no longer up to date.
|
||||
|
@ -1528,35 +1528,13 @@ public:
|
||||
|
||||
class ParKnownGarbageHRClosure: public HeapRegionClosure {
|
||||
G1CollectedHeap* _g1h;
|
||||
CollectionSetChooser* _hrSorted;
|
||||
uint _marked_regions_added;
|
||||
size_t _reclaimable_bytes_added;
|
||||
uint _chunk_size;
|
||||
uint _cur_chunk_idx;
|
||||
uint _cur_chunk_end; // Cur chunk [_cur_chunk_idx, _cur_chunk_end)
|
||||
|
||||
void get_new_chunk() {
|
||||
_cur_chunk_idx = _hrSorted->claim_array_chunk(_chunk_size);
|
||||
_cur_chunk_end = _cur_chunk_idx + _chunk_size;
|
||||
}
|
||||
void add_region(HeapRegion* r) {
|
||||
if (_cur_chunk_idx == _cur_chunk_end) {
|
||||
get_new_chunk();
|
||||
}
|
||||
assert(_cur_chunk_idx < _cur_chunk_end, "postcondition");
|
||||
_hrSorted->set_region(_cur_chunk_idx, r);
|
||||
_marked_regions_added++;
|
||||
_reclaimable_bytes_added += r->reclaimable_bytes();
|
||||
_cur_chunk_idx++;
|
||||
}
|
||||
CSetChooserParUpdater _cset_updater;
|
||||
|
||||
public:
|
||||
ParKnownGarbageHRClosure(CollectionSetChooser* hrSorted,
|
||||
uint chunk_size) :
|
||||
_g1h(G1CollectedHeap::heap()),
|
||||
_hrSorted(hrSorted), _chunk_size(chunk_size),
|
||||
_marked_regions_added(0), _reclaimable_bytes_added(0),
|
||||
_cur_chunk_idx(0), _cur_chunk_end(0) { }
|
||||
_g1h(G1CollectedHeap::heap()),
|
||||
_cset_updater(hrSorted, true /* parallel */, chunk_size) { }
|
||||
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
// Do we have any marking information for this region?
|
||||
@ -1564,14 +1542,12 @@ public:
|
||||
// We will skip any region that's currently used as an old GC
|
||||
// alloc region (we should not consider those for collection
|
||||
// before we fill them up).
|
||||
if (_hrSorted->should_add(r) && !_g1h->is_old_gc_alloc_region(r)) {
|
||||
add_region(r);
|
||||
if (_cset_updater.should_add(r) && !_g1h->is_old_gc_alloc_region(r)) {
|
||||
_cset_updater.add_region(r);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
uint marked_regions_added() { return _marked_regions_added; }
|
||||
size_t reclaimable_bytes_added() { return _reclaimable_bytes_added; }
|
||||
};
|
||||
|
||||
class ParKnownGarbageTask: public AbstractGangTask {
|
||||
@ -1591,10 +1567,6 @@ public:
|
||||
_g1->heap_region_par_iterate_chunked(&parKnownGarbageCl, worker_id,
|
||||
_g1->workers()->active_workers(),
|
||||
HeapRegion::InitialClaimValue);
|
||||
uint regions_added = parKnownGarbageCl.marked_regions_added();
|
||||
size_t reclaimable_bytes_added =
|
||||
parKnownGarbageCl.reclaimable_bytes_added();
|
||||
_hrSorted->update_totals(regions_added, reclaimable_bytes_added);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -262,18 +262,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// Finds the first HeapRegion.
|
||||
class FindFirstRegionClosure: public HeapRegionClosure {
|
||||
HeapRegion* _a_region;
|
||||
public:
|
||||
FindFirstRegionClosure() : _a_region(NULL) {}
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
_a_region = r;
|
||||
return true;
|
||||
}
|
||||
HeapRegion* result() { return _a_region; }
|
||||
};
|
||||
|
||||
void G1MarkSweep::mark_sweep_phase2() {
|
||||
// Now all live objects are marked, compute the new object addresses.
|
||||
|
||||
@ -294,9 +282,8 @@ void G1MarkSweep::mark_sweep_phase2() {
|
||||
TraceTime tm("phase 2", G1Log::fine() && Verbose, true, gclog_or_tty);
|
||||
GenMarkSweep::trace("2");
|
||||
|
||||
FindFirstRegionClosure cl;
|
||||
g1h->heap_region_iterate(&cl);
|
||||
HeapRegion *r = cl.result();
|
||||
// find the first region
|
||||
HeapRegion* r = g1h->region_at(0);
|
||||
CompactibleSpace* sp = r;
|
||||
if (r->isHumongous() && oop(r->bottom())->is_gc_marked()) {
|
||||
sp = r->next_compaction_space();
|
||||
@ -408,7 +395,3 @@ void G1MarkSweep::mark_sweep_phase4() {
|
||||
g1h->heap_region_iterate(&blk);
|
||||
|
||||
}
|
||||
|
||||
// Local Variables: ***
|
||||
// c-indentation-style: gnu ***
|
||||
// End: ***
|
||||
|
@ -197,7 +197,6 @@ class FilterOutOfRegionClosure: public OopClosure {
|
||||
HeapWord* _r_bottom;
|
||||
HeapWord* _r_end;
|
||||
OopClosure* _oc;
|
||||
int _out_of_region;
|
||||
public:
|
||||
FilterOutOfRegionClosure(HeapRegion* r, OopClosure* oc);
|
||||
template <class T> void do_oop_nv(T* p);
|
||||
@ -205,7 +204,6 @@ public:
|
||||
virtual void do_oop(narrowOop* p) { do_oop_nv(p); }
|
||||
bool apply_to_weak_ref_discovered_field() { return true; }
|
||||
bool do_header() { return false; }
|
||||
int out_of_region() { return _out_of_region; }
|
||||
};
|
||||
|
||||
// Closure for iterating over object fields during concurrent marking
|
||||
|
@ -29,31 +29,22 @@
|
||||
#include "gc_implementation/g1/g1CollectedHeap.hpp"
|
||||
#include "gc_implementation/g1/g1OopClosures.hpp"
|
||||
#include "gc_implementation/g1/g1RemSet.hpp"
|
||||
#include "gc_implementation/g1/heapRegionRemSet.hpp"
|
||||
|
||||
/*
|
||||
* This really ought to be an inline function, but apparently the C++
|
||||
* compiler sometimes sees fit to ignore inline declarations. Sigh.
|
||||
*/
|
||||
|
||||
// This must a ifdef'ed because the counting it controls is in a
|
||||
// perf-critical inner loop.
|
||||
#define FILTERINTOCSCLOSURE_DOHISTOGRAMCOUNT 0
|
||||
|
||||
template <class T>
|
||||
inline void FilterIntoCSClosure::do_oop_nv(T* p) {
|
||||
T heap_oop = oopDesc::load_heap_oop(p);
|
||||
if (!oopDesc::is_null(heap_oop) &&
|
||||
_g1->obj_in_cs(oopDesc::decode_heap_oop_not_null(heap_oop))) {
|
||||
_oc->do_oop(p);
|
||||
#if FILTERINTOCSCLOSURE_DOHISTOGRAMCOUNT
|
||||
if (_dcto_cl != NULL)
|
||||
_dcto_cl->incr_count();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#define FILTEROUTOFREGIONCLOSURE_DOHISTOGRAMCOUNT 0
|
||||
|
||||
template <class T>
|
||||
inline void FilterOutOfRegionClosure::do_oop_nv(T* p) {
|
||||
T heap_oop = oopDesc::load_heap_oop(p);
|
||||
@ -61,9 +52,6 @@ inline void FilterOutOfRegionClosure::do_oop_nv(T* p) {
|
||||
HeapWord* obj_hw = (HeapWord*)oopDesc::decode_heap_oop_not_null(heap_oop);
|
||||
if (obj_hw < _r_bottom || obj_hw >= _r_end) {
|
||||
_oc->do_oop(p);
|
||||
#if FILTEROUTOFREGIONCLOSURE_DOHISTOGRAMCOUNT
|
||||
_out_of_region++;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -182,6 +170,7 @@ inline void G1UpdateRSOrPushRefOopClosure::do_oop_nv(T* p) {
|
||||
#endif // ASSERT
|
||||
|
||||
assert(_from != NULL, "from region must be non-NULL");
|
||||
assert(_from->is_in_reserved(p), "p is not in from");
|
||||
|
||||
HeapRegion* to = _g1->heap_region_containing(obj);
|
||||
if (to != NULL && _from != to) {
|
||||
@ -212,14 +201,16 @@ inline void G1UpdateRSOrPushRefOopClosure::do_oop_nv(T* p) {
|
||||
// or processed (if an evacuation failure occurs) at the end
|
||||
// of the collection.
|
||||
// See G1RemSet::cleanup_after_oops_into_collection_set_do().
|
||||
} else {
|
||||
// We either don't care about pushing references that point into the
|
||||
// collection set (i.e. we're not during an evacuation pause) _or_
|
||||
// the reference doesn't point into the collection set. Either way
|
||||
// we add the reference directly to the RSet of the region containing
|
||||
// the referenced object.
|
||||
_g1_rem_set->par_write_ref(_from, p, _worker_i);
|
||||
return;
|
||||
}
|
||||
|
||||
// We either don't care about pushing references that point into the
|
||||
// collection set (i.e. we're not during an evacuation pause) _or_
|
||||
// the reference doesn't point into the collection set. Either way
|
||||
// we add the reference directly to the RSet of the region containing
|
||||
// the referenced object.
|
||||
assert(to->rem_set() != NULL, "Need per-region 'into' remsets.");
|
||||
to->rem_set()->add_reference(p, _worker_i);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -280,62 +280,6 @@ void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, int worker_i) {
|
||||
_g1p->phase_times()->record_update_rs_time(worker_i, (os::elapsedTime() - start) * 1000.0);
|
||||
}
|
||||
|
||||
class CountRSSizeClosure: public HeapRegionClosure {
|
||||
size_t _n;
|
||||
size_t _tot;
|
||||
size_t _max;
|
||||
HeapRegion* _max_r;
|
||||
enum {
|
||||
N = 20,
|
||||
MIN = 6
|
||||
};
|
||||
int _histo[N];
|
||||
public:
|
||||
CountRSSizeClosure() : _n(0), _tot(0), _max(0), _max_r(NULL) {
|
||||
for (int i = 0; i < N; i++) _histo[i] = 0;
|
||||
}
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (!r->continuesHumongous()) {
|
||||
size_t occ = r->rem_set()->occupied();
|
||||
_n++;
|
||||
_tot += occ;
|
||||
if (occ > _max) {
|
||||
_max = occ;
|
||||
_max_r = r;
|
||||
}
|
||||
// Fit it into a histo bin.
|
||||
int s = 1 << MIN;
|
||||
int i = 0;
|
||||
while (occ > (size_t) s && i < (N-1)) {
|
||||
s = s << 1;
|
||||
i++;
|
||||
}
|
||||
_histo[i]++;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
size_t n() { return _n; }
|
||||
size_t tot() { return _tot; }
|
||||
size_t mx() { return _max; }
|
||||
HeapRegion* mxr() { return _max_r; }
|
||||
void print_histo() {
|
||||
int mx = N;
|
||||
while (mx >= 0) {
|
||||
if (_histo[mx-1] > 0) break;
|
||||
mx--;
|
||||
}
|
||||
gclog_or_tty->print_cr("Number of regions with given RS sizes:");
|
||||
gclog_or_tty->print_cr(" <= %8d %8d", 1 << MIN, _histo[0]);
|
||||
for (int i = 1; i < mx-1; i++) {
|
||||
gclog_or_tty->print_cr(" %8d - %8d %8d",
|
||||
(1 << (MIN + i - 1)) + 1,
|
||||
1 << (MIN + i),
|
||||
_histo[i]);
|
||||
}
|
||||
gclog_or_tty->print_cr(" > %8d %8d", (1 << (MIN+mx-2))+1, _histo[mx-1]);
|
||||
}
|
||||
};
|
||||
|
||||
void G1RemSet::cleanupHRRS() {
|
||||
HeapRegionRemSet::cleanup();
|
||||
}
|
||||
@ -349,17 +293,6 @@ void G1RemSet::oops_into_collection_set_do(OopsInHeapRegionClosure* oc,
|
||||
_cg1r->clear_and_record_card_counts();
|
||||
}
|
||||
|
||||
// Make this into a command-line flag...
|
||||
if (G1RSCountHisto && (ParallelGCThreads == 0 || worker_i == 0)) {
|
||||
CountRSSizeClosure count_cl;
|
||||
_g1->heap_region_iterate(&count_cl);
|
||||
gclog_or_tty->print_cr("Avg of %d RS counts is %f, max is %d, "
|
||||
"max region is " PTR_FORMAT,
|
||||
count_cl.n(), (float)count_cl.tot()/(float)count_cl.n(),
|
||||
count_cl.mx(), count_cl.mxr());
|
||||
count_cl.print_histo();
|
||||
}
|
||||
|
||||
// We cache the value of 'oc' closure into the appropriate slot in the
|
||||
// _cset_rs_update_cl for this worker
|
||||
assert(worker_i < (int)n_workers(), "sanity");
|
||||
@ -568,8 +501,6 @@ void G1RemSet::scrub_par(BitMap* region_bm, BitMap* card_bm,
|
||||
}
|
||||
|
||||
|
||||
static IntHistogram out_of_histo(50, 50);
|
||||
|
||||
|
||||
G1TriggerClosure::G1TriggerClosure() :
|
||||
_triggered(false) { }
|
||||
@ -671,7 +602,6 @@ bool G1RemSet::concurrentRefineOneCard_impl(jbyte* card_ptr, int worker_i,
|
||||
sdcq->enqueue(card_ptr);
|
||||
}
|
||||
} else {
|
||||
out_of_histo.add_entry(filter_then_update_rs_oop_cl.out_of_region());
|
||||
_conc_refine_cards++;
|
||||
}
|
||||
|
||||
@ -862,11 +792,6 @@ void G1RemSet::print_summary_info() {
|
||||
card_repeat_count.print_on(gclog_or_tty);
|
||||
#endif
|
||||
|
||||
if (FILTEROUTOFREGIONCLOSURE_DOHISTOGRAMCOUNT) {
|
||||
gclog_or_tty->print_cr("\nG1 rem-set out-of-region histogram: ");
|
||||
gclog_or_tty->print_cr(" # of CS ptrs --> # of cards with that number.");
|
||||
out_of_histo.print_on(gclog_or_tty);
|
||||
}
|
||||
gclog_or_tty->print_cr("\n Concurrent RS processed %d cards",
|
||||
_conc_refine_cards);
|
||||
DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
|
||||
@ -889,21 +814,24 @@ void G1RemSet::print_summary_info() {
|
||||
|
||||
HRRSStatsIter blk;
|
||||
g1->heap_region_iterate(&blk);
|
||||
gclog_or_tty->print_cr(" Total heap region rem set sizes = " SIZE_FORMAT "K."
|
||||
" Max = " SIZE_FORMAT "K.",
|
||||
gclog_or_tty->print_cr(" Total heap region rem set sizes = "SIZE_FORMAT"K."
|
||||
" Max = "SIZE_FORMAT"K.",
|
||||
blk.total_mem_sz()/K, blk.max_mem_sz()/K);
|
||||
gclog_or_tty->print_cr(" Static structures = " SIZE_FORMAT "K,"
|
||||
" free_lists = " SIZE_FORMAT "K.",
|
||||
HeapRegionRemSet::static_mem_size()/K,
|
||||
HeapRegionRemSet::fl_mem_size()/K);
|
||||
gclog_or_tty->print_cr(" %d occupied cards represented.",
|
||||
gclog_or_tty->print_cr(" Static structures = "SIZE_FORMAT"K,"
|
||||
" free_lists = "SIZE_FORMAT"K.",
|
||||
HeapRegionRemSet::static_mem_size() / K,
|
||||
HeapRegionRemSet::fl_mem_size() / K);
|
||||
gclog_or_tty->print_cr(" "SIZE_FORMAT" occupied cards represented.",
|
||||
blk.occupied());
|
||||
gclog_or_tty->print_cr(" Max sz region = [" PTR_FORMAT ", " PTR_FORMAT " )"
|
||||
", cap = " SIZE_FORMAT "K, occ = " SIZE_FORMAT "K.",
|
||||
blk.max_mem_sz_region()->bottom(), blk.max_mem_sz_region()->end(),
|
||||
(blk.max_mem_sz_region()->rem_set()->mem_size() + K - 1)/K,
|
||||
(blk.max_mem_sz_region()->rem_set()->occupied() + K - 1)/K);
|
||||
gclog_or_tty->print_cr(" Did %d coarsenings.", HeapRegionRemSet::n_coarsenings());
|
||||
HeapRegion* max_mem_sz_region = blk.max_mem_sz_region();
|
||||
HeapRegionRemSet* rem_set = max_mem_sz_region->rem_set();
|
||||
gclog_or_tty->print_cr(" Max size region = "HR_FORMAT", "
|
||||
"size = "SIZE_FORMAT "K, occupied = "SIZE_FORMAT"K.",
|
||||
HR_FORMAT_PARAMS(max_mem_sz_region),
|
||||
(rem_set->mem_size() + K - 1)/K,
|
||||
(rem_set->occupied() + K - 1)/K);
|
||||
gclog_or_tty->print_cr(" Did %d coarsenings.",
|
||||
HeapRegionRemSet::n_coarsenings());
|
||||
}
|
||||
|
||||
void G1RemSet::prepare_for_verify() {
|
||||
|
@ -44,14 +44,11 @@ HeapRegionDCTOC::HeapRegionDCTOC(G1CollectedHeap* g1,
|
||||
CardTableModRefBS::PrecisionStyle precision,
|
||||
FilterKind fk) :
|
||||
ContiguousSpaceDCTOC(hr, cl, precision, NULL),
|
||||
_hr(hr), _fk(fk), _g1(g1)
|
||||
{ }
|
||||
_hr(hr), _fk(fk), _g1(g1) { }
|
||||
|
||||
FilterOutOfRegionClosure::FilterOutOfRegionClosure(HeapRegion* r,
|
||||
OopClosure* oc) :
|
||||
_r_bottom(r->bottom()), _r_end(r->end()),
|
||||
_oc(oc), _out_of_region(0)
|
||||
{}
|
||||
_r_bottom(r->bottom()), _r_end(r->end()), _oc(oc) { }
|
||||
|
||||
class VerifyLiveClosure: public OopClosure {
|
||||
private:
|
||||
@ -512,35 +509,19 @@ HeapRegion::HeapRegion(uint hrs_index,
|
||||
assert(HeapRegionRemSet::num_par_rem_sets() > 0, "Invariant.");
|
||||
}
|
||||
|
||||
class NextCompactionHeapRegionClosure: public HeapRegionClosure {
|
||||
const HeapRegion* _target;
|
||||
bool _target_seen;
|
||||
HeapRegion* _last;
|
||||
CompactibleSpace* _res;
|
||||
public:
|
||||
NextCompactionHeapRegionClosure(const HeapRegion* target) :
|
||||
_target(target), _target_seen(false), _res(NULL) {}
|
||||
bool doHeapRegion(HeapRegion* cur) {
|
||||
if (_target_seen) {
|
||||
if (!cur->isHumongous()) {
|
||||
_res = cur;
|
||||
return true;
|
||||
}
|
||||
} else if (cur == _target) {
|
||||
_target_seen = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
CompactibleSpace* result() { return _res; }
|
||||
};
|
||||
|
||||
CompactibleSpace* HeapRegion::next_compaction_space() const {
|
||||
// We're not using an iterator given that it will wrap around when
|
||||
// it reaches the last region and this is not what we want here.
|
||||
G1CollectedHeap* g1h = G1CollectedHeap::heap();
|
||||
// cast away const-ness
|
||||
HeapRegion* r = (HeapRegion*) this;
|
||||
NextCompactionHeapRegionClosure blk(r);
|
||||
g1h->heap_region_iterate_from(r, &blk);
|
||||
return blk.result();
|
||||
uint index = hrs_index() + 1;
|
||||
while (index < g1h->n_regions()) {
|
||||
HeapRegion* hr = g1h->region_at(index);
|
||||
if (!hr->isHumongous()) {
|
||||
return hr;
|
||||
}
|
||||
index += 1;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void HeapRegion::save_marks() {
|
||||
|
@ -55,7 +55,10 @@ class HeapRegionSetBase;
|
||||
#define HR_FORMAT "%u:(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]"
|
||||
#define HR_FORMAT_PARAMS(_hr_) \
|
||||
(_hr_)->hrs_index(), \
|
||||
(_hr_)->is_survivor() ? "S" : (_hr_)->is_young() ? "E" : "-", \
|
||||
(_hr_)->is_survivor() ? "S" : (_hr_)->is_young() ? "E" : \
|
||||
(_hr_)->startsHumongous() ? "HS" : \
|
||||
(_hr_)->continuesHumongous() ? "HC" : \
|
||||
!(_hr_)->is_empty() ? "O" : "F", \
|
||||
(_hr_)->bottom(), (_hr_)->top(), (_hr_)->end()
|
||||
|
||||
// sentinel value for hrs_index
|
||||
@ -173,6 +176,7 @@ class G1OffsetTableContigSpace: public ContiguousSpace {
|
||||
virtual HeapWord* saved_mark_word() const;
|
||||
virtual void set_saved_mark();
|
||||
void reset_gc_time_stamp() { _gc_time_stamp = 0; }
|
||||
unsigned get_gc_time_stamp() { return _gc_time_stamp; }
|
||||
|
||||
// See the comment above in the declaration of _pre_dummy_top for an
|
||||
// explanation of what it is.
|
||||
@ -439,6 +443,25 @@ class HeapRegion: public G1OffsetTableContigSpace {
|
||||
return _humongous_start_region;
|
||||
}
|
||||
|
||||
// Return the number of distinct regions that are covered by this region:
|
||||
// 1 if the region is not humongous, >= 1 if the region is humongous.
|
||||
uint region_num() const {
|
||||
if (!isHumongous()) {
|
||||
return 1U;
|
||||
} else {
|
||||
assert(startsHumongous(), "doesn't make sense on HC regions");
|
||||
assert(capacity() % HeapRegion::GrainBytes == 0, "sanity");
|
||||
return (uint) (capacity() >> HeapRegion::LogOfHRGrainBytes);
|
||||
}
|
||||
}
|
||||
|
||||
// Return the index + 1 of the last HC regions that's associated
|
||||
// with this HS region.
|
||||
uint last_hc_index() const {
|
||||
assert(startsHumongous(), "don't call this otherwise");
|
||||
return hrs_index() + region_num();
|
||||
}
|
||||
|
||||
// Same as Space::is_in_reserved, but will use the original size of the region.
|
||||
// The original size is different only for start humongous regions. They get
|
||||
// their _end set up to be the end of the last continues region of the
|
||||
@ -622,8 +645,8 @@ class HeapRegion: public G1OffsetTableContigSpace {
|
||||
bool is_marked() { return _prev_top_at_mark_start != bottom(); }
|
||||
|
||||
void reset_during_compaction() {
|
||||
guarantee( isHumongous() && startsHumongous(),
|
||||
"should only be called for humongous regions");
|
||||
assert(isHumongous() && startsHumongous(),
|
||||
"should only be called for starts humongous regions");
|
||||
|
||||
zero_marked_bytes();
|
||||
init_top_at_mark_start();
|
||||
@ -774,7 +797,7 @@ class HeapRegion: public G1OffsetTableContigSpace {
|
||||
virtual void oop_since_save_marks_iterate##nv_suffix(OopClosureType* cl);
|
||||
SPECIALIZED_SINCE_SAVE_MARKS_CLOSURES(HeapRegion_OOP_SINCE_SAVE_MARKS_DECL)
|
||||
|
||||
CompactibleSpace* next_compaction_space() const;
|
||||
virtual CompactibleSpace* next_compaction_space() const;
|
||||
|
||||
virtual void reset_after_compaction();
|
||||
|
||||
|
@ -34,8 +34,6 @@
|
||||
#include "utilities/bitMap.inline.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
// OtherRegionsTable
|
||||
|
||||
class PerRegionTable: public CHeapObj<mtGC> {
|
||||
friend class OtherRegionsTable;
|
||||
friend class HeapRegionRemSetIterator;
|
||||
@ -44,20 +42,18 @@ class PerRegionTable: public CHeapObj<mtGC> {
|
||||
BitMap _bm;
|
||||
jint _occupied;
|
||||
|
||||
// next pointer for free/allocated lis
|
||||
// next pointer for free/allocated 'all' list
|
||||
PerRegionTable* _next;
|
||||
|
||||
// prev pointer for the allocated 'all' list
|
||||
PerRegionTable* _prev;
|
||||
|
||||
// next pointer in collision list
|
||||
PerRegionTable * _collision_list_next;
|
||||
|
||||
// Global free list of PRTs
|
||||
static PerRegionTable* _free_list;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// For some reason even though the classes are marked as friend they are unable
|
||||
// to access CardsPerRegion when private/protected. Only the windows c++ compiler
|
||||
// says this Sun CC and linux gcc don't have a problem with access when private
|
||||
|
||||
public:
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
protected:
|
||||
// We need access in order to union things into the base table.
|
||||
BitMap* bm() { return &_bm; }
|
||||
@ -69,7 +65,8 @@ protected:
|
||||
PerRegionTable(HeapRegion* hr) :
|
||||
_hr(hr),
|
||||
_occupied(0),
|
||||
_bm(HeapRegion::CardsPerRegion, false /* in-resource-area */)
|
||||
_bm(HeapRegion::CardsPerRegion, false /* in-resource-area */),
|
||||
_collision_list_next(NULL), _next(NULL), _prev(NULL)
|
||||
{}
|
||||
|
||||
void add_card_work(CardIdx_t from_card, bool par) {
|
||||
@ -126,9 +123,13 @@ public:
|
||||
return _occupied;
|
||||
}
|
||||
|
||||
void init(HeapRegion* hr) {
|
||||
void init(HeapRegion* hr, bool clear_links_to_all_list) {
|
||||
if (clear_links_to_all_list) {
|
||||
set_next(NULL);
|
||||
set_prev(NULL);
|
||||
}
|
||||
_hr = hr;
|
||||
_next = NULL;
|
||||
_collision_list_next = NULL;
|
||||
_occupied = 0;
|
||||
_bm.clear();
|
||||
}
|
||||
@ -175,22 +176,25 @@ public:
|
||||
return _bm.at(card_ind);
|
||||
}
|
||||
|
||||
PerRegionTable* next() const { return _next; }
|
||||
void set_next(PerRegionTable* nxt) { _next = nxt; }
|
||||
PerRegionTable** next_addr() { return &_next; }
|
||||
|
||||
static void free(PerRegionTable* prt) {
|
||||
// Bulk-free the PRTs from prt to last, assumes that they are
|
||||
// linked together using their _next field.
|
||||
static void bulk_free(PerRegionTable* prt, PerRegionTable* last) {
|
||||
while (true) {
|
||||
PerRegionTable* fl = _free_list;
|
||||
prt->set_next(fl);
|
||||
PerRegionTable* res =
|
||||
(PerRegionTable*)
|
||||
Atomic::cmpxchg_ptr(prt, &_free_list, fl);
|
||||
if (res == fl) return;
|
||||
last->set_next(fl);
|
||||
PerRegionTable* res = (PerRegionTable*) Atomic::cmpxchg_ptr(prt, &_free_list, fl);
|
||||
if (res == fl) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
static void free(PerRegionTable* prt) {
|
||||
bulk_free(prt, prt);
|
||||
}
|
||||
|
||||
// Returns an initialized PerRegionTable instance.
|
||||
static PerRegionTable* alloc(HeapRegion* hr) {
|
||||
PerRegionTable* fl = _free_list;
|
||||
while (fl != NULL) {
|
||||
@ -199,7 +203,7 @@ public:
|
||||
(PerRegionTable*)
|
||||
Atomic::cmpxchg_ptr(nxt, &_free_list, fl);
|
||||
if (res == fl) {
|
||||
fl->init(hr);
|
||||
fl->init(hr, true);
|
||||
return fl;
|
||||
} else {
|
||||
fl = _free_list;
|
||||
@ -209,6 +213,31 @@ public:
|
||||
return new PerRegionTable(hr);
|
||||
}
|
||||
|
||||
PerRegionTable* next() const { return _next; }
|
||||
void set_next(PerRegionTable* next) { _next = next; }
|
||||
PerRegionTable* prev() const { return _prev; }
|
||||
void set_prev(PerRegionTable* prev) { _prev = prev; }
|
||||
|
||||
// Accessor and Modification routines for the pointer for the
|
||||
// singly linked collision list that links the PRTs within the
|
||||
// OtherRegionsTable::_fine_grain_regions hash table.
|
||||
//
|
||||
// It might be useful to also make the collision list doubly linked
|
||||
// to avoid iteration over the collisions list during scrubbing/deletion.
|
||||
// OTOH there might not be many collisions.
|
||||
|
||||
PerRegionTable* collision_list_next() const {
|
||||
return _collision_list_next;
|
||||
}
|
||||
|
||||
void set_collision_list_next(PerRegionTable* next) {
|
||||
_collision_list_next = next;
|
||||
}
|
||||
|
||||
PerRegionTable** collision_list_next_addr() {
|
||||
return &_collision_list_next;
|
||||
}
|
||||
|
||||
static size_t fl_mem_size() {
|
||||
PerRegionTable* cur = _free_list;
|
||||
size_t res = 0;
|
||||
@ -234,6 +263,7 @@ OtherRegionsTable::OtherRegionsTable(HeapRegion* hr) :
|
||||
_coarse_map(G1CollectedHeap::heap()->max_regions(),
|
||||
false /* in-resource-area */),
|
||||
_fine_grain_regions(NULL),
|
||||
_first_all_fine_prts(NULL), _last_all_fine_prts(NULL),
|
||||
_n_fine_entries(0), _n_coarse_entries(0),
|
||||
_fine_eviction_start(0),
|
||||
_sparse_table(hr)
|
||||
@ -264,6 +294,66 @@ OtherRegionsTable::OtherRegionsTable(HeapRegion* hr) :
|
||||
}
|
||||
}
|
||||
|
||||
void OtherRegionsTable::link_to_all(PerRegionTable* prt) {
|
||||
// We always append to the beginning of the list for convenience;
|
||||
// the order of entries in this list does not matter.
|
||||
if (_first_all_fine_prts != NULL) {
|
||||
assert(_first_all_fine_prts->prev() == NULL, "invariant");
|
||||
_first_all_fine_prts->set_prev(prt);
|
||||
prt->set_next(_first_all_fine_prts);
|
||||
} else {
|
||||
// this is the first element we insert. Adjust the "last" pointer
|
||||
_last_all_fine_prts = prt;
|
||||
assert(prt->next() == NULL, "just checking");
|
||||
}
|
||||
// the new element is always the first element without a predecessor
|
||||
prt->set_prev(NULL);
|
||||
_first_all_fine_prts = prt;
|
||||
|
||||
assert(prt->prev() == NULL, "just checking");
|
||||
assert(_first_all_fine_prts == prt, "just checking");
|
||||
assert((_first_all_fine_prts == NULL && _last_all_fine_prts == NULL) ||
|
||||
(_first_all_fine_prts != NULL && _last_all_fine_prts != NULL),
|
||||
"just checking");
|
||||
assert(_last_all_fine_prts == NULL || _last_all_fine_prts->next() == NULL,
|
||||
"just checking");
|
||||
assert(_first_all_fine_prts == NULL || _first_all_fine_prts->prev() == NULL,
|
||||
"just checking");
|
||||
}
|
||||
|
||||
void OtherRegionsTable::unlink_from_all(PerRegionTable* prt) {
|
||||
if (prt->prev() != NULL) {
|
||||
assert(_first_all_fine_prts != prt, "just checking");
|
||||
prt->prev()->set_next(prt->next());
|
||||
// removing the last element in the list?
|
||||
if (_last_all_fine_prts == prt) {
|
||||
_last_all_fine_prts = prt->prev();
|
||||
}
|
||||
} else {
|
||||
assert(_first_all_fine_prts == prt, "just checking");
|
||||
_first_all_fine_prts = prt->next();
|
||||
// list is empty now?
|
||||
if (_first_all_fine_prts == NULL) {
|
||||
_last_all_fine_prts = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (prt->next() != NULL) {
|
||||
prt->next()->set_prev(prt->prev());
|
||||
}
|
||||
|
||||
prt->set_next(NULL);
|
||||
prt->set_prev(NULL);
|
||||
|
||||
assert((_first_all_fine_prts == NULL && _last_all_fine_prts == NULL) ||
|
||||
(_first_all_fine_prts != NULL && _last_all_fine_prts != NULL),
|
||||
"just checking");
|
||||
assert(_last_all_fine_prts == NULL || _last_all_fine_prts->next() == NULL,
|
||||
"just checking");
|
||||
assert(_first_all_fine_prts == NULL || _first_all_fine_prts->prev() == NULL,
|
||||
"just checking");
|
||||
}
|
||||
|
||||
int** OtherRegionsTable::_from_card_cache = NULL;
|
||||
size_t OtherRegionsTable::_from_card_cache_max_regions = 0;
|
||||
size_t OtherRegionsTable::_from_card_cache_mem_size = 0;
|
||||
@ -386,13 +476,16 @@ void OtherRegionsTable::add_reference(OopOrNarrowOopStar from, int tid) {
|
||||
|
||||
if (_n_fine_entries == _max_fine_entries) {
|
||||
prt = delete_region_table();
|
||||
// There is no need to clear the links to the 'all' list here:
|
||||
// prt will be reused immediately, i.e. remain in the 'all' list.
|
||||
prt->init(from_hr, false /* clear_links_to_all_list */);
|
||||
} else {
|
||||
prt = PerRegionTable::alloc(from_hr);
|
||||
link_to_all(prt);
|
||||
}
|
||||
prt->init(from_hr);
|
||||
|
||||
PerRegionTable* first_prt = _fine_grain_regions[ind];
|
||||
prt->set_next(first_prt); // XXX Maybe move to init?
|
||||
prt->set_collision_list_next(first_prt);
|
||||
_fine_grain_regions[ind] = prt;
|
||||
_n_fine_entries++;
|
||||
|
||||
@ -438,7 +531,7 @@ OtherRegionsTable::find_region_table(size_t ind, HeapRegion* hr) const {
|
||||
assert(0 <= ind && ind < _max_fine_entries, "Preconditions.");
|
||||
PerRegionTable* prt = _fine_grain_regions[ind];
|
||||
while (prt != NULL && prt->hr() != hr) {
|
||||
prt = prt->next();
|
||||
prt = prt->collision_list_next();
|
||||
}
|
||||
// Loop postcondition is the method postcondition.
|
||||
return prt;
|
||||
@ -473,8 +566,8 @@ PerRegionTable* OtherRegionsTable::delete_region_table() {
|
||||
max_ind = i;
|
||||
max_occ = cur_occ;
|
||||
}
|
||||
prev = cur->next_addr();
|
||||
cur = cur->next();
|
||||
prev = cur->collision_list_next_addr();
|
||||
cur = cur->collision_list_next();
|
||||
}
|
||||
i = i + _fine_eviction_stride;
|
||||
if (i >= _n_fine_entries) i = i - _n_fine_entries;
|
||||
@ -503,7 +596,7 @@ PerRegionTable* OtherRegionsTable::delete_region_table() {
|
||||
}
|
||||
|
||||
// Unsplice.
|
||||
*max_prev = max->next();
|
||||
*max_prev = max->collision_list_next();
|
||||
Atomic::inc(&_n_coarsenings);
|
||||
_n_fine_entries--;
|
||||
return max;
|
||||
@ -534,7 +627,7 @@ void OtherRegionsTable::scrub(CardTableModRefBS* ctbs,
|
||||
PerRegionTable* cur = _fine_grain_regions[i];
|
||||
PerRegionTable** prev = &_fine_grain_regions[i];
|
||||
while (cur != NULL) {
|
||||
PerRegionTable* nxt = cur->next();
|
||||
PerRegionTable* nxt = cur->collision_list_next();
|
||||
// If the entire region is dead, eliminate.
|
||||
if (G1RSScrubVerbose) {
|
||||
gclog_or_tty->print_cr(" For other region %u:",
|
||||
@ -542,11 +635,12 @@ void OtherRegionsTable::scrub(CardTableModRefBS* ctbs,
|
||||
}
|
||||
if (!region_bm->at((size_t) cur->hr()->hrs_index())) {
|
||||
*prev = nxt;
|
||||
cur->set_next(NULL);
|
||||
cur->set_collision_list_next(NULL);
|
||||
_n_fine_entries--;
|
||||
if (G1RSScrubVerbose) {
|
||||
gclog_or_tty->print_cr(" deleted via region map.");
|
||||
}
|
||||
unlink_from_all(cur);
|
||||
PerRegionTable::free(cur);
|
||||
} else {
|
||||
// Do fine-grain elimination.
|
||||
@ -560,11 +654,12 @@ void OtherRegionsTable::scrub(CardTableModRefBS* ctbs,
|
||||
// Did that empty the table completely?
|
||||
if (cur->occupied() == 0) {
|
||||
*prev = nxt;
|
||||
cur->set_next(NULL);
|
||||
cur->set_collision_list_next(NULL);
|
||||
_n_fine_entries--;
|
||||
unlink_from_all(cur);
|
||||
PerRegionTable::free(cur);
|
||||
} else {
|
||||
prev = cur->next_addr();
|
||||
prev = cur->collision_list_next_addr();
|
||||
}
|
||||
}
|
||||
cur = nxt;
|
||||
@ -587,13 +682,15 @@ size_t OtherRegionsTable::occupied() const {
|
||||
|
||||
size_t OtherRegionsTable::occ_fine() const {
|
||||
size_t sum = 0;
|
||||
for (size_t i = 0; i < _max_fine_entries; i++) {
|
||||
PerRegionTable* cur = _fine_grain_regions[i];
|
||||
while (cur != NULL) {
|
||||
sum += cur->occupied();
|
||||
cur = cur->next();
|
||||
}
|
||||
|
||||
size_t num = 0;
|
||||
PerRegionTable * cur = _first_all_fine_prts;
|
||||
while (cur != NULL) {
|
||||
sum += cur->occupied();
|
||||
cur = cur->next();
|
||||
num++;
|
||||
}
|
||||
guarantee(num == _n_fine_entries, "just checking");
|
||||
return sum;
|
||||
}
|
||||
|
||||
@ -609,12 +706,10 @@ size_t OtherRegionsTable::mem_size() const {
|
||||
// Cast away const in this case.
|
||||
MutexLockerEx x((Mutex*)&_m, Mutex::_no_safepoint_check_flag);
|
||||
size_t sum = 0;
|
||||
for (size_t i = 0; i < _max_fine_entries; i++) {
|
||||
PerRegionTable* cur = _fine_grain_regions[i];
|
||||
while (cur != NULL) {
|
||||
sum += cur->mem_size();
|
||||
cur = cur->next();
|
||||
}
|
||||
PerRegionTable * cur = _first_all_fine_prts;
|
||||
while (cur != NULL) {
|
||||
sum += cur->mem_size();
|
||||
cur = cur->next();
|
||||
}
|
||||
sum += (sizeof(PerRegionTable*) * _max_fine_entries);
|
||||
sum += (_coarse_map.size_in_words() * HeapWordSize);
|
||||
@ -632,22 +727,24 @@ size_t OtherRegionsTable::fl_mem_size() {
|
||||
}
|
||||
|
||||
void OtherRegionsTable::clear_fcc() {
|
||||
size_t hrs_idx = hr()->hrs_index();
|
||||
for (int i = 0; i < HeapRegionRemSet::num_par_rem_sets(); i++) {
|
||||
_from_card_cache[i][hr()->hrs_index()] = -1;
|
||||
_from_card_cache[i][hrs_idx] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void OtherRegionsTable::clear() {
|
||||
MutexLockerEx x(&_m, Mutex::_no_safepoint_check_flag);
|
||||
for (size_t i = 0; i < _max_fine_entries; i++) {
|
||||
PerRegionTable* cur = _fine_grain_regions[i];
|
||||
while (cur != NULL) {
|
||||
PerRegionTable* nxt = cur->next();
|
||||
PerRegionTable::free(cur);
|
||||
cur = nxt;
|
||||
}
|
||||
_fine_grain_regions[i] = NULL;
|
||||
// if there are no entries, skip this step
|
||||
if (_first_all_fine_prts != NULL) {
|
||||
guarantee(_first_all_fine_prts != NULL && _last_all_fine_prts != NULL, "just checking");
|
||||
PerRegionTable::bulk_free(_first_all_fine_prts, _last_all_fine_prts);
|
||||
memset(_fine_grain_regions, 0, _max_fine_entries * sizeof(_fine_grain_regions[0]));
|
||||
} else {
|
||||
guarantee(_first_all_fine_prts == NULL && _last_all_fine_prts == NULL, "just checking");
|
||||
}
|
||||
|
||||
_first_all_fine_prts = _last_all_fine_prts = NULL;
|
||||
_sparse_table.clear();
|
||||
_coarse_map.clear();
|
||||
_n_fine_entries = 0;
|
||||
@ -686,12 +783,13 @@ bool OtherRegionsTable::del_single_region_table(size_t ind,
|
||||
PerRegionTable** prev_addr = &_fine_grain_regions[ind];
|
||||
PerRegionTable* prt = *prev_addr;
|
||||
while (prt != NULL && prt->hr() != hr) {
|
||||
prev_addr = prt->next_addr();
|
||||
prt = prt->next();
|
||||
prev_addr = prt->collision_list_next_addr();
|
||||
prt = prt->collision_list_next();
|
||||
}
|
||||
if (prt != NULL) {
|
||||
assert(prt->hr() == hr, "Loop postcondition.");
|
||||
*prev_addr = prt->next();
|
||||
*prev_addr = prt->collision_list_next();
|
||||
unlink_from_all(prt);
|
||||
PerRegionTable::free(prt);
|
||||
_n_fine_entries--;
|
||||
return true;
|
||||
@ -793,7 +891,6 @@ void HeapRegionRemSet::print() const {
|
||||
G1CollectedHeap::heap()->bot_shared()->address_for_index(card_index);
|
||||
gclog_or_tty->print_cr(" Card " PTR_FORMAT, card_start);
|
||||
}
|
||||
|
||||
if (iter.n_yielded() != occupied()) {
|
||||
gclog_or_tty->print_cr("Yielded disagrees with occupied:");
|
||||
gclog_or_tty->print_cr(" %6d yielded (%6d coarse, %6d fine).",
|
||||
@ -905,7 +1002,7 @@ bool HeapRegionRemSetIterator::fine_has_next(size_t& card_index) {
|
||||
while (!fine_has_next()) {
|
||||
if (_cur_region_cur_card == (size_t) HeapRegion::CardsPerRegion) {
|
||||
_cur_region_cur_card = 0;
|
||||
_fine_cur_prt = _fine_cur_prt->next();
|
||||
_fine_cur_prt = _fine_cur_prt->collision_list_next();
|
||||
}
|
||||
if (_fine_cur_prt == NULL) {
|
||||
fine_find_next_non_null_prt();
|
||||
|
@ -82,6 +82,14 @@ class OtherRegionsTable VALUE_OBJ_CLASS_SPEC {
|
||||
PerRegionTable** _fine_grain_regions;
|
||||
size_t _n_fine_entries;
|
||||
|
||||
// The fine grain remembered sets are doubly linked together using
|
||||
// their 'next' and 'prev' fields.
|
||||
// This allows fast bulk freeing of all the fine grain remembered
|
||||
// set entries, and fast finding of all of them without iterating
|
||||
// over the _fine_grain_regions table.
|
||||
PerRegionTable * _first_all_fine_prts;
|
||||
PerRegionTable * _last_all_fine_prts;
|
||||
|
||||
// Used to sample a subset of the fine grain PRTs to determine which
|
||||
// PRT to evict and coarsen.
|
||||
size_t _fine_eviction_start;
|
||||
@ -114,6 +122,11 @@ class OtherRegionsTable VALUE_OBJ_CLASS_SPEC {
|
||||
static size_t _from_card_cache_max_regions;
|
||||
static size_t _from_card_cache_mem_size;
|
||||
|
||||
// link/add the given fine grain remembered set into the "all" list
|
||||
void link_to_all(PerRegionTable * prt);
|
||||
// unlink/remove the given fine grain remembered set into the "all" list
|
||||
void unlink_from_all(PerRegionTable * prt);
|
||||
|
||||
public:
|
||||
OtherRegionsTable(HeapRegion* hr);
|
||||
|
||||
|
@ -35,14 +35,6 @@ void HeapRegionSetBase::set_unrealistically_long_length(uint len) {
|
||||
_unrealistically_long_length = len;
|
||||
}
|
||||
|
||||
uint HeapRegionSetBase::calculate_region_num(HeapRegion* hr) {
|
||||
assert(hr->startsHumongous(), "pre-condition");
|
||||
assert(hr->capacity() % HeapRegion::GrainBytes == 0, "invariant");
|
||||
uint region_num = (uint) (hr->capacity() >> HeapRegion::LogOfHRGrainBytes);
|
||||
assert(region_num > 0, "sanity");
|
||||
return region_num;
|
||||
}
|
||||
|
||||
void HeapRegionSetBase::fill_in_ext_msg(hrs_ext_msg* msg, const char* message) {
|
||||
msg->append("[%s] %s ln: %u rn: %u cy: "SIZE_FORMAT" ud: "SIZE_FORMAT,
|
||||
name(), message, length(), region_num(),
|
||||
@ -152,11 +144,7 @@ void HeapRegionSetBase::verify_next_region(HeapRegion* hr) {
|
||||
guarantee(verify_region(hr, this), hrs_ext_msg(this, "region verification"));
|
||||
|
||||
_calc_length += 1;
|
||||
if (!hr->isHumongous()) {
|
||||
_calc_region_num += 1;
|
||||
} else {
|
||||
_calc_region_num += calculate_region_num(hr);
|
||||
}
|
||||
_calc_region_num += hr->region_num();
|
||||
_calc_total_capacity_bytes += hr->capacity();
|
||||
_calc_total_used_bytes += hr->used();
|
||||
}
|
||||
@ -292,7 +280,7 @@ void HeapRegionLinkedList::add_as_head(HeapRegionLinkedList* from_list) {
|
||||
assert(length() > 0 && _tail != NULL, hrs_ext_msg(this, "invariant"));
|
||||
from_list->_tail->set_next(_head);
|
||||
} else {
|
||||
assert(length() == 0 && _head == NULL, hrs_ext_msg(this, "invariant"));
|
||||
assert(length() == 0 && _tail == NULL, hrs_ext_msg(this, "invariant"));
|
||||
_tail = from_list->_tail;
|
||||
}
|
||||
_head = from_list->_head;
|
||||
|
@ -62,8 +62,6 @@ class HeapRegionSetBase VALUE_OBJ_CLASS_SPEC {
|
||||
friend class VMStructs;
|
||||
|
||||
protected:
|
||||
static uint calculate_region_num(HeapRegion* hr);
|
||||
|
||||
static uint _unrealistically_long_length;
|
||||
|
||||
// The number of regions added to the set. If the set contains
|
||||
|
@ -33,11 +33,7 @@ inline void HeapRegionSetBase::update_for_addition(HeapRegion* hr) {
|
||||
// Assumes the caller has already verified the region.
|
||||
|
||||
_length += 1;
|
||||
if (!hr->isHumongous()) {
|
||||
_region_num += 1;
|
||||
} else {
|
||||
_region_num += calculate_region_num(hr);
|
||||
}
|
||||
_region_num += hr->region_num();
|
||||
_total_used_bytes += hr->used();
|
||||
}
|
||||
|
||||
@ -54,12 +50,7 @@ inline void HeapRegionSetBase::update_for_removal(HeapRegion* hr) {
|
||||
assert(_length > 0, hrs_ext_msg(this, "pre-condition"));
|
||||
_length -= 1;
|
||||
|
||||
uint region_num_diff;
|
||||
if (!hr->isHumongous()) {
|
||||
region_num_diff = 1;
|
||||
} else {
|
||||
region_num_diff = calculate_region_num(hr);
|
||||
}
|
||||
uint region_num_diff = hr->region_num();
|
||||
assert(region_num_diff <= _region_num,
|
||||
hrs_err_msg("[%s] region's region num: %u "
|
||||
"should be <= region num: %u",
|
||||
|
@ -91,6 +91,18 @@ bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const cha
|
||||
return decoder->decode(addr, buf, buflen, offset, modulepath);
|
||||
}
|
||||
|
||||
bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const void* base) {
|
||||
assert(_shared_decoder_lock != NULL, "Just check");
|
||||
bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
|
||||
MutexLockerEx locker(error_handling_thread ? NULL : _shared_decoder_lock, true);
|
||||
AbstractDecoder* decoder = error_handling_thread ?
|
||||
get_error_handler_instance(): get_shared_instance();
|
||||
assert(decoder != NULL, "null decoder");
|
||||
|
||||
return decoder->decode(addr, buf, buflen, offset, base);
|
||||
}
|
||||
|
||||
|
||||
bool Decoder::demangle(const char* symbol, char* buf, int buflen) {
|
||||
assert(_shared_decoder_lock != NULL, "Just check");
|
||||
bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
|
||||
|
@ -47,6 +47,8 @@ public:
|
||||
// the function
|
||||
virtual bool decode(address pc, char* buf, int buflen, int* offset,
|
||||
const char* modulepath = NULL) = 0;
|
||||
virtual bool decode(address pc, char* buf, int buflen, int* offset, const void* base) = 0;
|
||||
|
||||
// demangle a C++ symbol
|
||||
virtual bool demangle(const char* symbol, char* buf, int buflen) = 0;
|
||||
// if the decoder can decode symbols in vm
|
||||
@ -82,6 +84,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool decode(address pc, char* buf, int buflen, int* offset, const void* base) {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool demangle(const char* symbol, char* buf, int buflen) {
|
||||
return false;
|
||||
}
|
||||
@ -95,6 +101,7 @@ public:
|
||||
class Decoder : AllStatic {
|
||||
public:
|
||||
static bool decode(address pc, char* buf, int buflen, int* offset, const char* modulepath = NULL);
|
||||
static bool decode(address pc, char* buf, int buflen, int* offset, const void* base);
|
||||
static bool demangle(const char* symbol, char* buf, int buflen);
|
||||
static bool can_decode_C_frame_in_vm();
|
||||
|
||||
|
@ -43,6 +43,10 @@ public:
|
||||
|
||||
bool demangle(const char* symbol, char *buf, int buflen);
|
||||
bool decode(address addr, char *buf, int buflen, int* offset, const char* filepath = NULL);
|
||||
bool decode(address addr, char *buf, int buflen, int* offset, const void *base) {
|
||||
ShouldNotReachHere();
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
ElfFile* get_elf_file(const char* filepath);
|
||||
|
@ -135,7 +135,7 @@ template <class T, MEMFLAGS F> void Hashtable<T, F>::move_to(Hashtable<T, F>* ne
|
||||
// walking the hashtable past these entries requires
|
||||
// BasicHashtableEntry::make_ptr() call.
|
||||
bool keep_shared = p->is_shared();
|
||||
unlink_entry(p);
|
||||
this->unlink_entry(p);
|
||||
new_table->add_entry(index, p);
|
||||
if (keep_shared) {
|
||||
p->set_shared();
|
||||
|
@ -260,7 +260,7 @@ protected:
|
||||
}
|
||||
|
||||
int index_for(Symbol* name) {
|
||||
return hash_to_index(compute_hash(name));
|
||||
return this->hash_to_index(compute_hash(name));
|
||||
}
|
||||
|
||||
// Table entry management
|
||||
|
@ -171,3 +171,4 @@ b92353a01aa049bc508fc56f0347d5934b7c4390 jdk8-b45
|
||||
00b22b23269a57d0bb46c57753be2fe9a9d2c1a3 jdk8-b47
|
||||
3e4ab821f46166fcf63e8fe5c8046216003c941f jdk8-b48
|
||||
51707c3b75c0f521794d9ab425f4e5b2351c70c1 jdk8-b49
|
||||
e4bae5c53fca8fcb9393d47fd36a34b9e2e8d4ec jdk8-b50
|
||||
|
@ -237,7 +237,7 @@ ifeq ($(PLATFORM), macosx)
|
||||
SUBDIRS += apple
|
||||
endif
|
||||
SUBDIRS_tools = launchers
|
||||
SUBDIRS_misc = org sunw jpda
|
||||
SUBDIRS_misc = org jpda
|
||||
|
||||
# demos
|
||||
ifndef NO_DEMOS
|
||||
|
@ -305,8 +305,7 @@ SOURCES = \
|
||||
org/ietf \
|
||||
org/omg \
|
||||
org/w3c/dom \
|
||||
org/xml/sax \
|
||||
sunw
|
||||
org/xml/sax
|
||||
#
|
||||
# Directories where sources may be found. If a file with the same path
|
||||
# name exists in more than one of these places, the one found last on this
|
||||
|
@ -33,7 +33,6 @@ EXCLUDE_PKGS = \
|
||||
java.awt.peer \
|
||||
java.awt.dnd.peer \
|
||||
sun.* \
|
||||
sunw.* \
|
||||
com.sun.* \
|
||||
org.apache.* \
|
||||
org.jcp.* \
|
||||
|
@ -221,8 +221,6 @@ FILES_src = \
|
||||
sun/nio/cs/HistoricallyNamedCharset.java \
|
||||
sun/nio/cs/ISO_8859_1.java \
|
||||
sun/nio/cs/SingleByte.java \
|
||||
sun/nio/cs/SingleByteDecoder.java \
|
||||
sun/nio/cs/SingleByteEncoder.java \
|
||||
sun/nio/cs/StreamEncoder.java \
|
||||
sun/nio/cs/StreamDecoder.java \
|
||||
sun/nio/cs/Surrogate.java \
|
||||
|
@ -282,6 +282,9 @@ FILES_java += \
|
||||
sun/nio/fs/BsdFileSystem.java \
|
||||
sun/nio/fs/BsdFileSystemProvider.java \
|
||||
sun/nio/fs/BsdNativeDispatcher.java \
|
||||
sun/nio/fs/MacOSXFileSystemProvider.java \
|
||||
sun/nio/fs/MacOSXFileSystem.java \
|
||||
sun/nio/fs/MacOSXNativeDispatcher.java \
|
||||
sun/nio/fs/PollingWatchService.java \
|
||||
sun/nio/fs/UnixChannelFactory.java \
|
||||
sun/nio/fs/UnixCopyFile.java \
|
||||
@ -311,6 +314,7 @@ FILES_c += \
|
||||
\
|
||||
GnomeFileTypeDetector.c \
|
||||
BsdNativeDispatcher.c \
|
||||
MacOSXNativeDispatcher.c \
|
||||
UnixCopyFile.c \
|
||||
UnixNativeDispatcher.c \
|
||||
\
|
||||
@ -385,7 +389,7 @@ ifeq ($(PLATFORM), linux)
|
||||
OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
|
||||
endif
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread
|
||||
OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread -framework CoreFoundation
|
||||
endif
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 $(LIBDL) -lsendfile \
|
||||
|
@ -34,8 +34,6 @@ FILES_java = \
|
||||
sun/nio/cs/HistoricallyNamedCharset.java \
|
||||
sun/nio/cs/Surrogate.java \
|
||||
sun/nio/cs/CharsetMapping.java \
|
||||
sun/nio/cs/SingleByteEncoder.java \
|
||||
sun/nio/cs/SingleByteDecoder.java \
|
||||
sun/nio/cs/UnicodeEncoder.java \
|
||||
sun/nio/cs/UnicodeDecoder.java \
|
||||
sun/nio/cs/ISO_8859_1.java \
|
||||
|
@ -127,7 +127,17 @@ FILES_gen_extcs = \
|
||||
sun/nio/cs/ext/MS949.java \
|
||||
sun/nio/cs/ext/MS950.java \
|
||||
sun/nio/cs/ext/GBK.java \
|
||||
sun/nio/cs/ext/Big5.java
|
||||
sun/nio/cs/ext/Big5.java \
|
||||
sun/nio/cs/ext/SJIS.java \
|
||||
sun/nio/cs/ext/PCK.java \
|
||||
sun/nio/cs/ext/JIS_X_0201.java \
|
||||
sun/nio/cs/ext/JIS_X_0208.java \
|
||||
sun/nio/cs/ext/JIS_X_0208_MS5022X.java \
|
||||
sun/nio/cs/ext/JIS_X_0208_MS932.java \
|
||||
sun/nio/cs/ext/JIS_X_0208_Solaris.java \
|
||||
sun/nio/cs/ext/JIS_X_0212.java \
|
||||
sun/nio/cs/ext/JIS_X_0212_MS5022X.java \
|
||||
sun/nio/cs/ext/JIS_X_0212_Solaris.java
|
||||
|
||||
FILES_java = $(FILES_src) $(FILES_gen_extcs)
|
||||
|
||||
|
@ -54,7 +54,7 @@ public class $NAME_CLZ$ extends Charset
|
||||
|
||||
public CharsetEncoder newEncoder() {
|
||||
initc2b();
|
||||
return new DoubleByte.Encoder$ENCTYPE$(this, c2b, c2bIndex);
|
||||
return new DoubleByte.Encoder$ENCTYPE$(this, $ENC_REPLACEMENT$ c2b, c2bIndex);
|
||||
}
|
||||
|
||||
$B2C$
|
||||
|
2
jdk/make/tools/CharsetMapping/JIS_X_0201.c2b
Normal file
2
jdk/make/tools/CharsetMapping/JIS_X_0201.c2b
Normal file
@ -0,0 +1,2 @@
|
||||
0x7e 0x203e
|
||||
0x5c 0x00a5
|
@ -1,257 +1,192 @@
|
||||
#Generated from JIS_X_0201.java
|
||||
0x00 U+0000
|
||||
0x01 U+0001
|
||||
0x02 U+0002
|
||||
0x03 U+0003
|
||||
0x04 U+0004
|
||||
0x05 U+0005
|
||||
0x06 U+0006
|
||||
0x07 U+0007
|
||||
0x08 U+0008
|
||||
0x09 U+0009
|
||||
0x0a U+000a
|
||||
0x0b U+000b
|
||||
0x0c U+000c
|
||||
0x0d U+000d
|
||||
0x0e U+000e
|
||||
0x0f U+000f
|
||||
0x10 U+0010
|
||||
0x11 U+0011
|
||||
0x12 U+0012
|
||||
0x13 U+0013
|
||||
0x14 U+0014
|
||||
0x15 U+0015
|
||||
0x16 U+0016
|
||||
0x17 U+0017
|
||||
0x18 U+0018
|
||||
0x19 U+0019
|
||||
0x1a U+001a
|
||||
0x1b U+001b
|
||||
0x1c U+001c
|
||||
0x1d U+001d
|
||||
0x1e U+001e
|
||||
0x1f U+001f
|
||||
0x20 U+0020
|
||||
0x21 U+0021
|
||||
0x22 U+0022
|
||||
0x23 U+0023
|
||||
0x24 U+0024
|
||||
0x25 U+0025
|
||||
0x26 U+0026
|
||||
0x27 U+0027
|
||||
0x28 U+0028
|
||||
0x29 U+0029
|
||||
0x2a U+002a
|
||||
0x2b U+002b
|
||||
0x2c U+002c
|
||||
0x2d U+002d
|
||||
0x2e U+002e
|
||||
0x2f U+002f
|
||||
0x30 U+0030
|
||||
0x31 U+0031
|
||||
0x32 U+0032
|
||||
0x33 U+0033
|
||||
0x34 U+0034
|
||||
0x35 U+0035
|
||||
0x36 U+0036
|
||||
0x37 U+0037
|
||||
0x38 U+0038
|
||||
0x39 U+0039
|
||||
0x3a U+003a
|
||||
0x3b U+003b
|
||||
0x3c U+003c
|
||||
0x3d U+003d
|
||||
0x3e U+003e
|
||||
0x3f U+003f
|
||||
0x40 U+0040
|
||||
0x41 U+0041
|
||||
0x42 U+0042
|
||||
0x43 U+0043
|
||||
0x44 U+0044
|
||||
0x45 U+0045
|
||||
0x46 U+0046
|
||||
0x47 U+0047
|
||||
0x48 U+0048
|
||||
0x49 U+0049
|
||||
0x4a U+004a
|
||||
0x4b U+004b
|
||||
0x4c U+004c
|
||||
0x4d U+004d
|
||||
0x4e U+004e
|
||||
0x4f U+004f
|
||||
0x50 U+0050
|
||||
0x51 U+0051
|
||||
0x52 U+0052
|
||||
0x53 U+0053
|
||||
0x54 U+0054
|
||||
0x55 U+0055
|
||||
0x56 U+0056
|
||||
0x57 U+0057
|
||||
0x58 U+0058
|
||||
0x59 U+0059
|
||||
0x5a U+005a
|
||||
0x5b U+005b
|
||||
0x5c U+005c
|
||||
0x5d U+005d
|
||||
0x5e U+005e
|
||||
0x5f U+005f
|
||||
0x60 U+0060
|
||||
0x61 U+0061
|
||||
0x62 U+0062
|
||||
0x63 U+0063
|
||||
0x64 U+0064
|
||||
0x65 U+0065
|
||||
0x66 U+0066
|
||||
0x67 U+0067
|
||||
0x68 U+0068
|
||||
0x69 U+0069
|
||||
0x6a U+006a
|
||||
0x6b U+006b
|
||||
0x6c U+006c
|
||||
0x6d U+006d
|
||||
0x6e U+006e
|
||||
0x6f U+006f
|
||||
0x70 U+0070
|
||||
0x71 U+0071
|
||||
0x72 U+0072
|
||||
0x73 U+0073
|
||||
0x74 U+0074
|
||||
0x75 U+0075
|
||||
0x76 U+0076
|
||||
0x77 U+0077
|
||||
0x78 U+0078
|
||||
0x79 U+0079
|
||||
0x7a U+007a
|
||||
0x7b U+007b
|
||||
0x7c U+007c
|
||||
0x7d U+007d
|
||||
0x7e U+007e
|
||||
0x7f U+007f
|
||||
0x80 U+fffd
|
||||
0x81 U+fffd
|
||||
0x82 U+fffd
|
||||
0x83 U+fffd
|
||||
0x84 U+fffd
|
||||
0x85 U+fffd
|
||||
0x86 U+fffd
|
||||
0x87 U+fffd
|
||||
0x88 U+fffd
|
||||
0x89 U+fffd
|
||||
0x8a U+fffd
|
||||
0x8b U+fffd
|
||||
0x8c U+fffd
|
||||
0x8d U+fffd
|
||||
0x8e U+fffd
|
||||
0x8f U+fffd
|
||||
0x90 U+fffd
|
||||
0x91 U+fffd
|
||||
0x92 U+fffd
|
||||
0x93 U+fffd
|
||||
0x94 U+fffd
|
||||
0x95 U+fffd
|
||||
0x96 U+fffd
|
||||
0x97 U+fffd
|
||||
0x98 U+fffd
|
||||
0x99 U+fffd
|
||||
0x9a U+fffd
|
||||
0x9b U+fffd
|
||||
0x9c U+fffd
|
||||
0x9d U+fffd
|
||||
0x9e U+fffd
|
||||
0x9f U+fffd
|
||||
0xa0 U+fffd
|
||||
0xa1 U+ff61
|
||||
0xa2 U+ff62
|
||||
0xa3 U+ff63
|
||||
0xa4 U+ff64
|
||||
0xa5 U+ff65
|
||||
0xa6 U+ff66
|
||||
0xa7 U+ff67
|
||||
0xa8 U+ff68
|
||||
0xa9 U+ff69
|
||||
0xaa U+ff6a
|
||||
0xab U+ff6b
|
||||
0xac U+ff6c
|
||||
0xad U+ff6d
|
||||
0xae U+ff6e
|
||||
0xaf U+ff6f
|
||||
0xb0 U+ff70
|
||||
0xb1 U+ff71
|
||||
0xb2 U+ff72
|
||||
0xb3 U+ff73
|
||||
0xb4 U+ff74
|
||||
0xb5 U+ff75
|
||||
0xb6 U+ff76
|
||||
0xb7 U+ff77
|
||||
0xb8 U+ff78
|
||||
0xb9 U+ff79
|
||||
0xba U+ff7a
|
||||
0xbb U+ff7b
|
||||
0xbc U+ff7c
|
||||
0xbd U+ff7d
|
||||
0xbe U+ff7e
|
||||
0xbf U+ff7f
|
||||
0xc0 U+ff80
|
||||
0xc1 U+ff81
|
||||
0xc2 U+ff82
|
||||
0xc3 U+ff83
|
||||
0xc4 U+ff84
|
||||
0xc5 U+ff85
|
||||
0xc6 U+ff86
|
||||
0xc7 U+ff87
|
||||
0xc8 U+ff88
|
||||
0xc9 U+ff89
|
||||
0xca U+ff8a
|
||||
0xcb U+ff8b
|
||||
0xcc U+ff8c
|
||||
0xcd U+ff8d
|
||||
0xce U+ff8e
|
||||
0xcf U+ff8f
|
||||
0xd0 U+ff90
|
||||
0xd1 U+ff91
|
||||
0xd2 U+ff92
|
||||
0xd3 U+ff93
|
||||
0xd4 U+ff94
|
||||
0xd5 U+ff95
|
||||
0xd6 U+ff96
|
||||
0xd7 U+ff97
|
||||
0xd8 U+ff98
|
||||
0xd9 U+ff99
|
||||
0xda U+ff9a
|
||||
0xdb U+ff9b
|
||||
0xdc U+ff9c
|
||||
0xdd U+ff9d
|
||||
0xde U+ff9e
|
||||
0xdf U+ff9f
|
||||
0xe0 U+fffd
|
||||
0xe1 U+fffd
|
||||
0xe2 U+fffd
|
||||
0xe3 U+fffd
|
||||
0xe4 U+fffd
|
||||
0xe5 U+fffd
|
||||
0xe6 U+fffd
|
||||
0xe7 U+fffd
|
||||
0xe8 U+fffd
|
||||
0xe9 U+fffd
|
||||
0xea U+fffd
|
||||
0xeb U+fffd
|
||||
0xec U+fffd
|
||||
0xed U+fffd
|
||||
0xee U+fffd
|
||||
0xef U+fffd
|
||||
0xf0 U+fffd
|
||||
0xf1 U+fffd
|
||||
0xf2 U+fffd
|
||||
0xf3 U+fffd
|
||||
0xf4 U+fffd
|
||||
0xf5 U+fffd
|
||||
0xf6 U+fffd
|
||||
0xf7 U+fffd
|
||||
0xf8 U+fffd
|
||||
0xf9 U+fffd
|
||||
0xfa U+fffd
|
||||
0xfb U+fffd
|
||||
0xfc U+fffd
|
||||
0xfd U+fffd
|
||||
0xfe U+fffd
|
||||
0xff U+fffd
|
||||
# copy/pasted from JIS_X_0201.b2c + code points 0-0x1f and 0x7f
|
||||
0x00 0x0000
|
||||
0x01 0x0001
|
||||
0x02 0x0002
|
||||
0x03 0x0003
|
||||
0x04 0x0004
|
||||
0x05 0x0005
|
||||
0x06 0x0006
|
||||
0x07 0x0007
|
||||
0x08 0x0008
|
||||
0x09 0x0009
|
||||
0x0A 0x000A
|
||||
0x0B 0x000B
|
||||
0x0C 0x000C
|
||||
0x0D 0x000D
|
||||
0x0E 0x000E
|
||||
0x0F 0x000F
|
||||
0x10 0x0010
|
||||
0x11 0x0011
|
||||
0x12 0x0012
|
||||
0x13 0x0013
|
||||
0x14 0x0014
|
||||
0x15 0x0015
|
||||
0x16 0x0016
|
||||
0x17 0x0017
|
||||
0x18 0x0018
|
||||
0x19 0x0019
|
||||
0x1A 0x001A
|
||||
0x1B 0x001B
|
||||
0x1C 0x001C
|
||||
0x1D 0x001D
|
||||
0x1E 0x001E
|
||||
0x1F 0x001F
|
||||
0x20 0x0020 # SPACE
|
||||
0x21 0x0021 # EXCLAMATION MARK
|
||||
0x22 0x0022 # QUOTATION MARK
|
||||
0x23 0x0023 # NUMBER SIGN
|
||||
0x24 0x0024 # DOLLAR SIGN
|
||||
0x25 0x0025 # PERCENT SIGN
|
||||
0x26 0x0026 # AMPERSAND
|
||||
0x27 0x0027 # APOSTROPHE
|
||||
0x28 0x0028 # LEFT PARENTHESIS
|
||||
0x29 0x0029 # RIGHT PARENTHESIS
|
||||
0x2A 0x002A # ASTERISK
|
||||
0x2B 0x002B # PLUS SIGN
|
||||
0x2C 0x002C # COMMA
|
||||
0x2D 0x002D # HYPHEN-MINUS
|
||||
0x2E 0x002E # FULL STOP
|
||||
0x2F 0x002F # SOLIDUS
|
||||
0x30 0x0030 # DIGIT ZERO
|
||||
0x31 0x0031 # DIGIT ONE
|
||||
0x32 0x0032 # DIGIT TWO
|
||||
0x33 0x0033 # DIGIT THREE
|
||||
0x34 0x0034 # DIGIT FOUR
|
||||
0x35 0x0035 # DIGIT FIVE
|
||||
0x36 0x0036 # DIGIT SIX
|
||||
0x37 0x0037 # DIGIT SEVEN
|
||||
0x38 0x0038 # DIGIT EIGHT
|
||||
0x39 0x0039 # DIGIT NINE
|
||||
0x3A 0x003A # COLON
|
||||
0x3B 0x003B # SEMICOLON
|
||||
0x3C 0x003C # LESS-THAN SIGN
|
||||
0x3D 0x003D # EQUALS SIGN
|
||||
0x3E 0x003E # GREATER-THAN SIGN
|
||||
0x3F 0x003F # QUESTION MARK
|
||||
0x40 0x0040 # COMMERCIAL AT
|
||||
0x41 0x0041 # LATIN CAPITAL LETTER A
|
||||
0x42 0x0042 # LATIN CAPITAL LETTER B
|
||||
0x43 0x0043 # LATIN CAPITAL LETTER C
|
||||
0x44 0x0044 # LATIN CAPITAL LETTER D
|
||||
0x45 0x0045 # LATIN CAPITAL LETTER E
|
||||
0x46 0x0046 # LATIN CAPITAL LETTER F
|
||||
0x47 0x0047 # LATIN CAPITAL LETTER G
|
||||
0x48 0x0048 # LATIN CAPITAL LETTER H
|
||||
0x49 0x0049 # LATIN CAPITAL LETTER I
|
||||
0x4A 0x004A # LATIN CAPITAL LETTER J
|
||||
0x4B 0x004B # LATIN CAPITAL LETTER K
|
||||
0x4C 0x004C # LATIN CAPITAL LETTER L
|
||||
0x4D 0x004D # LATIN CAPITAL LETTER M
|
||||
0x4E 0x004E # LATIN CAPITAL LETTER N
|
||||
0x4F 0x004F # LATIN CAPITAL LETTER O
|
||||
0x50 0x0050 # LATIN CAPITAL LETTER P
|
||||
0x51 0x0051 # LATIN CAPITAL LETTER Q
|
||||
0x52 0x0052 # LATIN CAPITAL LETTER R
|
||||
0x53 0x0053 # LATIN CAPITAL LETTER S
|
||||
0x54 0x0054 # LATIN CAPITAL LETTER T
|
||||
0x55 0x0055 # LATIN CAPITAL LETTER U
|
||||
0x56 0x0056 # LATIN CAPITAL LETTER V
|
||||
0x57 0x0057 # LATIN CAPITAL LETTER W
|
||||
0x58 0x0058 # LATIN CAPITAL LETTER X
|
||||
0x59 0x0059 # LATIN CAPITAL LETTER Y
|
||||
0x5A 0x005A # LATIN CAPITAL LETTER Z
|
||||
0x5B 0x005B # LEFT SQUARE BRACKET
|
||||
0x5C 0x005C # YEN SIGN
|
||||
0x5D 0x005D # RIGHT SQUARE BRACKET
|
||||
0x5E 0x005E # CIRCUMFLEX ACCENT
|
||||
0x5F 0x005F # LOW LINE
|
||||
0x60 0x0060 # GRAVE ACCENT
|
||||
0x61 0x0061 # LATIN SMALL LETTER A
|
||||
0x62 0x0062 # LATIN SMALL LETTER B
|
||||
0x63 0x0063 # LATIN SMALL LETTER C
|
||||
0x64 0x0064 # LATIN SMALL LETTER D
|
||||
0x65 0x0065 # LATIN SMALL LETTER E
|
||||
0x66 0x0066 # LATIN SMALL LETTER F
|
||||
0x67 0x0067 # LATIN SMALL LETTER G
|
||||
0x68 0x0068 # LATIN SMALL LETTER H
|
||||
0x69 0x0069 # LATIN SMALL LETTER I
|
||||
0x6A 0x006A # LATIN SMALL LETTER J
|
||||
0x6B 0x006B # LATIN SMALL LETTER K
|
||||
0x6C 0x006C # LATIN SMALL LETTER L
|
||||
0x6D 0x006D # LATIN SMALL LETTER M
|
||||
0x6E 0x006E # LATIN SMALL LETTER N
|
||||
0x6F 0x006F # LATIN SMALL LETTER O
|
||||
0x70 0x0070 # LATIN SMALL LETTER P
|
||||
0x71 0x0071 # LATIN SMALL LETTER Q
|
||||
0x72 0x0072 # LATIN SMALL LETTER R
|
||||
0x73 0x0073 # LATIN SMALL LETTER S
|
||||
0x74 0x0074 # LATIN SMALL LETTER T
|
||||
0x75 0x0075 # LATIN SMALL LETTER U
|
||||
0x76 0x0076 # LATIN SMALL LETTER V
|
||||
0x77 0x0077 # LATIN SMALL LETTER W
|
||||
0x78 0x0078 # LATIN SMALL LETTER X
|
||||
0x79 0x0079 # LATIN SMALL LETTER Y
|
||||
0x7A 0x007A # LATIN SMALL LETTER Z
|
||||
0x7B 0x007B # LEFT CURLY BRACKET
|
||||
0x7C 0x007C # VERTICAL LINE
|
||||
0x7D 0x007D # RIGHT CURLY BRACKET
|
||||
0x7E 0x007E # OVERLINE
|
||||
0x7F 0x007F
|
||||
0xA1 0xFF61 # HALFWIDTH IDEOGRAPHIC FULL STOP
|
||||
0xA2 0xFF62 # HALFWIDTH LEFT CORNER BRACKET
|
||||
0xA3 0xFF63 # HALFWIDTH RIGHT CORNER BRACKET
|
||||
0xA4 0xFF64 # HALFWIDTH IDEOGRAPHIC COMMA
|
||||
0xA5 0xFF65 # HALFWIDTH KATAKANA MIDDLE DOT
|
||||
0xA6 0xFF66 # HALFWIDTH KATAKANA LETTER WO
|
||||
0xA7 0xFF67 # HALFWIDTH KATAKANA LETTER SMALL A
|
||||
0xA8 0xFF68 # HALFWIDTH KATAKANA LETTER SMALL I
|
||||
0xA9 0xFF69 # HALFWIDTH KATAKANA LETTER SMALL U
|
||||
0xAA 0xFF6A # HALFWIDTH KATAKANA LETTER SMALL E
|
||||
0xAB 0xFF6B # HALFWIDTH KATAKANA LETTER SMALL O
|
||||
0xAC 0xFF6C # HALFWIDTH KATAKANA LETTER SMALL YA
|
||||
0xAD 0xFF6D # HALFWIDTH KATAKANA LETTER SMALL YU
|
||||
0xAE 0xFF6E # HALFWIDTH KATAKANA LETTER SMALL YO
|
||||
0xAF 0xFF6F # HALFWIDTH KATAKANA LETTER SMALL TU
|
||||
0xB0 0xFF70 # HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK
|
||||
0xB1 0xFF71 # HALFWIDTH KATAKANA LETTER A
|
||||
0xB2 0xFF72 # HALFWIDTH KATAKANA LETTER I
|
||||
0xB3 0xFF73 # HALFWIDTH KATAKANA LETTER U
|
||||
0xB4 0xFF74 # HALFWIDTH KATAKANA LETTER E
|
||||
0xB5 0xFF75 # HALFWIDTH KATAKANA LETTER O
|
||||
0xB6 0xFF76 # HALFWIDTH KATAKANA LETTER KA
|
||||
0xB7 0xFF77 # HALFWIDTH KATAKANA LETTER KI
|
||||
0xB8 0xFF78 # HALFWIDTH KATAKANA LETTER KU
|
||||
0xB9 0xFF79 # HALFWIDTH KATAKANA LETTER KE
|
||||
0xBA 0xFF7A # HALFWIDTH KATAKANA LETTER KO
|
||||
0xBB 0xFF7B # HALFWIDTH KATAKANA LETTER SA
|
||||
0xBC 0xFF7C # HALFWIDTH KATAKANA LETTER SI
|
||||
0xBD 0xFF7D # HALFWIDTH KATAKANA LETTER SU
|
||||
0xBE 0xFF7E # HALFWIDTH KATAKANA LETTER SE
|
||||
0xBF 0xFF7F # HALFWIDTH KATAKANA LETTER SO
|
||||
0xC0 0xFF80 # HALFWIDTH KATAKANA LETTER TA
|
||||
0xC1 0xFF81 # HALFWIDTH KATAKANA LETTER TI
|
||||
0xC2 0xFF82 # HALFWIDTH KATAKANA LETTER TU
|
||||
0xC3 0xFF83 # HALFWIDTH KATAKANA LETTER TE
|
||||
0xC4 0xFF84 # HALFWIDTH KATAKANA LETTER TO
|
||||
0xC5 0xFF85 # HALFWIDTH KATAKANA LETTER NA
|
||||
0xC6 0xFF86 # HALFWIDTH KATAKANA LETTER NI
|
||||
0xC7 0xFF87 # HALFWIDTH KATAKANA LETTER NU
|
||||
0xC8 0xFF88 # HALFWIDTH KATAKANA LETTER NE
|
||||
0xC9 0xFF89 # HALFWIDTH KATAKANA LETTER NO
|
||||
0xCA 0xFF8A # HALFWIDTH KATAKANA LETTER HA
|
||||
0xCB 0xFF8B # HALFWIDTH KATAKANA LETTER HI
|
||||
0xCC 0xFF8C # HALFWIDTH KATAKANA LETTER HU
|
||||
0xCD 0xFF8D # HALFWIDTH KATAKANA LETTER HE
|
||||
0xCE 0xFF8E # HALFWIDTH KATAKANA LETTER HO
|
||||
0xCF 0xFF8F # HALFWIDTH KATAKANA LETTER MA
|
||||
0xD0 0xFF90 # HALFWIDTH KATAKANA LETTER MI
|
||||
0xD1 0xFF91 # HALFWIDTH KATAKANA LETTER MU
|
||||
0xD2 0xFF92 # HALFWIDTH KATAKANA LETTER ME
|
||||
0xD3 0xFF93 # HALFWIDTH KATAKANA LETTER MO
|
||||
0xD4 0xFF94 # HALFWIDTH KATAKANA LETTER YA
|
||||
0xD5 0xFF95 # HALFWIDTH KATAKANA LETTER YU
|
||||
0xD6 0xFF96 # HALFWIDTH KATAKANA LETTER YO
|
||||
0xD7 0xFF97 # HALFWIDTH KATAKANA LETTER RA
|
||||
0xD8 0xFF98 # HALFWIDTH KATAKANA LETTER RI
|
||||
0xD9 0xFF99 # HALFWIDTH KATAKANA LETTER RU
|
||||
0xDA 0xFF9A # HALFWIDTH KATAKANA LETTER RE
|
||||
0xDB 0xFF9B # HALFWIDTH KATAKANA LETTER RO
|
||||
0xDC 0xFF9C # HALFWIDTH KATAKANA LETTER WA
|
||||
0xDD 0xFF9D # HALFWIDTH KATAKANA LETTER N
|
||||
0xDE 0xFF9E # HALFWIDTH KATAKANA VOICED SOUND MARK
|
||||
0xDF 0xFF9F # HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
|
||||
|
6879
jdk/make/tools/CharsetMapping/JIS_X_0208.map
Normal file
6879
jdk/make/tools/CharsetMapping/JIS_X_0208.map
Normal file
File diff suppressed because it is too large
Load Diff
73
jdk/make/tools/CharsetMapping/JIS_X_0208_MS5022X.c2b
Normal file
73
jdk/make/tools/CharsetMapping/JIS_X_0208_MS5022X.c2b
Normal file
@ -0,0 +1,73 @@
|
||||
#
|
||||
# The diff of JIS_X_0208_MS5022X_Decoder and
|
||||
# JIS_X_0208_MS5022X_Encoder
|
||||
#
|
||||
0x215d 0xff0d
|
||||
0x2142 0x2225
|
||||
0x2123 0xff61
|
||||
0x2156 0xff62
|
||||
0x2157 0xff63
|
||||
0x2122 0xff64
|
||||
0x2126 0xff65
|
||||
0x2572 0xff66
|
||||
0x2521 0xff67
|
||||
0x2523 0xff68
|
||||
0x2525 0xff69
|
||||
0x2527 0xff6a
|
||||
0x2529 0xff6b
|
||||
0x2563 0xff6c
|
||||
0x2565 0xff6d
|
||||
0x2567 0xff6e
|
||||
0x2543 0xff6f
|
||||
0x213c 0xff70
|
||||
0x2522 0xff71
|
||||
0x2524 0xff72
|
||||
0x2526 0xff73
|
||||
0x2528 0xff74
|
||||
0x252a 0xff75
|
||||
0x252b 0xff76
|
||||
0x252d 0xff77
|
||||
0x252f 0xff78
|
||||
0x2531 0xff79
|
||||
0x2533 0xff7a
|
||||
0x2535 0xff7b
|
||||
0x2537 0xff7c
|
||||
0x2539 0xff7d
|
||||
0x253b 0xff7e
|
||||
0x253d 0xff7f
|
||||
0x253f 0xff80
|
||||
0x2541 0xff81
|
||||
0x2544 0xff82
|
||||
0x2546 0xff83
|
||||
0x2548 0xff84
|
||||
0x254a 0xff85
|
||||
0x254b 0xff86
|
||||
0x254c 0xff87
|
||||
0x254d 0xff88
|
||||
0x254e 0xff89
|
||||
0x254f 0xff8a
|
||||
0x2552 0xff8b
|
||||
0x2555 0xff8c
|
||||
0x2558 0xff8d
|
||||
0x255b 0xff8e
|
||||
0x255e 0xff8f
|
||||
0x255f 0xff90
|
||||
0x2560 0xff91
|
||||
0x2561 0xff92
|
||||
0x2562 0xff93
|
||||
0x2564 0xff94
|
||||
0x2566 0xff95
|
||||
0x2568 0xff96
|
||||
0x2569 0xff97
|
||||
0x256a 0xff98
|
||||
0x256b 0xff99
|
||||
0x256c 0xff9a
|
||||
0x256d 0xff9b
|
||||
0x256f 0xff9c
|
||||
0x2573 0xff9d
|
||||
0x212b 0xff9e
|
||||
0x212c 0xff9f
|
||||
0x2171 0xffe0
|
||||
0x2172 0xffe1
|
||||
0x224c 0xffe2
|
||||
|
7893
jdk/make/tools/CharsetMapping/JIS_X_0208_MS5022X.map
Normal file
7893
jdk/make/tools/CharsetMapping/JIS_X_0208_MS5022X.map
Normal file
File diff suppressed because it is too large
Load Diff
7364
jdk/make/tools/CharsetMapping/JIS_X_0208_MS932.map
Normal file
7364
jdk/make/tools/CharsetMapping/JIS_X_0208_MS932.map
Normal file
File diff suppressed because it is too large
Load Diff
10
jdk/make/tools/CharsetMapping/JIS_X_0208_MS932.nr
Normal file
10
jdk/make/tools/CharsetMapping/JIS_X_0208_MS932.nr
Normal file
@ -0,0 +1,10 @@
|
||||
0x224c 0xffe2
|
||||
0x225d 0x22a5
|
||||
0x2265 0x221a
|
||||
0x2269 0x222b
|
||||
0x2d70 0x2252
|
||||
0x2d71 0x2261
|
||||
0x2d77 0x2220
|
||||
0x2d7a 0x2235
|
||||
0x2d7b 0x2229
|
||||
0x2d7c 0x222a
|
851
jdk/make/tools/CharsetMapping/JIS_X_0208_Solaris.map
Normal file
851
jdk/make/tools/CharsetMapping/JIS_X_0208_Solaris.map
Normal file
@ -0,0 +1,851 @@
|
||||
#
|
||||
# Generated from JIS_X_0208_De/Encoder
|
||||
#
|
||||
# added 0x2129 entry, which is the "replacement" for 0208
|
||||
0x2129 0xff1f
|
||||
#
|
||||
0x2d21 0x2460
|
||||
0x2d22 0x2461
|
||||
0x2d23 0x2462
|
||||
0x2d24 0x2463
|
||||
0x2d25 0x2464
|
||||
0x2d26 0x2465
|
||||
0x2d27 0x2466
|
||||
0x2d28 0x2467
|
||||
0x2d29 0x2468
|
||||
0x2d2a 0x2469
|
||||
0x2d2b 0x246a
|
||||
0x2d2c 0x246b
|
||||
0x2d2d 0x246c
|
||||
0x2d2e 0x246d
|
||||
0x2d2f 0x246e
|
||||
0x2d30 0x246f
|
||||
0x2d31 0x2470
|
||||
0x2d32 0x2471
|
||||
0x2d33 0x2472
|
||||
0x2d34 0x2473
|
||||
0x2d35 0x2160
|
||||
0x2d36 0x2161
|
||||
0x2d37 0x2162
|
||||
0x2d38 0x2163
|
||||
0x2d39 0x2164
|
||||
0x2d3a 0x2165
|
||||
0x2d3b 0x2166
|
||||
0x2d3c 0x2167
|
||||
0x2d3d 0x2168
|
||||
0x2d3e 0x2169
|
||||
0x2d40 0x3349
|
||||
0x2d41 0x3314
|
||||
0x2d42 0x3322
|
||||
0x2d43 0x334d
|
||||
0x2d44 0x3318
|
||||
0x2d45 0x3327
|
||||
0x2d46 0x3303
|
||||
0x2d47 0x3336
|
||||
0x2d48 0x3351
|
||||
0x2d49 0x3357
|
||||
0x2d4a 0x330d
|
||||
0x2d4b 0x3326
|
||||
0x2d4c 0x3323
|
||||
0x2d4d 0x332b
|
||||
0x2d4e 0x334a
|
||||
0x2d4f 0x333b
|
||||
0x2d50 0x339c
|
||||
0x2d51 0x339d
|
||||
0x2d52 0x339e
|
||||
0x2d53 0x338e
|
||||
0x2d54 0x338f
|
||||
0x2d55 0x33c4
|
||||
0x2d56 0x33a1
|
||||
0x2d5f 0x337b
|
||||
0x2d60 0x301d
|
||||
0x2d61 0x301f
|
||||
0x2d62 0x2116
|
||||
0x2d63 0x33cd
|
||||
0x2d64 0x2121
|
||||
0x2d65 0x32a4
|
||||
0x2d66 0x32a5
|
||||
0x2d67 0x32a6
|
||||
0x2d68 0x32a7
|
||||
0x2d69 0x32a8
|
||||
0x2d6a 0x3231
|
||||
0x2d6b 0x3232
|
||||
0x2d6c 0x3239
|
||||
0x2d6d 0x337e
|
||||
0x2d6e 0x337d
|
||||
0x2d6f 0x337c
|
||||
0x2d70 0x2252
|
||||
0x2d71 0x2261
|
||||
0x2d72 0x222b
|
||||
0x2d73 0x222e
|
||||
0x2d74 0x2211
|
||||
0x2d75 0x221a
|
||||
0x2d76 0x22a5
|
||||
0x2d77 0x2220
|
||||
0x2d78 0x221f
|
||||
0x2d79 0x22bf
|
||||
0x2d7a 0x2235
|
||||
0x2d7b 0x2229
|
||||
0x2d7c 0x222a
|
||||
0x7921 0x7e8a
|
||||
0x7922 0x891c
|
||||
0x7923 0x9348
|
||||
0x7924 0x9288
|
||||
0x7925 0x84dc
|
||||
0x7926 0x4fc9
|
||||
0x7927 0x70bb
|
||||
0x7928 0x6631
|
||||
0x7929 0x68c8
|
||||
0x792a 0x92f9
|
||||
0x792b 0x66fb
|
||||
0x792c 0x5f45
|
||||
0x792d 0x4e28
|
||||
0x792e 0x4ee1
|
||||
0x792f 0x4efc
|
||||
0x7930 0x4f00
|
||||
0x7931 0x4f03
|
||||
0x7932 0x4f39
|
||||
0x7933 0x4f56
|
||||
0x7934 0x4f92
|
||||
0x7935 0x4f8a
|
||||
0x7936 0x4f9a
|
||||
0x7937 0x4f94
|
||||
0x7938 0x4fcd
|
||||
0x7939 0x5040
|
||||
0x793a 0x5022
|
||||
0x793b 0x4fff
|
||||
0x793c 0x501e
|
||||
0x793d 0x5046
|
||||
0x793e 0x5070
|
||||
0x793f 0x5042
|
||||
0x7940 0x5094
|
||||
0x7941 0x50f4
|
||||
0x7942 0x50d8
|
||||
0x7943 0x514a
|
||||
0x7944 0x5164
|
||||
0x7945 0x519d
|
||||
0x7946 0x51be
|
||||
0x7947 0x51ec
|
||||
0x7948 0x5215
|
||||
0x7949 0x529c
|
||||
0x794a 0x52a6
|
||||
0x794b 0x52c0
|
||||
0x794c 0x52db
|
||||
0x794d 0x5300
|
||||
0x794e 0x5307
|
||||
0x794f 0x5324
|
||||
0x7950 0x5372
|
||||
0x7951 0x5393
|
||||
0x7952 0x53b2
|
||||
0x7953 0x53dd
|
||||
0x7954 0xfa0e
|
||||
0x7955 0x549c
|
||||
0x7956 0x548a
|
||||
0x7957 0x54a9
|
||||
0x7958 0x54ff
|
||||
0x7959 0x5586
|
||||
0x795a 0x5759
|
||||
0x795b 0x5765
|
||||
0x795c 0x57ac
|
||||
0x795d 0x57c8
|
||||
0x795e 0x57c7
|
||||
0x795f 0xfa0f
|
||||
0x7960 0xfa10
|
||||
0x7961 0x589e
|
||||
0x7962 0x58b2
|
||||
0x7963 0x590b
|
||||
0x7964 0x5953
|
||||
0x7965 0x595b
|
||||
0x7966 0x595d
|
||||
0x7967 0x5963
|
||||
0x7968 0x59a4
|
||||
0x7969 0x59ba
|
||||
0x796a 0x5b56
|
||||
0x796b 0x5bc0
|
||||
0x796c 0x752f
|
||||
0x796d 0x5bd8
|
||||
0x796e 0x5bec
|
||||
0x796f 0x5c1e
|
||||
0x7970 0x5ca6
|
||||
0x7971 0x5cba
|
||||
0x7972 0x5cf5
|
||||
0x7973 0x5d27
|
||||
0x7974 0x5d53
|
||||
0x7975 0xfa11
|
||||
0x7976 0x5d42
|
||||
0x7977 0x5d6d
|
||||
0x7978 0x5db8
|
||||
0x7979 0x5db9
|
||||
0x797a 0x5dd0
|
||||
0x797b 0x5f21
|
||||
0x797c 0x5f34
|
||||
0x797d 0x5f67
|
||||
0x797e 0x5fb7
|
||||
0x7a21 0x5fde
|
||||
0x7a22 0x605d
|
||||
0x7a23 0x6085
|
||||
0x7a24 0x608a
|
||||
0x7a25 0x60de
|
||||
0x7a26 0x60d5
|
||||
0x7a27 0x6120
|
||||
0x7a28 0x60f2
|
||||
0x7a29 0x6111
|
||||
0x7a2a 0x6137
|
||||
0x7a2b 0x6130
|
||||
0x7a2c 0x6198
|
||||
0x7a2d 0x6213
|
||||
0x7a2e 0x62a6
|
||||
0x7a2f 0x63f5
|
||||
0x7a30 0x6460
|
||||
0x7a31 0x649d
|
||||
0x7a32 0x64ce
|
||||
0x7a33 0x654e
|
||||
0x7a34 0x6600
|
||||
0x7a35 0x6615
|
||||
0x7a36 0x663b
|
||||
0x7a37 0x6609
|
||||
0x7a38 0x662e
|
||||
0x7a39 0x661e
|
||||
0x7a3a 0x6624
|
||||
0x7a3b 0x6665
|
||||
0x7a3c 0x6657
|
||||
0x7a3d 0x6659
|
||||
0x7a3e 0xfa12
|
||||
0x7a3f 0x6673
|
||||
0x7a40 0x6699
|
||||
0x7a41 0x66a0
|
||||
0x7a42 0x66b2
|
||||
0x7a43 0x66bf
|
||||
0x7a44 0x66fa
|
||||
0x7a45 0x670e
|
||||
0x7a46 0xf929
|
||||
0x7a47 0x6766
|
||||
0x7a48 0x67bb
|
||||
0x7a49 0x6852
|
||||
0x7a4a 0x67c0
|
||||
0x7a4b 0x6801
|
||||
0x7a4c 0x6844
|
||||
0x7a4d 0x68cf
|
||||
0x7a4e 0xfa13
|
||||
0x7a4f 0x6968
|
||||
0x7a50 0xfa14
|
||||
0x7a51 0x6998
|
||||
0x7a52 0x69e2
|
||||
0x7a53 0x6a30
|
||||
0x7a54 0x6a6b
|
||||
0x7a55 0x6a46
|
||||
0x7a56 0x6a73
|
||||
0x7a57 0x6a7e
|
||||
0x7a58 0x6ae2
|
||||
0x7a59 0x6ae4
|
||||
0x7a5a 0x6bd6
|
||||
0x7a5b 0x6c3f
|
||||
0x7a5c 0x6c5c
|
||||
0x7a5d 0x6c86
|
||||
0x7a5e 0x6c6f
|
||||
0x7a5f 0x6cda
|
||||
0x7a60 0x6d04
|
||||
0x7a61 0x6d87
|
||||
0x7a62 0x6d6f
|
||||
0x7a63 0x6d96
|
||||
0x7a64 0x6dac
|
||||
0x7a65 0x6dcf
|
||||
0x7a66 0x6df8
|
||||
0x7a67 0x6df2
|
||||
0x7a68 0x6dfc
|
||||
0x7a69 0x6e39
|
||||
0x7a6a 0x6e5c
|
||||
0x7a6b 0x6e27
|
||||
0x7a6c 0x6e3c
|
||||
0x7a6d 0x6ebf
|
||||
0x7a6e 0x6f88
|
||||
0x7a6f 0x6fb5
|
||||
0x7a70 0x6ff5
|
||||
0x7a71 0x7005
|
||||
0x7a72 0x7007
|
||||
0x7a73 0x7028
|
||||
0x7a74 0x7085
|
||||
0x7a75 0x70ab
|
||||
0x7a76 0x710f
|
||||
0x7a77 0x7104
|
||||
0x7a78 0x715c
|
||||
0x7a79 0x7146
|
||||
0x7a7a 0x7147
|
||||
0x7a7b 0xfa15
|
||||
0x7a7c 0x71c1
|
||||
0x7a7d 0x71fe
|
||||
0x7a7e 0x72b1
|
||||
0x7b21 0x72be
|
||||
0x7b22 0x7324
|
||||
0x7b23 0xfa16
|
||||
0x7b24 0x7377
|
||||
0x7b25 0x73bd
|
||||
0x7b26 0x73c9
|
||||
0x7b27 0x73d6
|
||||
0x7b28 0x73e3
|
||||
0x7b29 0x73d2
|
||||
0x7b2a 0x7407
|
||||
0x7b2b 0x73f5
|
||||
0x7b2c 0x7426
|
||||
0x7b2d 0x742a
|
||||
0x7b2e 0x7429
|
||||
0x7b2f 0x742e
|
||||
0x7b30 0x7462
|
||||
0x7b31 0x7489
|
||||
0x7b32 0x749f
|
||||
0x7b33 0x7501
|
||||
0x7b34 0x756f
|
||||
0x7b35 0x7682
|
||||
0x7b36 0x769c
|
||||
0x7b37 0x769e
|
||||
0x7b38 0x769b
|
||||
0x7b39 0x76a6
|
||||
0x7b3a 0xfa17
|
||||
0x7b3b 0x7746
|
||||
0x7b3c 0x52af
|
||||
0x7b3d 0x7821
|
||||
0x7b3e 0x784e
|
||||
0x7b3f 0x7864
|
||||
0x7b40 0x787a
|
||||
0x7b41 0x7930
|
||||
0x7b42 0xfa18
|
||||
0x7b43 0xfa19
|
||||
0x7b44 0xfa1a
|
||||
0x7b45 0x7994
|
||||
0x7b46 0xfa1b
|
||||
0x7b47 0x799b
|
||||
0x7b48 0x7ad1
|
||||
0x7b49 0x7ae7
|
||||
0x7b4a 0xfa1c
|
||||
0x7b4b 0x7aeb
|
||||
0x7b4c 0x7b9e
|
||||
0x7b4d 0xfa1d
|
||||
0x7b4e 0x7d48
|
||||
0x7b4f 0x7d5c
|
||||
0x7b50 0x7db7
|
||||
0x7b51 0x7da0
|
||||
0x7b52 0x7dd6
|
||||
0x7b53 0x7e52
|
||||
0x7b54 0x7f47
|
||||
0x7b55 0x7fa1
|
||||
0x7b56 0xfa1e
|
||||
0x7b57 0x8301
|
||||
0x7b58 0x8362
|
||||
0x7b59 0x837f
|
||||
0x7b5a 0x83c7
|
||||
0x7b5b 0x83f6
|
||||
0x7b5c 0x8448
|
||||
0x7b5d 0x84b4
|
||||
0x7b5e 0x8553
|
||||
0x7b5f 0x8559
|
||||
0x7b60 0x856b
|
||||
0x7b61 0xfa1f
|
||||
0x7b62 0x85b0
|
||||
0x7b63 0xfa20
|
||||
0x7b64 0xfa21
|
||||
0x7b65 0x8807
|
||||
0x7b66 0x88f5
|
||||
0x7b67 0x8a12
|
||||
0x7b68 0x8a37
|
||||
0x7b69 0x8a79
|
||||
0x7b6a 0x8aa7
|
||||
0x7b6b 0x8abe
|
||||
0x7b6c 0x8adf
|
||||
0x7b6d 0xfa22
|
||||
0x7b6e 0x8af6
|
||||
0x7b6f 0x8b53
|
||||
0x7b70 0x8b7f
|
||||
0x7b71 0x8cf0
|
||||
0x7b72 0x8cf4
|
||||
0x7b73 0x8d12
|
||||
0x7b74 0x8d76
|
||||
0x7b75 0xfa23
|
||||
0x7b76 0x8ecf
|
||||
0x7b77 0xfa24
|
||||
0x7b78 0xfa25
|
||||
0x7b79 0x9067
|
||||
0x7b7a 0x90de
|
||||
0x7b7b 0xfa26
|
||||
0x7b7c 0x9115
|
||||
0x7b7d 0x9127
|
||||
0x7b7e 0x91da
|
||||
0x7c21 0x91d7
|
||||
0x7c22 0x91de
|
||||
0x7c23 0x91ed
|
||||
0x7c24 0x91ee
|
||||
0x7c25 0x91e4
|
||||
0x7c26 0x91e5
|
||||
0x7c27 0x9206
|
||||
0x7c28 0x9210
|
||||
0x7c29 0x920a
|
||||
0x7c2a 0x923a
|
||||
0x7c2b 0x9240
|
||||
0x7c2c 0x923c
|
||||
0x7c2d 0x924e
|
||||
0x7c2e 0x9259
|
||||
0x7c2f 0x9251
|
||||
0x7c30 0x9239
|
||||
0x7c31 0x9267
|
||||
0x7c32 0x92a7
|
||||
0x7c33 0x9277
|
||||
0x7c34 0x9278
|
||||
0x7c35 0x92e7
|
||||
0x7c36 0x92d7
|
||||
0x7c37 0x92d9
|
||||
0x7c38 0x92d0
|
||||
0x7c39 0xfa27
|
||||
0x7c3a 0x92d5
|
||||
0x7c3b 0x92e0
|
||||
0x7c3c 0x92d3
|
||||
0x7c3d 0x9325
|
||||
0x7c3e 0x9321
|
||||
0x7c3f 0x92fb
|
||||
0x7c40 0xfa28
|
||||
0x7c41 0x931e
|
||||
0x7c42 0x92ff
|
||||
0x7c43 0x931d
|
||||
0x7c44 0x9302
|
||||
0x7c45 0x9370
|
||||
0x7c46 0x9357
|
||||
0x7c47 0x93a4
|
||||
0x7c48 0x93c6
|
||||
0x7c49 0x93de
|
||||
0x7c4a 0x93f8
|
||||
0x7c4b 0x9431
|
||||
0x7c4c 0x9445
|
||||
0x7c4d 0x9448
|
||||
0x7c4e 0x9592
|
||||
0x7c4f 0xf9dc
|
||||
0x7c50 0xfa29
|
||||
0x7c51 0x969d
|
||||
0x7c52 0x96af
|
||||
0x7c53 0x9733
|
||||
0x7c54 0x973b
|
||||
0x7c55 0x9743
|
||||
0x7c56 0x974d
|
||||
0x7c57 0x974f
|
||||
0x7c58 0x9751
|
||||
0x7c59 0x9755
|
||||
0x7c5a 0x9857
|
||||
0x7c5b 0x9865
|
||||
0x7c5c 0xfa2a
|
||||
0x7c5d 0xfa2b
|
||||
0x7c5e 0x9927
|
||||
0x7c5f 0xfa2c
|
||||
0x7c60 0x999e
|
||||
0x7c61 0x9a4e
|
||||
0x7c62 0x9ad9
|
||||
0x7c63 0x9adc
|
||||
0x7c64 0x9b75
|
||||
0x7c65 0x9b72
|
||||
0x7c66 0x9b8f
|
||||
0x7c67 0x9bb1
|
||||
0x7c68 0x9bbb
|
||||
0x7c69 0x9c00
|
||||
0x7c6a 0x9d70
|
||||
0x7c6b 0x9d6b
|
||||
0x7c6c 0xfa2d
|
||||
0x7c6d 0x9e19
|
||||
0x7c6e 0x9ed1
|
||||
0x7c71 0x2170
|
||||
0x7c72 0x2171
|
||||
0x7c73 0x2172
|
||||
0x7c74 0x2173
|
||||
0x7c75 0x2174
|
||||
0x7c76 0x2175
|
||||
0x7c77 0x2176
|
||||
0x7c78 0x2177
|
||||
0x7c79 0x2178
|
||||
0x7c7a 0x2179
|
||||
0x7c7b 0x3052
|
||||
0x7c7c 0x00a6
|
||||
0x7c7d 0xff07
|
||||
0x7c7e 0xff02
|
||||
0x9321 0x2170
|
||||
0x9322 0x2171
|
||||
0x9323 0x2172
|
||||
0x9324 0x2173
|
||||
0x9325 0x2174
|
||||
0x9326 0x2175
|
||||
0x9327 0x2176
|
||||
0x9328 0x2177
|
||||
0x9329 0x2178
|
||||
0x932a 0x2179
|
||||
0x932b 0x2160
|
||||
0x932c 0x2161
|
||||
0x932d 0x2162
|
||||
0x932e 0x2163
|
||||
0x932f 0x2164
|
||||
0x9330 0x2165
|
||||
0x9331 0x2166
|
||||
0x9332 0x2167
|
||||
0x9333 0x2168
|
||||
0x9334 0x2169
|
||||
0x9335 0x3052
|
||||
0x9336 0x00a6
|
||||
0x9337 0xff07
|
||||
0x9338 0xff02
|
||||
0x9339 0x3231
|
||||
0x933a 0x2116
|
||||
0x933b 0x2121
|
||||
0x933c 0x306e
|
||||
0x933d 0x7e8a
|
||||
0x933e 0x891c
|
||||
0x933f 0x9348
|
||||
0x9340 0x9288
|
||||
0x9341 0x84dc
|
||||
0x9342 0x4fc9
|
||||
0x9343 0x70bb
|
||||
0x9344 0x6631
|
||||
0x9345 0x68c8
|
||||
0x9346 0x92f9
|
||||
0x9347 0x66fb
|
||||
0x9348 0x5f45
|
||||
0x9349 0x4e28
|
||||
0x934a 0x4ee1
|
||||
0x934b 0x4efc
|
||||
0x934c 0x4f00
|
||||
0x934d 0x4f03
|
||||
0x934e 0x4f39
|
||||
0x934f 0x4f56
|
||||
0x9350 0x4f92
|
||||
0x9351 0x4f8a
|
||||
0x9352 0x4f9a
|
||||
0x9353 0x4f94
|
||||
0x9354 0x4fcd
|
||||
0x9355 0x5040
|
||||
0x9356 0x5022
|
||||
0x9357 0x4fff
|
||||
0x9358 0x501e
|
||||
0x9359 0x5046
|
||||
0x935a 0x5070
|
||||
0x935b 0x5042
|
||||
0x935c 0x5094
|
||||
0x935d 0x50f4
|
||||
0x935e 0x50d8
|
||||
0x935f 0x514a
|
||||
0x9360 0x5164
|
||||
0x9361 0x519d
|
||||
0x9362 0x51be
|
||||
0x9363 0x51ec
|
||||
0x9364 0x5215
|
||||
0x9365 0x529c
|
||||
0x9366 0x52a6
|
||||
0x9367 0x52c0
|
||||
0x9368 0x52db
|
||||
0x9369 0x5300
|
||||
0x936a 0x5307
|
||||
0x936b 0x5324
|
||||
0x936c 0x5372
|
||||
0x936d 0x5393
|
||||
0x936e 0x53b2
|
||||
0x936f 0x53dd
|
||||
0x9370 0xfa0e
|
||||
0x9371 0x549c
|
||||
0x9372 0x548a
|
||||
0x9373 0x54a9
|
||||
0x9374 0x54ff
|
||||
0x9375 0x5586
|
||||
0x9376 0x5759
|
||||
0x9377 0x5765
|
||||
0x9378 0x57ac
|
||||
0x9379 0x57c8
|
||||
0x937a 0x57c7
|
||||
0x937b 0xfa0f
|
||||
0x937c 0xfa10
|
||||
0x937d 0x589e
|
||||
0x937e 0x58b2
|
||||
0x9421 0x590b
|
||||
0x9422 0x5953
|
||||
0x9423 0x595b
|
||||
0x9424 0x595d
|
||||
0x9425 0x5963
|
||||
0x9426 0x59a4
|
||||
0x9427 0x59ba
|
||||
0x9428 0x5b56
|
||||
0x9429 0x5bc0
|
||||
0x942a 0x752f
|
||||
0x942b 0x5bd8
|
||||
0x942c 0x5bec
|
||||
0x942d 0x5c1e
|
||||
0x942e 0x5ca6
|
||||
0x942f 0x5cba
|
||||
0x9430 0x5cf5
|
||||
0x9431 0x5d27
|
||||
0x9432 0x5d53
|
||||
0x9433 0xfa11
|
||||
0x9434 0x5d42
|
||||
0x9435 0x5d6d
|
||||
0x9436 0x5db8
|
||||
0x9437 0x5db9
|
||||
0x9438 0x5dd0
|
||||
0x9439 0x5f21
|
||||
0x943a 0x5f34
|
||||
0x943b 0x5f67
|
||||
0x943c 0x5fb7
|
||||
0x943d 0x5fde
|
||||
0x943e 0x605d
|
||||
0x943f 0x6085
|
||||
0x9440 0x608a
|
||||
0x9441 0x60de
|
||||
0x9442 0x60d5
|
||||
0x9443 0x6120
|
||||
0x9444 0x60f2
|
||||
0x9445 0x6111
|
||||
0x9446 0x6137
|
||||
0x9447 0x6130
|
||||
0x9448 0x6198
|
||||
0x9449 0x6213
|
||||
0x944a 0x62a6
|
||||
0x944b 0x63f5
|
||||
0x944c 0x6460
|
||||
0x944d 0x649d
|
||||
0x944e 0x64ce
|
||||
0x944f 0x654e
|
||||
0x9450 0x6600
|
||||
0x9451 0x6615
|
||||
0x9452 0x663b
|
||||
0x9453 0x6609
|
||||
0x9454 0x662e
|
||||
0x9455 0x661e
|
||||
0x9456 0x6624
|
||||
0x9457 0x6665
|
||||
0x9458 0x6657
|
||||
0x9459 0x6659
|
||||
0x945a 0xfa12
|
||||
0x945b 0x6673
|
||||
0x945c 0x6699
|
||||
0x945d 0x66a0
|
||||
0x945e 0x66b2
|
||||
0x945f 0x66bf
|
||||
0x9460 0x66fa
|
||||
0x9461 0x670e
|
||||
0x9462 0xf929
|
||||
0x9463 0x6766
|
||||
0x9464 0x67bb
|
||||
0x9465 0x6852
|
||||
0x9466 0x67c0
|
||||
0x9467 0x6801
|
||||
0x9468 0x6844
|
||||
0x9469 0x68cf
|
||||
0x946a 0xfa13
|
||||
0x946b 0x6968
|
||||
0x946c 0xfa14
|
||||
0x946d 0x6998
|
||||
0x946e 0x69e2
|
||||
0x946f 0x6a30
|
||||
0x9470 0x6a6b
|
||||
0x9471 0x6a46
|
||||
0x9472 0x6a73
|
||||
0x9473 0x6a7e
|
||||
0x9474 0x6ae2
|
||||
0x9475 0x6ae4
|
||||
0x9476 0x6bd6
|
||||
0x9477 0x6c3f
|
||||
0x9478 0x6c5c
|
||||
0x9479 0x6c86
|
||||
0x947a 0x6c6f
|
||||
0x947b 0x6cda
|
||||
0x947c 0x6d04
|
||||
0x947d 0x6d87
|
||||
0x947e 0x6d6f
|
||||
0x9521 0x6d96
|
||||
0x9522 0x6dac
|
||||
0x9523 0x6dcf
|
||||
0x9524 0x6df8
|
||||
0x9525 0x6df2
|
||||
0x9526 0x6dfc
|
||||
0x9527 0x6e39
|
||||
0x9528 0x6e5c
|
||||
0x9529 0x6e27
|
||||
0x952a 0x6e3c
|
||||
0x952b 0x6ebf
|
||||
0x952c 0x6f88
|
||||
0x952d 0x6fb5
|
||||
0x952e 0x6ff5
|
||||
0x952f 0x7005
|
||||
0x9530 0x7007
|
||||
0x9531 0x7028
|
||||
0x9532 0x7085
|
||||
0x9533 0x70ab
|
||||
0x9534 0x710f
|
||||
0x9535 0x7104
|
||||
0x9536 0x715c
|
||||
0x9537 0x7146
|
||||
0x9538 0x7147
|
||||
0x9539 0xfa15
|
||||
0x953a 0x71c1
|
||||
0x953b 0x71fe
|
||||
0x953c 0x72b1
|
||||
0x953d 0x72be
|
||||
0x953e 0x7324
|
||||
0x953f 0xfa16
|
||||
0x9540 0x7377
|
||||
0x9541 0x73bd
|
||||
0x9542 0x73c9
|
||||
0x9543 0x73d6
|
||||
0x9544 0x73e3
|
||||
0x9545 0x73d2
|
||||
0x9546 0x7407
|
||||
0x9547 0x73f5
|
||||
0x9548 0x7426
|
||||
0x9549 0x742a
|
||||
0x954a 0x7429
|
||||
0x954b 0x742e
|
||||
0x954c 0x7462
|
||||
0x954d 0x7489
|
||||
0x954e 0x749f
|
||||
0x954f 0x7501
|
||||
0x9550 0x756f
|
||||
0x9551 0x7682
|
||||
0x9552 0x769c
|
||||
0x9553 0x769e
|
||||
0x9554 0x769b
|
||||
0x9555 0x76a6
|
||||
0x9556 0xfa17
|
||||
0x9557 0x7746
|
||||
0x9558 0x52af
|
||||
0x9559 0x7821
|
||||
0x955a 0x784e
|
||||
0x955b 0x7864
|
||||
0x955c 0x787a
|
||||
0x955d 0x7930
|
||||
0x955e 0xfa18
|
||||
0x955f 0xfa19
|
||||
0x9560 0xfa1a
|
||||
0x9561 0x7994
|
||||
0x9562 0xfa1b
|
||||
0x9563 0x799b
|
||||
0x9564 0x7ad1
|
||||
0x9565 0x7ae7
|
||||
0x9566 0xfa1c
|
||||
0x9567 0x7aeb
|
||||
0x9568 0x7b9e
|
||||
0x9569 0xfa1d
|
||||
0x956a 0x7d48
|
||||
0x956b 0x7d5c
|
||||
0x956c 0x7db7
|
||||
0x956d 0x7da0
|
||||
0x956e 0x7dd6
|
||||
0x956f 0x7e52
|
||||
0x9570 0x7f47
|
||||
0x9571 0x7fa1
|
||||
0x9572 0xfa1e
|
||||
0x9573 0x8301
|
||||
0x9574 0x8362
|
||||
0x9575 0x837f
|
||||
0x9576 0x83c7
|
||||
0x9577 0x83f6
|
||||
0x9578 0x8448
|
||||
0x9579 0x84b4
|
||||
0x957a 0x8553
|
||||
0x957b 0x8559
|
||||
0x957c 0x856b
|
||||
0x957d 0xfa1f
|
||||
0x957e 0x85b0
|
||||
0x9621 0xfa20
|
||||
0x9622 0xfa21
|
||||
0x9623 0x8807
|
||||
0x9624 0x88f5
|
||||
0x9625 0x8a12
|
||||
0x9626 0x8a37
|
||||
0x9627 0x8a79
|
||||
0x9628 0x8aa7
|
||||
0x9629 0x8abe
|
||||
0x962a 0x8adf
|
||||
0x962b 0xfa22
|
||||
0x962c 0x8af6
|
||||
0x962d 0x8b53
|
||||
0x962e 0x8b7f
|
||||
0x962f 0x8cf0
|
||||
0x9630 0x8cf4
|
||||
0x9631 0x8d12
|
||||
0x9632 0x8d76
|
||||
0x9633 0xfa23
|
||||
0x9634 0x8ecf
|
||||
0x9635 0xfa24
|
||||
0x9636 0xfa25
|
||||
0x9637 0x9067
|
||||
0x9638 0x90de
|
||||
0x9639 0xfa26
|
||||
0x963a 0x9115
|
||||
0x963b 0x9127
|
||||
0x963c 0x91da
|
||||
0x963d 0x91d7
|
||||
0x963e 0x91de
|
||||
0x963f 0x91ed
|
||||
0x9640 0x91ee
|
||||
0x9641 0x91e4
|
||||
0x9642 0x91e5
|
||||
0x9643 0x9206
|
||||
0x9644 0x9210
|
||||
0x9645 0x920a
|
||||
0x9646 0x923a
|
||||
0x9647 0x9240
|
||||
0x9648 0x923c
|
||||
0x9649 0x924e
|
||||
0x964a 0x9259
|
||||
0x964b 0x9251
|
||||
0x964c 0x9239
|
||||
0x964d 0x9267
|
||||
0x964e 0x92a7
|
||||
0x964f 0x9277
|
||||
0x9650 0x9278
|
||||
0x9651 0x92e7
|
||||
0x9652 0x92d7
|
||||
0x9653 0x92d9
|
||||
0x9654 0x92d0
|
||||
0x9655 0xfa27
|
||||
0x9656 0x92d5
|
||||
0x9657 0x92e0
|
||||
0x9658 0x92d3
|
||||
0x9659 0x9325
|
||||
0x965a 0x9321
|
||||
0x965b 0x92fb
|
||||
0x965c 0xfa28
|
||||
0x965d 0x931e
|
||||
0x965e 0x92ff
|
||||
0x965f 0x931d
|
||||
0x9660 0x9302
|
||||
0x9661 0x9370
|
||||
0x9662 0x9357
|
||||
0x9663 0x93a4
|
||||
0x9664 0x93c6
|
||||
0x9665 0x93de
|
||||
0x9666 0x93f8
|
||||
0x9667 0x9431
|
||||
0x9668 0x9445
|
||||
0x9669 0x9448
|
||||
0x966a 0x9592
|
||||
0x966b 0xf9dc
|
||||
0x966c 0xfa29
|
||||
0x966d 0x969d
|
||||
0x966e 0x96af
|
||||
0x966f 0x9733
|
||||
0x9670 0x973b
|
||||
0x9671 0x9743
|
||||
0x9672 0x974d
|
||||
0x9673 0x974f
|
||||
0x9674 0x9751
|
||||
0x9675 0x9755
|
||||
0x9676 0x9857
|
||||
0x9677 0x9865
|
||||
0x9678 0xfa2a
|
||||
0x9679 0xfa2b
|
||||
0x967a 0x9927
|
||||
0x967b 0xfa2c
|
||||
0x967c 0x999e
|
||||
0x967d 0x9a4e
|
||||
0x967e 0x9ad9
|
||||
0x9721 0x9adc
|
||||
0x9722 0x9b75
|
||||
0x9723 0x9b72
|
||||
0x9724 0x9b8f
|
||||
0x9725 0x9bb1
|
||||
0x9726 0x9bbb
|
||||
0x9727 0x9c00
|
||||
0x9728 0x9d70
|
||||
0x9729 0x9d6b
|
||||
0x972a 0xfa2d
|
||||
0x972b 0x9e19
|
||||
0x972c 0x9ed1
|
387
jdk/make/tools/CharsetMapping/JIS_X_0208_Solaris.nr
Normal file
387
jdk/make/tools/CharsetMapping/JIS_X_0208_Solaris.nr
Normal file
@ -0,0 +1,387 @@
|
||||
0x7921 0x7e8a
|
||||
0x7922 0x891c
|
||||
0x7923 0x9348
|
||||
0x7924 0x9288
|
||||
0x7925 0x84dc
|
||||
0x7926 0x4fc9
|
||||
0x7927 0x70bb
|
||||
0x7928 0x6631
|
||||
0x7929 0x68c8
|
||||
0x792a 0x92f9
|
||||
0x792b 0x66fb
|
||||
0x792c 0x5f45
|
||||
0x792d 0x4e28
|
||||
0x792e 0x4ee1
|
||||
0x792f 0x4efc
|
||||
0x7930 0x4f00
|
||||
0x7931 0x4f03
|
||||
0x7932 0x4f39
|
||||
0x7933 0x4f56
|
||||
0x7934 0x4f92
|
||||
0x7935 0x4f8a
|
||||
0x7936 0x4f9a
|
||||
0x7937 0x4f94
|
||||
0x7938 0x4fcd
|
||||
0x7939 0x5040
|
||||
0x793a 0x5022
|
||||
0x793b 0x4fff
|
||||
0x793c 0x501e
|
||||
0x793d 0x5046
|
||||
0x793e 0x5070
|
||||
0x793f 0x5042
|
||||
0x7940 0x5094
|
||||
0x7941 0x50f4
|
||||
0x7942 0x50d8
|
||||
0x7943 0x514a
|
||||
0x7944 0x5164
|
||||
0x7945 0x519d
|
||||
0x7946 0x51be
|
||||
0x7947 0x51ec
|
||||
0x7948 0x5215
|
||||
0x7949 0x529c
|
||||
0x794a 0x52a6
|
||||
0x794b 0x52c0
|
||||
0x794c 0x52db
|
||||
0x794d 0x5300
|
||||
0x794e 0x5307
|
||||
0x794f 0x5324
|
||||
0x7950 0x5372
|
||||
0x7951 0x5393
|
||||
0x7952 0x53b2
|
||||
0x7953 0x53dd
|
||||
0x7954 0xfa0e
|
||||
0x7955 0x549c
|
||||
0x7956 0x548a
|
||||
0x7957 0x54a9
|
||||
0x7958 0x54ff
|
||||
0x7959 0x5586
|
||||
0x795a 0x5759
|
||||
0x795b 0x5765
|
||||
0x795c 0x57ac
|
||||
0x795d 0x57c8
|
||||
0x795e 0x57c7
|
||||
0x795f 0xfa0f
|
||||
0x7960 0xfa10
|
||||
0x7961 0x589e
|
||||
0x7962 0x58b2
|
||||
0x7963 0x590b
|
||||
0x7964 0x5953
|
||||
0x7965 0x595b
|
||||
0x7966 0x595d
|
||||
0x7967 0x5963
|
||||
0x7968 0x59a4
|
||||
0x7969 0x59ba
|
||||
0x796a 0x5b56
|
||||
0x796b 0x5bc0
|
||||
0x796c 0x752f
|
||||
0x796d 0x5bd8
|
||||
0x796e 0x5bec
|
||||
0x796f 0x5c1e
|
||||
0x7970 0x5ca6
|
||||
0x7971 0x5cba
|
||||
0x7972 0x5cf5
|
||||
0x7973 0x5d27
|
||||
0x7974 0x5d53
|
||||
0x7975 0xfa11
|
||||
0x7976 0x5d42
|
||||
0x7977 0x5d6d
|
||||
0x7978 0x5db8
|
||||
0x7979 0x5db9
|
||||
0x797a 0x5dd0
|
||||
0x797b 0x5f21
|
||||
0x797c 0x5f34
|
||||
0x797d 0x5f67
|
||||
0x797e 0x5fb7
|
||||
0x7a21 0x5fde
|
||||
0x7a22 0x605d
|
||||
0x7a23 0x6085
|
||||
0x7a24 0x608a
|
||||
0x7a25 0x60de
|
||||
0x7a26 0x60d5
|
||||
0x7a27 0x6120
|
||||
0x7a28 0x60f2
|
||||
0x7a29 0x6111
|
||||
0x7a2a 0x6137
|
||||
0x7a2b 0x6130
|
||||
0x7a2c 0x6198
|
||||
0x7a2d 0x6213
|
||||
0x7a2e 0x62a6
|
||||
0x7a2f 0x63f5
|
||||
0x7a30 0x6460
|
||||
0x7a31 0x649d
|
||||
0x7a32 0x64ce
|
||||
0x7a33 0x654e
|
||||
0x7a34 0x6600
|
||||
0x7a35 0x6615
|
||||
0x7a36 0x663b
|
||||
0x7a37 0x6609
|
||||
0x7a38 0x662e
|
||||
0x7a39 0x661e
|
||||
0x7a3a 0x6624
|
||||
0x7a3b 0x6665
|
||||
0x7a3c 0x6657
|
||||
0x7a3d 0x6659
|
||||
0x7a3e 0xfa12
|
||||
0x7a3f 0x6673
|
||||
0x7a40 0x6699
|
||||
0x7a41 0x66a0
|
||||
0x7a42 0x66b2
|
||||
0x7a43 0x66bf
|
||||
0x7a44 0x66fa
|
||||
0x7a45 0x670e
|
||||
0x7a46 0xf929
|
||||
0x7a47 0x6766
|
||||
0x7a48 0x67bb
|
||||
0x7a49 0x6852
|
||||
0x7a4a 0x67c0
|
||||
0x7a4b 0x6801
|
||||
0x7a4c 0x6844
|
||||
0x7a4d 0x68cf
|
||||
0x7a4e 0xfa13
|
||||
0x7a4f 0x6968
|
||||
0x7a50 0xfa14
|
||||
0x7a51 0x6998
|
||||
0x7a52 0x69e2
|
||||
0x7a53 0x6a30
|
||||
0x7a54 0x6a6b
|
||||
0x7a55 0x6a46
|
||||
0x7a56 0x6a73
|
||||
0x7a57 0x6a7e
|
||||
0x7a58 0x6ae2
|
||||
0x7a59 0x6ae4
|
||||
0x7a5a 0x6bd6
|
||||
0x7a5b 0x6c3f
|
||||
0x7a5c 0x6c5c
|
||||
0x7a5d 0x6c86
|
||||
0x7a5e 0x6c6f
|
||||
0x7a5f 0x6cda
|
||||
0x7a60 0x6d04
|
||||
0x7a61 0x6d87
|
||||
0x7a62 0x6d6f
|
||||
0x7a63 0x6d96
|
||||
0x7a64 0x6dac
|
||||
0x7a65 0x6dcf
|
||||
0x7a66 0x6df8
|
||||
0x7a67 0x6df2
|
||||
0x7a68 0x6dfc
|
||||
0x7a69 0x6e39
|
||||
0x7a6a 0x6e5c
|
||||
0x7a6b 0x6e27
|
||||
0x7a6c 0x6e3c
|
||||
0x7a6d 0x6ebf
|
||||
0x7a6e 0x6f88
|
||||
0x7a6f 0x6fb5
|
||||
0x7a70 0x6ff5
|
||||
0x7a71 0x7005
|
||||
0x7a72 0x7007
|
||||
0x7a73 0x7028
|
||||
0x7a74 0x7085
|
||||
0x7a75 0x70ab
|
||||
0x7a76 0x710f
|
||||
0x7a77 0x7104
|
||||
0x7a78 0x715c
|
||||
0x7a79 0x7146
|
||||
0x7a7a 0x7147
|
||||
0x7a7b 0xfa15
|
||||
0x7a7c 0x71c1
|
||||
0x7a7d 0x71fe
|
||||
0x7a7e 0x72b1
|
||||
0x7b21 0x72be
|
||||
0x7b22 0x7324
|
||||
0x7b23 0xfa16
|
||||
0x7b24 0x7377
|
||||
0x7b25 0x73bd
|
||||
0x7b26 0x73c9
|
||||
0x7b27 0x73d6
|
||||
0x7b28 0x73e3
|
||||
0x7b29 0x73d2
|
||||
0x7b2a 0x7407
|
||||
0x7b2b 0x73f5
|
||||
0x7b2c 0x7426
|
||||
0x7b2d 0x742a
|
||||
0x7b2e 0x7429
|
||||
0x7b2f 0x742e
|
||||
0x7b30 0x7462
|
||||
0x7b31 0x7489
|
||||
0x7b32 0x749f
|
||||
0x7b33 0x7501
|
||||
0x7b34 0x756f
|
||||
0x7b35 0x7682
|
||||
0x7b36 0x769c
|
||||
0x7b37 0x769e
|
||||
0x7b38 0x769b
|
||||
0x7b39 0x76a6
|
||||
0x7b3a 0xfa17
|
||||
0x7b3b 0x7746
|
||||
0x7b3c 0x52af
|
||||
0x7b3d 0x7821
|
||||
0x7b3e 0x784e
|
||||
0x7b3f 0x7864
|
||||
0x7b40 0x787a
|
||||
0x7b41 0x7930
|
||||
0x7b42 0xfa18
|
||||
0x7b43 0xfa19
|
||||
0x7b44 0xfa1a
|
||||
0x7b45 0x7994
|
||||
0x7b46 0xfa1b
|
||||
0x7b47 0x799b
|
||||
0x7b48 0x7ad1
|
||||
0x7b49 0x7ae7
|
||||
0x7b4a 0xfa1c
|
||||
0x7b4b 0x7aeb
|
||||
0x7b4c 0x7b9e
|
||||
0x7b4d 0xfa1d
|
||||
0x7b4e 0x7d48
|
||||
0x7b4f 0x7d5c
|
||||
0x7b50 0x7db7
|
||||
0x7b51 0x7da0
|
||||
0x7b52 0x7dd6
|
||||
0x7b53 0x7e52
|
||||
0x7b54 0x7f47
|
||||
0x7b55 0x7fa1
|
||||
0x7b56 0xfa1e
|
||||
0x7b57 0x8301
|
||||
0x7b58 0x8362
|
||||
0x7b59 0x837f
|
||||
0x7b5a 0x83c7
|
||||
0x7b5b 0x83f6
|
||||
0x7b5c 0x8448
|
||||
0x7b5d 0x84b4
|
||||
0x7b5e 0x8553
|
||||
0x7b5f 0x8559
|
||||
0x7b60 0x856b
|
||||
0x7b61 0xfa1f
|
||||
0x7b62 0x85b0
|
||||
0x7b63 0xfa20
|
||||
0x7b64 0xfa21
|
||||
0x7b65 0x8807
|
||||
0x7b66 0x88f5
|
||||
0x7b67 0x8a12
|
||||
0x7b68 0x8a37
|
||||
0x7b69 0x8a79
|
||||
0x7b6a 0x8aa7
|
||||
0x7b6b 0x8abe
|
||||
0x7b6c 0x8adf
|
||||
0x7b6d 0xfa22
|
||||
0x7b6e 0x8af6
|
||||
0x7b6f 0x8b53
|
||||
0x7b70 0x8b7f
|
||||
0x7b71 0x8cf0
|
||||
0x7b72 0x8cf4
|
||||
0x7b73 0x8d12
|
||||
0x7b74 0x8d76
|
||||
0x7b75 0xfa23
|
||||
0x7b76 0x8ecf
|
||||
0x7b77 0xfa24
|
||||
0x7b78 0xfa25
|
||||
0x7b79 0x9067
|
||||
0x7b7a 0x90de
|
||||
0x7b7b 0xfa26
|
||||
0x7b7c 0x9115
|
||||
0x7b7d 0x9127
|
||||
0x7b7e 0x91da
|
||||
0x7c21 0x91d7
|
||||
0x7c22 0x91de
|
||||
0x7c23 0x91ed
|
||||
0x7c24 0x91ee
|
||||
0x7c25 0x91e4
|
||||
0x7c26 0x91e5
|
||||
0x7c27 0x9206
|
||||
0x7c28 0x9210
|
||||
0x7c29 0x920a
|
||||
0x7c2a 0x923a
|
||||
0x7c2b 0x9240
|
||||
0x7c2c 0x923c
|
||||
0x7c2d 0x924e
|
||||
0x7c2e 0x9259
|
||||
0x7c2f 0x9251
|
||||
0x7c30 0x9239
|
||||
0x7c31 0x9267
|
||||
0x7c32 0x92a7
|
||||
0x7c33 0x9277
|
||||
0x7c34 0x9278
|
||||
0x7c35 0x92e7
|
||||
0x7c36 0x92d7
|
||||
0x7c37 0x92d9
|
||||
0x7c38 0x92d0
|
||||
0x7c39 0xfa27
|
||||
0x7c3a 0x92d5
|
||||
0x7c3b 0x92e0
|
||||
0x7c3c 0x92d3
|
||||
0x7c3d 0x9325
|
||||
0x7c3e 0x9321
|
||||
0x7c3f 0x92fb
|
||||
0x7c40 0xfa28
|
||||
0x7c41 0x931e
|
||||
0x7c42 0x92ff
|
||||
0x7c43 0x931d
|
||||
0x7c44 0x9302
|
||||
0x7c45 0x9370
|
||||
0x7c46 0x9357
|
||||
0x7c47 0x93a4
|
||||
0x7c48 0x93c6
|
||||
0x7c49 0x93de
|
||||
0x7c4a 0x93f8
|
||||
0x7c4b 0x9431
|
||||
0x7c4c 0x9445
|
||||
0x7c4d 0x9448
|
||||
0x7c4e 0x9592
|
||||
0x7c4f 0xf9dc
|
||||
0x7c50 0xfa29
|
||||
0x7c51 0x969d
|
||||
0x7c52 0x96af
|
||||
0x7c53 0x9733
|
||||
0x7c54 0x973b
|
||||
0x7c55 0x9743
|
||||
0x7c56 0x974d
|
||||
0x7c57 0x974f
|
||||
0x7c58 0x9751
|
||||
0x7c59 0x9755
|
||||
0x7c5a 0x9857
|
||||
0x7c5b 0x9865
|
||||
0x7c5c 0xfa2a
|
||||
0x7c5d 0xfa2b
|
||||
0x7c5e 0x9927
|
||||
0x7c5f 0xfa2c
|
||||
0x7c60 0x999e
|
||||
0x7c61 0x9a4e
|
||||
0x7c62 0x9ad9
|
||||
0x7c63 0x9adc
|
||||
0x7c64 0x9b75
|
||||
0x7c65 0x9b72
|
||||
0x7c66 0x9b8f
|
||||
0x7c67 0x9bb1
|
||||
0x7c68 0x9bbb
|
||||
0x7c69 0x9c00
|
||||
0x7c6a 0x9d70
|
||||
0x7c6b 0x9d6b
|
||||
0x7c6c 0xfa2d
|
||||
0x7c6d 0x9e19
|
||||
0x7c6e 0x9ed1
|
||||
0x7c71 0x2170
|
||||
0x7c72 0x2171
|
||||
0x7c73 0x2172
|
||||
0x7c74 0x2173
|
||||
0x7c75 0x2174
|
||||
0x7c76 0x2175
|
||||
0x7c77 0x2176
|
||||
0x7c78 0x2177
|
||||
0x7c79 0x2178
|
||||
0x7c7a 0x2179
|
||||
0x7c7b 0x3052
|
||||
0x7c7c 0x00a6
|
||||
0x7c7d 0xff07
|
||||
0x7c7e 0xff02
|
||||
0x932b 0x2160
|
||||
0x932c 0x2161
|
||||
0x932d 0x2162
|
||||
0x932e 0x2163
|
||||
0x932f 0x2164
|
||||
0x9330 0x2165
|
||||
0x9331 0x2166
|
||||
0x9332 0x2167
|
||||
0x9333 0x2168
|
||||
0x9334 0x2169
|
||||
0x9339 0x3231
|
||||
0x933a 0x2116
|
||||
0x933b 0x2121
|
6067
jdk/make/tools/CharsetMapping/JIS_X_0212.map
Normal file
6067
jdk/make/tools/CharsetMapping/JIS_X_0212.map
Normal file
File diff suppressed because it is too large
Load Diff
7105
jdk/make/tools/CharsetMapping/JIS_X_0212_MS5022X.map
Normal file
7105
jdk/make/tools/CharsetMapping/JIS_X_0212_MS5022X.map
Normal file
File diff suppressed because it is too large
Load Diff
6211
jdk/make/tools/CharsetMapping/JIS_X_0212_Solaris.map
Normal file
6211
jdk/make/tools/CharsetMapping/JIS_X_0212_Solaris.map
Normal file
File diff suppressed because it is too large
Load Diff
1
jdk/make/tools/CharsetMapping/JIS_X_0212_Solaris.nr
Normal file
1
jdk/make/tools/CharsetMapping/JIS_X_0212_Solaris.nr
Normal file
@ -0,0 +1 @@
|
||||
0x742c 0x2116
|
3
jdk/make/tools/CharsetMapping/PCK.c2b
Normal file
3
jdk/make/tools/CharsetMapping/PCK.c2b
Normal file
@ -0,0 +1,3 @@
|
||||
0x005c 0x00a5
|
||||
0x007e 0x203e
|
||||
|
7924
jdk/make/tools/CharsetMapping/PCK.map
Normal file
7924
jdk/make/tools/CharsetMapping/PCK.map
Normal file
File diff suppressed because it is too large
Load Diff
398
jdk/make/tools/CharsetMapping/PCK.nr
Normal file
398
jdk/make/tools/CharsetMapping/PCK.nr
Normal file
@ -0,0 +1,398 @@
|
||||
0x8790 0x2252
|
||||
0x8791 0x2261
|
||||
0x8792 0x222b
|
||||
0x8795 0x221a
|
||||
0x8796 0x22a5
|
||||
0x8797 0x2220
|
||||
0x879a 0x2235
|
||||
0x879b 0x2229
|
||||
0x879c 0x222a
|
||||
0xed40 0x7e8a
|
||||
0xed41 0x891c
|
||||
0xed42 0x9348
|
||||
0xed43 0x9288
|
||||
0xed44 0x84dc
|
||||
0xed45 0x4fc9
|
||||
0xed46 0x70bb
|
||||
0xed47 0x6631
|
||||
0xed48 0x68c8
|
||||
0xed49 0x92f9
|
||||
0xed4a 0x66fb
|
||||
0xed4b 0x5f45
|
||||
0xed4c 0x4e28
|
||||
0xed4d 0x4ee1
|
||||
0xed4e 0x4efc
|
||||
0xed4f 0x4f00
|
||||
0xed50 0x4f03
|
||||
0xed51 0x4f39
|
||||
0xed52 0x4f56
|
||||
0xed53 0x4f92
|
||||
0xed54 0x4f8a
|
||||
0xed55 0x4f9a
|
||||
0xed56 0x4f94
|
||||
0xed57 0x4fcd
|
||||
0xed58 0x5040
|
||||
0xed59 0x5022
|
||||
0xed5a 0x4fff
|
||||
0xed5b 0x501e
|
||||
0xed5c 0x5046
|
||||
0xed5d 0x5070
|
||||
0xed5e 0x5042
|
||||
0xed5f 0x5094
|
||||
0xed60 0x50f4
|
||||
0xed61 0x50d8
|
||||
0xed62 0x514a
|
||||
0xed63 0x5164
|
||||
0xed64 0x519d
|
||||
0xed65 0x51be
|
||||
0xed66 0x51ec
|
||||
0xed67 0x5215
|
||||
0xed68 0x529c
|
||||
0xed69 0x52a6
|
||||
0xed6a 0x52c0
|
||||
0xed6b 0x52db
|
||||
0xed6c 0x5300
|
||||
0xed6d 0x5307
|
||||
0xed6e 0x5324
|
||||
0xed6f 0x5372
|
||||
0xed70 0x5393
|
||||
0xed71 0x53b2
|
||||
0xed72 0x53dd
|
||||
0xed73 0xfa0e
|
||||
0xed74 0x549c
|
||||
0xed75 0x548a
|
||||
0xed76 0x54a9
|
||||
0xed77 0x54ff
|
||||
0xed78 0x5586
|
||||
0xed79 0x5759
|
||||
0xed7a 0x5765
|
||||
0xed7b 0x57ac
|
||||
0xed7c 0x57c8
|
||||
0xed7d 0x57c7
|
||||
0xed7e 0xfa0f
|
||||
0xed80 0xfa10
|
||||
0xed81 0x589e
|
||||
0xed82 0x58b2
|
||||
0xed83 0x590b
|
||||
0xed84 0x5953
|
||||
0xed85 0x595b
|
||||
0xed86 0x595d
|
||||
0xed87 0x5963
|
||||
0xed88 0x59a4
|
||||
0xed89 0x59ba
|
||||
0xed8a 0x5b56
|
||||
0xed8b 0x5bc0
|
||||
0xed8c 0x752f
|
||||
0xed8d 0x5bd8
|
||||
0xed8e 0x5bec
|
||||
0xed8f 0x5c1e
|
||||
0xed90 0x5ca6
|
||||
0xed91 0x5cba
|
||||
0xed92 0x5cf5
|
||||
0xed93 0x5d27
|
||||
0xed94 0x5d53
|
||||
0xed95 0xfa11
|
||||
0xed96 0x5d42
|
||||
0xed97 0x5d6d
|
||||
0xed98 0x5db8
|
||||
0xed99 0x5db9
|
||||
0xed9a 0x5dd0
|
||||
0xed9b 0x5f21
|
||||
0xed9c 0x5f34
|
||||
0xed9d 0x5f67
|
||||
0xed9e 0x5fb7
|
||||
0xed9f 0x5fde
|
||||
0xeda0 0x605d
|
||||
0xeda1 0x6085
|
||||
0xeda2 0x608a
|
||||
0xeda3 0x60de
|
||||
0xeda4 0x60d5
|
||||
0xeda5 0x6120
|
||||
0xeda6 0x60f2
|
||||
0xeda7 0x6111
|
||||
0xeda8 0x6137
|
||||
0xeda9 0x6130
|
||||
0xedaa 0x6198
|
||||
0xedab 0x6213
|
||||
0xedac 0x62a6
|
||||
0xedad 0x63f5
|
||||
0xedae 0x6460
|
||||
0xedaf 0x649d
|
||||
0xedb0 0x64ce
|
||||
0xedb1 0x654e
|
||||
0xedb2 0x6600
|
||||
0xedb3 0x6615
|
||||
0xedb4 0x663b
|
||||
0xedb5 0x6609
|
||||
0xedb6 0x662e
|
||||
0xedb7 0x661e
|
||||
0xedb8 0x6624
|
||||
0xedb9 0x6665
|
||||
0xedba 0x6657
|
||||
0xedbb 0x6659
|
||||
0xedbc 0xfa12
|
||||
0xedbd 0x6673
|
||||
0xedbe 0x6699
|
||||
0xedbf 0x66a0
|
||||
0xedc0 0x66b2
|
||||
0xedc1 0x66bf
|
||||
0xedc2 0x66fa
|
||||
0xedc3 0x670e
|
||||
0xedc4 0xf929
|
||||
0xedc5 0x6766
|
||||
0xedc6 0x67bb
|
||||
0xedc7 0x6852
|
||||
0xedc8 0x67c0
|
||||
0xedc9 0x6801
|
||||
0xedca 0x6844
|
||||
0xedcb 0x68cf
|
||||
0xedcc 0xfa13
|
||||
0xedcd 0x6968
|
||||
0xedce 0xfa14
|
||||
0xedcf 0x6998
|
||||
0xedd0 0x69e2
|
||||
0xedd1 0x6a30
|
||||
0xedd2 0x6a6b
|
||||
0xedd3 0x6a46
|
||||
0xedd4 0x6a73
|
||||
0xedd5 0x6a7e
|
||||
0xedd6 0x6ae2
|
||||
0xedd7 0x6ae4
|
||||
0xedd8 0x6bd6
|
||||
0xedd9 0x6c3f
|
||||
0xedda 0x6c5c
|
||||
0xeddb 0x6c86
|
||||
0xeddc 0x6c6f
|
||||
0xeddd 0x6cda
|
||||
0xedde 0x6d04
|
||||
0xeddf 0x6d87
|
||||
0xede0 0x6d6f
|
||||
0xede1 0x6d96
|
||||
0xede2 0x6dac
|
||||
0xede3 0x6dcf
|
||||
0xede4 0x6df8
|
||||
0xede5 0x6df2
|
||||
0xede6 0x6dfc
|
||||
0xede7 0x6e39
|
||||
0xede8 0x6e5c
|
||||
0xede9 0x6e27
|
||||
0xedea 0x6e3c
|
||||
0xedeb 0x6ebf
|
||||
0xedec 0x6f88
|
||||
0xeded 0x6fb5
|
||||
0xedee 0x6ff5
|
||||
0xedef 0x7005
|
||||
0xedf0 0x7007
|
||||
0xedf1 0x7028
|
||||
0xedf2 0x7085
|
||||
0xedf3 0x70ab
|
||||
0xedf4 0x710f
|
||||
0xedf5 0x7104
|
||||
0xedf6 0x715c
|
||||
0xedf7 0x7146
|
||||
0xedf8 0x7147
|
||||
0xedf9 0xfa15
|
||||
0xedfa 0x71c1
|
||||
0xedfb 0x71fe
|
||||
0xedfc 0x72b1
|
||||
0xee40 0x72be
|
||||
0xee41 0x7324
|
||||
0xee42 0xfa16
|
||||
0xee43 0x7377
|
||||
0xee44 0x73bd
|
||||
0xee45 0x73c9
|
||||
0xee46 0x73d6
|
||||
0xee47 0x73e3
|
||||
0xee48 0x73d2
|
||||
0xee49 0x7407
|
||||
0xee4a 0x73f5
|
||||
0xee4b 0x7426
|
||||
0xee4c 0x742a
|
||||
0xee4d 0x7429
|
||||
0xee4e 0x742e
|
||||
0xee4f 0x7462
|
||||
0xee50 0x7489
|
||||
0xee51 0x749f
|
||||
0xee52 0x7501
|
||||
0xee53 0x756f
|
||||
0xee54 0x7682
|
||||
0xee55 0x769c
|
||||
0xee56 0x769e
|
||||
0xee57 0x769b
|
||||
0xee58 0x76a6
|
||||
0xee59 0xfa17
|
||||
0xee5a 0x7746
|
||||
0xee5b 0x52af
|
||||
0xee5c 0x7821
|
||||
0xee5d 0x784e
|
||||
0xee5e 0x7864
|
||||
0xee5f 0x787a
|
||||
0xee60 0x7930
|
||||
0xee61 0xfa18
|
||||
0xee62 0xfa19
|
||||
0xee63 0xfa1a
|
||||
0xee64 0x7994
|
||||
0xee65 0xfa1b
|
||||
0xee66 0x799b
|
||||
0xee67 0x7ad1
|
||||
0xee68 0x7ae7
|
||||
0xee69 0xfa1c
|
||||
0xee6a 0x7aeb
|
||||
0xee6b 0x7b9e
|
||||
0xee6c 0xfa1d
|
||||
0xee6d 0x7d48
|
||||
0xee6e 0x7d5c
|
||||
0xee6f 0x7db7
|
||||
0xee70 0x7da0
|
||||
0xee71 0x7dd6
|
||||
0xee72 0x7e52
|
||||
0xee73 0x7f47
|
||||
0xee74 0x7fa1
|
||||
0xee75 0xfa1e
|
||||
0xee76 0x8301
|
||||
0xee77 0x8362
|
||||
0xee78 0x837f
|
||||
0xee79 0x83c7
|
||||
0xee7a 0x83f6
|
||||
0xee7b 0x8448
|
||||
0xee7c 0x84b4
|
||||
0xee7d 0x8553
|
||||
0xee7e 0x8559
|
||||
0xee80 0x856b
|
||||
0xee81 0xfa1f
|
||||
0xee82 0x85b0
|
||||
0xee83 0xfa20
|
||||
0xee84 0xfa21
|
||||
0xee85 0x8807
|
||||
0xee86 0x88f5
|
||||
0xee87 0x8a12
|
||||
0xee88 0x8a37
|
||||
0xee89 0x8a79
|
||||
0xee8a 0x8aa7
|
||||
0xee8b 0x8abe
|
||||
0xee8c 0x8adf
|
||||
0xee8d 0xfa22
|
||||
0xee8e 0x8af6
|
||||
0xee8f 0x8b53
|
||||
0xee90 0x8b7f
|
||||
0xee91 0x8cf0
|
||||
0xee92 0x8cf4
|
||||
0xee93 0x8d12
|
||||
0xee94 0x8d76
|
||||
0xee95 0xfa23
|
||||
0xee96 0x8ecf
|
||||
0xee97 0xfa24
|
||||
0xee98 0xfa25
|
||||
0xee99 0x9067
|
||||
0xee9a 0x90de
|
||||
0xee9b 0xfa26
|
||||
0xee9c 0x9115
|
||||
0xee9d 0x9127
|
||||
0xee9e 0x91da
|
||||
0xee9f 0x91d7
|
||||
0xeea0 0x91de
|
||||
0xeea1 0x91ed
|
||||
0xeea2 0x91ee
|
||||
0xeea3 0x91e4
|
||||
0xeea4 0x91e5
|
||||
0xeea5 0x9206
|
||||
0xeea6 0x9210
|
||||
0xeea7 0x920a
|
||||
0xeea8 0x923a
|
||||
0xeea9 0x9240
|
||||
0xeeaa 0x923c
|
||||
0xeeab 0x924e
|
||||
0xeeac 0x9259
|
||||
0xeead 0x9251
|
||||
0xeeae 0x9239
|
||||
0xeeaf 0x9267
|
||||
0xeeb0 0x92a7
|
||||
0xeeb1 0x9277
|
||||
0xeeb2 0x9278
|
||||
0xeeb3 0x92e7
|
||||
0xeeb4 0x92d7
|
||||
0xeeb5 0x92d9
|
||||
0xeeb6 0x92d0
|
||||
0xeeb7 0xfa27
|
||||
0xeeb8 0x92d5
|
||||
0xeeb9 0x92e0
|
||||
0xeeba 0x92d3
|
||||
0xeebb 0x9325
|
||||
0xeebc 0x9321
|
||||
0xeebd 0x92fb
|
||||
0xeebe 0xfa28
|
||||
0xeebf 0x931e
|
||||
0xeec0 0x92ff
|
||||
0xeec1 0x931d
|
||||
0xeec2 0x9302
|
||||
0xeec3 0x9370
|
||||
0xeec4 0x9357
|
||||
0xeec5 0x93a4
|
||||
0xeec6 0x93c6
|
||||
0xeec7 0x93de
|
||||
0xeec8 0x93f8
|
||||
0xeec9 0x9431
|
||||
0xeeca 0x9445
|
||||
0xeecb 0x9448
|
||||
0xeecc 0x9592
|
||||
0xeecd 0xf9dc
|
||||
0xeece 0xfa29
|
||||
0xeecf 0x969d
|
||||
0xeed0 0x96af
|
||||
0xeed1 0x9733
|
||||
0xeed2 0x973b
|
||||
0xeed3 0x9743
|
||||
0xeed4 0x974d
|
||||
0xeed5 0x974f
|
||||
0xeed6 0x9751
|
||||
0xeed7 0x9755
|
||||
0xeed8 0x9857
|
||||
0xeed9 0x9865
|
||||
0xeeda 0xfa2a
|
||||
0xeedb 0xfa2b
|
||||
0xeedc 0x9927
|
||||
0xeedd 0xfa2c
|
||||
0xeede 0x999e
|
||||
0xeedf 0x9a4e
|
||||
0xeee0 0x9ad9
|
||||
0xeee1 0x9adc
|
||||
0xeee2 0x9b75
|
||||
0xeee3 0x9b72
|
||||
0xeee4 0x9b8f
|
||||
0xeee5 0x9bb1
|
||||
0xeee6 0x9bbb
|
||||
0xeee7 0x9c00
|
||||
0xeee8 0x9d70
|
||||
0xeee9 0x9d6b
|
||||
0xeeea 0xfa2d
|
||||
0xeeeb 0x9e19
|
||||
0xeeec 0x9ed1
|
||||
0xeeef 0x2170
|
||||
0xeef0 0x2171
|
||||
0xeef1 0x2172
|
||||
0xeef2 0x2173
|
||||
0xeef3 0x2174
|
||||
0xeef4 0x2175
|
||||
0xeef5 0x2176
|
||||
0xeef6 0x2177
|
||||
0xeef7 0x2178
|
||||
0xeef8 0x2179
|
||||
0xeef9 0x3052
|
||||
0xeefa 0x00a6
|
||||
0xeefb 0xff07
|
||||
0xeefc 0xff02
|
||||
0xfa4a 0x2160
|
||||
0xfa4b 0x2161
|
||||
0xfa4c 0x2162
|
||||
0xfa4d 0x2163
|
||||
0xfa4e 0x2164
|
||||
0xfa4f 0x2165
|
||||
0xfa50 0x2166
|
||||
0xfa51 0x2167
|
||||
0xfa52 0x2168
|
||||
0xfa53 0x2169
|
||||
0xfa54 0x3052
|
||||
0xfa58 0x3231
|
||||
0xfa59 0x2116
|
||||
0xfa5a 0x2121
|
||||
0xfa5b 0x306e
|
3
jdk/make/tools/CharsetMapping/SJIS.c2b
Normal file
3
jdk/make/tools/CharsetMapping/SJIS.c2b
Normal file
@ -0,0 +1,3 @@
|
||||
0x005c 0x00a5
|
||||
0x007e 0x203e
|
||||
|
7079
jdk/make/tools/CharsetMapping/SJIS.map
Normal file
7079
jdk/make/tools/CharsetMapping/SJIS.map
Normal file
File diff suppressed because it is too large
Load Diff
@ -10,6 +10,8 @@ MS936 x-mswin-936 MS936 basic sun.nio.cs.ext true 0x81 0xfe 0x
|
||||
MS949 x-windows-949 MS949 basic sun.nio.cs.ext true 0x81 0xfe 0x41 0xfe
|
||||
MS950 x-windows-950 MS950 basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfe
|
||||
GBK GBK GBK basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfe
|
||||
SJIS Shift_JIS SJIS basic sun.nio.cs.ext true 0x81 0xfc 0x40 0xfc
|
||||
PCK x-PCK PCK basic sun.nio.cs.ext true 0x81 0xfc 0x40 0xfc
|
||||
IBM1364 x-IBM1364 Cp1364 ebcdic sun.nio.cs.ext false 0x40 0xde 0x40 0xfe
|
||||
IBM1381 x-IBM1381 Cp1381 basic sun.nio.cs.ext true 0x8c 0xf7 0xa1 0xfe
|
||||
IBM1383 x-IBM1383 Cp1383 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe
|
||||
@ -24,3 +26,10 @@ IBM948 x-IBM948 Cp948 basic sun.nio.cs.ext true 0x81 0xfe 0
|
||||
IBM949 x-IBM949 Cp949 basic sun.nio.cs.ext false 0x8f 0xfe 0xa1 0xfe
|
||||
IBM950 x-IBM950 Cp950 basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfe
|
||||
IBM970 x-IBM970 Cp970 euc_sim sun.nio.cs.ext true 0xa1 0xfe 0xa1 0xfe
|
||||
JIS_X_0208 x-JIS0208 JIS0208 dbcsonly sun.nio.cs.ext false 0x21 0x7e 0x21 0x7e
|
||||
JIS_X_0212 JIS_X0212-1990 JIS0212 dbcsonly sun.nio.cs.ext false 0x21 0x7e 0x21 0x7e
|
||||
JIS_X_0208_Solaris x-JIS0208_Solaris JIS0208_Solaris dbcsonly sun.nio.cs.ext false 0x21 0x9e 0x21 0x7e
|
||||
JIS_X_0208_MS5022X x-JIS0208_MS5022X JIS0208_MS5022X dbcsonly sun.nio.cs.ext false 0x21 0x7e 0x21 0x7e
|
||||
JIS_X_0208_MS932 x-JIS0208_MS932 JIS0208_MS932 dbcsonly sun.nio.cs.ext false 0x21 0x7e 0x21 0x7e
|
||||
JIS_X_0212_Solaris x-JIS0212_Solaris JIS0212_Solaris dbcsonly sun.nio.cs.ext false 0x21 0x7e 0x21 0x7e
|
||||
JIS_X_0212_MS5022X x-JIS0212_MS5022X JIS0212_MS5022X dbcsonly sun.nio.cs.ext false 0x21 0x7e 0x21 0x7e
|
||||
|
@ -53,7 +53,7 @@ ISO_8859_11 x-iso-8859-11 x-iso-8859-11 true sun.nio.cs.ext
|
||||
ISO_8859_3 ISO-8859-3 ISO8859_3 true sun.nio.cs.ext
|
||||
ISO_8859_6 ISO-8859-6 ISO8859_6 true sun.nio.cs.ext
|
||||
ISO_8859_8 ISO-8859-8 ISO8859_8 true sun.nio.cs.ext
|
||||
#JIS_X_0201 JIS_X0201 JIS_X0201 true sun.nio.cs.ext
|
||||
JIS_X_0201 JIS_X0201 JIS_X0201 true sun.nio.cs.ext
|
||||
MS1255 windows-1255 Cp1255 true sun.nio.cs.ext
|
||||
MS1256 windows-1256 Cp1256 true sun.nio.cs.ext
|
||||
MS1258 windows-1258 Cp1258 true sun.nio.cs.ext
|
||||
|
@ -194,6 +194,15 @@ public class DBCS {
|
||||
if (hisName == null)
|
||||
hisName = "";
|
||||
|
||||
// (5) c2b replacement, only used for JIs0208/0212, which
|
||||
// are two pure db charsets so default '3f' does not work
|
||||
String c2bRepl = "";
|
||||
if (clzName.startsWith("JIS_X_0208")) {
|
||||
c2bRepl = "new byte[]{ (byte)0x21, (byte)0x29 },";
|
||||
} else if (clzName.startsWith("JIS_X_0212")) {
|
||||
c2bRepl = "new byte[]{ (byte)0x22, (byte)0x44 },";
|
||||
}
|
||||
|
||||
while (s.hasNextLine()) {
|
||||
String line = s.nextLine();
|
||||
if (line.indexOf("$") == -1) {
|
||||
@ -227,7 +236,8 @@ public class DBCS {
|
||||
.replace("$B2C$", b2c)
|
||||
.replace("$C2BLENGTH$", "0x" + Integer.toString(c2bOff, 16))
|
||||
.replace("$NONROUNDTRIP_B2C$", b2cNR)
|
||||
.replace("$NONROUNDTRIP_C2B$", c2bNR);
|
||||
.replace("$NONROUNDTRIP_C2B$", c2bNR)
|
||||
.replace("$ENC_REPLACEMENT$", c2bRepl);
|
||||
|
||||
ops.println(line);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public class SBCS {
|
||||
}
|
||||
}
|
||||
|
||||
static Pattern sbmap = Pattern.compile("0x(\\p{XDigit}++)\\s++U\\+(\\p{XDigit}++)(\\s++#.*)?");
|
||||
static Pattern sbmap = Pattern.compile("0x(\\p{XDigit}++)\\s++(?:U\\+|0x)?(\\p{XDigit}++)(?:\\s++#.*)?");
|
||||
|
||||
private static void genClass0(String srcDir, String dstDir,
|
||||
String template,
|
||||
|
@ -807,8 +807,7 @@ SRC_ZIP_INCLUDES = \
|
||||
org/ietf \
|
||||
org/omg \
|
||||
org/w3c/dom \
|
||||
org/xml/sax \
|
||||
sunw
|
||||
org/xml/sax
|
||||
|
||||
SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes
|
||||
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
|
||||
|
@ -33,7 +33,6 @@ EXCLUDE_PKGS = \
|
||||
java.awt.peer \
|
||||
java.awt.dnd.peer \
|
||||
sun.* \
|
||||
sunw.* \
|
||||
com.sun.* \
|
||||
org.apache.* \
|
||||
org.jcp.* \
|
||||
|
@ -259,7 +259,8 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
protected void installKeyboardActions() {
|
||||
super.installKeyboardActions();
|
||||
|
||||
final ActionMap actionMap = comboBox.getActionMap();
|
||||
ActionMap actionMap = new ActionMapUIResource();
|
||||
|
||||
actionMap.put("aquaSelectNext", highlightNextAction);
|
||||
actionMap.put("aquaSelectPrevious", highlightPreviousAction);
|
||||
actionMap.put("aquaEnterPressed", triggerSelectionAction);
|
||||
@ -269,6 +270,8 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
|
||||
actionMap.put("aquaSelectEnd", highlightLastAction);
|
||||
actionMap.put("aquaSelectPageUp", highlightPageUpAction);
|
||||
actionMap.put("aquaSelectPageDown", highlightPageDownAction);
|
||||
|
||||
SwingUtilities.replaceUIActionMap(comboBox, actionMap);
|
||||
}
|
||||
|
||||
abstract class ComboBoxAction extends AbstractAction {
|
||||
|
@ -221,9 +221,14 @@ class MacOSXPreferences extends AbstractPreferences {
|
||||
// Flush should *not* check for removal, unlike sync, but should
|
||||
// prevent simultaneous removal.
|
||||
synchronized(lock) {
|
||||
// fixme! overkill
|
||||
if (!MacOSXPreferencesFile.flushWorld()) {
|
||||
throw new BackingStoreException("Synchronization failed for node '" + path + "'");
|
||||
if (isUser) {
|
||||
if (!MacOSXPreferencesFile.flushUser()) {
|
||||
throw new BackingStoreException("Synchronization failed for node '" + path + "'");
|
||||
}
|
||||
} else {
|
||||
if (!MacOSXPreferencesFile.flushWorld()) {
|
||||
throw new BackingStoreException("Synchronization failed for node '" + path + "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -233,7 +233,23 @@ class MacOSXPreferencesFile {
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
//Flush only current user preferences
|
||||
static synchronized boolean flushUser() {
|
||||
boolean ok = true;
|
||||
if (changedFiles != null && !changedFiles.isEmpty()) {
|
||||
Iterator<MacOSXPreferencesFile> iterator = changedFiles.iterator();
|
||||
while(iterator.hasNext()) {
|
||||
MacOSXPreferencesFile f = iterator.next();
|
||||
if (f.user == cfCurrentUser) {
|
||||
if (!f.synchronize())
|
||||
ok = false;
|
||||
else
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
// Write all prefs changes to disk, but do not clear all cached prefs
|
||||
// values. Also kills any scheduled flush task.
|
||||
|
@ -128,16 +128,6 @@ final class LWTextAreaPeer
|
||||
repaintPeer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setText(final String l) {
|
||||
// Please note that we do not want to post an event
|
||||
// if TextArea.setText() replaces an empty text by an empty text,
|
||||
// that is, if component's text remains unchanged.
|
||||
if (!l.isEmpty() || getTextComponent().getDocument().getLength() != 0) {
|
||||
super.setText(l);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void replaceRange(final String text, final int start,
|
||||
final int end) {
|
||||
|
@ -124,7 +124,7 @@ abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setText(final String l) {
|
||||
public final void setText(final String l) {
|
||||
synchronized (getDelegateLock()) {
|
||||
// JTextArea.setText() posts two different events (remove & insert).
|
||||
// Since we make no differences between text events,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2012, 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
|
||||
@ -45,6 +45,9 @@ import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl;
|
||||
* @author Sergey Malenkov
|
||||
*/
|
||||
public final class TypeResolver {
|
||||
|
||||
private static final WeakCache<Type, Map<Type, Type>> CACHE = new WeakCache<>();
|
||||
|
||||
/**
|
||||
* Replaces the given {@code type} in an inherited method
|
||||
* with the actual type it has in the given {@code inClass}.
|
||||
@ -149,12 +152,55 @@ public final class TypeResolver {
|
||||
* @param formal the type where occurrences of the variables
|
||||
* in {@code actual} will be replaced by the corresponding bound values
|
||||
* @return a resolved type
|
||||
*
|
||||
* @see #TypeResolver(Type)
|
||||
* @see #resolve(Type)
|
||||
*/
|
||||
public static Type resolve(Type actual, Type formal) {
|
||||
return getTypeResolver(actual).resolve(formal);
|
||||
if (formal instanceof Class) {
|
||||
return formal;
|
||||
}
|
||||
if (formal instanceof GenericArrayType) {
|
||||
Type comp = ((GenericArrayType) formal).getGenericComponentType();
|
||||
comp = resolve(actual, comp);
|
||||
return (comp instanceof Class)
|
||||
? Array.newInstance((Class<?>) comp, 0).getClass()
|
||||
: GenericArrayTypeImpl.make(comp);
|
||||
}
|
||||
if (formal instanceof ParameterizedType) {
|
||||
ParameterizedType fpt = (ParameterizedType) formal;
|
||||
Type[] actuals = resolve(actual, fpt.getActualTypeArguments());
|
||||
return ParameterizedTypeImpl.make(
|
||||
(Class<?>) fpt.getRawType(), actuals, fpt.getOwnerType());
|
||||
}
|
||||
if (formal instanceof WildcardType) {
|
||||
WildcardType fwt = (WildcardType) formal;
|
||||
Type[] upper = resolve(actual, fwt.getUpperBounds());
|
||||
Type[] lower = resolve(actual, fwt.getLowerBounds());
|
||||
return new WildcardTypeImpl(upper, lower);
|
||||
}
|
||||
if (formal instanceof TypeVariable) {
|
||||
Map<Type, Type> map;
|
||||
synchronized (CACHE) {
|
||||
map = CACHE.get(actual);
|
||||
if (map == null) {
|
||||
map = new HashMap<>();
|
||||
prepare(map, actual);
|
||||
CACHE.put(actual, map);
|
||||
}
|
||||
}
|
||||
Type result = map.get(formal);
|
||||
if (result == null || result.equals(formal)) {
|
||||
return formal;
|
||||
}
|
||||
result = fixGenericArray(result);
|
||||
// A variable can be bound to another variable that is itself bound
|
||||
// to something. For example, given:
|
||||
// class Super<T> {...}
|
||||
// class Mid<X> extends Super<T> {...}
|
||||
// class Sub extends Mid<String>
|
||||
// the variable T is bound to X, which is in turn bound to String.
|
||||
// So if we have to resolve T, we need the tail recursion here.
|
||||
return resolve(actual, result);
|
||||
}
|
||||
throw new IllegalArgumentException("Bad Type kind: " + formal.getClass());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -164,12 +210,14 @@ public final class TypeResolver {
|
||||
* @param actual the type that supplies bindings for type variables
|
||||
* @param formals the array of types to resolve
|
||||
* @return an array of resolved types
|
||||
*
|
||||
* @see #TypeResolver(Type)
|
||||
* @see #resolve(Type[])
|
||||
*/
|
||||
public static Type[] resolve(Type actual, Type[] formals) {
|
||||
return getTypeResolver(actual).resolve(formals);
|
||||
int length = formals.length;
|
||||
Type[] actuals = new Type[length];
|
||||
for (int i = 0; i < length; i++) {
|
||||
actuals[i] = resolve(actual, formals[i]);
|
||||
}
|
||||
return actuals;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -228,32 +276,6 @@ public final class TypeResolver {
|
||||
return classes;
|
||||
}
|
||||
|
||||
public static TypeResolver getTypeResolver(Type type) {
|
||||
synchronized (CACHE) {
|
||||
TypeResolver resolver = CACHE.get(type);
|
||||
if (resolver == null) {
|
||||
resolver = new TypeResolver(type);
|
||||
CACHE.put(type, resolver);
|
||||
}
|
||||
return resolver;
|
||||
}
|
||||
}
|
||||
|
||||
private static final WeakCache<Type, TypeResolver> CACHE = new WeakCache<>();
|
||||
|
||||
private final Map<TypeVariable<?>, Type> map = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Constructs the type resolver for the given actual type.
|
||||
*
|
||||
* @param actual the type that supplies bindings for type variables
|
||||
*
|
||||
* @see #prepare(Type)
|
||||
*/
|
||||
private TypeResolver(Type actual) {
|
||||
prepare(actual);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fills the map from type parameters
|
||||
* to types as seen by the given {@code type}.
|
||||
@ -265,9 +287,10 @@ public final class TypeResolver {
|
||||
* to a {@link ParameterizedType ParameterizedType} with no parameters,
|
||||
* or it represents the erasure of a {@link ParameterizedType ParameterizedType}.
|
||||
*
|
||||
* @param map the mappings of all type variables
|
||||
* @param type the next type in the hierarchy
|
||||
*/
|
||||
private void prepare(Type type) {
|
||||
private static void prepare(Map<Type, Type> map, Type type) {
|
||||
Class<?> raw = (Class<?>)((type instanceof Class<?>)
|
||||
? type
|
||||
: ((ParameterizedType)type).getRawType());
|
||||
@ -280,90 +303,24 @@ public final class TypeResolver {
|
||||
|
||||
assert formals.length == actuals.length;
|
||||
for (int i = 0; i < formals.length; i++) {
|
||||
this.map.put(formals[i], actuals[i]);
|
||||
map.put(formals[i], actuals[i]);
|
||||
}
|
||||
Type gSuperclass = raw.getGenericSuperclass();
|
||||
if (gSuperclass != null) {
|
||||
prepare(gSuperclass);
|
||||
prepare(map, gSuperclass);
|
||||
}
|
||||
for (Type gInterface : raw.getGenericInterfaces()) {
|
||||
prepare(gInterface);
|
||||
prepare(map, gInterface);
|
||||
}
|
||||
// If type is the raw version of a parameterized class, we type-erase
|
||||
// all of its type variables, including inherited ones.
|
||||
if (type instanceof Class<?> && formals.length > 0) {
|
||||
for (Map.Entry<TypeVariable<?>, Type> entry : this.map.entrySet()) {
|
||||
for (Map.Entry<Type, Type> entry : map.entrySet()) {
|
||||
entry.setValue(erase(entry.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the given {@code formal} type
|
||||
* with the type it stand for in this type resolver.
|
||||
*
|
||||
* @param formal the array of types to resolve
|
||||
* @return a resolved type
|
||||
*/
|
||||
private Type resolve(Type formal) {
|
||||
if (formal instanceof Class) {
|
||||
return formal;
|
||||
}
|
||||
if (formal instanceof GenericArrayType) {
|
||||
Type comp = ((GenericArrayType)formal).getGenericComponentType();
|
||||
comp = resolve(comp);
|
||||
return (comp instanceof Class)
|
||||
? Array.newInstance((Class<?>)comp, 0).getClass()
|
||||
: GenericArrayTypeImpl.make(comp);
|
||||
}
|
||||
if (formal instanceof ParameterizedType) {
|
||||
ParameterizedType fpt = (ParameterizedType)formal;
|
||||
Type[] actuals = resolve(fpt.getActualTypeArguments());
|
||||
return ParameterizedTypeImpl.make(
|
||||
(Class<?>)fpt.getRawType(), actuals, fpt.getOwnerType());
|
||||
}
|
||||
if (formal instanceof WildcardType) {
|
||||
WildcardType fwt = (WildcardType)formal;
|
||||
Type[] upper = resolve(fwt.getUpperBounds());
|
||||
Type[] lower = resolve(fwt.getLowerBounds());
|
||||
return new WildcardTypeImpl(upper, lower);
|
||||
}
|
||||
if (!(formal instanceof TypeVariable)) {
|
||||
throw new IllegalArgumentException("Bad Type kind: " + formal.getClass());
|
||||
}
|
||||
Type actual = this.map.get((TypeVariable) formal);
|
||||
if (actual == null || actual.equals(formal)) {
|
||||
return formal;
|
||||
}
|
||||
actual = fixGenericArray(actual);
|
||||
return resolve(actual);
|
||||
// A variable can be bound to another variable that is itself bound
|
||||
// to something. For example, given:
|
||||
// class Super<T> {...}
|
||||
// class Mid<X> extends Super<T> {...}
|
||||
// class Sub extends Mid<String>
|
||||
// the variable T is bound to X, which is in turn bound to String.
|
||||
// So if we have to resolve T, we need the tail recursion here.
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces all formal types in the given array
|
||||
* with the types they stand for in this type resolver.
|
||||
*
|
||||
* @param formals the array of types to resolve
|
||||
* @return an array of resolved types
|
||||
*
|
||||
* @see #resolve(Type)
|
||||
*/
|
||||
private Type[] resolve(Type[] formals) {
|
||||
int length = formals.length;
|
||||
Type[] actuals = new Type[length];
|
||||
for (int i = 0; i < length; i++) {
|
||||
actuals[i] = resolve(formals[i]);
|
||||
}
|
||||
return actuals;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces a {@link GenericArrayType GenericArrayType}
|
||||
* with plain array class where it is possible.
|
||||
|
@ -164,8 +164,10 @@ public final class MethodFinder extends AbstractFinder<Method> {
|
||||
return findAccessibleMethod(m);
|
||||
}
|
||||
Type[] gpts = m.getGenericParameterTypes();
|
||||
if (Arrays.equals(params, TypeResolver.erase(TypeResolver.resolve(pt, gpts)))) {
|
||||
return findAccessibleMethod(m);
|
||||
if (params.length == gpts.length) {
|
||||
if (Arrays.equals(params, TypeResolver.erase(TypeResolver.resolve(pt, gpts)))) {
|
||||
return findAccessibleMethod(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -105,22 +105,6 @@ public final class OAEPParameters extends AlgorithmParametersSpi {
|
||||
}
|
||||
}
|
||||
|
||||
private static String convertToStandardName(String internalName) {
|
||||
if (internalName.equals("SHA")) {
|
||||
return "SHA-1";
|
||||
} else if (internalName.equals("SHA224")) {
|
||||
return "SHA-224";
|
||||
} else if (internalName.equals("SHA256")) {
|
||||
return "SHA-256";
|
||||
} else if (internalName.equals("SHA384")) {
|
||||
return "SHA-384";
|
||||
} else if (internalName.equals("SHA512")) {
|
||||
return "SHA-512";
|
||||
} else {
|
||||
return internalName;
|
||||
}
|
||||
}
|
||||
|
||||
protected void engineInit(byte[] encoded)
|
||||
throws IOException {
|
||||
DerInputStream der = new DerInputStream(encoded);
|
||||
@ -132,8 +116,8 @@ public final class OAEPParameters extends AlgorithmParametersSpi {
|
||||
DerValue data = datum[i];
|
||||
if (data.isContextSpecific((byte) 0x00)) {
|
||||
// hash algid
|
||||
mdName = convertToStandardName(AlgorithmId.parse
|
||||
(data.data.getDerValue()).getName());
|
||||
mdName = AlgorithmId.parse
|
||||
(data.data.getDerValue()).getName();
|
||||
} else if (data.isContextSpecific((byte) 0x01)) {
|
||||
// mgf algid
|
||||
AlgorithmId val = AlgorithmId.parse(data.data.getDerValue());
|
||||
@ -142,7 +126,7 @@ public final class OAEPParameters extends AlgorithmParametersSpi {
|
||||
}
|
||||
AlgorithmId params = AlgorithmId.parse(
|
||||
new DerValue(val.getEncodedParams()));
|
||||
String mgfDigestName = convertToStandardName(params.getName());
|
||||
String mgfDigestName = params.getName();
|
||||
if (mgfDigestName.equals("SHA-1")) {
|
||||
mgfSpec = MGF1ParameterSpec.SHA1;
|
||||
} else if (mgfDigestName.equals("SHA-224")) {
|
||||
|
@ -170,12 +170,12 @@ public abstract class GraphicsEnvironment {
|
||||
if (System.getProperty("javaplugin.version") != null) {
|
||||
headless = defaultHeadless = Boolean.FALSE;
|
||||
} else {
|
||||
if ("sun.awt.HeadlessGraphicsEnvironment".equals(
|
||||
System.getProperty("java.awt.graphicsenv")))
|
||||
String osName = System.getProperty("os.name");
|
||||
if (osName.contains("OS X") && "sun.awt.HToolkit".equals(
|
||||
System.getProperty("awt.toolkit")))
|
||||
{
|
||||
headless = defaultHeadless = Boolean.TRUE;
|
||||
} else {
|
||||
String osName = System.getProperty("os.name");
|
||||
headless = defaultHeadless =
|
||||
Boolean.valueOf(("Linux".equals(osName) ||
|
||||
"SunOS".equals(osName) ||
|
||||
|
@ -235,9 +235,14 @@ public class TextComponent extends Component implements Accessible {
|
||||
* @see java.awt.TextComponent#getText
|
||||
*/
|
||||
public synchronized void setText(String t) {
|
||||
boolean skipTextEvent = (text == null || text.isEmpty())
|
||||
&& (t == null || t.isEmpty());
|
||||
text = (t != null) ? t : "";
|
||||
TextComponentPeer peer = (TextComponentPeer)this.peer;
|
||||
if (peer != null) {
|
||||
// Please note that we do not want to post an event
|
||||
// if TextArea.setText() or TextField.setText() replaces an empty text
|
||||
// by an empty text, that is, if component's text remains unchanged.
|
||||
if (peer != null && !skipTextEvent) {
|
||||
peer.setText(text);
|
||||
}
|
||||
}
|
||||
|
@ -181,20 +181,21 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor {
|
||||
// the Indexed readMethod was explicitly set to null.
|
||||
return null;
|
||||
}
|
||||
String nextMethodName = Introspector.GET_PREFIX + getBaseName();
|
||||
if (indexedReadMethodName == null) {
|
||||
Class<?> type = getIndexedPropertyType0();
|
||||
if (type == boolean.class || type == null) {
|
||||
indexedReadMethodName = Introspector.IS_PREFIX + getBaseName();
|
||||
} else {
|
||||
indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
|
||||
indexedReadMethodName = nextMethodName;
|
||||
}
|
||||
}
|
||||
|
||||
Class<?>[] args = { int.class };
|
||||
indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
|
||||
if (indexedReadMethod == null) {
|
||||
if ((indexedReadMethod == null) && !indexedReadMethodName.equals(nextMethodName)) {
|
||||
// no "is" method, so look for a "get" method.
|
||||
indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
|
||||
indexedReadMethodName = nextMethodName;
|
||||
indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
|
||||
}
|
||||
setIndexedReadMethod0(indexedReadMethod);
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
package java.beans;
|
||||
|
||||
import com.sun.beans.TypeResolver;
|
||||
import com.sun.beans.WeakCache;
|
||||
import com.sun.beans.finder.ClassFinder;
|
||||
|
||||
@ -34,6 +35,7 @@ import java.lang.ref.Reference;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.ArrayList;
|
||||
@ -951,44 +953,61 @@ public class Introspector {
|
||||
continue;
|
||||
}
|
||||
|
||||
Class<?>[] argTypes = FeatureDescriptor.getParameterTypes(beanClass, method);
|
||||
Class<?> resultType = FeatureDescriptor.getReturnType(beanClass, method);
|
||||
|
||||
if (name.startsWith(ADD_PREFIX) && argTypes.length == 1 &&
|
||||
resultType == Void.TYPE &&
|
||||
Introspector.isSubclass(argTypes[0], eventListenerType)) {
|
||||
String listenerName = name.substring(3);
|
||||
if (listenerName.length() > 0 &&
|
||||
argTypes[0].getName().endsWith(listenerName)) {
|
||||
if (adds == null) {
|
||||
adds = new HashMap<>();
|
||||
if (name.startsWith(ADD_PREFIX)) {
|
||||
Class<?> returnType = method.getReturnType();
|
||||
if (returnType == void.class) {
|
||||
Type[] parameterTypes = method.getGenericParameterTypes();
|
||||
if (parameterTypes.length == 1) {
|
||||
Class<?> type = TypeResolver.erase(TypeResolver.resolveInClass(beanClass, parameterTypes[0]));
|
||||
if (Introspector.isSubclass(type, eventListenerType)) {
|
||||
String listenerName = name.substring(3);
|
||||
if (listenerName.length() > 0 &&
|
||||
type.getName().endsWith(listenerName)) {
|
||||
if (adds == null) {
|
||||
adds = new HashMap<>();
|
||||
}
|
||||
adds.put(listenerName, method);
|
||||
}
|
||||
}
|
||||
}
|
||||
adds.put(listenerName, method);
|
||||
}
|
||||
}
|
||||
else if (name.startsWith(REMOVE_PREFIX) && argTypes.length == 1 &&
|
||||
resultType == Void.TYPE &&
|
||||
Introspector.isSubclass(argTypes[0], eventListenerType)) {
|
||||
String listenerName = name.substring(6);
|
||||
if (listenerName.length() > 0 &&
|
||||
argTypes[0].getName().endsWith(listenerName)) {
|
||||
if (removes == null) {
|
||||
removes = new HashMap<>();
|
||||
else if (name.startsWith(REMOVE_PREFIX)) {
|
||||
Class<?> returnType = method.getReturnType();
|
||||
if (returnType == void.class) {
|
||||
Type[] parameterTypes = method.getGenericParameterTypes();
|
||||
if (parameterTypes.length == 1) {
|
||||
Class<?> type = TypeResolver.erase(TypeResolver.resolveInClass(beanClass, parameterTypes[0]));
|
||||
if (Introspector.isSubclass(type, eventListenerType)) {
|
||||
String listenerName = name.substring(6);
|
||||
if (listenerName.length() > 0 &&
|
||||
type.getName().endsWith(listenerName)) {
|
||||
if (removes == null) {
|
||||
removes = new HashMap<>();
|
||||
}
|
||||
removes.put(listenerName, method);
|
||||
}
|
||||
}
|
||||
}
|
||||
removes.put(listenerName, method);
|
||||
}
|
||||
}
|
||||
else if (name.startsWith(GET_PREFIX) && argTypes.length == 0 &&
|
||||
resultType.isArray() &&
|
||||
Introspector.isSubclass(resultType.getComponentType(),
|
||||
eventListenerType)) {
|
||||
String listenerName = name.substring(3, name.length() - 1);
|
||||
if (listenerName.length() > 0 &&
|
||||
resultType.getComponentType().getName().endsWith(listenerName)) {
|
||||
if (gets == null) {
|
||||
gets = new HashMap<>();
|
||||
else if (name.startsWith(GET_PREFIX)) {
|
||||
Class<?>[] parameterTypes = method.getParameterTypes();
|
||||
if (parameterTypes.length == 0) {
|
||||
Class<?> returnType = FeatureDescriptor.getReturnType(beanClass, method);
|
||||
if (returnType.isArray()) {
|
||||
Class<?> type = returnType.getComponentType();
|
||||
if (Introspector.isSubclass(type, eventListenerType)) {
|
||||
String listenerName = name.substring(3, name.length() - 1);
|
||||
if (listenerName.length() > 0 &&
|
||||
type.getName().endsWith(listenerName)) {
|
||||
if (gets == null) {
|
||||
gets = new HashMap<>();
|
||||
}
|
||||
gets.put(listenerName, method);
|
||||
}
|
||||
}
|
||||
}
|
||||
gets.put(listenerName, method);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1240,11 +1259,11 @@ public class Introspector {
|
||||
private boolean isEventHandler(Method m) {
|
||||
// We assume that a method is an event handler if it has a single
|
||||
// argument, whose type inherit from java.util.Event.
|
||||
Class argTypes[] = FeatureDescriptor.getParameterTypes(beanClass, m);
|
||||
Type argTypes[] = m.getGenericParameterTypes();
|
||||
if (argTypes.length != 1) {
|
||||
return false;
|
||||
}
|
||||
return isSubclass(argTypes[0], EventObject.class);
|
||||
return isSubclass(TypeResolver.erase(TypeResolver.resolveInClass(beanClass, argTypes[0])), EventObject.class);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1296,24 +1315,25 @@ public class Introspector {
|
||||
}
|
||||
|
||||
// make sure method signature matches.
|
||||
Class params[] = FeatureDescriptor.getParameterTypes(start, method);
|
||||
if (method.getName().equals(methodName) &&
|
||||
params.length == argCount) {
|
||||
if (args != null) {
|
||||
boolean different = false;
|
||||
if (argCount > 0) {
|
||||
for (int j = 0; j < argCount; j++) {
|
||||
if (params[j] != args[j]) {
|
||||
different = true;
|
||||
if (method.getName().equals(methodName)) {
|
||||
Type[] params = method.getGenericParameterTypes();
|
||||
if (params.length == argCount) {
|
||||
if (args != null) {
|
||||
boolean different = false;
|
||||
if (argCount > 0) {
|
||||
for (int j = 0; j < argCount; j++) {
|
||||
if (TypeResolver.erase(TypeResolver.resolveInClass(start, params[j])) != args[j]) {
|
||||
different = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (different) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (different) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return method;
|
||||
}
|
||||
return method;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -210,12 +210,13 @@ public class PropertyDescriptor extends FeatureDescriptor {
|
||||
// The read method was explicitly set to null.
|
||||
return null;
|
||||
}
|
||||
String nextMethodName = Introspector.GET_PREFIX + getBaseName();
|
||||
if (readMethodName == null) {
|
||||
Class<?> type = getPropertyType0();
|
||||
if (type == boolean.class || type == null) {
|
||||
readMethodName = Introspector.IS_PREFIX + getBaseName();
|
||||
} else {
|
||||
readMethodName = Introspector.GET_PREFIX + getBaseName();
|
||||
readMethodName = nextMethodName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,8 +226,8 @@ public class PropertyDescriptor extends FeatureDescriptor {
|
||||
// methods. If an "is" method exists, this is the official
|
||||
// reader method so look for this one first.
|
||||
readMethod = Introspector.findMethod(cls, readMethodName, 0);
|
||||
if (readMethod == null) {
|
||||
readMethodName = Introspector.GET_PREFIX + getBaseName();
|
||||
if ((readMethod == null) && !readMethodName.equals(nextMethodName)) {
|
||||
readMethodName = nextMethodName;
|
||||
readMethod = Introspector.findMethod(cls, readMethodName, 0);
|
||||
}
|
||||
try {
|
||||
|
@ -326,8 +326,10 @@ public final class NetworkInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the interfaces on this machine. Returns null if no
|
||||
* network interfaces could be found on this machine.
|
||||
* Returns all the interfaces on this machine. The {@code Enumeration}
|
||||
* contains at least one element, possibly representing a loopback
|
||||
* interface that only supports communication between entities on
|
||||
* this machine.
|
||||
*
|
||||
* NOTE: can use getNetworkInterfaces()+getInetAddresses()
|
||||
* to obtain all IP addresses for this node
|
||||
|
@ -65,6 +65,7 @@ Provides the classes for implementing networking applications.
|
||||
<p>Sending and receiving with TCP sockets is done through InputStreams and OutputStreams which can be obtained via the {@link java.net.Socket#getInputStream} and {@link java.net.Socket#getOutputStream} methods.</p>
|
||||
<h2>Interfaces</h2>
|
||||
<p>The {@link java.net.NetworkInterface} class provides APIs to browse and query all the networking interfaces (e.g. ethernet connection or PPP endpoint) of the local machine. It is through that class that you can check if any of the local interfaces is configured to support IPv6.</p>
|
||||
<p>Note, all conforming implementations must support at least one {@code NetworkInterface} object, which must either be connected to a network, or be a "loopback" interface that can only communicate with entities on the same machine.</p>
|
||||
|
||||
<h2>High level API</h2>
|
||||
<p>A number of classes in the java.net package do provide for a much higher level of abstraction and allow for easy access to resources on the network. The classes are:
|
||||
|
@ -187,6 +187,9 @@ class TimerQueue implements Runnable
|
||||
addTimer(delayedTimer);
|
||||
}
|
||||
}
|
||||
|
||||
// Allow run other threads on systems without kernel threads
|
||||
timer.getLock().newCondition().awaitNanos(1);
|
||||
} catch (SecurityException ignore) {
|
||||
} finally {
|
||||
timer.getLock().unlock();
|
||||
|
@ -71,7 +71,6 @@ com/sun/jndi/
|
||||
org/w3c/
|
||||
com/sun/imageio/
|
||||
javax/
|
||||
sunw/util/
|
||||
java/
|
||||
sun/
|
||||
...
|
||||
|
@ -107,7 +107,7 @@ public class SingleByte
|
||||
return decodeBufferLoop(src, dst);
|
||||
}
|
||||
|
||||
private final char decode(int b) {
|
||||
public final char decode(int b) {
|
||||
return b2c[b + 128];
|
||||
}
|
||||
|
||||
@ -221,7 +221,7 @@ public class SingleByte
|
||||
return encodeBufferLoop(src, dst);
|
||||
}
|
||||
|
||||
private final int encode(char ch) {
|
||||
public final int encode(char ch) {
|
||||
char index = c2bIndex[ch >> 8];
|
||||
if (index == UNMAPPABLE_ENCODING)
|
||||
return UNMAPPABLE_ENCODING;
|
||||
|
@ -249,11 +249,11 @@ public class DoubleByte {
|
||||
}
|
||||
|
||||
public char decodeDouble(int b1, int b2) {
|
||||
if (b2 < b2Min || b2 > b2Max)
|
||||
if (b1 < 0 || b1 > b2c.length ||
|
||||
b2 < b2Min || b2 > b2Max)
|
||||
return UNMAPPABLE_DECODING;
|
||||
return b2c[b1][b2 - b2Min];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// IBM_EBCDIC_DBCS
|
||||
@ -435,15 +435,15 @@ public class DoubleByte {
|
||||
}
|
||||
}
|
||||
|
||||
// EBCDIC_DBCS_ONLY
|
||||
public static class Decoder_EBCDIC_DBCSONLY extends Decoder {
|
||||
static final char[] b2cSB;
|
||||
// DBCS_ONLY
|
||||
public static class Decoder_DBCSONLY extends Decoder {
|
||||
static final char[] b2cSB_UNMAPPABLE;
|
||||
static {
|
||||
b2cSB = new char[0x100];
|
||||
Arrays.fill(b2cSB, UNMAPPABLE_DECODING);
|
||||
b2cSB_UNMAPPABLE = new char[0x100];
|
||||
Arrays.fill(b2cSB_UNMAPPABLE, UNMAPPABLE_DECODING);
|
||||
}
|
||||
Decoder_EBCDIC_DBCSONLY(Charset cs, char[][] b2c, int b2Min, int b2Max) {
|
||||
super(cs, 0.5f, 1.0f, b2c, b2cSB, b2Min, b2Max);
|
||||
Decoder_DBCSONLY(Charset cs, char[][] b2c, char[] b2cSB, int b2Min, int b2Max) {
|
||||
super(cs, 0.5f, 1.0f, b2c, b2cSB_UNMAPPABLE, b2Min, b2Max);
|
||||
}
|
||||
}
|
||||
|
||||
@ -727,9 +727,9 @@ public class DoubleByte {
|
||||
}
|
||||
}
|
||||
|
||||
public static class Encoder_EBCDIC_DBCSONLY extends Encoder {
|
||||
Encoder_EBCDIC_DBCSONLY(Charset cs, byte[] repl,
|
||||
char[] c2b, char[] c2bIndex) {
|
||||
public static class Encoder_DBCSONLY extends Encoder {
|
||||
Encoder_DBCSONLY(Charset cs, byte[] repl,
|
||||
char[] c2b, char[] c2bIndex) {
|
||||
super(cs, 2.0f, 2.0f, repl, c2b, c2bIndex);
|
||||
}
|
||||
|
||||
@ -741,6 +741,8 @@ public class DoubleByte {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static class Encoder_EBCDIC extends Encoder {
|
||||
static final int SBCS = 0;
|
||||
static final int DBCS = 1;
|
||||
@ -911,4 +913,5 @@ public class DoubleByte {
|
||||
super(cs, c2b, c2bIndex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,182 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2005, 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 sun.nio.cs.ext;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CoderResult;
|
||||
|
||||
abstract class DoubleByteDecoder
|
||||
extends CharsetDecoder
|
||||
{
|
||||
|
||||
private short index1[];
|
||||
|
||||
/*
|
||||
* 2nd level index, provided by subclass
|
||||
* every string has 0x10*(end-start+1) characters.
|
||||
*/
|
||||
private String index2[];
|
||||
|
||||
protected int start;
|
||||
protected int end;
|
||||
|
||||
protected static final char REPLACE_CHAR = '\uFFFD';
|
||||
protected char highSurrogate;
|
||||
protected char lowSurrogate;
|
||||
|
||||
protected DoubleByteDecoder(Charset cs, short[] index1, String[] index2,
|
||||
int start, int end ) {
|
||||
super(cs, 0.5f, 1.0f);
|
||||
this.index1 = index1;
|
||||
this.index2 = index2;
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
}
|
||||
|
||||
private CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {
|
||||
byte[] sa = src.array();
|
||||
int sp = src.arrayOffset() + src.position();
|
||||
int sl = src.arrayOffset() + src.limit();
|
||||
assert (sp <= sl);
|
||||
sp = (sp <= sl ? sp : sl);
|
||||
char[] da = dst.array();
|
||||
int dp = dst.arrayOffset() + dst.position();
|
||||
int dl = dst.arrayOffset() + dst.limit();
|
||||
assert (dp <= dl);
|
||||
dp = (dp <= dl ? dp : dl);
|
||||
|
||||
try {
|
||||
while (sp < sl) {
|
||||
int b1, b2;
|
||||
b1 = sa[sp];
|
||||
int inputSize = 1;
|
||||
int outputSize = 1;
|
||||
highSurrogate = lowSurrogate = 0;
|
||||
char c = decodeSingle(b1);
|
||||
if (c == REPLACE_CHAR) {
|
||||
b1 &= 0xff;
|
||||
if (sl - sp < 2)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b2 = sa[sp + 1] & 0xff;
|
||||
c = decodeDouble(b1, b2);
|
||||
inputSize = 2;
|
||||
if (c == REPLACE_CHAR)
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
outputSize = (highSurrogate > 0) ? 2: 1;
|
||||
}
|
||||
|
||||
if (dl - dp < outputSize)
|
||||
return CoderResult.OVERFLOW;
|
||||
if (outputSize == 2) {
|
||||
da[dp++] = highSurrogate;
|
||||
da[dp++] = lowSurrogate;
|
||||
} else {
|
||||
da[dp++] = c;
|
||||
}
|
||||
sp += inputSize;
|
||||
}
|
||||
return CoderResult.UNDERFLOW;
|
||||
} finally {
|
||||
src.position(sp - src.arrayOffset());
|
||||
dst.position(dp - dst.arrayOffset());
|
||||
}
|
||||
}
|
||||
|
||||
private CoderResult decodeBufferLoop(ByteBuffer src, CharBuffer dst) {
|
||||
int mark = src.position();
|
||||
int inputSize = 0;
|
||||
int outputSize = 0;
|
||||
try {
|
||||
while (src.hasRemaining()) {
|
||||
int b1 = src.get();
|
||||
inputSize = 1;
|
||||
outputSize = 1;
|
||||
highSurrogate = lowSurrogate = 0;
|
||||
|
||||
char c = decodeSingle(b1);
|
||||
|
||||
if (c == REPLACE_CHAR) {
|
||||
if (src.remaining() < 1)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b1 &= 0xff;
|
||||
int b2 = src.get() & 0xff;
|
||||
inputSize = 2;
|
||||
|
||||
c = decodeDouble(b1, b2);
|
||||
|
||||
if (c == REPLACE_CHAR)
|
||||
return CoderResult.unmappableForLength(2);
|
||||
|
||||
outputSize = (highSurrogate > 0) ? 2: 1;
|
||||
}
|
||||
if (dst.remaining() < outputSize)
|
||||
return CoderResult.OVERFLOW;
|
||||
mark += inputSize;
|
||||
|
||||
if (outputSize == 2) {
|
||||
dst.put(highSurrogate);
|
||||
dst.put(lowSurrogate);
|
||||
} else {
|
||||
dst.put(c);
|
||||
}
|
||||
}
|
||||
return CoderResult.UNDERFLOW;
|
||||
} finally {
|
||||
src.position(mark);
|
||||
}
|
||||
}
|
||||
|
||||
protected CoderResult decodeLoop(ByteBuffer src, CharBuffer dst) {
|
||||
if (src.hasArray() && dst.hasArray())
|
||||
return decodeArrayLoop(src, dst);
|
||||
else
|
||||
return decodeBufferLoop(src, dst);
|
||||
}
|
||||
|
||||
/*
|
||||
* Can be changed by subclass
|
||||
*/
|
||||
protected char decodeSingle(int b) {
|
||||
if (b >= 0)
|
||||
return (char) b;
|
||||
return REPLACE_CHAR;
|
||||
}
|
||||
|
||||
protected char decodeDouble(int byte1, int byte2) {
|
||||
if (((byte1 < 0) || (byte1 > index1.length))
|
||||
|| ((byte2 < start) || (byte2 > end)))
|
||||
return REPLACE_CHAR;
|
||||
|
||||
int n = (index1[byte1] & 0xf) * (end - start + 1) + (byte2 - start);
|
||||
return index2[index1[byte1] >> 4].charAt(n);
|
||||
}
|
||||
}
|
@ -23,9 +23,6 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
package sun.nio.cs.ext;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
@ -36,6 +33,8 @@ import java.nio.charset.CharsetEncoder;
|
||||
import java.nio.charset.CoderResult;
|
||||
import sun.nio.cs.HistoricallyNamedCharset;
|
||||
import sun.nio.cs.Surrogate;
|
||||
import sun.nio.cs.SingleByte;
|
||||
import static sun.nio.cs.CharsetMapping.*;
|
||||
|
||||
public class EUC_JP
|
||||
extends Charset
|
||||
@ -62,52 +61,47 @@ public class EUC_JP
|
||||
}
|
||||
|
||||
public CharsetEncoder newEncoder() {
|
||||
|
||||
// Need to force the replacement byte to 0x3f
|
||||
// because JIS_X_0208_Encoder defines its own
|
||||
// alternative 2 byte substitution to permit it
|
||||
// to exist as a self-standing Encoder
|
||||
|
||||
byte[] replacementBytes = { (byte)0x3f };
|
||||
return new Encoder(this).replaceWith(replacementBytes);
|
||||
return new Encoder(this);
|
||||
}
|
||||
|
||||
|
||||
static class Decoder extends JIS_X_0208_Decoder
|
||||
static class Decoder extends CharsetDecoder
|
||||
implements DelegatableDecoder {
|
||||
|
||||
JIS_X_0201.Decoder decoderJ0201;
|
||||
JIS_X_0212_Decoder decoderJ0212;
|
||||
final static SingleByte.Decoder DEC0201 =
|
||||
(SingleByte.Decoder)new JIS_X_0201().newDecoder();
|
||||
|
||||
private static final short[] j0208Index1 =
|
||||
JIS_X_0208_Decoder.getIndex1();
|
||||
private static final String[] j0208Index2 =
|
||||
JIS_X_0208_Decoder.getIndex2();
|
||||
final static DoubleByte.Decoder DEC0208 =
|
||||
(DoubleByte.Decoder)new JIS_X_0208().newDecoder();
|
||||
|
||||
final static DoubleByte.Decoder DEC0212 =
|
||||
(DoubleByte.Decoder)new JIS_X_0212().newDecoder();
|
||||
|
||||
private final SingleByte.Decoder dec0201;
|
||||
private final DoubleByte.Decoder dec0208;
|
||||
private final DoubleByte.Decoder dec0212;
|
||||
|
||||
protected Decoder(Charset cs) {
|
||||
super(cs);
|
||||
decoderJ0201 = new JIS_X_0201.Decoder(cs);
|
||||
decoderJ0212 = new JIS_X_0212_Decoder(cs);
|
||||
start = 0xa1;
|
||||
end = 0xfe;
|
||||
this(cs, 0.5f, 1.0f, DEC0201, DEC0208, DEC0212);
|
||||
}
|
||||
protected char decode0212(int byte1, int byte2) {
|
||||
return decoderJ0212.decodeDouble(byte1, byte2);
|
||||
|
||||
protected Decoder(Charset cs, float avgCpb, float maxCpb,
|
||||
SingleByte.Decoder dec0201,
|
||||
DoubleByte.Decoder dec0208,
|
||||
DoubleByte.Decoder dec0212) {
|
||||
super(cs, avgCpb, maxCpb);
|
||||
this.dec0201 = dec0201;
|
||||
this.dec0208 = dec0208;
|
||||
this.dec0212 = dec0212;
|
||||
}
|
||||
|
||||
|
||||
protected char decodeDouble(int byte1, int byte2) {
|
||||
if (byte1 == 0x8e) {
|
||||
return decoderJ0201.decode(byte2 - 256);
|
||||
if (byte2 < 0x80)
|
||||
return UNMAPPABLE_DECODING;
|
||||
return dec0201.decode((byte)byte2);
|
||||
}
|
||||
// Fix for bug 4121358 - similar fix for bug 4117820 put
|
||||
// into ByteToCharDoubleByte.getUnicode()
|
||||
if (((byte1 < 0) || (byte1 > getIndex1().length))
|
||||
|| ((byte2 < start) || (byte2 > end)))
|
||||
return REPLACE_CHAR;
|
||||
|
||||
int n = (j0208Index1[byte1 - 0x80] & 0xf) * (end - start + 1)
|
||||
+ (byte2 - start);
|
||||
return j0208Index2[j0208Index1[byte1 - 0x80] >> 4].charAt(n);
|
||||
return dec0208.decodeDouble(byte1 - 0x80, byte2 - 0x80);
|
||||
}
|
||||
|
||||
private CoderResult decodeArrayLoop(ByteBuffer src,
|
||||
@ -127,8 +121,7 @@ public class EUC_JP
|
||||
|
||||
int b1 = 0, b2 = 0;
|
||||
int inputSize = 0;
|
||||
char outputChar = REPLACE_CHAR; // U+FFFD;
|
||||
|
||||
char outputChar = UNMAPPABLE_DECODING;
|
||||
try {
|
||||
while (sp < sl) {
|
||||
b1 = sa[sp] & 0xff;
|
||||
@ -136,17 +129,17 @@ public class EUC_JP
|
||||
|
||||
if ((b1 & 0x80) == 0) {
|
||||
outputChar = (char)b1;
|
||||
}
|
||||
else { // Multibyte char
|
||||
if ((b1 & 0xff) == 0x8f) { // JIS0212
|
||||
} else { // Multibyte char
|
||||
if (b1 == 0x8f) { // JIS0212
|
||||
if (sp + 3 > sl)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b1 = sa[sp + 1] & 0xff;
|
||||
b2 = sa[sp + 2] & 0xff;
|
||||
inputSize += 2;
|
||||
outputChar = decode0212(b1-0x80, b2-0x80);
|
||||
} else {
|
||||
// JIS0208
|
||||
if (dec0212 == null) // JIS02012 not supported
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
outputChar = dec0212.decodeDouble(b1-0x80, b2-0x80);
|
||||
} else { // JIS0201, JIS0208
|
||||
if (sp + 2 > sl)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b2 = sa[sp + 1] & 0xff;
|
||||
@ -154,7 +147,7 @@ public class EUC_JP
|
||||
outputChar = decodeDouble(b1, b2);
|
||||
}
|
||||
}
|
||||
if (outputChar == REPLACE_CHAR) { // can't be decoded
|
||||
if (outputChar == UNMAPPABLE_DECODING) { // can't be decoded
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
}
|
||||
if (dp + 1 > dl)
|
||||
@ -175,26 +168,25 @@ public class EUC_JP
|
||||
int mark = src.position();
|
||||
int b1 = 0, b2 = 0;
|
||||
int inputSize = 0;
|
||||
|
||||
char outputChar = REPLACE_CHAR; // U+FFFD;
|
||||
char outputChar = UNMAPPABLE_DECODING;
|
||||
|
||||
try {
|
||||
while (src.hasRemaining()) {
|
||||
b1 = src.get() & 0xff;
|
||||
inputSize = 1;
|
||||
|
||||
if ((b1 & 0x80) == 0) {
|
||||
outputChar = (char)b1;
|
||||
} else { // Multibyte char
|
||||
if ((b1 & 0xff) == 0x8f) { // JIS0212
|
||||
} else { // Multibyte char
|
||||
if (b1 == 0x8f) { // JIS0212
|
||||
if (src.remaining() < 2)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b1 = src.get() & 0xff;
|
||||
b2 = src.get() & 0xff;
|
||||
inputSize += 2;
|
||||
outputChar = decode0212(b1-0x80, b2-0x80);
|
||||
} else {
|
||||
// JIS0208
|
||||
if (dec0212 == null) // JIS02012 not supported
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
outputChar = dec0212.decodeDouble(b1-0x80, b2-0x80);
|
||||
} else { // JIS0201 JIS0208
|
||||
if (src.remaining() < 1)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b2 = src.get() & 0xff;
|
||||
@ -202,8 +194,7 @@ public class EUC_JP
|
||||
outputChar = decodeDouble(b1, b2);
|
||||
}
|
||||
}
|
||||
|
||||
if (outputChar == REPLACE_CHAR) {
|
||||
if (outputChar == UNMAPPABLE_DECODING) {
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
}
|
||||
if (dst.remaining() < 1)
|
||||
@ -233,65 +224,67 @@ public class EUC_JP
|
||||
}
|
||||
|
||||
|
||||
static class Encoder extends JIS_X_0208_Encoder {
|
||||
static class Encoder extends CharsetEncoder {
|
||||
|
||||
JIS_X_0201.Encoder encoderJ0201;
|
||||
JIS_X_0212_Encoder encoderJ0212;
|
||||
final static SingleByte.Encoder ENC0201 =
|
||||
(SingleByte.Encoder)new JIS_X_0201().newEncoder();
|
||||
|
||||
private static final short[] j0208Index1 =
|
||||
JIS_X_0208_Encoder.getIndex1();
|
||||
private static final String[] j0208Index2 =
|
||||
JIS_X_0208_Encoder.getIndex2();
|
||||
final static DoubleByte.Encoder ENC0208 =
|
||||
(DoubleByte.Encoder)new JIS_X_0208().newEncoder();
|
||||
|
||||
final static DoubleByte.Encoder ENC0212 =
|
||||
(DoubleByte.Encoder)new JIS_X_0212().newEncoder();
|
||||
|
||||
private final Surrogate.Parser sgp = new Surrogate.Parser();
|
||||
|
||||
|
||||
private final SingleByte.Encoder enc0201;
|
||||
private final DoubleByte.Encoder enc0208;
|
||||
private final DoubleByte.Encoder enc0212;
|
||||
|
||||
protected Encoder(Charset cs) {
|
||||
super(cs, 3.0f, 3.0f);
|
||||
encoderJ0201 = new JIS_X_0201.Encoder(cs);
|
||||
encoderJ0212 = new JIS_X_0212_Encoder(cs);
|
||||
this(cs, 3.0f, 3.0f, ENC0201, ENC0208, ENC0212);
|
||||
}
|
||||
|
||||
protected Encoder(Charset cs, float avgBpc, float maxBpc,
|
||||
SingleByte.Encoder enc0201,
|
||||
DoubleByte.Encoder enc0208,
|
||||
DoubleByte.Encoder enc0212) {
|
||||
super(cs, avgBpc, maxBpc);
|
||||
this.enc0201 = enc0201;
|
||||
this.enc0208 = enc0208;
|
||||
this.enc0212 = enc0212;
|
||||
}
|
||||
|
||||
public boolean canEncode(char c) {
|
||||
byte[] encodedBytes = new byte[3];
|
||||
|
||||
if (encodeSingle(c, encodedBytes) == 0) { //doublebyte
|
||||
if (encodeDouble(c) == 0)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return encodeSingle(c, encodedBytes) != 0 ||
|
||||
encodeDouble(c) != UNMAPPABLE_ENCODING;
|
||||
}
|
||||
|
||||
protected int encodeSingle(char inputChar, byte[] outputByte) {
|
||||
byte b;
|
||||
|
||||
if (inputChar == 0) {
|
||||
outputByte[0] = (byte)0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((b = encoderJ0201.encode(inputChar)) == 0)
|
||||
int b = enc0201.encode(inputChar);
|
||||
if (b == UNMAPPABLE_ENCODING)
|
||||
return 0;
|
||||
|
||||
if (b > 0 && b < 128) {
|
||||
outputByte[0] = b;
|
||||
if (b >= 0 && b < 128) {
|
||||
outputByte[0] = (byte)b;
|
||||
return 1;
|
||||
}
|
||||
|
||||
outputByte[0] = (byte)0x8e;
|
||||
outputByte[1] = b;
|
||||
outputByte[1] = (byte)b;
|
||||
return 2;
|
||||
}
|
||||
|
||||
protected int encodeDouble(char ch) {
|
||||
int offset = j0208Index1[((ch & 0xff00) >> 8 )] << 8;
|
||||
int r = j0208Index2[offset >> 12].charAt((offset & 0xfff) +
|
||||
(ch & 0xff));
|
||||
if (r != 0)
|
||||
return r + 0x8080;
|
||||
r = encoderJ0212.encodeDouble(ch);
|
||||
if (r == 0)
|
||||
return r;
|
||||
return r + 0x8F8080;
|
||||
int b = enc0208.encodeChar(ch);
|
||||
if (b != UNMAPPABLE_ENCODING)
|
||||
return b + 0x8080;
|
||||
if (enc0212 != null) {
|
||||
b = enc0212.encodeChar(ch);
|
||||
if (b != UNMAPPABLE_ENCODING)
|
||||
b += 0x8F8080;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
private CoderResult encodeArrayLoop(CharBuffer src,
|
||||
@ -317,18 +310,15 @@ public class EUC_JP
|
||||
while (sp < sl) {
|
||||
outputByte = tmpBuf;
|
||||
char c = sa[sp];
|
||||
|
||||
if (Character.isSurrogate(c)) {
|
||||
if (sgp.parse(c, sa, sp, sl) < 0)
|
||||
return sgp.error();
|
||||
return sgp.unmappableResult();
|
||||
}
|
||||
|
||||
outputSize = encodeSingle(c, outputByte);
|
||||
|
||||
if (outputSize == 0) { // DoubleByte
|
||||
int ncode = encodeDouble(c);
|
||||
if (ncode != 0 ) {
|
||||
if (ncode != UNMAPPABLE_ENCODING) {
|
||||
if ((ncode & 0xFF0000) == 0) {
|
||||
outputByte[0] = (byte) ((ncode & 0xff00) >> 8);
|
||||
outputByte[1] = (byte) (ncode & 0xff);
|
||||
@ -340,7 +330,7 @@ public class EUC_JP
|
||||
outputSize = 3;
|
||||
}
|
||||
} else {
|
||||
return CoderResult.unmappableForLength(1);
|
||||
return CoderResult.unmappableForLength(1);
|
||||
}
|
||||
}
|
||||
if (dl - dp < outputSize)
|
||||
@ -377,11 +367,10 @@ public class EUC_JP
|
||||
return sgp.error();
|
||||
return sgp.unmappableResult();
|
||||
}
|
||||
|
||||
outputSize = encodeSingle(c, outputByte);
|
||||
if (outputSize == 0) { // DoubleByte
|
||||
int ncode = encodeDouble(c);
|
||||
if (ncode != 0 ) {
|
||||
if (ncode != UNMAPPABLE_ENCODING) {
|
||||
if ((ncode & 0xFF0000) == 0) {
|
||||
outputByte[0] = (byte) ((ncode & 0xff00) >> 8);
|
||||
outputByte[1] = (byte) (ncode & 0xff);
|
||||
@ -393,10 +382,9 @@ public class EUC_JP
|
||||
outputSize = 3;
|
||||
}
|
||||
} else {
|
||||
return CoderResult.unmappableForLength(1);
|
||||
return CoderResult.unmappableForLength(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (dst.remaining() < outputSize)
|
||||
return CoderResult.OVERFLOW;
|
||||
// Put the byte in the output buffer
|
||||
|
@ -23,9 +23,6 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
package sun.nio.cs.ext;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
@ -35,7 +32,6 @@ import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
import java.nio.charset.CoderResult;
|
||||
import sun.nio.cs.HistoricallyNamedCharset;
|
||||
import sun.nio.cs.Surrogate;
|
||||
|
||||
public class EUC_JP_LINUX
|
||||
extends Charset
|
||||
@ -63,308 +59,15 @@ public class EUC_JP_LINUX
|
||||
return new Encoder(this);
|
||||
}
|
||||
|
||||
private static class Decoder extends CharsetDecoder {
|
||||
JIS_X_0201.Decoder decoderJ0201;
|
||||
protected final char REPLACE_CHAR='\uFFFD';
|
||||
|
||||
private static final int start = 0xa1;
|
||||
private static final int end = 0xfe;
|
||||
private static final short[] jis0208Index1 =
|
||||
JIS_X_0208_Decoder.getIndex1();
|
||||
private static final String[] jis0208Index2 =
|
||||
JIS_X_0208_Decoder.getIndex2();
|
||||
|
||||
private static class Decoder extends EUC_JP.Decoder {
|
||||
private Decoder(Charset cs) {
|
||||
super(cs, 1.0f, 1.0f);
|
||||
decoderJ0201 = new JIS_X_0201.Decoder(cs);
|
||||
}
|
||||
|
||||
protected char convSingleByte(int b) {
|
||||
if (b < 0 || b > 0x7f)
|
||||
return REPLACE_CHAR;
|
||||
return decoderJ0201.decode(b);
|
||||
}
|
||||
|
||||
protected char decodeDouble(int byte1, int byte2) {
|
||||
if (byte1 == 0x8e) {
|
||||
return decoderJ0201.decode(byte2 - 256);
|
||||
}
|
||||
|
||||
if (((byte1 < 0) || (byte1 > jis0208Index1.length))
|
||||
|| ((byte2 < start) || (byte2 > end)))
|
||||
return REPLACE_CHAR;
|
||||
|
||||
int n = (jis0208Index1[byte1 - 0x80] & 0xf) * (end - start + 1)
|
||||
+ (byte2 - start);
|
||||
return jis0208Index2[jis0208Index1[byte1 - 0x80] >> 4].charAt(n);
|
||||
}
|
||||
|
||||
private CoderResult decodeArrayLoop(ByteBuffer src,
|
||||
CharBuffer dst)
|
||||
{
|
||||
byte[] sa = src.array();
|
||||
int sp = src.arrayOffset() + src.position();
|
||||
int sl = src.arrayOffset() + src.limit();
|
||||
assert (sp <= sl);
|
||||
sp = (sp <= sl ? sp : sl);
|
||||
|
||||
char[] da = dst.array();
|
||||
int dp = dst.arrayOffset() + dst.position();
|
||||
int dl = dst.arrayOffset() + dst.limit();
|
||||
assert (dp <= dl);
|
||||
dp = (dp <= dl ? dp : dl);
|
||||
|
||||
int b1 = 0, b2 = 0;
|
||||
int inputSize = 0;
|
||||
char outputChar = REPLACE_CHAR; // U+FFFD;
|
||||
|
||||
try {
|
||||
while (sp < sl) {
|
||||
b1 = sa[sp] & 0xff;
|
||||
inputSize = 1;
|
||||
if ((b1 & 0x80) == 0) {
|
||||
outputChar = (char)b1;
|
||||
}
|
||||
else { // Multibyte char
|
||||
if ((b1 & 0xff) == 0x8f) { // JIS0212
|
||||
if (sp + 3 > sl)
|
||||
return CoderResult.UNDERFLOW;
|
||||
inputSize = 3;
|
||||
return CoderResult.unmappableForLength(inputSize); // substitute
|
||||
} else {
|
||||
// JIS0208
|
||||
if (sp + 2 > sl)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b2 = sa[sp + 1] & 0xff;
|
||||
inputSize = 2;
|
||||
outputChar = decodeDouble(b1, b2);
|
||||
}
|
||||
}
|
||||
if (outputChar == REPLACE_CHAR) { // can't be decoded
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
}
|
||||
if (dp + 1 > dl)
|
||||
return CoderResult.OVERFLOW;
|
||||
da[dp++] = outputChar;
|
||||
sp += inputSize;
|
||||
}
|
||||
return CoderResult.UNDERFLOW;
|
||||
} finally {
|
||||
src.position(sp - src.arrayOffset());
|
||||
dst.position(dp - dst.arrayOffset());
|
||||
}
|
||||
}
|
||||
|
||||
private CoderResult decodeBufferLoop(ByteBuffer src,
|
||||
CharBuffer dst)
|
||||
{
|
||||
int mark = src.position();
|
||||
char outputChar = REPLACE_CHAR; // U+FFFD;
|
||||
|
||||
try {
|
||||
while (src.hasRemaining()) {
|
||||
int b1 = src.get() & 0xff;
|
||||
int inputSize = 1;
|
||||
|
||||
if ((b1 & 0x80) == 0) {
|
||||
outputChar = (char)b1;
|
||||
} else { // Multibyte char
|
||||
|
||||
if ((b1 & 0xff) == 0x8f) { // JIS0212 not supported
|
||||
if (src.remaining() < 2)
|
||||
return CoderResult.UNDERFLOW;
|
||||
return CoderResult.unmappableForLength(3);
|
||||
} else {
|
||||
// JIS0208
|
||||
if (src.remaining() < 1)
|
||||
return CoderResult.UNDERFLOW;
|
||||
int b2 = src.get() & 0xff;
|
||||
inputSize++;
|
||||
outputChar = decodeDouble(b1, b2);
|
||||
}
|
||||
}
|
||||
|
||||
if (outputChar == REPLACE_CHAR)
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
if (dst.remaining() < 1)
|
||||
return CoderResult.OVERFLOW;
|
||||
dst.put(outputChar);
|
||||
mark += inputSize;
|
||||
}
|
||||
return CoderResult.UNDERFLOW;
|
||||
} finally {
|
||||
src.position(mark);
|
||||
}
|
||||
}
|
||||
|
||||
protected CoderResult decodeLoop(ByteBuffer src,
|
||||
CharBuffer dst)
|
||||
{
|
||||
if (src.hasArray() && dst.hasArray())
|
||||
return decodeArrayLoop(src, dst);
|
||||
else
|
||||
return decodeBufferLoop(src, dst);
|
||||
super(cs, 1.0f, 1.0f, DEC0201, DEC0208, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class Encoder extends CharsetEncoder {
|
||||
|
||||
JIS_X_0201.Encoder encoderJ0201;
|
||||
|
||||
private final Surrogate.Parser sgp = new Surrogate.Parser();
|
||||
private static final short[] jis0208Index1 =
|
||||
JIS_X_0208_Encoder.getIndex1();
|
||||
private static final String[] jis0208Index2 =
|
||||
JIS_X_0208_Encoder.getIndex2();
|
||||
|
||||
private static class Encoder extends EUC_JP.Encoder {
|
||||
private Encoder(Charset cs) {
|
||||
super(cs, 2.0f, 2.0f);
|
||||
encoderJ0201 = new JIS_X_0201.Encoder(cs);
|
||||
}
|
||||
|
||||
public boolean canEncode(char c) {
|
||||
byte[] encodedBytes = new byte[2];
|
||||
|
||||
if (encodeSingle(c, encodedBytes) == 0) { //doublebyte
|
||||
if (encodeDouble(c) == 0)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected int encodeSingle(char inputChar, byte[] outputByte) {
|
||||
byte b;
|
||||
|
||||
if (inputChar == 0) {
|
||||
outputByte[0] = (byte)0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((b = encoderJ0201.encode(inputChar)) == 0)
|
||||
return 0;
|
||||
|
||||
if (b > 0 && b < 128) {
|
||||
outputByte[0] = b;
|
||||
return 1;
|
||||
}
|
||||
outputByte[0] = (byte)0x8e;
|
||||
outputByte[1] = b;
|
||||
return 2;
|
||||
}
|
||||
|
||||
protected int encodeDouble(char ch) {
|
||||
int offset = jis0208Index1[((ch & 0xff00) >> 8 )] << 8;
|
||||
int r = jis0208Index2[offset >> 12].charAt((offset & 0xfff) + (ch & 0xff));
|
||||
if (r != 0)
|
||||
return r + 0x8080;
|
||||
return r;
|
||||
}
|
||||
|
||||
private CoderResult encodeArrayLoop(CharBuffer src,
|
||||
ByteBuffer dst)
|
||||
{
|
||||
char[] sa = src.array();
|
||||
int sp = src.arrayOffset() + src.position();
|
||||
int sl = src.arrayOffset() + src.limit();
|
||||
assert (sp <= sl);
|
||||
sp = (sp <= sl ? sp : sl);
|
||||
byte[] da = dst.array();
|
||||
int dp = dst.arrayOffset() + dst.position();
|
||||
int dl = dst.arrayOffset() + dst.limit();
|
||||
assert (dp <= dl);
|
||||
dp = (dp <= dl ? dp : dl);
|
||||
|
||||
final byte[] outputByte = new byte[2];
|
||||
|
||||
try {
|
||||
while (sp < sl) {
|
||||
char c = sa[sp];
|
||||
|
||||
if (Character.isSurrogate(c)) {
|
||||
if (sgp.parse(c, sa, sp, sl) < 0)
|
||||
return sgp.error();
|
||||
return sgp.unmappableResult();
|
||||
}
|
||||
|
||||
int outputSize = encodeSingle(c, outputByte);
|
||||
if (outputSize == 0) { // DoubleByte
|
||||
int ncode = encodeDouble(c);
|
||||
if (ncode != 0 && ((ncode & 0xFF0000) == 0)) {
|
||||
outputByte[0] = (byte) ((ncode & 0xff00) >> 8);
|
||||
outputByte[1] = (byte) (ncode & 0xff);
|
||||
outputSize = 2;
|
||||
} else {
|
||||
return CoderResult.unmappableForLength(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (dl - dp < outputSize)
|
||||
return CoderResult.OVERFLOW;
|
||||
// Put the byte in the output buffer
|
||||
for (int i = 0; i < outputSize; i++) {
|
||||
da[dp++] = outputByte[i];
|
||||
}
|
||||
sp++;
|
||||
}
|
||||
return CoderResult.UNDERFLOW;
|
||||
} finally {
|
||||
src.position(sp - src.arrayOffset());
|
||||
dst.position(dp - dst.arrayOffset());
|
||||
}
|
||||
}
|
||||
|
||||
private CoderResult encodeBufferLoop(CharBuffer src,
|
||||
ByteBuffer dst)
|
||||
{
|
||||
final byte[] outputByte = new byte[4];
|
||||
int mark = src.position();
|
||||
|
||||
try {
|
||||
while (src.hasRemaining()) {
|
||||
char c = src.get();
|
||||
if (Character.isSurrogate(c)) {
|
||||
if (sgp.parse(c, src) < 0)
|
||||
return sgp.error();
|
||||
return sgp.unmappableResult();
|
||||
}
|
||||
|
||||
int outputSize = encodeSingle(c, outputByte);
|
||||
if (outputSize == 0) { // DoubleByte
|
||||
int ncode = encodeDouble(c);
|
||||
if (ncode != 0 ) {
|
||||
if ((ncode & 0xFF0000) == 0) {
|
||||
outputByte[0] = (byte) ((ncode & 0xff00) >> 8);
|
||||
outputByte[1] = (byte) (ncode & 0xff);
|
||||
outputSize = 2;
|
||||
}
|
||||
} else {
|
||||
return CoderResult.unmappableForLength(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (dst.remaining() < outputSize)
|
||||
return CoderResult.OVERFLOW;
|
||||
|
||||
// Put the byte in the output buffer
|
||||
for (int i = 0; i < outputSize; i++) {
|
||||
dst.put(outputByte[i]);
|
||||
}
|
||||
mark++;
|
||||
}
|
||||
return CoderResult.UNDERFLOW;
|
||||
} finally {
|
||||
src.position(mark);
|
||||
}
|
||||
}
|
||||
|
||||
protected CoderResult encodeLoop(CharBuffer src,
|
||||
ByteBuffer dst)
|
||||
{
|
||||
if (src.hasArray() && dst.hasArray())
|
||||
return encodeArrayLoop(src, dst);
|
||||
else
|
||||
return encodeBufferLoop(src, dst);
|
||||
super(cs, 2.0f, 2.0f, ENC0201, ENC0208, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,9 +23,6 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
package sun.nio.cs.ext;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
@ -35,7 +32,7 @@ import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
import java.nio.charset.CoderResult;
|
||||
import sun.nio.cs.HistoricallyNamedCharset;
|
||||
import sun.nio.cs.Surrogate;
|
||||
import static sun.nio.cs.CharsetMapping.*;
|
||||
|
||||
public class EUC_JP_Open
|
||||
extends Charset
|
||||
@ -60,118 +57,55 @@ public class EUC_JP_Open
|
||||
}
|
||||
|
||||
public CharsetEncoder newEncoder() {
|
||||
|
||||
// Need to force the replacement byte to 0x3f
|
||||
// because JIS_X_0208_Encoder defines its own
|
||||
// alternative 2 byte substitution to permit it
|
||||
// to exist as a self-standing Encoder
|
||||
|
||||
byte[] replacementBytes = { (byte)0x3f };
|
||||
return new Encoder(this).replaceWith(replacementBytes);
|
||||
return new Encoder(this);
|
||||
}
|
||||
|
||||
private static class Decoder extends EUC_JP.Decoder {
|
||||
JIS_X_0201.Decoder decoderJ0201;
|
||||
JIS_X_0212_Solaris_Decoder decodeMappingJ0212;
|
||||
JIS_X_0208_Solaris_Decoder decodeMappingJ0208;
|
||||
|
||||
private static final short[] j0208Index1 =
|
||||
JIS_X_0208_Solaris_Decoder.getIndex1();
|
||||
private static final String[] j0208Index2 =
|
||||
JIS_X_0208_Solaris_Decoder.getIndex2();
|
||||
private static final int start = 0xa1;
|
||||
private static final int end = 0xfe;
|
||||
|
||||
protected final char REPLACE_CHAR='\uFFFD';
|
||||
private static DoubleByte.Decoder DEC0208_Solaris =
|
||||
(DoubleByte.Decoder)new JIS_X_0208_Solaris().newDecoder();
|
||||
private static DoubleByte.Decoder DEC0212_Solaris =
|
||||
(DoubleByte.Decoder)new JIS_X_0212_Solaris().newDecoder();
|
||||
|
||||
private Decoder(Charset cs) {
|
||||
super(cs);
|
||||
decoderJ0201 = new JIS_X_0201.Decoder(cs);
|
||||
decodeMappingJ0212 = new JIS_X_0212_Solaris_Decoder(cs);
|
||||
}
|
||||
|
||||
|
||||
protected char decode0212(int byte1, int byte2) {
|
||||
return decodeMappingJ0212.decodeDouble(byte1, byte2);
|
||||
|
||||
// JIS_X_0208_Solaris only has the "extra" mappings, it
|
||||
// does not have the JIS_X_0208 entries
|
||||
super(cs, 0.5f, 1.0f, DEC0201, DEC0208, DEC0212_Solaris);
|
||||
}
|
||||
|
||||
protected char decodeDouble(int byte1, int byte2) {
|
||||
if (byte1 == 0x8e) {
|
||||
return decoderJ0201.decode(byte2 - 256);
|
||||
}
|
||||
|
||||
if (((byte1 < 0)
|
||||
|| (byte1 > j0208Index1.length))
|
||||
|| ((byte2 < start)
|
||||
|| (byte2 > end)))
|
||||
return REPLACE_CHAR;
|
||||
|
||||
char result = super.decodeDouble(byte1, byte2);
|
||||
if (result != '\uFFFD') {
|
||||
return result;
|
||||
} else {
|
||||
int n = (j0208Index1[byte1 - 0x80] & 0xf) *
|
||||
(end - start + 1)
|
||||
+ (byte2 - start);
|
||||
return j0208Index2[j0208Index1[byte1 - 0x80] >> 4].charAt(n);
|
||||
}
|
||||
char c = super.decodeDouble(byte1, byte2);
|
||||
if (c == UNMAPPABLE_DECODING)
|
||||
return DEC0208_Solaris.decodeDouble(byte1 - 0x80, byte2 - 0x80);
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class Encoder extends EUC_JP.Encoder {
|
||||
private static DoubleByte.Encoder ENC0208_Solaris =
|
||||
(DoubleByte.Encoder)new JIS_X_0208_Solaris().newEncoder();
|
||||
|
||||
JIS_X_0201.Encoder encoderJ0201;
|
||||
JIS_X_0212_Solaris_Encoder encoderJ0212;
|
||||
|
||||
private static final short[] j0208Index1 =
|
||||
JIS_X_0208_Solaris_Encoder.getIndex1();
|
||||
private static final String[] j0208Index2 =
|
||||
JIS_X_0208_Solaris_Encoder.getIndex2();
|
||||
|
||||
private final Surrogate.Parser sgp = new Surrogate.Parser();
|
||||
private static DoubleByte.Encoder ENC0212_Solaris =
|
||||
(DoubleByte.Encoder)new JIS_X_0212_Solaris().newEncoder();
|
||||
|
||||
private Encoder(Charset cs) {
|
||||
// The EUC_JP_Open has some interesting tweak for the
|
||||
// encoding, so can't just pass the euc0208_solaris to
|
||||
// the euc_jp. Have to override the encodeDouble() as
|
||||
// showed below (mapping testing catches this).
|
||||
// super(cs, 3.0f, 3.0f, ENC0201, ENC0208_Solaris, ENC0212_Solaris);
|
||||
super(cs);
|
||||
encoderJ0201 = new JIS_X_0201.Encoder(cs);
|
||||
encoderJ0212 = new JIS_X_0212_Solaris_Encoder(cs);
|
||||
}
|
||||
|
||||
protected int encodeSingle(char inputChar, byte[] outputByte) {
|
||||
byte b;
|
||||
|
||||
if (inputChar == 0) {
|
||||
outputByte[0] = (byte)0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((b = encoderJ0201.encode(inputChar)) == 0)
|
||||
return 0;
|
||||
|
||||
if (b > 0 && b < 128) {
|
||||
outputByte[0] = b;
|
||||
return 1;
|
||||
}
|
||||
|
||||
outputByte[0] = (byte)0x8e;
|
||||
outputByte[1] = b;
|
||||
return 2;
|
||||
}
|
||||
|
||||
protected int encodeDouble(char ch) {
|
||||
int r = super.encodeDouble(ch);
|
||||
if (r != 0) {
|
||||
return r;
|
||||
int b = super.encodeDouble(ch);
|
||||
if (b != UNMAPPABLE_ENCODING)
|
||||
return b;
|
||||
b = ENC0208_Solaris.encodeChar(ch);
|
||||
if (b != UNMAPPABLE_ENCODING && b > 0x7500) {
|
||||
return 0x8F8080 + ENC0212_Solaris.encodeChar(ch);
|
||||
}
|
||||
else {
|
||||
int offset = j0208Index1[((ch & 0xff00) >> 8 )] << 8;
|
||||
r = j0208Index2[offset >> 12].charAt((offset & 0xfff) +
|
||||
(ch & 0xFF));
|
||||
if (r > 0x7500)
|
||||
return 0x8F8080 + encoderJ0212.encodeDouble(ch);
|
||||
}
|
||||
return (r==0 ? 0: r + 0x8080);
|
||||
return b == UNMAPPABLE_ENCODING ? b : b + 0x8080;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ public class IBM834 extends Charset
|
||||
|
||||
public CharsetDecoder newDecoder() {
|
||||
IBM933.initb2c();
|
||||
return new DoubleByte.Decoder_EBCDIC_DBCSONLY(
|
||||
this, IBM933.b2c, 0x40, 0xfe); // hardcode the b2min/max
|
||||
return new DoubleByte.Decoder_DBCSONLY(
|
||||
this, IBM933.b2c, null, 0x40, 0xfe); // hardcode the b2min/max
|
||||
}
|
||||
|
||||
public CharsetEncoder newEncoder() {
|
||||
@ -58,7 +58,7 @@ public class IBM834 extends Charset
|
||||
return new Encoder(this);
|
||||
}
|
||||
|
||||
protected static class Encoder extends DoubleByte.Encoder_EBCDIC_DBCSONLY {
|
||||
protected static class Encoder extends DoubleByte.Encoder_DBCSONLY {
|
||||
public Encoder(Charset cs) {
|
||||
super(cs, new byte[] {(byte)0xfe, (byte)0xfe},
|
||||
IBM933.c2b, IBM933.c2bIndex);
|
||||
|
@ -35,6 +35,7 @@ import java.nio.charset.CodingErrorAction;
|
||||
import sun.nio.cs.HistoricallyNamedCharset;
|
||||
import sun.nio.cs.Surrogate;
|
||||
import sun.nio.cs.US_ASCII;
|
||||
import static sun.nio.cs.CharsetMapping.*;
|
||||
|
||||
/*
|
||||
* Implementation notes:
|
||||
@ -154,71 +155,41 @@ public class ISO2022_JP
|
||||
}
|
||||
|
||||
public CharsetDecoder newDecoder() {
|
||||
return new Decoder(this,
|
||||
getDecIndex1(),
|
||||
getDecIndex2(),
|
||||
get0212Decoder());
|
||||
return new Decoder(this);
|
||||
}
|
||||
|
||||
public CharsetEncoder newEncoder() {
|
||||
return new Encoder(this,
|
||||
getEncIndex1(),
|
||||
getEncIndex2(),
|
||||
get0212Encoder(),
|
||||
doSBKANA());
|
||||
}
|
||||
|
||||
protected short[] getDecIndex1() {
|
||||
return JIS_X_0208_Decoder.getIndex1();
|
||||
}
|
||||
|
||||
protected String[] getDecIndex2() {
|
||||
return JIS_X_0208_Decoder.getIndex2();
|
||||
}
|
||||
|
||||
protected DoubleByteDecoder get0212Decoder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected short[] getEncIndex1() {
|
||||
return JIS_X_0208_Encoder.getIndex1();
|
||||
}
|
||||
|
||||
protected String[] getEncIndex2() {
|
||||
return JIS_X_0208_Encoder.getIndex2();
|
||||
}
|
||||
|
||||
protected DoubleByteEncoder get0212Encoder() {
|
||||
return null;
|
||||
return new Encoder(this);
|
||||
}
|
||||
|
||||
protected boolean doSBKANA() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static class Decoder extends DoubleByteDecoder
|
||||
static class Decoder extends CharsetDecoder
|
||||
implements DelegatableDecoder {
|
||||
|
||||
final static DoubleByte.Decoder DEC0208 =
|
||||
(DoubleByte.Decoder)new JIS_X_0208().newDecoder();
|
||||
|
||||
private int currentState;
|
||||
private int previousState;
|
||||
private DoubleByteDecoder decoder0212;
|
||||
|
||||
protected Decoder(Charset cs,
|
||||
short[] index1,
|
||||
String[] index2,
|
||||
DoubleByteDecoder decoder0212) {
|
||||
super(cs,
|
||||
index1,
|
||||
index2,
|
||||
0x21,
|
||||
0x7e);
|
||||
this.decoder0212 = decoder0212;
|
||||
currentState = ASCII;
|
||||
previousState = ASCII;
|
||||
private DoubleByte.Decoder dec0208;
|
||||
private DoubleByte.Decoder dec0212;
|
||||
|
||||
private Decoder(Charset cs) {
|
||||
this(cs, DEC0208, null);
|
||||
}
|
||||
|
||||
protected char convSingleByte(int b) {
|
||||
return REPLACE_CHAR;
|
||||
protected Decoder(Charset cs,
|
||||
DoubleByte.Decoder dec0208,
|
||||
DoubleByte.Decoder dec0212) {
|
||||
super(cs, 0.5f, 1.0f);
|
||||
this.dec0208 = dec0208;
|
||||
this.dec0212 = dec0212;
|
||||
currentState = ASCII;
|
||||
previousState = ASCII;
|
||||
}
|
||||
|
||||
public void implReset() {
|
||||
@ -231,7 +202,7 @@ public class ISO2022_JP
|
||||
{
|
||||
int inputSize = 0;
|
||||
int b1 = 0, b2 = 0, b3 = 0, b4 = 0;
|
||||
char c = REPLACE_CHAR;
|
||||
char c = UNMAPPABLE_DECODING;
|
||||
byte[] sa = src.array();
|
||||
int sp = src.arrayOffset() + src.position();
|
||||
int sl = src.arrayOffset() + src.limit();
|
||||
@ -273,7 +244,7 @@ public class ISO2022_JP
|
||||
currentState = JISX0208_1978;
|
||||
} else if (b3 == 'B'){
|
||||
currentState = JISX0208_1983;
|
||||
} else if (b3 == '(' && decoder0212 != null) {
|
||||
} else if (b3 == '(' && dec0212 != null) {
|
||||
if (sp + inputSize + 1 > sl)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b4 = sa[sp + inputSize++] & 0xff;
|
||||
@ -322,8 +293,8 @@ public class ISO2022_JP
|
||||
if (sp + inputSize + 1 > sl)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b2 = sa[sp + inputSize++] & 0xff;
|
||||
c = decodeDouble(b1,b2);
|
||||
if (c == REPLACE_CHAR)
|
||||
c = dec0208.decodeDouble(b1,b2);
|
||||
if (c == UNMAPPABLE_DECODING)
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
da[dp++] = c;
|
||||
break;
|
||||
@ -331,8 +302,8 @@ public class ISO2022_JP
|
||||
if (sp + inputSize + 1 > sl)
|
||||
return CoderResult.UNDERFLOW;
|
||||
b2 = sa[sp + inputSize++] & 0xff;
|
||||
c = decoder0212.decodeDouble(b1,b2);
|
||||
if (c == REPLACE_CHAR)
|
||||
c = dec0212.decodeDouble(b1,b2);
|
||||
if (c == UNMAPPABLE_DECODING)
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
da[dp++] = c;
|
||||
break;
|
||||
@ -358,7 +329,7 @@ public class ISO2022_JP
|
||||
{
|
||||
int mark = src.position();
|
||||
int b1 = 0, b2 = 0, b3 = 0, b4=0;
|
||||
char c = REPLACE_CHAR;
|
||||
char c = UNMAPPABLE_DECODING;
|
||||
int inputSize = 0;
|
||||
try {
|
||||
while (src.hasRemaining()) {
|
||||
@ -391,7 +362,7 @@ public class ISO2022_JP
|
||||
currentState = JISX0208_1978;
|
||||
} else if (b3 == 'B'){
|
||||
currentState = JISX0208_1983;
|
||||
} else if (b3 == '(' && decoder0212 != null) {
|
||||
} else if (b3 == '(' && dec0212 != null) {
|
||||
if (!src.hasRemaining())
|
||||
return CoderResult.UNDERFLOW;
|
||||
b4 = src.get() & 0xff;
|
||||
@ -442,8 +413,8 @@ public class ISO2022_JP
|
||||
return CoderResult.UNDERFLOW;
|
||||
b2 = src.get() & 0xff;
|
||||
inputSize++;
|
||||
c = decodeDouble(b1,b2);
|
||||
if (c == REPLACE_CHAR)
|
||||
c = dec0208.decodeDouble(b1,b2);
|
||||
if (c == UNMAPPABLE_DECODING)
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
dst.put(c);
|
||||
break;
|
||||
@ -452,8 +423,8 @@ public class ISO2022_JP
|
||||
return CoderResult.UNDERFLOW;
|
||||
b2 = src.get() & 0xff;
|
||||
inputSize++;
|
||||
c = decoder0212.decodeDouble(b1,b2);
|
||||
if (c == REPLACE_CHAR)
|
||||
c = dec0212.decodeDouble(b1,b2);
|
||||
if (c == UNMAPPABLE_DECODING)
|
||||
return CoderResult.unmappableForLength(inputSize);
|
||||
dst.put(c);
|
||||
break;
|
||||
@ -486,25 +457,29 @@ public class ISO2022_JP
|
||||
}
|
||||
}
|
||||
|
||||
private static class Encoder extends DoubleByteEncoder {
|
||||
static class Encoder extends CharsetEncoder {
|
||||
|
||||
final static DoubleByte.Encoder ENC0208 =
|
||||
(DoubleByte.Encoder)new JIS_X_0208().newEncoder();
|
||||
|
||||
private static byte[] repl = { (byte)0x21, (byte)0x29 };
|
||||
private int currentMode = ASCII;
|
||||
private int replaceMode = JISX0208_1983;
|
||||
private DoubleByteEncoder encoder0212 = null;
|
||||
private DoubleByte.Encoder enc0208;
|
||||
private DoubleByte.Encoder enc0212;
|
||||
private boolean doSBKANA;
|
||||
|
||||
private Encoder(Charset cs,
|
||||
short[] index1,
|
||||
String[] index2,
|
||||
DoubleByteEncoder encoder0212,
|
||||
boolean doSBKANA) {
|
||||
super(cs,
|
||||
index1,
|
||||
index2,
|
||||
repl,
|
||||
4.0f,
|
||||
(encoder0212 != null)? 9.0f : 8.0f);
|
||||
this.encoder0212 = encoder0212;
|
||||
private Encoder(Charset cs) {
|
||||
this(cs, ENC0208, null, true);
|
||||
}
|
||||
|
||||
Encoder(Charset cs,
|
||||
DoubleByte.Encoder enc0208,
|
||||
DoubleByte.Encoder enc0212,
|
||||
boolean doSBKANA) {
|
||||
super(cs, 4.0f, (enc0212 != null)? 9.0f : 8.0f, repl);
|
||||
this.enc0208 = enc0208;
|
||||
this.enc0212 = enc0212;
|
||||
this.doSBKANA = doSBKANA;
|
||||
}
|
||||
|
||||
@ -545,8 +520,8 @@ public class ISO2022_JP
|
||||
(c >= 0xFF61 && c <= 0xFF9F) ||
|
||||
(c == '\u00A5') ||
|
||||
(c == '\u203E') ||
|
||||
super.canEncode(c) ||
|
||||
(encoder0212!=null && encoder0212.canEncode(c)));
|
||||
enc0208.canEncode(c) ||
|
||||
(enc0212!=null && enc0212.canEncode(c)));
|
||||
}
|
||||
|
||||
private final Surrogate.Parser sgp = new Surrogate.Parser();
|
||||
@ -607,8 +582,8 @@ public class ISO2022_JP
|
||||
return CoderResult.OVERFLOW;
|
||||
da[dp++] = (c == '\u00A5')?(byte)0x5C:(byte)0x7e;
|
||||
} else {
|
||||
int index = encodeDouble(c);
|
||||
if (index != 0) {
|
||||
int index = enc0208.encodeChar(c);
|
||||
if (index != UNMAPPABLE_ENCODING) {
|
||||
if (currentMode != JISX0208_1983) {
|
||||
if (dl - dp < 3)
|
||||
return CoderResult.OVERFLOW;
|
||||
@ -621,8 +596,8 @@ public class ISO2022_JP
|
||||
return CoderResult.OVERFLOW;
|
||||
da[dp++] = (byte)(index >> 8);
|
||||
da[dp++] = (byte)(index & 0xff);
|
||||
} else if (encoder0212 != null &&
|
||||
(index = encoder0212.encodeDouble(c)) != 0) {
|
||||
} else if (enc0212 != null &&
|
||||
(index = enc0212.encodeChar(c)) != UNMAPPABLE_ENCODING) {
|
||||
if (currentMode != JISX0212_1990) {
|
||||
if (dl - dp < 4)
|
||||
return CoderResult.OVERFLOW;
|
||||
@ -715,8 +690,8 @@ public class ISO2022_JP
|
||||
return CoderResult.OVERFLOW;
|
||||
dst.put((c == '\u00A5')?(byte)0x5C:(byte)0x7e);
|
||||
} else {
|
||||
int index = encodeDouble(c);
|
||||
if (index != 0) {
|
||||
int index = enc0208.encodeChar(c);
|
||||
if (index != UNMAPPABLE_ENCODING) {
|
||||
if (currentMode != JISX0208_1983) {
|
||||
if (dst.remaining() < 3)
|
||||
return CoderResult.OVERFLOW;
|
||||
@ -729,8 +704,8 @@ public class ISO2022_JP
|
||||
return CoderResult.OVERFLOW;
|
||||
dst.put((byte)(index >> 8));
|
||||
dst.put((byte)(index & 0xff));
|
||||
} else if (encoder0212 != null &&
|
||||
(index = encoder0212.encodeDouble(c)) != 0) {
|
||||
} else if (enc0212 != null &&
|
||||
(index = enc0212.encodeChar(c)) != UNMAPPABLE_ENCODING) {
|
||||
if (currentMode != JISX0212_1990) {
|
||||
if (dst.remaining() < 4)
|
||||
return CoderResult.OVERFLOW;
|
||||
|
@ -26,6 +26,8 @@
|
||||
package sun.nio.cs.ext;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
|
||||
public class ISO2022_JP_2 extends ISO2022_JP
|
||||
{
|
||||
@ -44,12 +46,18 @@ public class ISO2022_JP_2 extends ISO2022_JP
|
||||
(cs instanceof ISO2022_JP_2);
|
||||
}
|
||||
|
||||
protected DoubleByteDecoder get0212Decoder() {
|
||||
return new JIS_X_0212_Decoder(this);
|
||||
public CharsetDecoder newDecoder() {
|
||||
return new Decoder(this, Decoder.DEC0208, DEC0212);
|
||||
}
|
||||
|
||||
protected DoubleByteEncoder get0212Encoder() {
|
||||
return new JIS_X_0212_Encoder(this);
|
||||
public CharsetEncoder newEncoder() {
|
||||
return new Encoder(this, Encoder.ENC0208, ENC0212, true);
|
||||
}
|
||||
|
||||
private final static DoubleByte.Decoder DEC0212 =
|
||||
(DoubleByte.Decoder)new JIS_X_0212().newDecoder();
|
||||
|
||||
private final static DoubleByte.Encoder ENC0212 =
|
||||
(DoubleByte.Encoder)new JIS_X_0212().newEncoder();
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,232 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2006, 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 sun.nio.cs.ext;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
|
||||
class JIS_X_0212_MS5022X_Decoder extends JIS_X_0212_Decoder
|
||||
{
|
||||
private int _start, _end;
|
||||
|
||||
public JIS_X_0212_MS5022X_Decoder(Charset cs) {
|
||||
super(cs);
|
||||
_start = 0x21;
|
||||
_end = 0x7E;
|
||||
}
|
||||
|
||||
protected char decodeDouble(int byte1, int byte2) {
|
||||
if (((byte1 < 0) || (byte1 > _index1.length))
|
||||
|| ((byte2 < _start) || (byte2 > _end)))
|
||||
return REPLACE_CHAR;
|
||||
int n = (_index1[byte1] & 0xf)*(_end - _start + 1) + (byte2 - _start);
|
||||
char unicode = _index2[_index1[byte1] >> 4].charAt(n);
|
||||
if (unicode == '\u0000')
|
||||
return (super.decodeDouble(byte1, byte2));
|
||||
else
|
||||
return unicode;
|
||||
}
|
||||
|
||||
private final static String _innerIndex0=
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u2170\u2171"+
|
||||
"\u2172\u2173\u2174\u2175\u2176\u2177\u2178\u2179"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\uFF07\uFF02\u0000\u0000\u0000\u70BB"+
|
||||
"\u4EFC\u50F4\u51EC\u5307\u5324\uFA0E\u548A\u5759"+
|
||||
"\uFA0F\uFA10\u589E\u5BEC\u5CF5\u5D53\uFA11\u5FB7"+
|
||||
"\u6085\u6120\u654E\u0000\u6665\uFA12\uF929\u6801"+
|
||||
"\uFA13\uFA14\u6A6B\u6AE2\u6DF8\u6DF2\u7028\uFA15"+
|
||||
"\uFA16\u7501\u7682\u769E\uFA17\u7930\uFA18\uFA19"+
|
||||
"\uFA1A\uFA1B\u7AE7\uFA1C\uFA1D\u7DA0\u7DD6\uFA1E"+
|
||||
"\u8362\uFA1F\u85B0\uFA20\uFA21\u8807\uFA22\u8B7F"+
|
||||
"\u8CF4\u8D76\uFA23\uFA24\uFA25\u90DE\uFA26\u9115"+
|
||||
"\uFA27\uFA28\u9592\uF9DC\uFA29\u973B\u0000\u9751"+
|
||||
"\uFA2A\uFA2B\uFA2C\u999E\u9AD9\u9B72\uFA2D\u9ED1"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u974D\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"+
|
||||
"\u0000\u0000\uE3AC\uE3AD\uE3AE\uE3AF\uE3B0\uE3B1"+
|
||||
"\uE3B2\uE3B3\uE3B4\uE3B5\uE3B6\uE3B7\uE3B8\uE3B9"+
|
||||
"\uE3BA\uE3BB\uE3BC\uE3BD\uE3BE\uE3BF\uE3C0\uE3C1"+
|
||||
"\uE3C2\uE3C3\uE3C4\uE3C5\uE3C6\uE3C7\uE3C8\uE3C9"+
|
||||
"\uE3CA\uE3CB\uE3CC\uE3CD\uE3CE\uE3CF\uE3D0\uE3D1"+
|
||||
"\uE3D2\uE3D3\uE3D4\uE3D5\uE3D6\uE3D7\uE3D8\uE3D9"+
|
||||
"\uE3DA\uE3DB\uE3DC\uE3DD\uE3DE\uE3DF\uE3E0\uE3E1"+
|
||||
"\uE3E2\uE3E3\uE3E4\uE3E5\uE3E6\uE3E7\uE3E8\uE3E9"+
|
||||
"\uE3EA\uE3EB\uE3EC\uE3ED\uE3EE\uE3EF\uE3F0\uE3F1"+
|
||||
"\uE3F2\uE3F3\uE3F4\uE3F5\uE3F6\uE3F7\uE3F8\uE3F9"+
|
||||
"\uE3FA\uE3FB\uE3FC\uE3FD\uE3FE\uE3FF\uE400\uE401"+
|
||||
"\uE402\uE403\uE404\uE405\uE406\uE407\uE408\uE409"+
|
||||
"\uE40A\uE40B\uE40C\uE40D\uE40E\uE40F\uE410\uE411"+
|
||||
"\uE412\uE413\uE414\uE415\uE416\uE417\uE418\uE419"+
|
||||
"\uE41A\uE41B\uE41C\uE41D\uE41E\uE41F\uE420\uE421"+
|
||||
"\uE422\uE423\uE424\uE425\uE426\uE427\uE428\uE429"+
|
||||
"\uE42A\uE42B\uE42C\uE42D\uE42E\uE42F\uE430\uE431"+
|
||||
"\uE432\uE433\uE434\uE435\uE436\uE437\uE438\uE439"+
|
||||
"\uE43A\uE43B\uE43C\uE43D\uE43E\uE43F\uE440\uE441"+
|
||||
"\uE442\uE443\uE444\uE445\uE446\uE447\uE448\uE449"+
|
||||
"\uE44A\uE44B\uE44C\uE44D\uE44E\uE44F\uE450\uE451"+
|
||||
"\uE452\uE453\uE454\uE455\uE456\uE457\uE458\uE459"+
|
||||
"\uE45A\uE45B\uE45C\uE45D\uE45E\uE45F\uE460\uE461"+
|
||||
"\uE462\uE463\uE464\uE465\uE466\uE467\uE468\uE469"+
|
||||
"\uE46A\uE46B\uE46C\uE46D\uE46E\uE46F\uE470\uE471"+
|
||||
"\uE472\uE473\uE474\uE475\uE476\uE477\uE478\uE479"+
|
||||
"\uE47A\uE47B\uE47C\uE47D\uE47E\uE47F\uE480\uE481"+
|
||||
"\uE482\uE483\uE484\uE485\uE486\uE487\uE488\uE489"+
|
||||
"\uE48A\uE48B\uE48C\uE48D\uE48E\uE48F\uE490\uE491"+
|
||||
"\uE492\uE493\uE494\uE495\uE496\uE497\uE498\uE499"+
|
||||
"\uE49A\uE49B\uE49C\uE49D\uE49E\uE49F\uE4A0\uE4A1"+
|
||||
"\uE4A2\uE4A3\uE4A4\uE4A5\uE4A6\uE4A7\uE4A8\uE4A9"+
|
||||
"\uE4AA\uE4AB\uE4AC\uE4AD\uE4AE\uE4AF\uE4B0\uE4B1"+
|
||||
"\uE4B2\uE4B3\uE4B4\uE4B5\uE4B6\uE4B7\uE4B8\uE4B9"+
|
||||
"\uE4BA\uE4BB\uE4BC\uE4BD\uE4BE\uE4BF\uE4C0\uE4C1"+
|
||||
"\uE4C2\uE4C3\uE4C4\uE4C5\uE4C6\uE4C7\uE4C8\uE4C9"+
|
||||
"\uE4CA\uE4CB\uE4CC\uE4CD\uE4CE\uE4CF\uE4D0\uE4D1"+
|
||||
"\uE4D2\uE4D3\uE4D4\uE4D5\uE4D6\uE4D7\uE4D8\uE4D9"+
|
||||
"\uE4DA\uE4DB\uE4DC\uE4DD\uE4DE\uE4DF\uE4E0\uE4E1"+
|
||||
"\uE4E2\uE4E3\uE4E4\uE4E5\uE4E6\uE4E7\uE4E8\uE4E9"+
|
||||
"\uE4EA\uE4EB\uE4EC\uE4ED\uE4EE\uE4EF\uE4F0\uE4F1"+
|
||||
"\uE4F2\uE4F3\uE4F4\uE4F5\uE4F6\uE4F7\uE4F8\uE4F9"+
|
||||
"\uE4FA\uE4FB\uE4FC\uE4FD\uE4FE\uE4FF\uE500\uE501"+
|
||||
"\uE502\uE503\uE504\uE505\uE506\uE507\uE508\uE509"+
|
||||
"\uE50A\uE50B\uE50C\uE50D\uE50E\uE50F\uE510\uE511"+
|
||||
"\uE512\uE513\uE514\uE515\uE516\uE517\uE518\uE519"+
|
||||
"\uE51A\uE51B\uE51C\uE51D\uE51E\uE51F\uE520\uE521"+
|
||||
"\uE522\uE523\uE524\uE525\uE526\uE527\uE528\uE529"+
|
||||
"\uE52A\uE52B\uE52C\uE52D\uE52E\uE52F\uE530\uE531"+
|
||||
"\uE532\uE533\uE534\uE535\uE536\uE537\uE538\uE539"+
|
||||
"\uE53A\uE53B\uE53C\uE53D\uE53E\uE53F\uE540\uE541"+
|
||||
"\uE542\uE543\uE544\uE545\uE546\uE547\uE548\uE549"+
|
||||
"\uE54A\uE54B\uE54C\uE54D\uE54E\uE54F\uE550\uE551"+
|
||||
"\uE552\uE553\uE554\uE555\uE556\uE557\uE558\uE559"+
|
||||
"\uE55A\uE55B\uE55C\uE55D\uE55E\uE55F\uE560\uE561"+
|
||||
"\uE562\uE563\uE564\uE565\uE566\uE567\uE568\uE569"+
|
||||
"\uE56A\uE56B\uE56C\uE56D\uE56E\uE56F\uE570\uE571"+
|
||||
"\uE572\uE573\uE574\uE575\uE576\uE577\uE578\uE579"+
|
||||
"\uE57A\uE57B\uE57C\uE57D\uE57E\uE57F\uE580\uE581"+
|
||||
"\uE582\uE583\uE584\uE585\uE586\uE587\uE588\uE589"+
|
||||
"\uE58A\uE58B\uE58C\uE58D\uE58E\uE58F\uE590\uE591"+
|
||||
"\uE592\uE593\uE594\uE595\uE596\uE597\uE598\uE599"+
|
||||
"\uE59A\uE59B\uE59C\uE59D\uE59E\uE59F\uE5A0\uE5A1"+
|
||||
"\uE5A2\uE5A3\uE5A4\uE5A5\uE5A6\uE5A7\uE5A8\uE5A9"+
|
||||
"\uE5AA\uE5AB\uE5AC\uE5AD\uE5AE\uE5AF\uE5B0\uE5B1"+
|
||||
"\uE5B2\uE5B3\uE5B4\uE5B5\uE5B6\uE5B7\uE5B8\uE5B9"+
|
||||
"\uE5BA\uE5BB\uE5BC\uE5BD\uE5BE\uE5BF\uE5C0\uE5C1"+
|
||||
"\uE5C2\uE5C3\uE5C4\uE5C5\uE5C6\uE5C7\uE5C8\uE5C9"+
|
||||
"\uE5CA\uE5CB\uE5CC\uE5CD\uE5CE\uE5CF\uE5D0\uE5D1"+
|
||||
"\uE5D2\uE5D3\uE5D4\uE5D5\uE5D6\uE5D7\uE5D8\uE5D9"+
|
||||
"\uE5DA\uE5DB\uE5DC\uE5DD\uE5DE\uE5DF\uE5E0\uE5E1"+
|
||||
"\uE5E2\uE5E3\uE5E4\uE5E5\uE5E6\uE5E7\uE5E8\uE5E9"+
|
||||
"\uE5EA\uE5EB\uE5EC\uE5ED\uE5EE\uE5EF\uE5F0\uE5F1"+
|
||||
"\uE5F2\uE5F3\uE5F4\uE5F5\uE5F6\uE5F7\uE5F8\uE5F9"+
|
||||
"\uE5FA\uE5FB\uE5FC\uE5FD\uE5FE\uE5FF\uE600\uE601"+
|
||||
"\uE602\uE603\uE604\uE605\uE606\uE607\uE608\uE609"+
|
||||
"\uE60A\uE60B\uE60C\uE60D\uE60E\uE60F\uE610\uE611"+
|
||||
"\uE612\uE613\uE614\uE615\uE616\uE617\uE618\uE619"+
|
||||
"\uE61A\uE61B\uE61C\uE61D\uE61E\uE61F\uE620\uE621"+
|
||||
"\uE622\uE623\uE624\uE625\uE626\uE627\uE628\uE629"+
|
||||
"\uE62A\uE62B\uE62C\uE62D\uE62E\uE62F\uE630\uE631"+
|
||||
"\uE632\uE633\uE634\uE635\uE636\uE637\uE638\uE639"+
|
||||
"\uE63A\uE63B\uE63C\uE63D\uE63E\uE63F\uE640\uE641"+
|
||||
"\uE642\uE643\uE644\uE645\uE646\uE647\uE648\uE649"+
|
||||
"\uE64A\uE64B\uE64C\uE64D\uE64E\uE64F\uE650\uE651"+
|
||||
"\uE652\uE653\uE654\uE655\uE656\uE657\uE658\uE659"+
|
||||
"\uE65A\uE65B\uE65C\uE65D\uE65E\uE65F\uE660\uE661"+
|
||||
"\uE662\uE663\uE664\uE665\uE666\uE667\uE668\uE669"+
|
||||
"\uE66A\uE66B\uE66C\uE66D\uE66E\uE66F\uE670\uE671"+
|
||||
"\uE672\uE673\uE674\uE675\uE676\uE677\uE678\uE679"+
|
||||
"\uE67A\uE67B\uE67C\uE67D\uE67E\uE67F\uE680\uE681"+
|
||||
"\uE682\uE683\uE684\uE685\uE686\uE687\uE688\uE689"+
|
||||
"\uE68A\uE68B\uE68C\uE68D\uE68E\uE68F\uE690\uE691"+
|
||||
"\uE692\uE693\uE694\uE695\uE696\uE697\uE698\uE699"+
|
||||
"\uE69A\uE69B\uE69C\uE69D\uE69E\uE69F\uE6A0\uE6A1"+
|
||||
"\uE6A2\uE6A3\uE6A4\uE6A5\uE6A6\uE6A7\uE6A8\uE6A9"+
|
||||
"\uE6AA\uE6AB\uE6AC\uE6AD\uE6AE\uE6AF\uE6B0\uE6B1"+
|
||||
"\uE6B2\uE6B3\uE6B4\uE6B5\uE6B6\uE6B7\uE6B8\uE6B9"+
|
||||
"\uE6BA\uE6BB\uE6BC\uE6BD\uE6BE\uE6BF\uE6C0\uE6C1"+
|
||||
"\uE6C2\uE6C3\uE6C4\uE6C5\uE6C6\uE6C7\uE6C8\uE6C9"+
|
||||
"\uE6CA\uE6CB\uE6CC\uE6CD\uE6CE\uE6CF\uE6D0\uE6D1"+
|
||||
"\uE6D2\uE6D3\uE6D4\uE6D5\uE6D6\uE6D7\uE6D8\uE6D9"+
|
||||
"\uE6DA\uE6DB\uE6DC\uE6DD\uE6DE\uE6DF\uE6E0\uE6E1"+
|
||||
"\uE6E2\uE6E3\uE6E4\uE6E5\uE6E6\uE6E7\uE6E8\uE6E9"+
|
||||
"\uE6EA\uE6EB\uE6EC\uE6ED\uE6EE\uE6EF\uE6F0\uE6F1"+
|
||||
"\uE6F2\uE6F3\uE6F4\uE6F5\uE6F6\uE6F7\uE6F8\uE6F9"+
|
||||
"\uE6FA\uE6FB\uE6FC\uE6FD\uE6FE\uE6FF\uE700\uE701"+
|
||||
"\uE702\uE703\uE704\uE705\uE706\uE707\uE708\uE709"+
|
||||
"\uE70A\uE70B\uE70C\uE70D\uE70E\uE70F\uE710\uE711"+
|
||||
"\uE712\uE713\uE714\uE715\uE716\uE717\uE718\uE719"+
|
||||
"\uE71A\uE71B\uE71C\uE71D\uE71E\uE71F\uE720\uE721"+
|
||||
"\uE722\uE723\uE724\uE725\uE726\uE727\uE728\uE729"+
|
||||
"\uE72A\uE72B\uE72C\uE72D\uE72E\uE72F\uE730\uE731"+
|
||||
"\uE732\uE733\uE734\uE735\uE736\uE737\uE738\uE739"+
|
||||
"\uE73A\uE73B\uE73C\uE73D\uE73E\uE73F\uE740\uE741"+
|
||||
"\uE742\uE743\uE744\uE745\uE746\uE747\uE748\uE749"+
|
||||
"\uE74A\uE74B\uE74C\uE74D\uE74E\uE74F\uE750\uE751"+
|
||||
"\uE752\uE753\uE754\uE755\uE756\uE757";
|
||||
|
||||
private final static short _index1[] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
private final static String _index2[] = {
|
||||
_innerIndex0
|
||||
};
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -26,6 +26,8 @@
|
||||
package sun.nio.cs.ext;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
|
||||
public class MS50220 extends ISO2022_JP
|
||||
{
|
||||
@ -34,6 +36,10 @@ public class MS50220 extends ISO2022_JP
|
||||
ExtendedCharsets.aliasesFor("x-windows-50220"));
|
||||
}
|
||||
|
||||
protected MS50220(String canonicalName, String[] aliases) {
|
||||
super(canonicalName, aliases);
|
||||
}
|
||||
|
||||
public String historicalName() {
|
||||
return "MS50220";
|
||||
}
|
||||
@ -44,29 +50,25 @@ public class MS50220 extends ISO2022_JP
|
||||
(cs instanceof MS50220);
|
||||
}
|
||||
|
||||
protected short[] getDecIndex1() {
|
||||
return JIS_X_0208_MS5022X_Decoder.index1;
|
||||
public CharsetDecoder newDecoder() {
|
||||
return new Decoder(this, DEC0208, DEC0212);
|
||||
}
|
||||
|
||||
protected String[] getDecIndex2() {
|
||||
return JIS_X_0208_MS5022X_Decoder.index2;
|
||||
public CharsetEncoder newEncoder() {
|
||||
return new Encoder(this, ENC0208, ENC0212, doSBKANA());
|
||||
}
|
||||
|
||||
protected DoubleByteDecoder get0212Decoder() {
|
||||
return new JIS_X_0212_MS5022X_Decoder(this);
|
||||
}
|
||||
private final static DoubleByte.Decoder DEC0208 =
|
||||
(DoubleByte.Decoder)new JIS_X_0208_MS5022X().newDecoder();
|
||||
|
||||
protected short[] getEncIndex1() {
|
||||
return JIS_X_0208_MS5022X_Encoder.index1;
|
||||
}
|
||||
private final static DoubleByte.Decoder DEC0212 =
|
||||
(DoubleByte.Decoder)new JIS_X_0212_MS5022X().newDecoder();
|
||||
|
||||
protected String[] getEncIndex2() {
|
||||
return JIS_X_0208_MS5022X_Encoder.index2;
|
||||
}
|
||||
private final static DoubleByte.Encoder ENC0208 =
|
||||
(DoubleByte.Encoder)new JIS_X_0208_MS5022X().newEncoder();
|
||||
|
||||
protected DoubleByteEncoder get0212Encoder() {
|
||||
return new JIS_X_0212_MS5022X_Encoder(this);
|
||||
}
|
||||
private final static DoubleByte.Encoder ENC0212 =
|
||||
(DoubleByte.Encoder)new JIS_X_0212_MS5022X().newEncoder();
|
||||
|
||||
protected boolean doSBKANA() {
|
||||
return false;
|
||||
|
@ -27,7 +27,7 @@ package sun.nio.cs.ext;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
public class MS50221 extends ISO2022_JP
|
||||
public class MS50221 extends MS50220
|
||||
{
|
||||
public MS50221() {
|
||||
super("x-windows-50221",
|
||||
@ -44,30 +44,6 @@ public class MS50221 extends ISO2022_JP
|
||||
(cs instanceof MS50221);
|
||||
}
|
||||
|
||||
protected short[] getDecIndex1() {
|
||||
return JIS_X_0208_MS5022X_Decoder.index1;
|
||||
}
|
||||
|
||||
protected String[] getDecIndex2() {
|
||||
return JIS_X_0208_MS5022X_Decoder.index2;
|
||||
}
|
||||
|
||||
protected DoubleByteDecoder get0212Decoder() {
|
||||
return new JIS_X_0212_MS5022X_Decoder(this);
|
||||
}
|
||||
|
||||
protected short[] getEncIndex1() {
|
||||
return JIS_X_0208_MS5022X_Encoder.index1;
|
||||
}
|
||||
|
||||
protected String[] getEncIndex2() {
|
||||
return JIS_X_0208_MS5022X_Encoder.index2;
|
||||
}
|
||||
|
||||
protected DoubleByteEncoder get0212Encoder() {
|
||||
return new JIS_X_0212_MS5022X_Encoder(this);
|
||||
}
|
||||
|
||||
protected boolean doSBKANA() {
|
||||
return true;
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
package sun.nio.cs.ext;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
|
||||
public class MSISO2022JP extends ISO2022_JP
|
||||
{
|
||||
@ -43,31 +45,17 @@ public class MSISO2022JP extends ISO2022_JP
|
||||
(cs instanceof MSISO2022JP);
|
||||
}
|
||||
|
||||
protected short[] getDecIndex1() {
|
||||
return JIS_X_0208_MS932_Decoder.index1;
|
||||
public CharsetDecoder newDecoder() {
|
||||
return new Decoder(this, DEC0208, null);
|
||||
}
|
||||
|
||||
protected String[] getDecIndex2() {
|
||||
return JIS_X_0208_MS932_Decoder.index2;
|
||||
public CharsetEncoder newEncoder() {
|
||||
return new Encoder(this, ENC0208, null, true);
|
||||
}
|
||||
|
||||
protected DoubleByteDecoder get0212Decoder() {
|
||||
return null;
|
||||
}
|
||||
private final static DoubleByte.Decoder DEC0208 =
|
||||
(DoubleByte.Decoder)new JIS_X_0208_MS932().newDecoder();
|
||||
|
||||
protected short[] getEncIndex1() {
|
||||
return JIS_X_0208_MS932_Encoder.index1;
|
||||
}
|
||||
|
||||
protected String[] getEncIndex2() {
|
||||
return JIS_X_0208_MS932_Encoder.index2;
|
||||
}
|
||||
|
||||
protected DoubleByteEncoder get0212Encoder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected boolean doSBKANA() {
|
||||
return true;
|
||||
}
|
||||
private final static DoubleByte.Encoder ENC0208 =
|
||||
(DoubleByte.Encoder)new JIS_X_0208_MS932().newEncoder();
|
||||
}
|
||||
|
@ -576,7 +576,7 @@ public class GSSCredentialImpl implements GSSCredential {
|
||||
if (element == null)
|
||||
throw new GSSExceptionImpl(GSSException.NO_CRED,
|
||||
"No credential found for: " +
|
||||
mechOid + getElementStr(mechOid,
|
||||
getElementStr(mechOid,
|
||||
initiate? INITIATE_ONLY : ACCEPT_ONLY));
|
||||
return element;
|
||||
}
|
||||
|
@ -882,7 +882,7 @@ public class PKCS7 {
|
||||
PKCS7 tsToken = tsReply.getToken();
|
||||
|
||||
TimestampToken tst = tsReply.getTimestampToken();
|
||||
if (!tst.getHashAlgorithm().getName().equals("SHA")) {
|
||||
if (!tst.getHashAlgorithm().getName().equals("SHA-1")) {
|
||||
throw new IOException("Digest algorithm not SHA-1 in "
|
||||
+ "timestamp token");
|
||||
}
|
||||
|
@ -1298,11 +1298,9 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
|
||||
try {
|
||||
String algName =
|
||||
macData.getDigestAlgName().toUpperCase(Locale.ENGLISH);
|
||||
if (algName.equals("SHA") ||
|
||||
algName.equals("SHA1") ||
|
||||
algName.equals("SHA-1")) {
|
||||
algName = "SHA1";
|
||||
}
|
||||
|
||||
// Change SHA-1 to SHA1
|
||||
algName = algName.replace("-", "");
|
||||
|
||||
// generate MAC (MAC key is created within JCE)
|
||||
Mac m = Mac.getInstance("HmacPBE" + algName);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user