Merge
This commit is contained in:
commit
361f8360c0
4
.hgtags
4
.hgtags
@ -41,3 +41,7 @@ dfd8506f74c3731bb169ce93c72612d78ee0413b jdk7-b63
|
||||
d22867c5f1b295a0a2b3b4bc8999a2676f6e20c3 jdk7-b64
|
||||
7d3bf00f3cc4f8125de1842521e7567f37dc84b8 jdk7-b65
|
||||
62109d1b9e7310f29ab51ca6f1d71b899c0ce6b0 jdk7-b66
|
||||
eb24af1404aec8aa140c4cd4d13d2839b150dd41 jdk7-b67
|
||||
bca2225b66d78c4bf4d9801f54cac7715a598650 jdk7-b68
|
||||
1b662b1ed14eb4ae31d5138a36c433b13d941dc5 jdk7-b69
|
||||
207f694795c448c17753eff1a2f50363106960c2 jdk7-b70
|
||||
|
@ -41,3 +41,7 @@ c7ed15ab92ce36a09d264a5e34025884b2d7607f jdk7-b62
|
||||
269c1ec4435dfb7b452ae6e3bdde005d55c5c830 jdk7-b64
|
||||
e01380cd1de4ce048b87d059d238e5ab5e341947 jdk7-b65
|
||||
6bad5e3fe50337d95b1416d744780d65bc570da6 jdk7-b66
|
||||
c4523c6f82048f420bf0d57c4cd47976753b7d2c jdk7-b67
|
||||
e1b972ff53cd58f825791f8ed9b2deffd16e768c jdk7-b68
|
||||
82e6c820c51ac27882b77755d42efefdbf1dcda0 jdk7-b69
|
||||
175cb3fe615998d1004c6d3fd96e6d2e86b6772d jdk7-b70
|
||||
|
@ -32,7 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--- end of LICENSE file ---
|
||||
%% This notice is provided with respect to ASM, which may be included with this software:
|
||||
Copyright (c) 2000-2005 INRIA, France Telecom
|
||||
Copyright (c) 2000-2007 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -41,3 +41,7 @@ d20e45cd539f20405ff843652069cfd7550c5ab3 jdk7-b63
|
||||
047dd27fddb607f8135296b3754131f6e13cb8c7 jdk7-b64
|
||||
97fd9b42f5c2d342b90d18f0a2b57e4117e39415 jdk7-b65
|
||||
a821e059a961bcb02830280d51f6dd030425c066 jdk7-b66
|
||||
a12ea7c7b497b4ba7830550095ef633bd6f43971 jdk7-b67
|
||||
5182bcc9c60cac429d1f7988676cec7320752be3 jdk7-b68
|
||||
8120d308ec4e805c5588b8d9372844d781c4112d jdk7-b69
|
||||
175bd68779546078dbdb6dacd7f0aced79ed22b1 jdk7-b70
|
||||
|
@ -32,7 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--- end of LICENSE file ---
|
||||
%% This notice is provided with respect to ASM, which may be included with this software:
|
||||
Copyright (c) 2000-2005 INRIA, France Telecom
|
||||
Copyright (c) 2000-2007 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -110,7 +110,7 @@ BOOTSTRAP_TARGET_LEVEL = 5
|
||||
ifdef TARGET_CLASS_VERSION
|
||||
TARGET_LEVEL = $(TARGET_CLASS_VERSION)
|
||||
else
|
||||
TARGET_LEVEL = 6
|
||||
TARGET_LEVEL = 7
|
||||
endif
|
||||
|
||||
ifndef TARGET_JAVA
|
||||
|
@ -55,10 +55,21 @@ else
|
||||
ADD_CLIENT_VM_OPTION = true
|
||||
endif
|
||||
endif
|
||||
JAVA_JVM_FLAGS =
|
||||
|
||||
# Options for hotspot to turn off printing of options with fastdebug version
|
||||
# and creating the hotspot.log file.
|
||||
JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS = \
|
||||
-XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput
|
||||
|
||||
# JVM options
|
||||
JAVA_JVM_FLAGS = $(JAVA_HOTSPOT_DISABLE_PRINT_VMOPTIONS)
|
||||
|
||||
ifeq ($(ADD_CLIENT_VM_OPTION), true)
|
||||
JAVA_JVM_FLAGS += -client
|
||||
endif
|
||||
ifdef USE_HOTSPOT_INTERPRETER_MODE
|
||||
JAVA_JVM_FLAGS += -Xint
|
||||
endif
|
||||
|
||||
# Various VM flags
|
||||
JAVA_TOOLS_FLAGS = $(JAVA_JVM_FLAGS) $(JAVA_MEM_FLAGS)
|
||||
@ -100,19 +111,23 @@ JAVACFLAGS =
|
||||
ifeq ($(DEBUG_CLASSFILES),true)
|
||||
JAVACFLAGS += -g
|
||||
endif
|
||||
ifeq ($(COMPILER_WARNINGS_FATAL), true)
|
||||
ifeq ($(JAVAC_MAX_WARNINGS), true)
|
||||
JAVACFLAGS += -Xlint:all
|
||||
endif
|
||||
ifeq ($(JAVAC_WARNINGS_FATAL), true)
|
||||
JAVACFLAGS += -Werror
|
||||
endif
|
||||
|
||||
NO_PROPRIETARY_API_WARNINGS = -XDignore.symbol.file=true
|
||||
JAVACFLAGS += $(NO_PROPRIETARY_API_WARNINGS)
|
||||
|
||||
# Add the source level (currently all source is 1.5, should this be 1.6?)
|
||||
LANGUAGE_VERSION = -source 1.5
|
||||
# Add the source level
|
||||
SOURCE_LANGUAGE_VERSION = 7
|
||||
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?)
|
||||
TARGET_CLASS_VERSION = 5
|
||||
# Add the class version we want
|
||||
TARGET_CLASS_VERSION = 7
|
||||
CLASS_VERSION = -target $(TARGET_CLASS_VERSION)
|
||||
JAVACFLAGS += $(CLASS_VERSION)
|
||||
JAVACFLAGS += -encoding ascii
|
||||
@ -176,10 +191,17 @@ endif
|
||||
# The javac options supplied to the boot javac is limited. This compiler
|
||||
# should only be used to build the 'make/tools' sources, which are not
|
||||
# class files that end up in the classes directory.
|
||||
ifeq ($(COMPILER_WARNINGS_FATAL), true)
|
||||
ifeq ($(JAVAC_MAX_WARNINGS), true)
|
||||
BOOT_JAVACFLAGS += -Xlint:all
|
||||
endif
|
||||
ifeq ($(JAVAC_WARNINGS_FATAL), true)
|
||||
BOOT_JAVACFLAGS += -Werror
|
||||
endif
|
||||
BOOT_JAVACFLAGS += -encoding ascii
|
||||
|
||||
BOOT_SOURCE_LANGUAGE_VERSION = 6
|
||||
BOOT_TARGET_CLASS_VERSION = 6
|
||||
BOOT_JAVACFLAGS += -encoding ascii -source $(BOOT_SOURCE_LANGUAGE_VERSION) -target $(BOOT_TARGET_CLASS_VERSION)
|
||||
BOOT_JAR_JFLAGS += $(JAR_JFLAGS)
|
||||
|
||||
BOOT_JAVA_CMD = $(BOOTDIR)/bin/java $(JAVA_TOOLS_FLAGS)
|
||||
BOOT_JAVAC_CMD = $(BOOTDIR)/bin/javac $(JAVAC_JVM_FLAGS) $(BOOT_JAVACFLAGS)
|
||||
|
@ -41,3 +41,7 @@ a88386380bdaaa5ab4ffbedf22c57bac5dbec034 jdk7-b62
|
||||
ba36394eb84b949b31212bdb32a518a8f92bab5b jdk7-b64
|
||||
ba313800759b678979434d6da8ed3bf49eb8bea4 jdk7-b65
|
||||
57c71ad0341b8b64ed20f81151eb7f06324f8894 jdk7-b66
|
||||
18f526145aea355a9320b724373386fc2170f183 jdk7-b67
|
||||
d07e68298d4e17ebf93d8299e43fcc3ded26472a jdk7-b68
|
||||
54fd4d9232969ea6cd3d236e5ad276183bb0d423 jdk7-b69
|
||||
0632c3e615a315ff11e2ab1d64f4d82ff9853461 jdk7-b70
|
||||
|
@ -32,7 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--- end of LICENSE file ---
|
||||
%% This notice is provided with respect to ASM, which may be included with this software:
|
||||
Copyright (c) 2000-2005 INRIA, France Telecom
|
||||
Copyright (c) 2000-2007 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -81,4 +81,8 @@ public class DebugInfoReadStream extends CompressedReadStream {
|
||||
Assert.that(false, "should not reach here");
|
||||
return null;
|
||||
}
|
||||
|
||||
public int readBCI() {
|
||||
return readInt() + InvocationEntryBCI;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2000-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
|
||||
@ -259,7 +259,7 @@ public class NMethod extends CodeBlob {
|
||||
if (Assert.ASSERTS_ENABLED) {
|
||||
Assert.that(pd != null, "scope must be present");
|
||||
}
|
||||
return new ScopeDesc(this, pd.getScopeDecodeOffset());
|
||||
return new ScopeDesc(this, pd.getScopeDecodeOffset(), pd.getReexecute());
|
||||
}
|
||||
|
||||
/** This is only for use by the debugging system, and is only
|
||||
@ -291,7 +291,7 @@ public class NMethod extends CodeBlob {
|
||||
public ScopeDesc getScopeDescNearDbg(Address pc) {
|
||||
PCDesc pd = getPCDescNearDbg(pc);
|
||||
if (pd == null) return null;
|
||||
return new ScopeDesc(this, pd.getScopeDecodeOffset());
|
||||
return new ScopeDesc(this, pd.getScopeDecodeOffset(), pd.getReexecute());
|
||||
}
|
||||
|
||||
public Map/*<Address, PcDesc>*/ getSafepoints() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2004 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2000-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
|
||||
@ -36,6 +36,7 @@ import sun.jvm.hotspot.types.*;
|
||||
public class PCDesc extends VMObject {
|
||||
private static CIntegerField pcOffsetField;
|
||||
private static CIntegerField scopeDecodeOffsetField;
|
||||
private static CIntegerField pcFlagsField;
|
||||
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
@ -50,6 +51,7 @@ public class PCDesc extends VMObject {
|
||||
|
||||
pcOffsetField = type.getCIntegerField("_pc_offset");
|
||||
scopeDecodeOffsetField = type.getCIntegerField("_scope_decode_offset");
|
||||
pcFlagsField = type.getCIntegerField("_flags");
|
||||
}
|
||||
|
||||
public PCDesc(Address addr) {
|
||||
@ -70,6 +72,12 @@ public class PCDesc extends VMObject {
|
||||
return code.instructionsBegin().addOffsetTo(getPCOffset());
|
||||
}
|
||||
|
||||
|
||||
public boolean getReexecute() {
|
||||
int flags = (int)pcFlagsField.getValue(addr);
|
||||
return ((flags & 0x1)== 1); //first is the reexecute bit
|
||||
}
|
||||
|
||||
public void print(NMethod code) {
|
||||
printOn(System.out, code);
|
||||
}
|
||||
|
@ -52,44 +52,46 @@ public class ScopeDesc {
|
||||
private List objects; // ArrayList<ScopeValue>
|
||||
|
||||
|
||||
public ScopeDesc(NMethod code, int decodeOffset) {
|
||||
public ScopeDesc(NMethod code, int decodeOffset, boolean reexecute) {
|
||||
this.code = code;
|
||||
this.decodeOffset = decodeOffset;
|
||||
this.objects = decodeObjectValues(DebugInformationRecorder.SERIALIZED_NULL);
|
||||
this.reexecute = reexecute;
|
||||
|
||||
// Decode header
|
||||
DebugInfoReadStream stream = streamAt(decodeOffset);
|
||||
|
||||
senderDecodeOffset = stream.readInt();
|
||||
method = (Method) VM.getVM().getObjectHeap().newOop(stream.readOopHandle());
|
||||
setBCIAndReexecute(stream.readInt());
|
||||
bci = stream.readBCI();
|
||||
// Decode offsets for body and sender
|
||||
localsDecodeOffset = stream.readInt();
|
||||
expressionsDecodeOffset = stream.readInt();
|
||||
monitorsDecodeOffset = stream.readInt();
|
||||
}
|
||||
|
||||
public ScopeDesc(NMethod code, int decodeOffset, int objectDecodeOffset) {
|
||||
public ScopeDesc(NMethod code, int decodeOffset, int objectDecodeOffset, boolean reexecute) {
|
||||
this.code = code;
|
||||
this.decodeOffset = decodeOffset;
|
||||
this.objects = decodeObjectValues(objectDecodeOffset);
|
||||
this.reexecute = reexecute;
|
||||
|
||||
// Decode header
|
||||
DebugInfoReadStream stream = streamAt(decodeOffset);
|
||||
|
||||
senderDecodeOffset = stream.readInt();
|
||||
method = (Method) VM.getVM().getObjectHeap().newOop(stream.readOopHandle());
|
||||
setBCIAndReexecute(stream.readInt());
|
||||
bci = stream.readBCI();
|
||||
// Decode offsets for body and sender
|
||||
localsDecodeOffset = stream.readInt();
|
||||
expressionsDecodeOffset = stream.readInt();
|
||||
monitorsDecodeOffset = stream.readInt();
|
||||
}
|
||||
|
||||
public NMethod getNMethod() { return code; }
|
||||
public Method getMethod() { return method; }
|
||||
public int getBCI() { return bci; }
|
||||
public boolean getReexecute() {return reexecute;}
|
||||
public NMethod getNMethod() { return code; }
|
||||
public Method getMethod() { return method; }
|
||||
public int getBCI() { return bci; }
|
||||
public boolean getReexecute() { return reexecute;}
|
||||
|
||||
/** Returns a List<ScopeValue> */
|
||||
public List getLocals() {
|
||||
@ -117,7 +119,7 @@ public class ScopeDesc {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ScopeDesc(code, senderDecodeOffset);
|
||||
return new ScopeDesc(code, senderDecodeOffset, false);
|
||||
}
|
||||
|
||||
/** Returns where the scope was decoded */
|
||||
@ -151,8 +153,8 @@ public class ScopeDesc {
|
||||
public void printValueOn(PrintStream tty) {
|
||||
tty.print("ScopeDesc for ");
|
||||
method.printValueOn(tty);
|
||||
tty.println(" @bci " + bci);
|
||||
tty.println(" reexecute: " + reexecute);
|
||||
tty.print(" @bci " + bci);
|
||||
tty.println(" reexecute=" + reexecute);
|
||||
}
|
||||
|
||||
// FIXME: add more accessors
|
||||
@ -160,12 +162,6 @@ public class ScopeDesc {
|
||||
//--------------------------------------------------------------------------------
|
||||
// Internals only below this point
|
||||
//
|
||||
private void setBCIAndReexecute(int combination) {
|
||||
int InvocationEntryBci = VM.getVM().getInvocationEntryBCI();
|
||||
bci = (combination >> 1) + InvocationEntryBci;
|
||||
reexecute = (combination & 1)==1 ? true : false;
|
||||
}
|
||||
|
||||
private DebugInfoReadStream streamAt(int decodeOffset) {
|
||||
return new DebugInfoReadStream(code, decodeOffset, objects);
|
||||
}
|
||||
|
@ -33,9 +33,9 @@
|
||||
# Don't put quotes (fail windows build).
|
||||
HOTSPOT_VM_COPYRIGHT=Copyright 2009
|
||||
|
||||
HS_MAJOR_VER=16
|
||||
HS_MAJOR_VER=17
|
||||
HS_MINOR_VER=0
|
||||
HS_BUILD_NUMBER=07
|
||||
HS_BUILD_NUMBER=01
|
||||
|
||||
JDK_MAJOR_VER=1
|
||||
JDK_MINOR_VER=7
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2000-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
|
||||
@ -38,7 +38,7 @@ enum {
|
||||
// registers
|
||||
enum {
|
||||
pd_nof_cpu_regs_frame_map = 32, // number of registers used during code emission
|
||||
pd_nof_caller_save_cpu_regs_frame_map = 6, // number of cpu registers killed by calls
|
||||
pd_nof_caller_save_cpu_regs_frame_map = 10, // number of cpu registers killed by calls
|
||||
pd_nof_cpu_regs_reg_alloc = 20, // number of registers that are visible to register allocator
|
||||
pd_nof_cpu_regs_linearscan = 32,// number of registers visible linear scan
|
||||
pd_first_cpu_reg = 0,
|
||||
|
@ -320,6 +320,10 @@ void FrameMap::init () {
|
||||
_caller_save_cpu_regs[3] = FrameMap::O3_opr;
|
||||
_caller_save_cpu_regs[4] = FrameMap::O4_opr;
|
||||
_caller_save_cpu_regs[5] = FrameMap::O5_opr;
|
||||
_caller_save_cpu_regs[6] = FrameMap::G1_opr;
|
||||
_caller_save_cpu_regs[7] = FrameMap::G3_opr;
|
||||
_caller_save_cpu_regs[8] = FrameMap::G4_opr;
|
||||
_caller_save_cpu_regs[9] = FrameMap::G5_opr;
|
||||
for (int i = 0; i < nof_caller_save_fpu_regs; i++) {
|
||||
_caller_save_fpu_regs[i] = LIR_OprFact::single_fpu(i);
|
||||
}
|
||||
|
@ -749,6 +749,10 @@ void LIRGenerator::do_MathIntrinsic(Intrinsic* x) {
|
||||
|
||||
void LIRGenerator::do_ArrayCopy(Intrinsic* x) {
|
||||
assert(x->number_of_arguments() == 5, "wrong type");
|
||||
|
||||
// Make all state_for calls early since they can emit code
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
|
||||
// Note: spill caller save before setting the item
|
||||
LIRItem src (x->argument_at(0), this);
|
||||
LIRItem src_pos (x->argument_at(1), this);
|
||||
@ -767,7 +771,6 @@ void LIRGenerator::do_ArrayCopy(Intrinsic* x) {
|
||||
ciArrayKlass* expected_type;
|
||||
arraycopy_helper(x, &flags, &expected_type);
|
||||
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
__ arraycopy(src.result(), src_pos.result(), dst.result(), dst_pos.result(),
|
||||
length.result(), rlock_callee_saved(T_INT),
|
||||
expected_type, flags, info);
|
||||
@ -878,6 +881,9 @@ void LIRGenerator::do_NewInstance(NewInstance* x) {
|
||||
|
||||
|
||||
void LIRGenerator::do_NewTypeArray(NewTypeArray* x) {
|
||||
// Evaluate state_for early since it may emit code
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
|
||||
LIRItem length(x->length(), this);
|
||||
length.load_item();
|
||||
|
||||
@ -892,7 +898,6 @@ void LIRGenerator::do_NewTypeArray(NewTypeArray* x) {
|
||||
|
||||
__ oop2reg(ciTypeArrayKlass::make(elem_type)->encoding(), klass_reg);
|
||||
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
CodeStub* slow_path = new NewTypeArrayStub(klass_reg, len, reg, info);
|
||||
__ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, elem_type, klass_reg, slow_path);
|
||||
|
||||
@ -902,7 +907,8 @@ void LIRGenerator::do_NewTypeArray(NewTypeArray* x) {
|
||||
|
||||
|
||||
void LIRGenerator::do_NewObjectArray(NewObjectArray* x) {
|
||||
LIRItem length(x->length(), this);
|
||||
// Evaluate state_for early since it may emit code.
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
// in case of patching (i.e., object class is not yet loaded), we need to reexecute the instruction
|
||||
// and therefore provide the state before the parameters have been consumed
|
||||
CodeEmitInfo* patching_info = NULL;
|
||||
@ -910,6 +916,7 @@ void LIRGenerator::do_NewObjectArray(NewObjectArray* x) {
|
||||
patching_info = state_for(x, x->state_before());
|
||||
}
|
||||
|
||||
LIRItem length(x->length(), this);
|
||||
length.load_item();
|
||||
|
||||
const LIR_Opr reg = result_register_for(x->type());
|
||||
@ -919,7 +926,6 @@ void LIRGenerator::do_NewObjectArray(NewObjectArray* x) {
|
||||
LIR_Opr tmp4 = FrameMap::O1_oop_opr;
|
||||
LIR_Opr klass_reg = FrameMap::G5_oop_opr;
|
||||
LIR_Opr len = length.result();
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
|
||||
CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info);
|
||||
ciObject* obj = (ciObject*) ciObjArrayKlass::make(x->klass());
|
||||
@ -943,25 +949,22 @@ void LIRGenerator::do_NewMultiArray(NewMultiArray* x) {
|
||||
items->at_put(i, size);
|
||||
}
|
||||
|
||||
// need to get the info before, as the items may become invalid through item_free
|
||||
// Evaluate state_for early since it may emit code.
|
||||
CodeEmitInfo* patching_info = NULL;
|
||||
if (!x->klass()->is_loaded() || PatchALot) {
|
||||
patching_info = state_for(x, x->state_before());
|
||||
|
||||
// cannot re-use same xhandlers for multiple CodeEmitInfos, so
|
||||
// clone all handlers
|
||||
// clone all handlers. This is handled transparently in other
|
||||
// places by the CodeEmitInfo cloning logic but is handled
|
||||
// specially here because a stub isn't being used.
|
||||
x->set_exception_handlers(new XHandlers(x->exception_handlers()));
|
||||
}
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
|
||||
i = dims->length();
|
||||
while (i-- > 0) {
|
||||
LIRItem* size = items->at(i);
|
||||
// if a patching_info was generated above then debug information for the state before
|
||||
// the call is going to be emitted. The LIRGenerator calls above may have left some values
|
||||
// in registers and that's been recorded in the CodeEmitInfo. In that case the items
|
||||
// for those values can't simply be freed if they are registers because the values
|
||||
// might be destroyed by store_stack_parameter. So in the case of patching, delay the
|
||||
// freeing of the items that already were in registers
|
||||
size->load_item();
|
||||
store_stack_parameter (size->result(),
|
||||
in_ByteSize(STACK_BIAS +
|
||||
@ -972,8 +975,6 @@ void LIRGenerator::do_NewMultiArray(NewMultiArray* x) {
|
||||
// This instruction can be deoptimized in the slow path : use
|
||||
// O0 as result register.
|
||||
const LIR_Opr reg = result_register_for(x->type());
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
|
||||
jobject2reg_with_patching(reg, x->klass(), patching_info);
|
||||
LIR_Opr rank = FrameMap::O1_opr;
|
||||
__ move(LIR_OprFact::intConst(x->rank()), rank);
|
||||
|
@ -1696,6 +1696,9 @@ void InterpreterMacroAssembler::profile_virtual_call(Register receiver,
|
||||
void InterpreterMacroAssembler::record_klass_in_profile_helper(
|
||||
Register receiver, Register scratch,
|
||||
int start_row, Label& done) {
|
||||
if (TypeProfileWidth == 0)
|
||||
return;
|
||||
|
||||
int last_row = VirtualCallData::row_limit() - 1;
|
||||
assert(start_row <= last_row, "must be work left to do");
|
||||
// Test this row for both the receiver and for null.
|
||||
|
@ -1047,16 +1047,17 @@ void LIRGenerator::do_NewMultiArray(NewMultiArray* x) {
|
||||
items->at_put(i, size);
|
||||
}
|
||||
|
||||
// need to get the info before, as the items may become invalid through item_free
|
||||
// Evaluate state_for early since it may emit code.
|
||||
CodeEmitInfo* patching_info = NULL;
|
||||
if (!x->klass()->is_loaded() || PatchALot) {
|
||||
patching_info = state_for(x, x->state_before());
|
||||
|
||||
// cannot re-use same xhandlers for multiple CodeEmitInfos, so
|
||||
// clone all handlers.
|
||||
// clone all handlers. This is handled transparently in other
|
||||
// places by the CodeEmitInfo cloning logic but is handled
|
||||
// specially here because a stub isn't being used.
|
||||
x->set_exception_handlers(new XHandlers(x->exception_handlers()));
|
||||
}
|
||||
|
||||
CodeEmitInfo* info = state_for(x, x->state());
|
||||
|
||||
i = dims->length();
|
||||
|
@ -1262,6 +1262,9 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper(
|
||||
Register receiver, Register mdp,
|
||||
Register reg2,
|
||||
int start_row, Label& done) {
|
||||
if (TypeProfileWidth == 0)
|
||||
return;
|
||||
|
||||
int last_row = VirtualCallData::row_limit() - 1;
|
||||
assert(start_row <= last_row, "must be work left to do");
|
||||
// Test this row for both the receiver and for null.
|
||||
|
@ -1272,6 +1272,9 @@ void InterpreterMacroAssembler::record_klass_in_profile_helper(
|
||||
Register receiver, Register mdp,
|
||||
Register reg2,
|
||||
int start_row, Label& done) {
|
||||
if (TypeProfileWidth == 0)
|
||||
return;
|
||||
|
||||
int last_row = VirtualCallData::row_limit() - 1;
|
||||
assert(start_row <= last_row, "must be work left to do");
|
||||
// Test this row for both the receiver and for null.
|
||||
|
@ -2381,7 +2381,7 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
|
||||
// Save everything in sight.
|
||||
|
||||
map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words);
|
||||
map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false);
|
||||
// Normal deoptimization
|
||||
__ push(Deoptimization::Unpack_deopt);
|
||||
__ jmp(cont);
|
||||
@ -2392,7 +2392,7 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
// return address is the pc describes what bci to do re-execute at
|
||||
|
||||
// No need to update map as each call to save_live_registers will produce identical oopmap
|
||||
(void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words);
|
||||
(void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false);
|
||||
|
||||
__ push(Deoptimization::Unpack_reexecute);
|
||||
__ jmp(cont);
|
||||
@ -2428,7 +2428,7 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
// Save everything in sight.
|
||||
|
||||
// No need to update map as each call to save_live_registers will produce identical oopmap
|
||||
(void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words);
|
||||
(void) RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false);
|
||||
|
||||
// Now it is safe to overwrite any register
|
||||
|
||||
@ -2515,6 +2515,11 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
|
||||
RegisterSaver::restore_result_registers(masm);
|
||||
|
||||
// Non standard control word may be leaked out through a safepoint blob, and we can
|
||||
// deopt at a poll point with the non standard control word. However, we should make
|
||||
// sure the control word is correct after restore_result_registers.
|
||||
__ fldcw(ExternalAddress(StubRoutines::addr_fpu_cntrl_wrd_std()));
|
||||
|
||||
// All of the register save area has been popped of the stack. Only the
|
||||
// return address remains.
|
||||
|
||||
|
@ -1526,7 +1526,8 @@ void os::print_os_info(outputStream* st) {
|
||||
case 5000: st->print(" Windows 2000"); break;
|
||||
case 5001: st->print(" Windows XP"); break;
|
||||
case 5002:
|
||||
case 6000: {
|
||||
case 6000:
|
||||
case 6001: {
|
||||
// Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could
|
||||
// find out whether we are running on 64 bit processor or not.
|
||||
SYSTEM_INFO si;
|
||||
@ -1549,13 +1550,27 @@ void os::print_os_info(outputStream* st) {
|
||||
st->print(" Windows XP x64 Edition");
|
||||
else
|
||||
st->print(" Windows Server 2003 family");
|
||||
} else { // os_vers == 6000
|
||||
} else if (os_vers == 6000) {
|
||||
if (osvi.wProductType == VER_NT_WORKSTATION)
|
||||
st->print(" Windows Vista");
|
||||
else
|
||||
st->print(" Windows Server 2008");
|
||||
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
||||
st->print(" , 64 bit");
|
||||
} else if (os_vers == 6001) {
|
||||
if (osvi.wProductType == VER_NT_WORKSTATION) {
|
||||
st->print(" Windows 7");
|
||||
} else {
|
||||
// Unrecognized windows, print out its major and minor versions
|
||||
st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
|
||||
}
|
||||
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
||||
st->print(" , 64 bit");
|
||||
} else { // future os
|
||||
// Unrecognized windows, print out its major and minor versions
|
||||
st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
|
||||
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
||||
st->print(" , 64 bit");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1229,13 +1229,10 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, TRAPS) {
|
||||
|
||||
// Compiled java method case.
|
||||
if (decode_offset != 0) {
|
||||
bool dummy_reexecute = false;
|
||||
DebugInfoReadStream stream(nm, decode_offset);
|
||||
decode_offset = stream.read_int();
|
||||
method = (methodOop)nm->oop_at(stream.read_int());
|
||||
//fill_in_stack_trace does not need the reexecute information which is designed
|
||||
//for the deopt to reexecute
|
||||
bci = stream.read_bci_and_reexecute(dummy_reexecute);
|
||||
bci = stream.read_bci();
|
||||
} else {
|
||||
if (fr.is_first_frame()) break;
|
||||
address pc = fr.pc();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
@ -255,8 +255,7 @@ class DebugInfoReadStream : public CompressedReadStream {
|
||||
ScopeValue* read_object_value();
|
||||
ScopeValue* get_cached_object();
|
||||
// BCI encoding is mostly unsigned, but -1 is a distinguished value
|
||||
// Decoding based on encoding: bci = InvocationEntryBci + read_int()/2; reexecute = read_int()%2 == 1 ? true : false;
|
||||
int read_bci_and_reexecute(bool& reexecute) { int i = read_int(); reexecute = (i & 1) ? true : false; return (i >> 1) + InvocationEntryBci; }
|
||||
int read_bci() { return read_int() + InvocationEntryBci; }
|
||||
};
|
||||
|
||||
// DebugInfoWriteStream specializes CompressedWriteStream for
|
||||
@ -269,6 +268,5 @@ class DebugInfoWriteStream : public CompressedWriteStream {
|
||||
public:
|
||||
DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size);
|
||||
void write_handle(jobject h);
|
||||
//Encoding bci and reexecute into one word as (bci - InvocationEntryBci)*2 + reexecute
|
||||
void write_bci_and_reexecute(int bci, bool reexecute) { write_int(((bci - InvocationEntryBci) << 1) + (reexecute ? 1 : 0)); }
|
||||
void write_bci(int bci) { write_int(bci - InvocationEntryBci); }
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1998-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
|
||||
@ -292,13 +292,16 @@ void DebugInformationRecorder::describe_scope(int pc_offset,
|
||||
int stream_offset = stream()->position();
|
||||
last_pd->set_scope_decode_offset(stream_offset);
|
||||
|
||||
// Record reexecute bit into pcDesc
|
||||
last_pd->set_should_reexecute(reexecute);
|
||||
|
||||
// serialize sender stream offest
|
||||
stream()->write_int(sender_stream_offset);
|
||||
|
||||
// serialize scope
|
||||
jobject method_enc = (method == NULL)? NULL: method->encoding();
|
||||
stream()->write_int(oop_recorder()->find_index(method_enc));
|
||||
stream()->write_bci_and_reexecute(bci, reexecute);
|
||||
stream()->write_bci(bci);
|
||||
assert(method == NULL ||
|
||||
(method->is_native() && bci == 0) ||
|
||||
(!method->is_native() && 0 <= bci && bci < method->code_size()) ||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
@ -966,7 +966,7 @@ ScopeDesc* nmethod::scope_desc_at(address pc) {
|
||||
PcDesc* pd = pc_desc_at(pc);
|
||||
guarantee(pd != NULL, "scope must be present");
|
||||
return new ScopeDesc(this, pd->scope_decode_offset(),
|
||||
pd->obj_decode_offset());
|
||||
pd->obj_decode_offset(), pd->should_reexecute());
|
||||
}
|
||||
|
||||
|
||||
@ -1932,7 +1932,7 @@ void nmethod::verify_interrupt_point(address call_site) {
|
||||
PcDesc* pd = pc_desc_at(ic->end_of_call());
|
||||
assert(pd != NULL, "PcDesc must exist");
|
||||
for (ScopeDesc* sd = new ScopeDesc(this, pd->scope_decode_offset(),
|
||||
pd->obj_decode_offset());
|
||||
pd->obj_decode_offset(), pd->should_reexecute());
|
||||
!sd->is_top(); sd = sd->sender()) {
|
||||
sd->verify();
|
||||
}
|
||||
@ -2181,7 +2181,7 @@ ScopeDesc* nmethod::scope_desc_in(address begin, address end) {
|
||||
PcDesc* p = pc_desc_near(begin+1);
|
||||
if (p != NULL && p->real_pc(this) <= end) {
|
||||
return new ScopeDesc(this, p->scope_decode_offset(),
|
||||
p->obj_decode_offset());
|
||||
p->obj_decode_offset(), p->should_reexecute());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
@ -26,9 +26,11 @@
|
||||
# include "incls/_pcDesc.cpp.incl"
|
||||
|
||||
PcDesc::PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset) {
|
||||
assert(sizeof(PcDescFlags) <= 4, "occupies more than a word");
|
||||
_pc_offset = pc_offset;
|
||||
_scope_decode_offset = scope_decode_offset;
|
||||
_obj_decode_offset = obj_decode_offset;
|
||||
_flags.word = 0;
|
||||
}
|
||||
|
||||
address PcDesc::real_pc(const nmethod* code) const {
|
||||
@ -50,6 +52,7 @@ void PcDesc::print(nmethod* code) {
|
||||
tty->print(" ");
|
||||
sd->method()->print_short_name(tty);
|
||||
tty->print(" @%d", sd->bci());
|
||||
tty->print(" reexecute=%s", sd->should_reexecute()?"true":"false");
|
||||
tty->cr();
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
@ -34,6 +34,13 @@ class PcDesc VALUE_OBJ_CLASS_SPEC {
|
||||
int _scope_decode_offset; // offset for scope in nmethod
|
||||
int _obj_decode_offset;
|
||||
|
||||
union PcDescFlags {
|
||||
int word;
|
||||
struct {
|
||||
unsigned int reexecute: 1;
|
||||
} bits;
|
||||
} _flags;
|
||||
|
||||
public:
|
||||
int pc_offset() const { return _pc_offset; }
|
||||
int scope_decode_offset() const { return _scope_decode_offset; }
|
||||
@ -53,6 +60,10 @@ class PcDesc VALUE_OBJ_CLASS_SPEC {
|
||||
upper_offset_limit = (unsigned int)-1 >> 1
|
||||
};
|
||||
|
||||
// Flags
|
||||
bool should_reexecute() const { return _flags.bits.reexecute; }
|
||||
void set_should_reexecute(bool z) { _flags.bits.reexecute = z; }
|
||||
|
||||
// Returns the real pc
|
||||
address real_pc(const nmethod* code) const;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
@ -26,17 +26,19 @@
|
||||
# include "incls/_scopeDesc.cpp.incl"
|
||||
|
||||
|
||||
ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset) {
|
||||
ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset, bool reexecute) {
|
||||
_code = code;
|
||||
_decode_offset = decode_offset;
|
||||
_objects = decode_object_values(obj_decode_offset);
|
||||
_reexecute = reexecute;
|
||||
decode_body();
|
||||
}
|
||||
|
||||
ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset) {
|
||||
ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, bool reexecute) {
|
||||
_code = code;
|
||||
_decode_offset = decode_offset;
|
||||
_objects = decode_object_values(DebugInformationRecorder::serialized_null);
|
||||
_reexecute = reexecute;
|
||||
decode_body();
|
||||
}
|
||||
|
||||
@ -45,8 +47,8 @@ ScopeDesc::ScopeDesc(const ScopeDesc* parent) {
|
||||
_code = parent->_code;
|
||||
_decode_offset = parent->_sender_decode_offset;
|
||||
_objects = parent->_objects;
|
||||
_reexecute = false; //reexecute only applies to the first scope
|
||||
decode_body();
|
||||
assert(_reexecute == false, "reexecute not allowed");
|
||||
}
|
||||
|
||||
|
||||
@ -57,7 +59,6 @@ void ScopeDesc::decode_body() {
|
||||
_sender_decode_offset = DebugInformationRecorder::serialized_null;
|
||||
_method = methodHandle(_code->method());
|
||||
_bci = InvocationEntryBci;
|
||||
_reexecute = false;
|
||||
_locals_decode_offset = DebugInformationRecorder::serialized_null;
|
||||
_expressions_decode_offset = DebugInformationRecorder::serialized_null;
|
||||
_monitors_decode_offset = DebugInformationRecorder::serialized_null;
|
||||
@ -67,7 +68,7 @@ void ScopeDesc::decode_body() {
|
||||
|
||||
_sender_decode_offset = stream->read_int();
|
||||
_method = methodHandle((methodOop) stream->read_oop());
|
||||
_bci = stream->read_bci_and_reexecute(_reexecute);
|
||||
_bci = stream->read_bci();
|
||||
|
||||
// decode offsets for body and sender
|
||||
_locals_decode_offset = stream->read_int();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
@ -39,8 +39,7 @@ class SimpleScopeDesc : public StackObj {
|
||||
DebugInfoReadStream buffer(code, pc_desc->scope_decode_offset());
|
||||
int ignore_sender = buffer.read_int();
|
||||
_method = methodOop(buffer.read_oop());
|
||||
bool dummy_reexecute; //only methodOop and bci are needed!
|
||||
_bci = buffer.read_bci_and_reexecute(dummy_reexecute);
|
||||
_bci = buffer.read_bci();
|
||||
}
|
||||
|
||||
methodOop method() { return _method; }
|
||||
@ -53,12 +52,12 @@ class SimpleScopeDesc : public StackObj {
|
||||
class ScopeDesc : public ResourceObj {
|
||||
public:
|
||||
// Constructor
|
||||
ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset);
|
||||
ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset, bool reexecute);
|
||||
|
||||
// Calls above, giving default value of "serialized_null" to the
|
||||
// "obj_decode_offset" argument. (We don't use a default argument to
|
||||
// avoid a .hpp-.hpp dependency.)
|
||||
ScopeDesc(const nmethod* code, int decode_offset);
|
||||
ScopeDesc(const nmethod* code, int decode_offset, bool reexecute);
|
||||
|
||||
// JVM state
|
||||
methodHandle method() const { return _method; }
|
||||
|
@ -409,8 +409,6 @@ codeBlob.cpp c1_Runtime1.hpp
|
||||
|
||||
compileBroker.cpp c1_Compiler.hpp
|
||||
|
||||
frame.hpp c1_Defs.hpp
|
||||
|
||||
frame_<arch>.cpp c1_Runtime1.hpp
|
||||
|
||||
globals.cpp c1_globals.hpp
|
||||
@ -433,8 +431,6 @@ os_<os_family>.cpp c1_Runtime1.hpp
|
||||
|
||||
os_<os_arch>.cpp c1_Runtime1.hpp
|
||||
|
||||
registerMap.hpp c1_Defs.hpp
|
||||
|
||||
safepoint.cpp c1_globals.hpp
|
||||
|
||||
sharedRuntime.cpp c1_Runtime1.hpp
|
||||
|
@ -749,7 +749,10 @@ char* Universe::preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode) {
|
||||
assert(mode == UnscaledNarrowOop ||
|
||||
mode == ZeroBasedNarrowOop ||
|
||||
mode == HeapBasedNarrowOop, "mode is invalid");
|
||||
|
||||
// Return specified base for the first request.
|
||||
if (!FLAG_IS_DEFAULT(HeapBaseMinAddress) && (mode == UnscaledNarrowOop)) {
|
||||
return (char*)HeapBaseMinAddress;
|
||||
}
|
||||
const size_t total_size = heap_size + HeapBaseMinAddress;
|
||||
if (total_size <= OopEncodingHeapMax && (mode != HeapBasedNarrowOop)) {
|
||||
if (total_size <= NarrowOopHeapMax && (mode == UnscaledNarrowOop) &&
|
||||
@ -857,7 +860,7 @@ jint Universe::initialize_heap() {
|
||||
// Can't reserve heap below 4Gb.
|
||||
Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);
|
||||
} else {
|
||||
assert(Universe::narrow_oop_shift() == 0, "use unscaled narrow oop");
|
||||
Universe::set_narrow_oop_shift(0);
|
||||
if (PrintCompressedOopsMode) {
|
||||
tty->print(", 32-bits Oops");
|
||||
}
|
||||
|
@ -1085,6 +1085,7 @@ void instanceKlass::set_cached_itable_index(size_t idnum, int index) {
|
||||
if (indices == NULL || (length = (size_t)indices[0]) <= idnum) {
|
||||
size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count());
|
||||
int* new_indices = NEW_C_HEAP_ARRAY(int, size+1);
|
||||
new_indices[0] =(int)size; // array size held in the first element
|
||||
// Copy the existing entries, if any
|
||||
size_t i;
|
||||
for (i = 0; i < length; i++) {
|
||||
|
@ -376,7 +376,7 @@
|
||||
product(intx, AutoBoxCacheMax, 128, \
|
||||
"Sets max value cached by the java.lang.Integer autobox cache") \
|
||||
\
|
||||
product(bool, DoEscapeAnalysis, false, \
|
||||
product(bool, DoEscapeAnalysis, true, \
|
||||
"Perform escape analysis") \
|
||||
\
|
||||
notproduct(bool, PrintEscapeAnalysis, false, \
|
||||
|
@ -493,7 +493,8 @@ void JVMState::dump_spec(outputStream *st) const {
|
||||
if (!printed)
|
||||
_method->print_short_name(st);
|
||||
st->print(" @ bci:%d",_bci);
|
||||
st->print(" reexecute:%s", _reexecute==Reexecute_True?"true":"false");
|
||||
if(_reexecute == Reexecute_True)
|
||||
st->print(" reexecute");
|
||||
} else {
|
||||
st->print(" runtime stub");
|
||||
}
|
||||
|
@ -458,6 +458,16 @@ private:
|
||||
// Post-Allocation peephole copy removal
|
||||
void post_allocate_copy_removal();
|
||||
Node *skip_copies( Node *c );
|
||||
// Replace the old node with the current live version of that value
|
||||
// and yank the old value if it's dead.
|
||||
int replace_and_yank_if_dead( Node *old, OptoReg::Name nreg,
|
||||
Block *current_block, Node_List& value, Node_List& regnd ) {
|
||||
Node* v = regnd[nreg];
|
||||
assert(v->outcnt() != 0, "no dead values");
|
||||
old->replace_by(v);
|
||||
return yank_if_dead(old, current_block, &value, ®nd);
|
||||
}
|
||||
|
||||
int yank_if_dead( Node *old, Block *current_block, Node_List *value, Node_List *regnd );
|
||||
int elide_copy( Node *n, int k, Block *current_block, Node_List &value, Node_List ®nd, bool can_change_regs );
|
||||
int use_prior_register( Node *copy, uint idx, Node *def, Block *current_block, Node_List &value, Node_List ®nd );
|
||||
|
@ -1545,7 +1545,7 @@ void Compile::Optimize() {
|
||||
if((loop_opts_cnt > 0) && (has_loops() || has_split_ifs())) {
|
||||
{
|
||||
TracePhase t2("idealLoop", &_t_idealLoop, true);
|
||||
PhaseIdealLoop ideal_loop( igvn, NULL, true );
|
||||
PhaseIdealLoop ideal_loop( igvn, true );
|
||||
loop_opts_cnt--;
|
||||
if (major_progress()) print_method("PhaseIdealLoop 1", 2);
|
||||
if (failing()) return;
|
||||
@ -1553,7 +1553,7 @@ void Compile::Optimize() {
|
||||
// Loop opts pass if partial peeling occurred in previous pass
|
||||
if(PartialPeelLoop && major_progress() && (loop_opts_cnt > 0)) {
|
||||
TracePhase t3("idealLoop", &_t_idealLoop, true);
|
||||
PhaseIdealLoop ideal_loop( igvn, NULL, false );
|
||||
PhaseIdealLoop ideal_loop( igvn, false );
|
||||
loop_opts_cnt--;
|
||||
if (major_progress()) print_method("PhaseIdealLoop 2", 2);
|
||||
if (failing()) return;
|
||||
@ -1561,10 +1561,15 @@ void Compile::Optimize() {
|
||||
// Loop opts pass for loop-unrolling before CCP
|
||||
if(major_progress() && (loop_opts_cnt > 0)) {
|
||||
TracePhase t4("idealLoop", &_t_idealLoop, true);
|
||||
PhaseIdealLoop ideal_loop( igvn, NULL, false );
|
||||
PhaseIdealLoop ideal_loop( igvn, false );
|
||||
loop_opts_cnt--;
|
||||
if (major_progress()) print_method("PhaseIdealLoop 3", 2);
|
||||
}
|
||||
if (!failing()) {
|
||||
// Verify that last round of loop opts produced a valid graph
|
||||
NOT_PRODUCT( TracePhase t2("idealLoopVerify", &_t_idealLoopVerify, TimeCompiler); )
|
||||
PhaseIdealLoop::verify(igvn);
|
||||
}
|
||||
}
|
||||
if (failing()) return;
|
||||
|
||||
@ -1597,12 +1602,20 @@ void Compile::Optimize() {
|
||||
while(major_progress() && (loop_opts_cnt > 0)) {
|
||||
TracePhase t2("idealLoop", &_t_idealLoop, true);
|
||||
assert( cnt++ < 40, "infinite cycle in loop optimization" );
|
||||
PhaseIdealLoop ideal_loop( igvn, NULL, true );
|
||||
PhaseIdealLoop ideal_loop( igvn, true );
|
||||
loop_opts_cnt--;
|
||||
if (major_progress()) print_method("PhaseIdealLoop iterations", 2);
|
||||
if (failing()) return;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Verify that all previous optimizations produced a valid graph
|
||||
// at least to this point, even if no loop optimizations were done.
|
||||
NOT_PRODUCT( TracePhase t2("idealLoopVerify", &_t_idealLoopVerify, TimeCompiler); )
|
||||
PhaseIdealLoop::verify(igvn);
|
||||
}
|
||||
|
||||
{
|
||||
NOT_PRODUCT( TracePhase t2("macroExpand", &_t_macroExpand, TimeCompiler); )
|
||||
PhaseMacroExpand mex(igvn);
|
||||
@ -2520,7 +2533,7 @@ bool Compile::final_graph_reshaping() {
|
||||
|
||||
// If original bytecodes contained a mixture of floats and doubles
|
||||
// check if the optimizer has made it homogenous, item (3).
|
||||
if( Use24BitFPMode && Use24BitFP &&
|
||||
if( Use24BitFPMode && Use24BitFP && UseSSE == 0 &&
|
||||
frc.get_float_count() > 32 &&
|
||||
frc.get_double_count() == 0 &&
|
||||
(10 * frc.get_call_count() < frc.get_float_count()) ) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
@ -396,7 +396,7 @@ struct NTarjan {
|
||||
// nodes (using the is_CFG() call) and places them in a dominator tree. Thus,
|
||||
// it needs a count of the CFG nodes for the mapping table. This is the
|
||||
// Lengauer & Tarjan O(E-alpha(E,V)) algorithm.
|
||||
void PhaseIdealLoop::Dominators( ) {
|
||||
void PhaseIdealLoop::Dominators() {
|
||||
ResourceMark rm;
|
||||
// Setup mappings from my Graph to Tarjan's stuff and back
|
||||
// Note: Tarjan uses 1-based arrays
|
||||
@ -454,7 +454,7 @@ void PhaseIdealLoop::Dominators( ) {
|
||||
// flow into the main graph (and hence into ROOT) but are not reachable
|
||||
// from above. Such code is dead, but requires a global pass to detect
|
||||
// it; this global pass was the 'build_loop_tree' pass run just prior.
|
||||
if( whead->is_Region() ) {
|
||||
if( !_verify_only && whead->is_Region() ) {
|
||||
for( uint i = 1; i < whead->req(); i++ ) {
|
||||
if (!has_node(whead->in(i))) {
|
||||
// Kill dead input path
|
||||
|
@ -1420,13 +1420,12 @@ static void log_loop_tree(IdealLoopTree* root, IdealLoopTree* loop, CompileLog*
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//------------------------------PhaseIdealLoop---------------------------------
|
||||
//----------------------------build_and_optimize-------------------------------
|
||||
// Create a PhaseLoop. Build the ideal Loop tree. Map each Ideal Node to
|
||||
// its corresponding LoopNode. If 'optimize' is true, do some loop cleanups.
|
||||
PhaseIdealLoop::PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify_me, bool do_split_ifs )
|
||||
: PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(C->comp_arena()) {
|
||||
void PhaseIdealLoop::build_and_optimize(bool do_split_ifs) {
|
||||
int old_progress = C->major_progress();
|
||||
|
||||
// Reset major-progress flag for the driver's heuristics
|
||||
C->clear_major_progress();
|
||||
|
||||
@ -1465,18 +1464,20 @@ PhaseIdealLoop::PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify
|
||||
}
|
||||
|
||||
// No loops after all
|
||||
if( !_ltree_root->_child ) C->set_has_loops(false);
|
||||
if( !_ltree_root->_child && !_verify_only ) C->set_has_loops(false);
|
||||
|
||||
// There should always be an outer loop containing the Root and Return nodes.
|
||||
// If not, we have a degenerate empty program. Bail out in this case.
|
||||
if (!has_node(C->root())) {
|
||||
C->clear_major_progress();
|
||||
C->record_method_not_compilable("empty program detected during loop optimization");
|
||||
if (!_verify_only) {
|
||||
C->clear_major_progress();
|
||||
C->record_method_not_compilable("empty program detected during loop optimization");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Nothing to do, so get out
|
||||
if( !C->has_loops() && !do_split_ifs && !verify_me) {
|
||||
if( !C->has_loops() && !do_split_ifs && !_verify_me && !_verify_only ) {
|
||||
_igvn.optimize(); // Cleanup NeverBranches
|
||||
return;
|
||||
}
|
||||
@ -1486,7 +1487,7 @@ PhaseIdealLoop::PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify
|
||||
|
||||
// Split shared headers and insert loop landing pads.
|
||||
// Do not bother doing this on the Root loop of course.
|
||||
if( !verify_me && _ltree_root->_child ) {
|
||||
if( !_verify_me && !_verify_only && _ltree_root->_child ) {
|
||||
if( _ltree_root->_child->beautify_loops( this ) ) {
|
||||
// Re-build loop tree!
|
||||
_ltree_root->_child = NULL;
|
||||
@ -1515,23 +1516,25 @@ PhaseIdealLoop::PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify
|
||||
|
||||
Dominators();
|
||||
|
||||
// As a side effect, Dominators removed any unreachable CFG paths
|
||||
// into RegionNodes. It doesn't do this test against Root, so
|
||||
// we do it here.
|
||||
for( uint i = 1; i < C->root()->req(); i++ ) {
|
||||
if( !_nodes[C->root()->in(i)->_idx] ) { // Dead path into Root?
|
||||
_igvn.hash_delete(C->root());
|
||||
C->root()->del_req(i);
|
||||
_igvn._worklist.push(C->root());
|
||||
i--; // Rerun same iteration on compressed edges
|
||||
if (!_verify_only) {
|
||||
// As a side effect, Dominators removed any unreachable CFG paths
|
||||
// into RegionNodes. It doesn't do this test against Root, so
|
||||
// we do it here.
|
||||
for( uint i = 1; i < C->root()->req(); i++ ) {
|
||||
if( !_nodes[C->root()->in(i)->_idx] ) { // Dead path into Root?
|
||||
_igvn.hash_delete(C->root());
|
||||
C->root()->del_req(i);
|
||||
_igvn._worklist.push(C->root());
|
||||
i--; // Rerun same iteration on compressed edges
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Given dominators, try to find inner loops with calls that must
|
||||
// always be executed (call dominates loop tail). These loops do
|
||||
// not need a separate safepoint.
|
||||
Node_List cisstack(a);
|
||||
_ltree_root->check_safepts(visited, cisstack);
|
||||
// Given dominators, try to find inner loops with calls that must
|
||||
// always be executed (call dominates loop tail). These loops do
|
||||
// not need a separate safepoint.
|
||||
Node_List cisstack(a);
|
||||
_ltree_root->check_safepts(visited, cisstack);
|
||||
}
|
||||
|
||||
// Walk the DATA nodes and place into loops. Find earliest control
|
||||
// node. For CFG nodes, the _nodes array starts out and remains
|
||||
@ -1548,11 +1551,11 @@ PhaseIdealLoop::PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify
|
||||
// it will be processed among C->top() inputs
|
||||
worklist.push( C->top() );
|
||||
visited.set( C->top()->_idx ); // Set C->top() as visited now
|
||||
build_loop_early( visited, worklist, nstack, verify_me );
|
||||
build_loop_early( visited, worklist, nstack );
|
||||
|
||||
// Given early legal placement, try finding counted loops. This placement
|
||||
// is good enough to discover most loop invariants.
|
||||
if( !verify_me )
|
||||
if( !_verify_me && !_verify_only )
|
||||
_ltree_root->counted_loop( this );
|
||||
|
||||
// Find latest loop placement. Find ideal loop placement.
|
||||
@ -1562,16 +1565,25 @@ PhaseIdealLoop::PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify
|
||||
worklist.push( C->root() );
|
||||
NOT_PRODUCT( C->verify_graph_edges(); )
|
||||
worklist.push( C->top() );
|
||||
build_loop_late( visited, worklist, nstack, verify_me );
|
||||
build_loop_late( visited, worklist, nstack );
|
||||
|
||||
if (_verify_only) {
|
||||
// restore major progress flag
|
||||
for (int i = 0; i < old_progress; i++)
|
||||
C->set_major_progress();
|
||||
assert(C->unique() == unique, "verification mode made Nodes? ? ?");
|
||||
assert(_igvn._worklist.size() == 0, "shouldn't push anything");
|
||||
return;
|
||||
}
|
||||
|
||||
// clear out the dead code
|
||||
while(_deadlist.size()) {
|
||||
igvn.remove_globally_dead_node(_deadlist.pop());
|
||||
_igvn.remove_globally_dead_node(_deadlist.pop());
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
C->verify_graph_edges();
|
||||
if( verify_me ) { // Nested verify pass?
|
||||
if( _verify_me ) { // Nested verify pass?
|
||||
// Check to see if the verify mode is broken
|
||||
assert(C->unique() == unique, "non-optimize mode made Nodes? ? ?");
|
||||
return;
|
||||
@ -1678,7 +1690,7 @@ static int fail; // debug only, so its multi-thread dont care
|
||||
void PhaseIdealLoop::verify() const {
|
||||
int old_progress = C->major_progress();
|
||||
ResourceMark rm;
|
||||
PhaseIdealLoop loop_verify( _igvn, this, false );
|
||||
PhaseIdealLoop loop_verify( _igvn, this );
|
||||
VectorSet visited(Thread::current()->resource_area());
|
||||
|
||||
fail = 0;
|
||||
@ -2138,54 +2150,58 @@ int PhaseIdealLoop::build_loop_tree_impl( Node *n, int pre_order ) {
|
||||
// optimizing an infinite loop?
|
||||
l = _ltree_root; // Oops, found infinite loop
|
||||
|
||||
// Insert the NeverBranch between 'm' and it's control user.
|
||||
NeverBranchNode *iff = new (C, 1) NeverBranchNode( m );
|
||||
_igvn.register_new_node_with_optimizer(iff);
|
||||
set_loop(iff, l);
|
||||
Node *if_t = new (C, 1) CProjNode( iff, 0 );
|
||||
_igvn.register_new_node_with_optimizer(if_t);
|
||||
set_loop(if_t, l);
|
||||
if (!_verify_only) {
|
||||
// Insert the NeverBranch between 'm' and it's control user.
|
||||
NeverBranchNode *iff = new (C, 1) NeverBranchNode( m );
|
||||
_igvn.register_new_node_with_optimizer(iff);
|
||||
set_loop(iff, l);
|
||||
Node *if_t = new (C, 1) CProjNode( iff, 0 );
|
||||
_igvn.register_new_node_with_optimizer(if_t);
|
||||
set_loop(if_t, l);
|
||||
|
||||
Node* cfg = NULL; // Find the One True Control User of m
|
||||
for (DUIterator_Fast jmax, j = m->fast_outs(jmax); j < jmax; j++) {
|
||||
Node* x = m->fast_out(j);
|
||||
if (x->is_CFG() && x != m && x != iff)
|
||||
{ cfg = x; break; }
|
||||
Node* cfg = NULL; // Find the One True Control User of m
|
||||
for (DUIterator_Fast jmax, j = m->fast_outs(jmax); j < jmax; j++) {
|
||||
Node* x = m->fast_out(j);
|
||||
if (x->is_CFG() && x != m && x != iff)
|
||||
{ cfg = x; break; }
|
||||
}
|
||||
assert(cfg != NULL, "must find the control user of m");
|
||||
uint k = 0; // Probably cfg->in(0)
|
||||
while( cfg->in(k) != m ) k++; // But check incase cfg is a Region
|
||||
cfg->set_req( k, if_t ); // Now point to NeverBranch
|
||||
|
||||
// Now create the never-taken loop exit
|
||||
Node *if_f = new (C, 1) CProjNode( iff, 1 );
|
||||
_igvn.register_new_node_with_optimizer(if_f);
|
||||
set_loop(if_f, l);
|
||||
// Find frame ptr for Halt. Relies on the optimizer
|
||||
// V-N'ing. Easier and quicker than searching through
|
||||
// the program structure.
|
||||
Node *frame = new (C, 1) ParmNode( C->start(), TypeFunc::FramePtr );
|
||||
_igvn.register_new_node_with_optimizer(frame);
|
||||
// Halt & Catch Fire
|
||||
Node *halt = new (C, TypeFunc::Parms) HaltNode( if_f, frame );
|
||||
_igvn.register_new_node_with_optimizer(halt);
|
||||
set_loop(halt, l);
|
||||
C->root()->add_req(halt);
|
||||
}
|
||||
assert(cfg != NULL, "must find the control user of m");
|
||||
uint k = 0; // Probably cfg->in(0)
|
||||
while( cfg->in(k) != m ) k++; // But check incase cfg is a Region
|
||||
cfg->set_req( k, if_t ); // Now point to NeverBranch
|
||||
|
||||
// Now create the never-taken loop exit
|
||||
Node *if_f = new (C, 1) CProjNode( iff, 1 );
|
||||
_igvn.register_new_node_with_optimizer(if_f);
|
||||
set_loop(if_f, l);
|
||||
// Find frame ptr for Halt. Relies on the optimizer
|
||||
// V-N'ing. Easier and quicker than searching through
|
||||
// the program structure.
|
||||
Node *frame = new (C, 1) ParmNode( C->start(), TypeFunc::FramePtr );
|
||||
_igvn.register_new_node_with_optimizer(frame);
|
||||
// Halt & Catch Fire
|
||||
Node *halt = new (C, TypeFunc::Parms) HaltNode( if_f, frame );
|
||||
_igvn.register_new_node_with_optimizer(halt);
|
||||
set_loop(halt, l);
|
||||
C->root()->add_req(halt);
|
||||
set_loop(C->root(), _ltree_root);
|
||||
}
|
||||
}
|
||||
// Weeny check for irreducible. This child was already visited (this
|
||||
// IS the post-work phase). Is this child's loop header post-visited
|
||||
// as well? If so, then I found another entry into the loop.
|
||||
while( is_postvisited(l->_head) ) {
|
||||
// found irreducible
|
||||
l->_irreducible = 1; // = true
|
||||
l = l->_parent;
|
||||
_has_irreducible_loops = true;
|
||||
// Check for bad CFG here to prevent crash, and bailout of compile
|
||||
if (l == NULL) {
|
||||
C->record_method_not_compilable("unhandled CFG detected during loop optimization");
|
||||
return pre_order;
|
||||
if (!_verify_only) {
|
||||
while( is_postvisited(l->_head) ) {
|
||||
// found irreducible
|
||||
l->_irreducible = 1; // = true
|
||||
l = l->_parent;
|
||||
_has_irreducible_loops = true;
|
||||
// Check for bad CFG here to prevent crash, and bailout of compile
|
||||
if (l == NULL) {
|
||||
C->record_method_not_compilable("unhandled CFG detected during loop optimization");
|
||||
return pre_order;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2253,7 +2269,7 @@ int PhaseIdealLoop::build_loop_tree_impl( Node *n, int pre_order ) {
|
||||
// Put Data nodes into some loop nest, by setting the _nodes[]->loop mapping.
|
||||
// First pass computes the earliest controlling node possible. This is the
|
||||
// controlling input with the deepest dominating depth.
|
||||
void PhaseIdealLoop::build_loop_early( VectorSet &visited, Node_List &worklist, Node_Stack &nstack, const PhaseIdealLoop *verify_me ) {
|
||||
void PhaseIdealLoop::build_loop_early( VectorSet &visited, Node_List &worklist, Node_Stack &nstack ) {
|
||||
while (worklist.size() != 0) {
|
||||
// Use local variables nstack_top_n & nstack_top_i to cache values
|
||||
// on nstack's top.
|
||||
@ -2285,7 +2301,7 @@ void PhaseIdealLoop::build_loop_early( VectorSet &visited, Node_List &worklist,
|
||||
// (the old code here would yank a 2nd safepoint after seeing a
|
||||
// first one, even though the 1st did not dominate in the loop body
|
||||
// and thus could be avoided indefinitely)
|
||||
if( !verify_me && ilt->_has_sfpt && n->Opcode() == Op_SafePoint &&
|
||||
if( !_verify_only && !_verify_me && ilt->_has_sfpt && n->Opcode() == Op_SafePoint &&
|
||||
is_deleteable_safept(n)) {
|
||||
Node *in = n->in(TypeFunc::Control);
|
||||
lazy_replace(n,in); // Pull safepoint now
|
||||
@ -2408,12 +2424,31 @@ Node *PhaseIdealLoop::compute_idom( Node *region ) const {
|
||||
return LCA;
|
||||
}
|
||||
|
||||
//------------------------------get_late_ctrl----------------------------------
|
||||
// Compute latest legal control.
|
||||
Node *PhaseIdealLoop::get_late_ctrl( Node *n, Node *early ) {
|
||||
assert(early != NULL, "early control should not be NULL");
|
||||
bool PhaseIdealLoop::verify_dominance(Node* n, Node* use, Node* LCA, Node* early) {
|
||||
bool had_error = false;
|
||||
#ifdef ASSERT
|
||||
if (early != C->root()) {
|
||||
// Make sure that there's a dominance path from use to LCA
|
||||
Node* d = use;
|
||||
while (d != LCA) {
|
||||
d = idom(d);
|
||||
if (d == C->root()) {
|
||||
tty->print_cr("*** Use %d isn't dominated by def %s", use->_idx, n->_idx);
|
||||
n->dump();
|
||||
use->dump();
|
||||
had_error = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return had_error;
|
||||
}
|
||||
|
||||
|
||||
Node* PhaseIdealLoop::compute_lca_of_uses(Node* n, Node* early, bool verify) {
|
||||
// Compute LCA over list of uses
|
||||
bool had_error = false;
|
||||
Node *LCA = NULL;
|
||||
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax && LCA != early; i++) {
|
||||
Node* c = n->fast_out(i);
|
||||
@ -2423,15 +2458,34 @@ Node *PhaseIdealLoop::get_late_ctrl( Node *n, Node *early ) {
|
||||
for( uint j=1; j<c->req(); j++ ) {// For all inputs
|
||||
if( c->in(j) == n ) { // Found matching input?
|
||||
Node *use = c->in(0)->in(j);
|
||||
if (_verify_only && use->is_top()) continue;
|
||||
LCA = dom_lca_for_get_late_ctrl( LCA, use, n );
|
||||
if (verify) had_error = verify_dominance(n, use, LCA, early) || had_error;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// For CFG data-users, use is in the block just prior
|
||||
Node *use = has_ctrl(c) ? get_ctrl(c) : c->in(0);
|
||||
LCA = dom_lca_for_get_late_ctrl( LCA, use, n );
|
||||
if (verify) had_error = verify_dominance(n, use, LCA, early) || had_error;
|
||||
}
|
||||
}
|
||||
assert(!had_error, "bad dominance");
|
||||
return LCA;
|
||||
}
|
||||
|
||||
//------------------------------get_late_ctrl----------------------------------
|
||||
// Compute latest legal control.
|
||||
Node *PhaseIdealLoop::get_late_ctrl( Node *n, Node *early ) {
|
||||
assert(early != NULL, "early control should not be NULL");
|
||||
|
||||
Node* LCA = compute_lca_of_uses(n, early);
|
||||
#ifdef ASSERT
|
||||
if (LCA == C->root() && LCA != early) {
|
||||
// def doesn't dominate uses so print some useful debugging output
|
||||
compute_lca_of_uses(n, early, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
// if this is a load, check for anti-dependent stores
|
||||
// We use a conservative algorithm to identify potential interfering
|
||||
@ -2576,7 +2630,7 @@ void PhaseIdealLoop::clear_dom_lca_tags() {
|
||||
//------------------------------build_loop_late--------------------------------
|
||||
// Put Data nodes into some loop nest, by setting the _nodes[]->loop mapping.
|
||||
// Second pass finds latest legal placement, and ideal loop placement.
|
||||
void PhaseIdealLoop::build_loop_late( VectorSet &visited, Node_List &worklist, Node_Stack &nstack, const PhaseIdealLoop *verify_me ) {
|
||||
void PhaseIdealLoop::build_loop_late( VectorSet &visited, Node_List &worklist, Node_Stack &nstack ) {
|
||||
while (worklist.size() != 0) {
|
||||
Node *n = worklist.pop();
|
||||
// Only visit once
|
||||
@ -2612,7 +2666,7 @@ void PhaseIdealLoop::build_loop_late( VectorSet &visited, Node_List &worklist, N
|
||||
}
|
||||
} else {
|
||||
// All of n's children have been processed, complete post-processing.
|
||||
build_loop_late_post(n, verify_me);
|
||||
build_loop_late_post(n);
|
||||
if (nstack.is_empty()) {
|
||||
// Finished all nodes on stack.
|
||||
// Process next node on the worklist.
|
||||
@ -2631,9 +2685,9 @@ void PhaseIdealLoop::build_loop_late( VectorSet &visited, Node_List &worklist, N
|
||||
//------------------------------build_loop_late_post---------------------------
|
||||
// Put Data nodes into some loop nest, by setting the _nodes[]->loop mapping.
|
||||
// Second pass finds latest legal placement, and ideal loop placement.
|
||||
void PhaseIdealLoop::build_loop_late_post( Node *n, const PhaseIdealLoop *verify_me ) {
|
||||
void PhaseIdealLoop::build_loop_late_post( Node *n ) {
|
||||
|
||||
if (n->req() == 2 && n->Opcode() == Op_ConvI2L && !C->major_progress()) {
|
||||
if (n->req() == 2 && n->Opcode() == Op_ConvI2L && !C->major_progress() && !_verify_only) {
|
||||
_igvn._worklist.push(n); // Maybe we'll normalize it, if no more loops.
|
||||
}
|
||||
|
||||
@ -2714,6 +2768,7 @@ void PhaseIdealLoop::build_loop_late_post( Node *n, const PhaseIdealLoop *verify
|
||||
if( get_loop(legal)->_nest < get_loop(least)->_nest )
|
||||
least = legal;
|
||||
}
|
||||
assert(early == legal || legal != C->root(), "bad dominance of inputs");
|
||||
|
||||
// Try not to place code on a loop entry projection
|
||||
// which can inhibit range check elimination.
|
||||
@ -2731,8 +2786,8 @@ void PhaseIdealLoop::build_loop_late_post( Node *n, const PhaseIdealLoop *verify
|
||||
#ifdef ASSERT
|
||||
// If verifying, verify that 'verify_me' has a legal location
|
||||
// and choose it as our location.
|
||||
if( verify_me ) {
|
||||
Node *v_ctrl = verify_me->get_ctrl_no_update(n);
|
||||
if( _verify_me ) {
|
||||
Node *v_ctrl = _verify_me->get_ctrl_no_update(n);
|
||||
Node *legal = LCA;
|
||||
while( early != legal ) { // While not at earliest legal
|
||||
if( legal == v_ctrl ) break; // Check for prior good location
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1998-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1998-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
|
||||
@ -442,6 +442,9 @@ class PhaseIdealLoop : public PhaseTransform {
|
||||
uint *_preorders;
|
||||
uint _max_preorder;
|
||||
|
||||
const PhaseIdealLoop* _verify_me;
|
||||
bool _verify_only;
|
||||
|
||||
// Allocate _preorders[] array
|
||||
void allocate_preorders() {
|
||||
_max_preorder = C->unique()+8;
|
||||
@ -497,6 +500,12 @@ class PhaseIdealLoop : public PhaseTransform {
|
||||
Node_Array _dom_lca_tags;
|
||||
void init_dom_lca_tags();
|
||||
void clear_dom_lca_tags();
|
||||
|
||||
// Helper for debugging bad dominance relationships
|
||||
bool verify_dominance(Node* n, Node* use, Node* LCA, Node* early);
|
||||
|
||||
Node* compute_lca_of_uses(Node* n, Node* early, bool verify = false);
|
||||
|
||||
// Inline wrapper for frequent cases:
|
||||
// 1) only one use
|
||||
// 2) a use is the same as the current LCA passed as 'n1'
|
||||
@ -511,6 +520,7 @@ class PhaseIdealLoop : public PhaseTransform {
|
||||
return find_non_split_ctrl(n);
|
||||
}
|
||||
Node *dom_lca_for_get_late_ctrl_internal( Node *lca, Node *n, Node *tag );
|
||||
|
||||
// true if CFG node d dominates CFG node n
|
||||
bool is_dominator(Node *d, Node *n);
|
||||
|
||||
@ -621,9 +631,9 @@ private:
|
||||
IdealLoopTree *sort( IdealLoopTree *loop, IdealLoopTree *innermost );
|
||||
|
||||
// Place Data nodes in some loop nest
|
||||
void build_loop_early( VectorSet &visited, Node_List &worklist, Node_Stack &nstack, const PhaseIdealLoop *verify_me );
|
||||
void build_loop_late ( VectorSet &visited, Node_List &worklist, Node_Stack &nstack, const PhaseIdealLoop *verify_me );
|
||||
void build_loop_late_post ( Node* n, const PhaseIdealLoop *verify_me );
|
||||
void build_loop_early( VectorSet &visited, Node_List &worklist, Node_Stack &nstack );
|
||||
void build_loop_late ( VectorSet &visited, Node_List &worklist, Node_Stack &nstack );
|
||||
void build_loop_late_post ( Node* n );
|
||||
|
||||
// Array of immediate dominance info for each CFG node indexed by node idx
|
||||
private:
|
||||
@ -662,6 +672,19 @@ private:
|
||||
// Is safept not required by an outer loop?
|
||||
bool is_deleteable_safept(Node* sfpt);
|
||||
|
||||
// Perform verification that the graph is valid.
|
||||
PhaseIdealLoop( PhaseIterGVN &igvn) :
|
||||
PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(C->comp_arena()),
|
||||
_verify_me(NULL),
|
||||
_verify_only(true) {
|
||||
build_and_optimize(false);
|
||||
}
|
||||
|
||||
// build the loop tree and perform any requested optimizations
|
||||
void build_and_optimize(bool do_split_if);
|
||||
|
||||
public:
|
||||
// Dominators for the sea of nodes
|
||||
void Dominators();
|
||||
@ -671,7 +694,32 @@ public:
|
||||
Node *dom_lca_internal( Node *n1, Node *n2 ) const;
|
||||
|
||||
// Compute the Ideal Node to Loop mapping
|
||||
PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify_me, bool do_split_ifs );
|
||||
PhaseIdealLoop( PhaseIterGVN &igvn, bool do_split_ifs) :
|
||||
PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(C->comp_arena()),
|
||||
_verify_me(NULL),
|
||||
_verify_only(false) {
|
||||
build_and_optimize(do_split_ifs);
|
||||
}
|
||||
|
||||
// Verify that verify_me made the same decisions as a fresh run.
|
||||
PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify_me) :
|
||||
PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(C->comp_arena()),
|
||||
_verify_me(verify_me),
|
||||
_verify_only(false) {
|
||||
build_and_optimize(false);
|
||||
}
|
||||
|
||||
// Build and verify the loop tree without modifying the graph. This
|
||||
// is useful to verify that all inputs properly dominate their uses.
|
||||
static void verify(PhaseIterGVN& igvn) {
|
||||
#ifdef ASSERT
|
||||
PhaseIdealLoop v(igvn);
|
||||
#endif
|
||||
}
|
||||
|
||||
// True if the method has at least 1 irreducible loop
|
||||
bool _has_irreducible_loops;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
@ -53,6 +53,7 @@ elapsedTimer Phase::_t_codeGeneration;
|
||||
elapsedTimer Phase::_t_registerMethod;
|
||||
elapsedTimer Phase::_t_temporaryTimer1;
|
||||
elapsedTimer Phase::_t_temporaryTimer2;
|
||||
elapsedTimer Phase::_t_idealLoopVerify;
|
||||
|
||||
// Subtimers for _t_optimizer
|
||||
elapsedTimer Phase::_t_iterGVN;
|
||||
@ -88,51 +89,52 @@ void Phase::print_timers() {
|
||||
tty->print_cr ("Accumulated compiler times:");
|
||||
tty->print_cr ("---------------------------");
|
||||
tty->print_cr (" Total compilation: %3.3f sec.", Phase::_t_totalCompilation.seconds());
|
||||
tty->print (" method compilation : %3.3f sec", Phase::_t_methodCompilation.seconds());
|
||||
tty->print (" method compilation : %3.3f sec", Phase::_t_methodCompilation.seconds());
|
||||
tty->print ("/%d bytes",_total_bytes_compiled);
|
||||
tty->print_cr (" (%3.0f bytes per sec) ", Phase::_total_bytes_compiled / Phase::_t_methodCompilation.seconds());
|
||||
tty->print_cr (" stub compilation : %3.3f sec.", Phase::_t_stubCompilation.seconds());
|
||||
tty->print_cr (" stub compilation : %3.3f sec.", Phase::_t_stubCompilation.seconds());
|
||||
tty->print_cr (" Phases:");
|
||||
tty->print_cr (" parse : %3.3f sec", Phase::_t_parser.seconds());
|
||||
tty->print_cr (" parse : %3.3f sec", Phase::_t_parser.seconds());
|
||||
if (DoEscapeAnalysis) {
|
||||
tty->print_cr (" escape analysis : %3.3f sec", Phase::_t_escapeAnalysis.seconds());
|
||||
tty->print_cr (" escape analysis : %3.3f sec", Phase::_t_escapeAnalysis.seconds());
|
||||
}
|
||||
tty->print_cr (" optimizer : %3.3f sec", Phase::_t_optimizer.seconds());
|
||||
tty->print_cr (" optimizer : %3.3f sec", Phase::_t_optimizer.seconds());
|
||||
if( Verbose || WizardMode ) {
|
||||
tty->print_cr (" iterGVN : %3.3f sec", Phase::_t_iterGVN.seconds());
|
||||
tty->print_cr (" idealLoop : %3.3f sec", Phase::_t_idealLoop.seconds());
|
||||
tty->print_cr (" ccp : %3.3f sec", Phase::_t_ccp.seconds());
|
||||
tty->print_cr (" iterGVN2 : %3.3f sec", Phase::_t_iterGVN2.seconds());
|
||||
tty->print_cr (" graphReshape : %3.3f sec", Phase::_t_graphReshaping.seconds());
|
||||
tty->print_cr (" iterGVN : %3.3f sec", Phase::_t_iterGVN.seconds());
|
||||
tty->print_cr (" idealLoop : %3.3f sec", Phase::_t_idealLoop.seconds());
|
||||
tty->print_cr (" idealLoopVerify: %3.3f sec", Phase::_t_idealLoopVerify.seconds());
|
||||
tty->print_cr (" ccp : %3.3f sec", Phase::_t_ccp.seconds());
|
||||
tty->print_cr (" iterGVN2 : %3.3f sec", Phase::_t_iterGVN2.seconds());
|
||||
tty->print_cr (" graphReshape : %3.3f sec", Phase::_t_graphReshaping.seconds());
|
||||
double optimizer_subtotal = Phase::_t_iterGVN.seconds() +
|
||||
Phase::_t_idealLoop.seconds() + Phase::_t_ccp.seconds() +
|
||||
Phase::_t_graphReshaping.seconds();
|
||||
double percent_of_optimizer = ((optimizer_subtotal == 0.0) ? 0.0 : (optimizer_subtotal / Phase::_t_optimizer.seconds() * 100.0));
|
||||
tty->print_cr (" subtotal : %3.3f sec, %3.2f %%", optimizer_subtotal, percent_of_optimizer);
|
||||
tty->print_cr (" subtotal : %3.3f sec, %3.2f %%", optimizer_subtotal, percent_of_optimizer);
|
||||
}
|
||||
tty->print_cr (" matcher : %3.3f sec", Phase::_t_matcher.seconds());
|
||||
tty->print_cr (" scheduler : %3.3f sec", Phase::_t_scheduler.seconds());
|
||||
tty->print_cr (" regalloc : %3.3f sec", Phase::_t_registerAllocation.seconds());
|
||||
tty->print_cr (" matcher : %3.3f sec", Phase::_t_matcher.seconds());
|
||||
tty->print_cr (" scheduler : %3.3f sec", Phase::_t_scheduler.seconds());
|
||||
tty->print_cr (" regalloc : %3.3f sec", Phase::_t_registerAllocation.seconds());
|
||||
if( Verbose || WizardMode ) {
|
||||
tty->print_cr (" ctorChaitin : %3.3f sec", Phase::_t_ctorChaitin.seconds());
|
||||
tty->print_cr (" buildIFG : %3.3f sec", Phase::_t_buildIFGphysical.seconds());
|
||||
tty->print_cr (" computeLive : %3.3f sec", Phase::_t_computeLive.seconds());
|
||||
tty->print_cr (" regAllocSplit: %3.3f sec", Phase::_t_regAllocSplit.seconds());
|
||||
tty->print_cr (" ctorChaitin : %3.3f sec", Phase::_t_ctorChaitin.seconds());
|
||||
tty->print_cr (" buildIFG : %3.3f sec", Phase::_t_buildIFGphysical.seconds());
|
||||
tty->print_cr (" computeLive : %3.3f sec", Phase::_t_computeLive.seconds());
|
||||
tty->print_cr (" regAllocSplit : %3.3f sec", Phase::_t_regAllocSplit.seconds());
|
||||
tty->print_cr (" postAllocCopyRemoval: %3.3f sec", Phase::_t_postAllocCopyRemoval.seconds());
|
||||
tty->print_cr (" fixupSpills : %3.3f sec", Phase::_t_fixupSpills.seconds());
|
||||
tty->print_cr (" fixupSpills : %3.3f sec", Phase::_t_fixupSpills.seconds());
|
||||
double regalloc_subtotal = Phase::_t_ctorChaitin.seconds() +
|
||||
Phase::_t_buildIFGphysical.seconds() + Phase::_t_computeLive.seconds() +
|
||||
Phase::_t_regAllocSplit.seconds() + Phase::_t_fixupSpills.seconds() +
|
||||
Phase::_t_postAllocCopyRemoval.seconds();
|
||||
double percent_of_regalloc = ((regalloc_subtotal == 0.0) ? 0.0 : (regalloc_subtotal / Phase::_t_registerAllocation.seconds() * 100.0));
|
||||
tty->print_cr (" subtotal : %3.3f sec, %3.2f %%", regalloc_subtotal, percent_of_regalloc);
|
||||
tty->print_cr (" subtotal : %3.3f sec, %3.2f %%", regalloc_subtotal, percent_of_regalloc);
|
||||
}
|
||||
tty->print_cr (" macroExpand : %3.3f sec", Phase::_t_macroExpand.seconds());
|
||||
tty->print_cr (" blockOrdering: %3.3f sec", Phase::_t_blockOrdering.seconds());
|
||||
tty->print_cr (" peephole : %3.3f sec", Phase::_t_peephole.seconds());
|
||||
tty->print_cr (" codeGen : %3.3f sec", Phase::_t_codeGeneration.seconds());
|
||||
tty->print_cr (" install_code : %3.3f sec", Phase::_t_registerMethod.seconds());
|
||||
tty->print_cr (" ------------ : ----------");
|
||||
tty->print_cr (" macroExpand : %3.3f sec", Phase::_t_macroExpand.seconds());
|
||||
tty->print_cr (" blockOrdering : %3.3f sec", Phase::_t_blockOrdering.seconds());
|
||||
tty->print_cr (" peephole : %3.3f sec", Phase::_t_peephole.seconds());
|
||||
tty->print_cr (" codeGen : %3.3f sec", Phase::_t_codeGeneration.seconds());
|
||||
tty->print_cr (" install_code : %3.3f sec", Phase::_t_registerMethod.seconds());
|
||||
tty->print_cr (" -------------- : ----------");
|
||||
double phase_subtotal = Phase::_t_parser.seconds() +
|
||||
(DoEscapeAnalysis ? Phase::_t_escapeAnalysis.seconds() : 0.0) +
|
||||
Phase::_t_optimizer.seconds() + Phase::_t_graphReshaping.seconds() +
|
||||
@ -143,7 +145,7 @@ void Phase::print_timers() {
|
||||
double percent_of_method_compile = ((phase_subtotal == 0.0) ? 0.0 : phase_subtotal / Phase::_t_methodCompilation.seconds()) * 100.0;
|
||||
// counters inside Compile::CodeGen include time for adapters and stubs
|
||||
// so phase-total can be greater than 100%
|
||||
tty->print_cr (" total : %3.3f sec, %3.2f %%", phase_subtotal, percent_of_method_compile);
|
||||
tty->print_cr (" total : %3.3f sec, %3.2f %%", phase_subtotal, percent_of_method_compile);
|
||||
|
||||
assert( percent_of_method_compile > expected_method_compile_coverage ||
|
||||
phase_subtotal < minimum_meaningful_method_compile,
|
||||
@ -157,8 +159,8 @@ void Phase::print_timers() {
|
||||
tty->cr();
|
||||
tty->print_cr (" temporaryTimer2: %3.3f sec", Phase::_t_temporaryTimer2.seconds());
|
||||
}
|
||||
tty->print_cr (" output : %3.3f sec", Phase::_t_output.seconds());
|
||||
tty->print_cr (" isched : %3.3f sec", Phase::_t_instrSched.seconds());
|
||||
tty->print_cr (" bldOopMaps: %3.3f sec", Phase::_t_buildOopMaps.seconds());
|
||||
tty->print_cr (" output : %3.3f sec", Phase::_t_output.seconds());
|
||||
tty->print_cr (" isched : %3.3f sec", Phase::_t_instrSched.seconds());
|
||||
tty->print_cr (" bldOopMaps : %3.3f sec", Phase::_t_buildOopMaps.seconds());
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-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
|
||||
@ -83,6 +83,7 @@ protected:
|
||||
static elapsedTimer _t_registerMethod;
|
||||
static elapsedTimer _t_temporaryTimer1;
|
||||
static elapsedTimer _t_temporaryTimer2;
|
||||
static elapsedTimer _t_idealLoopVerify;
|
||||
|
||||
// Subtimers for _t_optimizer
|
||||
static elapsedTimer _t_iterGVN;
|
||||
|
@ -1622,9 +1622,11 @@ void Node::set_req_X( uint i, Node *n, PhaseIterGVN *igvn ) {
|
||||
// old goes dead?
|
||||
if( old ) {
|
||||
switch (old->outcnt()) {
|
||||
case 0: // Kill all his inputs, and recursively kill other dead nodes.
|
||||
case 0:
|
||||
// Put into the worklist to kill later. We do not kill it now because the
|
||||
// recursive kill will delete the current node (this) if dead-loop exists
|
||||
if (!old->is_top())
|
||||
igvn->remove_dead_node( old );
|
||||
igvn->_worklist.push( old );
|
||||
break;
|
||||
case 1:
|
||||
if( old->is_Store() || old->has_special_unique_user() )
|
||||
|
@ -88,6 +88,7 @@ int PhaseChaitin::yank_if_dead( Node *old, Block *current_block, Node_List *valu
|
||||
value->map(old_reg,NULL); // Yank from value/regnd maps
|
||||
regnd->map(old_reg,NULL); // This register's value is now unknown
|
||||
}
|
||||
assert(old->req() <= 2, "can't handle more inputs");
|
||||
Node *tmp = old->req() > 1 ? old->in(1) : NULL;
|
||||
old->disconnect_inputs(NULL);
|
||||
if( !tmp ) break;
|
||||
@ -530,6 +531,16 @@ void PhaseChaitin::post_allocate_copy_removal() {
|
||||
// Do not change from int to pointer
|
||||
Node *val = skip_copies(n);
|
||||
|
||||
// Clear out a dead definition before starting so that the
|
||||
// elimination code doesn't have to guard against it. The
|
||||
// definition could in fact be a kill projection with a count of
|
||||
// 0 which is safe but since those are uninteresting for copy
|
||||
// elimination just delete them as well.
|
||||
if (regnd[nreg] != NULL && regnd[nreg]->outcnt() == 0) {
|
||||
regnd.map(nreg, NULL);
|
||||
value.map(nreg, NULL);
|
||||
}
|
||||
|
||||
uint n_ideal_reg = n->ideal_reg();
|
||||
if( is_single_register(n_ideal_reg) ) {
|
||||
// If Node 'n' does not change the value mapped by the register,
|
||||
@ -537,8 +548,7 @@ void PhaseChaitin::post_allocate_copy_removal() {
|
||||
// mapping so 'n' will go dead.
|
||||
if( value[nreg] != val ) {
|
||||
if (eliminate_copy_of_constant(val, n, b, value, regnd, nreg, OptoReg::Bad)) {
|
||||
n->replace_by(regnd[nreg]);
|
||||
j -= yank_if_dead(n,b,&value,®nd);
|
||||
j -= replace_and_yank_if_dead(n, nreg, b, value, regnd);
|
||||
} else {
|
||||
// Update the mapping: record new Node defined by the register
|
||||
regnd.map(nreg,n);
|
||||
@ -546,10 +556,9 @@ void PhaseChaitin::post_allocate_copy_removal() {
|
||||
// Node after skipping all copies.
|
||||
value.map(nreg,val);
|
||||
}
|
||||
} else if( !may_be_copy_of_callee(n) && regnd[nreg]->outcnt() != 0 ) {
|
||||
} else if( !may_be_copy_of_callee(n) ) {
|
||||
assert( n->is_Copy(), "" );
|
||||
n->replace_by(regnd[nreg]);
|
||||
j -= yank_if_dead(n,b,&value,®nd);
|
||||
j -= replace_and_yank_if_dead(n, nreg, b, value, regnd);
|
||||
}
|
||||
} else {
|
||||
// If the value occupies a register pair, record same info
|
||||
@ -565,18 +574,16 @@ void PhaseChaitin::post_allocate_copy_removal() {
|
||||
}
|
||||
if( value[nreg] != val || value[nreg_lo] != val ) {
|
||||
if (eliminate_copy_of_constant(val, n, b, value, regnd, nreg, nreg_lo)) {
|
||||
n->replace_by(regnd[nreg]);
|
||||
j -= yank_if_dead(n,b,&value,®nd);
|
||||
j -= replace_and_yank_if_dead(n, nreg, b, value, regnd);
|
||||
} else {
|
||||
regnd.map(nreg , n );
|
||||
regnd.map(nreg_lo, n );
|
||||
value.map(nreg ,val);
|
||||
value.map(nreg_lo,val);
|
||||
}
|
||||
} else if( !may_be_copy_of_callee(n) && regnd[nreg]->outcnt() != 0 ) {
|
||||
} else if( !may_be_copy_of_callee(n) ) {
|
||||
assert( n->is_Copy(), "" );
|
||||
n->replace_by(regnd[nreg]);
|
||||
j -= yank_if_dead(n,b,&value,®nd);
|
||||
j -= replace_and_yank_if_dead(n, nreg, b, value, regnd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 2003-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
|
||||
@ -402,7 +402,7 @@ void JvmtiCodeBlobEvents::build_jvmti_addr_location_map(nmethod *nm,
|
||||
|
||||
address scopes_data = nm->scopes_data_begin();
|
||||
for( pcd = nm->scopes_pcs_begin(); pcd < nm->scopes_pcs_end(); ++pcd ) {
|
||||
ScopeDesc sc0(nm, pcd->scope_decode_offset());
|
||||
ScopeDesc sc0(nm, pcd->scope_decode_offset(), pcd->should_reexecute());
|
||||
ScopeDesc *sd = &sc0;
|
||||
while( !sd->is_top() ) { sd = sd->sender(); }
|
||||
int bci = sd->bci();
|
||||
|
@ -1233,10 +1233,8 @@ void Arguments::set_ergonomics_flags() {
|
||||
// Check that UseCompressedOops can be set with the max heap size allocated
|
||||
// by ergonomics.
|
||||
if (MaxHeapSize <= max_heap_for_compressed_oops()) {
|
||||
if (FLAG_IS_DEFAULT(UseCompressedOops)) {
|
||||
// Turn off until bug is fixed.
|
||||
// the following line to return it to default status.
|
||||
// FLAG_SET_ERGO(bool, UseCompressedOops, true);
|
||||
if (FLAG_IS_DEFAULT(UseCompressedOops) && !UseG1GC) {
|
||||
FLAG_SET_ERGO(bool, UseCompressedOops, true);
|
||||
}
|
||||
#ifdef _WIN64
|
||||
if (UseLargePages && UseCompressedOops) {
|
||||
|
@ -402,12 +402,7 @@ inline void vframeStreamCommon::fill_from_compiled_frame(int decode_offset) {
|
||||
DebugInfoReadStream buffer(nm(), decode_offset);
|
||||
_sender_decode_offset = buffer.read_int();
|
||||
_method = methodOop(buffer.read_oop());
|
||||
// Deoptimization needs reexecute bit to determine whether to reexecute the bytecode
|
||||
// only at the time when it "unpack_frames", and the reexecute bit info could always
|
||||
// be obtained from the scopeDesc in the compiledVFrame. As a result, we don't keep
|
||||
// the reexecute bit here.
|
||||
bool dummy_reexecute;
|
||||
_bci = buffer.read_bci_and_reexecute(dummy_reexecute);
|
||||
_bci = buffer.read_bci();
|
||||
|
||||
assert(_method->is_method(), "checking type of decoded method");
|
||||
}
|
||||
|
@ -593,6 +593,7 @@ static inline uint64_t cast_uint64_t(size_t x)
|
||||
\
|
||||
nonstatic_field(PcDesc, _pc_offset, int) \
|
||||
nonstatic_field(PcDesc, _scope_decode_offset, int) \
|
||||
nonstatic_field(PcDesc, _flags, PcDesc::PcDescFlags) \
|
||||
\
|
||||
/***************************************************/ \
|
||||
/* CodeBlobs (NOTE: incomplete, but only a little) */ \
|
||||
@ -1158,6 +1159,7 @@ static inline uint64_t cast_uint64_t(size_t x)
|
||||
/***************************************/ \
|
||||
\
|
||||
declare_toplevel_type(PcDesc) \
|
||||
declare_integer_type(PcDesc::PcDescFlags) \
|
||||
\
|
||||
/************************/ \
|
||||
/* OopMap and OopMapSet */ \
|
||||
|
47
hotspot/test/compiler/6795465/Test6795465.java
Normal file
47
hotspot/test/compiler/6795465/Test6795465.java
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 6795465
|
||||
* @summary Crash in assembler_sparc.cpp with client compiler on solaris-sparc
|
||||
*
|
||||
* @run main Test6795465
|
||||
*/
|
||||
|
||||
public class Test6795465 {
|
||||
static long var_1 = -1;
|
||||
|
||||
void test() {
|
||||
long var_2 = var_1 * 1;
|
||||
var_2 = var_2 + (new byte[1])[0];
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Test6795465 t = new Test6795465();
|
||||
for (int i = 0; i < 200000; i++) {
|
||||
t.test();
|
||||
}
|
||||
}
|
||||
}
|
47
hotspot/test/compiler/6866651/Test.java
Normal file
47
hotspot/test/compiler/6866651/Test.java
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 6866651
|
||||
* @summary delay dead node elimination in set_req_X to prevent killing the current node when it is in use
|
||||
*
|
||||
* @run main Test
|
||||
*/
|
||||
|
||||
public class Test {
|
||||
|
||||
static int sum() {
|
||||
int s = 0;
|
||||
for (int x = 1, y = 0; x != 0; x++, y--) {
|
||||
s ^= y;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public static void main(final String[] args) {
|
||||
for (int k = 0; k < 2; k++) {
|
||||
System.err.println(String.valueOf(sum()));
|
||||
}
|
||||
}
|
||||
}
|
@ -41,3 +41,7 @@ ae449e9c04c1fe651bd30f0f4d4cc24ba794e0c4 jdk7-b63
|
||||
a10eec7a1edf536f39b5828d8623054dbc62c2b7 jdk7-b64
|
||||
008c662e0ee9a91aebb75e46b97de979083d5c1c jdk7-b65
|
||||
22f9d5d5b5fe0f47048f41e6c6e54fee5edad0ec jdk7-b66
|
||||
a033af8d824a408d3ac602205ecdefc128749e1e jdk7-b67
|
||||
83b2a9331383f9db7a49350d4cb13b7635f6b861 jdk7-b68
|
||||
a4ab0d6ded63bed0fd1e5be55d38090e0ee5efb7 jdk7-b69
|
||||
c83f0106b78a85c7e614d27a328675460b2081cf jdk7-b70
|
||||
|
@ -32,7 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--- end of LICENSE file ---
|
||||
%% This notice is provided with respect to ASM, which may be included with this software:
|
||||
Copyright (c) 2000-2005 INRIA, France Telecom
|
||||
Copyright (c) 2000-2007 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -30,8 +30,8 @@
|
||||
# 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.source = 7
|
||||
javac.target = 7
|
||||
javac.debug = true
|
||||
javac.no.jdk.warnings = -XDignore.symbol.file=true
|
||||
# set the following to -version to verify the versions of javac being used
|
||||
|
@ -1027,6 +1027,9 @@ public abstract class XMLScanner
|
||||
int c = fEntityScanner.peekChar();
|
||||
if (XMLChar.isMarkup(c) || c == ']') {
|
||||
fStringBuffer.append((char)fEntityScanner.scanChar());
|
||||
} else if (c != -1 && isInvalidLiteral(c)) {
|
||||
reportFatalError("InvalidCharInSystemID",
|
||||
new Object[] {Integer.toString(c, 16)});
|
||||
}
|
||||
} while (fEntityScanner.scanLiteral(quote, ident) != quote);
|
||||
fStringBuffer.append(ident);
|
||||
|
@ -41,3 +41,7 @@ b8a6e883c0a6708f6d818815040525d472262495 jdk7-b63
|
||||
aaa25dfd3de68c6f1a1d3ef8c45fd99f76bca6dd jdk7-b64
|
||||
aa22a1be5866a6608ba17a7a443945559409ae0f jdk7-b65
|
||||
fa8712c099edd5c9a6b3ed9729353738004d388f jdk7-b66
|
||||
faa13cd4d6cdcfb155da5ed23b0da6e0ed0f9ea8 jdk7-b67
|
||||
845fa487f0f72a9f232ead8315c0087a477a5a31 jdk7-b68
|
||||
3e64fdfb92910e164d1f4b21b147719d5c674254 jdk7-b69
|
||||
dd3c5f3ec28d5d5e5c0dc3229fdd52d85d04274d jdk7-b70
|
||||
|
@ -32,7 +32,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--- end of LICENSE file ---
|
||||
%% This notice is provided with respect to ASM, which may be included with this software:
|
||||
Copyright (c) 2000-2005 INRIA, France Telecom
|
||||
Copyright (c) 2000-2007 INRIA, France Telecom
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -30,8 +30,8 @@
|
||||
# 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.source = 7
|
||||
javac.target = 7
|
||||
javac.debug = true
|
||||
javac.no.jdk.warnings = -XDignore.symbol.file=true
|
||||
# set the following to -version to verify the versions of javac being used
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.codemodel.internal;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
@ -199,8 +199,7 @@ public final class JAnnotationUse extends JAnnotationValue {
|
||||
*
|
||||
*/
|
||||
public JAnnotationUse param(String name, Class value){
|
||||
addValue(name, new JAnnotationStringValue(JExpr.lit(value.getName())));
|
||||
return this;
|
||||
return param(name,clazz.owner().ref(value));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.codemodel.internal;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
@ -111,6 +111,14 @@ public final class JBlock implements JGenerable, JStatement {
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this block is empty and does not contain
|
||||
* any statement.
|
||||
*/
|
||||
public boolean isEmpty() {
|
||||
return content.isEmpty();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a local variable declaration to this block
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.codemodel.internal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -77,7 +78,8 @@ public class JCommentPart extends ArrayList<Object> {
|
||||
*/
|
||||
protected void format( JFormatter f, String indent ) {
|
||||
if(!f.isPrinting()) {
|
||||
// quickly pass the types to JFormatter
|
||||
// quickly pass the types to JFormatter, as that's all we care.
|
||||
// we don't need to worry about the exact formatting of text.
|
||||
for( Object o : this )
|
||||
if(o instanceof JClass)
|
||||
f.g((JClass)o);
|
||||
@ -97,12 +99,12 @@ public class JCommentPart extends ArrayList<Object> {
|
||||
while( (idx=s.indexOf('\n'))!=-1 ) {
|
||||
String line = s.substring(0,idx);
|
||||
if(line.length()>0)
|
||||
f.p(line);
|
||||
f.p(escape(line));
|
||||
s = s.substring(idx+1);
|
||||
f.nl().p(indent);
|
||||
}
|
||||
if(s.length()!=0)
|
||||
f.p(s);
|
||||
f.p(escape(s));
|
||||
} else
|
||||
if(o instanceof JClass) {
|
||||
// TODO: this doesn't print the parameterized type properly
|
||||
@ -117,4 +119,16 @@ public class JCommentPart extends ArrayList<Object> {
|
||||
if(!isEmpty())
|
||||
f.nl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes the appearance of the comment terminator.
|
||||
*/
|
||||
private String escape(String s) {
|
||||
while(true) {
|
||||
int idx = s.indexOf("*/");
|
||||
if(idx <0) return s;
|
||||
|
||||
s = s.substring(0,idx+1)+"<!---->"+s.substring(idx+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.codemodel.internal;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
@ -198,8 +198,12 @@ public abstract class JExpr {
|
||||
char c = s.charAt(i);
|
||||
int j = charEscape.indexOf(c);
|
||||
if(j>=0) {
|
||||
sb.append('\\');
|
||||
sb.append(charMacro.charAt(j));
|
||||
if((quote=='"' && c=='\'') || (quote=='\'' && c=='"')) {
|
||||
sb.append(c);
|
||||
} else {
|
||||
sb.append('\\');
|
||||
sb.append(charMacro.charAt(j));
|
||||
}
|
||||
} else {
|
||||
// technically Unicode escape shouldn't be done here,
|
||||
// for it's a lexical level handling.
|
||||
|
@ -231,6 +231,7 @@ public class JJavaName {
|
||||
"(.*)basis","$1bases",
|
||||
"(.*)axis","$1axes",
|
||||
"(.+)is","$1ises",
|
||||
"(.+)ss","$1sses",
|
||||
"(.+)us","$1uses",
|
||||
"(.+)s","$1s",
|
||||
"(.*)foot","$1feet",
|
||||
|
@ -388,10 +388,11 @@ public class JMethod extends JGenerifiableImpl implements JDeclaration, JAnnotat
|
||||
f.g(a).nl();
|
||||
}
|
||||
|
||||
// declare the generics parameters
|
||||
f.g(mods);
|
||||
|
||||
// declare the generics parameters
|
||||
super.declare(f);
|
||||
|
||||
f.g(mods);
|
||||
if (!isConstructor())
|
||||
f.g(type);
|
||||
f.id(name).p('(').i();
|
||||
|
@ -98,32 +98,7 @@ public final class JPackage implements JDeclaration, JGenerable, JClassContainer
|
||||
JPackage(String name, JCodeModel cw) {
|
||||
this.owner = cw;
|
||||
if (name.equals(".")) {
|
||||
String msg = "JPackage name . is not allowed";
|
||||
throw new IllegalArgumentException(msg);
|
||||
}
|
||||
|
||||
int dots = 1;
|
||||
for (int i = 0; i < name.length(); i++) {
|
||||
char c = name.charAt(i);
|
||||
if (c == '.') {
|
||||
dots++;
|
||||
continue;
|
||||
}
|
||||
if (dots > 1) {
|
||||
String msg = "JPackage name " + name + " missing identifier";
|
||||
throw new IllegalArgumentException(msg);
|
||||
} else if (dots == 1 && !Character.isJavaIdentifierStart(c)) {
|
||||
String msg =
|
||||
"JPackage name " + name + " contains illegal " + "character for beginning of identifier: " + c;
|
||||
throw new IllegalArgumentException(msg);
|
||||
} else if (!Character.isJavaIdentifierPart(c)) {
|
||||
String msg = "JPackage name " + name + "contains illegal " + "character: " + c;
|
||||
throw new IllegalArgumentException(msg);
|
||||
}
|
||||
dots = 0;
|
||||
}
|
||||
if (!name.trim().equals("") && dots != 0) {
|
||||
String msg = "JPackage name not allowed to end with .";
|
||||
String msg = "Package name . is not allowed";
|
||||
throw new IllegalArgumentException(msg);
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.codemodel.internal;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.codemodel.internal;
|
||||
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
|
@ -1,29 +0,0 @@
|
||||
<!--
|
||||
Copyright 2005-2006 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.
|
||||
-->
|
||||
<HTML>
|
||||
<BODY>
|
||||
Various resource file formats (classes that implement <code>JResourceFile</code>).
|
||||
</BODY>
|
||||
</HTML>
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* <h1>Library for generating Java source code</h1>.
|
||||
*
|
||||
|
@ -22,11 +22,10 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @(#)$Id: EncoderFactory.java,v 1.3 2005/09/10 19:07:33 kohsuke Exp $
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.codemodel.internal.util;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
@ -22,11 +22,10 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @(#)$Id: MS1252Encoder.java,v 1.2 2005/09/10 19:07:33 kohsuke Exp $
|
||||
*/
|
||||
|
||||
|
||||
package com.sun.codemodel.internal.util;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.codemodel.internal.writer;
|
||||
|
||||
import java.io.OutputStream;
|
||||
|
33
jaxws/src/share/classes/com/sun/istack/internal/Builder.java
Normal file
33
jaxws/src/share/classes/com/sun/istack/internal/Builder.java
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2005-2006 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 com.sun.istack.internal;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Martin Grebac
|
||||
*/
|
||||
public interface Builder<T> {
|
||||
T build();
|
||||
}
|
@ -25,6 +25,7 @@
|
||||
package com.sun.istack.internal;
|
||||
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/**
|
||||
* Pool of reusable objects that are indistinguishable from each other,
|
||||
@ -33,6 +34,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public interface Pool<T> {
|
||||
|
||||
/**
|
||||
* Gets a new object from the pool.
|
||||
*
|
||||
@ -46,7 +48,6 @@ public interface Pool<T> {
|
||||
*/
|
||||
void recycle(@NotNull T t);
|
||||
|
||||
|
||||
/**
|
||||
* Default implementation that uses {@link ConcurrentLinkedQueue}
|
||||
* as the data store.
|
||||
@ -55,7 +56,10 @@ public interface Pool<T> {
|
||||
* <p>
|
||||
* Don't rely on the fact that this class extends from {@link ConcurrentLinkedQueue}.
|
||||
*/
|
||||
public abstract class Impl<T> extends ConcurrentLinkedQueue<T> implements Pool<T> {
|
||||
public abstract class Impl<T> implements Pool<T> {
|
||||
|
||||
private volatile WeakReference<ConcurrentLinkedQueue<T>> queue;
|
||||
|
||||
/**
|
||||
* Gets a new object from the pool.
|
||||
*
|
||||
@ -66,9 +70,10 @@ public interface Pool<T> {
|
||||
* always non-null.
|
||||
*/
|
||||
public final @NotNull T take() {
|
||||
T t = super.poll();
|
||||
if(t==null)
|
||||
T t = getQueue().poll();
|
||||
if(t==null) {
|
||||
return create();
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
@ -76,7 +81,22 @@ public interface Pool<T> {
|
||||
* Returns an object back to the pool.
|
||||
*/
|
||||
public final void recycle(T t) {
|
||||
super.offer(t);
|
||||
getQueue().offer(t);
|
||||
}
|
||||
|
||||
private ConcurrentLinkedQueue<T> getQueue() {
|
||||
WeakReference<ConcurrentLinkedQueue<T>> q = queue;
|
||||
if (q != null) {
|
||||
ConcurrentLinkedQueue<T> d = q.get();
|
||||
if (d != null) {
|
||||
return d;
|
||||
}
|
||||
}
|
||||
// overwrite the queue
|
||||
ConcurrentLinkedQueue<T> d = new ConcurrentLinkedQueue<T>();
|
||||
queue = new WeakReference<ConcurrentLinkedQueue<T>>(d);
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,12 +54,22 @@ public class XMLStreamReaderToContentHandler {
|
||||
|
||||
// if true, when the conversion is completed, leave the cursor to the last
|
||||
// event that was fired (such as end element)
|
||||
private boolean eagerQuit;
|
||||
private final boolean eagerQuit;
|
||||
|
||||
/**
|
||||
* If true, not start/endDocument event.
|
||||
*/
|
||||
private boolean fragment;
|
||||
private final boolean fragment;
|
||||
|
||||
// array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }
|
||||
private final String[] inscopeNamespaces;
|
||||
|
||||
/**
|
||||
* @see #XMLStreamReaderToContentHandler(XMLStreamReader, ContentHandler, boolean, boolean, String[])
|
||||
*/
|
||||
public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore, boolean eagerQuit, boolean fragment) {
|
||||
this(staxCore, saxCore, eagerQuit, fragment, new String[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a new StAX to SAX adapter that will convert a StAX event
|
||||
@ -69,14 +79,22 @@ public class XMLStreamReaderToContentHandler {
|
||||
* StAX event source
|
||||
* @param saxCore
|
||||
* SAXevent sink
|
||||
* @param eagerQuit
|
||||
* @param fragment
|
||||
* @param inscopeNamespaces
|
||||
* array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }
|
||||
*/
|
||||
public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore, boolean eagerQuit, boolean fragment) {
|
||||
public XMLStreamReaderToContentHandler(XMLStreamReader staxCore, ContentHandler saxCore,
|
||||
boolean eagerQuit, boolean fragment, String[] inscopeNamespaces) {
|
||||
this.staxStreamReader = staxCore;
|
||||
this.saxHandler = saxCore;
|
||||
this.eagerQuit = eagerQuit;
|
||||
this.fragment = fragment;
|
||||
this.inscopeNamespaces = inscopeNamespaces;
|
||||
assert inscopeNamespaces.length%2 == 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @see StAXReaderToContentHandler#bridge()
|
||||
*/
|
||||
@ -100,6 +118,10 @@ public class XMLStreamReaderToContentHandler {
|
||||
|
||||
handleStartDocument();
|
||||
|
||||
for(int i=0; i < inscopeNamespaces.length; i+=2) {
|
||||
saxHandler.startPrefixMapping(inscopeNamespaces[i], inscopeNamespaces[i+1]);
|
||||
}
|
||||
|
||||
OUTER:
|
||||
do {
|
||||
// These are all of the events listed in the javadoc for
|
||||
@ -156,6 +178,10 @@ public class XMLStreamReaderToContentHandler {
|
||||
event=staxStreamReader.next();
|
||||
} while (depth!=0);
|
||||
|
||||
for(int i=0; i < inscopeNamespaces.length; i+=2) {
|
||||
saxHandler.endPrefixMapping(inscopeNamespaces[i]);
|
||||
}
|
||||
|
||||
handleEndDocument();
|
||||
} catch (SAXException e) {
|
||||
throw new XMLStreamException2(e);
|
||||
|
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2005-2006 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 com.sun.istack.internal.localization;
|
||||
|
||||
/**
|
||||
* Localizable message.
|
||||
*
|
||||
* @author WS Development Team
|
||||
*/
|
||||
public interface Localizable {
|
||||
/**
|
||||
* Gets the key in the resource bundle.
|
||||
*
|
||||
* @return
|
||||
* if this method returns {@link #NOT_LOCALIZABLE},
|
||||
* that means the message is not localizable, and
|
||||
* the first item of {@link #getArguments()} array
|
||||
* holds a String.
|
||||
*/
|
||||
public String getKey();
|
||||
|
||||
/**
|
||||
* Returns the arguments for message formatting.
|
||||
*
|
||||
* @return
|
||||
* can be an array of length 0 but never be null.
|
||||
*/
|
||||
public Object[] getArguments();
|
||||
public String getResourceBundleName();
|
||||
|
||||
|
||||
/**
|
||||
* Special constant that represents a message that
|
||||
* is not localizable.
|
||||
*
|
||||
* <p>
|
||||
* Use of "new" is to create an unique instance.
|
||||
*/
|
||||
public static final String NOT_LOCALIZABLE = new String("\u0000");
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright 2005-2006 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 com.sun.istack.internal.localization;
|
||||
|
||||
/**
|
||||
* @author WS Development Team
|
||||
*/
|
||||
public final class LocalizableMessage implements Localizable {
|
||||
|
||||
private final String _bundlename;
|
||||
private final String _key;
|
||||
private final Object[] _args;
|
||||
|
||||
public LocalizableMessage(String bundlename, String key, Object... args) {
|
||||
_bundlename = bundlename;
|
||||
_key = key;
|
||||
if(args==null)
|
||||
args = new Object[0];
|
||||
_args = args;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return _key;
|
||||
}
|
||||
|
||||
public Object[] getArguments() {
|
||||
return _args;
|
||||
}
|
||||
|
||||
public String getResourceBundleName() {
|
||||
return _bundlename;
|
||||
}
|
||||
}
|
@ -23,28 +23,21 @@
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.xml.internal.ws.addressing.model;
|
||||
|
||||
import javax.xml.ws.WebServiceException;
|
||||
import javax.xml.namespace.QName;
|
||||
package com.sun.istack.internal.localization;
|
||||
|
||||
/**
|
||||
* @author Arun Gupta
|
||||
* @author WS Development Team
|
||||
*/
|
||||
public class InvalidMapException extends WebServiceException {
|
||||
QName name;
|
||||
QName subsubcode;
|
||||
public class LocalizableMessageFactory {
|
||||
|
||||
public InvalidMapException(QName name, QName subsubcode) {
|
||||
this.name = name;
|
||||
this.subsubcode = subsubcode;
|
||||
private final String _bundlename;
|
||||
|
||||
public LocalizableMessageFactory(String bundlename) {
|
||||
_bundlename = bundlename;
|
||||
}
|
||||
|
||||
public QName getMapQName() {
|
||||
return name;
|
||||
public Localizable getMessage(String key, Object... args) {
|
||||
return new LocalizableMessage(_bundlename, key, args);
|
||||
}
|
||||
|
||||
public QName getSubsubcode() {
|
||||
return subsubcode;
|
||||
}
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Copyright 2005-2006 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 com.sun.istack.internal.localization;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
/**
|
||||
* Localizes the {@link Localizable} into a message
|
||||
* by using a configured {@link Locale}.
|
||||
*
|
||||
* @author WS Development Team
|
||||
*/
|
||||
public class Localizer {
|
||||
|
||||
private final Locale _locale;
|
||||
private final HashMap _resourceBundles;
|
||||
|
||||
public Localizer() {
|
||||
this(Locale.getDefault());
|
||||
}
|
||||
|
||||
public Localizer(Locale l) {
|
||||
_locale = l;
|
||||
_resourceBundles = new HashMap();
|
||||
}
|
||||
|
||||
public Locale getLocale() {
|
||||
return _locale;
|
||||
}
|
||||
|
||||
public String localize(Localizable l) {
|
||||
String key = l.getKey();
|
||||
if (key == Localizable.NOT_LOCALIZABLE) {
|
||||
// this message is not localizable
|
||||
return (String) l.getArguments()[0];
|
||||
}
|
||||
String bundlename = l.getResourceBundleName();
|
||||
|
||||
try {
|
||||
ResourceBundle bundle =
|
||||
(ResourceBundle) _resourceBundles.get(bundlename);
|
||||
|
||||
if (bundle == null) {
|
||||
try {
|
||||
bundle = ResourceBundle.getBundle(bundlename, _locale);
|
||||
} catch (MissingResourceException e) {
|
||||
// work around a bug in the com.sun.enterprise.deployment.WebBundleArchivist:
|
||||
// all files with an extension different from .class (hence all the .properties files)
|
||||
// get copied to the top level directory instead of being in the package where they
|
||||
// are defined
|
||||
// so, since we can't find the bundle under its proper name, we look for it under
|
||||
// the top-level package
|
||||
|
||||
int i = bundlename.lastIndexOf('.');
|
||||
if (i != -1) {
|
||||
String alternateBundleName =
|
||||
bundlename.substring(i + 1);
|
||||
try {
|
||||
bundle =
|
||||
ResourceBundle.getBundle(
|
||||
alternateBundleName,
|
||||
_locale);
|
||||
} catch (MissingResourceException e2) {
|
||||
// give up
|
||||
return getDefaultMessage(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_resourceBundles.put(bundlename, bundle);
|
||||
}
|
||||
|
||||
if (bundle == null) {
|
||||
return getDefaultMessage(l);
|
||||
}
|
||||
|
||||
if (key == null)
|
||||
key = "undefined";
|
||||
|
||||
String msg;
|
||||
try {
|
||||
msg = bundle.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
// notice that this may throw a MissingResourceException of its own (caught below)
|
||||
msg = bundle.getString("undefined");
|
||||
}
|
||||
|
||||
// localize all arguments to the given localizable object
|
||||
Object[] args = l.getArguments();
|
||||
for (int i = 0; i < args.length; ++i) {
|
||||
if (args[i] instanceof Localizable)
|
||||
args[i] = localize((Localizable) args[i]);
|
||||
}
|
||||
|
||||
String message = MessageFormat.format(msg, args);
|
||||
return message;
|
||||
|
||||
} catch (MissingResourceException e) {
|
||||
return getDefaultMessage(l);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String getDefaultMessage(Localizable l) {
|
||||
String key = l.getKey();
|
||||
Object[] args = l.getArguments();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("[failed to localize] ");
|
||||
sb.append(key);
|
||||
if (args != null) {
|
||||
sb.append('(');
|
||||
for (int i = 0; i < args.length; ++i) {
|
||||
if (i != 0)
|
||||
sb.append(", ");
|
||||
sb.append(String.valueOf(args[i]));
|
||||
}
|
||||
sb.append(')');
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
@ -66,10 +66,7 @@ public class AnnotationProcessorFactoryImpl implements AnnotationProcessorFactor
|
||||
types.add("javax.jws.soap.SOAPBinding");
|
||||
types.add("javax.jws.soap.SOAPMessageHandler");
|
||||
types.add("javax.jws.soap.SOAPMessageHandlers");
|
||||
types.add("javax.xml.ws.BeginService");
|
||||
types.add("javax.xml.ws.EndService");
|
||||
types.add("javax.xml.ws.BindingType");
|
||||
types.add("javax.xml.ws.ParameterIndex");
|
||||
types.add("javax.xml.ws.RequestWrapper");
|
||||
types.add("javax.xml.ws.ResponseWrapper");
|
||||
types.add("javax.xml.ws.ServiceMode");
|
||||
@ -78,8 +75,6 @@ public class AnnotationProcessorFactoryImpl implements AnnotationProcessorFactor
|
||||
types.add("javax.xml.ws.WebServiceClient");
|
||||
types.add("javax.xml.ws.WebServiceProvider");
|
||||
types.add("javax.xml.ws.WebServiceRef");
|
||||
|
||||
types.add("javax.xml.ws.security.MessageSecurity");
|
||||
supportedAnnotations = Collections.unmodifiableCollection(types);
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -30,8 +30,8 @@ BASEDIR_DOESNT_EXIST = \
|
||||
Non-existent directory: {0}
|
||||
|
||||
VERSION = \
|
||||
schemagen version "JAXB 2.1.3" \n\
|
||||
JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.3 in JDK)
|
||||
schemagen version "JAXB 2.1.10 in JDK 6" \n\
|
||||
JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.10 in JDK 6)
|
||||
|
||||
USAGE = \
|
||||
Usage: schemagen [-options ...] <java files> \n\
|
||||
@ -42,4 +42,3 @@ Options: \n\
|
||||
\ \ \ \ -episode <file> : generate episode file for separate compilation\n\
|
||||
\ \ \ \ -version : display version information\n\
|
||||
\ \ \ \ -help : display this usage message
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright 2005-2006 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 com.sun.tools.internal.jxc;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* CLI entry point to schemagen that checks for JDK 5.0
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public class SchemaGeneratorFacade {
|
||||
|
||||
public static void main(String[] args) throws Throwable {
|
||||
try {
|
||||
ClassLoader cl = SchemaGeneratorFacade.class.getClassLoader();
|
||||
if(cl==null) cl = ClassLoader.getSystemClassLoader();
|
||||
|
||||
Class driver = cl.loadClass("com.sun.tools.internal.jxc.SchemaGenerator");
|
||||
Method mainMethod = driver.getDeclaredMethod("main", new Class[]{String[].class});
|
||||
try {
|
||||
mainMethod.invoke(null,new Object[]{args});
|
||||
} catch (IllegalAccessException e) {
|
||||
throw e;
|
||||
} catch (InvocationTargetException e) {
|
||||
if(e.getTargetException()!=null)
|
||||
throw e.getTargetException();
|
||||
}
|
||||
} catch (UnsupportedClassVersionError e) {
|
||||
System.err.println("schemagen requires JDK 5.0 or later. Please download it from http://java.sun.com/j2se/1.5/");
|
||||
}
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc.apt;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc.apt;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc.apt;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc.apt;
|
||||
|
||||
import com.sun.mirror.apt.AnnotationProcessorEnvironment;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc.apt;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
@ -31,4 +31,3 @@ UNRECOGNIZED_PARAMETER = \
|
||||
|
||||
OPERAND_MISSING = \
|
||||
Option "{0}" is missing an operand.
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc.apt;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc.apt;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -22,6 +22,7 @@
|
||||
* CA 95054 USA or visit www.sun.com if you need additional information or
|
||||
* have any questions.
|
||||
*/
|
||||
|
||||
package com.sun.tools.internal.jxc.apt;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -75,6 +75,11 @@ public class Classes extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
{
|
||||
if(($__uri == "" && $__local == "classes")) {
|
||||
@ -92,18 +97,6 @@ public class Classes extends NGCCHandler {
|
||||
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
if(($__uri == "" && $__local == "excludes")) {
|
||||
$runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
|
||||
$_ngcc_current_state = 6;
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 1;
|
||||
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
{
|
||||
if(($__uri == "" && $__local == "includes")) {
|
||||
@ -115,9 +108,16 @@ public class Classes extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case 2:
|
||||
{
|
||||
revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
if(($__uri == "" && $__local == "excludes")) {
|
||||
$runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
|
||||
$_ngcc_current_state = 6;
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 1;
|
||||
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -133,6 +133,17 @@ public class Classes extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
$_ngcc_current_state = 3;
|
||||
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
if(($__uri == "" && $__local == "excludes")) {
|
||||
@ -144,29 +155,12 @@ public class Classes extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
$_ngcc_current_state = 3;
|
||||
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
$_ngcc_current_state = 1;
|
||||
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
if(($__uri == "" && $__local == "classes")) {
|
||||
$runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
|
||||
$_ngcc_current_state = 0;
|
||||
}
|
||||
else {
|
||||
unexpectedLeaveElement($__qname);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
if(($__uri == "" && $__local == "includes")) {
|
||||
@ -178,9 +172,15 @@ public class Classes extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
{
|
||||
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
|
||||
if(($__uri == "" && $__local == "classes")) {
|
||||
$runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
|
||||
$_ngcc_current_state = 0;
|
||||
}
|
||||
else {
|
||||
unexpectedLeaveElement($__qname);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -196,6 +196,11 @@ public class Classes extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
$_ngcc_current_state = 3;
|
||||
@ -208,11 +213,6 @@ public class Classes extends NGCCHandler {
|
||||
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
unexpectedEnterAttribute($__qname);
|
||||
@ -226,6 +226,11 @@ public class Classes extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
$_ngcc_current_state = 3;
|
||||
@ -238,11 +243,6 @@ public class Classes extends NGCCHandler {
|
||||
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
unexpectedLeaveAttribute($__qname);
|
||||
@ -253,6 +253,11 @@ public class Classes extends NGCCHandler {
|
||||
|
||||
public void text(String $value) throws SAXException {
|
||||
switch($_ngcc_current_state) {
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromText(this, super._cookie, $value);
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
{
|
||||
include_content = $value;
|
||||
@ -260,14 +265,14 @@ public class Classes extends NGCCHandler {
|
||||
action2();
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
{
|
||||
exclude_content = $value;
|
||||
$_ngcc_current_state = 3;
|
||||
action0();
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
{
|
||||
exclude_content = $value;
|
||||
$_ngcc_current_state = 3;
|
||||
@ -301,11 +306,6 @@ public class Classes extends NGCCHandler {
|
||||
action1();
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromText(this, super._cookie, $value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,15 +70,10 @@ public class Config extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 0:
|
||||
case 4:
|
||||
{
|
||||
revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
if(($__uri == "" && $__local == "schema")) {
|
||||
NGCCHandler h = new Schema(this, super._source, $runtime, 3, baseDir);
|
||||
if(($__uri == "" && $__local == "classes")) {
|
||||
NGCCHandler h = new Classes(this, super._source, $runtime, 34);
|
||||
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
else {
|
||||
@ -97,10 +92,26 @@ public class Config extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
if(($__uri == "" && $__local == "schema")) {
|
||||
NGCCHandler h = new Schema(this, super._source, $runtime, 31, baseDir);
|
||||
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
else {
|
||||
unexpectedEnterElement($__qname);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
if(($__uri == "" && $__local == "schema")) {
|
||||
NGCCHandler h = new Schema(this, super._source, $runtime, 4, baseDir);
|
||||
NGCCHandler h = new Schema(this, super._source, $runtime, 32, baseDir);
|
||||
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
else {
|
||||
@ -120,17 +131,6 @@ public class Config extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
if(($__uri == "" && $__local == "classes")) {
|
||||
NGCCHandler h = new Classes(this, super._source, $runtime, 6);
|
||||
spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
else {
|
||||
unexpectedEnterElement($__qname);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
unexpectedEnterElement($__qname);
|
||||
@ -145,11 +145,6 @@ public class Config extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
if(($__uri == "" && $__local == "config")) {
|
||||
@ -161,6 +156,11 @@ public class Config extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
$_ngcc_current_state = 1;
|
||||
@ -257,13 +257,6 @@ public class Config extends NGCCHandler {
|
||||
public void text(String $value) throws SAXException {
|
||||
int $ai;
|
||||
switch($_ngcc_current_state) {
|
||||
case 6:
|
||||
{
|
||||
bd = $value;
|
||||
$_ngcc_current_state = 5;
|
||||
action1();
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromText(this, super._cookie, $value);
|
||||
@ -283,31 +276,38 @@ public class Config extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
bd = $value;
|
||||
$_ngcc_current_state = 5;
|
||||
action1();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
|
||||
switch($__cookie__) {
|
||||
case 3:
|
||||
{
|
||||
_schema = ((Schema)$__result__);
|
||||
action0();
|
||||
$_ngcc_current_state = 1;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
_schema = ((Schema)$__result__);
|
||||
action0();
|
||||
$_ngcc_current_state = 1;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
case 34:
|
||||
{
|
||||
classes = ((Classes)$__result__);
|
||||
$_ngcc_current_state = 2;
|
||||
}
|
||||
break;
|
||||
case 31:
|
||||
{
|
||||
_schema = ((Schema)$__result__);
|
||||
action0();
|
||||
$_ngcc_current_state = 1;
|
||||
}
|
||||
break;
|
||||
case 32:
|
||||
{
|
||||
_schema = ((Schema)$__result__);
|
||||
action0();
|
||||
$_ngcc_current_state = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,6 +65,23 @@ public class Schema extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
|
||||
$runtime.consumeAttribute($ai);
|
||||
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 1;
|
||||
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
|
||||
@ -88,23 +105,6 @@ public class Schema extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
|
||||
$runtime.consumeAttribute($ai);
|
||||
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 1;
|
||||
$runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
unexpectedEnterElement($__qname);
|
||||
@ -119,23 +119,23 @@ public class Schema extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 6:
|
||||
case 0:
|
||||
{
|
||||
if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
|
||||
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
|
||||
$runtime.consumeAttribute($ai);
|
||||
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 2;
|
||||
$_ngcc_current_state = 1;
|
||||
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
if(($__uri == "" && $__local == "schema")) {
|
||||
@ -147,14 +147,14 @@ public class Schema extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 6:
|
||||
{
|
||||
if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
|
||||
if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
|
||||
$runtime.consumeAttribute($ai);
|
||||
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 1;
|
||||
$_ngcc_current_state = 2;
|
||||
$runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
}
|
||||
@ -172,17 +172,6 @@ public class Schema extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 6:
|
||||
{
|
||||
if(($__uri == "" && $__local == "namespace")) {
|
||||
$_ngcc_current_state = 8;
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 2;
|
||||
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
|
||||
@ -199,6 +188,17 @@ public class Schema extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
if(($__uri == "" && $__local == "namespace")) {
|
||||
$_ngcc_current_state = 8;
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 2;
|
||||
$runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
unexpectedEnterAttribute($__qname);
|
||||
@ -212,17 +212,17 @@ public class Schema extends NGCCHandler {
|
||||
$localName = $__local;
|
||||
$qname = $__qname;
|
||||
switch($_ngcc_current_state) {
|
||||
case 6:
|
||||
{
|
||||
$_ngcc_current_state = 2;
|
||||
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
$_ngcc_current_state = 1;
|
||||
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
if(($__uri == "" && $__local == "namespace")) {
|
||||
@ -233,6 +233,12 @@ public class Schema extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
$_ngcc_current_state = 2;
|
||||
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
if(($__uri == "" && $__local == "location")) {
|
||||
@ -243,12 +249,6 @@ public class Schema extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
$_ngcc_current_state = 1;
|
||||
$runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
unexpectedLeaveAttribute($__qname);
|
||||
@ -260,24 +260,6 @@ public class Schema extends NGCCHandler {
|
||||
public void text(String $value) throws SAXException {
|
||||
int $ai;
|
||||
switch($_ngcc_current_state) {
|
||||
case 8:
|
||||
{
|
||||
namespace = $value;
|
||||
$_ngcc_current_state = 7;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
|
||||
$runtime.consumeAttribute($ai);
|
||||
$runtime.sendText(super._cookie, $value);
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 2;
|
||||
$runtime.sendText(super._cookie, $value);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
{
|
||||
revertToParentFromText(this, super._cookie, $value);
|
||||
@ -295,6 +277,12 @@ public class Schema extends NGCCHandler {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
namespace = $value;
|
||||
$_ngcc_current_state = 7;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
loc = $value;
|
||||
@ -302,6 +290,18 @@ public class Schema extends NGCCHandler {
|
||||
action0();
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
{
|
||||
if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
|
||||
$runtime.consumeAttribute($ai);
|
||||
$runtime.sendText(super._cookie, $value);
|
||||
}
|
||||
else {
|
||||
$_ngcc_current_state = 2;
|
||||
$runtime.sendText(super._cookie, $value);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user