Merge
This commit is contained in:
commit
cdf205f4b8
2
.hgtags
2
.hgtags
@ -35,3 +35,5 @@ b44f05654c26fcd1f995e712992f9b07ffd7c0c6 jdk7-b57
|
||||
d60a9ce3c3eabf28f5d50ae839d18be04a551bc2 jdk7-b58
|
||||
c33e7d38c9210741dbc285507403a4b20bd802a0 jdk7-b59
|
||||
5a10e4d0b14d7beac53a7b2213ae6864afe1fd3e jdk7-b60
|
||||
dbb955b1ee59b876dd1f133952b557b48b1d7732 jdk7-b61
|
||||
6107cbff3130c747d243c25a7874cd59db5744a8 jdk7-b62
|
||||
|
@ -36,3 +36,4 @@ ffd09e767dfa6d21466183a400f72cf62d53297f jdk7-b57
|
||||
030142474602b4a067662fffc0c8e541de5a78df jdk7-b59
|
||||
39565502682c7085369bd09e51640919dc741097 jdk7-b60
|
||||
472c21584cfd7e9c0229ad6a100366a5c03d2976 jdk7-b61
|
||||
c7ed15ab92ce36a09d264a5e34025884b2d7607f jdk7-b62
|
||||
|
@ -72,6 +72,7 @@
|
||||
<li>Linux and Solaris:
|
||||
<ul>
|
||||
<li><a href="#cups">CUPS Include files</a> </li>
|
||||
<li><a href="#xrender">XRender Include files</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Linux only:
|
||||
@ -665,6 +666,9 @@
|
||||
<a href="#cups">CUPS Include files</a>, set
|
||||
<tt><a href="#ALT_CUPS_HEADERS_PATH">ALT_CUPS_HEADERS_PATH</a></tt>.
|
||||
</li>
|
||||
<li>
|
||||
Install the <a href="#xrender">XRender Include files</a>.
|
||||
</li>
|
||||
<li>
|
||||
Install the
|
||||
<a href="#jibx">JIBX Libraries</a>, set
|
||||
@ -1041,6 +1045,27 @@
|
||||
CUPS Header files.
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="xrender">XRender Extension Headers (Solaris & Linux)</a></h4>
|
||||
<blockquote>
|
||||
<p>
|
||||
<strong>Solaris:</strong>
|
||||
XRender header files are required for building the
|
||||
OpenJDK on Solaris.
|
||||
The XRender header file is included with the other X11 header files
|
||||
in the package <strong>SFWxwinc</strong> on new enough versions of
|
||||
Solaris and will be installed in
|
||||
<tt>/usr/X11/include/X11/extensions/Xrender.h</tt>
|
||||
</p><p>
|
||||
<strong>Linux:</strong>
|
||||
XRender header files are required for building the
|
||||
OpenJDK on Linux.
|
||||
The Linux header files are usually available from a "Xrender"
|
||||
development package, it's recommended that you try and use
|
||||
the package provided by the particular distribution of Linux that
|
||||
you are using.
|
||||
</p>
|
||||
</blockquote>
|
||||
<!-- ------------------------------------------------------ -->
|
||||
<h4><a name="freetype">FreeType 2</a></h4>
|
||||
<blockquote>
|
||||
Version 2.3 or newer of FreeType is required for building the OpenJDK.
|
||||
|
@ -35,3 +35,5 @@ bec82237d694f9802b820fa11bbb4f7fa9bf8e77 jdk7-b52
|
||||
2e3b8edab3ef55406494d3dd562e06882e6fc15e jdk7-b58
|
||||
7e6b2b55c00cc523b468272353ada3979adbbf16 jdk7-b59
|
||||
f1e1cccbd13aa96d2d8bd872782ff764010bc22c jdk7-b60
|
||||
e906b16a12a9a63b615898afa5d9673cbd1c5ab8 jdk7-b61
|
||||
65b66117dbd70a493e9644aeb4033cf95a4e3c99 jdk7-b62
|
||||
|
@ -106,7 +106,12 @@ endif
|
||||
|
||||
SOURCE_LEVEL = 5
|
||||
BOOTSTRAP_TARGET_LEVEL = 5
|
||||
TARGET_LEVEL = 6
|
||||
|
||||
ifdef TARGET_CLASS_VERSION
|
||||
TARGET_LEVEL = $(TARGET_CLASS_VERSION)
|
||||
else
|
||||
TARGET_LEVEL = 6
|
||||
endif
|
||||
|
||||
ifndef TARGET_JAVA
|
||||
TARGET_JAVA = java
|
||||
|
@ -35,3 +35,5 @@ f4cbf78110c726919f46b59a3b054c54c7e889b4 jdk7-b57
|
||||
53d9bf689e80fcc76b221bbe6c5d58e08b80cbc6 jdk7-b58
|
||||
c55be0c7bd32c016c52218eb4c8b5da8a75450b5 jdk7-b59
|
||||
a77eddcd510c3972717c025cfcef9a60bfa4ecac jdk7-b60
|
||||
27b728fd1281ab62e9d7e4424f8bbb6ca438d803 jdk7-b61
|
||||
a88386380bdaaa5ab4ffbedf22c57bac5dbec034 jdk7-b62
|
||||
|
@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2009
|
||||
|
||||
HS_MAJOR_VER=16
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=04
|
||||
HS_BUILD_NUMBER=05
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=7
|
||||
|
@ -1157,6 +1157,13 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
|
||||
} else {
|
||||
// We're done with marking.
|
||||
JavaThread::satb_mark_queue_set().set_active_all_threads(false);
|
||||
|
||||
if (VerifyDuringGC) {
|
||||
g1h->prepare_for_verify();
|
||||
g1h->verify(/* allow_dirty */ true,
|
||||
/* silent */ false,
|
||||
/* use_prev_marking */ false);
|
||||
}
|
||||
}
|
||||
|
||||
#if VERIFY_OBJS_PROCESSED
|
||||
@ -1747,12 +1754,12 @@ void ConcurrentMark::cleanup() {
|
||||
// races with it goes around and waits for completeCleanup to finish.
|
||||
g1h->increment_total_collections();
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (VerifyDuringGC) {
|
||||
G1CollectedHeap::heap()->prepare_for_verify();
|
||||
G1CollectedHeap::heap()->verify(true,false);
|
||||
g1h->prepare_for_verify();
|
||||
g1h->verify(/* allow_dirty */ true,
|
||||
/* silent */ false,
|
||||
/* use_prev_marking */ true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void ConcurrentMark::completeCleanup() {
|
||||
|
@ -1535,6 +1535,15 @@ jint G1CollectedHeap::initialize() {
|
||||
guarantee(_hrs != NULL, "Couldn't allocate HeapRegionSeq");
|
||||
guarantee(_cur_alloc_region == NULL, "from constructor");
|
||||
|
||||
// 6843694 - ensure that the maximum region index can fit
|
||||
// in the remembered set structures.
|
||||
const size_t max_region_idx = ((size_t)1 << (sizeof(RegionIdx_t)*BitsPerByte-1)) - 1;
|
||||
guarantee((max_regions() - 1) <= max_region_idx, "too many regions");
|
||||
|
||||
const size_t cards_per_region = HeapRegion::GrainBytes >> CardTableModRefBS::card_shift;
|
||||
size_t max_cards_per_region = ((size_t)1 << (sizeof(CardIdx_t)*BitsPerByte-1)) - 1;
|
||||
guarantee(cards_per_region < max_cards_per_region, "too many cards per region");
|
||||
|
||||
_bot_shared = new G1BlockOffsetSharedArray(_reserved,
|
||||
heap_word_size(init_byte_size));
|
||||
|
||||
@ -2127,17 +2136,22 @@ public:
|
||||
};
|
||||
|
||||
class VerifyObjsInRegionClosure: public ObjectClosure {
|
||||
private:
|
||||
G1CollectedHeap* _g1h;
|
||||
size_t _live_bytes;
|
||||
HeapRegion *_hr;
|
||||
bool _use_prev_marking;
|
||||
public:
|
||||
VerifyObjsInRegionClosure(HeapRegion *hr) : _live_bytes(0), _hr(hr) {
|
||||
// use_prev_marking == true -> use "prev" marking information,
|
||||
// use_prev_marking == false -> use "next" marking information
|
||||
VerifyObjsInRegionClosure(HeapRegion *hr, bool use_prev_marking)
|
||||
: _live_bytes(0), _hr(hr), _use_prev_marking(use_prev_marking) {
|
||||
_g1h = G1CollectedHeap::heap();
|
||||
}
|
||||
void do_object(oop o) {
|
||||
VerifyLivenessOopClosure isLive(_g1h);
|
||||
assert(o != NULL, "Huh?");
|
||||
if (!_g1h->is_obj_dead(o)) {
|
||||
if (!_g1h->is_obj_dead_cond(o, _use_prev_marking)) {
|
||||
o->oop_iterate(&isLive);
|
||||
if (!_hr->obj_allocated_since_prev_marking(o))
|
||||
_live_bytes += (o->size() * HeapWordSize);
|
||||
@ -2176,17 +2190,22 @@ public:
|
||||
};
|
||||
|
||||
class VerifyRegionClosure: public HeapRegionClosure {
|
||||
public:
|
||||
private:
|
||||
bool _allow_dirty;
|
||||
bool _par;
|
||||
VerifyRegionClosure(bool allow_dirty, bool par = false)
|
||||
: _allow_dirty(allow_dirty), _par(par) {}
|
||||
bool _use_prev_marking;
|
||||
public:
|
||||
// use_prev_marking == true -> use "prev" marking information,
|
||||
// use_prev_marking == false -> use "next" marking information
|
||||
VerifyRegionClosure(bool allow_dirty, bool par, bool use_prev_marking)
|
||||
: _allow_dirty(allow_dirty), _par(par),
|
||||
_use_prev_marking(use_prev_marking) {}
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
guarantee(_par || r->claim_value() == HeapRegion::InitialClaimValue,
|
||||
"Should be unclaimed at verify points.");
|
||||
if (!r->continuesHumongous()) {
|
||||
VerifyObjsInRegionClosure not_dead_yet_cl(r);
|
||||
r->verify(_allow_dirty);
|
||||
VerifyObjsInRegionClosure not_dead_yet_cl(r, _use_prev_marking);
|
||||
r->verify(_allow_dirty, _use_prev_marking);
|
||||
r->object_iterate(¬_dead_yet_cl);
|
||||
guarantee(r->max_live_bytes() >= not_dead_yet_cl.live_bytes(),
|
||||
"More live objects than counted in last complete marking.");
|
||||
@ -2199,10 +2218,13 @@ class VerifyRootsClosure: public OopsInGenClosure {
|
||||
private:
|
||||
G1CollectedHeap* _g1h;
|
||||
bool _failures;
|
||||
|
||||
bool _use_prev_marking;
|
||||
public:
|
||||
VerifyRootsClosure() :
|
||||
_g1h(G1CollectedHeap::heap()), _failures(false) { }
|
||||
// use_prev_marking == true -> use "prev" marking information,
|
||||
// use_prev_marking == false -> use "next" marking information
|
||||
VerifyRootsClosure(bool use_prev_marking) :
|
||||
_g1h(G1CollectedHeap::heap()), _failures(false),
|
||||
_use_prev_marking(use_prev_marking) { }
|
||||
|
||||
bool failures() { return _failures; }
|
||||
|
||||
@ -2213,7 +2235,7 @@ public:
|
||||
void do_oop(oop* p) {
|
||||
oop obj = *p;
|
||||
if (obj != NULL) {
|
||||
if (_g1h->is_obj_dead(obj)) {
|
||||
if (_g1h->is_obj_dead_cond(obj, _use_prev_marking)) {
|
||||
gclog_or_tty->print_cr("Root location "PTR_FORMAT" "
|
||||
"points to dead obj "PTR_FORMAT, p, (void*) obj);
|
||||
obj->print_on(gclog_or_tty);
|
||||
@ -2229,24 +2251,35 @@ class G1ParVerifyTask: public AbstractGangTask {
|
||||
private:
|
||||
G1CollectedHeap* _g1h;
|
||||
bool _allow_dirty;
|
||||
bool _use_prev_marking;
|
||||
|
||||
public:
|
||||
G1ParVerifyTask(G1CollectedHeap* g1h, bool allow_dirty) :
|
||||
// use_prev_marking == true -> use "prev" marking information,
|
||||
// use_prev_marking == false -> use "next" marking information
|
||||
G1ParVerifyTask(G1CollectedHeap* g1h, bool allow_dirty,
|
||||
bool use_prev_marking) :
|
||||
AbstractGangTask("Parallel verify task"),
|
||||
_g1h(g1h), _allow_dirty(allow_dirty) { }
|
||||
_g1h(g1h), _allow_dirty(allow_dirty),
|
||||
_use_prev_marking(use_prev_marking) { }
|
||||
|
||||
void work(int worker_i) {
|
||||
HandleMark hm;
|
||||
VerifyRegionClosure blk(_allow_dirty, true);
|
||||
VerifyRegionClosure blk(_allow_dirty, true, _use_prev_marking);
|
||||
_g1h->heap_region_par_iterate_chunked(&blk, worker_i,
|
||||
HeapRegion::ParVerifyClaimValue);
|
||||
}
|
||||
};
|
||||
|
||||
void G1CollectedHeap::verify(bool allow_dirty, bool silent) {
|
||||
verify(allow_dirty, silent, /* use_prev_marking */ true);
|
||||
}
|
||||
|
||||
void G1CollectedHeap::verify(bool allow_dirty,
|
||||
bool silent,
|
||||
bool use_prev_marking) {
|
||||
if (SafepointSynchronize::is_at_safepoint() || ! UseTLAB) {
|
||||
if (!silent) { gclog_or_tty->print("roots "); }
|
||||
VerifyRootsClosure rootsCl;
|
||||
VerifyRootsClosure rootsCl(use_prev_marking);
|
||||
process_strong_roots(false,
|
||||
SharedHeap::SO_AllClasses,
|
||||
&rootsCl,
|
||||
@ -2257,7 +2290,7 @@ void G1CollectedHeap::verify(bool allow_dirty, bool silent) {
|
||||
assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue),
|
||||
"sanity check");
|
||||
|
||||
G1ParVerifyTask task(this, allow_dirty);
|
||||
G1ParVerifyTask task(this, allow_dirty, use_prev_marking);
|
||||
int n_workers = workers()->total_workers();
|
||||
set_par_threads(n_workers);
|
||||
workers()->run_task(&task);
|
||||
@ -2271,7 +2304,7 @@ void G1CollectedHeap::verify(bool allow_dirty, bool silent) {
|
||||
assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue),
|
||||
"sanity check");
|
||||
} else {
|
||||
VerifyRegionClosure blk(allow_dirty);
|
||||
VerifyRegionClosure blk(allow_dirty, false, use_prev_marking);
|
||||
_hrs->iterate(&blk);
|
||||
}
|
||||
if (!silent) gclog_or_tty->print("remset ");
|
||||
|
@ -59,6 +59,9 @@ class ConcurrentZFThread;
|
||||
typedef GenericTaskQueue<oop*> RefToScanQueue;
|
||||
typedef GenericTaskQueueSet<oop*> RefToScanQueueSet;
|
||||
|
||||
typedef int RegionIdx_t; // needs to hold [ 0..max_regions() )
|
||||
typedef int CardIdx_t; // needs to hold [ 0..CardsPerRegion )
|
||||
|
||||
enum G1GCThreadGroups {
|
||||
G1CRGroup = 0,
|
||||
G1ZFGroup = 1,
|
||||
@ -1046,6 +1049,17 @@ public:
|
||||
virtual void prepare_for_verify();
|
||||
|
||||
// Perform verification.
|
||||
|
||||
// use_prev_marking == true -> use "prev" marking information,
|
||||
// use_prev_marking == false -> use "next" marking information
|
||||
// NOTE: Only the "prev" marking information is guaranteed to be
|
||||
// consistent most of the time, so most calls to this should use
|
||||
// use_prev_marking == true. Currently, there is only one case where
|
||||
// this is called with use_prev_marking == false, which is to verify
|
||||
// the "next" marking information at the end of remark.
|
||||
void verify(bool allow_dirty, bool silent, bool use_prev_marking);
|
||||
|
||||
// Override; it uses the "prev" marking information
|
||||
virtual void verify(bool allow_dirty, bool silent);
|
||||
virtual void print() const;
|
||||
virtual void print_on(outputStream* st) const;
|
||||
@ -1122,6 +1136,18 @@ public:
|
||||
bool isMarkedPrev(oop obj) const;
|
||||
bool isMarkedNext(oop obj) const;
|
||||
|
||||
// use_prev_marking == true -> use "prev" marking information,
|
||||
// use_prev_marking == false -> use "next" marking information
|
||||
bool is_obj_dead_cond(const oop obj,
|
||||
const HeapRegion* hr,
|
||||
const bool use_prev_marking) const {
|
||||
if (use_prev_marking) {
|
||||
return is_obj_dead(obj, hr);
|
||||
} else {
|
||||
return is_obj_ill(obj, hr);
|
||||
}
|
||||
}
|
||||
|
||||
// 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
|
||||
@ -1159,8 +1185,19 @@ public:
|
||||
// Added if it is in permanent gen it isn't dead.
|
||||
// Added if it is NULL it isn't dead.
|
||||
|
||||
bool is_obj_dead(oop obj) {
|
||||
HeapRegion* hr = heap_region_containing(obj);
|
||||
// use_prev_marking == true -> use "prev" marking information,
|
||||
// use_prev_marking == false -> use "next" marking information
|
||||
bool is_obj_dead_cond(const oop obj,
|
||||
const bool use_prev_marking) {
|
||||
if (use_prev_marking) {
|
||||
return is_obj_dead(obj);
|
||||
} else {
|
||||
return is_obj_ill(obj);
|
||||
}
|
||||
}
|
||||
|
||||
bool is_obj_dead(const oop obj) {
|
||||
const HeapRegion* hr = heap_region_containing(obj);
|
||||
if (hr == NULL) {
|
||||
if (Universe::heap()->is_in_permanent(obj))
|
||||
return false;
|
||||
@ -1170,8 +1207,8 @@ public:
|
||||
else return is_obj_dead(obj, hr);
|
||||
}
|
||||
|
||||
bool is_obj_ill(oop obj) {
|
||||
HeapRegion* hr = heap_region_containing(obj);
|
||||
bool is_obj_ill(const oop obj) {
|
||||
const HeapRegion* hr = heap_region_containing(obj);
|
||||
if (hr == NULL) {
|
||||
if (Universe::heap()->is_in_permanent(obj))
|
||||
return false;
|
||||
|
@ -40,15 +40,19 @@ FilterOutOfRegionClosure::FilterOutOfRegionClosure(HeapRegion* r,
|
||||
{}
|
||||
|
||||
class VerifyLiveClosure: public OopClosure {
|
||||
private:
|
||||
G1CollectedHeap* _g1h;
|
||||
CardTableModRefBS* _bs;
|
||||
oop _containing_obj;
|
||||
bool _failures;
|
||||
int _n_failures;
|
||||
bool _use_prev_marking;
|
||||
public:
|
||||
VerifyLiveClosure(G1CollectedHeap* g1h) :
|
||||
// use_prev_marking == true -> use "prev" marking information,
|
||||
// use_prev_marking == false -> use "next" marking information
|
||||
VerifyLiveClosure(G1CollectedHeap* g1h, bool use_prev_marking) :
|
||||
_g1h(g1h), _bs(NULL), _containing_obj(NULL),
|
||||
_failures(false), _n_failures(0)
|
||||
_failures(false), _n_failures(0), _use_prev_marking(use_prev_marking)
|
||||
{
|
||||
BarrierSet* bs = _g1h->barrier_set();
|
||||
if (bs->is_a(BarrierSet::CardTableModRef))
|
||||
@ -68,11 +72,13 @@ public:
|
||||
|
||||
void do_oop(oop* p) {
|
||||
assert(_containing_obj != NULL, "Precondition");
|
||||
assert(!_g1h->is_obj_dead(_containing_obj), "Precondition");
|
||||
assert(!_g1h->is_obj_dead_cond(_containing_obj, _use_prev_marking),
|
||||
"Precondition");
|
||||
oop obj = *p;
|
||||
if (obj != NULL) {
|
||||
bool failed = false;
|
||||
if (!_g1h->is_in_closed_subset(obj) || _g1h->is_obj_dead(obj)) {
|
||||
if (!_g1h->is_in_closed_subset(obj) ||
|
||||
_g1h->is_obj_dead_cond(obj, _use_prev_marking)) {
|
||||
if (!_failures) {
|
||||
gclog_or_tty->print_cr("");
|
||||
gclog_or_tty->print_cr("----------");
|
||||
@ -647,19 +653,23 @@ void HeapRegion::print_on(outputStream* st) const {
|
||||
G1OffsetTableContigSpace::print_on(st);
|
||||
}
|
||||
|
||||
void HeapRegion::verify(bool allow_dirty) const {
|
||||
verify(allow_dirty, /* use_prev_marking */ true);
|
||||
}
|
||||
|
||||
#define OBJ_SAMPLE_INTERVAL 0
|
||||
#define BLOCK_SAMPLE_INTERVAL 100
|
||||
|
||||
// This really ought to be commoned up into OffsetTableContigSpace somehow.
|
||||
// We would need a mechanism to make that code skip dead objects.
|
||||
|
||||
void HeapRegion::verify(bool allow_dirty) const {
|
||||
void HeapRegion::verify(bool allow_dirty, bool use_prev_marking) const {
|
||||
G1CollectedHeap* g1 = G1CollectedHeap::heap();
|
||||
HeapWord* p = bottom();
|
||||
HeapWord* prev_p = NULL;
|
||||
int objs = 0;
|
||||
int blocks = 0;
|
||||
VerifyLiveClosure vl_cl(g1);
|
||||
VerifyLiveClosure vl_cl(g1, use_prev_marking);
|
||||
while (p < top()) {
|
||||
size_t size = oop(p)->size();
|
||||
if (blocks == BLOCK_SAMPLE_INTERVAL) {
|
||||
@ -671,7 +681,7 @@ void HeapRegion::verify(bool allow_dirty) const {
|
||||
}
|
||||
if (objs == OBJ_SAMPLE_INTERVAL) {
|
||||
oop obj = oop(p);
|
||||
if (!g1->is_obj_dead(obj, this)) {
|
||||
if (!g1->is_obj_dead_cond(obj, this, use_prev_marking)) {
|
||||
obj->verify();
|
||||
vl_cl.set_containing_obj(obj);
|
||||
obj->oop_iterate(&vl_cl);
|
||||
|
@ -782,7 +782,16 @@ class HeapRegion: public G1OffsetTableContigSpace {
|
||||
void print() const;
|
||||
void print_on(outputStream* st) const;
|
||||
|
||||
// Override
|
||||
// use_prev_marking == true -> use "prev" marking information,
|
||||
// use_prev_marking == false -> use "next" marking information
|
||||
// NOTE: Only the "prev" marking information is guaranteed to be
|
||||
// consistent most of the time, so most calls to this should use
|
||||
// use_prev_marking == true. Currently, there is only one case where
|
||||
// this is called with use_prev_marking == false, which is to verify
|
||||
// the "next" marking information at the end of remark.
|
||||
void verify(bool allow_dirty, bool use_prev_marking) const;
|
||||
|
||||
// Override; it uses the "prev" marking information
|
||||
virtual void verify(bool allow_dirty) const;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
@ -109,7 +109,7 @@ protected:
|
||||
return new PerRegionTable(hr);
|
||||
}
|
||||
|
||||
void add_card_work(short from_card, bool par) {
|
||||
void add_card_work(CardIdx_t from_card, bool par) {
|
||||
if (!_bm.at(from_card)) {
|
||||
if (par) {
|
||||
if (_bm.par_at_put(from_card, 1)) {
|
||||
@ -141,11 +141,11 @@ protected:
|
||||
// and adding a bit to the new table is never incorrect.
|
||||
if (loc_hr->is_in_reserved(from)) {
|
||||
size_t hw_offset = pointer_delta((HeapWord*)from, loc_hr->bottom());
|
||||
size_t from_card =
|
||||
hw_offset >>
|
||||
(CardTableModRefBS::card_shift - LogHeapWordSize);
|
||||
CardIdx_t from_card = (CardIdx_t)
|
||||
hw_offset >> (CardTableModRefBS::card_shift - LogHeapWordSize);
|
||||
|
||||
add_card_work((short) from_card, par);
|
||||
assert(0 <= from_card && from_card < CardsPerRegion, "Must be in range.");
|
||||
add_card_work(from_card, par);
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,11 +190,11 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
void add_card(short from_card_index) {
|
||||
void add_card(CardIdx_t from_card_index) {
|
||||
add_card_work(from_card_index, /*parallel*/ true);
|
||||
}
|
||||
|
||||
void seq_add_card(short from_card_index) {
|
||||
void seq_add_card(CardIdx_t from_card_index) {
|
||||
add_card_work(from_card_index, /*parallel*/ false);
|
||||
}
|
||||
|
||||
@ -604,7 +604,7 @@ void OtherRegionsTable::add_reference(oop* from, int tid) {
|
||||
|
||||
// Note that this may be a continued H region.
|
||||
HeapRegion* from_hr = _g1h->heap_region_containing_raw(from);
|
||||
size_t from_hrs_ind = (size_t)from_hr->hrs_index();
|
||||
RegionIdx_t from_hrs_ind = (RegionIdx_t) from_hr->hrs_index();
|
||||
|
||||
// If the region is already coarsened, return.
|
||||
if (_coarse_map.at(from_hrs_ind)) {
|
||||
@ -627,11 +627,11 @@ void OtherRegionsTable::add_reference(oop* from, int tid) {
|
||||
uintptr_t from_hr_bot_card_index =
|
||||
uintptr_t(from_hr->bottom())
|
||||
>> CardTableModRefBS::card_shift;
|
||||
int card_index = from_card - from_hr_bot_card_index;
|
||||
CardIdx_t card_index = from_card - from_hr_bot_card_index;
|
||||
assert(0 <= card_index && card_index < PosParPRT::CardsPerRegion,
|
||||
"Must be in range.");
|
||||
if (G1HRRSUseSparseTable &&
|
||||
_sparse_table.add_card((short) from_hrs_ind, card_index)) {
|
||||
_sparse_table.add_card(from_hrs_ind, card_index)) {
|
||||
if (G1RecordHRRSOops) {
|
||||
HeapRegionRemSet::record(hr(), from);
|
||||
#if HRRS_VERBOSE
|
||||
@ -656,9 +656,9 @@ void OtherRegionsTable::add_reference(oop* from, int tid) {
|
||||
}
|
||||
|
||||
// Otherwise, transfer from sparse to fine-grain.
|
||||
short cards[SparsePRTEntry::CardsPerEntry];
|
||||
CardIdx_t cards[SparsePRTEntry::CardsPerEntry];
|
||||
if (G1HRRSUseSparseTable) {
|
||||
bool res = _sparse_table.get_cards((short) from_hrs_ind, &cards[0]);
|
||||
bool res = _sparse_table.get_cards(from_hrs_ind, &cards[0]);
|
||||
assert(res, "There should have been an entry");
|
||||
}
|
||||
|
||||
@ -679,13 +679,13 @@ void OtherRegionsTable::add_reference(oop* from, int tid) {
|
||||
// Add in the cards from the sparse table.
|
||||
if (G1HRRSUseSparseTable) {
|
||||
for (int i = 0; i < SparsePRTEntry::CardsPerEntry; i++) {
|
||||
short c = cards[i];
|
||||
CardIdx_t c = cards[i];
|
||||
if (c != SparsePRTEntry::NullEntry) {
|
||||
prt->add_card(c);
|
||||
}
|
||||
}
|
||||
// Now we can delete the sparse entry.
|
||||
bool res = _sparse_table.delete_entry((short) from_hrs_ind);
|
||||
bool res = _sparse_table.delete_entry(from_hrs_ind);
|
||||
assert(res, "It should have been there.");
|
||||
}
|
||||
}
|
||||
@ -1030,7 +1030,7 @@ bool OtherRegionsTable::contains_reference(oop* from) const {
|
||||
bool OtherRegionsTable::contains_reference_locked(oop* from) const {
|
||||
HeapRegion* hr = _g1h->heap_region_containing_raw(from);
|
||||
if (hr == NULL) return false;
|
||||
size_t hr_ind = hr->hrs_index();
|
||||
RegionIdx_t hr_ind = (RegionIdx_t) hr->hrs_index();
|
||||
// Is this region in the coarse map?
|
||||
if (_coarse_map.at(hr_ind)) return true;
|
||||
|
||||
@ -1045,8 +1045,9 @@ bool OtherRegionsTable::contains_reference_locked(oop* from) const {
|
||||
uintptr_t hr_bot_card_index =
|
||||
uintptr_t(hr->bottom()) >> CardTableModRefBS::card_shift;
|
||||
assert(from_card >= hr_bot_card_index, "Inv");
|
||||
int card_index = from_card - hr_bot_card_index;
|
||||
return _sparse_table.contains_card((short)hr_ind, card_index);
|
||||
CardIdx_t card_index = from_card - hr_bot_card_index;
|
||||
assert(0 <= card_index && card_index < PosParPRT::CardsPerRegion, "Must be in range.");
|
||||
return _sparse_table.contains_card(hr_ind, card_index);
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ void SparsePRT::init_iterator(SparsePRTIter* sprt_iter) {
|
||||
sprt_iter->init(this);
|
||||
}
|
||||
|
||||
void SparsePRTEntry::init(short region_ind) {
|
||||
void SparsePRTEntry::init(RegionIdx_t region_ind) {
|
||||
_region_ind = region_ind;
|
||||
_next_index = NullEntry;
|
||||
#if UNROLL_CARD_LOOPS
|
||||
@ -43,11 +43,12 @@ void SparsePRTEntry::init(short region_ind) {
|
||||
_cards[2] = NullEntry;
|
||||
_cards[3] = NullEntry;
|
||||
#else
|
||||
for (int i = 0; i < CardsPerEntry; i++) _cards[i] = NullEntry;
|
||||
for (int i = 0; i < CardsPerEntry; i++)
|
||||
_cards[i] = NullEntry;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool SparsePRTEntry::contains_card(short card_index) const {
|
||||
bool SparsePRTEntry::contains_card(CardIdx_t card_index) const {
|
||||
#if UNROLL_CARD_LOOPS
|
||||
assert(CardsPerEntry == 4, "Assumption. If changes, un-unroll.");
|
||||
if (_cards[0] == card_index) return true;
|
||||
@ -80,10 +81,10 @@ int SparsePRTEntry::num_valid_cards() const {
|
||||
return sum;
|
||||
}
|
||||
|
||||
SparsePRTEntry::AddCardResult SparsePRTEntry::add_card(short card_index) {
|
||||
SparsePRTEntry::AddCardResult SparsePRTEntry::add_card(CardIdx_t card_index) {
|
||||
#if UNROLL_CARD_LOOPS
|
||||
assert(CardsPerEntry == 4, "Assumption. If changes, un-unroll.");
|
||||
short c = _cards[0];
|
||||
CardIdx_t c = _cards[0];
|
||||
if (c == card_index) return found;
|
||||
if (c == NullEntry) { _cards[0] = card_index; return added; }
|
||||
c = _cards[1];
|
||||
@ -97,16 +98,19 @@ SparsePRTEntry::AddCardResult SparsePRTEntry::add_card(short card_index) {
|
||||
if (c == NullEntry) { _cards[3] = card_index; return added; }
|
||||
#else
|
||||
for (int i = 0; i < CardsPerEntry; i++) {
|
||||
short c = _cards[i];
|
||||
CardIdx_t c = _cards[i];
|
||||
if (c == card_index) return found;
|
||||
if (c == NullEntry) { _cards[i] = card_index; return added; }
|
||||
if (c == NullEntry) {
|
||||
_cards[i] = card_index;
|
||||
return added;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Otherwise, we're full.
|
||||
return overflow;
|
||||
}
|
||||
|
||||
void SparsePRTEntry::copy_cards(short* cards) const {
|
||||
void SparsePRTEntry::copy_cards(CardIdx_t* cards) const {
|
||||
#if UNROLL_CARD_LOOPS
|
||||
assert(CardsPerEntry == 4, "Assumption. If changes, un-unroll.");
|
||||
cards[0] = _cards[0];
|
||||
@ -130,7 +134,7 @@ RSHashTable::RSHashTable(size_t capacity) :
|
||||
_capacity(capacity), _capacity_mask(capacity-1),
|
||||
_occupied_entries(0), _occupied_cards(0),
|
||||
_entries(NEW_C_HEAP_ARRAY(SparsePRTEntry, capacity)),
|
||||
_buckets(NEW_C_HEAP_ARRAY(short, capacity)),
|
||||
_buckets(NEW_C_HEAP_ARRAY(int, capacity)),
|
||||
_next_deleted(NULL), _deleted(false),
|
||||
_free_list(NullEntry), _free_region(0)
|
||||
{
|
||||
@ -143,7 +147,7 @@ RSHashTable::~RSHashTable() {
|
||||
_entries = NULL;
|
||||
}
|
||||
if (_buckets != NULL) {
|
||||
FREE_C_HEAP_ARRAY(short, _buckets);
|
||||
FREE_C_HEAP_ARRAY(int, _buckets);
|
||||
_buckets = NULL;
|
||||
}
|
||||
}
|
||||
@ -153,14 +157,18 @@ void RSHashTable::clear() {
|
||||
_occupied_cards = 0;
|
||||
guarantee(_entries != NULL, "INV");
|
||||
guarantee(_buckets != NULL, "INV");
|
||||
|
||||
guarantee(_capacity <= ((size_t)1 << (sizeof(int)*BitsPerByte-1)) - 1,
|
||||
"_capacity too large");
|
||||
|
||||
// This will put -1 == NullEntry in the key field of all entries.
|
||||
memset(_entries, -1, _capacity * sizeof(SparsePRTEntry));
|
||||
memset(_buckets, -1, _capacity * sizeof(short));
|
||||
memset(_buckets, -1, _capacity * sizeof(int));
|
||||
_free_list = NullEntry;
|
||||
_free_region = 0;
|
||||
}
|
||||
|
||||
bool RSHashTable::add_card(short region_ind, short card_index) {
|
||||
bool RSHashTable::add_card(RegionIdx_t region_ind, CardIdx_t card_index) {
|
||||
SparsePRTEntry* e = entry_for_region_ind_create(region_ind);
|
||||
assert(e != NULL && e->r_ind() == region_ind,
|
||||
"Postcondition of call above.");
|
||||
@ -175,9 +183,9 @@ bool RSHashTable::add_card(short region_ind, short card_index) {
|
||||
return res != SparsePRTEntry::overflow;
|
||||
}
|
||||
|
||||
bool RSHashTable::get_cards(short region_ind, short* cards) {
|
||||
short ind = (short) (region_ind & capacity_mask());
|
||||
short cur_ind = _buckets[ind];
|
||||
bool RSHashTable::get_cards(RegionIdx_t region_ind, CardIdx_t* cards) {
|
||||
int ind = (int) (region_ind & capacity_mask());
|
||||
int cur_ind = _buckets[ind];
|
||||
SparsePRTEntry* cur;
|
||||
while (cur_ind != NullEntry &&
|
||||
(cur = entry(cur_ind))->r_ind() != region_ind) {
|
||||
@ -192,10 +200,10 @@ bool RSHashTable::get_cards(short region_ind, short* cards) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RSHashTable::delete_entry(short region_ind) {
|
||||
short ind = (short) (region_ind & capacity_mask());
|
||||
short* prev_loc = &_buckets[ind];
|
||||
short cur_ind = *prev_loc;
|
||||
bool RSHashTable::delete_entry(RegionIdx_t region_ind) {
|
||||
int ind = (int) (region_ind & capacity_mask());
|
||||
int* prev_loc = &_buckets[ind];
|
||||
int cur_ind = *prev_loc;
|
||||
SparsePRTEntry* cur;
|
||||
while (cur_ind != NullEntry &&
|
||||
(cur = entry(cur_ind))->r_ind() != region_ind) {
|
||||
@ -212,10 +220,11 @@ bool RSHashTable::delete_entry(short region_ind) {
|
||||
return true;
|
||||
}
|
||||
|
||||
SparsePRTEntry* RSHashTable::entry_for_region_ind(short region_ind) const {
|
||||
SparsePRTEntry*
|
||||
RSHashTable::entry_for_region_ind(RegionIdx_t region_ind) const {
|
||||
assert(occupied_entries() < capacity(), "Precondition");
|
||||
short ind = (short) (region_ind & capacity_mask());
|
||||
short cur_ind = _buckets[ind];
|
||||
int ind = (int) (region_ind & capacity_mask());
|
||||
int cur_ind = _buckets[ind];
|
||||
SparsePRTEntry* cur;
|
||||
// XXX
|
||||
// int k = 0;
|
||||
@ -242,15 +251,16 @@ SparsePRTEntry* RSHashTable::entry_for_region_ind(short region_ind) const {
|
||||
}
|
||||
}
|
||||
|
||||
SparsePRTEntry* RSHashTable::entry_for_region_ind_create(short region_ind) {
|
||||
SparsePRTEntry*
|
||||
RSHashTable::entry_for_region_ind_create(RegionIdx_t region_ind) {
|
||||
SparsePRTEntry* res = entry_for_region_ind(region_ind);
|
||||
if (res == NULL) {
|
||||
short new_ind = alloc_entry();
|
||||
int new_ind = alloc_entry();
|
||||
assert(0 <= new_ind && (size_t)new_ind < capacity(), "There should be room.");
|
||||
res = entry(new_ind);
|
||||
res->init(region_ind);
|
||||
// Insert at front.
|
||||
short ind = (short) (region_ind & capacity_mask());
|
||||
int ind = (int) (region_ind & capacity_mask());
|
||||
res->set_next_index(_buckets[ind]);
|
||||
_buckets[ind] = new_ind;
|
||||
_occupied_entries++;
|
||||
@ -258,8 +268,8 @@ SparsePRTEntry* RSHashTable::entry_for_region_ind_create(short region_ind) {
|
||||
return res;
|
||||
}
|
||||
|
||||
short RSHashTable::alloc_entry() {
|
||||
short res;
|
||||
int RSHashTable::alloc_entry() {
|
||||
int res;
|
||||
if (_free_list != NullEntry) {
|
||||
res = _free_list;
|
||||
_free_list = entry(res)->next_index();
|
||||
@ -273,13 +283,11 @@ short RSHashTable::alloc_entry() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RSHashTable::free_entry(short fi) {
|
||||
void RSHashTable::free_entry(int fi) {
|
||||
entry(fi)->set_next_index(_free_list);
|
||||
_free_list = fi;
|
||||
}
|
||||
|
||||
|
||||
void RSHashTable::add_entry(SparsePRTEntry* e) {
|
||||
assert(e->num_valid_cards() > 0, "Precondition.");
|
||||
SparsePRTEntry* e2 = entry_for_region_ind_create(e->r_ind());
|
||||
@ -322,8 +330,8 @@ RSHashTable* RSHashTable::get_from_deleted_list() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
short /* RSHashTable:: */ RSHashTableIter::find_first_card_in_list() {
|
||||
short res;
|
||||
CardIdx_t /* RSHashTable:: */ RSHashTableIter::find_first_card_in_list() {
|
||||
CardIdx_t res;
|
||||
while (_bl_ind != RSHashTable::NullEntry) {
|
||||
res = _rsht->entry(_bl_ind)->card(0);
|
||||
if (res != SparsePRTEntry::NullEntry) {
|
||||
@ -336,7 +344,7 @@ short /* RSHashTable:: */ RSHashTableIter::find_first_card_in_list() {
|
||||
return SparsePRTEntry::NullEntry;
|
||||
}
|
||||
|
||||
size_t /* RSHashTable:: */ RSHashTableIter::compute_card_ind(short ci) {
|
||||
size_t /* RSHashTable:: */ RSHashTableIter::compute_card_ind(CardIdx_t ci) {
|
||||
return
|
||||
_heap_bot_card_ind
|
||||
+ (_rsht->entry(_bl_ind)->r_ind() * CardsPerRegion)
|
||||
@ -345,7 +353,7 @@ size_t /* RSHashTable:: */ RSHashTableIter::compute_card_ind(short ci) {
|
||||
|
||||
bool /* RSHashTable:: */ RSHashTableIter::has_next(size_t& card_index) {
|
||||
_card_ind++;
|
||||
short ci;
|
||||
CardIdx_t ci;
|
||||
if (_card_ind < SparsePRTEntry::CardsPerEntry &&
|
||||
((ci = _rsht->entry(_bl_ind)->card(_card_ind)) !=
|
||||
SparsePRTEntry::NullEntry)) {
|
||||
@ -379,16 +387,16 @@ bool /* RSHashTable:: */ RSHashTableIter::has_next(size_t& card_index) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RSHashTable::contains_card(short region_index, short card_index) const {
|
||||
bool RSHashTable::contains_card(RegionIdx_t region_index, CardIdx_t card_index) const {
|
||||
SparsePRTEntry* e = entry_for_region_ind(region_index);
|
||||
return (e != NULL && e->contains_card(card_index));
|
||||
}
|
||||
|
||||
size_t RSHashTable::mem_size() const {
|
||||
return sizeof(this) + capacity() * (sizeof(SparsePRTEntry) + sizeof(short));
|
||||
return sizeof(this) +
|
||||
capacity() * (sizeof(SparsePRTEntry) + sizeof(int));
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
SparsePRT* SparsePRT::_head_expanded_list = NULL;
|
||||
@ -408,6 +416,7 @@ void SparsePRT::add_to_expanded_list(SparsePRT* sprt) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SparsePRT* SparsePRT::get_from_expanded_list() {
|
||||
SparsePRT* hd = _head_expanded_list;
|
||||
while (hd != NULL) {
|
||||
@ -452,6 +461,7 @@ SparsePRT::SparsePRT(HeapRegion* hr) :
|
||||
_next = _cur;
|
||||
}
|
||||
|
||||
|
||||
SparsePRT::~SparsePRT() {
|
||||
assert(_next != NULL && _cur != NULL, "Inv");
|
||||
if (_cur != _next) { delete _cur; }
|
||||
@ -465,7 +475,7 @@ size_t SparsePRT::mem_size() const {
|
||||
return sizeof(this) + _next->mem_size();
|
||||
}
|
||||
|
||||
bool SparsePRT::add_card(short region_id, short card_index) {
|
||||
bool SparsePRT::add_card(RegionIdx_t region_id, CardIdx_t card_index) {
|
||||
#if SPARSE_PRT_VERBOSE
|
||||
gclog_or_tty->print_cr(" Adding card %d from region %d to region %d sparse.",
|
||||
card_index, region_id, _hr->hrs_index());
|
||||
@ -476,11 +486,11 @@ bool SparsePRT::add_card(short region_id, short card_index) {
|
||||
return _next->add_card(region_id, card_index);
|
||||
}
|
||||
|
||||
bool SparsePRT::get_cards(short region_id, short* cards) {
|
||||
bool SparsePRT::get_cards(RegionIdx_t region_id, CardIdx_t* cards) {
|
||||
return _next->get_cards(region_id, cards);
|
||||
}
|
||||
|
||||
bool SparsePRT::delete_entry(short region_id) {
|
||||
bool SparsePRT::delete_entry(RegionIdx_t region_id) {
|
||||
return _next->delete_entry(region_id);
|
||||
}
|
||||
|
||||
|
@ -35,32 +35,32 @@
|
||||
|
||||
class SparsePRTEntry: public CHeapObj {
|
||||
public:
|
||||
|
||||
enum SomePublicConstants {
|
||||
CardsPerEntry = (short)4,
|
||||
NullEntry = (short)-1,
|
||||
DeletedEntry = (short)-2
|
||||
CardsPerEntry = 4,
|
||||
NullEntry = -1
|
||||
};
|
||||
|
||||
private:
|
||||
short _region_ind;
|
||||
short _next_index;
|
||||
short _cards[CardsPerEntry];
|
||||
RegionIdx_t _region_ind;
|
||||
int _next_index;
|
||||
CardIdx_t _cards[CardsPerEntry];
|
||||
|
||||
public:
|
||||
|
||||
// Set the region_ind to the given value, and delete all cards.
|
||||
inline void init(short region_ind);
|
||||
inline void init(RegionIdx_t region_ind);
|
||||
|
||||
short r_ind() const { return _region_ind; }
|
||||
RegionIdx_t r_ind() const { return _region_ind; }
|
||||
bool valid_entry() const { return r_ind() >= 0; }
|
||||
void set_r_ind(short rind) { _region_ind = rind; }
|
||||
void set_r_ind(RegionIdx_t rind) { _region_ind = rind; }
|
||||
|
||||
short next_index() const { return _next_index; }
|
||||
short* next_index_addr() { return &_next_index; }
|
||||
void set_next_index(short ni) { _next_index = ni; }
|
||||
int next_index() const { return _next_index; }
|
||||
int* next_index_addr() { return &_next_index; }
|
||||
void set_next_index(int ni) { _next_index = ni; }
|
||||
|
||||
// Returns "true" iff the entry contains the given card index.
|
||||
inline bool contains_card(short card_index) const;
|
||||
inline bool contains_card(CardIdx_t card_index) const;
|
||||
|
||||
// Returns the number of non-NULL card entries.
|
||||
inline int num_valid_cards() const;
|
||||
@ -73,14 +73,14 @@ public:
|
||||
found,
|
||||
added
|
||||
};
|
||||
inline AddCardResult add_card(short card_index);
|
||||
inline AddCardResult add_card(CardIdx_t card_index);
|
||||
|
||||
// Copy the current entry's cards into "cards".
|
||||
inline void copy_cards(short* cards) const;
|
||||
inline void copy_cards(CardIdx_t* cards) const;
|
||||
// Copy the current entry's cards into the "_card" array of "e."
|
||||
inline void copy_cards(SparsePRTEntry* e) const;
|
||||
|
||||
inline short card(int i) const { return _cards[i]; }
|
||||
inline CardIdx_t card(int i) const { return _cards[i]; }
|
||||
};
|
||||
|
||||
|
||||
@ -98,9 +98,9 @@ class RSHashTable : public CHeapObj {
|
||||
size_t _occupied_cards;
|
||||
|
||||
SparsePRTEntry* _entries;
|
||||
short* _buckets;
|
||||
short _free_region;
|
||||
short _free_list;
|
||||
int* _buckets;
|
||||
int _free_region;
|
||||
int _free_list;
|
||||
|
||||
static RSHashTable* _head_deleted_list;
|
||||
RSHashTable* _next_deleted;
|
||||
@ -113,20 +113,20 @@ class RSHashTable : public CHeapObj {
|
||||
// operations, and that the the table be less than completely full. If
|
||||
// an entry for "region_ind" is already in the table, finds it and
|
||||
// returns its address; otherwise returns "NULL."
|
||||
SparsePRTEntry* entry_for_region_ind(short region_ind) const;
|
||||
SparsePRTEntry* entry_for_region_ind(RegionIdx_t region_ind) const;
|
||||
|
||||
// Requires that the caller hold a lock preventing parallel modifying
|
||||
// operations, and that the the table be less than completely full. If
|
||||
// an entry for "region_ind" is already in the table, finds it and
|
||||
// returns its address; otherwise allocates, initializes, inserts and
|
||||
// returns a new entry for "region_ind".
|
||||
SparsePRTEntry* entry_for_region_ind_create(short region_ind);
|
||||
SparsePRTEntry* entry_for_region_ind_create(RegionIdx_t region_ind);
|
||||
|
||||
// Returns the index of the next free entry in "_entries".
|
||||
short alloc_entry();
|
||||
int alloc_entry();
|
||||
// Declares the entry "fi" to be free. (It must have already been
|
||||
// deleted from any bucket lists.
|
||||
void free_entry(short fi);
|
||||
void free_entry(int fi);
|
||||
|
||||
public:
|
||||
RSHashTable(size_t capacity);
|
||||
@ -138,12 +138,12 @@ public:
|
||||
// Otherwise, returns "false" to indicate that the addition would
|
||||
// overflow the entry for the region. The caller must transfer these
|
||||
// entries to a larger-capacity representation.
|
||||
bool add_card(short region_id, short card_index);
|
||||
bool add_card(RegionIdx_t region_id, CardIdx_t card_index);
|
||||
|
||||
bool get_cards(short region_id, short* cards);
|
||||
bool delete_entry(short region_id);
|
||||
bool get_cards(RegionIdx_t region_id, CardIdx_t* cards);
|
||||
bool delete_entry(RegionIdx_t region_id);
|
||||
|
||||
bool contains_card(short region_id, short card_index) const;
|
||||
bool contains_card(RegionIdx_t region_id, CardIdx_t card_index) const;
|
||||
|
||||
void add_entry(SparsePRTEntry* e);
|
||||
|
||||
@ -162,52 +162,50 @@ public:
|
||||
|
||||
static void add_to_deleted_list(RSHashTable* rsht);
|
||||
static RSHashTable* get_from_deleted_list();
|
||||
|
||||
|
||||
};
|
||||
|
||||
// ValueObj because will be embedded in HRRS iterator.
|
||||
// ValueObj because will be embedded in HRRS iterator.
|
||||
class RSHashTableIter VALUE_OBJ_CLASS_SPEC {
|
||||
short _tbl_ind;
|
||||
short _bl_ind;
|
||||
short _card_ind;
|
||||
RSHashTable* _rsht;
|
||||
size_t _heap_bot_card_ind;
|
||||
|
||||
enum SomePrivateConstants {
|
||||
CardsPerRegion = HeapRegion::GrainBytes >> CardTableModRefBS::card_shift
|
||||
};
|
||||
|
||||
// If the bucket list pointed to by _bl_ind contains a card, sets
|
||||
// _bl_ind to the index of that entry, and returns the card.
|
||||
// Otherwise, returns SparseEntry::NullEnty.
|
||||
short find_first_card_in_list();
|
||||
// Computes the proper card index for the card whose offset in the
|
||||
// current region (as indicated by _bl_ind) is "ci".
|
||||
// This is subject to errors when there is iteration concurrent with
|
||||
// modification, but these errors should be benign.
|
||||
size_t compute_card_ind(short ci);
|
||||
|
||||
public:
|
||||
RSHashTableIter(size_t heap_bot_card_ind) :
|
||||
_tbl_ind(RSHashTable::NullEntry),
|
||||
_bl_ind(RSHashTable::NullEntry),
|
||||
_card_ind((SparsePRTEntry::CardsPerEntry-1)),
|
||||
_rsht(NULL),
|
||||
_heap_bot_card_ind(heap_bot_card_ind)
|
||||
{}
|
||||
|
||||
void init(RSHashTable* rsht) {
|
||||
_rsht = rsht;
|
||||
_tbl_ind = -1; // So that first increment gets to 0.
|
||||
_bl_ind = RSHashTable::NullEntry;
|
||||
_card_ind = (SparsePRTEntry::CardsPerEntry-1);
|
||||
}
|
||||
|
||||
bool has_next(size_t& card_index);
|
||||
int _tbl_ind; // [-1, 0.._rsht->_capacity)
|
||||
int _bl_ind; // [-1, 0.._rsht->_capacity)
|
||||
short _card_ind; // [0..CardsPerEntry)
|
||||
RSHashTable* _rsht;
|
||||
size_t _heap_bot_card_ind;
|
||||
|
||||
enum SomePrivateConstants {
|
||||
CardsPerRegion = HeapRegion::GrainBytes >> CardTableModRefBS::card_shift
|
||||
};
|
||||
|
||||
// If the bucket list pointed to by _bl_ind contains a card, sets
|
||||
// _bl_ind to the index of that entry, and returns the card.
|
||||
// Otherwise, returns SparseEntry::NullEntry.
|
||||
CardIdx_t find_first_card_in_list();
|
||||
|
||||
// Computes the proper card index for the card whose offset in the
|
||||
// current region (as indicated by _bl_ind) is "ci".
|
||||
// This is subject to errors when there is iteration concurrent with
|
||||
// modification, but these errors should be benign.
|
||||
size_t compute_card_ind(CardIdx_t ci);
|
||||
|
||||
public:
|
||||
RSHashTableIter(size_t heap_bot_card_ind) :
|
||||
_tbl_ind(RSHashTable::NullEntry),
|
||||
_bl_ind(RSHashTable::NullEntry),
|
||||
_card_ind((SparsePRTEntry::CardsPerEntry-1)),
|
||||
_rsht(NULL),
|
||||
_heap_bot_card_ind(heap_bot_card_ind)
|
||||
{}
|
||||
|
||||
void init(RSHashTable* rsht) {
|
||||
_rsht = rsht;
|
||||
_tbl_ind = -1; // So that first increment gets to 0.
|
||||
_bl_ind = RSHashTable::NullEntry;
|
||||
_card_ind = (SparsePRTEntry::CardsPerEntry-1);
|
||||
}
|
||||
|
||||
bool has_next(size_t& card_index);
|
||||
};
|
||||
|
||||
// Concurrent accesss to a SparsePRT must be serialized by some external
|
||||
// mutex.
|
||||
|
||||
@ -238,7 +236,6 @@ class SparsePRT VALUE_OBJ_CLASS_SPEC {
|
||||
SparsePRT* next_expanded() { return _next_expanded; }
|
||||
void set_next_expanded(SparsePRT* nxt) { _next_expanded = nxt; }
|
||||
|
||||
|
||||
static SparsePRT* _head_expanded_list;
|
||||
|
||||
public:
|
||||
@ -255,16 +252,16 @@ public:
|
||||
// Otherwise, returns "false" to indicate that the addition would
|
||||
// overflow the entry for the region. The caller must transfer these
|
||||
// entries to a larger-capacity representation.
|
||||
bool add_card(short region_id, short card_index);
|
||||
bool add_card(RegionIdx_t region_id, CardIdx_t card_index);
|
||||
|
||||
// If the table hold an entry for "region_ind", Copies its
|
||||
// cards into "cards", which must be an array of length at least
|
||||
// "CardsPerEntry", and returns "true"; otherwise, returns "false".
|
||||
bool get_cards(short region_ind, short* cards);
|
||||
bool get_cards(RegionIdx_t region_ind, CardIdx_t* cards);
|
||||
|
||||
// If there is an entry for "region_ind", removes it and return "true";
|
||||
// otherwise returns "false."
|
||||
bool delete_entry(short region_ind);
|
||||
bool delete_entry(RegionIdx_t region_ind);
|
||||
|
||||
// Clear the table, and reinitialize to initial capacity.
|
||||
void clear();
|
||||
@ -276,13 +273,12 @@ public:
|
||||
static void cleanup_all();
|
||||
RSHashTable* cur() const { return _cur; }
|
||||
|
||||
|
||||
void init_iterator(SparsePRTIter* sprt_iter);
|
||||
|
||||
static void add_to_expanded_list(SparsePRT* sprt);
|
||||
static SparsePRT* get_from_expanded_list();
|
||||
|
||||
bool contains_card(short region_id, short card_index) const {
|
||||
bool contains_card(RegionIdx_t region_id, CardIdx_t card_index) const {
|
||||
return _next->contains_card(region_id, card_index);
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,6 @@ concurrentG1Refine.hpp globalDefinitions.hpp
|
||||
concurrentG1Refine.hpp allocation.hpp
|
||||
concurrentG1Refine.hpp thread.hpp
|
||||
|
||||
|
||||
concurrentG1RefineThread.cpp concurrentG1Refine.hpp
|
||||
concurrentG1RefineThread.cpp concurrentG1RefineThread.hpp
|
||||
concurrentG1RefineThread.cpp g1CollectedHeap.inline.hpp
|
||||
@ -334,6 +333,7 @@ sparsePRT.cpp space.inline.hpp
|
||||
sparsePRT.hpp allocation.hpp
|
||||
sparsePRT.hpp cardTableModRefBS.hpp
|
||||
sparsePRT.hpp globalDefinitions.hpp
|
||||
sparsePRT.hpp g1CollectedHeap.inline.hpp
|
||||
sparsePRT.hpp heapRegion.hpp
|
||||
sparsePRT.hpp mutex.hpp
|
||||
|
||||
|
@ -177,6 +177,7 @@ private:
|
||||
// are double-word aligned in 32-bit VMs, but not in 64-bit VMs, so the 32-bit
|
||||
// granularity is 2, 64-bit is 1.
|
||||
static inline size_t obj_granularity() { return size_t(MinObjAlignment); }
|
||||
static inline int obj_granularity_shift() { return LogMinObjAlignment; }
|
||||
|
||||
HeapWord* _region_start;
|
||||
size_t _region_size;
|
||||
@ -299,13 +300,13 @@ inline bool ParMarkBitMap::is_unmarked(oop obj) const
|
||||
inline size_t
|
||||
ParMarkBitMap::bits_to_words(idx_t bits)
|
||||
{
|
||||
return bits * obj_granularity();
|
||||
return bits << obj_granularity_shift();
|
||||
}
|
||||
|
||||
inline ParMarkBitMap::idx_t
|
||||
ParMarkBitMap::words_to_bits(size_t words)
|
||||
{
|
||||
return words / obj_granularity();
|
||||
return words >> obj_granularity_shift();
|
||||
}
|
||||
|
||||
inline size_t ParMarkBitMap::obj_size(idx_t beg_bit, idx_t end_bit) const
|
||||
|
@ -387,7 +387,7 @@ c1_ValueMap.hpp c1_ValueSet.hpp
|
||||
c1_ValueSet.cpp c1_ValueSet.hpp
|
||||
|
||||
c1_ValueSet.hpp allocation.hpp
|
||||
c1_ValueSet.hpp bitMap.hpp
|
||||
c1_ValueSet.hpp bitMap.inline.hpp
|
||||
c1_ValueSet.hpp c1_Instruction.hpp
|
||||
|
||||
c1_ValueStack.cpp c1_IR.hpp
|
||||
|
@ -242,6 +242,31 @@ class Pause_No_Safepoint_Verifier : public Pause_No_GC_Verifier {
|
||||
#endif
|
||||
};
|
||||
|
||||
// A SkipGCALot object is used to elide the usual effect of gc-a-lot
|
||||
// over a section of execution by a thread. Currently, it's used only to
|
||||
// prevent re-entrant calls to GC.
|
||||
class SkipGCALot : public StackObj {
|
||||
private:
|
||||
bool _saved;
|
||||
Thread* _t;
|
||||
|
||||
public:
|
||||
#ifdef ASSERT
|
||||
SkipGCALot(Thread* t) : _t(t) {
|
||||
_saved = _t->skip_gcalot();
|
||||
_t->set_skip_gcalot(true);
|
||||
}
|
||||
|
||||
~SkipGCALot() {
|
||||
assert(_t->skip_gcalot(), "Save-restore protocol invariant");
|
||||
_t->set_skip_gcalot(_saved);
|
||||
}
|
||||
#else
|
||||
SkipGCALot(Thread* t) { }
|
||||
~SkipGCALot() { }
|
||||
#endif
|
||||
};
|
||||
|
||||
// JRT_LEAF currently can be called from either _thread_in_Java or
|
||||
// _thread_in_native mode. In _thread_in_native, it is ok
|
||||
// for another thread to trigger GC. The rest of the JRT_LEAF
|
||||
|
@ -66,11 +66,14 @@ void InterfaceSupport::trace(const char* result_type, const char* header) {
|
||||
|
||||
void InterfaceSupport::gc_alot() {
|
||||
Thread *thread = Thread::current();
|
||||
if (thread->is_VM_thread()) return; // Avoid concurrent calls
|
||||
if (!thread->is_Java_thread()) return; // Avoid concurrent calls
|
||||
// Check for new, not quite initialized thread. A thread in new mode cannot initiate a GC.
|
||||
JavaThread *current_thread = (JavaThread *)thread;
|
||||
if (current_thread->active_handles() == NULL) return;
|
||||
|
||||
// Short-circuit any possible re-entrant gc-a-lot attempt
|
||||
if (thread->skip_gcalot()) return;
|
||||
|
||||
if (is_init_completed()) {
|
||||
|
||||
if (++_fullgc_alot_invocation < FullGCALotStart) {
|
||||
|
@ -127,6 +127,7 @@ Thread::Thread() {
|
||||
debug_only(_owned_locks = NULL;)
|
||||
debug_only(_allow_allocation_count = 0;)
|
||||
NOT_PRODUCT(_allow_safepoint_count = 0;)
|
||||
NOT_PRODUCT(_skip_gcalot = false;)
|
||||
CHECK_UNHANDLED_OOPS_ONLY(_gc_locked_out_count = 0;)
|
||||
_jvmti_env_iteration_count = 0;
|
||||
_vm_operation_started_count = 0;
|
||||
@ -784,7 +785,6 @@ void Thread::check_for_valid_safepoint_state(bool potential_vm_operation) {
|
||||
// We could enter a safepoint here and thus have a gc
|
||||
InterfaceSupport::check_gc_alot();
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -191,6 +191,9 @@ class Thread: public ThreadShadow {
|
||||
NOT_PRODUCT(int _allow_safepoint_count;) // If 0, thread allow a safepoint to happen
|
||||
debug_only (int _allow_allocation_count;) // If 0, the thread is allowed to allocate oops.
|
||||
|
||||
// Used by SkipGCALot class.
|
||||
NOT_PRODUCT(bool _skip_gcalot;) // Should we elide gc-a-lot?
|
||||
|
||||
// Record when GC is locked out via the GC_locker mechanism
|
||||
CHECK_UNHANDLED_OOPS_ONLY(int _gc_locked_out_count;)
|
||||
|
||||
@ -308,6 +311,11 @@ class Thread: public ThreadShadow {
|
||||
bool is_gc_locked_out() { return _gc_locked_out_count > 0; }
|
||||
#endif // CHECK_UNHANDLED_OOPS
|
||||
|
||||
#ifndef PRODUCT
|
||||
bool skip_gcalot() { return _skip_gcalot; }
|
||||
void set_skip_gcalot(bool v) { _skip_gcalot = v; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
// Installs a pending exception to be inserted later
|
||||
static void send_async_exception(oop thread_oop, oop java_throwable);
|
||||
|
@ -531,6 +531,7 @@ void VMThread::execute(VM_Operation* op) {
|
||||
Thread* t = Thread::current();
|
||||
|
||||
if (!t->is_VM_thread()) {
|
||||
SkipGCALot sgcalot(t); // avoid re-entrant attempts to gc-a-lot
|
||||
// JavaThread or WatcherThread
|
||||
t->check_for_valid_safepoint_state(true);
|
||||
|
||||
|
@ -41,19 +41,6 @@ BitMap::BitMap(idx_t size_in_bits, bool in_resource_area) :
|
||||
resize(size_in_bits, in_resource_area);
|
||||
}
|
||||
|
||||
|
||||
void BitMap::verify_index(idx_t index) const {
|
||||
assert(index < _size, "BitMap index out of bounds");
|
||||
}
|
||||
|
||||
void BitMap::verify_range(idx_t beg_index, idx_t end_index) const {
|
||||
#ifdef ASSERT
|
||||
assert(beg_index <= end_index, "BitMap range error");
|
||||
// Note that [0,0) and [size,size) are both valid ranges.
|
||||
if (end_index != _size) verify_index(end_index);
|
||||
#endif
|
||||
}
|
||||
|
||||
void BitMap::resize(idx_t size_in_bits, bool in_resource_area) {
|
||||
assert(size_in_bits >= 0, "just checking");
|
||||
idx_t old_size_in_words = size_in_words();
|
||||
|
@ -93,10 +93,12 @@ class BitMap VALUE_OBJ_CLASS_SPEC {
|
||||
// The index of the first full word in a range.
|
||||
idx_t word_index_round_up(idx_t bit) const;
|
||||
|
||||
// Verification, statistics.
|
||||
void verify_index(idx_t index) const;
|
||||
void verify_range(idx_t beg_index, idx_t end_index) const;
|
||||
// Verification.
|
||||
inline void verify_index(idx_t index) const NOT_DEBUG_RETURN;
|
||||
inline void verify_range(idx_t beg_index, idx_t end_index) const
|
||||
NOT_DEBUG_RETURN;
|
||||
|
||||
// Statistics.
|
||||
static idx_t* _pop_count_table;
|
||||
static void init_pop_count_table();
|
||||
static idx_t num_set_bits(bm_word_t w);
|
||||
@ -287,7 +289,6 @@ class BitMap VALUE_OBJ_CLASS_SPEC {
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
// Convenience class wrapping BitMap which provides multiple bits per slot.
|
||||
class BitMap2D VALUE_OBJ_CLASS_SPEC {
|
||||
public:
|
||||
|
@ -22,6 +22,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ASSERT
|
||||
inline void BitMap::verify_index(idx_t index) const {
|
||||
assert(index < _size, "BitMap index out of bounds");
|
||||
}
|
||||
|
||||
inline void BitMap::verify_range(idx_t beg_index, idx_t end_index) const {
|
||||
assert(beg_index <= end_index, "BitMap range error");
|
||||
// Note that [0,0) and [size,size) are both valid ranges.
|
||||
if (end_index != _size) verify_index(end_index);
|
||||
}
|
||||
#endif // #ifdef ASSERT
|
||||
|
||||
inline void BitMap::set_bit(idx_t bit) {
|
||||
verify_index(bit);
|
||||
|
@ -106,11 +106,13 @@
|
||||
#ifdef ASSERT
|
||||
#define DEBUG_ONLY(code) code
|
||||
#define NOT_DEBUG(code)
|
||||
#define NOT_DEBUG_RETURN /*next token must be ;*/
|
||||
// Historical.
|
||||
#define debug_only(code) code
|
||||
#else // ASSERT
|
||||
#define DEBUG_ONLY(code)
|
||||
#define NOT_DEBUG(code) code
|
||||
#define NOT_DEBUG_RETURN {}
|
||||
#define debug_only(code)
|
||||
#endif // ASSERT
|
||||
|
||||
|
@ -35,3 +35,5 @@ e4851e9f7be26fc52a628be06ffa8aaea0919bd7 jdk7-b57
|
||||
13bf67d8c6341b841d268985cabaf747f2652bc8 jdk7-b58
|
||||
75113d7ce083048e7576b9d0d60a4e80db6b181f jdk7-b59
|
||||
259aef5045a155eb6a2f8dd0e2429c6dbe0f652f jdk7-b60
|
||||
f1ac756616eaaad795f77f7f5e7f7c7bfdc9c1de jdk7-b61
|
||||
a97dd57a62604c35c79bc2fa77a612ed547f6135 jdk7-b62
|
||||
|
@ -81,7 +81,15 @@ else
|
||||
ifdef JAVAC_TARGET_ARG
|
||||
ANT_OPTIONS += -Djavac.target=$(JAVAC_TARGET_ARG)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef SOURCE_LANGUAGE_VERSION
|
||||
ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
|
||||
else
|
||||
ifdef JAVAC_SOURCE_ARG
|
||||
ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ALT_BOOTDIR
|
||||
ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
|
||||
|
@ -30,6 +30,7 @@
|
||||
# one of the standard user build.properties files (see build.xml)
|
||||
|
||||
# options for the <javac> tasks used to compile the tools
|
||||
javac.source = 5
|
||||
javac.target = 5
|
||||
javac.debug = true
|
||||
javac.no.jdk.warnings = -XDignore.symbol.file=true
|
||||
|
@ -85,6 +85,7 @@
|
||||
destdir="${build.classes.dir}"
|
||||
memoryInitialSize="${javac.memoryInitialSize}"
|
||||
memoryMaximumSize="${javac.memoryMaximumSize}"
|
||||
source="${javac.source}"
|
||||
debug="${javac.debug}"
|
||||
target="${javac.target}">
|
||||
<compilerarg value="-J-Xbootclasspath/p:${bootstrap.dir}/lib/javac.jar"/>
|
||||
|
@ -35,3 +35,5 @@ e0eebd978b830c09e7862cff3f77a914c15651c9 jdk7-b55
|
||||
5fb4fbea81c3609916da00417fdd15dbd9e39e97 jdk7-b58
|
||||
f64566bf4c2bc92e65ab2b9fab51b119f0d493d1 jdk7-b59
|
||||
3b054db3e277ca224fe6576c59ed6f4ab5ed0bb5 jdk7-b60
|
||||
aeabf802f2a1ca72b87d7397c5ece58058e000a9 jdk7-b61
|
||||
75c801c13ea1ddebc58b1a8c8da9318d72750e62 jdk7-b62
|
||||
|
@ -83,6 +83,14 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef SOURCE_LANGUAGE_VERSION
|
||||
ANT_OPTIONS += -Djavac.source=$(SOURCE_LANGUAGE_VERSION)
|
||||
else
|
||||
ifdef JAVAC_SOURCE_ARG
|
||||
ANT_OPTIONS += -Djavac.source=$(JAVAC_SOURCE_ARG)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ALT_BOOTDIR
|
||||
ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
|
||||
endif
|
||||
|
@ -30,6 +30,7 @@
|
||||
# one of the standard user build.properties files (see build.xml)
|
||||
|
||||
# options for the <javac> tasks used to compile the tools
|
||||
javac.source = 5
|
||||
javac.target = 5
|
||||
javac.debug = true
|
||||
javac.no.jdk.warnings = -XDignore.symbol.file=true
|
||||
|
@ -107,6 +107,7 @@
|
||||
destdir="${build.classes.dir}"
|
||||
memoryInitialSize="${javac.memoryInitialSize}"
|
||||
memoryMaximumSize="${javac.memoryMaximumSize}"
|
||||
source="${javac.source}"
|
||||
debug="${javac.debug}"
|
||||
target="${javac.target}"
|
||||
excludes="com/sun/tools/internal/txw2/**">
|
||||
|
@ -35,3 +35,5 @@ d5a1223e961891564de25c39fba6f2442d0fb045 jdk7-b57
|
||||
9ba256e2e5c161b89e638390f998baa175ec9abe jdk7-b58
|
||||
2a5a1b269e89f27ebe419ef4cf6e66a3face0df1 jdk7-b59
|
||||
0c3ef2d612a47667829eb17a192decef23f1c536 jdk7-b60
|
||||
f72c0dc047b9b2e797beee68ae0b50decb1f020d jdk7-b61
|
||||
12e11fab9a839a9666a996a8f9a02fd8fa03aab6 jdk7-b62
|
||||
|
@ -345,7 +345,6 @@ TOOLS = \
|
||||
sun/tools/jar \
|
||||
sun/tools/java \
|
||||
sun/tools/javac \
|
||||
sun/tools/javap \
|
||||
sun/tools/jps \
|
||||
sun/tools/jstat \
|
||||
sun/tools/jstatd \
|
||||
@ -570,7 +569,6 @@ $(NOT_RT_JAR_LIST): FRC
|
||||
$(ECHO) "sun/tools/asm/" >> $@
|
||||
$(ECHO) "sun/tools/java/" >> $@
|
||||
$(ECHO) "sun/tools/javac/" >> $@
|
||||
$(ECHO) "sun/tools/javap/" >> $@
|
||||
$(ECHO) "com/sun/tools/classfile/" >> $@
|
||||
$(ECHO) "com/sun/tools/javap/" >> $@
|
||||
$(ECHO) "sun/tools/jconsole/" >> $@
|
||||
|
@ -40,6 +40,5 @@ IMPORT_TOOLS_PACKAGES += \
|
||||
com/sun/tools/javac \
|
||||
com/sun/tools/javadoc \
|
||||
com/sun/tools/javah \
|
||||
com/sun/tools/javap \
|
||||
sun/tools/javap
|
||||
com/sun/tools/javap
|
||||
|
||||
|
@ -91,6 +91,8 @@ ABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmp
|
||||
|
||||
dummy := $(shell $(MKDIR) -p $(TEMP_DIR))
|
||||
|
||||
# The language version we want for this jdk build
|
||||
SOURCE_LANGUAGE_VERSION=5
|
||||
# The class version we want for this jdk build
|
||||
TARGET_CLASS_VERSION=5
|
||||
|
||||
|
@ -123,7 +123,8 @@ ifeq ($(JAVAC_WARNINGS_FATAL), true)
|
||||
endif
|
||||
|
||||
# Add the source level (currently all source is 1.5, should this be 1.6?)
|
||||
LANGUAGE_VERSION = -source 1.5
|
||||
SOURCE_LANGUAGE_VERSION = 5
|
||||
LANGUAGE_VERSION = -source $(SOURCE_LANGUAGE_VERSION)
|
||||
JAVACFLAGS += $(LANGUAGE_VERSION)
|
||||
|
||||
# Add the class version we want (currently this is 5, should it be 6 or even 7?)
|
||||
|
@ -645,7 +645,7 @@ tracingdocs:
|
||||
@# ######## api-tracing ############################
|
||||
$(RM) -r $(TRACING_DOCDIR)
|
||||
$(MKDIR) -p $(TRACING_DOCDIR)
|
||||
$(JAVADOC) $(TRACING_JAVADOCFLAGS) \
|
||||
$(JAVADOC_CMD) $(TRACING_JAVADOCFLAGS) \
|
||||
$(TRACING_PKGS)
|
||||
|
||||
.PHONY: httpserverdocs
|
||||
|
@ -827,8 +827,7 @@ CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
|
||||
|
||||
$(FILES_gensbcs_out): $(GENCSSRC)/SingleByte-X.java $(GENCSSRC)/sbcs
|
||||
@$(prep-target)
|
||||
$(BOOT_JAVA_CMD) -cp $(CHARSETMAPPING_JARFILE) build.tools.charsetmapping.GenerateSBCS \
|
||||
$(GENCSSRC) $(SCS_GEN) sbcs
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSSRC) $(SCS_GEN) sbcs
|
||||
|
||||
#
|
||||
# Generated file system implementation classes (Unix only)
|
||||
|
@ -76,6 +76,10 @@ FILES_java = \
|
||||
sun/text/Normalizer.java \
|
||||
sun/text/SupplementaryCharacterData.java \
|
||||
sun/text/UCompactIntArray.java \
|
||||
sun/text/bidi/BidiBase.java \
|
||||
sun/text/bidi/BidiLine.java \
|
||||
sun/text/bidi/BidiRun.java \
|
||||
\
|
||||
sun/text/normalizer/CharTrie.java \
|
||||
sun/text/normalizer/CharacterIteratorWrapper.java \
|
||||
sun/text/normalizer/ICUBinary.java \
|
||||
|
@ -50,6 +50,8 @@ PREFIX = 1.2
|
||||
JAVADOCFLAGS = $(NO_PROPRIETARY_API_WARNINGS) $(LANGUAGE_VERSION)
|
||||
SWINGPKG = javax/swing
|
||||
LOCAL_JAVAC_FLAGS = $(OTHER_JAVACFLAGS)
|
||||
# since LOCAL_JAVADOC runs on ALT_BOOTDIR, the doclet and all its classes must be compiled to match
|
||||
DOCLET_JAVAC_FLAGS = -source 6 -target 6
|
||||
|
||||
include FILES.gmk
|
||||
include $(BUILDDIR)/common/Release.gmk
|
||||
@ -86,7 +88,7 @@ $(OBJDIR) $(BEANCLASSDIR) $(BEANSRCDIR) $(DOCLETDST)::
|
||||
@$(MKDIR) -p $@
|
||||
|
||||
$(DOCLETDST)/%.class: $(DOCLETSRC)/%.java
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $?
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(DOCLETSRC)" -d $(DOCLETDST) $?
|
||||
@$(java-vm-cleanup)
|
||||
|
||||
# To run, the doclet needs SwingBeanInfoBase class. Also Notice the lie
|
||||
@ -95,11 +97,11 @@ $(DOCLETDST)/%.class: $(DOCLETSRC)/%.java
|
||||
.SwingBeanInfo: $(OBJDIR) $(BEANCLASSDIR) $(BEANSRCDIR) $(SWINGPKG)/BeanInfoUtils.class $(SWINGPKG)/SwingBeanInfoBase.class
|
||||
|
||||
$(SWINGPKG)/BeanInfoUtils.class: $(BEANSRCDIR)/BeanInfoUtils.java
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -d $(BEANCLASSDIR) $<
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -d $(BEANCLASSDIR) $<
|
||||
@$(java-vm-cleanup)
|
||||
|
||||
$(SWINGPKG)/SwingBeanInfoBase.class: $(BEANSRCDIR)/SwingBeanInfoBase.java $(BEANSRCDIR)/BeanInfoUtils.java
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $<
|
||||
$(JAVAC_CMD) $(LOCAL_JAVAC_FLAGS) $(DOCLET_JAVAC_FLAGS) -classpath $(BEANCLASSDIR) -d $(BEANCLASSDIR) $<
|
||||
@$(java-vm-cleanup)
|
||||
|
||||
#
|
||||
|
@ -66,7 +66,7 @@ $(call make-launcher, jarsigner, sun.security.tools.JarSigner, , )
|
||||
$(call make-launcher, javac, com.sun.tools.javac.Main, , )
|
||||
$(call make-launcher, javadoc, com.sun.tools.javadoc.Main, , )
|
||||
$(call make-launcher, javah, com.sun.tools.javah.Main, , )
|
||||
$(call make-launcher, javap, sun.tools.javap.Main, , )
|
||||
$(call make-launcher, javap, com.sun.tools.javap.Main, , )
|
||||
$(call make-launcher, jconsole, sun.tools.jconsole.JConsole, \
|
||||
-J-Djconsole.showOutputViewer, )
|
||||
$(call make-launcher, jdb, com.sun.tools.example.debug.tty.TTY, , )
|
||||
|
@ -58,11 +58,12 @@ ifdef OPENJDK
|
||||
else
|
||||
RENDER_SUBDIR = dcpr
|
||||
endif
|
||||
# nio need to be compiled before awt to have all charsets ready
|
||||
SUBDIRS = jar security javazic misc net audio $(RENDER_SUBDIR) image \
|
||||
awt splashscreen $(XAWT_SUBDIR) \
|
||||
nio awt splashscreen $(XAWT_SUBDIR) \
|
||||
$(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
|
||||
font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \
|
||||
jawt text nio launcher management $(ORG_SUBDIR) \
|
||||
jawt text launcher management $(ORG_SUBDIR) \
|
||||
native2ascii serialver tools jconsole tracing
|
||||
|
||||
all build clean clobber::
|
||||
|
@ -24,10 +24,6 @@
|
||||
#
|
||||
|
||||
FILES_c_shared = \
|
||||
jbidi.c \
|
||||
ubidi.c \
|
||||
ubidiln.c \
|
||||
uchardir.c \
|
||||
DrawGlyphList.c \
|
||||
sunFont.c
|
||||
|
||||
|
@ -145,7 +145,6 @@ include $(BUILDDIR)/common/Library.gmk
|
||||
# Add to the ambient vpath to pick up files in subdirectories
|
||||
#
|
||||
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)
|
||||
vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/bidi
|
||||
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/layout
|
||||
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
|
||||
|
||||
@ -187,7 +186,6 @@ endif # PLATFORM
|
||||
|
||||
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR) \
|
||||
-I$(SHARE_SRC)/native/$(PKGDIR)/layout \
|
||||
-I$(SHARE_SRC)/native/$(PKGDIR)/bidi \
|
||||
-I$(SHARE_SRC)/native/sun/awt/image/cvutils \
|
||||
-I$(PLATFORM_SRC)/native/sun/awt \
|
||||
-I$(SHARE_SRC)/native/sun/awt/debug \
|
||||
|
@ -31,8 +31,6 @@ SUNWprivate_1.1 {
|
||||
newLayoutTableCache;
|
||||
freeLayoutTableCache;
|
||||
isNullScalerContext;
|
||||
Java_java_text_Bidi_nativeBidiChars;
|
||||
Java_java_text_Bidi_nativeGetDirectionCode;
|
||||
Java_sun_font_NullFontScaler_getNullScalerContext;
|
||||
Java_sun_font_NullFontScaler_getGlyphImage;
|
||||
Java_sun_font_FontManager_getPlatformFontVar;
|
||||
|
@ -33,8 +33,6 @@ SUNWprivate_1.1 {
|
||||
newLayoutTableCache;
|
||||
freeLayoutTableCache;
|
||||
isNullScalerContext;
|
||||
Java_java_text_Bidi_nativeBidiChars;
|
||||
Java_java_text_Bidi_nativeGetDirectionCode;
|
||||
Java_sun_font_NullFontScaler_getNullScalerContext;
|
||||
Java_sun_font_NullFontScaler_getGlyphImage;
|
||||
Java_sun_font_FontManager_getPlatformFontVar;
|
||||
|
@ -304,7 +304,7 @@ FILES_src = \
|
||||
sun/io/CharToByteMacUkraine.java \
|
||||
sun/io/CharToByteTIS620.java
|
||||
|
||||
FILES_gen_extsbcs = \
|
||||
FILES_gen_extcs = \
|
||||
sun/nio/cs/ext/IBM037.java \
|
||||
sun/nio/cs/ext/IBM1006.java \
|
||||
sun/nio/cs/ext/IBM1025.java \
|
||||
@ -374,6 +374,21 @@ FILES_gen_extsbcs = \
|
||||
sun/nio/cs/ext/MacThai.java \
|
||||
sun/nio/cs/ext/MacTurkish.java \
|
||||
sun/nio/cs/ext/MacUkraine.java \
|
||||
sun/nio/cs/ext/TIS_620.java
|
||||
sun/nio/cs/ext/TIS_620.java \
|
||||
sun/nio/cs/ext/EUC_TWMapping.java \
|
||||
sun/nio/cs/ext/IBM1381.java \
|
||||
sun/nio/cs/ext/IBM1383.java \
|
||||
sun/nio/cs/ext/IBM930.java \
|
||||
sun/nio/cs/ext/IBM933.java \
|
||||
sun/nio/cs/ext/IBM935.java \
|
||||
sun/nio/cs/ext/IBM937.java \
|
||||
sun/nio/cs/ext/IBM939.java \
|
||||
sun/nio/cs/ext/IBM942.java \
|
||||
sun/nio/cs/ext/IBM943.java \
|
||||
sun/nio/cs/ext/IBM948.java \
|
||||
sun/nio/cs/ext/IBM949.java \
|
||||
sun/nio/cs/ext/IBM950.java \
|
||||
sun/nio/cs/ext/IBM970.java
|
||||
|
||||
FILES_java = $(FILES_src) $(FILES_gen_extcs)
|
||||
|
||||
FILES_java = $(FILES_src) $(FILES_gen_extsbcs)
|
@ -60,15 +60,15 @@ endif # PLATFORM
|
||||
# this define is for the rule:
|
||||
CHARSETS_JAR = $(LIBDIR)/charsets.jar
|
||||
|
||||
# extsbcs
|
||||
FILES_genout_extsbcs = $(FILES_gen_extsbcs:%.java=$(GENSRCDIR)/%.java)
|
||||
# extcs
|
||||
FILES_genout_extcs = $(FILES_gen_extcs:%.java=$(GENSRCDIR)/%.java)
|
||||
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
include $(BUILDDIR)/common/Classes.gmk
|
||||
|
||||
build: $(FILES_genout_extsbcs) $(CHARSETS_JAR)
|
||||
build: $(FILES_genout_extcs) $(CHARSETS_JAR)
|
||||
|
||||
#
|
||||
# Extra rules to build character converters.
|
||||
@ -77,6 +77,7 @@ SERVICE_DESCRIPTION = java.nio.charset.spi.CharsetProvider
|
||||
SERVICE_DESCRIPTION_PATH = META-INF/services/$(SERVICE_DESCRIPTION)
|
||||
|
||||
GENCSDATASRC = $(BUILDDIR)/tools/CharsetMapping
|
||||
GENCSSRCDIR = $(BUILDDIR)/tools/src/build/tools/charsetmapping
|
||||
GENCSEXT = $(GENSRCDIR)/sun/nio/cs/ext
|
||||
|
||||
FILES_MAP = $(GENCSDATASRC)/sjis0213.map
|
||||
@ -86,16 +87,18 @@ CHARSETMAPPING_JARFILE = $(BUILDTOOLJARDIR)/charsetmapping.jar
|
||||
$(FILES_DAT): $(FILES_MAP)
|
||||
@$(prep-target)
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) \
|
||||
$(FILES_MAP) $(FILES_DAT)
|
||||
$(FILES_MAP) $(FILES_DAT) sjis0213
|
||||
|
||||
|
||||
$(FILES_genout_extsbcs): $(GENCSDATASRC)/SingleByte-X.java $(GENCSDATASRC)/extsbcs
|
||||
$(FILES_genout_extcs): $(GENCSDATASRC)/SingleByte-X.java $(GENCSDATASRC)/DoubleByte-X.java \
|
||||
$(GENCSDATASRC)/extsbcs $(GENCSDATASRC)/dbcs
|
||||
@$(prep-target)
|
||||
$(RM) -r $(GENCSEXT)
|
||||
$(MKDIR) -p $(GENCSEXT)
|
||||
$(BOOT_JAVA_CMD) -cp $(CHARSETMAPPING_JARFILE) build.tools.charsetmapping.GenerateSBCS \
|
||||
$(GENCSDATASRC) $(GENCSEXT) extsbcs
|
||||
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) extsbcs
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) euctw \
|
||||
$(GENCSSRCDIR)/GenerateEUC_TW.java
|
||||
$(BOOT_JAVA_CMD) -jar $(CHARSETMAPPING_JARFILE) $(GENCSDATASRC) $(GENCSEXT) dbcs
|
||||
|
||||
$(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH): \
|
||||
$(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH)
|
||||
|
100
jdk/make/tools/CharsetMapping/DoubleByte-X.java
Normal file
100
jdk/make/tools/CharsetMapping/DoubleByte-X.java
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
// -- This file was mechanically generated: Do not edit! -- //
|
||||
|
||||
package $PACKAGE$;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
import java.util.Arrays;
|
||||
import sun.nio.cs.HistoricallyNamedCharset;
|
||||
import sun.nio.cs.ext.DoubleByte;
|
||||
|
||||
public class $NAME_CLZ$ extends Charset
|
||||
$IMPLEMENTS$
|
||||
{
|
||||
public $NAME_CLZ$() {
|
||||
super("$NAME_CS$", $NAME_ALIASES$);
|
||||
}
|
||||
|
||||
$HISTORICALNAME$
|
||||
|
||||
public boolean contains(Charset cs) {
|
||||
$CONTAINS$
|
||||
}
|
||||
|
||||
public CharsetDecoder newDecoder() {
|
||||
initb2c();
|
||||
return new DoubleByte.Decoder$DECTYPE$(this, b2c, b2cSB, $B2MIN$, $B2MAX$);
|
||||
}
|
||||
|
||||
public CharsetEncoder newEncoder() {
|
||||
initc2b();
|
||||
return new DoubleByte.Encoder$ENCTYPE$(this, c2b, c2bIndex);
|
||||
}
|
||||
|
||||
$B2C$
|
||||
static char[][] b2c = new char[b2cStr.length][];
|
||||
static char[] b2cSB;
|
||||
private static volatile boolean b2cInitialized = false;
|
||||
|
||||
static void initb2c() {
|
||||
if (b2cInitialized)
|
||||
return;
|
||||
synchronized (b2c) {
|
||||
if (b2cInitialized)
|
||||
return;
|
||||
for (int i = 0; i < b2cStr.length; i++) {
|
||||
if (b2cStr[i] == null)
|
||||
b2c[i] = DoubleByte.B2C_UNMAPPABLE;
|
||||
else
|
||||
b2c[i] = b2cStr[i].toCharArray();
|
||||
}
|
||||
b2cSB = b2cSBStr.toCharArray();
|
||||
b2cInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
static char[] c2b = new char[$C2BLENGTH$];
|
||||
static char[] c2bIndex = new char[0x100];
|
||||
private static volatile boolean c2bInitialized = false;
|
||||
|
||||
static void initc2b() {
|
||||
if (c2bInitialized)
|
||||
return;
|
||||
synchronized (c2b) {
|
||||
if (c2bInitialized)
|
||||
return;
|
||||
$NONROUNDTRIP_B2C$
|
||||
$NONROUNDTRIP_C2B$
|
||||
DoubleByte.Encoder.initC2B(b2cStr, b2cSBStr, b2cNR, c2bNR,
|
||||
$B2MIN$, $B2MAX$,
|
||||
c2b, c2bIndex);
|
||||
c2bInitialized = true;
|
||||
}
|
||||
}
|
||||
}
|
4
jdk/make/tools/CharsetMapping/IBM1381.c2b
Normal file
4
jdk/make/tools/CharsetMapping/IBM1381.c2b
Normal file
@ -0,0 +1,4 @@
|
||||
# See 4201529/4296969
|
||||
A1AA 2014
|
||||
A1A4 00B7
|
||||
A1A4 7AC2
|
9500
jdk/make/tools/CharsetMapping/IBM1381.map
Normal file
9500
jdk/make/tools/CharsetMapping/IBM1381.map
Normal file
File diff suppressed because it is too large
Load Diff
7
jdk/make/tools/CharsetMapping/IBM1383.c2b
Normal file
7
jdk/make/tools/CharsetMapping/IBM1383.c2b
Normal file
@ -0,0 +1,7 @@
|
||||
# See 4201529/4296969
|
||||
A1AA 2014
|
||||
A1A4 00B7
|
||||
A1A4 8EA2
|
||||
FEEE F83D
|
||||
FEF4 F83E
|
||||
|
9003
jdk/make/tools/CharsetMapping/IBM1383.map
Normal file
9003
jdk/make/tools/CharsetMapping/IBM1383.map
Normal file
File diff suppressed because it is too large
Load Diff
2
jdk/make/tools/CharsetMapping/IBM1383.nr
Normal file
2
jdk/make/tools/CharsetMapping/IBM1383.nr
Normal file
@ -0,0 +1,2 @@
|
||||
FEF4 4EDD
|
||||
FEEE FFE5
|
81
jdk/make/tools/CharsetMapping/IBM930.c2b
Normal file
81
jdk/make/tools/CharsetMapping/IBM930.c2b
Normal file
@ -0,0 +1,81 @@
|
||||
#
|
||||
# diff result of 03A234B0.TPMAP12A & 03A234B0.UXMAP120, with
|
||||
#
|
||||
# (1)added following entries from existing Cp930.java's c->b only
|
||||
# encoding result.
|
||||
#
|
||||
# 6be1 -> 54d4 -> 5516
|
||||
# 6d00 -> 5550 -> 6d9c
|
||||
# 70ff -> 52ec -> 4fa0
|
||||
# 841d -> 53e8 -> 8749
|
||||
# 841f -> 52a1 -> 874b
|
||||
# 8f91 -> 446e -> 2116
|
||||
# 92ca -> 547d -> 565b
|
||||
# 9b7e -> 53da -> 9a28
|
||||
# f86f -> 446e -> 2116
|
||||
#
|
||||
# (2)entries does not exist in "old"
|
||||
#
|
||||
# 51F1 6805
|
||||
# 53B3 8346
|
||||
#
|
||||
# (3)the 0x15 U+0085 entries for ebcdic
|
||||
#
|
||||
15 0085
|
||||
#
|
||||
54d4 6be1
|
||||
5550 6d00
|
||||
52ec 70ff
|
||||
53e8 841d
|
||||
52a1 841f
|
||||
446e 8f91
|
||||
547d 92ca
|
||||
53da 9b7e
|
||||
446e f86f
|
||||
#
|
||||
# we should use this one instead of the 4260<-ff0d
|
||||
#4260 2212
|
||||
4260 ff0d
|
||||
#
|
||||
426A 00A6
|
||||
43A1 301C
|
||||
444A 2014
|
||||
447C 2016
|
||||
4C7D 9E7C
|
||||
4EB3 9830
|
||||
4F5E 5861
|
||||
507F 91AC
|
||||
5190 56CA
|
||||
51F1 6805
|
||||
51FA 91B1
|
||||
5261 9EB4
|
||||
52A1 881F
|
||||
52C9 840A
|
||||
52DA 7E61
|
||||
52EC 4FE0
|
||||
5353 8EC0
|
||||
5373 7E6B
|
||||
53DA 9A52
|
||||
53E8 87EC
|
||||
53EE 7130
|
||||
53F8 8523
|
||||
5443 5C5B
|
||||
5464 9DD7
|
||||
547D 5699
|
||||
5481 525D
|
||||
54A3 6414
|
||||
54A4 7626
|
||||
54CA 7C1E
|
||||
54CD 6451
|
||||
54D4 555E
|
||||
54FA 6F51
|
||||
5550 7006
|
||||
5553 79B1
|
||||
555F 9EB5
|
||||
55C0 5C62
|
||||
55C1 985A
|
||||
5B72 6522
|
||||
5BFE 688E
|
||||
60F1 7E48
|
||||
61B0 8141
|
||||
66C8 9839
|
11897
jdk/make/tools/CharsetMapping/IBM930.map
Normal file
11897
jdk/make/tools/CharsetMapping/IBM930.map
Normal file
File diff suppressed because it is too large
Load Diff
1
jdk/make/tools/CharsetMapping/IBM930.nr
Normal file
1
jdk/make/tools/CharsetMapping/IBM930.nr
Normal file
@ -0,0 +1 @@
|
||||
25 000a
|
1
jdk/make/tools/CharsetMapping/IBM933.c2b
Normal file
1
jdk/make/tools/CharsetMapping/IBM933.c2b
Normal file
@ -0,0 +1 @@
|
||||
15 0085
|
10987
jdk/make/tools/CharsetMapping/IBM933.map
Normal file
10987
jdk/make/tools/CharsetMapping/IBM933.map
Normal file
File diff suppressed because it is too large
Load Diff
1
jdk/make/tools/CharsetMapping/IBM935.c2b
Normal file
1
jdk/make/tools/CharsetMapping/IBM935.c2b
Normal file
@ -0,0 +1 @@
|
||||
15 0085
|
9523
jdk/make/tools/CharsetMapping/IBM935.map
Normal file
9523
jdk/make/tools/CharsetMapping/IBM935.map
Normal file
File diff suppressed because it is too large
Load Diff
1
jdk/make/tools/CharsetMapping/IBM935.nr
Normal file
1
jdk/make/tools/CharsetMapping/IBM935.nr
Normal file
@ -0,0 +1 @@
|
||||
25 000a
|
8
jdk/make/tools/CharsetMapping/IBM937.c2b
Normal file
8
jdk/make/tools/CharsetMapping/IBM937.c2b
Normal file
@ -0,0 +1,8 @@
|
||||
15 0085
|
||||
#
|
||||
# see .map for more info regarding the following 5 entries
|
||||
#445C F83E
|
||||
#46A8 F83F
|
||||
#46A9 F840
|
||||
#46AA F841
|
||||
#46AB F842
|
20463
jdk/make/tools/CharsetMapping/IBM937.map
Normal file
20463
jdk/make/tools/CharsetMapping/IBM937.map
Normal file
File diff suppressed because it is too large
Load Diff
193
jdk/make/tools/CharsetMapping/IBM937.nr
Normal file
193
jdk/make/tools/CharsetMapping/IBM937.nr
Normal file
@ -0,0 +1,193 @@
|
||||
#
|
||||
25 000a
|
||||
#
|
||||
# following are from Cp937.nr
|
||||
454A 5341
|
||||
454C 5345
|
||||
4841 4E00
|
||||
4845 4E59
|
||||
4847 4E8C
|
||||
4849 4EBA
|
||||
484A 513F
|
||||
484B 5165
|
||||
484C 516B
|
||||
4850 51E0
|
||||
4851 51F5
|
||||
4852 5200
|
||||
4853 529B
|
||||
4855 5315
|
||||
4856 531A
|
||||
4858 5341
|
||||
4859 535C
|
||||
485B 5382
|
||||
485D 53C8
|
||||
485E 53E3
|
||||
485F 56D7
|
||||
4860 571F
|
||||
4861 58EB
|
||||
4863 5915
|
||||
4864 5927
|
||||
4865 5973
|
||||
4866 5B50
|
||||
4868 5BF8
|
||||
4869 5C0F
|
||||
486A 5C22
|
||||
486B 5C38
|
||||
486C 5C6E
|
||||
486D 5C71
|
||||
486F 5DE5
|
||||
4870 5DF1
|
||||
4871 5DFE
|
||||
4872 5E72
|
||||
4876 5EFE
|
||||
4877 5F0B
|
||||
4878 5F13
|
||||
487B 5F73
|
||||
487C 5FC3
|
||||
487D 6208
|
||||
487E 6236
|
||||
487F 624B
|
||||
4881 652F
|
||||
4883 6587
|
||||
4884 6597
|
||||
4885 65A4
|
||||
4886 65B9
|
||||
4888 65E5
|
||||
4889 66F0
|
||||
488A 6708
|
||||
488B 6728
|
||||
488C 6B20
|
||||
488D 6B62
|
||||
488E 6B79
|
||||
488F 6BB3
|
||||
4890 6BCB
|
||||
4891 6BD4
|
||||
4892 6BDB
|
||||
4893 6C0F
|
||||
4894 6C14
|
||||
4895 6C34
|
||||
4896 706B
|
||||
4897 722A
|
||||
4898 7236
|
||||
4899 723B
|
||||
489A 723F
|
||||
489B 7247
|
||||
489C 7259
|
||||
489D 725B
|
||||
489E 72AC
|
||||
489F 7384
|
||||
48A0 7389
|
||||
48A1 74DC
|
||||
48A2 74E6
|
||||
48A3 7518
|
||||
48A4 751F
|
||||
48A5 7528
|
||||
48A6 7530
|
||||
48A7 758B
|
||||
48AA 767D
|
||||
48AB 76AE
|
||||
48AC 76BF
|
||||
48AD 76EE
|
||||
48AE 77DB
|
||||
48AF 77E2
|
||||
48B0 77F3
|
||||
48B1 793A
|
||||
48B2 79B8
|
||||
48B3 79BE
|
||||
48B4 7A74
|
||||
48B5 7ACB
|
||||
48B6 7AF9
|
||||
48B7 7C73
|
||||
48B8 7CF8
|
||||
48B9 7F36
|
||||
48BA 7F51
|
||||
48BB 7F8A
|
||||
48BC 7FBD
|
||||
48BD 8001
|
||||
48BE 800C
|
||||
48BF 8012
|
||||
48C0 8033
|
||||
48C1 807F
|
||||
48C2 8089
|
||||
48C3 81E3
|
||||
48C4 81EA
|
||||
48C5 81F3
|
||||
48C6 81FC
|
||||
48C7 820C
|
||||
48C8 821B
|
||||
48C9 821F
|
||||
48CA 826E
|
||||
48CB 8272
|
||||
48CC 8278
|
||||
48CD 864D
|
||||
48CE 866B
|
||||
48CF 8840
|
||||
48D0 884C
|
||||
48D1 8863
|
||||
48D2 897E
|
||||
48D3 898B
|
||||
48D4 89D2
|
||||
48D5 8A00
|
||||
48D6 8C37
|
||||
48D7 8C46
|
||||
48D8 8C55
|
||||
48D9 8C78
|
||||
48DA 8C9D
|
||||
48DB 8D64
|
||||
48DC 8D70
|
||||
48DD 8DB3
|
||||
48DE 8EAB
|
||||
48DF 8ECA
|
||||
48E0 8F9B
|
||||
48E1 8FB0
|
||||
48E3 9091
|
||||
48E4 9149
|
||||
48E5 91C6
|
||||
48E6 91CC
|
||||
48E7 91D1
|
||||
48E8 9577
|
||||
48E9 9580
|
||||
48EA 961C
|
||||
48EC 96B9
|
||||
48ED 96E8
|
||||
48EE 9752
|
||||
48EF 975E
|
||||
48F0 9762
|
||||
48F1 9769
|
||||
48F2 97CB
|
||||
48F3 97ED
|
||||
48F4 97F3
|
||||
48F5 9801
|
||||
48F6 98A8
|
||||
48F7 98DB
|
||||
48F8 98DF
|
||||
48F9 9996
|
||||
48FA 9999
|
||||
48FB 99AC
|
||||
48FC 9AA8
|
||||
48FD 9AD8
|
||||
4941 9ADF
|
||||
4942 9B25
|
||||
4943 9B2F
|
||||
4944 9B32
|
||||
4945 9B3C
|
||||
4946 9B5A
|
||||
4947 9CE5
|
||||
4948 9E75
|
||||
4949 9E7F
|
||||
494A 9EA5
|
||||
494B 9EBB
|
||||
494C 9EC3
|
||||
494D 9ECD
|
||||
494E 9ED1
|
||||
494F 9EF9
|
||||
4950 9EFD
|
||||
4951 9F0E
|
||||
4952 9F13
|
||||
4953 9F20
|
||||
4954 9F3B
|
||||
4955 9F4A
|
||||
4956 9F52
|
||||
4957 9F8D
|
||||
4958 9F9C
|
||||
4959 9FA0
|
62
jdk/make/tools/CharsetMapping/IBM939.c2b
Normal file
62
jdk/make/tools/CharsetMapping/IBM939.c2b
Normal file
@ -0,0 +1,62 @@
|
||||
#
|
||||
15 0085
|
||||
#
|
||||
# diff of:
|
||||
# package2/939/03AB34B0.TPMAP12A
|
||||
# package2/939/03AB34B0.UPMAP13A
|
||||
#
|
||||
4260 2212
|
||||
426A 00A6
|
||||
43A1 301C
|
||||
444A 2014
|
||||
446E F86F
|
||||
447C 2016
|
||||
4C7D 9E7C
|
||||
4EB3 9830
|
||||
4F5E 5861
|
||||
507F 91AC
|
||||
5190 56CA
|
||||
51F1 6805
|
||||
51FA 91B1
|
||||
5261 9EB4
|
||||
52A1 881F
|
||||
52C9 840A
|
||||
52DA 7E61
|
||||
52EC 4FE0
|
||||
5353 8EC0
|
||||
5373 7E6B
|
||||
53B3 8346
|
||||
53DA 9A52
|
||||
53E8 87EC
|
||||
53EE 7130
|
||||
53F8 8523
|
||||
5443 5C5B
|
||||
5464 9DD7
|
||||
547D 5699
|
||||
5481 525D
|
||||
54A3 6414
|
||||
54A4 7626
|
||||
54CA 7C1E
|
||||
54CD 6451
|
||||
54D4 555E
|
||||
54FA 6F51
|
||||
5550 7006
|
||||
5553 79B1
|
||||
555F 9EB5
|
||||
55C0 5C62
|
||||
55C1 985A
|
||||
5B72 6522
|
||||
5BFE 688E
|
||||
60F1 7E48
|
||||
61B0 8141
|
||||
66C8 9839
|
||||
#
|
||||
# see .map for details for following entries
|
||||
54d4 6be1
|
||||
5550 6d00
|
||||
52ec 70ff
|
||||
53e8 841d
|
||||
52a1 841f
|
||||
446e 8f91
|
||||
547d 92ca
|
||||
53da 9b7e
|
11886
jdk/make/tools/CharsetMapping/IBM939.map
Normal file
11886
jdk/make/tools/CharsetMapping/IBM939.map
Normal file
File diff suppressed because it is too large
Load Diff
1
jdk/make/tools/CharsetMapping/IBM939.nr
Normal file
1
jdk/make/tools/CharsetMapping/IBM939.nr
Normal file
@ -0,0 +1 @@
|
||||
25 000a
|
84
jdk/make/tools/CharsetMapping/IBM942.c2b
Normal file
84
jdk/make/tools/CharsetMapping/IBM942.c2b
Normal file
@ -0,0 +1,84 @@
|
||||
# diff of
|
||||
# 03AE34B0.TPMAP110 (b2c)
|
||||
# 03AE34B0.UPMAP120 (c2b)
|
||||
# (1) removed "redundant" entries
|
||||
# 5C 005C
|
||||
# 7E 007E
|
||||
# (2) have following "incompatible" entries compared
|
||||
# to existing/old mappings
|
||||
#
|
||||
# (a) c->b only don't exist in old table
|
||||
# 2015 815c 2014
|
||||
# 2225 8161 2016
|
||||
# 6805 8df2 67f5
|
||||
# 8346 8c74 834a
|
||||
# ff0d 817c 2212
|
||||
# ff5e 8160 301c
|
||||
# ffe4 fa55 a6
|
||||
#
|
||||
# (b) c->b only don't exist in new table
|
||||
# 551e 90e4 8749
|
||||
# 6d00 93c0 6d9c
|
||||
# 6f1e 91cb 9a28
|
||||
# 70ff 8ba0 4fa0
|
||||
# 8741 88a0 5516
|
||||
# 8f91 fa59 2116
|
||||
# 92ca 8a9a 565b
|
||||
#
|
||||
# Warning: to compatible, added (b) into c2b table
|
||||
#
|
||||
90e4 551e
|
||||
93c0 6d00
|
||||
91cb 6f1e
|
||||
8ba0 70ff
|
||||
88a0 8741
|
||||
fa59 8f91
|
||||
8a9a 92ca
|
||||
#
|
||||
#
|
||||
#
|
||||
815C 2015
|
||||
8160 FF5E
|
||||
8161 2225
|
||||
817C FF0D
|
||||
88A0 555E
|
||||
898B 7130
|
||||
89A8 9DD7
|
||||
8A9A 5699
|
||||
8BA0 4FE0
|
||||
8BEB 8EC0
|
||||
8C71 7E6B
|
||||
8C74 8346
|
||||
8CB2 9E7C
|
||||
8D8D 9EB4
|
||||
8DF2 6805
|
||||
8EC6 5C62
|
||||
8F4A 7E61
|
||||
8FD3 8523
|
||||
8FDD 91AC
|
||||
90E4 87EC
|
||||
917E 6414
|
||||
9189 7626
|
||||
91CB 9A52
|
||||
925C 7C1E
|
||||
92CD 6451
|
||||
9355 5861
|
||||
935E 985A
|
||||
9398 79B1
|
||||
93C0 7006
|
||||
9458 56CA
|
||||
948D 525D
|
||||
94AC 6F51
|
||||
94AE 91B1
|
||||
966A 9830
|
||||
96CB 9EB5
|
||||
9789 840A
|
||||
9858 881F
|
||||
9BA0 5C5B
|
||||
9DB7 6522
|
||||
9E94 688E
|
||||
E379 7E48
|
||||
E445 8141
|
||||
E8F6 9839
|
||||
FA55 FFE4
|
||||
FA59 F86F
|
9344
jdk/make/tools/CharsetMapping/IBM942.map
Normal file
9344
jdk/make/tools/CharsetMapping/IBM942.map
Normal file
File diff suppressed because it is too large
Load Diff
9799
jdk/make/tools/CharsetMapping/IBM943.map
Normal file
9799
jdk/make/tools/CharsetMapping/IBM943.map
Normal file
File diff suppressed because it is too large
Load Diff
401
jdk/make/tools/CharsetMapping/IBM943.nr
Normal file
401
jdk/make/tools/CharsetMapping/IBM943.nr
Normal file
@ -0,0 +1,401 @@
|
||||
#
|
||||
# b->c only entries
|
||||
#
|
||||
8754 2160
|
||||
8755 2161
|
||||
8756 2162
|
||||
8757 2163
|
||||
8758 2164
|
||||
8759 2165
|
||||
875A 2166
|
||||
875B 2167
|
||||
875C 2168
|
||||
875D 2169
|
||||
8782 2116
|
||||
8784 2121
|
||||
878A 3231
|
||||
8790 2252
|
||||
8791 2261
|
||||
8792 222B
|
||||
8795 221A
|
||||
8796 22A5
|
||||
8797 2220
|
||||
879A 2235
|
||||
879B 2229
|
||||
879C 222A
|
||||
ED40 7E8A
|
||||
ED41 891C
|
||||
ED42 9348
|
||||
ED43 9288
|
||||
ED44 84DC
|
||||
ED45 4FC9
|
||||
ED46 70BB
|
||||
ED47 6631
|
||||
ED48 68C8
|
||||
ED49 92F9
|
||||
ED4A 66FB
|
||||
ED4B 5F45
|
||||
ED4C 4E28
|
||||
ED4D 4EE1
|
||||
ED4E 4EFC
|
||||
ED4F 4F00
|
||||
ED50 4F03
|
||||
ED51 4F39
|
||||
ED52 4F56
|
||||
ED53 4F92
|
||||
ED54 4F8A
|
||||
ED55 4F9A
|
||||
ED56 4F94
|
||||
ED57 4FCD
|
||||
ED58 5040
|
||||
ED59 5022
|
||||
ED5A 4FFF
|
||||
ED5B 501E
|
||||
ED5C 5046
|
||||
ED5D 5070
|
||||
ED5E 5042
|
||||
ED5F 5094
|
||||
ED60 50F4
|
||||
ED61 50D8
|
||||
ED62 514A
|
||||
ED63 5164
|
||||
ED64 519D
|
||||
ED65 51BE
|
||||
ED66 51EC
|
||||
ED67 5215
|
||||
ED68 529C
|
||||
ED69 52A6
|
||||
ED6A 52C0
|
||||
ED6B 52DB
|
||||
ED6C 5300
|
||||
ED6D 5307
|
||||
ED6E 5324
|
||||
ED6F 5372
|
||||
ED70 5393
|
||||
ED71 53B2
|
||||
ED72 53DD
|
||||
ED73 FA0E
|
||||
ED74 549C
|
||||
ED75 548A
|
||||
ED76 54A9
|
||||
ED77 54FF
|
||||
ED78 5586
|
||||
ED79 5759
|
||||
ED7A 5765
|
||||
ED7B 57AC
|
||||
ED7C 57C8
|
||||
ED7D 57C7
|
||||
ED7E FA0F
|
||||
ED80 FA10
|
||||
ED81 589E
|
||||
ED82 58B2
|
||||
ED83 590B
|
||||
ED84 5953
|
||||
ED85 595B
|
||||
ED86 595D
|
||||
ED87 5963
|
||||
ED88 59A4
|
||||
ED89 59BA
|
||||
ED8A 5B56
|
||||
ED8B 5BC0
|
||||
ED8C 752F
|
||||
ED8D 5BD8
|
||||
ED8E 5BEC
|
||||
ED8F 5C1E
|
||||
ED90 5CA6
|
||||
ED91 5CBA
|
||||
ED92 5CF5
|
||||
ED93 5D27
|
||||
ED94 5D53
|
||||
ED95 FA11
|
||||
ED96 5D42
|
||||
ED97 5D6D
|
||||
ED98 5DB8
|
||||
ED99 5DB9
|
||||
ED9A 5DD0
|
||||
ED9B 5F21
|
||||
ED9C 5F34
|
||||
ED9D 5F67
|
||||
ED9E 5FB7
|
||||
ED9F 5FDE
|
||||
EDA0 605D
|
||||
EDA1 6085
|
||||
EDA2 608A
|
||||
EDA3 60DE
|
||||
EDA4 60D5
|
||||
EDA5 6120
|
||||
EDA6 60F2
|
||||
EDA7 6111
|
||||
EDA8 6137
|
||||
EDA9 6130
|
||||
EDAA 6198
|
||||
EDAB 6213
|
||||
EDAC 62A6
|
||||
EDAD 63F5
|
||||
EDAE 6460
|
||||
EDAF 649D
|
||||
EDB0 64CE
|
||||
EDB1 654E
|
||||
EDB2 6600
|
||||
EDB3 6615
|
||||
EDB4 663B
|
||||
EDB5 6609
|
||||
EDB6 662E
|
||||
EDB7 661E
|
||||
EDB8 6624
|
||||
EDB9 6665
|
||||
EDBA 6657
|
||||
EDBB 6659
|
||||
EDBC FA12
|
||||
EDBD 6673
|
||||
EDBE 6699
|
||||
EDBF 66A0
|
||||
EDC0 66B2
|
||||
EDC1 66BF
|
||||
EDC2 66FA
|
||||
EDC3 670E
|
||||
EDC4 F929
|
||||
EDC5 6766
|
||||
EDC6 67BB
|
||||
EDC7 6852
|
||||
EDC8 67C0
|
||||
EDC9 6801
|
||||
EDCA 6844
|
||||
EDCB 68CF
|
||||
EDCC FA13
|
||||
EDCD 6968
|
||||
EDCE FA14
|
||||
EDCF 6998
|
||||
EDD0 69E2
|
||||
EDD1 6A30
|
||||
EDD2 6A6B
|
||||
EDD3 6A46
|
||||
EDD4 6A73
|
||||
EDD5 6A7E
|
||||
EDD6 6AE2
|
||||
EDD7 6AE4
|
||||
EDD8 6BD6
|
||||
EDD9 6C3F
|
||||
EDDA 6C5C
|
||||
EDDB 6C86
|
||||
EDDC 6C6F
|
||||
EDDD 6CDA
|
||||
EDDE 6D04
|
||||
EDDF 6D87
|
||||
EDE0 6D6F
|
||||
EDE1 6D96
|
||||
EDE2 6DAC
|
||||
EDE3 6DCF
|
||||
EDE4 6DF8
|
||||
EDE5 6DF2
|
||||
EDE6 6DFC
|
||||
EDE7 6E39
|
||||
EDE8 6E5C
|
||||
EDE9 6E27
|
||||
EDEA 6E3C
|
||||
EDEB 6EBF
|
||||
EDEC 6F88
|
||||
EDED 6FB5
|
||||
EDEE 6FF5
|
||||
EDEF 7005
|
||||
EDF0 7007
|
||||
EDF1 7028
|
||||
EDF2 7085
|
||||
EDF3 70AB
|
||||
EDF4 710F
|
||||
EDF5 7104
|
||||
EDF6 715C
|
||||
EDF7 7146
|
||||
EDF8 7147
|
||||
EDF9 FA15
|
||||
EDFA 71C1
|
||||
EDFB 71FE
|
||||
EDFC 72B1
|
||||
EE40 72BE
|
||||
EE41 7324
|
||||
EE42 FA16
|
||||
EE43 7377
|
||||
EE44 73BD
|
||||
EE45 73C9
|
||||
EE46 73D6
|
||||
EE47 73E3
|
||||
EE48 73D2
|
||||
EE49 7407
|
||||
EE4A 73F5
|
||||
EE4B 7426
|
||||
EE4C 742A
|
||||
EE4D 7429
|
||||
EE4E 742E
|
||||
EE4F 7462
|
||||
EE50 7489
|
||||
EE51 749F
|
||||
EE52 7501
|
||||
EE53 756F
|
||||
EE54 7682
|
||||
EE55 769C
|
||||
EE56 769E
|
||||
EE57 769B
|
||||
EE58 76A6
|
||||
EE59 FA17
|
||||
EE5A 7746
|
||||
EE5B 52AF
|
||||
EE5C 7821
|
||||
EE5D 784E
|
||||
EE5E 7864
|
||||
EE5F 787A
|
||||
EE60 7930
|
||||
EE61 FA18
|
||||
EE62 FA19
|
||||
EE63 FA1A
|
||||
EE64 7994
|
||||
EE65 FA1B
|
||||
EE66 799B
|
||||
EE67 7AD1
|
||||
EE68 7AE7
|
||||
EE69 FA1C
|
||||
EE6A 7AEB
|
||||
EE6B 7B9E
|
||||
EE6C FA1D
|
||||
EE6D 7D48
|
||||
EE6E 7D5C
|
||||
EE6F 7DB7
|
||||
EE70 7DA0
|
||||
EE71 7DD6
|
||||
EE72 7E52
|
||||
EE73 7F47
|
||||
EE74 7FA1
|
||||
EE75 FA1E
|
||||
EE76 8301
|
||||
EE77 8362
|
||||
EE78 837F
|
||||
EE79 83C7
|
||||
EE7A 83F6
|
||||
EE7B 8448
|
||||
EE7C 84B4
|
||||
EE7D 8553
|
||||
EE7E 8559
|
||||
EE80 856B
|
||||
EE81 FA1F
|
||||
EE82 85B0
|
||||
EE83 FA20
|
||||
EE84 FA21
|
||||
EE85 8807
|
||||
EE86 88F5
|
||||
EE87 8A12
|
||||
EE88 8A37
|
||||
EE89 8A79
|
||||
EE8A 8AA7
|
||||
EE8B 8ABE
|
||||
EE8C 8ADF
|
||||
EE8D FA22
|
||||
EE8E 8AF6
|
||||
EE8F 8B53
|
||||
EE90 8B7F
|
||||
EE91 8CF0
|
||||
EE92 8CF4
|
||||
EE93 8D12
|
||||
EE94 8D76
|
||||
EE95 FA23
|
||||
EE96 8ECF
|
||||
EE97 FA24
|
||||
EE98 FA25
|
||||
EE99 9067
|
||||
EE9A 90DE
|
||||
EE9B FA26
|
||||
EE9C 9115
|
||||
EE9D 9127
|
||||
EE9E 91DA
|
||||
EE9F 91D7
|
||||
EEA0 91DE
|
||||
EEA1 91ED
|
||||
EEA2 91EE
|
||||
EEA3 91E4
|
||||
EEA4 91E5
|
||||
EEA5 9206
|
||||
EEA6 9210
|
||||
EEA7 920A
|
||||
EEA8 923A
|
||||
EEA9 9240
|
||||
EEAA 923C
|
||||
EEAB 924E
|
||||
EEAC 9259
|
||||
EEAD 9251
|
||||
EEAE 9239
|
||||
EEAF 9267
|
||||
EEB0 92A7
|
||||
EEB1 9277
|
||||
EEB2 9278
|
||||
EEB3 92E7
|
||||
EEB4 92D7
|
||||
EEB5 92D9
|
||||
EEB6 92D0
|
||||
EEB7 FA27
|
||||
EEB8 92D5
|
||||
EEB9 92E0
|
||||
EEBA 92D3
|
||||
EEBB 9325
|
||||
EEBC 9321
|
||||
EEBD 92FB
|
||||
EEBE FA28
|
||||
EEBF 931E
|
||||
EEC0 92FF
|
||||
EEC1 931D
|
||||
EEC2 9302
|
||||
EEC3 9370
|
||||
EEC4 9357
|
||||
EEC5 93A4
|
||||
EEC6 93C6
|
||||
EEC7 93DE
|
||||
EEC8 93F8
|
||||
EEC9 9431
|
||||
EECA 9445
|
||||
EECB 9448
|
||||
EECC 9592
|
||||
EECD F9DC
|
||||
EECE FA29
|
||||
EECF 969D
|
||||
EED0 96AF
|
||||
EED1 9733
|
||||
EED2 973B
|
||||
EED3 9743
|
||||
EED4 974D
|
||||
EED5 974F
|
||||
EED6 9751
|
||||
EED7 9755
|
||||
EED8 9857
|
||||
EED9 9865
|
||||
EEDA FA2A
|
||||
EEDB FA2B
|
||||
EEDC 9927
|
||||
EEDD FA2C
|
||||
EEDE 999E
|
||||
EEDF 9A4E
|
||||
EEE0 9AD9
|
||||
EEE1 9ADC
|
||||
EEE2 9B75
|
||||
EEE3 9B72
|
||||
EEE4 9B8F
|
||||
EEE5 9BB1
|
||||
EEE6 9BBB
|
||||
EEE7 9C00
|
||||
EEE8 9D70
|
||||
EEE9 9D6B
|
||||
EEEA FA2D
|
||||
EEEB 9E19
|
||||
EEEC 9ED1
|
||||
EEEF 2170
|
||||
EEF0 2171
|
||||
EEF1 2172
|
||||
EEF2 2173
|
||||
EEF3 2174
|
||||
EEF4 2175
|
||||
EEF5 2176
|
||||
EEF6 2177
|
||||
EEF7 2178
|
||||
EEF8 2179
|
||||
EEF9 FFE2
|
||||
EEFA 00A6
|
||||
EEFB FF07
|
||||
EEFC FF02
|
||||
FA54 FFE2
|
||||
FA5B 2235
|
188
jdk/make/tools/CharsetMapping/IBM948.c2b
Normal file
188
jdk/make/tools/CharsetMapping/IBM948.c2b
Normal file
@ -0,0 +1,188 @@
|
||||
8C40 4E00
|
||||
8C41 4E59
|
||||
8C47 4E8C
|
||||
8C48 4EBA
|
||||
8C49 513F
|
||||
8C4A 5165
|
||||
8C4B 516B
|
||||
8C4C 51E0
|
||||
8C4D 5200
|
||||
8C4F 529B
|
||||
8C50 5315
|
||||
8C51 5341
|
||||
8C52 535C
|
||||
8C53 53C8
|
||||
8C66 53E3
|
||||
8C67 571F
|
||||
8C68 58EB
|
||||
8C69 5915
|
||||
8C6A 5927
|
||||
8C6B 5973
|
||||
8C6C 5B50
|
||||
8C6F 5BF8
|
||||
8C70 5C0F
|
||||
8C71 5C22
|
||||
8C72 5C38
|
||||
8C73 5C71
|
||||
8C75 5DE5
|
||||
8C76 5DF1
|
||||
8C79 5DFE
|
||||
8C7A 5E72
|
||||
8C7B 5EFE
|
||||
8C7C 5F0B
|
||||
8C7D 5F13
|
||||
8CA9 5345
|
||||
8CBE 5FC3
|
||||
8CBF 6208
|
||||
8CC0 6236
|
||||
8CC1 624B
|
||||
8CC3 652F
|
||||
8CC4 6587
|
||||
8CC5 6597
|
||||
8CC6 65A4
|
||||
8CC7 65B9
|
||||
8CC8 65E5
|
||||
8CC9 66F0
|
||||
8CCA 6708
|
||||
8CCB 6728
|
||||
8CCC 6B20
|
||||
8CCD 6B62
|
||||
8CCE 6B79
|
||||
8CCF 6BCB
|
||||
8CD0 6BD4
|
||||
8CD1 6BDB
|
||||
8CD2 6C0F
|
||||
8CD3 6C34
|
||||
8CD4 706B
|
||||
8CD5 722A
|
||||
8CD6 7236
|
||||
8CD7 723B
|
||||
8CD8 7247
|
||||
8CD9 7259
|
||||
8CDA 725B
|
||||
8CDB 72AC
|
||||
8D88 7384
|
||||
8D89 7389
|
||||
8D8A 74DC
|
||||
8D8B 74E6
|
||||
8D8C 7518
|
||||
8D8D 751F
|
||||
8D8E 7528
|
||||
8D90 7530
|
||||
8D94 758B
|
||||
8D95 767D
|
||||
8D96 76AE
|
||||
8D97 76BF
|
||||
8D98 76EE
|
||||
8D99 77DB
|
||||
8D9A 77E2
|
||||
8D9B 77F3
|
||||
8D9C 793A
|
||||
8D9D 79BE
|
||||
8D9E 7A74
|
||||
8D9F 7ACB
|
||||
8E6B 7AF9
|
||||
8E6C 7C73
|
||||
8E6D 7CF8
|
||||
8E6E 7F36
|
||||
8E6F 7F8A
|
||||
8E70 7FBD
|
||||
8E71 8001
|
||||
8E73 800C
|
||||
8E74 8012
|
||||
8E75 8033
|
||||
8E76 807F
|
||||
8E77 8089
|
||||
8E7A 81E3
|
||||
8E7B 81EA
|
||||
8E7C 81F3
|
||||
8E7D 81FC
|
||||
8E7E 820C
|
||||
8E80 821B
|
||||
8E81 821F
|
||||
8E82 826E
|
||||
8E83 8272
|
||||
8E85 866B
|
||||
8E86 8840
|
||||
8E87 884C
|
||||
8E88 8863
|
||||
8FC2 898B
|
||||
8FC3 89D2
|
||||
8FC4 8A00
|
||||
8FC5 8C37
|
||||
8FC6 8C46
|
||||
8FC7 8C55
|
||||
8FC8 8C9D
|
||||
8FC9 8D64
|
||||
8FCA 8D70
|
||||
8FCB 8DB3
|
||||
8FCC 8EAB
|
||||
8FCD 8ECA
|
||||
8FCE 8F9B
|
||||
8FCF 8FB0
|
||||
8FD5 9091
|
||||
8FDA 9149
|
||||
8FDB 91C6
|
||||
8FDC 91CC
|
||||
91D8 91D1
|
||||
91D9 9577
|
||||
91DA 9580
|
||||
91DB 961C
|
||||
91E1 96B9
|
||||
91E2 96E8
|
||||
91E3 9752
|
||||
91E4 975E
|
||||
93F1 9762
|
||||
93F2 9769
|
||||
93F3 97CB
|
||||
93F4 97ED
|
||||
93F5 97F3
|
||||
93F6 9801
|
||||
93F7 98A8
|
||||
93F8 98DB
|
||||
93F9 98DF
|
||||
93FA 9996
|
||||
93FB 9999
|
||||
968B 99AC
|
||||
968C 9AA8
|
||||
968D 9AD8
|
||||
968E 9B25
|
||||
968F 9B32
|
||||
9690 9B3C
|
||||
9942 9B5A
|
||||
9943 9CE5
|
||||
9944 9E75
|
||||
9945 9E7F
|
||||
9946 9EA5
|
||||
9947 9EBB
|
||||
9BA5 9EC3
|
||||
9BA6 9ECD
|
||||
9BA7 9ED1
|
||||
9DED 9F0E
|
||||
9DEE 9F13
|
||||
9DEF 9F20
|
||||
9FF9 9F3B
|
||||
9FFA 9F4A
|
||||
A24E 9F52
|
||||
A3BC 9F8D
|
||||
A3BD 9F9C
|
||||
A942 51F5
|
||||
A943 531A
|
||||
A944 5382
|
||||
A949 56D7
|
||||
A94B 5C6E
|
||||
A94C 5F73
|
||||
A95F 6BB3
|
||||
A961 6C14
|
||||
A962 723F
|
||||
A987 79B8
|
||||
A9E7 7F51
|
||||
A9E8 8278
|
||||
A9ED 864D
|
||||
A9EE 897E
|
||||
AB44 8C78
|
||||
B26C 9ADF
|
||||
B26D 9B2F
|
||||
B975 9EF9
|
||||
BCF5 9EFD
|
||||
C962 9FA0
|
20396
jdk/make/tools/CharsetMapping/IBM948.map
Normal file
20396
jdk/make/tools/CharsetMapping/IBM948.map
Normal file
File diff suppressed because it is too large
Load Diff
10237
jdk/make/tools/CharsetMapping/IBM949.map
Normal file
10237
jdk/make/tools/CharsetMapping/IBM949.map
Normal file
File diff suppressed because it is too large
Load Diff
188
jdk/make/tools/CharsetMapping/IBM950.c2b
Normal file
188
jdk/make/tools/CharsetMapping/IBM950.c2b
Normal file
@ -0,0 +1,188 @@
|
||||
A440 4E00
|
||||
A441 4E59
|
||||
A447 4E8C
|
||||
A448 4EBA
|
||||
A449 513F
|
||||
A44A 5165
|
||||
A44B 516B
|
||||
A44C 51E0
|
||||
A44D 5200
|
||||
A44F 529B
|
||||
A450 5315
|
||||
A451 5341
|
||||
A452 535C
|
||||
A453 53C8
|
||||
A466 53E3
|
||||
A467 571F
|
||||
A468 58EB
|
||||
A469 5915
|
||||
A46A 5927
|
||||
A46B 5973
|
||||
A46C 5B50
|
||||
A46F 5BF8
|
||||
A470 5C0F
|
||||
A471 5C22
|
||||
A472 5C38
|
||||
A473 5C71
|
||||
A475 5DE5
|
||||
A476 5DF1
|
||||
A479 5DFE
|
||||
A47A 5E72
|
||||
A47B 5EFE
|
||||
A47C 5F0B
|
||||
A47D 5F13
|
||||
A4CA 5345
|
||||
A4DF 5FC3
|
||||
A4E0 6208
|
||||
A4E1 6236
|
||||
A4E2 624B
|
||||
A4E4 652F
|
||||
A4E5 6587
|
||||
A4E6 6597
|
||||
A4E7 65A4
|
||||
A4E8 65B9
|
||||
A4E9 65E5
|
||||
A4EA 66F0
|
||||
A4EB 6708
|
||||
A4EC 6728
|
||||
A4ED 6B20
|
||||
A4EE 6B62
|
||||
A4EF 6B79
|
||||
A4F0 6BCB
|
||||
A4F1 6BD4
|
||||
A4F2 6BDB
|
||||
A4F3 6C0F
|
||||
A4F4 6C34
|
||||
A4F5 706B
|
||||
A4F6 722A
|
||||
A4F7 7236
|
||||
A4F8 723B
|
||||
A4F9 7247
|
||||
A4FA 7259
|
||||
A4FB 725B
|
||||
A4FC 72AC
|
||||
A5C8 7384
|
||||
A5C9 7389
|
||||
A5CA 74DC
|
||||
A5CB 74E6
|
||||
A5CC 7518
|
||||
A5CD 751F
|
||||
A5CE 7528
|
||||
A5D0 7530
|
||||
A5D4 758B
|
||||
A5D5 767D
|
||||
A5D6 76AE
|
||||
A5D7 76BF
|
||||
A5D8 76EE
|
||||
A5D9 77DB
|
||||
A5DA 77E2
|
||||
A5DB 77F3
|
||||
A5DC 793A
|
||||
A5DD 79BE
|
||||
A5DE 7A74
|
||||
A5DF 7ACB
|
||||
A6CB 7AF9
|
||||
A6CC 7C73
|
||||
A6CD 7CF8
|
||||
A6CE 7F36
|
||||
A6CF 7F8A
|
||||
A6D0 7FBD
|
||||
A6D1 8001
|
||||
A6D3 800C
|
||||
A6D4 8012
|
||||
A6D5 8033
|
||||
A6D6 807F
|
||||
A6D7 8089
|
||||
A6DA 81E3
|
||||
A6DB 81EA
|
||||
A6DC 81F3
|
||||
A6DD 81FC
|
||||
A6DE 820C
|
||||
A6DF 821B
|
||||
A6E0 821F
|
||||
A6E1 826E
|
||||
A6E2 8272
|
||||
A6E4 866B
|
||||
A6E5 8840
|
||||
A6E6 884C
|
||||
A6E7 8863
|
||||
A8A3 898B
|
||||
A8A4 89D2
|
||||
A8A5 8A00
|
||||
A8A6 8C37
|
||||
A8A7 8C46
|
||||
A8A8 8C55
|
||||
A8A9 8C9D
|
||||
A8AA 8D64
|
||||
A8AB 8D70
|
||||
A8AC 8DB3
|
||||
A8AD 8EAB
|
||||
A8AE 8ECA
|
||||
A8AF 8F9B
|
||||
A8B0 8FB0
|
||||
A8B6 9091
|
||||
A8BB 9149
|
||||
A8BC 91C6
|
||||
A8BD 91CC
|
||||
AAF7 91D1
|
||||
AAF8 9577
|
||||
AAF9 9580
|
||||
AAFA 961C
|
||||
AB41 96B9
|
||||
AB42 96E8
|
||||
AB43 9752
|
||||
AB44 975E
|
||||
ADB1 9762
|
||||
ADB2 9769
|
||||
ADB3 97CB
|
||||
ADB4 97ED
|
||||
ADB5 97F3
|
||||
ADB6 9801
|
||||
ADB7 98A8
|
||||
ADB8 98DB
|
||||
ADB9 98DF
|
||||
ADBA 9996
|
||||
ADBB 9999
|
||||
B0A8 99AC
|
||||
B0A9 9AA8
|
||||
B0AA 9AD8
|
||||
B0AB 9B25
|
||||
B0AC 9B32
|
||||
B0AD 9B3C
|
||||
B3BD 9B5A
|
||||
B3BE 9CE5
|
||||
B3BF 9E75
|
||||
B3C0 9E7F
|
||||
B3C1 9EA5
|
||||
B3C2 9EBB
|
||||
B6C0 9EC3
|
||||
B6C1 9ECD
|
||||
B6C2 9ED1
|
||||
B9A9 9F0E
|
||||
B9AA 9F13
|
||||
B9AB 9F20
|
||||
BBF3 9F3B
|
||||
BBF4 9F4A
|
||||
BEA6 9F52
|
||||
C073 9F8D
|
||||
C074 9F9C
|
||||
C942 51F5
|
||||
C943 531A
|
||||
C944 5382
|
||||
C949 56D7
|
||||
C94B 5C6E
|
||||
C94C 5F73
|
||||
C95F 6BB3
|
||||
C961 6C14
|
||||
C962 723F
|
||||
C9A8 79B8
|
||||
CA49 7F51
|
||||
CA4A 8278
|
||||
CA4F 864D
|
||||
CA50 897E
|
||||
CBA4 8C78
|
||||
D449 9ADF
|
||||
D44A 9B2F
|
||||
DCB0 9EF9
|
||||
E0EF 9EFD
|
||||
EFB6 9FA0
|
20393
jdk/make/tools/CharsetMapping/IBM950.map
Normal file
20393
jdk/make/tools/CharsetMapping/IBM950.map
Normal file
File diff suppressed because it is too large
Load Diff
18
jdk/make/tools/CharsetMapping/IBM970.c2b
Normal file
18
jdk/make/tools/CharsetMapping/IBM970.c2b
Normal file
@ -0,0 +1,18 @@
|
||||
A1A4 00B7
|
||||
A1A9 00AD
|
||||
A1AA 2015
|
||||
A1AD 223C
|
||||
A2A6 FF5E
|
||||
A2C1 2299
|
||||
A3DC 20A9
|
||||
#
|
||||
# see .map file for the info regarding following 3 entries
|
||||
#
|
||||
a1aa 6950
|
||||
a1a9 84f1
|
||||
a1ad cf7f
|
||||
|
||||
|
||||
|
||||
|
||||
|
8581
jdk/make/tools/CharsetMapping/IBM970.map
Normal file
8581
jdk/make/tools/CharsetMapping/IBM970.map
Normal file
File diff suppressed because it is too large
Load Diff
@ -34,7 +34,7 @@ PROGRAM = charsetmapping
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
BUILDTOOL_SOURCE_ROOT = $(BUILDDIR)/tools/src
|
||||
BUILDTOOL_MAIN = $(PKGDIR)/GenerateMapping.java
|
||||
BUILDTOOL_MAIN = $(PKGDIR)/Main.java
|
||||
|
||||
#
|
||||
# Build tool jar rules.
|
||||
|
16
jdk/make/tools/CharsetMapping/dbcs
Normal file
16
jdk/make/tools/CharsetMapping/dbcs
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
#clzName csName hisName dbtype pkg ascii b1min b1max b2min b2max
|
||||
#
|
||||
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
|
||||
IBM930 x-IBM930 Cp930 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
|
||||
IBM933 x-IBM933 Cp933 ebcdic sun.nio.cs.ext false 0x40 0xdd 0x40 0xfe
|
||||
IBM935 x-IBM935 Cp935 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
|
||||
IBM937 x-IBM937 Cp937 ebcdic sun.nio.cs.ext false 0x40 0xe2 0x40 0xfe
|
||||
IBM939 x-IBM939 Cp939 ebcdic sun.nio.cs.ext false 0x40 0x7f 0x40 0xfe
|
||||
IBM942 x-IBM942 Cp942 basic sun.nio.cs.ext false 0x81 0xfc 0x40 0xfc
|
||||
IBM943 x-IBM943 Cp943 basic sun.nio.cs.ext false 0x81 0xfc 0x40 0xfc
|
||||
IBM948 x-IBM948 Cp948 basic sun.nio.cs.ext true 0x81 0xfe 0x40 0xfc
|
||||
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
|
55446
jdk/make/tools/CharsetMapping/euc_tw.map
Normal file
55446
jdk/make/tools/CharsetMapping/euc_tw.map
Normal file
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@ import java.util.*;
|
||||
|
||||
public class CharsetMapping {
|
||||
public final static char UNMAPPABLE_DECODING = '\uFFFD';
|
||||
public final static int UNMAPPABLE_ENCODING = -1;
|
||||
public final static int UNMAPPABLE_ENCODING = 0xFFFD;
|
||||
|
||||
public static class Entry {
|
||||
public int bs; //byte sequence reps
|
||||
|
285
jdk/make/tools/src/build/tools/charsetmapping/GenerateDBCS.java
Normal file
285
jdk/make/tools/src/build/tools/charsetmapping/GenerateDBCS.java
Normal file
@ -0,0 +1,285 @@
|
||||
/*
|
||||
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package build.tools.charsetmapping;
|
||||
import java.io.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
import java.util.Formatter;
|
||||
import java.util.regex.*;
|
||||
import java.nio.charset.*;
|
||||
import static build.tools.charsetmapping.CharsetMapping.*;
|
||||
|
||||
public class GenerateDBCS {
|
||||
// pattern used by this class to read in mapping table
|
||||
static Pattern mPattern = Pattern.compile("(\\p{XDigit}++)\\s++(\\p{XDigit}++)(\\s++#.*)?");
|
||||
public static void genDBCS(String args[]) throws Exception {
|
||||
|
||||
Scanner s = new Scanner(new File(args[0], args[2]));
|
||||
while (s.hasNextLine()) {
|
||||
String line = s.nextLine();
|
||||
if (line.startsWith("#") || line.length() == 0)
|
||||
continue;
|
||||
String[] fields = line.split("\\s+");
|
||||
if (fields.length < 10) {
|
||||
System.err.println("Misconfiged sbcs line <" + line + ">?");
|
||||
continue;
|
||||
}
|
||||
String clzName = fields[0];
|
||||
String csName = fields[1];
|
||||
String hisName = ("null".equals(fields[2]))?null:fields[2];
|
||||
String type = fields[3].toUpperCase();
|
||||
if ("BASIC".equals(type))
|
||||
type = "";
|
||||
else
|
||||
type = "_" + type;
|
||||
String pkgName = fields[4];
|
||||
boolean isASCII = Boolean.valueOf(fields[5]);
|
||||
int b1Min = toInteger(fields[6]);
|
||||
int b1Max = toInteger(fields[7]);
|
||||
int b2Min = toInteger(fields[8]);
|
||||
int b2Max = toInteger(fields[9]);
|
||||
System.out.printf("%s,%s,%s,%b,%s%n", clzName, csName, hisName, isASCII, pkgName);
|
||||
genClass(args[0], args[1], "DoubleByte-X.java",
|
||||
clzName, csName, hisName, pkgName,
|
||||
isASCII, type,
|
||||
b1Min, b1Max, b2Min, b2Max);
|
||||
}
|
||||
}
|
||||
|
||||
private static int toInteger(String s) {
|
||||
if (s.startsWith("0x") || s.startsWith("0X"))
|
||||
return Integer.valueOf(s.substring(2), 16);
|
||||
else
|
||||
return Integer.valueOf(s);
|
||||
}
|
||||
|
||||
private static void outString(Formatter out,
|
||||
char[] cc, int off, int end,
|
||||
String closure)
|
||||
{
|
||||
while (off < end) {
|
||||
out.format(" \"");
|
||||
for (int j = 0; j < 8; j++) {
|
||||
if (off == end)
|
||||
break;
|
||||
char c = cc[off++];
|
||||
switch (c) {
|
||||
case '\b':
|
||||
out.format("\\b"); break;
|
||||
case '\t':
|
||||
out.format("\\t"); break;
|
||||
case '\n':
|
||||
out.format("\\n"); break;
|
||||
case '\f':
|
||||
out.format("\\f"); break;
|
||||
case '\r':
|
||||
out.format("\\r"); break;
|
||||
case '\"':
|
||||
out.format("\\\""); break;
|
||||
case '\'':
|
||||
out.format("\\'"); break;
|
||||
case '\\':
|
||||
out.format("\\\\"); break;
|
||||
default:
|
||||
out.format("\\u%04X", c & 0xffff);
|
||||
}
|
||||
}
|
||||
if (off == end)
|
||||
out.format("\" %s%n", closure);
|
||||
else
|
||||
out.format("\" + %n");
|
||||
}
|
||||
}
|
||||
|
||||
private static void outString(Formatter out,
|
||||
char[] db,
|
||||
int b1,
|
||||
int b2Min, int b2Max,
|
||||
String closure)
|
||||
{
|
||||
char[] cc = new char[b2Max - b2Min + 1];
|
||||
int off = 0;
|
||||
for (int b2 = b2Min; b2 <= b2Max; b2++) {
|
||||
cc[off++] = db[(b1 << 8) | b2];
|
||||
}
|
||||
outString(out, cc, 0, cc.length, closure);
|
||||
}
|
||||
|
||||
private static void genClass(String srcDir, String dstDir, String template,
|
||||
String clzName,
|
||||
String csName,
|
||||
String hisName,
|
||||
String pkgName,
|
||||
boolean isASCII,
|
||||
String type,
|
||||
int b1Min, int b1Max,
|
||||
int b2Min, int b2Max)
|
||||
throws Exception
|
||||
{
|
||||
|
||||
StringBuilder b2cSB = new StringBuilder();
|
||||
StringBuilder b2cNRSB = new StringBuilder();
|
||||
StringBuilder c2bNRSB = new StringBuilder();
|
||||
|
||||
char[] db = new char[0x10000];
|
||||
char[] c2bIndex = new char[0x100];
|
||||
int c2bOff = 0x100; // first 0x100 for unmappable segs
|
||||
|
||||
Arrays.fill(db, UNMAPPABLE_DECODING);
|
||||
Arrays.fill(c2bIndex, UNMAPPABLE_DECODING);
|
||||
|
||||
char[] b2cIndex = new char[0x100];
|
||||
Arrays.fill(b2cIndex, UNMAPPABLE_DECODING);
|
||||
|
||||
// (1)read in .map to parse all b->c entries
|
||||
FileInputStream in = new FileInputStream(new File(srcDir, clzName + ".map"));
|
||||
Parser p = new Parser(in, mPattern);
|
||||
Entry e = null;
|
||||
while ((e = p.next()) != null) {
|
||||
db[e.bs] = (char)e.cp;
|
||||
|
||||
if (e.bs > 0x100 && // db
|
||||
b2cIndex[e.bs>>8] == UNMAPPABLE_DECODING) {
|
||||
b2cIndex[e.bs>>8] = 1;
|
||||
}
|
||||
|
||||
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
|
||||
c2bOff += 0x100;
|
||||
c2bIndex[e.cp>>8] = 1;
|
||||
}
|
||||
}
|
||||
Formatter fm = new Formatter(b2cSB);
|
||||
fm.format("%n static final String b2cSBStr =%n");
|
||||
outString(fm, db, 0x00, 0x100, ";");
|
||||
|
||||
fm.format("%n static final String[] b2cStr = {%n");
|
||||
for (int i = 0; i < 0x100; i++) {
|
||||
if (b2cIndex[i] == UNMAPPABLE_DECODING) {
|
||||
fm.format(" null,%n"); //unmappable segments
|
||||
} else {
|
||||
outString(fm, db, i, b2Min, b2Max, ",");
|
||||
}
|
||||
}
|
||||
|
||||
fm.format(" };%n");
|
||||
fm.close();
|
||||
|
||||
// (2)now parse the .nr file which includes "b->c" non-roundtrip entries
|
||||
File f = new File(srcDir, clzName + ".nr");
|
||||
if (f.exists()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
in = new FileInputStream(f);
|
||||
p = new Parser(in, mPattern);
|
||||
e = null;
|
||||
while ((e = p.next()) != null) {
|
||||
// A <b,c> pair
|
||||
sb.append((char)e.bs);
|
||||
sb.append((char)e.cp);
|
||||
}
|
||||
char[] nr = sb.toString().toCharArray();
|
||||
fm = new Formatter(b2cNRSB);
|
||||
fm.format("String b2cNR =%n");
|
||||
outString(fm, nr, 0, nr.length, ";");
|
||||
fm.close();
|
||||
} else {
|
||||
b2cNRSB.append("String b2cNR = null;");
|
||||
}
|
||||
|
||||
// (3)finally the .c2b file which includes c->b non-roundtrip entries
|
||||
f = new File(srcDir, clzName + ".c2b");
|
||||
if (f.exists()) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
in = new FileInputStream(f);
|
||||
p = new Parser(in, mPattern);
|
||||
e = null;
|
||||
while ((e = p.next()) != null) {
|
||||
// A <b,c> pair
|
||||
if (c2bIndex[e.cp>>8] == UNMAPPABLE_DECODING) {
|
||||
c2bOff += 0x100;
|
||||
c2bIndex[e.cp>>8] = 1;
|
||||
}
|
||||
sb.append((char)e.bs);
|
||||
sb.append((char)e.cp);
|
||||
}
|
||||
char[] nr = sb.toString().toCharArray();
|
||||
fm = new Formatter(c2bNRSB);
|
||||
fm.format("String c2bNR =%n");
|
||||
outString(fm, nr, 0, nr.length, ";");
|
||||
fm.close();
|
||||
} else {
|
||||
c2bNRSB.append("String c2bNR = null;");
|
||||
}
|
||||
|
||||
// (4)it's time to generate the source file
|
||||
String b2c = b2cSB.toString();
|
||||
String b2cNR = b2cNRSB.toString();
|
||||
String c2bNR = c2bNRSB.toString();
|
||||
|
||||
Scanner s = new Scanner(new File(srcDir, template));
|
||||
PrintStream out = new PrintStream(new FileOutputStream(
|
||||
new File(dstDir, clzName + ".java")));
|
||||
if (hisName == null)
|
||||
hisName = "";
|
||||
|
||||
while (s.hasNextLine()) {
|
||||
String line = s.nextLine();
|
||||
if (line.indexOf("$") == -1) {
|
||||
out.println(line);
|
||||
continue;
|
||||
}
|
||||
line = line.replace("$PACKAGE$" , pkgName)
|
||||
.replace("$IMPLEMENTS$", (hisName == null)?
|
||||
"" : "implements HistoricallyNamedCharset")
|
||||
.replace("$NAME_CLZ$", clzName)
|
||||
.replace("$NAME_ALIASES$",
|
||||
"sun.nio.cs".equals(pkgName) ?
|
||||
"StandardCharsets.aliases_" + clzName :
|
||||
"ExtendedCharsets.aliasesFor(\"" + csName + "\")")
|
||||
.replace("$NAME_CS$" , csName)
|
||||
.replace("$CONTAINS$", isASCII ?
|
||||
" return ((cs.name().equals(\"US-ASCII\")) || (cs instanceof "
|
||||
+ clzName + "));":
|
||||
" return (cs instanceof " + clzName + ");")
|
||||
.replace("$HISTORICALNAME$",
|
||||
(hisName == null)? "" :
|
||||
" public String historicalName() { return \"" + hisName + "\"; }")
|
||||
.replace("$DECTYPE$", type)
|
||||
.replace("$ENCTYPE$", type)
|
||||
.replace("$B1MIN$" , "0x" + Integer.toString(b1Min, 16))
|
||||
.replace("$B1MAX$" , "0x" + Integer.toString(b1Max, 16))
|
||||
.replace("$B2MIN$" , "0x" + Integer.toString(b2Min, 16))
|
||||
.replace("$B2MAX$" , "0x" + Integer.toString(b2Max, 16))
|
||||
.replace("$B2C$", b2c)
|
||||
.replace("$C2BLENGTH$", "0x" + Integer.toString(c2bOff, 16))
|
||||
.replace("$NONROUNDTRIP_B2C$", b2cNR)
|
||||
.replace("$NONROUNDTRIP_C2B$", c2bNR);
|
||||
|
||||
out.println(line);
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
}
|
@ -0,0 +1,246 @@
|
||||
/*
|
||||
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Sun designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package build.tools.charsetmapping;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
import java.util.Formatter;
|
||||
import java.util.regex.*;
|
||||
import java.nio.charset.*;
|
||||
import static build.tools.charsetmapping.CharsetMapping.*;
|
||||
|
||||
public class GenerateEUC_TW {
|
||||
|
||||
public static void genEUC_TW(String args[]) throws Exception {
|
||||
genClass(new FileInputStream(new File(args[0], "euc_tw.map")),
|
||||
new PrintStream(new File(args[1], "EUC_TWMapping.java"), "ISO-8859-1"),
|
||||
getCopyright(new File(args[3])));
|
||||
}
|
||||
|
||||
private static String getCopyright(File f) throws IOException {
|
||||
Scanner s = new Scanner(f, "ISO-8859-1");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (s.hasNextLine()) {
|
||||
String ln = s.nextLine();
|
||||
sb.append(ln + "\n");
|
||||
// assume we have the copyright as the first comment
|
||||
if (ln.matches("^\\s\\*\\/$"))
|
||||
break;
|
||||
}
|
||||
s.close();
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static char[] toCharArray(int[] db,
|
||||
int b1Min, int b1Max,
|
||||
int b2Min, int b2Max)
|
||||
{
|
||||
char[] ca = new char[(b1Max - b1Min + 1) * (b2Max - b2Min + 1)];
|
||||
int off = 0;
|
||||
for (int b1 = b1Min; b1 <= b1Max; b1++) {
|
||||
for (int b2 = b2Min; b2 <= b2Max; b2++) {
|
||||
ca[off++] = (char)(db[b1 * 256 + b2] & 0xffff);
|
||||
}
|
||||
}
|
||||
return ca;
|
||||
}
|
||||
|
||||
private static void toChar(Formatter out, String fmt, char c) {
|
||||
switch (c) {
|
||||
case '\b':
|
||||
out.format("\\b"); break;
|
||||
case '\t':
|
||||
out.format("\\t"); break;
|
||||
case '\n':
|
||||
out.format("\\n"); break;
|
||||
case '\f':
|
||||
out.format("\\f"); break;
|
||||
case '\r':
|
||||
out.format("\\r"); break;
|
||||
case '\"':
|
||||
out.format("\\\""); break;
|
||||
case '\'':
|
||||
out.format("\\'"); break;
|
||||
case '\\':
|
||||
out.format("\\\\"); break;
|
||||
default:
|
||||
out.format(fmt, c & 0xffff);
|
||||
}
|
||||
}
|
||||
|
||||
private static void toString(Formatter out, char[] date, String endStr)
|
||||
{
|
||||
int off = 0;
|
||||
int end = date.length;
|
||||
while (off < end) {
|
||||
out.format(" \"");
|
||||
for (int j = 0; j < 8 && off < end; j++) {
|
||||
toChar(out, "\\u%04X", date[off++]);
|
||||
}
|
||||
if (off == end)
|
||||
out.format("\"%s%n", endStr);
|
||||
else
|
||||
out.format("\" +%n");
|
||||
}
|
||||
}
|
||||
|
||||
private static char[] toCharArray(byte[] ba,
|
||||
int b1Min, int b1Max,
|
||||
int b2Min, int b2Max)
|
||||
{
|
||||
char[] ca = new char[(b1Max - b1Min + 1) * (b2Max - b2Min + 1)];
|
||||
int off = 0;
|
||||
for (int b1 = b1Min; b1 <= b1Max; b1++) {
|
||||
int b2 = b2Min;
|
||||
while (b2 <= b2Max) {
|
||||
ca[off++] = (char)(((ba[b1 * 256 + b2++] & 0xff) << 8) |
|
||||
(ba[b1 * 256 + b2++] & 0xff));
|
||||
}
|
||||
}
|
||||
return ca;
|
||||
}
|
||||
|
||||
private static void toCharArray(Formatter out, char[] date) {
|
||||
int off = 0;
|
||||
int end = date.length;
|
||||
while (off < end) {
|
||||
out.format(" ");
|
||||
for (int j = 0; j < 8 && off < end; j++) {
|
||||
toChar(out, "'\\u%04X',", date[off++]);
|
||||
}
|
||||
out.format("%n");
|
||||
}
|
||||
}
|
||||
|
||||
private static int initC2BIndex(char[] index) {
|
||||
int off = 0;
|
||||
for (int i = 0; i < index.length; i++) {
|
||||
if (index[i] != 0) {
|
||||
index[i] = (char)off;
|
||||
off += 0x100;
|
||||
} else {
|
||||
index[i] = CharsetMapping.UNMAPPABLE_ENCODING;
|
||||
}
|
||||
}
|
||||
return off;
|
||||
}
|
||||
|
||||
private static Pattern euctw = Pattern.compile("(?:8ea)?(\\p{XDigit}++)\\s++(\\p{XDigit}++)?\\s*+.*");
|
||||
|
||||
private static void genClass(InputStream is, PrintStream ps, String copyright)
|
||||
throws Exception
|
||||
{
|
||||
// ranges of byte1 and byte2, something should come from a "config" file
|
||||
int b1Min = 0xa1;
|
||||
int b1Max = 0xfe;
|
||||
int b2Min = 0xa1;
|
||||
int b2Max = 0xfe;
|
||||
|
||||
try {
|
||||
int[][] db = new int[8][0x10000]; // doublebyte
|
||||
byte[] suppFlag = new byte[0x10000]; // doublebyte
|
||||
char[] indexC2B = new char[256];
|
||||
char[] indexC2BSupp = new char[256];
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (int j = 0; j < 0x10000; j++)
|
||||
db[i][j] = CharsetMapping.UNMAPPABLE_DECODING;
|
||||
|
||||
CharsetMapping.Parser p = new CharsetMapping.Parser(is, euctw);
|
||||
CharsetMapping.Entry e = null;
|
||||
while ((e = p.next()) != null) {
|
||||
int plane = 0;
|
||||
if (e.bs >= 0x10000) {
|
||||
plane = ((e.bs >> 16) & 0xff) - 1;
|
||||
if (plane >= 14)
|
||||
plane = 7;
|
||||
e.bs = e.bs & 0xffff;
|
||||
}
|
||||
db[plane][e.bs] = e.cp;
|
||||
if (e.cp < 0x10000) {
|
||||
indexC2B[e.cp>>8] = 1;
|
||||
} else {
|
||||
indexC2BSupp[(e.cp&0xffff)>>8] = 1;
|
||||
suppFlag[e.bs] |= (1 << plane);
|
||||
}
|
||||
}
|
||||
|
||||
StringBuilder out = new StringBuilder();
|
||||
Formatter fm = new Formatter(out);
|
||||
|
||||
fm.format(copyright);
|
||||
fm.format("%n// -- This file was mechanically generated: Do not edit! -- //%n");
|
||||
fm.format("package sun.nio.cs.ext;%n%n");
|
||||
fm.format("class EUC_TWMapping {%n%n");
|
||||
|
||||
// boundaries
|
||||
fm.format(" final static int b1Min = 0x%x;%n", b1Min);
|
||||
fm.format(" final static int b1Max = 0x%x;%n", b1Max);
|
||||
fm.format(" final static int b2Min = 0x%x;%n", b2Min);
|
||||
fm.format(" final static int b2Max = 0x%x;%n", b2Max);
|
||||
|
||||
// b2c tables
|
||||
fm.format("%n final static String[] b2c = {%n");
|
||||
for (int plane = 0; plane < 8; plane++) {
|
||||
fm.format(" // Plane %d%n", plane);
|
||||
toString(fm, toCharArray(db[plane],
|
||||
b1Min, b1Max, b2Min, b2Max),
|
||||
",");
|
||||
fm.format("%n");
|
||||
}
|
||||
fm.format(" };%n");
|
||||
|
||||
// c2bIndex
|
||||
fm.format("%n static final int C2BSIZE = 0x%x;%n",
|
||||
initC2BIndex(indexC2B));
|
||||
fm.format("%n static char[] c2bIndex = new char[] {%n");
|
||||
toCharArray(fm, indexC2B);
|
||||
fm.format(" };%n");
|
||||
|
||||
// c2bIndexSupp
|
||||
fm.format("%n static final int C2BSUPPSIZE = 0x%x;%n",
|
||||
initC2BIndex(indexC2BSupp));
|
||||
fm.format("%n static char[] c2bSuppIndex = new char[] {%n");
|
||||
toCharArray(fm, indexC2BSupp);
|
||||
fm.format(" };%n");
|
||||
|
||||
// suppFlags
|
||||
fm.format("%n static String b2cIsSuppStr =%n");
|
||||
toString(fm, toCharArray(suppFlag,
|
||||
b1Min, b1Max, b2Min, b2Max),
|
||||
";");
|
||||
|
||||
fm.format("}");
|
||||
fm.close();
|
||||
|
||||
ps.println(out.toString());
|
||||
ps.close();
|
||||
} catch (Exception x) {
|
||||
x.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
@ -27,15 +27,11 @@ package build.tools.charsetmapping;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.regex.*;
|
||||
import build.tools.charsetmapping.GenerateSBCS;
|
||||
import static build.tools.charsetmapping.CharsetMapping.*;
|
||||
|
||||
public class GenerateMapping {
|
||||
public static void main(String argv[]) throws IOException {
|
||||
if (argv.length < 2) {
|
||||
System.out.println("Usage: java GenerateMapping fMap fDat");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
public static void genMapping(String argv[]) throws IOException {
|
||||
genDataJIS0213(new FileInputStream(argv[0]),
|
||||
new FileOutputStream(argv[1]));
|
||||
}
|
||||
|
@ -34,11 +34,8 @@ import java.nio.charset.*;
|
||||
import static build.tools.charsetmapping.CharsetMapping.*;
|
||||
|
||||
public class GenerateSBCS {
|
||||
public static void main(String args[]) throws Exception {
|
||||
if (args.length < 3) {
|
||||
System.err.println("Usage: java GenSBCS srcDir dstDir config");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
public static void genSBCS(String args[]) throws Exception {
|
||||
|
||||
Scanner s = new Scanner(new File(args[0], args[2]));
|
||||
while (s.hasNextLine()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,38 +23,32 @@
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package build.tools.charsetmapping;
|
||||
|
||||
package sun.tools.javap;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* Stores exception table data in code attribute.
|
||||
*
|
||||
* @author Sucheta Dambalkar (Adopted code from jdis)
|
||||
*/
|
||||
class TrapData {
|
||||
short start_pc, end_pc, handler_pc, catch_cpx;
|
||||
int num;
|
||||
public class Main {
|
||||
|
||||
public static void main(String args[]) throws Exception {
|
||||
if (args.length < 3 ) {
|
||||
System.out.println("Usage: java -jar charsetmapping.jar src dst mType...");
|
||||
System.exit(1);
|
||||
}
|
||||
if ("sbcs".equals(args[2]) || "extsbcs".equals(args[2])) {
|
||||
GenerateSBCS.genSBCS(args);
|
||||
} else if ("dbcs".equals(args[2])) {
|
||||
GenerateDBCS.genDBCS(args);
|
||||
|
||||
/**
|
||||
* Read and store exception table data in code attribute.
|
||||
*/
|
||||
public TrapData(DataInputStream in, int num) throws IOException {
|
||||
this.num=num;
|
||||
start_pc = in.readShort();
|
||||
end_pc=in.readShort();
|
||||
handler_pc=in.readShort();
|
||||
catch_cpx=in.readShort();
|
||||
}
|
||||
|
||||
/**
|
||||
* returns recommended identifier
|
||||
*/
|
||||
public String ident() {
|
||||
return "t"+num;
|
||||
} else if ("euctw".equals(args[2])) {
|
||||
if (args.length != 4) {
|
||||
System.out.println("Usage: java -jar charsetmapping.jar srcDir dstDir euctw copyrightSrc");
|
||||
System.exit(1);
|
||||
}
|
||||
GenerateEUC_TW.genEUC_TW(args);
|
||||
} else if ("sjis0213".equals(args[2])) {
|
||||
GenerateMapping.genMapping(args);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -506,6 +506,19 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
|
||||
writeFileHeader(fileSize, offset);
|
||||
|
||||
/* According to MSDN description, the top-down image layout
|
||||
* is allowed only if compression type is BI_RGB or BI_BITFIELDS.
|
||||
* Images with any other compression type must be wrote in the
|
||||
* bottom-up layout.
|
||||
*/
|
||||
if (compressionType == BMPConstants.BI_RGB ||
|
||||
compressionType == BMPConstants.BI_BITFIELDS)
|
||||
{
|
||||
isTopDown = bmpParam.isTopDown();
|
||||
} else {
|
||||
isTopDown = false;
|
||||
}
|
||||
|
||||
writeInfoHeader(headerSize, bitsPerPixel);
|
||||
|
||||
// compression
|
||||
@ -588,8 +601,6 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
return;
|
||||
}
|
||||
|
||||
isTopDown = bmpParam.isTopDown();
|
||||
|
||||
int maxBandOffset = bandOffsets[0];
|
||||
for (int i = 1; i < bandOffsets.length; i++)
|
||||
if (bandOffsets[i] > maxBandOffset)
|
||||
@ -1299,7 +1310,7 @@ public class BMPImageWriter extends ImageWriter implements BMPConstants {
|
||||
stream.writeInt(w);
|
||||
|
||||
// height
|
||||
stream.writeInt(h);
|
||||
stream.writeInt(isTopDown ? -h : h);
|
||||
|
||||
// number of planes
|
||||
stream.writeShort(1);
|
||||
|
@ -27,6 +27,8 @@ package com.sun.imageio.plugins.common;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.io.IOException;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
|
||||
/**
|
||||
* This class contains utility methods that may be useful to ImageReader
|
||||
@ -198,4 +200,17 @@ public class ReaderUtil {
|
||||
vals, 1);
|
||||
return vals;
|
||||
}
|
||||
|
||||
public static int readMultiByteInteger(ImageInputStream iis)
|
||||
throws IOException
|
||||
{
|
||||
int value = iis.readByte();
|
||||
int result = value & 0x7f;
|
||||
while((value & 0x80) == 0x80) {
|
||||
result <<= 7;
|
||||
value = iis.readByte();
|
||||
result |= (value & 0x7f);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -215,17 +215,21 @@ public class JPEG {
|
||||
public static class JCS {
|
||||
public static final ColorSpace sRGB =
|
||||
ColorSpace.getInstance(ColorSpace.CS_sRGB);
|
||||
public static final ColorSpace YCC;
|
||||
|
||||
static {
|
||||
ColorSpace cs = null;
|
||||
try {
|
||||
cs = ColorSpace.getInstance(ColorSpace.CS_PYCC);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// PYCC.pf may not always be installed
|
||||
} finally {
|
||||
YCC = cs;
|
||||
private static ColorSpace YCC = null;
|
||||
private static boolean yccInited = false;
|
||||
|
||||
public static ColorSpace getYCC() {
|
||||
if (!yccInited) {
|
||||
try {
|
||||
YCC = ColorSpace.getInstance(ColorSpace.CS_PYCC);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// PYCC.pf may not always be installed
|
||||
} finally {
|
||||
yccInited = true;
|
||||
}
|
||||
}
|
||||
return YCC;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,7 @@ import java.awt.Rectangle;
|
||||
import java.awt.color.ColorSpace;
|
||||
import java.awt.color.ICC_Profile;
|
||||
import java.awt.color.ICC_ColorSpace;
|
||||
import java.awt.color.CMMException;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.Raster;
|
||||
import java.awt.image.WritableRaster;
|
||||
@ -53,6 +54,7 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Iterator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
import sun.java2d.Disposer;
|
||||
import sun.java2d.DisposerRecord;
|
||||
@ -215,51 +217,6 @@ public class JPEGImageReader extends ImageReader {
|
||||
/** The DisposerRecord that handles the actual disposal of this reader. */
|
||||
private DisposerRecord disposerRecord;
|
||||
|
||||
/**
|
||||
* Maintain an array of the default image types corresponding to the
|
||||
* various supported IJG colorspace codes.
|
||||
*/
|
||||
private static final ImageTypeSpecifier [] defaultTypes =
|
||||
new ImageTypeSpecifier [JPEG.NUM_JCS_CODES];
|
||||
|
||||
static {
|
||||
defaultTypes[JPEG.JCS_GRAYSCALE] =
|
||||
ImageTypeSpecifier.createFromBufferedImageType
|
||||
(BufferedImage.TYPE_BYTE_GRAY);
|
||||
defaultTypes[JPEG.JCS_RGB] =
|
||||
ImageTypeSpecifier.createInterleaved
|
||||
(JPEG.JCS.sRGB,
|
||||
JPEG.bOffsRGB,
|
||||
DataBuffer.TYPE_BYTE,
|
||||
false,
|
||||
false);
|
||||
defaultTypes[JPEG.JCS_RGBA] =
|
||||
ImageTypeSpecifier.createPacked
|
||||
(JPEG.JCS.sRGB,
|
||||
0xff000000,
|
||||
0x00ff0000,
|
||||
0x0000ff00,
|
||||
0x000000ff,
|
||||
DataBuffer.TYPE_INT,
|
||||
false);
|
||||
if (JPEG.JCS.YCC != null) {
|
||||
defaultTypes[JPEG.JCS_YCC] =
|
||||
ImageTypeSpecifier.createInterleaved
|
||||
(JPEG.JCS.YCC,
|
||||
JPEG.bandOffsets[2],
|
||||
DataBuffer.TYPE_BYTE,
|
||||
false,
|
||||
false);
|
||||
defaultTypes[JPEG.JCS_YCCA] =
|
||||
ImageTypeSpecifier.createInterleaved
|
||||
(JPEG.JCS.YCC,
|
||||
JPEG.bandOffsets[3],
|
||||
DataBuffer.TYPE_BYTE,
|
||||
true,
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
/** Sets up static C structures. */
|
||||
private static native void initReaderIDs(Class iisClass,
|
||||
Class qTableClass,
|
||||
@ -673,6 +630,17 @@ public class JPEGImageReader extends ImageReader {
|
||||
!java.util.Arrays.equals(oldData, newData))
|
||||
{
|
||||
iccCS = new ICC_ColorSpace(newProfile);
|
||||
// verify new color space
|
||||
try {
|
||||
float[] colors = iccCS.fromRGB(new float[] {1f, 0f, 0f});
|
||||
} catch (CMMException e) {
|
||||
/*
|
||||
* Embedded profile seems to be corrupted.
|
||||
* Ignore this profile.
|
||||
*/
|
||||
iccCS = null;
|
||||
warningOccurred(WARNING_IGNORE_INVALID_ICC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -706,11 +674,11 @@ public class JPEGImageReader extends ImageReader {
|
||||
* Return an ImageTypeSpecifier corresponding to the given
|
||||
* color space code, or null if the color space is unsupported.
|
||||
*/
|
||||
private ImageTypeSpecifier getImageType(int code) {
|
||||
ImageTypeSpecifier ret = null;
|
||||
private ImageTypeProducer getImageType(int code) {
|
||||
ImageTypeProducer ret = null;
|
||||
|
||||
if ((code > 0) && (code < JPEG.NUM_JCS_CODES)) {
|
||||
ret = defaultTypes[code];
|
||||
ret = ImageTypeProducer.getTypeProducer(code);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -724,7 +692,7 @@ public class JPEGImageReader extends ImageReader {
|
||||
}
|
||||
|
||||
// Returns null if it can't be represented
|
||||
return getImageType(colorSpaceCode);
|
||||
return getImageType(colorSpaceCode).getType();
|
||||
} finally {
|
||||
clearThreadLock();
|
||||
}
|
||||
@ -758,13 +726,13 @@ public class JPEGImageReader extends ImageReader {
|
||||
|
||||
// Get the raw ITS, if there is one. Note that this
|
||||
// won't always be the same as the default.
|
||||
ImageTypeSpecifier raw = getImageType(colorSpaceCode);
|
||||
ImageTypeProducer raw = getImageType(colorSpaceCode);
|
||||
|
||||
// Given the encoded colorspace, build a list of ITS's
|
||||
// representing outputs you could handle starting
|
||||
// with the default.
|
||||
|
||||
ArrayList list = new ArrayList(1);
|
||||
ArrayList<ImageTypeProducer> list = new ArrayList<ImageTypeProducer>(1);
|
||||
|
||||
switch (colorSpaceCode) {
|
||||
case JPEG.JCS_GRAYSCALE:
|
||||
@ -774,9 +742,7 @@ public class JPEGImageReader extends ImageReader {
|
||||
case JPEG.JCS_RGB:
|
||||
list.add(raw);
|
||||
list.add(getImageType(JPEG.JCS_GRAYSCALE));
|
||||
if (JPEG.JCS.YCC != null) {
|
||||
list.add(getImageType(JPEG.JCS_YCC));
|
||||
}
|
||||
list.add(getImageType(JPEG.JCS_YCC));
|
||||
break;
|
||||
case JPEG.JCS_RGBA:
|
||||
list.add(raw);
|
||||
@ -801,19 +767,21 @@ public class JPEGImageReader extends ImageReader {
|
||||
list.add(getImageType(JPEG.JCS_RGB));
|
||||
|
||||
if (iccCS != null) {
|
||||
list.add(ImageTypeSpecifier.createInterleaved
|
||||
list.add(new ImageTypeProducer() {
|
||||
protected ImageTypeSpecifier produce() {
|
||||
return ImageTypeSpecifier.createInterleaved
|
||||
(iccCS,
|
||||
JPEG.bOffsRGB, // Assume it's for RGB
|
||||
DataBuffer.TYPE_BYTE,
|
||||
false,
|
||||
false));
|
||||
false);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
list.add(getImageType(JPEG.JCS_GRAYSCALE));
|
||||
if (JPEG.JCS.YCC != null) { // Might be null if PYCC.pf not installed
|
||||
list.add(getImageType(JPEG.JCS_YCC));
|
||||
}
|
||||
list.add(getImageType(JPEG.JCS_YCC));
|
||||
break;
|
||||
case JPEG.JCS_YCbCrA: // Default is to convert to RGBA
|
||||
// As there is no YCbCr ColorSpace, we can't support
|
||||
@ -822,7 +790,7 @@ public class JPEGImageReader extends ImageReader {
|
||||
break;
|
||||
}
|
||||
|
||||
return list.iterator();
|
||||
return new ImageTypeIterator(list.iterator());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -872,6 +840,10 @@ public class JPEGImageReader extends ImageReader {
|
||||
if (csType == ColorSpace.TYPE_RGB) { // We want RGB
|
||||
// IJG can do this for us more efficiently
|
||||
setOutColorSpace(structPointer, JPEG.JCS_RGB);
|
||||
// Update java state according to changes
|
||||
// in the native part of decoder.
|
||||
outColorSpaceCode = JPEG.JCS_RGB;
|
||||
numComponents = 3;
|
||||
} else if (csType != ColorSpace.TYPE_GRAY) {
|
||||
throw new IIOException("Incompatible color conversion");
|
||||
}
|
||||
@ -881,6 +853,10 @@ public class JPEGImageReader extends ImageReader {
|
||||
if (colorSpaceCode == JPEG.JCS_YCbCr) {
|
||||
// If the jpeg space is YCbCr, IJG can do it
|
||||
setOutColorSpace(structPointer, JPEG.JCS_GRAYSCALE);
|
||||
// Update java state according to changes
|
||||
// in the native part of decoder.
|
||||
outColorSpaceCode = JPEG.JCS_GRAYSCALE;
|
||||
numComponents = 1;
|
||||
}
|
||||
} else if ((iccCS != null) &&
|
||||
(cm.getNumComponents() == numComponents) &&
|
||||
@ -906,20 +882,26 @@ public class JPEGImageReader extends ImageReader {
|
||||
}
|
||||
break;
|
||||
case JPEG.JCS_YCC:
|
||||
if (JPEG.JCS.YCC == null) { // We can't do YCC at all
|
||||
throw new IIOException("Incompatible color conversion");
|
||||
}
|
||||
if ((cs != JPEG.JCS.YCC) &&
|
||||
(cm.getNumComponents() == numComponents)) {
|
||||
convert = new ColorConvertOp(JPEG.JCS.YCC, cs, null);
|
||||
{
|
||||
ColorSpace YCC = JPEG.JCS.getYCC();
|
||||
if (YCC == null) { // We can't do YCC at all
|
||||
throw new IIOException("Incompatible color conversion");
|
||||
}
|
||||
if ((cs != YCC) &&
|
||||
(cm.getNumComponents() == numComponents)) {
|
||||
convert = new ColorConvertOp(YCC, cs, null);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case JPEG.JCS_YCCA:
|
||||
// No conversions available; image must be YCCA
|
||||
if ((JPEG.JCS.YCC == null) || // We can't do YCC at all
|
||||
(cs != JPEG.JCS.YCC) ||
|
||||
(cm.getNumComponents() != numComponents)) {
|
||||
throw new IIOException("Incompatible color conversion");
|
||||
{
|
||||
ColorSpace YCC = JPEG.JCS.getYCC();
|
||||
// No conversions available; image must be YCCA
|
||||
if ((YCC == null) || // We can't do YCC at all
|
||||
(cs != YCC) ||
|
||||
(cm.getNumComponents() != numComponents)) {
|
||||
throw new IIOException("Incompatible color conversion");
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -1554,3 +1536,140 @@ public class JPEGImageReader extends ImageReader {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An internal helper class that wraps producer's iterator
|
||||
* and extracts specifier instances on demand.
|
||||
*/
|
||||
class ImageTypeIterator implements Iterator<ImageTypeSpecifier> {
|
||||
private Iterator<ImageTypeProducer> producers;
|
||||
private ImageTypeSpecifier theNext = null;
|
||||
|
||||
public ImageTypeIterator(Iterator<ImageTypeProducer> producers) {
|
||||
this.producers = producers;
|
||||
}
|
||||
|
||||
public boolean hasNext() {
|
||||
if (theNext != null) {
|
||||
return true;
|
||||
}
|
||||
if (!producers.hasNext()) {
|
||||
return false;
|
||||
}
|
||||
do {
|
||||
theNext = producers.next().getType();
|
||||
} while (theNext == null && producers.hasNext());
|
||||
|
||||
return (theNext != null);
|
||||
}
|
||||
|
||||
public ImageTypeSpecifier next() {
|
||||
if (theNext != null || hasNext()) {
|
||||
ImageTypeSpecifier t = theNext;
|
||||
theNext = null;
|
||||
return t;
|
||||
} else {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
producers.remove();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An internal helper class that provides means for deferred creation
|
||||
* of ImageTypeSpecifier instance required to describe available
|
||||
* destination types.
|
||||
*
|
||||
* This implementation only supports standard
|
||||
* jpeg color spaces (defined by corresponding JCS color space code).
|
||||
*
|
||||
* To support other color spaces one can override produce() method to
|
||||
* return custom instance of ImageTypeSpecifier.
|
||||
*/
|
||||
class ImageTypeProducer {
|
||||
|
||||
private ImageTypeSpecifier type = null;
|
||||
boolean failed = false;
|
||||
private int csCode;
|
||||
|
||||
public ImageTypeProducer(int csCode) {
|
||||
this.csCode = csCode;
|
||||
}
|
||||
|
||||
public ImageTypeProducer() {
|
||||
csCode = -1; // undefined
|
||||
}
|
||||
|
||||
public synchronized ImageTypeSpecifier getType() {
|
||||
if (!failed && type == null) {
|
||||
try {
|
||||
type = produce();
|
||||
} catch (Throwable e) {
|
||||
failed = true;
|
||||
}
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
private static final ImageTypeProducer [] defaultTypes =
|
||||
new ImageTypeProducer [JPEG.NUM_JCS_CODES];
|
||||
|
||||
public synchronized static ImageTypeProducer getTypeProducer(int csCode) {
|
||||
if (csCode < 0 || csCode >= JPEG.NUM_JCS_CODES) {
|
||||
return null;
|
||||
}
|
||||
if (defaultTypes[csCode] == null) {
|
||||
defaultTypes[csCode] = new ImageTypeProducer(csCode);
|
||||
}
|
||||
return defaultTypes[csCode];
|
||||
}
|
||||
|
||||
protected ImageTypeSpecifier produce() {
|
||||
switch (csCode) {
|
||||
case JPEG.JCS_GRAYSCALE:
|
||||
return ImageTypeSpecifier.createFromBufferedImageType
|
||||
(BufferedImage.TYPE_BYTE_GRAY);
|
||||
case JPEG.JCS_RGB:
|
||||
return ImageTypeSpecifier.createInterleaved(JPEG.JCS.sRGB,
|
||||
JPEG.bOffsRGB,
|
||||
DataBuffer.TYPE_BYTE,
|
||||
false,
|
||||
false);
|
||||
case JPEG.JCS_RGBA:
|
||||
return ImageTypeSpecifier.createPacked(JPEG.JCS.sRGB,
|
||||
0xff000000,
|
||||
0x00ff0000,
|
||||
0x0000ff00,
|
||||
0x000000ff,
|
||||
DataBuffer.TYPE_INT,
|
||||
false);
|
||||
case JPEG.JCS_YCC:
|
||||
if (JPEG.JCS.getYCC() != null) {
|
||||
return ImageTypeSpecifier.createInterleaved(
|
||||
JPEG.JCS.getYCC(),
|
||||
JPEG.bandOffsets[2],
|
||||
DataBuffer.TYPE_BYTE,
|
||||
false,
|
||||
false);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
case JPEG.JCS_YCCA:
|
||||
if (JPEG.JCS.getYCC() != null) {
|
||||
return ImageTypeSpecifier.createInterleaved(
|
||||
JPEG.JCS.getYCC(),
|
||||
JPEG.bandOffsets[3],
|
||||
DataBuffer.TYPE_BYTE,
|
||||
true,
|
||||
false);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -812,7 +812,7 @@ public class JPEGImageWriter extends ImageWriter {
|
||||
}
|
||||
break;
|
||||
case ColorSpace.TYPE_3CLR:
|
||||
if (cs == JPEG.JCS.YCC) {
|
||||
if (cs == JPEG.JCS.getYCC()) {
|
||||
if (!alpha) {
|
||||
if (jfif != null) {
|
||||
convertTosRGB = true;
|
||||
@ -1494,7 +1494,7 @@ public class JPEGImageWriter extends ImageWriter {
|
||||
}
|
||||
break;
|
||||
case ColorSpace.TYPE_3CLR:
|
||||
if (cs == JPEG.JCS.YCC) {
|
||||
if (cs == JPEG.JCS.getYCC()) {
|
||||
if (alpha) {
|
||||
retval = JPEG.JCS_YCCA;
|
||||
} else {
|
||||
@ -1533,7 +1533,7 @@ public class JPEGImageWriter extends ImageWriter {
|
||||
}
|
||||
break;
|
||||
case ColorSpace.TYPE_3CLR:
|
||||
if (cs == JPEG.JCS.YCC) {
|
||||
if (cs == JPEG.JCS.getYCC()) {
|
||||
if (alpha) {
|
||||
retval = JPEG.JCS_YCCA;
|
||||
} else {
|
||||
@ -1579,7 +1579,7 @@ public class JPEGImageWriter extends ImageWriter {
|
||||
}
|
||||
break;
|
||||
case ColorSpace.TYPE_3CLR:
|
||||
if (cs == JPEG.JCS.YCC) {
|
||||
if (cs == JPEG.JCS.getYCC()) {
|
||||
if (alpha) {
|
||||
retval = JPEG.JCS_YCCA;
|
||||
} else {
|
||||
|
@ -490,7 +490,7 @@ public class JPEGMetadata extends IIOMetadata implements Cloneable {
|
||||
}
|
||||
break;
|
||||
case ColorSpace.TYPE_3CLR:
|
||||
if (cs == JPEG.JCS.YCC) {
|
||||
if (cs == JPEG.JCS.getYCC()) {
|
||||
wantJFIF = false;
|
||||
componentIDs[0] = (byte) 'Y';
|
||||
componentIDs[1] = (byte) 'C';
|
||||
|
@ -45,6 +45,7 @@ import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
import com.sun.imageio.plugins.common.I18N;
|
||||
import com.sun.imageio.plugins.common.ReaderUtil;
|
||||
|
||||
/** This class is the Java Image IO plugin reader for WBMP images.
|
||||
* It may subsample the image, clip the image,
|
||||
@ -141,11 +142,11 @@ public class WBMPImageReader extends ImageReader {
|
||||
metadata.wbmpType = wbmpType;
|
||||
|
||||
// Read image width
|
||||
width = readMultiByteInteger();
|
||||
width = ReaderUtil.readMultiByteInteger(iis);
|
||||
metadata.width = width;
|
||||
|
||||
// Read image height
|
||||
height = readMultiByteInteger();
|
||||
height = ReaderUtil.readMultiByteInteger(iis);
|
||||
metadata.height = height;
|
||||
|
||||
gotHeader = true;
|
||||
@ -311,17 +312,6 @@ public class WBMPImageReader extends ImageReader {
|
||||
gotHeader = false;
|
||||
}
|
||||
|
||||
private int readMultiByteInteger() throws IOException {
|
||||
int value = iis.readByte();
|
||||
int result = value & 0x7f;
|
||||
while((value & 0x80) == 0x80) {
|
||||
result <<= 7;
|
||||
value = iis.readByte();
|
||||
result |= (value & 0x7f);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* This method verifies that given byte is valid wbmp type marker.
|
||||
* At the moment only 0x0 marker is described by wbmp spec.
|
||||
|
@ -33,9 +33,13 @@ import javax.imageio.spi.ServiceRegistry;
|
||||
import java.io.IOException;
|
||||
import javax.imageio.ImageReader;
|
||||
import javax.imageio.IIOException;
|
||||
import com.sun.imageio.plugins.common.ReaderUtil;
|
||||
|
||||
public class WBMPImageReaderSpi extends ImageReaderSpi {
|
||||
|
||||
private static final int MAX_WBMP_WIDTH = 1024;
|
||||
private static final int MAX_WBMP_HEIGHT = 768;
|
||||
|
||||
private static String [] writerSpiNames =
|
||||
{"com.sun.imageio.plugins.wbmp.WBMPImageWriterSpi"};
|
||||
private static String[] formatNames = {"wbmp", "WBMP"};
|
||||
@ -79,16 +83,44 @@ public class WBMPImageReaderSpi extends ImageReaderSpi {
|
||||
}
|
||||
|
||||
ImageInputStream stream = (ImageInputStream)source;
|
||||
byte[] b = new byte[3];
|
||||
|
||||
stream.mark();
|
||||
stream.readFully(b);
|
||||
int type = stream.readByte(); // TypeField
|
||||
int fixHeaderField = stream.readByte();
|
||||
// check WBMP "header"
|
||||
if (type != 0 || fixHeaderField != 0) {
|
||||
// while WBMP reader does not support ext WBMP headers
|
||||
stream.reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
int width = ReaderUtil.readMultiByteInteger(stream);
|
||||
int height = ReaderUtil.readMultiByteInteger(stream);
|
||||
// check image dimension
|
||||
if (width <= 0 || height <= 0) {
|
||||
stream.reset();
|
||||
return false;
|
||||
}
|
||||
|
||||
long dataLength = stream.length();
|
||||
if (dataLength == -1) {
|
||||
// We can't verify that amount of data in the stream
|
||||
// corresponds to image dimension because we do not know
|
||||
// the length of the data stream.
|
||||
// Assuming that wbmp image are used for mobile devices,
|
||||
// let's introduce an upper limit for image dimension.
|
||||
// In case if exact amount of raster data is unknown,
|
||||
// let's reject images with dimension above the limit.
|
||||
stream.reset();
|
||||
return (width < MAX_WBMP_WIDTH) && (height < MAX_WBMP_HEIGHT);
|
||||
}
|
||||
|
||||
dataLength -= stream.getStreamPosition();
|
||||
stream.reset();
|
||||
|
||||
return ((b[0] == (byte)0) && // TypeField == 0
|
||||
b[1] == 0 && // FixHeaderField == 0xxx00000; not support ext header
|
||||
((b[2] & 0x8f) != 0 || (b[2] & 0x7f) != 0)); // First width byte
|
||||
//XXX: b[2] & 0x8f) != 0 for the bug in Sony Ericsson encoder.
|
||||
long scanSize = (width / 8) + ((width % 8) == 0 ? 0 : 1);
|
||||
|
||||
return (dataLength == scanSize * height);
|
||||
}
|
||||
|
||||
public ImageReader createReaderInstance(Object extension)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user