Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
b96b2dcd
D
dragonwell8_langtools
项目概览
openanolis
/
dragonwell8_langtools
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_langtools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b96b2dcd
编写于
6月 18, 2013
作者:
V
vromero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8016267: javac, TypeTag refactoring has provoked performance issues
Reviewed-by: jjg
上级
8c3358a3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
134 addition
and
104 deletion
+134
-104
src/share/classes/com/sun/tools/javac/code/Type.java
src/share/classes/com/sun/tools/javac/code/Type.java
+6
-28
src/share/classes/com/sun/tools/javac/code/TypeTag.java
src/share/classes/com/sun/tools/javac/code/TypeTag.java
+94
-58
src/share/classes/com/sun/tools/javac/comp/Attr.java
src/share/classes/com/sun/tools/javac/comp/Attr.java
+23
-10
src/share/classes/com/sun/tools/javac/comp/Check.java
src/share/classes/com/sun/tools/javac/comp/Check.java
+3
-3
src/share/classes/com/sun/tools/javac/comp/Infer.java
src/share/classes/com/sun/tools/javac/comp/Infer.java
+8
-5
未找到文件。
src/share/classes/com/sun/tools/javac/code/Type.java
浏览文件 @
b96b2dcd
...
@@ -110,49 +110,27 @@ public class Type implements PrimitiveType {
...
@@ -110,49 +110,27 @@ public class Type implements PrimitiveType {
}
}
public
boolean
isNumeric
()
{
public
boolean
isNumeric
()
{
switch
(
tag
)
{
return
tag
.
isNumeric
;
case
BYTE:
case
CHAR:
case
SHORT:
case
INT:
case
LONG:
case
FLOAT:
case
DOUBLE:
return
true
;
default
:
return
false
;
}
}
}
public
boolean
isPrimitive
()
{
public
boolean
isPrimitive
()
{
return
(
isNumeric
()
||
tag
==
BOOLEAN
)
;
return
tag
.
isPrimitive
;
}
}
public
boolean
isPrimitiveOrVoid
()
{
public
boolean
isPrimitiveOrVoid
()
{
return
(
isPrimitive
()
||
tag
==
VOID
)
;
return
tag
.
isPrimitiveOrVoid
;
}
}
public
boolean
isReference
()
{
public
boolean
isReference
()
{
switch
(
tag
)
{
return
tag
.
isReference
;
case
CLASS:
case
ARRAY:
case
TYPEVAR:
case
WILDCARD:
case
ERROR:
return
true
;
default
:
return
false
;
}
}
}
public
boolean
isNullOrReference
()
{
public
boolean
isNullOrReference
()
{
return
(
tag
==
BOT
||
isReference
()
);
return
(
tag
.
isReference
||
tag
==
BOT
);
}
}
public
boolean
isPartial
()
{
public
boolean
isPartial
()
{
switch
(
tag
)
{
return
tag
.
isPartial
;
case
ERROR:
case
UNKNOWN:
case
UNDETVAR:
return
true
;
default
:
return
false
;
}
}
}
/**
/**
...
...
src/share/classes/com/sun/tools/javac/code/TypeTag.java
浏览文件 @
b96b2dcd
/*
/*
* Copyright (c) 1999, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -29,6 +29,8 @@ import com.sun.source.tree.Tree.Kind;
...
@@ -29,6 +29,8 @@ import com.sun.source.tree.Tree.Kind;
import
javax.lang.model.type.TypeKind
;
import
javax.lang.model.type.TypeKind
;
import
static
com
.
sun
.
tools
.
javac
.
code
.
TypeTag
.
NumericClasses
.*;
/** An interface for type tag values, which distinguish between different
/** An interface for type tag values, which distinguish between different
* sorts of types.
* sorts of types.
*
*
...
@@ -40,113 +42,170 @@ import javax.lang.model.type.TypeKind;
...
@@ -40,113 +42,170 @@ import javax.lang.model.type.TypeKind;
public
enum
TypeTag
{
public
enum
TypeTag
{
/** The tag of the basic type `byte'.
/** The tag of the basic type `byte'.
*/
*/
BYTE
(
1
),
BYTE
(
BYTE_CLASS
,
BYTE_SUPERCLASSES
,
TypeTagKind
.
PRIMITIVE
|
TypeTagKind
.
NUMERIC
),
/** The tag of the basic type `char'.
/** The tag of the basic type `char'.
*/
*/
CHAR
(
2
),
CHAR
(
CHAR_CLASS
,
CHAR_SUPERCLASSES
,
TypeTagKind
.
PRIMITIVE
|
TypeTagKind
.
NUMERIC
),
/** The tag of the basic type `short'.
/** The tag of the basic type `short'.
*/
*/
SHORT
(
3
),
SHORT
(
SHORT_CLASS
,
SHORT_SUPERCLASSES
,
TypeTagKind
.
PRIMITIVE
|
TypeTagKind
.
NUMERIC
),
/** The tag of the basic type `int'.
/** The tag of the basic type `int'.
*/
*/
INT
(
4
),
INT
(
INT_CLASS
,
INT_SUPERCLASSES
,
TypeTagKind
.
PRIMITIVE
|
TypeTagKind
.
NUMERIC
),
/** The tag of the basic type `long'.
/** The tag of the basic type `long'.
*/
*/
LONG
(
5
),
LONG
(
LONG_CLASS
,
LONG_SUPERCLASSES
,
TypeTagKind
.
PRIMITIVE
|
TypeTagKind
.
NUMERIC
),
/** The tag of the basic type `float'.
/** The tag of the basic type `float'.
*/
*/
FLOAT
(
6
),
FLOAT
(
FLOAT_CLASS
,
FLOAT_SUPERCLASSES
,
TypeTagKind
.
PRIMITIVE
|
TypeTagKind
.
NUMERIC
),
/** The tag of the basic type `double'.
/** The tag of the basic type `double'.
*/
*/
DOUBLE
(
7
),
DOUBLE
(
DOUBLE_CLASS
,
DOUBLE_CLASS
,
TypeTagKind
.
PRIMITIVE
|
TypeTagKind
.
NUMERIC
),
/** The tag of the basic type `boolean'.
/** The tag of the basic type `boolean'.
*/
*/
BOOLEAN
,
BOOLEAN
(
TypeTagKind
.
PRIMITIVE
)
,
/** The tag of the type `void'.
/** The tag of the type `void'.
*/
*/
VOID
,
VOID
(
TypeTagKind
.
VOID
)
,
/** The tag of all class and interface types.
/** The tag of all class and interface types.
*/
*/
CLASS
,
CLASS
(
TypeTagKind
.
REFERENCE
)
,
/** The tag of all array types.
/** The tag of all array types.
*/
*/
ARRAY
,
ARRAY
(
TypeTagKind
.
REFERENCE
)
,
/** The tag of all (monomorphic) method types.
/** The tag of all (monomorphic) method types.
*/
*/
METHOD
,
METHOD
(
TypeTagKind
.
OTHER
)
,
/** The tag of all package "types".
/** The tag of all package "types".
*/
*/
PACKAGE
,
PACKAGE
(
TypeTagKind
.
OTHER
)
,
/** The tag of all (source-level) type variables.
/** The tag of all (source-level) type variables.
*/
*/
TYPEVAR
,
TYPEVAR
(
TypeTagKind
.
REFERENCE
)
,
/** The tag of all type arguments.
/** The tag of all type arguments.
*/
*/
WILDCARD
,
WILDCARD
(
TypeTagKind
.
REFERENCE
)
,
/** The tag of all polymorphic (method-) types.
/** The tag of all polymorphic (method-) types.
*/
*/
FORALL
,
FORALL
(
TypeTagKind
.
OTHER
)
,
/** The tag of deferred expression types in method context
/** The tag of deferred expression types in method context
*/
*/
DEFERRED
,
DEFERRED
(
TypeTagKind
.
OTHER
)
,
/** The tag of the bottom type {@code <null>}.
/** The tag of the bottom type {@code <null>}.
*/
*/
BOT
,
BOT
(
TypeTagKind
.
OTHER
)
,
/** The tag of a missing type.
/** The tag of a missing type.
*/
*/
NONE
,
NONE
(
TypeTagKind
.
OTHER
)
,
/** The tag of the error type.
/** The tag of the error type.
*/
*/
ERROR
,
ERROR
(
TypeTagKind
.
REFERENCE
|
TypeTagKind
.
PARTIAL
)
,
/** The tag of an unknown type
/** The tag of an unknown type
*/
*/
UNKNOWN
,
UNKNOWN
(
TypeTagKind
.
PARTIAL
)
,
/** The tag of all instantiatable type variables.
/** The tag of all instantiatable type variables.
*/
*/
UNDETVAR
,
UNDETVAR
(
TypeTagKind
.
PARTIAL
)
,
/** Pseudo-types, these are special tags
/** Pseudo-types, these are special tags
*/
*/
UNINITIALIZED_THIS
,
UNINITIALIZED_THIS
(
TypeTagKind
.
OTHER
)
,
UNINITIALIZED_OBJECT
;
UNINITIALIZED_OBJECT
(
TypeTagKind
.
OTHER
)
;
/** This field will only be used for tags related with numeric types for
final
boolean
isPrimitive
;
* optimization reasons.
final
boolean
isNumeric
;
*/
final
boolean
isPartial
;
private
final
int
order
;
final
boolean
isReference
;
final
boolean
isPrimitiveOrVoid
;
final
int
superClasses
;
final
int
numericClass
;
private
TypeTag
(
int
kind
)
{
this
(
0
,
0
,
kind
);
}
private
TypeTag
(
int
numericClass
,
int
superClasses
,
int
kind
)
{
isPrimitive
=
(
kind
&
TypeTagKind
.
PRIMITIVE
)
!=
0
;
isNumeric
=
(
kind
&
TypeTagKind
.
NUMERIC
)
!=
0
;
isPartial
=
(
kind
&
TypeTagKind
.
PARTIAL
)
!=
0
;
isReference
=
(
kind
&
TypeTagKind
.
REFERENCE
)
!=
0
;
isPrimitiveOrVoid
=
((
kind
&
TypeTagKind
.
PRIMITIVE
)
!=
0
)
||
((
kind
&
TypeTagKind
.
VOID
)
!=
0
);
this
.
superClasses
=
superClasses
;
this
.
numericClass
=
numericClass
;
}
static
class
TypeTagKind
{
static
final
int
PRIMITIVE
=
1
;
static
final
int
NUMERIC
=
2
;
static
final
int
REFERENCE
=
4
;
static
final
int
PARTIAL
=
8
;
static
final
int
OTHER
=
16
;
static
final
int
VOID
=
32
;
}
public
static
class
NumericClasses
{
public
static
final
int
BYTE_CLASS
=
1
;
public
static
final
int
CHAR_CLASS
=
2
;
public
static
final
int
SHORT_CLASS
=
4
;
public
static
final
int
INT_CLASS
=
8
;
public
static
final
int
LONG_CLASS
=
16
;
public
static
final
int
FLOAT_CLASS
=
32
;
public
static
final
int
DOUBLE_CLASS
=
64
;
static
final
int
BYTE_SUPERCLASSES
=
BYTE_CLASS
|
SHORT_CLASS
|
INT_CLASS
|
LONG_CLASS
|
FLOAT_CLASS
|
DOUBLE_CLASS
;
static
final
int
CHAR_SUPERCLASSES
=
CHAR_CLASS
|
INT_CLASS
|
LONG_CLASS
|
FLOAT_CLASS
|
DOUBLE_CLASS
;
private
TypeTag
()
{
static
final
int
SHORT_SUPERCLASSES
=
SHORT_CLASS
|
INT_CLASS
|
this
(
0
);
LONG_CLASS
|
FLOAT_CLASS
|
DOUBLE_CLASS
;
static
final
int
INT_SUPERCLASSES
=
INT_CLASS
|
LONG_CLASS
|
FLOAT_CLASS
|
DOUBLE_CLASS
;
static
final
int
LONG_SUPERCLASSES
=
LONG_CLASS
|
FLOAT_CLASS
|
DOUBLE_CLASS
;
static
final
int
FLOAT_SUPERCLASSES
=
FLOAT_CLASS
|
DOUBLE_CLASS
;
}
}
private
TypeTag
(
int
order
)
{
public
boolean
isStrictSubRangeOf
(
TypeTag
tag
)
{
this
.
order
=
order
;
/* Please don't change the implementation of this method to call method
* isSubRangeOf. Both methods are called from hotspot code, the current
* implementation is better performance-wise than the commented modification.
*/
return
(
this
.
superClasses
&
tag
.
numericClass
)
!=
0
&&
this
!=
tag
;
}
}
private
static
final
int
MIN_NUMERIC_TAG_ORDER
=
1
;
public
boolean
isSubRangeOf
(
TypeTag
tag
)
{
private
static
final
int
MAX_NUMERIC_TAG_ORDER
=
7
;
return
(
this
.
superClasses
&
tag
.
numericClass
)
!=
0
;
}
/** Returns the number of type tags.
/** Returns the number of type tags.
*/
*/
...
@@ -155,29 +214,6 @@ public enum TypeTag {
...
@@ -155,29 +214,6 @@ public enum TypeTag {
return
(
UNDETVAR
.
ordinal
()
+
1
);
return
(
UNDETVAR
.
ordinal
()
+
1
);
}
}
public
boolean
isSubRangeOf
(
TypeTag
range
)
{
return
(
this
==
range
)
||
isStrictSubRangeOf
(
range
);
}
public
boolean
isStrictSubRangeOf
(
TypeTag
range
)
{
if
(
this
.
order
>=
MIN_NUMERIC_TAG_ORDER
&&
this
.
order
<=
MAX_NUMERIC_TAG_ORDER
&&
range
.
order
>=
MIN_NUMERIC_TAG_ORDER
&&
this
.
order
<=
MAX_NUMERIC_TAG_ORDER
)
{
if
(
this
==
range
)
return
false
;
switch
(
this
)
{
case
BYTE:
return
true
;
case
CHAR:
case
SHORT:
case
INT:
case
LONG:
case
FLOAT:
return
this
.
order
<
range
.
order
&&
range
.
order
<=
MAX_NUMERIC_TAG_ORDER
;
default
:
return
false
;
}
}
else
return
false
;
}
public
Kind
getKindLiteral
()
{
public
Kind
getKindLiteral
()
{
switch
(
this
)
{
switch
(
this
)
{
case
INT:
case
INT:
...
...
src/share/classes/com/sun/tools/javac/comp/Attr.java
浏览文件 @
b96b2dcd
...
@@ -1532,21 +1532,23 @@ public class Attr extends JCTree.Visitor {
...
@@ -1532,21 +1532,23 @@ public class Attr extends JCTree.Visitor {
// If one arm has an integer subrange type (i.e., byte,
// If one arm has an integer subrange type (i.e., byte,
// short, or char), and the other is an integer constant
// short, or char), and the other is an integer constant
// that fits into the subrange, return the subrange type.
// that fits into the subrange, return the subrange type.
if
(
thenUnboxed
.
getTag
().
isStrictSubRangeOf
(
INT
)
&&
elseUnboxed
.
hasTag
(
INT
)
&&
if
(
thenUnboxed
.
getTag
().
isStrictSubRangeOf
(
INT
)
&&
types
.
isAssignable
(
elseUnboxed
,
thenUnboxed
))
elseUnboxed
.
hasTag
(
INT
)
&&
types
.
isAssignable
(
elseUnboxed
,
thenUnboxed
))
{
return
thenUnboxed
.
baseType
();
return
thenUnboxed
.
baseType
();
if
(
elseUnboxed
.
getTag
().
isStrictSubRangeOf
(
INT
)
&&
thenUnboxed
.
hasTag
(
INT
)
&&
}
types
.
isAssignable
(
thenUnboxed
,
elseUnboxed
))
if
(
elseUnboxed
.
getTag
().
isStrictSubRangeOf
(
INT
)
&&
thenUnboxed
.
hasTag
(
INT
)
&&
types
.
isAssignable
(
thenUnboxed
,
elseUnboxed
))
{
return
elseUnboxed
.
baseType
();
return
elseUnboxed
.
baseType
();
}
for
(
TypeTag
tag
:
TypeTag
.
values
())
{
for
(
TypeTag
tag
:
primitiveTags
)
{
if
(
tag
.
ordinal
()
>=
TypeTag
.
getTypeTagCount
())
break
;
Type
candidate
=
syms
.
typeOfTag
[
tag
.
ordinal
()];
Type
candidate
=
syms
.
typeOfTag
[
tag
.
ordinal
()];
if
(
candidate
!=
null
&&
if
(
types
.
isSubtype
(
thenUnboxed
,
candidate
)
&&
candidate
.
isPrimitive
()
&&
types
.
isSubtype
(
elseUnboxed
,
candidate
))
{
types
.
isSubtype
(
thenUnboxed
,
candidate
)
&&
types
.
isSubtype
(
elseUnboxed
,
candidate
))
return
candidate
;
return
candidate
;
}
}
}
}
}
...
@@ -1575,6 +1577,17 @@ public class Attr extends JCTree.Visitor {
...
@@ -1575,6 +1577,17 @@ public class Attr extends JCTree.Visitor {
return
types
.
lub
(
thentype
.
baseType
(),
elsetype
.
baseType
());
return
types
.
lub
(
thentype
.
baseType
(),
elsetype
.
baseType
());
}
}
final
static
TypeTag
[]
primitiveTags
=
new
TypeTag
[]{
BYTE
,
CHAR
,
SHORT
,
INT
,
LONG
,
FLOAT
,
DOUBLE
,
BOOLEAN
,
};
public
void
visitIf
(
JCIf
tree
)
{
public
void
visitIf
(
JCIf
tree
)
{
attribExpr
(
tree
.
cond
,
env
,
syms
.
booleanType
);
attribExpr
(
tree
.
cond
,
env
,
syms
.
booleanType
);
attribStat
(
tree
.
thenpart
,
env
);
attribStat
(
tree
.
thenpart
,
env
);
...
...
src/share/classes/com/sun/tools/javac/comp/Check.java
浏览文件 @
b96b2dcd
...
@@ -544,7 +544,7 @@ public class Check {
...
@@ -544,7 +544,7 @@ public class Check {
if
(
checkContext
.
compatible
(
found
,
req
,
checkContext
.
checkWarner
(
pos
,
found
,
req
)))
{
if
(
checkContext
.
compatible
(
found
,
req
,
checkContext
.
checkWarner
(
pos
,
found
,
req
)))
{
return
found
;
return
found
;
}
else
{
}
else
{
if
(
found
.
getTag
().
isSubRangeOf
(
DOUBLE
)
&&
req
.
getTag
().
isSubRangeOf
(
DOUBLE
))
{
if
(
found
.
isNumeric
()
&&
req
.
isNumeric
(
))
{
checkContext
.
report
(
pos
,
diags
.
fragment
(
"possible.loss.of.precision"
,
found
,
req
));
checkContext
.
report
(
pos
,
diags
.
fragment
(
"possible.loss.of.precision"
,
found
,
req
));
return
types
.
createErrorType
(
found
);
return
types
.
createErrorType
(
found
);
}
}
...
@@ -754,7 +754,7 @@ public class Check {
...
@@ -754,7 +754,7 @@ public class Check {
* @param t The type to be checked.
* @param t The type to be checked.
*/
*/
Type
checkNullOrRefType
(
DiagnosticPosition
pos
,
Type
t
)
{
Type
checkNullOrRefType
(
DiagnosticPosition
pos
,
Type
t
)
{
if
(
t
.
is
NullOrReference
(
))
if
(
t
.
is
Reference
()
||
t
.
hasTag
(
BOT
))
return
t
;
return
t
;
else
else
return
typeTagError
(
pos
,
return
typeTagError
(
pos
,
...
@@ -3228,7 +3228,7 @@ public class Check {
...
@@ -3228,7 +3228,7 @@ public class Check {
void
checkDivZero
(
DiagnosticPosition
pos
,
Symbol
operator
,
Type
operand
)
{
void
checkDivZero
(
DiagnosticPosition
pos
,
Symbol
operator
,
Type
operand
)
{
if
(
operand
.
constValue
()
!=
null
if
(
operand
.
constValue
()
!=
null
&&
lint
.
isEnabled
(
LintCategory
.
DIVZERO
)
&&
lint
.
isEnabled
(
LintCategory
.
DIVZERO
)
&&
(
operand
.
getTag
().
isSubRangeOf
(
LONG
)
)
&&
operand
.
getTag
().
isSubRangeOf
(
LONG
)
&&
((
Number
)
(
operand
.
constValue
())).
longValue
()
==
0
)
{
&&
((
Number
)
(
operand
.
constValue
())).
longValue
()
==
0
)
{
int
opc
=
((
OperatorSymbol
)
operator
).
opcode
;
int
opc
=
((
OperatorSymbol
)
operator
).
opcode
;
if
(
opc
==
ByteCodes
.
idiv
||
opc
==
ByteCodes
.
imod
if
(
opc
==
ByteCodes
.
idiv
||
opc
==
ByteCodes
.
imod
...
...
src/share/classes/com/sun/tools/javac/comp/Infer.java
浏览文件 @
b96b2dcd
...
@@ -952,8 +952,9 @@ public class Infer {
...
@@ -952,8 +952,9 @@ public class Infer {
Type
solve
(
UndetVar
uv
,
InferenceContext
inferenceContext
)
{
Type
solve
(
UndetVar
uv
,
InferenceContext
inferenceContext
)
{
Infer
infer
=
inferenceContext
.
infer
();
Infer
infer
=
inferenceContext
.
infer
();
List
<
Type
>
lobounds
=
filterBounds
(
uv
,
inferenceContext
);
List
<
Type
>
lobounds
=
filterBounds
(
uv
,
inferenceContext
);
Type
owntype
=
infer
.
types
.
lub
(
lobounds
);
//note: lobounds should have at least one element
if
(
owntype
.
hasTag
(
ERROR
))
{
Type
owntype
=
lobounds
.
tail
.
tail
==
null
?
lobounds
.
head
:
infer
.
types
.
lub
(
lobounds
);
if
(
owntype
.
isPrimitive
()
||
owntype
.
hasTag
(
ERROR
))
{
throw
infer
.
inferenceException
throw
infer
.
inferenceException
.
setMessage
(
"no.unique.minimal.instance.exists"
,
.
setMessage
(
"no.unique.minimal.instance.exists"
,
uv
.
qtype
,
lobounds
);
uv
.
qtype
,
lobounds
);
...
@@ -971,8 +972,9 @@ public class Infer {
...
@@ -971,8 +972,9 @@ public class Infer {
Type
solve
(
UndetVar
uv
,
InferenceContext
inferenceContext
)
{
Type
solve
(
UndetVar
uv
,
InferenceContext
inferenceContext
)
{
Infer
infer
=
inferenceContext
.
infer
();
Infer
infer
=
inferenceContext
.
infer
();
List
<
Type
>
hibounds
=
filterBounds
(
uv
,
inferenceContext
);
List
<
Type
>
hibounds
=
filterBounds
(
uv
,
inferenceContext
);
Type
owntype
=
infer
.
types
.
glb
(
hibounds
);
//note: lobounds should have at least one element
if
(
owntype
.
isErroneous
())
{
Type
owntype
=
hibounds
.
tail
.
tail
==
null
?
hibounds
.
head
:
infer
.
types
.
glb
(
hibounds
);
if
(
owntype
.
isPrimitive
()
||
owntype
.
hasTag
(
ERROR
))
{
throw
infer
.
inferenceException
throw
infer
.
inferenceException
.
setMessage
(
"no.unique.maximal.instance.exists"
,
.
setMessage
(
"no.unique.maximal.instance.exists"
,
uv
.
qtype
,
hibounds
);
uv
.
qtype
,
hibounds
);
...
@@ -1100,10 +1102,11 @@ public class Infer {
...
@@ -1100,10 +1102,11 @@ public class Infer {
}
}
}
}
//no progress
//no progress
throw
inferenceException
;
throw
inferenceException
.
setMessage
()
;
}
}
}
}
catch
(
InferenceException
ex
)
{
catch
(
InferenceException
ex
)
{
//did we fail because of interdependent ivars?
inferenceContext
.
rollback
();
inferenceContext
.
rollback
();
instantiateAsUninferredVars
(
varsToSolve
,
inferenceContext
);
instantiateAsUninferredVars
(
varsToSolve
,
inferenceContext
);
checkWithinBounds
(
inferenceContext
,
warn
);
checkWithinBounds
(
inferenceContext
,
warn
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录