Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
d889ca37
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d889ca37
编写于
4月 09, 2012
作者:
S
Stepan Koltsov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename js DescriptorUtils
上级
19d7539a
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
35 addition
and
42 deletion
+35
-42
js/js.translator/src/org/jetbrains/k2js/translate/context/StaticContext.java
...c/org/jetbrains/k2js/translate/context/StaticContext.java
+3
-3
js/js.translator/src/org/jetbrains/k2js/translate/declaration/ClassDeclarationTranslator.java
...2js/translate/declaration/ClassDeclarationTranslator.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/declaration/ClassTranslator.java
...jetbrains/k2js/translate/declaration/ClassTranslator.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/declaration/NamespaceDeclarationTranslator.java
...translate/declaration/NamespaceDeclarationTranslator.java
+4
-4
js/js.translator/src/org/jetbrains/k2js/translate/declaration/NamespaceTranslator.java
...rains/k2js/translate/declaration/NamespaceTranslator.java
+2
-2
js/js.translator/src/org/jetbrains/k2js/translate/expression/FunctionTranslator.java
...tbrains/k2js/translate/expression/FunctionTranslator.java
+3
-10
js/js.translator/src/org/jetbrains/k2js/translate/expression/foreach/ArrayForTranslator.java
...k2js/translate/expression/foreach/ArrayForTranslator.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/expression/foreach/RangeForTranslator.java
...k2js/translate/expression/foreach/RangeForTranslator.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/intrinsic/Intrinsics.java
...rc/org/jetbrains/k2js/translate/intrinsic/Intrinsics.java
+4
-4
js/js.translator/src/org/jetbrains/k2js/translate/operation/BinaryOperationTranslator.java
...s/k2js/translate/operation/BinaryOperationTranslator.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/operation/CompareToTranslator.java
...tbrains/k2js/translate/operation/CompareToTranslator.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/reference/CallParametersResolver.java
...ains/k2js/translate/reference/CallParametersResolver.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/reference/CallTranslator.java
...rg/jetbrains/k2js/translate/reference/CallTranslator.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/reference/InlinedCallExpressionTranslator.java
.../translate/reference/InlinedCallExpressionTranslator.java
+2
-2
js/js.translator/src/org/jetbrains/k2js/translate/reference/NativePropertyAccessTranslator.java
...s/translate/reference/NativePropertyAccessTranslator.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/utils/AnnotationsUtils.java
.../org/jetbrains/k2js/translate/utils/AnnotationsUtils.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/utils/BindingUtils.java
.../src/org/jetbrains/k2js/translate/utils/BindingUtils.java
+2
-2
js/js.translator/src/org/jetbrains/k2js/translate/utils/ClassSortingUtils.java
...org/jetbrains/k2js/translate/utils/ClassSortingUtils.java
+1
-1
js/js.translator/src/org/jetbrains/k2js/translate/utils/JsDescriptorUtils.java
...org/jetbrains/k2js/translate/utils/JsDescriptorUtils.java
+2
-2
js/js.translator/src/org/jetbrains/k2js/translate/utils/TranslationUtils.java
.../org/jetbrains/k2js/translate/utils/TranslationUtils.java
+2
-2
未找到文件。
js/js.translator/src/org/jetbrains/k2js/translate/context/StaticContext.java
浏览文件 @
d889ca37
...
...
@@ -27,14 +27,14 @@ import org.jetbrains.k2js.translate.context.generator.Generator;
import
org.jetbrains.k2js.translate.context.generator.Rule
;
import
org.jetbrains.k2js.translate.intrinsic.Intrinsics
;
import
org.jetbrains.k2js.translate.utils.AnnotationsUtils
;
import
org.jetbrains.k2js.translate.utils.DescriptorUtils
;
import
org.jetbrains.k2js.translate.utils.
Js
DescriptorUtils
;
import
org.jetbrains.k2js.translate.utils.JsAstUtils
;
import
org.jetbrains.k2js.translate.utils.PredefinedAnnotation
;
import
java.util.Map
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
AnnotationsUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.*;
/**
* @author Pavel Talanov
...
...
@@ -437,7 +437,7 @@ public final class StaticContext {
if
(!(
descriptor
instanceof
NamespaceDescriptor
))
{
return
null
;
}
if
(
DescriptorUtils
.
isTopLevelNamespace
((
NamespaceDescriptor
)
descriptor
))
{
if
(
JsDescriptorUtils
.
isTopLevelNamespace
((
NamespaceDescriptor
)
descriptor
))
{
return
true
;
}
return
null
;
...
...
js/js.translator/src/org/jetbrains/k2js/translate/declaration/ClassDeclarationTranslator.java
浏览文件 @
d889ca37
...
...
@@ -36,7 +36,7 @@ import org.jetbrains.k2js.translate.utils.ClassSortingUtils;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getAllClassesDefinedInNamespace
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getAllClassesDefinedInNamespace
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.*;
/**
...
...
js/js.translator/src/org/jetbrains/k2js/translate/declaration/ClassTranslator.java
浏览文件 @
d889ca37
...
...
@@ -40,7 +40,7 @@ import java.util.Map;
import
static
com
.
google
.
dart
.
compiler
.
util
.
AstUtil
.
newSequence
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getClassDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getPropertyDescriptorForConstructorParameter
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
PsiUtils
.
getPrimaryConstructorParameters
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
TranslationUtils
.
getQualifiedReference
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
TranslationUtils
.
getThisObject
;
...
...
js/js.translator/src/org/jetbrains/k2js/translate/declaration/NamespaceDeclarationTranslator.java
浏览文件 @
d889ca37
...
...
@@ -27,14 +27,14 @@ import org.jetbrains.jet.lang.psi.JetFile;
import
org.jetbrains.k2js.translate.context.Namer
;
import
org.jetbrains.k2js.translate.context.TranslationContext
;
import
org.jetbrains.k2js.translate.general.AbstractTranslator
;
import
org.jetbrains.k2js.translate.utils.DescriptorUtils
;
import
org.jetbrains.k2js.translate.utils.
Js
DescriptorUtils
;
import
org.jetbrains.k2js.translate.utils.TranslationUtils
;
import
java.util.List
;
import
java.util.Set
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getAllNonNativeNamespaceDescriptors
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getAllClassesDefinedInNamespace
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getAllClassesDefinedInNamespace
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.
setQualifier
;
/**
...
...
@@ -126,7 +126,7 @@ public final class NamespaceDeclarationTranslator extends AbstractTranslator {
private
static
List
<
NamespaceDescriptor
>
filterTopLevelNamespaces
(
@NotNull
List
<
NamespaceDescriptor
>
namespaceDescriptors
)
{
List
<
NamespaceDescriptor
>
result
=
Lists
.
newArrayList
();
for
(
NamespaceDescriptor
descriptor
:
namespaceDescriptors
)
{
if
(
DescriptorUtils
.
isTopLevelNamespace
(
descriptor
))
{
if
(
Js
DescriptorUtils
.
isTopLevelNamespace
(
descriptor
))
{
result
.
add
(
descriptor
);
}
}
...
...
@@ -137,7 +137,7 @@ public final class NamespaceDeclarationTranslator extends AbstractTranslator {
private
static
List
<
NamespaceDescriptor
>
filterNonEmptyNamespaces
(
@NotNull
List
<
NamespaceDescriptor
>
namespaceDescriptors
)
{
List
<
NamespaceDescriptor
>
result
=
Lists
.
newArrayList
();
for
(
NamespaceDescriptor
descriptor
:
namespaceDescriptors
)
{
if
(!
DescriptorUtils
.
isNamespaceEmpty
(
descriptor
))
{
if
(!
Js
DescriptorUtils
.
isNamespaceEmpty
(
descriptor
))
{
result
.
add
(
descriptor
);
}
}
...
...
js/js.translator/src/org/jetbrains/k2js/translate/declaration/NamespaceTranslator.java
浏览文件 @
d889ca37
...
...
@@ -24,7 +24,7 @@ import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
import
org.jetbrains.k2js.translate.context.TranslationContext
;
import
org.jetbrains.k2js.translate.general.AbstractTranslator
;
import
org.jetbrains.k2js.translate.general.Translation
;
import
org.jetbrains.k2js.translate.utils.DescriptorUtils
;
import
org.jetbrains.k2js.translate.utils.
Js
DescriptorUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -97,7 +97,7 @@ public final class NamespaceTranslator extends AbstractTranslator {
@NotNull
private
List
<
JsPropertyInitializer
>
getNestedNamespaceDeclarations
()
{
List
<
JsPropertyInitializer
>
result
=
Lists
.
newArrayList
();
List
<
NamespaceDescriptor
>
nestedNamespaces
=
DescriptorUtils
.
getNestedNamespaces
(
descriptor
);
List
<
NamespaceDescriptor
>
nestedNamespaces
=
Js
DescriptorUtils
.
getNestedNamespaces
(
descriptor
);
for
(
NamespaceDescriptor
nestedNamespace
:
nestedNamespaces
)
{
NamespaceTranslator
nestedNamespaceTranslator
=
new
NamespaceTranslator
(
nestedNamespace
,
classDeclarationTranslator
,
context
());
result
.
add
(
nestedNamespaceTranslator
.
getDeclarationAsInitializer
());
...
...
js/js.translator/src/org/jetbrains/k2js/translate/expression/FunctionTranslator.java
浏览文件 @
d889ca37
...
...
@@ -26,30 +26,23 @@ import org.jetbrains.jet.lang.psi.JetDeclarationWithBody;
import
org.jetbrains.jet.lang.psi.JetElement
;
import
org.jetbrains.jet.lang.psi.JetExpression
;
import
org.jetbrains.jet.lang.psi.JetFunctionLiteralExpression
;
import
org.jetbrains.jet.lang.types.JetType
;
import
org.jetbrains.jet.lang.types.lang.JetStandardClasses
;
import
org.jetbrains.k2js.translate.context.Namer
;
import
org.jetbrains.k2js.translate.context.TemporaryVariable
;
import
org.jetbrains.k2js.translate.context.TranslationContext
;
import
org.jetbrains.k2js.translate.general.AbstractTranslator
;
import
org.jetbrains.k2js.translate.general.Translation
;
import
org.jetbrains.k2js.translate.reference.ReferenceTranslator
;
import
org.jetbrains.k2js.translate.utils.DescriptorUtils
;
import
org.jetbrains.k2js.translate.utils.FunctionBodyTranslator
;
import
org.jetbrains.k2js.translate.utils.JsDescriptorUtils
;
import
org.jetbrains.k2js.translate.utils.TranslationUtils
;
import
org.jetbrains.k2js.translate.utils.closure.ClosureContext
;
import
org.jetbrains.k2js.translate.utils.closure.ClosureUtils
;
import
org.jetbrains.k2js.translate.utils.mutator.Mutator
;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getFunctionDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
FunctionBodyTranslator
.
translateFunctionBody
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.
convertToBlock
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.
setParameters
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
mutator
.
LastExpressionMutator
.
mutateLastExpression
;
/**
...
...
@@ -228,7 +221,7 @@ public final class FunctionTranslator extends AbstractTranslator {
}
private
boolean
isExtensionFunction
()
{
return
DescriptorUtils
.
isExtensionFunction
(
descriptor
)
&&
!
isLiteral
();
return
Js
DescriptorUtils
.
isExtensionFunction
(
descriptor
)
&&
!
isLiteral
();
}
private
boolean
isLiteral
()
{
...
...
js/js.translator/src/org/jetbrains/k2js/translate/expression/foreach/ArrayForTranslator.java
浏览文件 @
d889ca37
...
...
@@ -32,7 +32,7 @@ import org.jetbrains.k2js.translate.utils.BindingUtils;
import
java.util.Collections
;
import
java.util.List
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getClassDescriptorForType
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getClassDescriptorForType
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
PsiUtils
.
getLoopRange
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
TemporariesUtils
.
temporariesInitialization
;
...
...
js/js.translator/src/org/jetbrains/k2js/translate/expression/foreach/RangeForTranslator.java
浏览文件 @
d889ca37
...
...
@@ -30,7 +30,7 @@ import org.jetbrains.k2js.translate.utils.BindingUtils;
import
java.util.List
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getClassDescriptorForType
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getClassDescriptorForType
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
PsiUtils
.
getLoopRange
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
TemporariesUtils
.
temporariesInitialization
;
...
...
js/js.translator/src/org/jetbrains/k2js/translate/intrinsic/Intrinsics.java
浏览文件 @
d889ca37
...
...
@@ -34,15 +34,15 @@ import org.jetbrains.k2js.translate.intrinsic.primitive.*;
import
org.jetbrains.k2js.translate.intrinsic.string.CharAtIntrinsic
;
import
org.jetbrains.k2js.translate.intrinsic.tuple.TupleAccessIntrinsic
;
import
org.jetbrains.k2js.translate.operation.OperatorTable
;
import
org.jetbrains.k2js.translate.utils.DescriptorUtils
;
import
org.jetbrains.k2js.translate.utils.
Js
DescriptorUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
org
.
jetbrains
.
jet
.
lang
.
types
.
expressions
.
OperatorConventions
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getFunctionByName
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getPropertyByName
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getFunctionByName
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getPropertyByName
;
//TODO: class is monstrous, should be refactored.
...
...
@@ -288,7 +288,7 @@ public final class Intrinsics {
}
private
boolean
isUnaryOperation
(
@NotNull
FunctionDescriptor
descriptor
)
{
return
!
DescriptorUtils
.
hasParameters
(
descriptor
);
return
!
Js
DescriptorUtils
.
hasParameters
(
descriptor
);
}
}
}
js/js.translator/src/org/jetbrains/k2js/translate/operation/BinaryOperationTranslator.java
浏览文件 @
d889ca37
...
...
@@ -39,7 +39,7 @@ import static org.jetbrains.k2js.translate.operation.AssignmentTranslator.isAssi
import
static
org
.
jetbrains
.
k2js
.
translate
.
operation
.
CompareToTranslator
.
isCompareToCall
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getFunctionDescriptorForOperationExpression
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getResolvedCall
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
isEquals
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
isEquals
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.
not
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
PsiUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
TranslationUtils
.*;
...
...
js/js.translator/src/org/jetbrains/k2js/translate/operation/CompareToTranslator.java
浏览文件 @
d889ca37
...
...
@@ -30,7 +30,7 @@ import org.jetbrains.k2js.translate.intrinsic.CompareToIntrinsic;
import
org.jetbrains.k2js.translate.utils.TranslationUtils
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getFunctionDescriptorForOperationExpression
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
isCompareTo
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
isCompareTo
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
PsiUtils
.
getOperationToken
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
TranslationUtils
.
applyIntrinsicToBinaryExpression
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
TranslationUtils
.
isIntrinsicOperation
;
...
...
js/js.translator/src/org/jetbrains/k2js/translate/reference/CallParametersResolver.java
浏览文件 @
d889ca37
...
...
@@ -24,7 +24,7 @@ import org.jetbrains.jet.lang.resolve.calls.ResolvedCall;
import
org.jetbrains.k2js.translate.context.TranslationContext
;
import
org.jetbrains.k2js.translate.utils.TranslationUtils
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.*;
/**
* @author Pavel Talanov
...
...
js/js.translator/src/org/jetbrains/k2js/translate/reference/CallTranslator.java
浏览文件 @
d889ca37
...
...
@@ -38,7 +38,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
reference
.
CallParametersResolver
.
resolveCallParameters
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
isConstructorDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
isConstructorDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.*;
/**
...
...
js/js.translator/src/org/jetbrains/k2js/translate/reference/InlinedCallExpressionTranslator.java
浏览文件 @
d889ca37
...
...
@@ -43,8 +43,8 @@ import java.util.Map;
import
static
org
.
jetbrains
.
k2js
.
translate
.
reference
.
CallParametersResolver
.
resolveCallParameters
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getFunctionForDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getResolvedCallForCallExpression
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getExpectedReceiverDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getExpectedThisDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getExpectedReceiverDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getExpectedThisDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
FunctionBodyTranslator
.
translateFunctionBody
;
/**
...
...
js/js.translator/src/org/jetbrains/k2js/translate/reference/NativePropertyAccessTranslator.java
浏览文件 @
d889ca37
...
...
@@ -25,7 +25,7 @@ import org.jetbrains.jet.lang.descriptors.PropertyDescriptor;
import
org.jetbrains.k2js.translate.context.TranslationContext
;
import
org.jetbrains.k2js.translate.utils.TranslationUtils
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getExpectedThisDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getExpectedThisDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.
assignment
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.
qualified
;
...
...
js/js.translator/src/org/jetbrains/k2js/translate/utils/AnnotationsUtils.java
浏览文件 @
d889ca37
...
...
@@ -24,7 +24,7 @@ import org.jetbrains.jet.lang.descriptors.annotations.AnnotationDescriptor;
import
org.jetbrains.jet.lang.resolve.DescriptorUtils
;
import
org.jetbrains.jet.lang.resolve.constants.CompileTimeConstant
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getContainingClass
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getContainingClass
;
/**
* @author Pavel Talanov
...
...
js/js.translator/src/org/jetbrains/k2js/translate/utils/BindingUtils.java
浏览文件 @
d889ca37
...
...
@@ -34,7 +34,7 @@ import java.util.Set;
import
static
org
.
jetbrains
.
jet
.
lang
.
resolve
.
BindingContext
.
INDEXED_LVALUE_GET
;
import
static
org
.
jetbrains
.
jet
.
lang
.
resolve
.
BindingContext
.
INDEXED_LVALUE_SET
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.*;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.*;
/**
* @author Pavel Talanov
...
...
@@ -140,7 +140,7 @@ public final class BindingUtils {
public
static
boolean
hasAncestorClass
(
@NotNull
BindingContext
context
,
@NotNull
JetClassOrObject
classDeclaration
)
{
ClassDescriptor
classDescriptor
=
getClassDescriptor
(
context
,
classDeclaration
);
List
<
ClassDescriptor
>
superclassDescriptors
=
getSuperclassDescriptors
(
classDescriptor
);
return
(
DescriptorUtils
.
findAncestorClass
(
superclassDescriptors
)
!=
null
);
return
(
Js
DescriptorUtils
.
findAncestorClass
(
superclassDescriptors
)
!=
null
);
}
public
static
boolean
isStatement
(
@NotNull
BindingContext
context
,
@NotNull
JetExpression
expression
)
{
...
...
js/js.translator/src/org/jetbrains/k2js/translate/utils/ClassSortingUtils.java
浏览文件 @
d889ca37
...
...
@@ -25,7 +25,7 @@ import org.jetbrains.jet.lang.resolve.BindingContext;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getSuperclassDescriptors
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getSuperclassDescriptors
;
//TODO: can optimise using less dumb implementation
...
...
js/js.translator/src/org/jetbrains/k2js/translate/utils/DescriptorUtils.java
→
js/js.translator/src/org/jetbrains/k2js/translate/utils/
Js
DescriptorUtils.java
浏览文件 @
d889ca37
...
...
@@ -36,9 +36,9 @@ import static org.jetbrains.k2js.translate.utils.BindingUtils.isNotAny;
/**
* @author Pavel Talanov
*/
public
final
class
DescriptorUtils
{
public
final
class
Js
DescriptorUtils
{
private
DescriptorUtils
()
{
private
Js
DescriptorUtils
()
{
}
private
static
int
valueParametersCount
(
@NotNull
FunctionDescriptor
functionDescriptor
)
{
...
...
js/js.translator/src/org/jetbrains/k2js/translate/utils/TranslationUtils.java
浏览文件 @
d889ca37
...
...
@@ -34,8 +34,8 @@ import java.util.List;
import
static
com
.
google
.
dart
.
compiler
.
util
.
AstUtil
.
newAssignment
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getFunctionDescriptorForOperationExpression
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
BindingUtils
.
getPropertyDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getDeclarationDescriptorForReceiver
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
DescriptorUtils
.
getExpectedReceiverDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getDeclarationDescriptorForReceiver
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
Js
DescriptorUtils
.
getExpectedReceiverDescriptor
;
import
static
org
.
jetbrains
.
k2js
.
translate
.
utils
.
JsAstUtils
.*;
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录