mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Merge remote-tracking branch 'origin/main' into dbartol/threat-models-2
This commit is contained in:
@@ -12,16 +12,16 @@ private import internal.InlineExpectationsTestImpl
|
||||
|
||||
private module FlowTestImpl implements InputSig<JavaDataFlow> {
|
||||
predicate defaultSource(DataFlow::Node source) {
|
||||
source.asExpr().(MethodAccess).getMethod().getName() = ["source", "taint"]
|
||||
source.asExpr().(MethodCall).getMethod().getName() = ["source", "taint"]
|
||||
}
|
||||
|
||||
predicate defaultSink(DataFlow::Node sink) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | sink.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | sink.asExpr() = ma.getAnArgument())
|
||||
}
|
||||
|
||||
private string getSourceArgString(DataFlow::Node src) {
|
||||
defaultSource(src) and
|
||||
src.asExpr().(MethodAccess).getAnArgument().(StringLiteral).getValue() = result
|
||||
src.asExpr().(MethodCall).getAnArgument().(StringLiteral).getValue() = result
|
||||
}
|
||||
|
||||
string getArgString(DataFlow::Node src, DataFlow::Node sink) {
|
||||
|
||||
@@ -37,9 +37,9 @@ def.kt:
|
||||
# 46| 0: [TypeAccess] Annot0k
|
||||
# 46| 5: [BlockStmt] { ... }
|
||||
# 47| 0: [ExprStmt] <Expr>;
|
||||
# 47| 0: [MethodAccess] println(...)
|
||||
# 47| 0: [MethodCall] println(...)
|
||||
# 47| -1: [TypeAccess] ConsoleKt
|
||||
# 47| 0: [MethodAccess] a(...)
|
||||
# 47| 0: [MethodCall] a(...)
|
||||
# 47| -1: [VarAccess] a
|
||||
# 50| 1: [LocalVariableDeclStmt] var ...;
|
||||
# 50| 1: [LocalVariableDeclExpr] x
|
||||
|
||||
@@ -13,6 +13,6 @@ query predicate arrayCreationInit(ArrayCreationExpr ace, ArrayInit init, Expr e,
|
||||
init.getInit(idx) = e
|
||||
}
|
||||
|
||||
query predicate cloneCalls(MethodAccess ma, Type resultType) {
|
||||
query predicate cloneCalls(MethodCall ma, Type resultType) {
|
||||
ma.getMethod().getName() = "clone" and resultType = ma.getType()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import java
|
||||
|
||||
query predicate iterator(MethodAccess ma, string mn, string t) {
|
||||
query predicate iterator(MethodCall ma, string mn, string t) {
|
||||
exists(Method m |
|
||||
ma.getMethod() = m and
|
||||
m.getName() = "iterator" and
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma
|
||||
|
||||
@@ -111,14 +111,14 @@ classes.kt:
|
||||
# 28| 3: [TypeAccess] Unit
|
||||
# 28| 5: [BlockStmt] { ... }
|
||||
# 28| 0: [ReturnStmt] return ...
|
||||
# 28| 0: [MethodAccess] funIF1(...)
|
||||
# 28| 0: [MethodCall] funIF1(...)
|
||||
# 28| -1: [SuperAccess] IF1.super
|
||||
# 28| 0: [TypeAccess] IF1
|
||||
# 28| 3: [Method] funIF2
|
||||
# 28| 3: [TypeAccess] Unit
|
||||
# 28| 5: [BlockStmt] { ... }
|
||||
# 28| 0: [ReturnStmt] return ...
|
||||
# 28| 0: [MethodAccess] funIF2(...)
|
||||
# 28| 0: [MethodCall] funIF2(...)
|
||||
# 28| -1: [SuperAccess] IF2.super
|
||||
# 28| 0: [TypeAccess] IF2
|
||||
# 29| 4: [Constructor] ClassSix
|
||||
@@ -136,18 +136,18 @@ classes.kt:
|
||||
# 35| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 35| 1: [BlockStmt] { ... }
|
||||
# 39| 0: [ExprStmt] <Expr>;
|
||||
# 39| 0: [MethodAccess] f(...)
|
||||
# 39| 0: [MethodCall] f(...)
|
||||
# 39| -1: [TypeAccess] ClassesKt
|
||||
# 39| 0: [StringLiteral] "init1"
|
||||
# 42| 1: [ExprStmt] <Expr>;
|
||||
# 42| 0: [KtInitializerAssignExpr] ...=...
|
||||
# 42| 0: [VarAccess] x
|
||||
# 45| 2: [ExprStmt] <Expr>;
|
||||
# 45| 0: [MethodAccess] f(...)
|
||||
# 45| 0: [MethodCall] f(...)
|
||||
# 45| -1: [TypeAccess] ClassesKt
|
||||
# 45| 0: [StringLiteral] "init2"
|
||||
# 36| 2: [ExprStmt] <Expr>;
|
||||
# 36| 0: [MethodAccess] f(...)
|
||||
# 36| 0: [MethodCall] f(...)
|
||||
# 36| -1: [TypeAccess] ClassesKt
|
||||
# 36| 0: [VarAccess] i
|
||||
# 42| 2: [Method] getX
|
||||
@@ -466,7 +466,7 @@ classes.kt:
|
||||
# 112| 0: [TypeAccess] int
|
||||
# 112| 5: [BlockStmt] { ... }
|
||||
# 114| 1: [ExprStmt] <Expr>;
|
||||
# 114| 0: [MethodAccess] foo(...)
|
||||
# 114| 0: [MethodCall] foo(...)
|
||||
# 114| -1: [ClassInstanceExpr] new Local1<Integer>(...)
|
||||
# 114| -3: [TypeAccess] Local1<Integer>
|
||||
# 114| 0: [TypeAccess] Integer
|
||||
@@ -500,7 +500,7 @@ classes.kt:
|
||||
# 120| 0: [TypeAccess] int
|
||||
# 120| 5: [BlockStmt] { ... }
|
||||
# 122| 1: [ExprStmt] <Expr>;
|
||||
# 122| 0: [MethodAccess] foo(...)
|
||||
# 122| 0: [MethodCall] foo(...)
|
||||
# 122| -1: [ClassInstanceExpr] new Local2<Integer>(...)
|
||||
# 122| -3: [TypeAccess] Local2<Integer>
|
||||
# 122| 0: [TypeAccess] Integer
|
||||
@@ -538,7 +538,7 @@ classes.kt:
|
||||
# 130| 0: [TypeAccess] int
|
||||
# 130| 5: [BlockStmt] { ... }
|
||||
# 132| 1: [ExprStmt] <Expr>;
|
||||
# 132| 0: [MethodAccess] foo(...)
|
||||
# 132| 0: [MethodCall] foo(...)
|
||||
# 132| -1: [ClassInstanceExpr] new Local3<Integer>(...)
|
||||
# 132| -3: [TypeAccess] Local3<Integer>
|
||||
# 132| 0: [TypeAccess] Integer
|
||||
@@ -616,7 +616,7 @@ generic_anonymous.kt:
|
||||
# 11| 0: [TypeAccess] String
|
||||
# 11| 5: [BlockStmt] { ... }
|
||||
# 11| 0: [ReturnStmt] return ...
|
||||
# 11| 0: [MethodAccess] get(...)
|
||||
# 11| 0: [MethodCall] get(...)
|
||||
# 11| -1: [ClassInstanceExpr] new Generic<String>(...)
|
||||
# 11| -3: [TypeAccess] Generic<String>
|
||||
# 11| 0: [TypeAccess] String
|
||||
@@ -628,7 +628,7 @@ generic_anonymous.kt:
|
||||
# 13| 0: [TypeAccess] int
|
||||
# 13| 5: [BlockStmt] { ... }
|
||||
# 13| 0: [ReturnStmt] return ...
|
||||
# 13| 0: [MethodAccess] get(...)
|
||||
# 13| 0: [MethodCall] get(...)
|
||||
# 13| -1: [ClassInstanceExpr] new Generic<Integer>(...)
|
||||
# 13| -3: [TypeAccess] Generic<Integer>
|
||||
# 13| 0: [TypeAccess] Integer
|
||||
@@ -674,7 +674,7 @@ generic_anonymous.kt:
|
||||
# 4| 0: [VarAccess] member
|
||||
# 4| 2: [FieldDeclaration] T member;
|
||||
# 4| -1: [TypeAccess] T
|
||||
# 4| 0: [MethodAccess] getT(...)
|
||||
# 4| 0: [MethodCall] getT(...)
|
||||
# 4| -1: [ThisAccess] Generic.this
|
||||
# 4| 0: [TypeAccess] Generic
|
||||
# 4| 3: [Method] getMember
|
||||
@@ -697,8 +697,8 @@ generic_anonymous.kt:
|
||||
# 7| 3: [TypeAccess] T
|
||||
# 7| 5: [BlockStmt] { ... }
|
||||
# 7| 0: [ReturnStmt] return ...
|
||||
# 7| 0: [MethodAccess] getMember(...)
|
||||
# 7| -1: [MethodAccess] getX$private(...)
|
||||
# 7| 0: [MethodCall] getMember(...)
|
||||
# 7| -1: [MethodCall] getX$private(...)
|
||||
# 7| -1: [ThisAccess] this
|
||||
# 15| 4: [Class,GenericType,ParameterizedType] Outer
|
||||
#-----| -2: (Generic Parameters)
|
||||
@@ -753,14 +753,14 @@ generic_anonymous.kt:
|
||||
# 26| 3: [TypeAccess] U2
|
||||
# 26| 5: [BlockStmt] { ... }
|
||||
# 26| 0: [ReturnStmt] return ...
|
||||
# 26| 0: [MethodAccess] fn0(...)
|
||||
# 26| 0: [MethodCall] fn0(...)
|
||||
# 26| -1: [SuperAccess] C0.super
|
||||
# 26| 0: [TypeAccess] C0
|
||||
# 26| 3: [Method] fn1
|
||||
# 26| 3: [TypeAccess] U3
|
||||
# 26| 5: [BlockStmt] { ... }
|
||||
# 26| 0: [ReturnStmt] return ...
|
||||
# 26| 0: [MethodAccess] fn1(...)
|
||||
# 26| 0: [MethodCall] fn1(...)
|
||||
# 26| -1: [SuperAccess] C1.super
|
||||
# 26| 0: [TypeAccess] C1
|
||||
# 26| 1: [ExprStmt] <Expr>;
|
||||
@@ -781,14 +781,14 @@ generic_anonymous.kt:
|
||||
# 27| 3: [TypeAccess] U2
|
||||
# 27| 5: [BlockStmt] { ... }
|
||||
# 27| 0: [ReturnStmt] return ...
|
||||
# 27| 0: [MethodAccess] fn0(...)
|
||||
# 27| 0: [MethodCall] fn0(...)
|
||||
# 27| -1: [SuperAccess] C0.super
|
||||
# 27| 0: [TypeAccess] C0
|
||||
# 27| 3: [Method] fn1
|
||||
# 27| 3: [TypeAccess] U2
|
||||
# 27| 5: [BlockStmt] { ... }
|
||||
# 27| 0: [ReturnStmt] return ...
|
||||
# 27| 0: [MethodAccess] fn1(...)
|
||||
# 27| 0: [MethodCall] fn1(...)
|
||||
# 27| -1: [SuperAccess] C1.super
|
||||
# 27| 0: [TypeAccess] C1
|
||||
# 27| 1: [ExprStmt] <Expr>;
|
||||
@@ -809,14 +809,14 @@ generic_anonymous.kt:
|
||||
# 28| 3: [TypeAccess] U2
|
||||
# 28| 5: [BlockStmt] { ... }
|
||||
# 28| 0: [ReturnStmt] return ...
|
||||
# 28| 0: [MethodAccess] fn0(...)
|
||||
# 28| 0: [MethodCall] fn0(...)
|
||||
# 28| -1: [SuperAccess] C0.super
|
||||
# 28| 0: [TypeAccess] C0
|
||||
# 28| 3: [Method] fn1
|
||||
# 28| 3: [TypeAccess] String
|
||||
# 28| 5: [BlockStmt] { ... }
|
||||
# 28| 0: [ReturnStmt] return ...
|
||||
# 28| 0: [MethodAccess] fn1(...)
|
||||
# 28| 0: [MethodCall] fn1(...)
|
||||
# 28| -1: [SuperAccess] C1.super
|
||||
# 28| 0: [TypeAccess] C1
|
||||
# 28| 1: [ExprStmt] <Expr>;
|
||||
@@ -837,7 +837,7 @@ generic_anonymous.kt:
|
||||
# 29| 3: [TypeAccess] U2
|
||||
# 29| 5: [BlockStmt] { ... }
|
||||
# 29| 0: [ReturnStmt] return ...
|
||||
# 29| 0: [MethodAccess] fn0(...)
|
||||
# 29| 0: [MethodCall] fn0(...)
|
||||
# 29| -1: [SuperAccess] C0.super
|
||||
# 29| 0: [TypeAccess] C0
|
||||
# 29| 1: [ExprStmt] <Expr>;
|
||||
@@ -858,7 +858,7 @@ generic_anonymous.kt:
|
||||
# 30| 3: [TypeAccess] String
|
||||
# 30| 5: [BlockStmt] { ... }
|
||||
# 30| 0: [ReturnStmt] return ...
|
||||
# 30| 0: [MethodAccess] fn0(...)
|
||||
# 30| 0: [MethodCall] fn0(...)
|
||||
# 30| -1: [SuperAccess] C0.super
|
||||
# 30| 0: [TypeAccess] C0
|
||||
# 30| 1: [ExprStmt] <Expr>;
|
||||
@@ -962,7 +962,7 @@ local_anonymous.kt:
|
||||
# 11| 3: [TypeAccess] Unit
|
||||
# 11| 5: [BlockStmt] { ... }
|
||||
# 12| 1: [ExprStmt] <Expr>;
|
||||
# 12| 0: [MethodAccess] fnLocal(...)
|
||||
# 12| 0: [MethodCall] fnLocal(...)
|
||||
# 12| -1: [ClassInstanceExpr] new (...)
|
||||
# 12| -3: [TypeAccess] Object
|
||||
# 15| 4: [Method] fn3
|
||||
@@ -1030,7 +1030,7 @@ local_anonymous.kt:
|
||||
# 21| 0: [Parameter] a0
|
||||
# 21| 5: [BlockStmt] { ... }
|
||||
# 21| 0: [ReturnStmt] return ...
|
||||
# 21| 0: [MethodAccess] fn3(...)
|
||||
# 21| 0: [MethodCall] fn3(...)
|
||||
# 21| -1: [VarAccess] a0
|
||||
# 21| -3: [TypeAccess] Function1<Class1,Unit>
|
||||
# 21| 0: [TypeAccess] Class1
|
||||
@@ -1092,7 +1092,7 @@ local_anonymous.kt:
|
||||
# 33| 0: [WhenExpr] when ...
|
||||
# 33| 0: [WhenBranch] ... -> ...
|
||||
# 33| 0: [ValueEQExpr] ... (value equals) ...
|
||||
# 33| 0: [MethodAccess] getX(...)
|
||||
# 33| 0: [MethodCall] getX(...)
|
||||
# 33| -1: [ThisAccess] this
|
||||
# 33| 1: [IntegerLiteral] 1
|
||||
# 33| 1: [ExprStmt] <Expr>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma.getQualifier(), ma.getQualifier().getAPrimaryQlClass(), ma.getCallee()
|
||||
|
||||
@@ -109,11 +109,11 @@
|
||||
| Test.kt:40:4:40:6 | <Stmt> | StmtExpr | Test.kt:40:4:40:6 | { ... } | BlockStmt |
|
||||
| Test.kt:40:4:40:6 | <implicit coercion to unit> | ImplicitCoercionToUnitExpr | Test.kt:38:9:38:9 | x | VarAccess |
|
||||
| Test.kt:40:4:40:6 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
|
||||
| Test.kt:40:4:40:6 | dec(...) | MethodAccess | Test.kt:40:4:40:6 | ...=... | AssignExpr |
|
||||
| Test.kt:40:4:40:6 | dec(...) | MethodCall | Test.kt:40:4:40:6 | ...=... | AssignExpr |
|
||||
| Test.kt:40:4:40:6 | int tmp0 | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
|
||||
| Test.kt:40:4:40:6 | tmp0 | LocalVariableDeclExpr | Test.kt:40:4:40:4 | <Expr>; | ExprStmt |
|
||||
| Test.kt:40:4:40:6 | tmp0 | VarAccess | Test.kt:40:4:40:6 | <implicit coercion to unit> | ImplicitCoercionToUnitExpr |
|
||||
| Test.kt:40:4:40:6 | tmp0 | VarAccess | Test.kt:40:4:40:6 | dec(...) | MethodAccess |
|
||||
| Test.kt:40:4:40:6 | tmp0 | VarAccess | Test.kt:40:4:40:6 | dec(...) | MethodCall |
|
||||
| Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt | Test.kt:40:4:40:4 | x | VarAccess |
|
||||
| Test.kt:40:4:40:6 | { ... } | BlockStmt | Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt |
|
||||
| Test.kt:43:3:43:3 | <Expr>; | ExprStmt | Test.kt:43:7:43:8 | 30 | IntegerLiteral |
|
||||
@@ -208,8 +208,8 @@
|
||||
| Test.kt:105:20:107:5 | { ... } | BlockStmt | Test.kt:106:9:106:29 | <Expr>; | ExprStmt |
|
||||
| Test.kt:106:9:106:29 | <Expr>; | ExprStmt | Test.kt:106:18:106:27 | "x not null" | StringLiteral |
|
||||
| Test.kt:106:9:106:29 | ConsoleKt | TypeAccess | file://:0:0:0:0 | <none> | <none> |
|
||||
| Test.kt:106:9:106:29 | println(...) | MethodAccess | Test.kt:100:1:110:1 | fn | Method |
|
||||
| Test.kt:106:18:106:27 | "x not null" | StringLiteral | Test.kt:106:9:106:29 | println(...) | MethodAccess |
|
||||
| Test.kt:106:9:106:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | fn | Method |
|
||||
| Test.kt:106:18:106:27 | "x not null" | StringLiteral | Test.kt:106:9:106:29 | println(...) | MethodCall |
|
||||
| Test.kt:107:16:107:16 | y | VarAccess | Test.kt:107:21:107:24 | null | NullLiteral |
|
||||
| Test.kt:107:16:107:24 | ... (value not-equals) ... | ValueNEExpr | Test.kt:100:1:110:1 | fn | Method |
|
||||
| Test.kt:107:16:107:24 | ... (value not-equals) ... | ValueNEExpr | Test.kt:107:27:109:5 | { ... } | BlockStmt |
|
||||
@@ -218,8 +218,8 @@
|
||||
| Test.kt:107:27:109:5 | { ... } | BlockStmt | Test.kt:108:9:108:29 | <Expr>; | ExprStmt |
|
||||
| Test.kt:108:9:108:29 | <Expr>; | ExprStmt | Test.kt:108:18:108:27 | "y not null" | StringLiteral |
|
||||
| Test.kt:108:9:108:29 | ConsoleKt | TypeAccess | file://:0:0:0:0 | <none> | <none> |
|
||||
| Test.kt:108:9:108:29 | println(...) | MethodAccess | Test.kt:100:1:110:1 | fn | Method |
|
||||
| Test.kt:108:18:108:27 | "y not null" | StringLiteral | Test.kt:108:9:108:29 | println(...) | MethodAccess |
|
||||
| Test.kt:108:9:108:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | fn | Method |
|
||||
| Test.kt:108:18:108:27 | "y not null" | StringLiteral | Test.kt:108:9:108:29 | println(...) | MethodCall |
|
||||
| Test.kt:112:1:116:1 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
|
||||
| Test.kt:112:1:116:1 | fn | Method | file://:0:0:0:0 | <none> | <none> |
|
||||
| Test.kt:112:8:112:17 | boolean | TypeAccess | file://:0:0:0:0 | <none> | <none> |
|
||||
|
||||
@@ -50,5 +50,5 @@ query predicate missingSuccessor(Expr n) {
|
||||
maybeSuccessor(n) instanceof NoMaybeControlFlowNode and
|
||||
n.getFile().(CompilationUnit).fromSource() and
|
||||
not n instanceof TypeAccess and
|
||||
not n instanceof LValue
|
||||
not n instanceof VarWrite
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class PathTestConf extends ActionConfiguration {
|
||||
PathTestConf() { this = "PathTestConf" }
|
||||
|
||||
override predicate isAction(ControlFlowNode node) {
|
||||
node.(MethodAccess).getMethod().hasName("action")
|
||||
node.(MethodCall).getMethod().hasName("action")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ dc.kt:
|
||||
# 0| 1: [VarAccess] p0.strs
|
||||
# 0| -1: [VarAccess] p0
|
||||
# 0| 2: [ReturnStmt] return ...
|
||||
# 0| 0: [MethodAccess] copy(...)
|
||||
# 0| 0: [MethodCall] copy(...)
|
||||
# 0| -1: [VarAccess] p0
|
||||
# 0| 0: [VarAccess] p1
|
||||
# 0| 1: [VarAccess] p2
|
||||
@@ -123,7 +123,7 @@ dc.kt:
|
||||
# 0| 5: [BlockStmt] { ... }
|
||||
# 0| 0: [LocalVariableDeclStmt] var ...;
|
||||
# 0| 1: [LocalVariableDeclExpr] result
|
||||
# 0| 0: [MethodAccess] hashCode(...)
|
||||
# 0| 0: [MethodCall] hashCode(...)
|
||||
# 0| -1: [TypeAccess] Arrays
|
||||
# 0| 0: [VarAccess] this.bytes
|
||||
# 0| -1: [ThisAccess] this
|
||||
@@ -134,7 +134,7 @@ dc.kt:
|
||||
# 0| 0: [MulExpr] ... * ...
|
||||
# 0| 0: [VarAccess] result
|
||||
# 0| 1: [IntegerLiteral] 31
|
||||
# 0| 1: [MethodAccess] hashCode(...)
|
||||
# 0| 1: [MethodCall] hashCode(...)
|
||||
# 0| -1: [TypeAccess] Arrays
|
||||
# 0| 0: [VarAccess] this.strs
|
||||
# 0| -1: [ThisAccess] this
|
||||
@@ -147,13 +147,13 @@ dc.kt:
|
||||
# 0| 0: [StringTemplateExpr] "..."
|
||||
# 0| 0: [StringLiteral] "ProtoMapValue("
|
||||
# 0| 1: [StringLiteral] "bytes="
|
||||
# 0| 2: [MethodAccess] toString(...)
|
||||
# 0| 2: [MethodCall] toString(...)
|
||||
# 0| -1: [TypeAccess] Arrays
|
||||
# 0| 0: [VarAccess] this.bytes
|
||||
# 0| -1: [ThisAccess] this
|
||||
# 0| 3: [StringLiteral] ", "
|
||||
# 0| 4: [StringLiteral] "strs="
|
||||
# 0| 5: [MethodAccess] toString(...)
|
||||
# 0| 5: [MethodCall] toString(...)
|
||||
# 0| -1: [TypeAccess] Arrays
|
||||
# 0| 0: [VarAccess] this.strs
|
||||
# 0| -1: [ThisAccess] this
|
||||
|
||||
@@ -2,7 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.TaintTracking
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") }
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.TaintTracking
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") }
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.TaintTracking
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") }
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.TaintTracking
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") }
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@ A.kt:
|
||||
# 13| 0: [KtInitializerAssignExpr] ...=...
|
||||
# 13| 0: [VarAccess] prop
|
||||
# 10| 2: [ExprStmt] <Expr>;
|
||||
# 10| 0: [MethodAccess] println(...)
|
||||
# 10| 0: [MethodCall] println(...)
|
||||
# 10| -1: [TypeAccess] ConsoleKt
|
||||
# 10| 0: [StringLiteral] ""
|
||||
# 13| 6: [Method] getProp
|
||||
@@ -36,7 +36,7 @@ A.kt:
|
||||
# 13| -1: [ThisAccess] this
|
||||
# 13| 7: [FieldDeclaration] int prop;
|
||||
# 13| -1: [TypeAccess] int
|
||||
# 13| 0: [MethodAccess] fn(...)
|
||||
# 13| 0: [MethodCall] fn(...)
|
||||
# 13| -1: [ThisAccess] A.this
|
||||
# 13| 0: [TypeAccess] A
|
||||
# 13| 0: [IntegerLiteral] 1
|
||||
@@ -63,7 +63,7 @@ A.kt:
|
||||
# 17| 5: [BlockStmt] { ... }
|
||||
# 18| 0: [LocalVariableDeclStmt] var ...;
|
||||
# 18| 1: [LocalVariableDeclExpr] x
|
||||
# 18| 0: [MethodAccess] fn(...)
|
||||
# 18| 0: [MethodCall] fn(...)
|
||||
# 18| -1: [ThisAccess] this
|
||||
# 18| 0: [IntegerLiteral] 1
|
||||
# 19| 1: [LocalVariableDeclStmt] var ...;
|
||||
@@ -136,7 +136,7 @@ B.java:
|
||||
# 9| 0: [LocalVariableDeclStmt] var ...;
|
||||
# 9| 0: [TypeAccess] int
|
||||
# 9| 1: [LocalVariableDeclExpr] x
|
||||
# 9| 0: [MethodAccess] fn(...)
|
||||
# 9| 0: [MethodCall] fn(...)
|
||||
# 9| -1: [ThisAccess] this
|
||||
# 9| 0: [IntegerLiteral] 1
|
||||
# 10| 1: [LocalVariableDeclStmt] var ...;
|
||||
|
||||
@@ -3,5 +3,5 @@ import java
|
||||
// For extension methods we use JVM bytecode representation:
|
||||
// * the qualifier is the dispatch receiver expression, and
|
||||
// * the extension receiver expression is the 0th argument.
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma, ma.getQualifier(), ma.getAnArgument()
|
||||
|
||||
@@ -22,5 +22,5 @@
|
||||
| test.kt:8:9:8:20 | return ... | ReturnStmt |
|
||||
| test.kt:8:16:8:20 | T | TypeAccess |
|
||||
| test.kt:8:16:8:20 | TestKt | TypeAccess |
|
||||
| test.kt:8:16:8:20 | bar(...) | MethodAccess |
|
||||
| test.kt:8:16:8:20 | bar(...) | MethodCall |
|
||||
| test.kt:8:16:8:20 | this | ThisAccess |
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java
|
||||
|
||||
from MethodAccess c
|
||||
from MethodCall c
|
||||
select c, c.getCallee(), c.getCallee().getDeclaringType(),
|
||||
c.getCallee().getDeclaringType().(NestedType).getEnclosingType()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java
|
||||
|
||||
from MethodAccess c
|
||||
from MethodCall c
|
||||
select c, c.getCallee(), c.getCallee().getDeclaringType(),
|
||||
c.getCallee().getDeclaringType().(NestedType).getEnclosingType()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java
|
||||
|
||||
from MethodAccess c
|
||||
from MethodCall c
|
||||
select c, c.getCallee(), c.getCallee().getDeclaringType(),
|
||||
c.getCallee().getDeclaringType().(NestedType).getEnclosingType()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma
|
||||
|
||||
@@ -7,7 +7,7 @@ string paramTypeIfPresent(Callable m) {
|
||||
}
|
||||
|
||||
query predicate calls(
|
||||
MethodAccess ma, Callable caller, RefType callerType, Callable called, RefType calledType
|
||||
MethodCall ma, Callable caller, RefType callerType, Callable called, RefType calledType
|
||||
) {
|
||||
ma.getEnclosingCallable() = caller and
|
||||
ma.getCallee() = called and
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma.getQualifier(), ma.getCallee(), ma.getCallee().getSignature(),
|
||||
ma.getCallee().getAParamType().toString(), ma.getCallee().getDeclaringType()
|
||||
|
||||
@@ -37,12 +37,12 @@ generics.kt:
|
||||
# 25| 1: [TypeAccess] Integer
|
||||
# 25| 0: [IntegerLiteral] 1
|
||||
# 26| 1: [ExprStmt] <Expr>;
|
||||
# 26| 0: [MethodAccess] f1(...)
|
||||
# 26| 0: [MethodCall] f1(...)
|
||||
# 26| -1: [VarAccess] c1
|
||||
# 26| 0: [IntegerLiteral] 2
|
||||
# 27| 2: [LocalVariableDeclStmt] var ...;
|
||||
# 27| 1: [LocalVariableDeclExpr] x1
|
||||
# 27| 0: [MethodAccess] f2(...)
|
||||
# 27| 0: [MethodCall] f2(...)
|
||||
# 27| -2: [TypeAccess] String
|
||||
# 27| -1: [VarAccess] c1
|
||||
# 27| 0: [StringLiteral] ""
|
||||
@@ -54,12 +54,12 @@ generics.kt:
|
||||
# 28| 1: [TypeAccess] Integer
|
||||
# 28| 0: [StringLiteral] ""
|
||||
# 29| 4: [ExprStmt] <Expr>;
|
||||
# 29| 0: [MethodAccess] f1(...)
|
||||
# 29| 0: [MethodCall] f1(...)
|
||||
# 29| -1: [VarAccess] c2
|
||||
# 29| 0: [StringLiteral] "a"
|
||||
# 30| 5: [LocalVariableDeclStmt] var ...;
|
||||
# 30| 1: [LocalVariableDeclExpr] x2
|
||||
# 30| 0: [MethodAccess] f2(...)
|
||||
# 30| 0: [MethodCall] f2(...)
|
||||
# 30| -2: [TypeAccess] Integer
|
||||
# 30| -1: [VarAccess] c2
|
||||
# 30| 0: [IntegerLiteral] 3
|
||||
@@ -68,7 +68,7 @@ generics.kt:
|
||||
# 31| 0: [ClassInstanceExpr] new C2(...)
|
||||
# 31| -3: [TypeAccess] C2
|
||||
# 32| 7: [ExprStmt] <Expr>;
|
||||
# 32| 0: [MethodAccess] f4(...)
|
||||
# 32| 0: [MethodCall] f4(...)
|
||||
# 32| -2: [TypeAccess] Integer
|
||||
# 32| -1: [VarAccess] c3
|
||||
# 32| 0: [IntegerLiteral] 5
|
||||
@@ -250,7 +250,7 @@ generics.kt:
|
||||
# 59| 0: [TypeAccess] T4
|
||||
# 59| 5: [BlockStmt] { ... }
|
||||
# 61| 1: [ExprStmt] <Expr>;
|
||||
# 61| 0: [MethodAccess] fn2(...)
|
||||
# 61| 0: [MethodCall] fn2(...)
|
||||
# 61| -2: [TypeAccess] String
|
||||
# 61| -1: [ClassInstanceExpr] new Local<Integer>(...)
|
||||
# 61| -3: [TypeAccess] Local<Integer>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma, Callable callee, RefType declaringType
|
||||
from MethodCall ma, Callable callee, RefType declaringType
|
||||
where ma.getCallee() = callee and callee.getDeclaringType() = declaringType
|
||||
select ma, callee.toString(), declaringType.toString()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
where ma.getEnclosingCallable().fromSource()
|
||||
select ma
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma, ma.getCallee(), ma.getCallee().getDeclaringType()
|
||||
|
||||
@@ -10,7 +10,7 @@ test.kt:
|
||||
# 1| 1: [TypeAccess] Integer
|
||||
# 1| 5: [BlockStmt] { ... }
|
||||
# 1| 0: [ReturnStmt] return ...
|
||||
# 1| 0: [MethodAccess] getOrDefault(...)
|
||||
# 1| 0: [MethodCall] getOrDefault(...)
|
||||
# 1| -1: [VarAccess] m
|
||||
# 1| 0: [IntegerLiteral] 1
|
||||
# 1| 1: [IntegerLiteral] 2
|
||||
@@ -21,7 +21,7 @@ test.kt:
|
||||
# 3| 0: [TypeAccess] String
|
||||
# 3| 5: [BlockStmt] { ... }
|
||||
# 3| 0: [ReturnStmt] return ...
|
||||
# 3| 0: [MethodAccess] length(...)
|
||||
# 3| 0: [MethodCall] length(...)
|
||||
# 3| -1: [VarAccess] s
|
||||
# 5| 3: [Method] remove
|
||||
# 5| 3: [TypeAccess] Unit
|
||||
@@ -33,7 +33,7 @@ test.kt:
|
||||
# 6| 0: [ExprStmt] <Expr>;
|
||||
# 6| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 6| 0: [TypeAccess] Unit
|
||||
# 6| 1: [MethodAccess] remove(...)
|
||||
# 6| 1: [MethodCall] remove(...)
|
||||
# 6| -1: [VarAccess] l
|
||||
# 6| 0: [IntegerLiteral] 5
|
||||
# 9| 4: [Method] fn1
|
||||
@@ -94,85 +94,85 @@ test.kt:
|
||||
# 16| 0: [ExprStmt] <Expr>;
|
||||
# 16| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 16| 0: [TypeAccess] Unit
|
||||
# 16| 1: [MethodAccess] charAt(...)
|
||||
# 16| 1: [MethodCall] charAt(...)
|
||||
# 16| -1: [VarAccess] s
|
||||
# 16| 0: [IntegerLiteral] 1
|
||||
# 17| 1: [ExprStmt] <Expr>;
|
||||
# 17| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 17| 0: [TypeAccess] Unit
|
||||
# 17| 1: [MethodAccess] charAt(...)
|
||||
# 17| 1: [MethodCall] charAt(...)
|
||||
# 17| -1: [VarAccess] s
|
||||
# 17| 0: [IntegerLiteral] 1
|
||||
# 18| 2: [ExprStmt] <Expr>;
|
||||
# 18| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 18| 0: [TypeAccess] Unit
|
||||
# 18| 1: [MethodAccess] doubleValue(...)
|
||||
# 18| 1: [MethodCall] doubleValue(...)
|
||||
# 18| -1: [VarAccess] n
|
||||
# 19| 3: [ExprStmt] <Expr>;
|
||||
# 19| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 19| 0: [TypeAccess] Unit
|
||||
# 19| 1: [MethodAccess] byteValue(...)
|
||||
# 19| 1: [MethodCall] byteValue(...)
|
||||
# 19| -1: [VarAccess] n
|
||||
# 20| 4: [ExprStmt] <Expr>;
|
||||
# 20| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 20| 0: [TypeAccess] Unit
|
||||
# 20| 1: [MethodAccess] toChar(...)
|
||||
# 20| 1: [MethodCall] toChar(...)
|
||||
# 20| -1: [VarAccess] n
|
||||
# 21| 5: [ExprStmt] <Expr>;
|
||||
# 21| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 21| 0: [TypeAccess] Unit
|
||||
# 21| 1: [MethodAccess] floatValue(...)
|
||||
# 21| 1: [MethodCall] floatValue(...)
|
||||
# 21| -1: [VarAccess] n
|
||||
# 22| 6: [ExprStmt] <Expr>;
|
||||
# 22| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 22| 0: [TypeAccess] Unit
|
||||
# 22| 1: [MethodAccess] intValue(...)
|
||||
# 22| 1: [MethodCall] intValue(...)
|
||||
# 22| -1: [VarAccess] n
|
||||
# 23| 7: [ExprStmt] <Expr>;
|
||||
# 23| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 23| 0: [TypeAccess] Unit
|
||||
# 23| 1: [MethodAccess] shortValue(...)
|
||||
# 23| 1: [MethodCall] shortValue(...)
|
||||
# 23| -1: [VarAccess] n
|
||||
# 24| 8: [ExprStmt] <Expr>;
|
||||
# 24| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 24| 0: [TypeAccess] Unit
|
||||
# 24| 1: [MethodAccess] keySet(...)
|
||||
# 24| 1: [MethodCall] keySet(...)
|
||||
# 24| -1: [VarAccess] m
|
||||
# 25| 9: [ExprStmt] <Expr>;
|
||||
# 25| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 25| 0: [TypeAccess] Unit
|
||||
# 25| 1: [MethodAccess] values(...)
|
||||
# 25| 1: [MethodCall] values(...)
|
||||
# 25| -1: [VarAccess] m
|
||||
# 26| 10: [ExprStmt] <Expr>;
|
||||
# 26| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 26| 0: [TypeAccess] Unit
|
||||
# 26| 1: [MethodAccess] entrySet(...)
|
||||
# 26| 1: [MethodCall] entrySet(...)
|
||||
# 26| -1: [VarAccess] m
|
||||
# 27| 11: [ExprStmt] <Expr>;
|
||||
# 27| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 27| 0: [TypeAccess] Unit
|
||||
# 27| 1: [MethodAccess] remove(...)
|
||||
# 27| 1: [MethodCall] remove(...)
|
||||
# 27| -1: [VarAccess] l
|
||||
# 27| 0: [IntegerLiteral] 1
|
||||
# 28| 12: [ExprStmt] <Expr>;
|
||||
# 28| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 28| 0: [TypeAccess] Unit
|
||||
# 28| 1: [MethodAccess] getKey(...)
|
||||
# 28| -1: [MethodAccess] first(...)
|
||||
# 28| 1: [MethodCall] getKey(...)
|
||||
# 28| -1: [MethodCall] first(...)
|
||||
# 28| -2: [TypeAccess] Entry<String,String>
|
||||
# 28| 0: [TypeAccess] String
|
||||
# 28| 1: [TypeAccess] String
|
||||
# 28| -1: [TypeAccess] CollectionsKt
|
||||
# 28| 0: [MethodAccess] entrySet(...)
|
||||
# 28| 0: [MethodCall] entrySet(...)
|
||||
# 28| -1: [VarAccess] m
|
||||
# 29| 13: [ExprStmt] <Expr>;
|
||||
# 29| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 29| 0: [TypeAccess] Unit
|
||||
# 29| 1: [MethodAccess] getValue(...)
|
||||
# 29| -1: [MethodAccess] first(...)
|
||||
# 29| 1: [MethodCall] getValue(...)
|
||||
# 29| -1: [MethodCall] first(...)
|
||||
# 29| -2: [TypeAccess] Entry<String,String>
|
||||
# 29| 0: [TypeAccess] String
|
||||
# 29| 1: [TypeAccess] String
|
||||
# 29| -1: [TypeAccess] CollectionsKt
|
||||
# 29| 0: [MethodAccess] entrySet(...)
|
||||
# 29| 0: [MethodCall] entrySet(...)
|
||||
# 29| -1: [VarAccess] m
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java
|
||||
import semmle.code.java.Diagnostics
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma.getCallee().getAParameter().getType().toString()
|
||||
|
||||
query predicate diagnostics(Diagnostic d) { any() }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma, Method m
|
||||
from MethodCall ma, Method m
|
||||
where m = ma.getMethod()
|
||||
select ma, m
|
||||
|
||||
|
||||
@@ -18,5 +18,5 @@ Use.kt:
|
||||
# 3| 0: [ReturnStmt] return ...
|
||||
# 3| 0: [ImplicitNotNullExpr] <implicit not null>
|
||||
# 3| 0: [TypeAccess] String
|
||||
# 3| 1: [MethodAccess] getFoo(...)
|
||||
# 3| 1: [MethodCall] getFoo(...)
|
||||
# 3| -1: [VarAccess] prop
|
||||
|
||||
@@ -21,7 +21,7 @@ test.kt:
|
||||
# 45| 0: [TypeAccess] boolean
|
||||
# 45| 5: [BlockStmt] { ... }
|
||||
# 45| 0: [ReturnStmt] return ...
|
||||
# 45| 0: [MethodAccess] testExtensionFunction$default(...)
|
||||
# 45| 0: [MethodCall] testExtensionFunction$default(...)
|
||||
# 45| -1: [TypeAccess] TestKt
|
||||
# 0| 0: [ExtensionReceiverAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -64,7 +64,7 @@ test.kt:
|
||||
# 45| 0: [TypeAccess] boolean
|
||||
# 45| 5: [BlockStmt] { ... }
|
||||
# 45| 0: [ReturnStmt] return ...
|
||||
# 45| 0: [MethodAccess] testExtensionFunction$default(...)
|
||||
# 45| 0: [MethodCall] testExtensionFunction$default(...)
|
||||
# 45| -1: [TypeAccess] TestKt
|
||||
# 0| 0: [ExtensionReceiverAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -103,7 +103,7 @@ test.kt:
|
||||
# 45| 1: [ExprStmt] <Expr>;
|
||||
# 45| 0: [AssignExpr] ...=...
|
||||
# 45| 0: [VarAccess] p2
|
||||
# 45| 1: [MethodAccess] getString(...)
|
||||
# 45| 1: [MethodCall] getString(...)
|
||||
# 45| -1: [TypeAccess] TestKt
|
||||
# 45| 1: [IfStmt] if (...)
|
||||
# 45| 0: [EQExpr] ... == ...
|
||||
@@ -116,7 +116,7 @@ test.kt:
|
||||
# 45| 0: [VarAccess] p4
|
||||
# 45| 1: [FloatLiteral] 1.0
|
||||
# 45| 2: [ReturnStmt] return ...
|
||||
# 45| 0: [MethodAccess] testExtensionFunction(...)
|
||||
# 45| 0: [MethodCall] testExtensionFunction(...)
|
||||
# 45| -1: [TypeAccess] TestKt
|
||||
# 45| 0: [ExtensionReceiverAccess] this
|
||||
# 45| 1: [VarAccess] p1
|
||||
@@ -142,7 +142,7 @@ test.kt:
|
||||
# 6| 0: [TypeAccess] boolean
|
||||
# 6| 5: [BlockStmt] { ... }
|
||||
# 6| 0: [ReturnStmt] return ...
|
||||
# 6| 0: [MethodAccess] testStaticFunction$default(...)
|
||||
# 6| 0: [MethodCall] testStaticFunction$default(...)
|
||||
# 6| -1: [TypeAccess] Test
|
||||
# 0| 0: [VarAccess] a
|
||||
# 0| 1: [VarAccess] b
|
||||
@@ -181,7 +181,7 @@ test.kt:
|
||||
# 6| 0: [TypeAccess] boolean
|
||||
# 6| 5: [BlockStmt] { ... }
|
||||
# 6| 0: [ReturnStmt] return ...
|
||||
# 6| 0: [MethodAccess] testStaticFunction$default(...)
|
||||
# 6| 0: [MethodCall] testStaticFunction$default(...)
|
||||
# 6| -1: [TypeAccess] Test
|
||||
# 0| 0: [VarAccess] a
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -217,7 +217,7 @@ test.kt:
|
||||
# 6| 1: [ExprStmt] <Expr>;
|
||||
# 6| 0: [AssignExpr] ...=...
|
||||
# 6| 0: [VarAccess] p1
|
||||
# 6| 1: [MethodAccess] getString(...)
|
||||
# 6| 1: [MethodCall] getString(...)
|
||||
# 6| -1: [TypeAccess] TestKt
|
||||
# 6| 1: [IfStmt] if (...)
|
||||
# 6| 0: [EQExpr] ... == ...
|
||||
@@ -230,7 +230,7 @@ test.kt:
|
||||
# 6| 0: [VarAccess] p3
|
||||
# 6| 1: [FloatLiteral] 1.0
|
||||
# 6| 2: [ReturnStmt] return ...
|
||||
# 6| 0: [MethodAccess] testStaticFunction(...)
|
||||
# 6| 0: [MethodCall] testStaticFunction(...)
|
||||
# 6| -1: [TypeAccess] Test
|
||||
# 6| 0: [VarAccess] p0
|
||||
# 6| 1: [VarAccess] p1
|
||||
@@ -250,7 +250,7 @@ test.kt:
|
||||
# 9| 0: [TypeAccess] boolean
|
||||
# 9| 5: [BlockStmt] { ... }
|
||||
# 9| 0: [ReturnStmt] return ...
|
||||
# 9| 0: [MethodAccess] testMemberFunction$default(...)
|
||||
# 9| 0: [MethodCall] testMemberFunction$default(...)
|
||||
# 9| -1: [TypeAccess] Test
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -289,7 +289,7 @@ test.kt:
|
||||
# 9| 0: [TypeAccess] boolean
|
||||
# 9| 5: [BlockStmt] { ... }
|
||||
# 9| 0: [ReturnStmt] return ...
|
||||
# 9| 0: [MethodAccess] testMemberFunction$default(...)
|
||||
# 9| 0: [MethodCall] testMemberFunction$default(...)
|
||||
# 9| -1: [TypeAccess] Test
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -328,7 +328,7 @@ test.kt:
|
||||
# 9| 1: [ExprStmt] <Expr>;
|
||||
# 9| 0: [AssignExpr] ...=...
|
||||
# 9| 0: [VarAccess] p2
|
||||
# 9| 1: [MethodAccess] getString(...)
|
||||
# 9| 1: [MethodCall] getString(...)
|
||||
# 9| -1: [TypeAccess] TestKt
|
||||
# 9| 1: [IfStmt] if (...)
|
||||
# 9| 0: [EQExpr] ... == ...
|
||||
@@ -341,7 +341,7 @@ test.kt:
|
||||
# 9| 0: [VarAccess] p4
|
||||
# 9| 1: [FloatLiteral] 1.0
|
||||
# 9| 2: [ReturnStmt] return ...
|
||||
# 9| 0: [MethodAccess] testMemberFunction(...)
|
||||
# 9| 0: [MethodCall] testMemberFunction(...)
|
||||
# 9| -1: [VarAccess] p0
|
||||
# 9| 0: [VarAccess] p1
|
||||
# 9| 1: [VarAccess] p2
|
||||
@@ -363,7 +363,7 @@ test.kt:
|
||||
# 12| 0: [TypeAccess] boolean
|
||||
# 12| 5: [BlockStmt] { ... }
|
||||
# 12| 0: [ReturnStmt] return ...
|
||||
# 12| 0: [MethodAccess] testMemberExtensionFunction$default(...)
|
||||
# 12| 0: [MethodCall] testMemberExtensionFunction$default(...)
|
||||
# 12| -1: [TypeAccess] Test
|
||||
# 0| 0: [ThisAccess] Test.this
|
||||
# 0| 0: [TypeAccess] Test
|
||||
@@ -408,7 +408,7 @@ test.kt:
|
||||
# 12| 0: [TypeAccess] boolean
|
||||
# 12| 5: [BlockStmt] { ... }
|
||||
# 12| 0: [ReturnStmt] return ...
|
||||
# 12| 0: [MethodAccess] testMemberExtensionFunction$default(...)
|
||||
# 12| 0: [MethodCall] testMemberExtensionFunction$default(...)
|
||||
# 12| -1: [TypeAccess] Test
|
||||
# 0| 0: [ThisAccess] Test.this
|
||||
# 0| 0: [TypeAccess] Test
|
||||
@@ -451,7 +451,7 @@ test.kt:
|
||||
# 12| 1: [ExprStmt] <Expr>;
|
||||
# 12| 0: [AssignExpr] ...=...
|
||||
# 12| 0: [VarAccess] p3
|
||||
# 12| 1: [MethodAccess] getString(...)
|
||||
# 12| 1: [MethodCall] getString(...)
|
||||
# 12| -1: [TypeAccess] TestKt
|
||||
# 12| 1: [IfStmt] if (...)
|
||||
# 12| 0: [EQExpr] ... == ...
|
||||
@@ -464,7 +464,7 @@ test.kt:
|
||||
# 12| 0: [VarAccess] p5
|
||||
# 12| 1: [FloatLiteral] 1.0
|
||||
# 12| 2: [ReturnStmt] return ...
|
||||
# 12| 0: [MethodAccess] testMemberExtensionFunction(...)
|
||||
# 12| 0: [MethodCall] testMemberExtensionFunction(...)
|
||||
# 12| -1: [VarAccess] p0
|
||||
# 12| 0: [ExtensionReceiverAccess] this
|
||||
# 12| 1: [VarAccess] p2
|
||||
@@ -535,7 +535,7 @@ test.kt:
|
||||
# 16| 1: [ExprStmt] <Expr>;
|
||||
# 16| 0: [AssignExpr] ...=...
|
||||
# 16| 0: [VarAccess] p1
|
||||
# 16| 1: [MethodAccess] getString(...)
|
||||
# 16| 1: [MethodCall] getString(...)
|
||||
# 16| -1: [TypeAccess] TestKt
|
||||
# 16| 1: [IfStmt] if (...)
|
||||
# 16| 0: [EQExpr] ... == ...
|
||||
@@ -588,7 +588,7 @@ test.kt:
|
||||
# 21| 0: [TypeAccess] boolean
|
||||
# 21| 5: [BlockStmt] { ... }
|
||||
# 21| 0: [ReturnStmt] return ...
|
||||
# 21| 0: [MethodAccess] testCompanionFunction$default(...)
|
||||
# 21| 0: [MethodCall] testCompanionFunction$default(...)
|
||||
# 21| -1: [TypeAccess] Companion
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -627,7 +627,7 @@ test.kt:
|
||||
# 21| 0: [TypeAccess] boolean
|
||||
# 21| 5: [BlockStmt] { ... }
|
||||
# 21| 0: [ReturnStmt] return ...
|
||||
# 21| 0: [MethodAccess] testCompanionFunction$default(...)
|
||||
# 21| 0: [MethodCall] testCompanionFunction$default(...)
|
||||
# 21| -1: [TypeAccess] Companion
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -666,7 +666,7 @@ test.kt:
|
||||
# 21| 1: [ExprStmt] <Expr>;
|
||||
# 21| 0: [AssignExpr] ...=...
|
||||
# 21| 0: [VarAccess] p2
|
||||
# 21| 1: [MethodAccess] getString(...)
|
||||
# 21| 1: [MethodCall] getString(...)
|
||||
# 21| -1: [TypeAccess] TestKt
|
||||
# 21| 1: [IfStmt] if (...)
|
||||
# 21| 0: [EQExpr] ... == ...
|
||||
@@ -679,7 +679,7 @@ test.kt:
|
||||
# 21| 0: [VarAccess] p4
|
||||
# 21| 1: [FloatLiteral] 1.0
|
||||
# 21| 2: [ReturnStmt] return ...
|
||||
# 21| 0: [MethodAccess] testCompanionFunction(...)
|
||||
# 21| 0: [MethodCall] testCompanionFunction(...)
|
||||
# 21| -1: [VarAccess] p0
|
||||
# 21| 0: [VarAccess] p1
|
||||
# 21| 1: [VarAccess] p2
|
||||
@@ -699,7 +699,7 @@ test.kt:
|
||||
# 24| 0: [TypeAccess] boolean
|
||||
# 24| 5: [BlockStmt] { ... }
|
||||
# 24| 0: [ReturnStmt] return ...
|
||||
# 24| 0: [MethodAccess] testStaticCompanionFunction$default(...)
|
||||
# 24| 0: [MethodCall] testStaticCompanionFunction$default(...)
|
||||
# 24| -1: [TypeAccess] Companion
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -739,7 +739,7 @@ test.kt:
|
||||
# 24| 0: [TypeAccess] boolean
|
||||
# 24| 5: [BlockStmt] { ... }
|
||||
# 24| 0: [ReturnStmt] return ...
|
||||
# 24| 0: [MethodAccess] testStaticCompanionFunction$default(...)
|
||||
# 24| 0: [MethodCall] testStaticCompanionFunction$default(...)
|
||||
# 24| -1: [TypeAccess] Companion
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -778,7 +778,7 @@ test.kt:
|
||||
# 24| 1: [ExprStmt] <Expr>;
|
||||
# 24| 0: [AssignExpr] ...=...
|
||||
# 24| 0: [VarAccess] p2
|
||||
# 24| 1: [MethodAccess] getString(...)
|
||||
# 24| 1: [MethodCall] getString(...)
|
||||
# 24| -1: [TypeAccess] TestKt
|
||||
# 24| 1: [IfStmt] if (...)
|
||||
# 24| 0: [EQExpr] ... == ...
|
||||
@@ -791,7 +791,7 @@ test.kt:
|
||||
# 24| 0: [VarAccess] p4
|
||||
# 24| 1: [FloatLiteral] 1.0
|
||||
# 24| 2: [ReturnStmt] return ...
|
||||
# 24| 0: [MethodAccess] testStaticCompanionFunction(...)
|
||||
# 24| 0: [MethodCall] testStaticCompanionFunction(...)
|
||||
# 24| -1: [VarAccess] p0
|
||||
# 24| 0: [VarAccess] p1
|
||||
# 24| 1: [VarAccess] p2
|
||||
@@ -811,7 +811,7 @@ test.kt:
|
||||
# 24| 0: [TypeAccess] boolean
|
||||
# 24| 5: [BlockStmt] { ... }
|
||||
# 24| 0: [ReturnStmt] return ...
|
||||
# 24| 0: [MethodAccess] testStaticCompanionFunction$default(...)
|
||||
# 24| 0: [MethodCall] testStaticCompanionFunction$default(...)
|
||||
# 24| -1: [TypeAccess] Companion
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -836,7 +836,7 @@ test.kt:
|
||||
# 24| 0: [TypeAccess] boolean
|
||||
# 24| 5: [BlockStmt] { ... }
|
||||
# 24| 0: [ReturnStmt] return ...
|
||||
# 24| 0: [MethodAccess] testStaticCompanionFunction(...)
|
||||
# 24| 0: [MethodCall] testStaticCompanionFunction(...)
|
||||
# 24| -1: [VarAccess] Test2.Companion
|
||||
# 24| -1: [TypeAccess] Test2
|
||||
# 24| 0: [VarAccess] a
|
||||
@@ -855,7 +855,7 @@ test.kt:
|
||||
# 24| 0: [TypeAccess] boolean
|
||||
# 24| 5: [BlockStmt] { ... }
|
||||
# 24| 0: [ReturnStmt] return ...
|
||||
# 24| 0: [MethodAccess] testStaticCompanionFunction$default(...)
|
||||
# 24| 0: [MethodCall] testStaticCompanionFunction$default(...)
|
||||
# 24| -1: [TypeAccess] Companion
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -962,7 +962,7 @@ test.kt:
|
||||
# 33| 0: [TypeAccess] T
|
||||
# 33| 5: [BlockStmt] { ... }
|
||||
# 33| 0: [ReturnStmt] return ...
|
||||
# 33| 0: [MethodAccess] testMemberFunction$default(...)
|
||||
# 33| 0: [MethodCall] testMemberFunction$default(...)
|
||||
# 33| -1: [TypeAccess] GenericTest<>
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 1| 1: [IntegerLiteral] 0
|
||||
@@ -998,7 +998,7 @@ test.kt:
|
||||
# 33| 0: [TypeAccess] T
|
||||
# 33| 5: [BlockStmt] { ... }
|
||||
# 33| 0: [ReturnStmt] return ...
|
||||
# 33| 0: [MethodAccess] testMemberFunction$default(...)
|
||||
# 33| 0: [MethodCall] testMemberFunction$default(...)
|
||||
# 33| -1: [TypeAccess] GenericTest<>
|
||||
# 0| 0: [ThisAccess] this
|
||||
# 0| 1: [VarAccess] a
|
||||
@@ -1046,7 +1046,7 @@ test.kt:
|
||||
# 33| 0: [VarAccess] p3
|
||||
# 33| 1: [StringLiteral] "Hello world"
|
||||
# 33| 2: [ReturnStmt] return ...
|
||||
# 33| 0: [MethodAccess] testMemberFunction(...)
|
||||
# 33| 0: [MethodCall] testMemberFunction(...)
|
||||
# 33| -1: [VarAccess] p0
|
||||
# 33| 0: [VarAccess] p1
|
||||
# 33| 1: [VarAccess] p2
|
||||
@@ -1065,7 +1065,7 @@ test.kt:
|
||||
# 37| 0: [ExprStmt] <Expr>;
|
||||
# 37| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 37| 0: [TypeAccess] Unit
|
||||
# 37| 1: [MethodAccess] testMemberFunction(...)
|
||||
# 37| 1: [MethodCall] testMemberFunction(...)
|
||||
# 37| -1: [VarAccess] spec1
|
||||
# 37| 0: [IntegerLiteral] 1
|
||||
# 37| 1: [FloatLiteral] 1.0
|
||||
@@ -1074,7 +1074,7 @@ test.kt:
|
||||
# 38| 1: [ExprStmt] <Expr>;
|
||||
# 38| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 38| 0: [TypeAccess] Unit
|
||||
# 38| 1: [MethodAccess] testMemberFunction(...)
|
||||
# 38| 1: [MethodCall] testMemberFunction(...)
|
||||
# 38| -1: [VarAccess] spec2
|
||||
# 38| 0: [IntegerLiteral] 1
|
||||
# 38| 1: [DoubleLiteral] 1.0
|
||||
|
||||
@@ -2,9 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) {
|
||||
n.asExpr().(MethodAccess).getCallee().getName() = "source"
|
||||
}
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getCallee().getName() = "source" }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
n.asExpr().(Argument).getCall().getCallee().getName() = "sink"
|
||||
|
||||
@@ -5,70 +5,70 @@ JavaUser.java:
|
||||
# 3| 3: [TypeAccess] void
|
||||
# 3| 5: [BlockStmt] { ... }
|
||||
# 5| 0: [ExprStmt] <Expr>;
|
||||
# 5| 0: [MethodAccess] staticMethod(...)
|
||||
# 5| 0: [MethodCall] staticMethod(...)
|
||||
# 5| -1: [TypeAccess] HasCompanion
|
||||
# 5| 0: [StringLiteral] "1"
|
||||
# 6| 1: [ExprStmt] <Expr>;
|
||||
# 6| 0: [MethodAccess] nonStaticMethod(...)
|
||||
# 6| 0: [MethodCall] nonStaticMethod(...)
|
||||
# 6| -1: [VarAccess] HasCompanion.Companion
|
||||
# 6| -1: [TypeAccess] HasCompanion
|
||||
# 6| 0: [StringLiteral] "2"
|
||||
# 7| 2: [ExprStmt] <Expr>;
|
||||
# 7| 0: [MethodAccess] setStaticProp(...)
|
||||
# 7| 0: [MethodCall] setStaticProp(...)
|
||||
# 7| -1: [TypeAccess] HasCompanion
|
||||
# 7| 0: [MethodAccess] getNonStaticProp(...)
|
||||
# 7| 0: [MethodCall] getNonStaticProp(...)
|
||||
# 7| -1: [VarAccess] HasCompanion.Companion
|
||||
# 7| -1: [TypeAccess] HasCompanion
|
||||
# 8| 3: [ExprStmt] <Expr>;
|
||||
# 8| 0: [MethodAccess] setNonStaticProp(...)
|
||||
# 8| 0: [MethodCall] setNonStaticProp(...)
|
||||
# 8| -1: [VarAccess] HasCompanion.Companion
|
||||
# 8| -1: [TypeAccess] HasCompanion
|
||||
# 8| 0: [MethodAccess] getStaticProp(...)
|
||||
# 8| 0: [MethodCall] getStaticProp(...)
|
||||
# 8| -1: [TypeAccess] HasCompanion
|
||||
# 9| 4: [ExprStmt] <Expr>;
|
||||
# 9| 0: [MethodAccess] setPropWithStaticGetter(...)
|
||||
# 9| 0: [MethodCall] setPropWithStaticGetter(...)
|
||||
# 9| -1: [VarAccess] HasCompanion.Companion
|
||||
# 9| -1: [TypeAccess] HasCompanion
|
||||
# 9| 0: [MethodAccess] getPropWithStaticSetter(...)
|
||||
# 9| 0: [MethodCall] getPropWithStaticSetter(...)
|
||||
# 9| -1: [VarAccess] HasCompanion.Companion
|
||||
# 9| -1: [TypeAccess] HasCompanion
|
||||
# 10| 5: [ExprStmt] <Expr>;
|
||||
# 10| 0: [MethodAccess] setPropWithStaticSetter(...)
|
||||
# 10| 0: [MethodCall] setPropWithStaticSetter(...)
|
||||
# 10| -1: [TypeAccess] HasCompanion
|
||||
# 10| 0: [MethodAccess] getPropWithStaticGetter(...)
|
||||
# 10| 0: [MethodCall] getPropWithStaticGetter(...)
|
||||
# 10| -1: [TypeAccess] HasCompanion
|
||||
# 13| 6: [ExprStmt] <Expr>;
|
||||
# 13| 0: [MethodAccess] staticMethod(...)
|
||||
# 13| 0: [MethodCall] staticMethod(...)
|
||||
# 13| -1: [TypeAccess] NonCompanion
|
||||
# 13| 0: [StringLiteral] "1"
|
||||
# 14| 7: [ExprStmt] <Expr>;
|
||||
# 14| 0: [MethodAccess] nonStaticMethod(...)
|
||||
# 14| 0: [MethodCall] nonStaticMethod(...)
|
||||
# 14| -1: [VarAccess] NonCompanion.INSTANCE
|
||||
# 14| -1: [TypeAccess] NonCompanion
|
||||
# 14| 0: [StringLiteral] "2"
|
||||
# 15| 8: [ExprStmt] <Expr>;
|
||||
# 15| 0: [MethodAccess] setStaticProp(...)
|
||||
# 15| 0: [MethodCall] setStaticProp(...)
|
||||
# 15| -1: [TypeAccess] NonCompanion
|
||||
# 15| 0: [MethodAccess] getNonStaticProp(...)
|
||||
# 15| 0: [MethodCall] getNonStaticProp(...)
|
||||
# 15| -1: [VarAccess] NonCompanion.INSTANCE
|
||||
# 15| -1: [TypeAccess] NonCompanion
|
||||
# 16| 9: [ExprStmt] <Expr>;
|
||||
# 16| 0: [MethodAccess] setNonStaticProp(...)
|
||||
# 16| 0: [MethodCall] setNonStaticProp(...)
|
||||
# 16| -1: [VarAccess] NonCompanion.INSTANCE
|
||||
# 16| -1: [TypeAccess] NonCompanion
|
||||
# 16| 0: [MethodAccess] getStaticProp(...)
|
||||
# 16| 0: [MethodCall] getStaticProp(...)
|
||||
# 16| -1: [TypeAccess] NonCompanion
|
||||
# 17| 10: [ExprStmt] <Expr>;
|
||||
# 17| 0: [MethodAccess] setPropWithStaticGetter(...)
|
||||
# 17| 0: [MethodCall] setPropWithStaticGetter(...)
|
||||
# 17| -1: [VarAccess] NonCompanion.INSTANCE
|
||||
# 17| -1: [TypeAccess] NonCompanion
|
||||
# 17| 0: [MethodAccess] getPropWithStaticSetter(...)
|
||||
# 17| 0: [MethodCall] getPropWithStaticSetter(...)
|
||||
# 17| -1: [VarAccess] NonCompanion.INSTANCE
|
||||
# 17| -1: [TypeAccess] NonCompanion
|
||||
# 18| 11: [ExprStmt] <Expr>;
|
||||
# 18| 0: [MethodAccess] setPropWithStaticSetter(...)
|
||||
# 18| 0: [MethodCall] setPropWithStaticSetter(...)
|
||||
# 18| -1: [TypeAccess] NonCompanion
|
||||
# 18| 0: [MethodAccess] getPropWithStaticGetter(...)
|
||||
# 18| 0: [MethodCall] getPropWithStaticGetter(...)
|
||||
# 18| -1: [TypeAccess] NonCompanion
|
||||
test.kt:
|
||||
# 0| [CompilationUnit] test
|
||||
@@ -79,66 +79,66 @@ test.kt:
|
||||
# 52| 0: [ExprStmt] <Expr>;
|
||||
# 52| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 52| 0: [TypeAccess] Unit
|
||||
# 52| 1: [MethodAccess] staticMethod(...)
|
||||
# 52| 1: [MethodCall] staticMethod(...)
|
||||
# 52| -1: [VarAccess] Companion
|
||||
# 52| 0: [StringLiteral] "1"
|
||||
# 53| 1: [ExprStmt] <Expr>;
|
||||
# 53| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 53| 0: [TypeAccess] Unit
|
||||
# 53| 1: [MethodAccess] nonStaticMethod(...)
|
||||
# 53| 1: [MethodCall] nonStaticMethod(...)
|
||||
# 53| -1: [VarAccess] Companion
|
||||
# 53| 0: [StringLiteral] "2"
|
||||
# 54| 2: [ExprStmt] <Expr>;
|
||||
# 54| 0: [MethodAccess] setStaticProp(...)
|
||||
# 54| 0: [MethodCall] setStaticProp(...)
|
||||
# 54| -1: [VarAccess] Companion
|
||||
# 54| 0: [MethodAccess] getNonStaticProp(...)
|
||||
# 54| 0: [MethodCall] getNonStaticProp(...)
|
||||
# 54| -1: [VarAccess] Companion
|
||||
# 55| 3: [ExprStmt] <Expr>;
|
||||
# 55| 0: [MethodAccess] setNonStaticProp(...)
|
||||
# 55| 0: [MethodCall] setNonStaticProp(...)
|
||||
# 55| -1: [VarAccess] Companion
|
||||
# 55| 0: [MethodAccess] getStaticProp(...)
|
||||
# 55| 0: [MethodCall] getStaticProp(...)
|
||||
# 55| -1: [VarAccess] Companion
|
||||
# 56| 4: [ExprStmt] <Expr>;
|
||||
# 56| 0: [MethodAccess] setPropWithStaticGetter(...)
|
||||
# 56| 0: [MethodCall] setPropWithStaticGetter(...)
|
||||
# 56| -1: [VarAccess] Companion
|
||||
# 56| 0: [MethodAccess] getPropWithStaticSetter(...)
|
||||
# 56| 0: [MethodCall] getPropWithStaticSetter(...)
|
||||
# 56| -1: [VarAccess] Companion
|
||||
# 57| 5: [ExprStmt] <Expr>;
|
||||
# 57| 0: [MethodAccess] setPropWithStaticSetter(...)
|
||||
# 57| 0: [MethodCall] setPropWithStaticSetter(...)
|
||||
# 57| -1: [VarAccess] Companion
|
||||
# 57| 0: [MethodAccess] getPropWithStaticGetter(...)
|
||||
# 57| 0: [MethodCall] getPropWithStaticGetter(...)
|
||||
# 57| -1: [VarAccess] Companion
|
||||
# 60| 6: [ExprStmt] <Expr>;
|
||||
# 60| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 60| 0: [TypeAccess] Unit
|
||||
# 60| 1: [MethodAccess] staticMethod(...)
|
||||
# 60| 1: [MethodCall] staticMethod(...)
|
||||
# 60| -1: [TypeAccess] NonCompanion
|
||||
# 60| 0: [StringLiteral] "1"
|
||||
# 61| 7: [ExprStmt] <Expr>;
|
||||
# 61| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 61| 0: [TypeAccess] Unit
|
||||
# 61| 1: [MethodAccess] nonStaticMethod(...)
|
||||
# 61| 1: [MethodCall] nonStaticMethod(...)
|
||||
# 61| -1: [VarAccess] INSTANCE
|
||||
# 61| 0: [StringLiteral] "2"
|
||||
# 62| 8: [ExprStmt] <Expr>;
|
||||
# 62| 0: [MethodAccess] setStaticProp(...)
|
||||
# 62| 0: [MethodCall] setStaticProp(...)
|
||||
# 62| -1: [TypeAccess] NonCompanion
|
||||
# 62| 0: [MethodAccess] getNonStaticProp(...)
|
||||
# 62| 0: [MethodCall] getNonStaticProp(...)
|
||||
# 62| -1: [VarAccess] INSTANCE
|
||||
# 63| 9: [ExprStmt] <Expr>;
|
||||
# 63| 0: [MethodAccess] setNonStaticProp(...)
|
||||
# 63| 0: [MethodCall] setNonStaticProp(...)
|
||||
# 63| -1: [VarAccess] INSTANCE
|
||||
# 63| 0: [MethodAccess] getStaticProp(...)
|
||||
# 63| 0: [MethodCall] getStaticProp(...)
|
||||
# 63| -1: [TypeAccess] NonCompanion
|
||||
# 64| 10: [ExprStmt] <Expr>;
|
||||
# 64| 0: [MethodAccess] setPropWithStaticGetter(...)
|
||||
# 64| 0: [MethodCall] setPropWithStaticGetter(...)
|
||||
# 64| -1: [VarAccess] INSTANCE
|
||||
# 64| 0: [MethodAccess] getPropWithStaticSetter(...)
|
||||
# 64| 0: [MethodCall] getPropWithStaticSetter(...)
|
||||
# 64| -1: [VarAccess] INSTANCE
|
||||
# 65| 11: [ExprStmt] <Expr>;
|
||||
# 65| 0: [MethodAccess] setPropWithStaticSetter(...)
|
||||
# 65| 0: [MethodCall] setPropWithStaticSetter(...)
|
||||
# 65| -1: [TypeAccess] NonCompanion
|
||||
# 65| 0: [MethodAccess] getPropWithStaticGetter(...)
|
||||
# 65| 0: [MethodCall] getPropWithStaticGetter(...)
|
||||
# 65| -1: [TypeAccess] NonCompanion
|
||||
# 9| 2: [Class] HasCompanion
|
||||
# 9| 1: [Constructor] HasCompanion
|
||||
@@ -165,7 +165,7 @@ test.kt:
|
||||
# 13| 0: [TypeAccess] String
|
||||
# 13| 5: [BlockStmt] { ... }
|
||||
# 13| 0: [ReturnStmt] return ...
|
||||
# 13| 0: [MethodAccess] nonStaticMethod(...)
|
||||
# 13| 0: [MethodCall] nonStaticMethod(...)
|
||||
# 13| -1: [ThisAccess] this
|
||||
# 13| 0: [VarAccess] s
|
||||
# 14| 3: [Method] nonStaticMethod
|
||||
@@ -175,7 +175,7 @@ test.kt:
|
||||
# 14| 0: [TypeAccess] String
|
||||
# 14| 5: [BlockStmt] { ... }
|
||||
# 14| 0: [ReturnStmt] return ...
|
||||
# 14| 0: [MethodAccess] staticMethod(...)
|
||||
# 14| 0: [MethodCall] staticMethod(...)
|
||||
# 14| -1: [ThisAccess] this
|
||||
# 14| 0: [VarAccess] s
|
||||
# 16| 4: [FieldDeclaration] String staticProp;
|
||||
@@ -224,7 +224,7 @@ test.kt:
|
||||
# 20| 3: [TypeAccess] String
|
||||
# 20| 5: [BlockStmt] { ... }
|
||||
# 20| 0: [ReturnStmt] return ...
|
||||
# 20| 0: [MethodAccess] getPropWithStaticSetter(...)
|
||||
# 20| 0: [MethodCall] getPropWithStaticSetter(...)
|
||||
# 20| -1: [ThisAccess] this
|
||||
# 21| 11: [Method] setPropWithStaticGetter
|
||||
# 21| 3: [TypeAccess] Unit
|
||||
@@ -233,14 +233,14 @@ test.kt:
|
||||
# 21| 0: [TypeAccess] String
|
||||
# 21| 5: [BlockStmt] { ... }
|
||||
# 21| 0: [ExprStmt] <Expr>;
|
||||
# 21| 0: [MethodAccess] setPropWithStaticSetter(...)
|
||||
# 21| 0: [MethodCall] setPropWithStaticSetter(...)
|
||||
# 21| -1: [ThisAccess] this
|
||||
# 21| 0: [VarAccess] s
|
||||
# 24| 12: [Method] getPropWithStaticSetter
|
||||
# 24| 3: [TypeAccess] String
|
||||
# 24| 5: [BlockStmt] { ... }
|
||||
# 24| 0: [ReturnStmt] return ...
|
||||
# 24| 0: [MethodAccess] getPropWithStaticGetter(...)
|
||||
# 24| 0: [MethodCall] getPropWithStaticGetter(...)
|
||||
# 24| -1: [ThisAccess] this
|
||||
# 25| 13: [Method] setPropWithStaticSetter
|
||||
#-----| 1: (Annotations)
|
||||
@@ -251,7 +251,7 @@ test.kt:
|
||||
# 25| 0: [TypeAccess] String
|
||||
# 25| 5: [BlockStmt] { ... }
|
||||
# 25| 0: [ExprStmt] <Expr>;
|
||||
# 25| 0: [MethodAccess] setPropWithStaticGetter(...)
|
||||
# 25| 0: [MethodCall] setPropWithStaticGetter(...)
|
||||
# 25| -1: [ThisAccess] this
|
||||
# 25| 0: [VarAccess] s
|
||||
# 13| 3: [Method] staticMethod
|
||||
@@ -261,7 +261,7 @@ test.kt:
|
||||
# 13| 0: [TypeAccess] String
|
||||
# 13| 5: [BlockStmt] { ... }
|
||||
# 13| 0: [ReturnStmt] return ...
|
||||
# 13| 0: [MethodAccess] staticMethod(...)
|
||||
# 13| 0: [MethodCall] staticMethod(...)
|
||||
# 13| -1: [VarAccess] HasCompanion.Companion
|
||||
# 13| -1: [TypeAccess] HasCompanion
|
||||
# 13| 0: [VarAccess] s
|
||||
@@ -269,7 +269,7 @@ test.kt:
|
||||
# 16| 3: [TypeAccess] String
|
||||
# 16| 5: [BlockStmt] { ... }
|
||||
# 16| 0: [ReturnStmt] return ...
|
||||
# 16| 0: [MethodAccess] getStaticProp(...)
|
||||
# 16| 0: [MethodCall] getStaticProp(...)
|
||||
# 16| -1: [VarAccess] HasCompanion.Companion
|
||||
# 16| -1: [TypeAccess] HasCompanion
|
||||
# 16| 5: [Method] setStaticProp
|
||||
@@ -279,7 +279,7 @@ test.kt:
|
||||
# 16| 0: [TypeAccess] String
|
||||
# 16| 5: [BlockStmt] { ... }
|
||||
# 16| 0: [ReturnStmt] return ...
|
||||
# 16| 0: [MethodAccess] setStaticProp(...)
|
||||
# 16| 0: [MethodCall] setStaticProp(...)
|
||||
# 16| -1: [VarAccess] HasCompanion.Companion
|
||||
# 16| -1: [TypeAccess] HasCompanion
|
||||
# 16| 0: [VarAccess] <set-?>
|
||||
@@ -287,7 +287,7 @@ test.kt:
|
||||
# 20| 3: [TypeAccess] String
|
||||
# 20| 5: [BlockStmt] { ... }
|
||||
# 20| 0: [ReturnStmt] return ...
|
||||
# 20| 0: [MethodAccess] getPropWithStaticGetter(...)
|
||||
# 20| 0: [MethodCall] getPropWithStaticGetter(...)
|
||||
# 20| -1: [VarAccess] HasCompanion.Companion
|
||||
# 20| -1: [TypeAccess] HasCompanion
|
||||
# 25| 7: [Method] setPropWithStaticSetter
|
||||
@@ -297,7 +297,7 @@ test.kt:
|
||||
# 25| 0: [TypeAccess] String
|
||||
# 25| 5: [BlockStmt] { ... }
|
||||
# 25| 0: [ReturnStmt] return ...
|
||||
# 25| 0: [MethodAccess] setPropWithStaticSetter(...)
|
||||
# 25| 0: [MethodCall] setPropWithStaticSetter(...)
|
||||
# 25| -1: [VarAccess] HasCompanion.Companion
|
||||
# 25| -1: [TypeAccess] HasCompanion
|
||||
# 25| 0: [VarAccess] s
|
||||
@@ -321,7 +321,7 @@ test.kt:
|
||||
# 33| 0: [TypeAccess] String
|
||||
# 33| 5: [BlockStmt] { ... }
|
||||
# 33| 0: [ReturnStmt] return ...
|
||||
# 33| 0: [MethodAccess] nonStaticMethod(...)
|
||||
# 33| 0: [MethodCall] nonStaticMethod(...)
|
||||
# 33| -1: [VarAccess] NonCompanion.INSTANCE
|
||||
# 33| -1: [TypeAccess] NonCompanion
|
||||
# 33| 0: [VarAccess] s
|
||||
@@ -332,7 +332,7 @@ test.kt:
|
||||
# 34| 0: [TypeAccess] String
|
||||
# 34| 5: [BlockStmt] { ... }
|
||||
# 34| 0: [ReturnStmt] return ...
|
||||
# 34| 0: [MethodAccess] staticMethod(...)
|
||||
# 34| 0: [MethodCall] staticMethod(...)
|
||||
# 34| -1: [TypeAccess] NonCompanion
|
||||
# 34| 0: [VarAccess] s
|
||||
# 36| 4: [FieldDeclaration] String staticProp;
|
||||
@@ -383,7 +383,7 @@ test.kt:
|
||||
# 40| 3: [TypeAccess] String
|
||||
# 40| 5: [BlockStmt] { ... }
|
||||
# 40| 0: [ReturnStmt] return ...
|
||||
# 40| 0: [MethodAccess] getPropWithStaticSetter(...)
|
||||
# 40| 0: [MethodCall] getPropWithStaticSetter(...)
|
||||
# 40| -1: [VarAccess] NonCompanion.INSTANCE
|
||||
# 40| -1: [TypeAccess] NonCompanion
|
||||
# 41| 11: [Method] setPropWithStaticGetter
|
||||
@@ -393,14 +393,14 @@ test.kt:
|
||||
# 41| 0: [TypeAccess] String
|
||||
# 41| 5: [BlockStmt] { ... }
|
||||
# 41| 0: [ExprStmt] <Expr>;
|
||||
# 41| 0: [MethodAccess] setPropWithStaticSetter(...)
|
||||
# 41| 0: [MethodCall] setPropWithStaticSetter(...)
|
||||
# 41| -1: [TypeAccess] NonCompanion
|
||||
# 41| 0: [VarAccess] s
|
||||
# 44| 12: [Method] getPropWithStaticSetter
|
||||
# 44| 3: [TypeAccess] String
|
||||
# 44| 5: [BlockStmt] { ... }
|
||||
# 44| 0: [ReturnStmt] return ...
|
||||
# 44| 0: [MethodAccess] getPropWithStaticGetter(...)
|
||||
# 44| 0: [MethodCall] getPropWithStaticGetter(...)
|
||||
# 44| -1: [TypeAccess] NonCompanion
|
||||
# 45| 13: [Method] setPropWithStaticSetter
|
||||
#-----| 1: (Annotations)
|
||||
@@ -411,7 +411,7 @@ test.kt:
|
||||
# 45| 0: [TypeAccess] String
|
||||
# 45| 5: [BlockStmt] { ... }
|
||||
# 45| 0: [ExprStmt] <Expr>;
|
||||
# 45| 0: [MethodAccess] setPropWithStaticGetter(...)
|
||||
# 45| 0: [MethodCall] setPropWithStaticGetter(...)
|
||||
# 45| -1: [VarAccess] NonCompanion.INSTANCE
|
||||
# 45| -1: [TypeAccess] NonCompanion
|
||||
# 45| 0: [VarAccess] s
|
||||
|
||||
@@ -28,7 +28,7 @@ test.kt:
|
||||
# 4| 3: [TypeAccess] Unit
|
||||
# 4| 5: [BlockStmt] { ... }
|
||||
# 4| 0: [ReturnStmt] return ...
|
||||
# 4| 0: [MethodAccess] println(...)
|
||||
# 4| 0: [MethodCall] println(...)
|
||||
# 4| -1: [TypeAccess] ConsoleKt
|
||||
# 4| 0: [StringLiteral] "a"
|
||||
# 6| 6: [Method] init
|
||||
@@ -41,13 +41,13 @@ test.kt:
|
||||
# 8| 3: [TypeAccess] Unit
|
||||
# 8| 5: [BlockStmt] { ... }
|
||||
# 9| 0: [ExprStmt] <Expr>;
|
||||
# 9| 0: [MethodAccess] f(...)
|
||||
# 9| -1: [MethodAccess] getTest0$private(...)
|
||||
# 9| 0: [MethodCall] f(...)
|
||||
# 9| -1: [MethodCall] getTest0$private(...)
|
||||
# 9| -1: [ThisAccess] this
|
||||
# 10| 1: [ExprStmt] <Expr>;
|
||||
# 10| 0: [WhenExpr] when ...
|
||||
# 10| 0: [WhenBranch] ... -> ...
|
||||
# 10| 0: [MethodAccess] isInitialized(...)
|
||||
# 10| 0: [MethodCall] isInitialized(...)
|
||||
# 10| -1: [TypeAccess] LateinitKt
|
||||
# 10| 0: [PropertyRefExpr] ...::...
|
||||
# 10| -4: [AnonymousClass] new KMutableProperty0<LateInit>(...) { ... }
|
||||
@@ -66,20 +66,20 @@ test.kt:
|
||||
# 10| 3: [Method] get
|
||||
# 10| 5: [BlockStmt] { ... }
|
||||
# 10| 0: [ReturnStmt] return ...
|
||||
# 10| 0: [MethodAccess] getTest0$private(...)
|
||||
# 10| 0: [MethodCall] getTest0$private(...)
|
||||
# 10| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 10| -1: [ThisAccess] this
|
||||
# 10| 4: [Method] invoke
|
||||
# 10| 5: [BlockStmt] { ... }
|
||||
# 10| 0: [ReturnStmt] return ...
|
||||
# 10| 0: [MethodAccess] get(...)
|
||||
# 10| 0: [MethodCall] get(...)
|
||||
# 10| -1: [ThisAccess] this
|
||||
# 10| 5: [Method] set
|
||||
#-----| 4: (Parameters)
|
||||
# 10| 0: [Parameter] a0
|
||||
# 10| 5: [BlockStmt] { ... }
|
||||
# 10| 0: [ReturnStmt] return ...
|
||||
# 10| 0: [MethodAccess] setTest0$private(...)
|
||||
# 10| 0: [MethodCall] setTest0$private(...)
|
||||
# 10| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 10| -1: [ThisAccess] this
|
||||
# 10| 0: [VarAccess] a0
|
||||
@@ -90,5 +90,5 @@ test.kt:
|
||||
# 13| 2: [LocalVariableDeclStmt] var ...;
|
||||
# 13| 1: [LocalVariableDeclExpr] test1
|
||||
# 14| 3: [ExprStmt] <Expr>;
|
||||
# 14| 0: [MethodAccess] f(...)
|
||||
# 14| 0: [MethodCall] f(...)
|
||||
# 14| -1: [VarAccess] test1
|
||||
|
||||
@@ -10,4 +10,4 @@ class MethodLocation extends Method {
|
||||
}
|
||||
}
|
||||
|
||||
query predicate calls(MethodAccess ma, Method m) { ma.getMethod() = m }
|
||||
query predicate calls(MethodCall ma, Method m) { ma.getMethod() = m }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma, ma.getCallee().toString()
|
||||
|
||||
@@ -49,12 +49,12 @@
|
||||
| dataClass.kt:0:0:0:0 | String | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | String | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | boolean | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | copy(...) | MethodAccess |
|
||||
| dataClass.kt:0:0:0:0 | copy(...) | MethodCall |
|
||||
| dataClass.kt:0:0:0:0 | false | BooleanLiteral |
|
||||
| dataClass.kt:0:0:0:0 | false | BooleanLiteral |
|
||||
| dataClass.kt:0:0:0:0 | false | BooleanLiteral |
|
||||
| dataClass.kt:0:0:0:0 | hashCode(...) | MethodAccess |
|
||||
| dataClass.kt:0:0:0:0 | hashCode(...) | MethodAccess |
|
||||
| dataClass.kt:0:0:0:0 | hashCode(...) | MethodCall |
|
||||
| dataClass.kt:0:0:0:0 | hashCode(...) | MethodCall |
|
||||
| dataClass.kt:0:0:0:0 | int | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | int | TypeAccess |
|
||||
| dataClass.kt:0:0:0:0 | int | TypeAccess |
|
||||
@@ -146,9 +146,9 @@
|
||||
| delegates.kt:4:18:6:5 | MyClass | TypeAccess |
|
||||
| delegates.kt:4:18:6:5 | a0 | VarAccess |
|
||||
| delegates.kt:4:18:6:5 | a0 | VarAccess |
|
||||
| delegates.kt:4:18:6:5 | get(...) | MethodAccess |
|
||||
| delegates.kt:4:18:6:5 | getLazyProp(...) | MethodAccess |
|
||||
| delegates.kt:4:18:6:5 | getValue(...) | MethodAccess |
|
||||
| delegates.kt:4:18:6:5 | get(...) | MethodCall |
|
||||
| delegates.kt:4:18:6:5 | getLazyProp(...) | MethodCall |
|
||||
| delegates.kt:4:18:6:5 | getValue(...) | MethodCall |
|
||||
| delegates.kt:4:18:6:5 | int | TypeAccess |
|
||||
| delegates.kt:4:18:6:5 | lazyProp$delegate | VarAccess |
|
||||
| delegates.kt:4:18:6:5 | this | ThisAccess |
|
||||
@@ -156,7 +156,7 @@
|
||||
| delegates.kt:4:18:6:5 | this.lazyProp$delegate | VarAccess |
|
||||
| delegates.kt:4:21:6:5 | Integer | TypeAccess |
|
||||
| delegates.kt:4:21:6:5 | LazyKt | TypeAccess |
|
||||
| delegates.kt:4:21:6:5 | lazy(...) | MethodAccess |
|
||||
| delegates.kt:4:21:6:5 | lazy(...) | MethodCall |
|
||||
| delegates.kt:4:26:6:5 | ...->... | LambdaExpr |
|
||||
| delegates.kt:4:26:6:5 | Function0<Integer> | TypeAccess |
|
||||
| delegates.kt:4:26:6:5 | Integer | TypeAccess |
|
||||
@@ -185,15 +185,15 @@
|
||||
| delegates.kt:8:32:11:5 | a0 | VarAccess |
|
||||
| delegates.kt:8:32:11:5 | a1 | VarAccess |
|
||||
| delegates.kt:8:32:11:5 | a1 | VarAccess |
|
||||
| delegates.kt:8:32:11:5 | get(...) | MethodAccess |
|
||||
| delegates.kt:8:32:11:5 | get(...) | MethodAccess |
|
||||
| delegates.kt:8:32:11:5 | getObservableProp(...) | MethodAccess |
|
||||
| delegates.kt:8:32:11:5 | getObservableProp(...) | MethodAccess |
|
||||
| delegates.kt:8:32:11:5 | getValue(...) | MethodAccess |
|
||||
| delegates.kt:8:32:11:5 | get(...) | MethodCall |
|
||||
| delegates.kt:8:32:11:5 | get(...) | MethodCall |
|
||||
| delegates.kt:8:32:11:5 | getObservableProp(...) | MethodCall |
|
||||
| delegates.kt:8:32:11:5 | getObservableProp(...) | MethodCall |
|
||||
| delegates.kt:8:32:11:5 | getValue(...) | MethodCall |
|
||||
| delegates.kt:8:32:11:5 | observableProp$delegate | VarAccess |
|
||||
| delegates.kt:8:32:11:5 | setObservableProp(...) | MethodAccess |
|
||||
| delegates.kt:8:32:11:5 | setObservableProp(...) | MethodAccess |
|
||||
| delegates.kt:8:32:11:5 | setValue(...) | MethodAccess |
|
||||
| delegates.kt:8:32:11:5 | setObservableProp(...) | MethodCall |
|
||||
| delegates.kt:8:32:11:5 | setObservableProp(...) | MethodCall |
|
||||
| delegates.kt:8:32:11:5 | setValue(...) | MethodCall |
|
||||
| delegates.kt:8:32:11:5 | this | ThisAccess |
|
||||
| delegates.kt:8:32:11:5 | this | ThisAccess |
|
||||
| delegates.kt:8:32:11:5 | this | ThisAccess |
|
||||
@@ -203,7 +203,7 @@
|
||||
| delegates.kt:8:35:8:43 | INSTANCE | VarAccess |
|
||||
| delegates.kt:8:35:11:5 | <set-?> | VarAccess |
|
||||
| delegates.kt:8:35:11:5 | String | TypeAccess |
|
||||
| delegates.kt:8:35:11:5 | observable(...) | MethodAccess |
|
||||
| delegates.kt:8:35:11:5 | observable(...) | MethodCall |
|
||||
| delegates.kt:8:57:8:62 | "<none>" | StringLiteral |
|
||||
| delegates.kt:8:66:11:5 | ...->... | LambdaExpr |
|
||||
| delegates.kt:8:66:11:5 | Function3<KProperty<?>,String,String,Unit> | TypeAccess |
|
||||
@@ -217,7 +217,7 @@
|
||||
| delegates.kt:9:15:9:17 | String | TypeAccess |
|
||||
| delegates.kt:9:20:9:22 | String | TypeAccess |
|
||||
| delegates.kt:10:9:10:37 | ConsoleKt | TypeAccess |
|
||||
| delegates.kt:10:9:10:37 | println(...) | MethodAccess |
|
||||
| delegates.kt:10:9:10:37 | println(...) | MethodCall |
|
||||
| delegates.kt:10:17:10:36 | "..." | StringTemplateExpr |
|
||||
| delegates.kt:10:18:10:21 | "Was " | StringLiteral |
|
||||
| delegates.kt:10:23:10:25 | old | VarAccess |
|
||||
@@ -283,7 +283,7 @@
|
||||
| enumClass.kt:10:14:10:42 | int | TypeAccess |
|
||||
| enumClass.kt:10:20:10:25 | int | TypeAccess |
|
||||
| enumClass.kt:10:30:10:33 | this | ThisAccess |
|
||||
| enumClass.kt:10:30:10:38 | f(...) | MethodAccess |
|
||||
| enumClass.kt:10:30:10:38 | f(...) | MethodCall |
|
||||
| enumClass.kt:10:30:10:42 | ... + ... | AddExpr |
|
||||
| enumClass.kt:10:37:10:37 | i | VarAccess |
|
||||
| enumClass.kt:10:42:10:42 | i | VarAccess |
|
||||
@@ -307,7 +307,7 @@
|
||||
| methods3.kt:3:1:3:49 | String | TypeAccess |
|
||||
| methods3.kt:3:1:3:49 | Unit | TypeAccess |
|
||||
| methods3.kt:3:1:3:49 | Unit | TypeAccess |
|
||||
| methods3.kt:3:1:3:49 | fooBarTopLevelMethodExt(...) | MethodAccess |
|
||||
| methods3.kt:3:1:3:49 | fooBarTopLevelMethodExt(...) | MethodCall |
|
||||
| methods3.kt:3:1:3:49 | int | TypeAccess |
|
||||
| methods3.kt:3:1:3:49 | int | TypeAccess |
|
||||
| methods3.kt:3:1:3:49 | p1 | VarAccess |
|
||||
@@ -327,7 +327,7 @@
|
||||
| methods3.kt:6:5:6:45 | String | TypeAccess |
|
||||
| methods3.kt:6:5:6:45 | Unit | TypeAccess |
|
||||
| methods3.kt:6:5:6:45 | Unit | TypeAccess |
|
||||
| methods3.kt:6:5:6:45 | fooBarMethodExt(...) | MethodAccess |
|
||||
| methods3.kt:6:5:6:45 | fooBarMethodExt(...) | MethodCall |
|
||||
| methods3.kt:6:5:6:45 | int | TypeAccess |
|
||||
| methods3.kt:6:5:6:45 | int | TypeAccess |
|
||||
| methods3.kt:6:5:6:45 | p0 | VarAccess |
|
||||
@@ -355,7 +355,7 @@
|
||||
| methods5.kt:7:3:7:15 | Object | TypeAccess |
|
||||
| methods5.kt:7:3:7:15 | String | TypeAccess |
|
||||
| methods5.kt:7:3:7:15 | Unit | TypeAccess |
|
||||
| methods5.kt:7:3:7:15 | a(...) | MethodAccess |
|
||||
| methods5.kt:7:3:7:15 | a(...) | MethodCall |
|
||||
| methods5.kt:7:3:7:15 | new (...) | ClassInstanceExpr |
|
||||
| methods5.kt:7:13:7:14 | 42 | IntegerLiteral |
|
||||
| methods5.kt:8:3:8:3 | x | VarAccess |
|
||||
@@ -371,7 +371,7 @@
|
||||
| methods5.kt:10:3:10:11 | new C1<Integer>(...) | ClassInstanceExpr |
|
||||
| methods5.kt:10:3:10:18 | Integer | TypeAccess |
|
||||
| methods5.kt:10:3:10:18 | Object | TypeAccess |
|
||||
| methods5.kt:10:3:10:18 | f1(...) | MethodAccess |
|
||||
| methods5.kt:10:3:10:18 | f1(...) | MethodCall |
|
||||
| methods5.kt:10:3:10:18 | new (...) | ClassInstanceExpr |
|
||||
| methods5.kt:10:13:10:18 | <implicit coercion to unit> | ImplicitCoercionToUnitExpr |
|
||||
| methods5.kt:10:13:10:18 | Unit | TypeAccess |
|
||||
@@ -386,12 +386,12 @@
|
||||
| methods.kt:9:5:12:5 | Unit | TypeAccess |
|
||||
| methods.kt:9:28:9:33 | int | TypeAccess |
|
||||
| methods.kt:9:36:9:41 | int | TypeAccess |
|
||||
| methods.kt:10:9:10:25 | classMethod(...) | MethodAccess |
|
||||
| methods.kt:10:9:10:25 | classMethod(...) | MethodCall |
|
||||
| methods.kt:10:9:10:25 | this | ThisAccess |
|
||||
| methods.kt:10:21:10:21 | a | VarAccess |
|
||||
| methods.kt:10:24:10:24 | 3 | IntegerLiteral |
|
||||
| methods.kt:11:9:11:28 | MethodsKt | TypeAccess |
|
||||
| methods.kt:11:9:11:28 | topLevelMethod(...) | MethodAccess |
|
||||
| methods.kt:11:9:11:28 | topLevelMethod(...) | MethodCall |
|
||||
| methods.kt:11:24:11:24 | b | VarAccess |
|
||||
| methods.kt:11:27:11:27 | 4 | IntegerLiteral |
|
||||
| methods.kt:14:12:14:29 | Unit | TypeAccess |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma.getMethod().getDeclaringType().getName(), ma.getMethod().getStringSignature()
|
||||
|
||||
@@ -21,7 +21,7 @@ class MethodLocation extends Method {
|
||||
}
|
||||
}
|
||||
|
||||
from MethodAccess ma, Method m
|
||||
from MethodCall ma, Method m
|
||||
where
|
||||
ma.getFile().(CompilationUnit).fromSource() and
|
||||
m = ma.getMethod()
|
||||
|
||||
@@ -18,7 +18,7 @@ test.kt:
|
||||
# 3| 1: [ExprStmt] <Expr>;
|
||||
# 3| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 3| 0: [TypeAccess] Unit
|
||||
# 3| 1: [MethodAccess] get(...)
|
||||
# 3| 1: [MethodCall] get(...)
|
||||
# 3| -1: [TypeAccess] TestKt
|
||||
# 3| 0: [VarAccess] arr
|
||||
# 3| 1: [IntegerLiteral] 1
|
||||
@@ -26,14 +26,14 @@ test.kt:
|
||||
# 4| 2: [ExprStmt] <Expr>;
|
||||
# 4| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 4| 0: [TypeAccess] Unit
|
||||
# 4| 1: [MethodAccess] get(...)
|
||||
# 4| 1: [MethodCall] get(...)
|
||||
# 4| -1: [VarAccess] mt
|
||||
# 4| 0: [IntegerLiteral] 1
|
||||
# 4| 1: [IntegerLiteral] 2
|
||||
# 6| 3: [ExprStmt] <Expr>;
|
||||
# 6| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 6| 0: [TypeAccess] Unit
|
||||
# 6| 1: [MethodAccess] set(...)
|
||||
# 6| 1: [MethodCall] set(...)
|
||||
# 6| -1: [TypeAccess] TestKt
|
||||
# 6| 0: [VarAccess] arr
|
||||
# 6| 1: [IntegerLiteral] 1
|
||||
@@ -42,7 +42,7 @@ test.kt:
|
||||
# 7| 4: [ExprStmt] <Expr>;
|
||||
# 7| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 7| 0: [TypeAccess] Unit
|
||||
# 7| 1: [MethodAccess] set(...)
|
||||
# 7| 1: [MethodCall] set(...)
|
||||
# 7| -1: [TypeAccess] TestKt
|
||||
# 7| 0: [VarAccess] arr
|
||||
# 7| 1: [IntegerLiteral] 1
|
||||
|
||||
@@ -20,17 +20,17 @@ test.kt:
|
||||
# 184| 0: [TypeAccess] String
|
||||
# 184| 5: [BlockStmt] { ... }
|
||||
# 185| 0: [ExprStmt] <Expr>;
|
||||
# 185| 0: [MethodAccess] sink(...)
|
||||
# 185| 0: [MethodCall] sink(...)
|
||||
# 185| -1: [TypeAccess] TestKt
|
||||
# 185| 0: [VarAccess] x
|
||||
# 186| 1: [ExprStmt] <Expr>;
|
||||
# 186| 0: [MethodAccess] sink(...)
|
||||
# 186| 0: [MethodCall] sink(...)
|
||||
# 186| -1: [TypeAccess] TestKt
|
||||
# 186| 0: [ArrayAccess] ...[...]
|
||||
# 186| 0: [VarAccess] y
|
||||
# 186| 1: [IntegerLiteral] 0
|
||||
# 187| 2: [ExprStmt] <Expr>;
|
||||
# 187| 0: [MethodAccess] sink(...)
|
||||
# 187| 0: [MethodCall] sink(...)
|
||||
# 187| -1: [TypeAccess] TestKt
|
||||
# 187| 0: [VarAccess] z
|
||||
# 184| 3: [Method] varargsTest$default
|
||||
@@ -83,7 +83,7 @@ test.kt:
|
||||
# 184| 0: [VarAccess] p2
|
||||
# 184| 1: [StringLiteral] "after-vararg-default sunk"
|
||||
# 184| 3: [ReturnStmt] return ...
|
||||
# 184| 0: [MethodAccess] varargsTest(...)
|
||||
# 184| 0: [MethodCall] varargsTest(...)
|
||||
# 184| -1: [TypeAccess] TestKt
|
||||
# 184| 0: [VarAccess] p0
|
||||
# 184| 1: [VarAccess] p1
|
||||
@@ -92,7 +92,7 @@ test.kt:
|
||||
# 190| 3: [TypeAccess] Unit
|
||||
# 190| 5: [BlockStmt] { ... }
|
||||
# 191| 0: [ExprStmt] <Expr>;
|
||||
# 191| 0: [MethodAccess] varargsTest$default(...)
|
||||
# 191| 0: [MethodCall] varargsTest$default(...)
|
||||
# 191| -1: [TypeAccess] TestKt
|
||||
# 1| 0: [NullLiteral] null
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -100,7 +100,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 0
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 192| 1: [ExprStmt] <Expr>;
|
||||
# 192| 0: [MethodAccess] varargsTest$default(...)
|
||||
# 192| 0: [MethodCall] varargsTest$default(...)
|
||||
# 192| -1: [TypeAccess] TestKt
|
||||
# 192| 0: [StringLiteral] "no-varargs-before, no-z-parameter sunk"
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -108,7 +108,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 1
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 193| 2: [ExprStmt] <Expr>;
|
||||
# 193| 0: [MethodAccess] varargsTest$default(...)
|
||||
# 193| 0: [MethodCall] varargsTest$default(...)
|
||||
# 193| -1: [TypeAccess] TestKt
|
||||
# 193| 0: [StringLiteral] "no-varargs-before sunk"
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -116,20 +116,20 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 5
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 194| 3: [ExprStmt] <Expr>;
|
||||
# 194| 0: [MethodAccess] varargsTest(...)
|
||||
# 194| 0: [MethodCall] varargsTest(...)
|
||||
# 194| -1: [TypeAccess] TestKt
|
||||
# 194| 0: [StringLiteral] "one-vararg-before sunk"
|
||||
# 194| 1: [StringLiteral] "one-vararg sunk"
|
||||
# 194| 2: [StringLiteral] "one-vararg-after sunk"
|
||||
# 195| 4: [ExprStmt] <Expr>;
|
||||
# 195| 0: [MethodAccess] varargsTest(...)
|
||||
# 195| 0: [MethodCall] varargsTest(...)
|
||||
# 195| -1: [TypeAccess] TestKt
|
||||
# 195| 0: [StringLiteral] "two-varargs-before sunk"
|
||||
# 195| 1: [StringLiteral] "two-vararg-first sunk"
|
||||
# 195| 2: [StringLiteral] "two-vararg-second sunk"
|
||||
# 195| 3: [StringLiteral] "two-varargs-after sunk"
|
||||
# 196| 5: [ExprStmt] <Expr>;
|
||||
# 196| 0: [MethodAccess] varargsTest$default(...)
|
||||
# 196| 0: [MethodCall] varargsTest$default(...)
|
||||
# 196| -1: [TypeAccess] TestKt
|
||||
# 196| 0: [StringLiteral] "no-z-parmeter sunk"
|
||||
# 196| 1: [ArrayCreationExpr] new String[]
|
||||
@@ -154,7 +154,7 @@ test.kt:
|
||||
# 199| 0: [TypeAccess] String
|
||||
# 199| 5: [BlockStmt] { ... }
|
||||
# 200| 0: [ExprStmt] <Expr>;
|
||||
# 200| 0: [MethodAccess] sink(...)
|
||||
# 200| 0: [MethodCall] sink(...)
|
||||
# 200| -1: [TypeAccess] TestKt
|
||||
# 200| 0: [ArrayAccess] ...[...]
|
||||
# 200| 0: [VarAccess] y
|
||||
@@ -209,7 +209,7 @@ test.kt:
|
||||
# 199| 0: [VarAccess] p2
|
||||
# 199| 1: [StringLiteral] "after-vararg-default not sunk 2"
|
||||
# 199| 3: [ReturnStmt] return ...
|
||||
# 199| 0: [MethodAccess] varargsTestOnlySinkVarargs(...)
|
||||
# 199| 0: [MethodCall] varargsTestOnlySinkVarargs(...)
|
||||
# 199| -1: [TypeAccess] TestKt
|
||||
# 199| 0: [VarAccess] p0
|
||||
# 199| 1: [VarAccess] p1
|
||||
@@ -218,7 +218,7 @@ test.kt:
|
||||
# 203| 3: [TypeAccess] Unit
|
||||
# 203| 5: [BlockStmt] { ... }
|
||||
# 204| 0: [ExprStmt] <Expr>;
|
||||
# 204| 0: [MethodAccess] varargsTestOnlySinkVarargs$default(...)
|
||||
# 204| 0: [MethodCall] varargsTestOnlySinkVarargs$default(...)
|
||||
# 204| -1: [TypeAccess] TestKt
|
||||
# 1| 0: [NullLiteral] null
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -226,7 +226,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 0
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 205| 1: [ExprStmt] <Expr>;
|
||||
# 205| 0: [MethodAccess] varargsTestOnlySinkVarargs$default(...)
|
||||
# 205| 0: [MethodCall] varargsTestOnlySinkVarargs$default(...)
|
||||
# 205| -1: [TypeAccess] TestKt
|
||||
# 205| 0: [StringLiteral] "no-varargs-before, no-z-parameter not sunk 2"
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -234,7 +234,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 1
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 206| 2: [ExprStmt] <Expr>;
|
||||
# 206| 0: [MethodAccess] varargsTestOnlySinkVarargs$default(...)
|
||||
# 206| 0: [MethodCall] varargsTestOnlySinkVarargs$default(...)
|
||||
# 206| -1: [TypeAccess] TestKt
|
||||
# 206| 0: [StringLiteral] "no-varargs-before not sunk 2"
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -242,20 +242,20 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 5
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 207| 3: [ExprStmt] <Expr>;
|
||||
# 207| 0: [MethodAccess] varargsTestOnlySinkVarargs(...)
|
||||
# 207| 0: [MethodCall] varargsTestOnlySinkVarargs(...)
|
||||
# 207| -1: [TypeAccess] TestKt
|
||||
# 207| 0: [StringLiteral] "one-vararg-before not sunk 2"
|
||||
# 207| 1: [StringLiteral] "one-vararg sunk 2"
|
||||
# 207| 2: [StringLiteral] "one-vararg-after not sunk 2"
|
||||
# 208| 4: [ExprStmt] <Expr>;
|
||||
# 208| 0: [MethodAccess] varargsTestOnlySinkVarargs(...)
|
||||
# 208| 0: [MethodCall] varargsTestOnlySinkVarargs(...)
|
||||
# 208| -1: [TypeAccess] TestKt
|
||||
# 208| 0: [StringLiteral] "two-varargs-before not sunk 2"
|
||||
# 208| 1: [StringLiteral] "two-vararg-first sunk 2"
|
||||
# 208| 2: [StringLiteral] "two-vararg-second sunk 2"
|
||||
# 208| 3: [StringLiteral] "two-varargs-after not sunk 2"
|
||||
# 209| 5: [ExprStmt] <Expr>;
|
||||
# 209| 0: [MethodAccess] varargsTestOnlySinkVarargs$default(...)
|
||||
# 209| 0: [MethodCall] varargsTestOnlySinkVarargs$default(...)
|
||||
# 209| -1: [TypeAccess] TestKt
|
||||
# 209| 0: [StringLiteral] "no-z-parmeter not sunk 2"
|
||||
# 209| 1: [ArrayCreationExpr] new String[]
|
||||
@@ -280,11 +280,11 @@ test.kt:
|
||||
# 212| 0: [TypeAccess] String
|
||||
# 212| 5: [BlockStmt] { ... }
|
||||
# 213| 0: [ExprStmt] <Expr>;
|
||||
# 213| 0: [MethodAccess] sink(...)
|
||||
# 213| 0: [MethodCall] sink(...)
|
||||
# 213| -1: [TypeAccess] TestKt
|
||||
# 213| 0: [VarAccess] x
|
||||
# 214| 1: [ExprStmt] <Expr>;
|
||||
# 214| 0: [MethodAccess] sink(...)
|
||||
# 214| 0: [MethodCall] sink(...)
|
||||
# 214| -1: [TypeAccess] TestKt
|
||||
# 214| 0: [VarAccess] z
|
||||
# 212| 9: [Method] varargsTestOnlySinkRegularArgs$default
|
||||
@@ -337,7 +337,7 @@ test.kt:
|
||||
# 212| 0: [VarAccess] p2
|
||||
# 212| 1: [StringLiteral] "after-vararg-default sunk 3"
|
||||
# 212| 3: [ReturnStmt] return ...
|
||||
# 212| 0: [MethodAccess] varargsTestOnlySinkRegularArgs(...)
|
||||
# 212| 0: [MethodCall] varargsTestOnlySinkRegularArgs(...)
|
||||
# 212| -1: [TypeAccess] TestKt
|
||||
# 212| 0: [VarAccess] p0
|
||||
# 212| 1: [VarAccess] p1
|
||||
@@ -346,7 +346,7 @@ test.kt:
|
||||
# 217| 3: [TypeAccess] Unit
|
||||
# 217| 5: [BlockStmt] { ... }
|
||||
# 218| 0: [ExprStmt] <Expr>;
|
||||
# 218| 0: [MethodAccess] varargsTestOnlySinkRegularArgs$default(...)
|
||||
# 218| 0: [MethodCall] varargsTestOnlySinkRegularArgs$default(...)
|
||||
# 218| -1: [TypeAccess] TestKt
|
||||
# 1| 0: [NullLiteral] null
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -354,7 +354,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 0
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 219| 1: [ExprStmt] <Expr>;
|
||||
# 219| 0: [MethodAccess] varargsTestOnlySinkRegularArgs$default(...)
|
||||
# 219| 0: [MethodCall] varargsTestOnlySinkRegularArgs$default(...)
|
||||
# 219| -1: [TypeAccess] TestKt
|
||||
# 219| 0: [StringLiteral] "no-varargs-before, no-z-parameter sunk 3"
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -362,7 +362,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 1
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 220| 2: [ExprStmt] <Expr>;
|
||||
# 220| 0: [MethodAccess] varargsTestOnlySinkRegularArgs$default(...)
|
||||
# 220| 0: [MethodCall] varargsTestOnlySinkRegularArgs$default(...)
|
||||
# 220| -1: [TypeAccess] TestKt
|
||||
# 220| 0: [StringLiteral] "no-varargs-before sunk 3"
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -370,20 +370,20 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 5
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 221| 3: [ExprStmt] <Expr>;
|
||||
# 221| 0: [MethodAccess] varargsTestOnlySinkRegularArgs(...)
|
||||
# 221| 0: [MethodCall] varargsTestOnlySinkRegularArgs(...)
|
||||
# 221| -1: [TypeAccess] TestKt
|
||||
# 221| 0: [StringLiteral] "one-vararg-before sunk 3"
|
||||
# 221| 1: [StringLiteral] "one-vararg not sunk 3"
|
||||
# 221| 2: [StringLiteral] "one-vararg-after sunk 3"
|
||||
# 222| 4: [ExprStmt] <Expr>;
|
||||
# 222| 0: [MethodAccess] varargsTestOnlySinkRegularArgs(...)
|
||||
# 222| 0: [MethodCall] varargsTestOnlySinkRegularArgs(...)
|
||||
# 222| -1: [TypeAccess] TestKt
|
||||
# 222| 0: [StringLiteral] "two-varargs-before sunk 3"
|
||||
# 222| 1: [StringLiteral] "two-vararg-first not sunk 3"
|
||||
# 222| 2: [StringLiteral] "two-vararg-second not sunk 3"
|
||||
# 222| 3: [StringLiteral] "two-varargs-after sunk 3"
|
||||
# 223| 5: [ExprStmt] <Expr>;
|
||||
# 223| 0: [MethodAccess] varargsTestOnlySinkRegularArgs$default(...)
|
||||
# 223| 0: [MethodCall] varargsTestOnlySinkRegularArgs$default(...)
|
||||
# 223| -1: [TypeAccess] TestKt
|
||||
# 223| 0: [StringLiteral] "no-z-parmeter sunk 3"
|
||||
# 223| 1: [ArrayCreationExpr] new String[]
|
||||
@@ -428,7 +428,7 @@ test.kt:
|
||||
# 5| 0: [TypeAccess] String
|
||||
# 5| 5: [BlockStmt] { ... }
|
||||
# 6| 0: [ExprStmt] <Expr>;
|
||||
# 6| 0: [MethodAccess] sink(...)
|
||||
# 6| 0: [MethodCall] sink(...)
|
||||
# 6| -1: [TypeAccess] TestKt
|
||||
# 6| 0: [VarAccess] y
|
||||
# 5| 3: [Method] f$default
|
||||
@@ -468,7 +468,7 @@ test.kt:
|
||||
# 5| 0: [VarAccess] p3
|
||||
# 5| 1: [StringLiteral] "hello world"
|
||||
# 5| 2: [ReturnStmt] return ...
|
||||
# 5| 0: [MethodAccess] f(...)
|
||||
# 5| 0: [MethodCall] f(...)
|
||||
# 5| -1: [VarAccess] p0
|
||||
# 5| 0: [VarAccess] p1
|
||||
# 5| 1: [VarAccess] p2
|
||||
@@ -477,7 +477,7 @@ test.kt:
|
||||
# 9| 3: [TypeAccess] Unit
|
||||
# 9| 5: [BlockStmt] { ... }
|
||||
# 10| 0: [ExprStmt] <Expr>;
|
||||
# 10| 0: [MethodAccess] f$default(...)
|
||||
# 10| 0: [MethodCall] f$default(...)
|
||||
# 10| -1: [TypeAccess] TestMember
|
||||
# 10| 0: [ThisAccess] this
|
||||
# 10| 1: [StringLiteral] "member sunk"
|
||||
@@ -486,7 +486,7 @@ test.kt:
|
||||
# 1| 4: [IntegerLiteral] 1
|
||||
# 1| 5: [NullLiteral] null
|
||||
# 11| 1: [ExprStmt] <Expr>;
|
||||
# 11| 0: [MethodAccess] f$default(...)
|
||||
# 11| 0: [MethodCall] f$default(...)
|
||||
# 11| -1: [TypeAccess] TestMember
|
||||
# 11| 0: [ThisAccess] this
|
||||
# 11| 1: [StringLiteral] "member sunk fp"
|
||||
@@ -495,7 +495,7 @@ test.kt:
|
||||
# 1| 4: [IntegerLiteral] 3
|
||||
# 1| 5: [NullLiteral] null
|
||||
# 12| 2: [ExprStmt] <Expr>;
|
||||
# 12| 0: [MethodAccess] f(...)
|
||||
# 12| 0: [MethodCall] f(...)
|
||||
# 12| -1: [ThisAccess] this
|
||||
# 12| 0: [StringLiteral] "not sunk"
|
||||
# 12| 1: [StringLiteral] "member sunk 3"
|
||||
@@ -518,11 +518,11 @@ test.kt:
|
||||
# 19| 0: [TypeAccess] String
|
||||
# 19| 5: [BlockStmt] { ... }
|
||||
# 20| 0: [ExprStmt] <Expr>;
|
||||
# 20| 0: [MethodAccess] sink(...)
|
||||
# 20| 0: [MethodCall] sink(...)
|
||||
# 20| -1: [TypeAccess] TestKt
|
||||
# 20| 0: [ExtensionReceiverAccess] this
|
||||
# 21| 1: [ExprStmt] <Expr>;
|
||||
# 21| 0: [MethodAccess] sink(...)
|
||||
# 21| 0: [MethodCall] sink(...)
|
||||
# 21| -1: [TypeAccess] TestKt
|
||||
# 21| 0: [VarAccess] y
|
||||
# 19| 3: [ExtensionMethod] f$default
|
||||
@@ -564,7 +564,7 @@ test.kt:
|
||||
# 19| 0: [VarAccess] p4
|
||||
# 19| 1: [StringLiteral] "hello world"
|
||||
# 19| 2: [ReturnStmt] return ...
|
||||
# 19| 0: [MethodAccess] f(...)
|
||||
# 19| 0: [MethodCall] f(...)
|
||||
# 19| -1: [VarAccess] p0
|
||||
# 19| 0: [ExtensionReceiverAccess] this
|
||||
# 19| 1: [VarAccess] p2
|
||||
@@ -577,7 +577,7 @@ test.kt:
|
||||
# 24| 0: [TypeAccess] String
|
||||
# 24| 5: [BlockStmt] { ... }
|
||||
# 25| 0: [ExprStmt] <Expr>;
|
||||
# 25| 0: [MethodAccess] f$default(...)
|
||||
# 25| 0: [MethodCall] f$default(...)
|
||||
# 25| -1: [TypeAccess] TestExtensionMember
|
||||
# 25| 0: [ThisAccess] this
|
||||
# 25| 1: [VarAccess] sunk
|
||||
@@ -587,7 +587,7 @@ test.kt:
|
||||
# 1| 5: [IntegerLiteral] 1
|
||||
# 1| 6: [NullLiteral] null
|
||||
# 26| 1: [ExprStmt] <Expr>;
|
||||
# 26| 0: [MethodAccess] f$default(...)
|
||||
# 26| 0: [MethodCall] f$default(...)
|
||||
# 26| -1: [TypeAccess] TestExtensionMember
|
||||
# 26| 0: [ThisAccess] this
|
||||
# 26| 1: [VarAccess] sunk
|
||||
@@ -597,7 +597,7 @@ test.kt:
|
||||
# 1| 5: [IntegerLiteral] 3
|
||||
# 1| 6: [NullLiteral] null
|
||||
# 27| 2: [ExprStmt] <Expr>;
|
||||
# 27| 0: [MethodAccess] f(...)
|
||||
# 27| 0: [MethodCall] f(...)
|
||||
# 27| -1: [ThisAccess] this
|
||||
# 27| 0: [VarAccess] sunk
|
||||
# 27| 1: [StringLiteral] "not sunk"
|
||||
@@ -621,7 +621,7 @@ test.kt:
|
||||
# 34| 0: [TypeAccess] String
|
||||
# 34| 5: [BlockStmt] { ... }
|
||||
# 35| 0: [ExprStmt] <Expr>;
|
||||
# 35| 0: [MethodAccess] sink(...)
|
||||
# 35| 0: [MethodCall] sink(...)
|
||||
# 35| -1: [TypeAccess] TestKt
|
||||
# 35| 0: [VarAccess] y
|
||||
# 34| 3: [Method] f$default
|
||||
@@ -659,7 +659,7 @@ test.kt:
|
||||
# 34| 0: [VarAccess] p2
|
||||
# 34| 1: [StringLiteral] "hello world"
|
||||
# 34| 2: [ReturnStmt] return ...
|
||||
# 34| 0: [MethodAccess] f(...)
|
||||
# 34| 0: [MethodCall] f(...)
|
||||
# 34| -1: [TypeAccess] TestStaticMember
|
||||
# 34| 0: [VarAccess] p0
|
||||
# 34| 1: [VarAccess] p1
|
||||
@@ -668,7 +668,7 @@ test.kt:
|
||||
# 38| 3: [TypeAccess] Unit
|
||||
# 38| 5: [BlockStmt] { ... }
|
||||
# 39| 0: [ExprStmt] <Expr>;
|
||||
# 39| 0: [MethodAccess] f$default(...)
|
||||
# 39| 0: [MethodCall] f$default(...)
|
||||
# 39| -1: [TypeAccess] TestStaticMember
|
||||
# 39| 0: [StringLiteral] "static sunk"
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -676,7 +676,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 1
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 40| 1: [ExprStmt] <Expr>;
|
||||
# 40| 0: [MethodAccess] f$default(...)
|
||||
# 40| 0: [MethodCall] f$default(...)
|
||||
# 40| -1: [TypeAccess] TestStaticMember
|
||||
# 40| 0: [StringLiteral] "static sunk fp"
|
||||
# 40| 1: [StringLiteral] "static sunk 2"
|
||||
@@ -684,7 +684,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 3
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 41| 2: [ExprStmt] <Expr>;
|
||||
# 41| 0: [MethodAccess] f(...)
|
||||
# 41| 0: [MethodCall] f(...)
|
||||
# 41| -1: [TypeAccess] TestStaticMember
|
||||
# 41| 0: [StringLiteral] "not sunk"
|
||||
# 41| 1: [StringLiteral] "static sunk 3"
|
||||
@@ -728,7 +728,7 @@ test.kt:
|
||||
# 56| 0: [TypeAccess] String
|
||||
# 56| 5: [BlockStmt] { ... }
|
||||
# 57| 0: [ExprStmt] <Expr>;
|
||||
# 57| 0: [MethodAccess] sink(...)
|
||||
# 57| 0: [MethodCall] sink(...)
|
||||
# 57| -1: [TypeAccess] TestKt
|
||||
# 57| 0: [VarAccess] y
|
||||
# 56| 4: [ExtensionMethod] test$default
|
||||
@@ -758,9 +758,9 @@ test.kt:
|
||||
# 56| 1: [ExprStmt] <Expr>;
|
||||
# 56| 0: [AssignExpr] ...=...
|
||||
# 56| 0: [VarAccess] p3
|
||||
# 56| 1: [MethodAccess] f(...)
|
||||
# 56| 1: [MethodCall] f(...)
|
||||
# 56| -1: [VarAccess] p0
|
||||
# 56| 0: [MethodAccess] g(...)
|
||||
# 56| 0: [MethodCall] g(...)
|
||||
# 56| -1: [VarAccess] p0
|
||||
# 56| 0: [VarAccess] p2
|
||||
# 56| 1: [IfStmt] if (...)
|
||||
@@ -774,7 +774,7 @@ test.kt:
|
||||
# 56| 0: [VarAccess] p4
|
||||
# 56| 1: [StringLiteral] "hello world"
|
||||
# 56| 2: [ReturnStmt] return ...
|
||||
# 56| 0: [MethodAccess] test(...)
|
||||
# 56| 0: [MethodCall] test(...)
|
||||
# 56| -1: [VarAccess] p0
|
||||
# 56| 0: [ExtensionReceiverAccess] this
|
||||
# 56| 1: [VarAccess] p2
|
||||
@@ -787,7 +787,7 @@ test.kt:
|
||||
# 60| 0: [TypeAccess] ExtendMe
|
||||
# 60| 5: [BlockStmt] { ... }
|
||||
# 61| 0: [ExprStmt] <Expr>;
|
||||
# 61| 0: [MethodAccess] test$default(...)
|
||||
# 61| 0: [MethodCall] test$default(...)
|
||||
# 61| -1: [TypeAccess] TestReceiverReferences
|
||||
# 61| 0: [ThisAccess] this
|
||||
# 61| 1: [VarAccess] t
|
||||
@@ -797,7 +797,7 @@ test.kt:
|
||||
# 1| 5: [IntegerLiteral] 1
|
||||
# 1| 6: [NullLiteral] null
|
||||
# 62| 1: [ExprStmt] <Expr>;
|
||||
# 62| 0: [MethodAccess] test$default(...)
|
||||
# 62| 0: [MethodCall] test$default(...)
|
||||
# 62| -1: [TypeAccess] TestReceiverReferences
|
||||
# 62| 0: [ThisAccess] this
|
||||
# 62| 1: [VarAccess] t
|
||||
@@ -807,7 +807,7 @@ test.kt:
|
||||
# 1| 5: [IntegerLiteral] 3
|
||||
# 1| 6: [NullLiteral] null
|
||||
# 63| 2: [ExprStmt] <Expr>;
|
||||
# 63| 0: [MethodAccess] test(...)
|
||||
# 63| 0: [MethodCall] test(...)
|
||||
# 63| -1: [ThisAccess] this
|
||||
# 63| 0: [VarAccess] t
|
||||
# 63| 1: [StringLiteral] "not sunk"
|
||||
@@ -826,7 +826,7 @@ test.kt:
|
||||
# 68| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 68| 1: [BlockStmt] { ... }
|
||||
# 71| 0: [ExprStmt] <Expr>;
|
||||
# 71| 0: [MethodAccess] sink(...)
|
||||
# 71| 0: [MethodCall] sink(...)
|
||||
# 71| -1: [TypeAccess] TestKt
|
||||
# 71| 0: [VarAccess] y
|
||||
# 68| 2: [Constructor] TestConstructor
|
||||
@@ -921,7 +921,7 @@ test.kt:
|
||||
# 86| 0: [TypeAccess] String
|
||||
# 86| 5: [BlockStmt] { ... }
|
||||
# 87| 0: [ExprStmt] <Expr>;
|
||||
# 87| 0: [MethodAccess] sink(...)
|
||||
# 87| 0: [MethodCall] sink(...)
|
||||
# 87| -1: [TypeAccess] TestKt
|
||||
# 87| 0: [VarAccess] y
|
||||
# 86| 3: [Method] f$default
|
||||
@@ -959,7 +959,7 @@ test.kt:
|
||||
# 86| 0: [VarAccess] p2
|
||||
# 86| 1: [StringLiteral] "hello world"
|
||||
# 86| 2: [ReturnStmt] return ...
|
||||
# 86| 0: [MethodAccess] f(...)
|
||||
# 86| 0: [MethodCall] f(...)
|
||||
# 86| -1: [ClassInstanceExpr] new (...)
|
||||
# 86| -3: [TypeAccess] Object
|
||||
# 86| 0: [VarAccess] p0
|
||||
@@ -974,7 +974,7 @@ test.kt:
|
||||
# 90| 3: [TypeAccess] Unit
|
||||
# 90| 5: [BlockStmt] { ... }
|
||||
# 91| 0: [ExprStmt] <Expr>;
|
||||
# 91| 0: [MethodAccess] f$default(...)
|
||||
# 91| 0: [MethodCall] f$default(...)
|
||||
# 91| -1: [TypeAccess]
|
||||
# 91| 0: [StringLiteral] "local sunk"
|
||||
# 1| 1: [NullLiteral] null
|
||||
@@ -982,7 +982,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 1
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 92| 1: [ExprStmt] <Expr>;
|
||||
# 92| 0: [MethodAccess] f$default(...)
|
||||
# 92| 0: [MethodCall] f$default(...)
|
||||
# 92| -1: [TypeAccess]
|
||||
# 92| 0: [StringLiteral] "local sunk fp"
|
||||
# 92| 1: [StringLiteral] "local sunk 2"
|
||||
@@ -990,7 +990,7 @@ test.kt:
|
||||
# 1| 3: [IntegerLiteral] 3
|
||||
# 1| 4: [NullLiteral] null
|
||||
# 93| 2: [ExprStmt] <Expr>;
|
||||
# 93| 0: [MethodAccess] f(...)
|
||||
# 93| 0: [MethodCall] f(...)
|
||||
# 93| -1: [ClassInstanceExpr] new (...)
|
||||
# 93| -3: [TypeAccess] Object
|
||||
# 93| 0: [StringLiteral] "not sunk"
|
||||
@@ -1021,7 +1021,7 @@ test.kt:
|
||||
# 106| 0: [TypeAccess] String
|
||||
# 106| 5: [BlockStmt] { ... }
|
||||
# 107| 0: [ExprStmt] <Expr>;
|
||||
# 107| 0: [MethodAccess] sink(...)
|
||||
# 107| 0: [MethodCall] sink(...)
|
||||
# 107| -1: [TypeAccess] TestKt
|
||||
# 107| 0: [VarAccess] y
|
||||
# 106| 3: [Method] f$default
|
||||
@@ -1061,7 +1061,7 @@ test.kt:
|
||||
# 106| 0: [VarAccess] p3
|
||||
# 106| 1: [StringLiteral] "hello world"
|
||||
# 106| 2: [ReturnStmt] return ...
|
||||
# 106| 0: [MethodAccess] f(...)
|
||||
# 106| 0: [MethodCall] f(...)
|
||||
# 106| -1: [VarAccess] p0
|
||||
# 106| 0: [VarAccess] p1
|
||||
# 106| 1: [VarAccess] p2
|
||||
@@ -1070,7 +1070,7 @@ test.kt:
|
||||
# 110| 3: [TypeAccess] Unit
|
||||
# 110| 5: [BlockStmt] { ... }
|
||||
# 111| 0: [ExprStmt] <Expr>;
|
||||
# 111| 0: [MethodAccess] f$default(...)
|
||||
# 111| 0: [MethodCall] f$default(...)
|
||||
# 111| -1: [TypeAccess] EnclosingLocalClass
|
||||
# 111| 0: [ThisAccess] this
|
||||
# 111| 1: [StringLiteral] "local sunk"
|
||||
@@ -1079,7 +1079,7 @@ test.kt:
|
||||
# 1| 4: [IntegerLiteral] 1
|
||||
# 1| 5: [NullLiteral] null
|
||||
# 112| 1: [ExprStmt] <Expr>;
|
||||
# 112| 0: [MethodAccess] f$default(...)
|
||||
# 112| 0: [MethodCall] f$default(...)
|
||||
# 112| -1: [TypeAccess] EnclosingLocalClass
|
||||
# 112| 0: [ThisAccess] this
|
||||
# 112| 1: [StringLiteral] "local sunk fp"
|
||||
@@ -1088,7 +1088,7 @@ test.kt:
|
||||
# 1| 4: [IntegerLiteral] 3
|
||||
# 1| 5: [NullLiteral] null
|
||||
# 113| 2: [ExprStmt] <Expr>;
|
||||
# 113| 0: [MethodAccess] f(...)
|
||||
# 113| 0: [MethodCall] f(...)
|
||||
# 113| -1: [ThisAccess] this
|
||||
# 113| 0: [StringLiteral] "not sunk"
|
||||
# 113| 1: [StringLiteral] "local sunk 3"
|
||||
@@ -1111,7 +1111,7 @@ test.kt:
|
||||
# 124| 0: [TypeAccess] T
|
||||
# 124| 5: [BlockStmt] { ... }
|
||||
# 125| 0: [ExprStmt] <Expr>;
|
||||
# 125| 0: [MethodAccess] sink(...)
|
||||
# 125| 0: [MethodCall] sink(...)
|
||||
# 125| -1: [TypeAccess] TestKt
|
||||
# 125| 0: [VarAccess] y
|
||||
# 124| 3: [Method] f$default
|
||||
@@ -1151,7 +1151,7 @@ test.kt:
|
||||
# 124| 0: [VarAccess] p3
|
||||
# 124| 1: [NullLiteral] null
|
||||
# 124| 2: [ReturnStmt] return ...
|
||||
# 124| 0: [MethodAccess] f(...)
|
||||
# 124| 0: [MethodCall] f(...)
|
||||
# 124| -1: [VarAccess] p0
|
||||
# 124| 0: [VarAccess] p1
|
||||
# 124| 1: [VarAccess] p2
|
||||
@@ -1167,7 +1167,7 @@ test.kt:
|
||||
# 128| 0: [TypeAccess] CharSequence
|
||||
# 128| 5: [BlockStmt] { ... }
|
||||
# 129| 0: [ExprStmt] <Expr>;
|
||||
# 129| 0: [MethodAccess] f$default(...)
|
||||
# 129| 0: [MethodCall] f$default(...)
|
||||
# 129| -1: [TypeAccess] TestGeneric<>
|
||||
# 129| 0: [VarAccess] tgs
|
||||
# 129| 1: [StringLiteral] "generic sunk"
|
||||
@@ -1176,7 +1176,7 @@ test.kt:
|
||||
# 1| 4: [IntegerLiteral] 1
|
||||
# 1| 5: [NullLiteral] null
|
||||
# 130| 1: [ExprStmt] <Expr>;
|
||||
# 130| 0: [MethodAccess] f$default(...)
|
||||
# 130| 0: [MethodCall] f$default(...)
|
||||
# 130| -1: [TypeAccess] TestGeneric<>
|
||||
# 130| 0: [VarAccess] tcs
|
||||
# 130| 1: [StringLiteral] "generic sunk fp"
|
||||
@@ -1185,13 +1185,13 @@ test.kt:
|
||||
# 1| 4: [IntegerLiteral] 3
|
||||
# 1| 5: [NullLiteral] null
|
||||
# 131| 2: [ExprStmt] <Expr>;
|
||||
# 131| 0: [MethodAccess] f(...)
|
||||
# 131| 0: [MethodCall] f(...)
|
||||
# 131| -1: [VarAccess] tgs
|
||||
# 131| 0: [StringLiteral] "not sunk"
|
||||
# 131| 1: [StringLiteral] "generic sunk 3"
|
||||
# 131| 2: [StringLiteral] "not sunk"
|
||||
# 132| 3: [ExprStmt] <Expr>;
|
||||
# 132| 0: [MethodAccess] f(...)
|
||||
# 132| 0: [MethodCall] f(...)
|
||||
# 132| -1: [VarAccess] tcs
|
||||
# 132| 0: [StringLiteral] "not sunk"
|
||||
# 132| 1: [StringLiteral] "generic sunk 3"
|
||||
@@ -1231,7 +1231,7 @@ test.kt:
|
||||
# 135| 0: [VarAccess] p2
|
||||
# 135| 1: [NullLiteral] null
|
||||
# 135| 1: [ReturnStmt] return ...
|
||||
# 135| 0: [MethodAccess] testReturn(...)
|
||||
# 135| 0: [MethodCall] testReturn(...)
|
||||
# 135| -1: [VarAccess] p0
|
||||
# 135| 0: [VarAccess] p1
|
||||
# 135| 1: [VarAccess] p2
|
||||
@@ -1243,9 +1243,9 @@ test.kt:
|
||||
# 137| 0: [TypeAccess] String
|
||||
# 137| 5: [BlockStmt] { ... }
|
||||
# 138| 0: [ExprStmt] <Expr>;
|
||||
# 138| 0: [MethodAccess] sink(...)
|
||||
# 138| 0: [MethodCall] sink(...)
|
||||
# 138| -1: [TypeAccess] TestKt
|
||||
# 138| 0: [MethodAccess] testReturn$default(...)
|
||||
# 138| 0: [MethodCall] testReturn$default(...)
|
||||
# 138| -1: [TypeAccess] TestGeneric<>
|
||||
# 138| 0: [VarAccess] tgs
|
||||
# 138| 1: [StringLiteral] "sunk return value"
|
||||
@@ -1282,7 +1282,7 @@ test.kt:
|
||||
# 145| 0: [TypeAccess] S
|
||||
# 145| 5: [BlockStmt] { ... }
|
||||
# 146| 0: [ExprStmt] <Expr>;
|
||||
# 146| 0: [MethodAccess] sink(...)
|
||||
# 146| 0: [MethodCall] sink(...)
|
||||
# 146| -1: [TypeAccess] TestKt
|
||||
# 146| 0: [VarAccess] y
|
||||
# 145| 3: [Method] f$default
|
||||
@@ -1336,7 +1336,7 @@ test.kt:
|
||||
# 145| 1: [ExprStmt] <Expr>;
|
||||
# 145| 0: [AssignExpr] ...=...
|
||||
# 145| 0: [VarAccess] p4
|
||||
# 145| 1: [MethodAccess] listOf(...)
|
||||
# 145| 1: [MethodCall] listOf(...)
|
||||
# 145| -2: [TypeAccess] T
|
||||
# 145| -1: [TypeAccess] CollectionsKt
|
||||
# 145| 0: [VarAccess] p2
|
||||
@@ -1359,12 +1359,12 @@ test.kt:
|
||||
# 145| 1: [ExprStmt] <Expr>;
|
||||
# 145| 0: [AssignExpr] ...=...
|
||||
# 145| 0: [VarAccess] p6
|
||||
# 145| 1: [MethodAccess] listOf(...)
|
||||
# 145| 1: [MethodCall] listOf(...)
|
||||
# 145| -2: [TypeAccess] S
|
||||
# 145| -1: [TypeAccess] CollectionsKt
|
||||
# 145| 0: [VarAccess] p1
|
||||
# 145| 5: [ReturnStmt] return ...
|
||||
# 145| 0: [MethodAccess] f(...)
|
||||
# 145| 0: [MethodCall] f(...)
|
||||
# 145| -1: [VarAccess] p0
|
||||
# 145| 0: [VarAccess] p1
|
||||
# 145| 1: [VarAccess] p2
|
||||
@@ -1380,7 +1380,7 @@ test.kt:
|
||||
# 149| 0: [TypeAccess] String
|
||||
# 149| 5: [BlockStmt] { ... }
|
||||
# 150| 0: [ExprStmt] <Expr>;
|
||||
# 150| 0: [MethodAccess] f$default(...)
|
||||
# 150| 0: [MethodCall] f$default(...)
|
||||
# 150| -1: [TypeAccess] TestGenericFunction<>
|
||||
# 150| 0: [VarAccess] inst
|
||||
# 150| 1: [StringLiteral] "generic function sunk"
|
||||
@@ -1392,7 +1392,7 @@ test.kt:
|
||||
# 1| 7: [IntegerLiteral] 1
|
||||
# 1| 8: [NullLiteral] null
|
||||
# 151| 1: [ExprStmt] <Expr>;
|
||||
# 151| 0: [MethodAccess] f$default(...)
|
||||
# 151| 0: [MethodCall] f$default(...)
|
||||
# 151| -1: [TypeAccess] TestGenericFunction<>
|
||||
# 151| 0: [VarAccess] inst
|
||||
# 151| 1: [StringLiteral] "generic function sunk fp"
|
||||
@@ -1445,7 +1445,7 @@ test.kt:
|
||||
# 158| 0: [VarAccess] p2
|
||||
# 158| 1: [IntegerLiteral] 0
|
||||
# 158| 1: [ReturnStmt] return ...
|
||||
# 158| 0: [MethodAccess] f(...)
|
||||
# 158| 0: [MethodCall] f(...)
|
||||
# 158| -1: [VarAccess] p0
|
||||
# 158| 0: [VarAccess] p1
|
||||
# 158| 1: [VarAccess] p2
|
||||
@@ -1486,7 +1486,7 @@ test.kt:
|
||||
# 159| 0: [VarAccess] p2
|
||||
# 159| 1: [IntegerLiteral] 0
|
||||
# 159| 1: [ReturnStmt] return ...
|
||||
# 159| 0: [MethodAccess] g$main(...)
|
||||
# 159| 0: [MethodCall] g$main(...)
|
||||
# 159| -1: [VarAccess] p0
|
||||
# 159| 0: [VarAccess] p1
|
||||
# 159| 1: [VarAccess] p2
|
||||
@@ -1527,7 +1527,7 @@ test.kt:
|
||||
# 160| 0: [VarAccess] p2
|
||||
# 160| 1: [IntegerLiteral] 0
|
||||
# 160| 1: [ReturnStmt] return ...
|
||||
# 160| 0: [MethodAccess] h(...)
|
||||
# 160| 0: [MethodCall] h(...)
|
||||
# 160| -1: [VarAccess] p0
|
||||
# 160| 0: [VarAccess] p1
|
||||
# 160| 1: [VarAccess] p2
|
||||
@@ -1568,7 +1568,7 @@ test.kt:
|
||||
# 161| 0: [VarAccess] p2
|
||||
# 161| 1: [IntegerLiteral] 0
|
||||
# 161| 1: [ReturnStmt] return ...
|
||||
# 161| 0: [MethodAccess] i(...)
|
||||
# 161| 0: [MethodCall] i(...)
|
||||
# 161| -1: [VarAccess] p0
|
||||
# 161| 0: [VarAccess] p1
|
||||
# 161| 1: [VarAccess] p2
|
||||
@@ -1610,13 +1610,13 @@ test.kt:
|
||||
# 171| 1: [ExprStmt] <Expr>;
|
||||
# 171| 0: [AssignExpr] ...=...
|
||||
# 171| 0: [VarAccess] p2
|
||||
# 171| 1: [MethodAccess] ident(...)
|
||||
# 171| 1: [MethodCall] ident(...)
|
||||
# 171| -1: [ClassInstanceExpr] new TestGenericUsedWithinDefaultValue<String>(...)
|
||||
# 171| -3: [TypeAccess] TestGenericUsedWithinDefaultValue<String>
|
||||
# 171| 0: [TypeAccess] String
|
||||
# 171| 0: [StringLiteral] "Hello world"
|
||||
# 171| 1: [ReturnStmt] return ...
|
||||
# 171| 0: [MethodAccess] f(...)
|
||||
# 171| 0: [MethodCall] f(...)
|
||||
# 171| -1: [VarAccess] p0
|
||||
# 171| 0: [VarAccess] p1
|
||||
# 171| 1: [VarAccess] p2
|
||||
@@ -1666,7 +1666,7 @@ test.kt:
|
||||
# 179| 0: [VarAccess] p2
|
||||
# 179| 1: [StringLiteral] "Hello world"
|
||||
# 179| 1: [ReturnStmt] return ...
|
||||
# 179| 0: [MethodAccess] f(...)
|
||||
# 179| 0: [MethodCall] f(...)
|
||||
# 179| -1: [VarAccess] p0
|
||||
# 179| 0: [VarAccess] p1
|
||||
# 179| 1: [VarAccess] p2
|
||||
@@ -1703,7 +1703,7 @@ test.kt:
|
||||
# 180| 0: [VarAccess] p2
|
||||
# 180| 1: [IntegerLiteral] 0
|
||||
# 180| 1: [ReturnStmt] return ...
|
||||
# 180| 0: [MethodAccess] f(...)
|
||||
# 180| 0: [MethodCall] f(...)
|
||||
# 180| -1: [VarAccess] p0
|
||||
# 180| 0: [VarAccess] p1
|
||||
# 180| 1: [VarAccess] p2
|
||||
@@ -1720,6 +1720,6 @@ test.kt:
|
||||
# 226| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 226| 1: [BlockStmt] { ... }
|
||||
# 228| 0: [ExprStmt] <Expr>;
|
||||
# 228| 0: [MethodAccess] sink(...)
|
||||
# 228| 0: [MethodCall] sink(...)
|
||||
# 228| -1: [TypeAccess] TestKt
|
||||
# 228| 0: [VarAccess] x
|
||||
|
||||
@@ -8,19 +8,19 @@ reflection.kt:
|
||||
# 46| 0: [TypeAccess] String
|
||||
# 47| 5: [BlockStmt] { ... }
|
||||
# 47| 0: [ReturnStmt] return ...
|
||||
# 47| 0: [MethodAccess] charAt(...)
|
||||
# 47| 0: [MethodCall] charAt(...)
|
||||
# 47| -1: [ExtensionReceiverAccess] this
|
||||
# 47| 0: [SubExpr] ... - ...
|
||||
# 47| 0: [MethodAccess] length(...)
|
||||
# 47| 0: [MethodCall] length(...)
|
||||
# 47| -1: [ExtensionReceiverAccess] this
|
||||
# 47| 1: [IntegerLiteral] 1
|
||||
# 49| 2: [Method] fn2
|
||||
# 49| 3: [TypeAccess] Unit
|
||||
# 49| 5: [BlockStmt] { ... }
|
||||
# 50| 0: [ExprStmt] <Expr>;
|
||||
# 50| 0: [MethodAccess] println(...)
|
||||
# 50| 0: [MethodCall] println(...)
|
||||
# 50| -1: [TypeAccess] ConsoleKt
|
||||
# 50| 0: [MethodAccess] get(...)
|
||||
# 50| 0: [MethodCall] get(...)
|
||||
# 50| -1: [PropertyRefExpr] ...::...
|
||||
# 50| -4: [AnonymousClass] new KProperty1<String,Character>(...) { ... }
|
||||
# 50| 1: [Constructor]
|
||||
@@ -31,7 +31,7 @@ reflection.kt:
|
||||
# 50| 0: [Parameter] a0
|
||||
# 50| 5: [BlockStmt] { ... }
|
||||
# 50| 0: [ReturnStmt] return ...
|
||||
# 50| 0: [MethodAccess] getLastChar(...)
|
||||
# 50| 0: [MethodCall] getLastChar(...)
|
||||
# 50| -1: [TypeAccess] ReflectionKt
|
||||
# 50| 0: [VarAccess] a0
|
||||
# 50| 3: [Method] invoke
|
||||
@@ -39,7 +39,7 @@ reflection.kt:
|
||||
# 50| 0: [Parameter] a0
|
||||
# 50| 5: [BlockStmt] { ... }
|
||||
# 50| 0: [ReturnStmt] return ...
|
||||
# 50| 0: [MethodAccess] get(...)
|
||||
# 50| 0: [MethodCall] get(...)
|
||||
# 50| -1: [ThisAccess] this
|
||||
# 50| 0: [VarAccess] a0
|
||||
# 50| -3: [TypeAccess] KProperty1<String,Character>
|
||||
@@ -47,9 +47,9 @@ reflection.kt:
|
||||
# 50| 1: [TypeAccess] Character
|
||||
# 50| 0: [StringLiteral] "abc"
|
||||
# 51| 1: [ExprStmt] <Expr>;
|
||||
# 51| 0: [MethodAccess] println(...)
|
||||
# 51| 0: [MethodCall] println(...)
|
||||
# 51| -1: [TypeAccess] ConsoleKt
|
||||
# 51| 0: [MethodAccess] get(...)
|
||||
# 51| 0: [MethodCall] get(...)
|
||||
# 51| -1: [PropertyRefExpr] ...::...
|
||||
# 51| -4: [AnonymousClass] new KProperty0<Character>(...) { ... }
|
||||
# 51| 1: [Constructor]
|
||||
@@ -67,14 +67,14 @@ reflection.kt:
|
||||
# 51| 3: [Method] get
|
||||
# 51| 5: [BlockStmt] { ... }
|
||||
# 51| 0: [ReturnStmt] return ...
|
||||
# 51| 0: [MethodAccess] getLastChar(...)
|
||||
# 51| 0: [MethodCall] getLastChar(...)
|
||||
# 51| -1: [TypeAccess] ReflectionKt
|
||||
# 51| 0: [VarAccess] this.<extensionReceiver>
|
||||
# 51| -1: [ThisAccess] this
|
||||
# 51| 4: [Method] invoke
|
||||
# 51| 5: [BlockStmt] { ... }
|
||||
# 51| 0: [ReturnStmt] return ...
|
||||
# 51| 0: [MethodAccess] get(...)
|
||||
# 51| 0: [MethodCall] get(...)
|
||||
# 51| -1: [ThisAccess] this
|
||||
# 51| -3: [TypeAccess] KProperty0<Character>
|
||||
# 51| 0: [TypeAccess] Character
|
||||
@@ -89,7 +89,7 @@ reflection.kt:
|
||||
# 54| 0: [TypeAccess] T2
|
||||
# 54| 5: [BlockStmt] { ... }
|
||||
# 54| 0: [ReturnStmt] return ...
|
||||
# 54| 0: [MethodAccess] toString(...)
|
||||
# 54| 0: [MethodCall] toString(...)
|
||||
# 54| -1: [ExtensionReceiverAccess] this
|
||||
# 56| 4: [ExtensionMethod] ext2
|
||||
# 56| 3: [TypeAccess] String
|
||||
@@ -99,7 +99,7 @@ reflection.kt:
|
||||
# 56| 0: [TypeAccess] Integer
|
||||
# 56| 5: [BlockStmt] { ... }
|
||||
# 56| 0: [ReturnStmt] return ...
|
||||
# 56| 0: [MethodAccess] toString(...)
|
||||
# 56| 0: [MethodCall] toString(...)
|
||||
# 56| -1: [ExtensionReceiverAccess] this
|
||||
# 94| 5: [Method] fn
|
||||
#-----| 2: (Generic Parameters)
|
||||
@@ -113,7 +113,7 @@ reflection.kt:
|
||||
# 96| 3: [TypeAccess] Unit
|
||||
# 96| 5: [BlockStmt] { ... }
|
||||
# 97| 0: [ExprStmt] <Expr>;
|
||||
# 97| 0: [MethodAccess] fn11(...)
|
||||
# 97| 0: [MethodCall] fn11(...)
|
||||
# 97| -3: [TypeAccess] Class2<String>
|
||||
# 97| 0: [TypeAccess] String
|
||||
# 97| -2: [TypeAccess] String
|
||||
@@ -139,7 +139,7 @@ reflection.kt:
|
||||
# 97| 1: [TypeAccess] Class2<String>
|
||||
# 97| 0: [TypeAccess] String
|
||||
# 98| 1: [ExprStmt] <Expr>;
|
||||
# 98| 0: [MethodAccess] fn11(...)
|
||||
# 98| 0: [MethodCall] fn11(...)
|
||||
# 98| -3: [TypeAccess] Unit
|
||||
# 98| -2: [TypeAccess] String
|
||||
# 98| -1: [TypeAccess] ReflectionKt
|
||||
@@ -155,7 +155,7 @@ reflection.kt:
|
||||
# 98| 0: [Parameter] a0
|
||||
# 98| 5: [BlockStmt] { ... }
|
||||
# 98| 0: [ReturnStmt] return ...
|
||||
# 98| 0: [MethodAccess] fn(...)
|
||||
# 98| 0: [MethodCall] fn(...)
|
||||
# 98| -2: [TypeAccess] String
|
||||
# 98| -1: [TypeAccess] ReflectionKt
|
||||
# 98| 0: [VarAccess] a0
|
||||
@@ -163,7 +163,7 @@ reflection.kt:
|
||||
# 98| 0: [TypeAccess] String
|
||||
# 98| 1: [TypeAccess] Unit
|
||||
# 99| 2: [ExprStmt] <Expr>;
|
||||
# 99| 0: [MethodAccess] fn12(...)
|
||||
# 99| 0: [MethodCall] fn12(...)
|
||||
# 99| -3: [TypeAccess] Inner<String>
|
||||
# 99| 0: [TypeAccess] String
|
||||
# 99| 1: [TypeAccess] Integer
|
||||
@@ -248,13 +248,13 @@ reflection.kt:
|
||||
# 123| 0: [TypeAccess] Unit
|
||||
# 123| 5: [BlockStmt] { ... }
|
||||
# 123| 0: [ReturnStmt] return ...
|
||||
# 123| 0: [MethodAccess] invoke(...)
|
||||
# 123| 0: [MethodCall] invoke(...)
|
||||
# 123| -1: [VarAccess] f
|
||||
# 125| 11: [Method] adapted
|
||||
# 125| 3: [TypeAccess] Unit
|
||||
# 125| 5: [BlockStmt] { ... }
|
||||
# 126| 0: [ExprStmt] <Expr>;
|
||||
# 126| 0: [MethodAccess] fn2(...)
|
||||
# 126| 0: [MethodCall] fn2(...)
|
||||
# 126| -1: [TypeAccess] ReflectionKt
|
||||
# 126| 0: [StmtExpr] <Stmt>
|
||||
# 126| 0: [BlockStmt] { ... }
|
||||
@@ -269,7 +269,7 @@ reflection.kt:
|
||||
# 126| 0: [ExprStmt] <Expr>;
|
||||
# 126| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 126| 0: [TypeAccess] Unit
|
||||
# 126| 1: [MethodAccess] fn1(...)
|
||||
# 126| 1: [MethodCall] fn1(...)
|
||||
# 126| -1: [TypeAccess] ReflectionKt
|
||||
# 126| 1: [ExprStmt] <Expr>;
|
||||
# 126| 0: [MemberRefExpr] ...::...
|
||||
@@ -281,7 +281,7 @@ reflection.kt:
|
||||
# 126| 2: [Method] invoke
|
||||
# 126| 5: [BlockStmt] { ... }
|
||||
# 126| 0: [ReturnStmt] return ...
|
||||
# 126| 0: [MethodAccess] fn1(...)
|
||||
# 126| 0: [MethodCall] fn1(...)
|
||||
# 126| -1: [ClassInstanceExpr] new (...)
|
||||
# 126| -3: [TypeAccess] Object
|
||||
# 126| -3: [TypeAccess] Function0<Unit>
|
||||
@@ -296,7 +296,7 @@ reflection.kt:
|
||||
# 129| 1: [TypeAccess] Integer
|
||||
# 129| 5: [BlockStmt] { ... }
|
||||
# 129| 0: [ReturnStmt] return ...
|
||||
# 129| 0: [MethodAccess] invoke(...)
|
||||
# 129| 0: [MethodCall] invoke(...)
|
||||
# 129| -1: [VarAccess] f
|
||||
# 129| 0: [IntegerLiteral] 0
|
||||
# 131| 13: [Method] takesOptionalParam
|
||||
@@ -334,7 +334,7 @@ reflection.kt:
|
||||
# 131| 0: [VarAccess] p1
|
||||
# 131| 1: [IntegerLiteral] 0
|
||||
# 131| 1: [ReturnStmt] return ...
|
||||
# 131| 0: [MethodAccess] takesOptionalParam(...)
|
||||
# 131| 0: [MethodCall] takesOptionalParam(...)
|
||||
# 131| -1: [TypeAccess] ReflectionKt
|
||||
# 131| 0: [VarAccess] p0
|
||||
# 131| 1: [VarAccess] p1
|
||||
@@ -344,7 +344,7 @@ reflection.kt:
|
||||
# 134| 0: [ExprStmt] <Expr>;
|
||||
# 134| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 134| 0: [TypeAccess] Unit
|
||||
# 134| 1: [MethodAccess] expectsOneParam(...)
|
||||
# 134| 1: [MethodCall] expectsOneParam(...)
|
||||
# 134| -1: [TypeAccess] ReflectionKt
|
||||
# 134| 0: [StmtExpr] <Stmt>
|
||||
# 134| 0: [BlockStmt] { ... }
|
||||
@@ -360,7 +360,7 @@ reflection.kt:
|
||||
# 134| 0: [TypeAccess] int
|
||||
# 134| 5: [BlockStmt] { ... }
|
||||
# 134| 0: [ReturnStmt] return ...
|
||||
# 134| 0: [MethodAccess] takesOptionalParam$default(...)
|
||||
# 134| 0: [MethodCall] takesOptionalParam$default(...)
|
||||
# 134| -1: [TypeAccess] ReflectionKt
|
||||
# 134| 0: [VarAccess] p0
|
||||
# 1| 1: [IntegerLiteral] 0
|
||||
@@ -378,7 +378,7 @@ reflection.kt:
|
||||
# 134| 0: [Parameter] a0
|
||||
# 134| 5: [BlockStmt] { ... }
|
||||
# 134| 0: [ReturnStmt] return ...
|
||||
# 134| 0: [MethodAccess] takesOptionalParam(...)
|
||||
# 134| 0: [MethodCall] takesOptionalParam(...)
|
||||
# 134| -1: [ClassInstanceExpr] new (...)
|
||||
# 134| -3: [TypeAccess] Object
|
||||
# 134| 0: [VarAccess] a0
|
||||
@@ -405,7 +405,7 @@ reflection.kt:
|
||||
# 144| 0: [ExprStmt] <Expr>;
|
||||
# 144| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 144| 0: [TypeAccess] Unit
|
||||
# 144| 1: [MethodAccess] expectsOneParam(...)
|
||||
# 144| 1: [MethodCall] expectsOneParam(...)
|
||||
# 144| -1: [TypeAccess] ReflectionKt
|
||||
# 144| 0: [StmtExpr] <Stmt>
|
||||
# 144| 0: [BlockStmt] { ... }
|
||||
@@ -423,7 +423,7 @@ reflection.kt:
|
||||
# 144| 0: [TypeAccess] int
|
||||
# 144| 5: [BlockStmt] { ... }
|
||||
# 144| 0: [ReturnStmt] return ...
|
||||
# 144| 0: [MethodAccess] takesOptionalParam$default(...)
|
||||
# 144| 0: [MethodCall] takesOptionalParam$default(...)
|
||||
# 144| -1: [TypeAccess] MemberOptionalsTest
|
||||
# 144| 0: [ExtensionReceiverAccess] this
|
||||
# 144| 1: [VarAccess] p0
|
||||
@@ -451,7 +451,7 @@ reflection.kt:
|
||||
# 144| 0: [Parameter] a0
|
||||
# 144| 5: [BlockStmt] { ... }
|
||||
# 144| 0: [ReturnStmt] return ...
|
||||
# 144| 0: [MethodAccess] takesOptionalParam(...)
|
||||
# 144| 0: [MethodCall] takesOptionalParam(...)
|
||||
# 144| -1: [ClassInstanceExpr] new (...)
|
||||
# 144| -3: [TypeAccess] Object
|
||||
# 144| 0: [VarAccess] this.<extensionReceiver>
|
||||
@@ -462,7 +462,7 @@ reflection.kt:
|
||||
# 144| 1: [TypeAccess] Integer
|
||||
# 144| 0: [VarAccess] m
|
||||
# 145| 1: [ExprStmt] <Expr>;
|
||||
# 145| 0: [MethodAccess] expectsOneParamAndReceiver(...)
|
||||
# 145| 0: [MethodCall] expectsOneParamAndReceiver(...)
|
||||
# 145| -1: [TypeAccess] ReflectionKt
|
||||
# 145| 0: [StmtExpr] <Stmt>
|
||||
# 145| 0: [BlockStmt] { ... }
|
||||
@@ -480,7 +480,7 @@ reflection.kt:
|
||||
# 145| 0: [TypeAccess] int
|
||||
# 145| 5: [BlockStmt] { ... }
|
||||
# 145| 0: [ReturnStmt] return ...
|
||||
# 145| 0: [MethodAccess] takesOptionalParam$default(...)
|
||||
# 145| 0: [MethodCall] takesOptionalParam$default(...)
|
||||
# 145| -1: [TypeAccess] MemberOptionalsTest
|
||||
# 145| 0: [VarAccess] p0
|
||||
# 145| 1: [VarAccess] p1
|
||||
@@ -500,7 +500,7 @@ reflection.kt:
|
||||
# 145| 1: [Parameter] a1
|
||||
# 145| 5: [BlockStmt] { ... }
|
||||
# 145| 0: [ReturnStmt] return ...
|
||||
# 145| 0: [MethodAccess] takesOptionalParam(...)
|
||||
# 145| 0: [MethodCall] takesOptionalParam(...)
|
||||
# 145| -1: [ClassInstanceExpr] new (...)
|
||||
# 145| -3: [TypeAccess] Object
|
||||
# 145| 0: [VarAccess] a0
|
||||
@@ -559,7 +559,7 @@ reflection.kt:
|
||||
# 150| 0: [VarAccess] p2
|
||||
# 150| 1: [IntegerLiteral] 0
|
||||
# 150| 1: [ReturnStmt] return ...
|
||||
# 150| 0: [MethodAccess] extTakesOptionalParam(...)
|
||||
# 150| 0: [MethodCall] extTakesOptionalParam(...)
|
||||
# 150| -1: [TypeAccess] ReflectionKt
|
||||
# 150| 0: [ExtensionReceiverAccess] this
|
||||
# 150| 1: [VarAccess] p1
|
||||
@@ -573,7 +573,7 @@ reflection.kt:
|
||||
# 153| 0: [ExprStmt] <Expr>;
|
||||
# 153| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 153| 0: [TypeAccess] Unit
|
||||
# 153| 1: [MethodAccess] expectsOneParam(...)
|
||||
# 153| 1: [MethodCall] expectsOneParam(...)
|
||||
# 153| -1: [TypeAccess] ReflectionKt
|
||||
# 153| 0: [StmtExpr] <Stmt>
|
||||
# 153| 0: [BlockStmt] { ... }
|
||||
@@ -591,7 +591,7 @@ reflection.kt:
|
||||
# 153| 0: [TypeAccess] int
|
||||
# 153| 5: [BlockStmt] { ... }
|
||||
# 153| 0: [ReturnStmt] return ...
|
||||
# 153| 0: [MethodAccess] extTakesOptionalParam$default(...)
|
||||
# 153| 0: [MethodCall] extTakesOptionalParam$default(...)
|
||||
# 153| -1: [TypeAccess] ReflectionKt
|
||||
# 153| 0: [ExtensionReceiverAccess] this
|
||||
# 153| 1: [VarAccess] p0
|
||||
@@ -619,7 +619,7 @@ reflection.kt:
|
||||
# 153| 0: [Parameter] a0
|
||||
# 153| 5: [BlockStmt] { ... }
|
||||
# 153| 0: [ReturnStmt] return ...
|
||||
# 153| 0: [MethodAccess] extTakesOptionalParam(...)
|
||||
# 153| 0: [MethodCall] extTakesOptionalParam(...)
|
||||
# 153| -1: [ClassInstanceExpr] new (...)
|
||||
# 153| -3: [TypeAccess] Object
|
||||
# 153| 0: [VarAccess] this.<extensionReceiver>
|
||||
@@ -630,7 +630,7 @@ reflection.kt:
|
||||
# 153| 1: [TypeAccess] Integer
|
||||
# 153| 0: [VarAccess] s
|
||||
# 154| 1: [ExprStmt] <Expr>;
|
||||
# 154| 0: [MethodAccess] expectsOneParamAndExtension(...)
|
||||
# 154| 0: [MethodCall] expectsOneParamAndExtension(...)
|
||||
# 154| -1: [TypeAccess] ReflectionKt
|
||||
# 154| 0: [StmtExpr] <Stmt>
|
||||
# 154| 0: [BlockStmt] { ... }
|
||||
@@ -648,7 +648,7 @@ reflection.kt:
|
||||
# 154| 0: [TypeAccess] int
|
||||
# 154| 5: [BlockStmt] { ... }
|
||||
# 154| 0: [ReturnStmt] return ...
|
||||
# 154| 0: [MethodAccess] extTakesOptionalParam$default(...)
|
||||
# 154| 0: [MethodCall] extTakesOptionalParam$default(...)
|
||||
# 154| -1: [TypeAccess] ReflectionKt
|
||||
# 154| 0: [VarAccess] p0
|
||||
# 154| 1: [VarAccess] p1
|
||||
@@ -668,7 +668,7 @@ reflection.kt:
|
||||
# 154| 1: [Parameter] a1
|
||||
# 154| 5: [BlockStmt] { ... }
|
||||
# 154| 0: [ReturnStmt] return ...
|
||||
# 154| 0: [MethodAccess] extTakesOptionalParam(...)
|
||||
# 154| 0: [MethodCall] extTakesOptionalParam(...)
|
||||
# 154| -1: [ClassInstanceExpr] new (...)
|
||||
# 154| -3: [TypeAccess] Object
|
||||
# 154| 0: [VarAccess] a0
|
||||
@@ -687,7 +687,7 @@ reflection.kt:
|
||||
# 159| 1: [TypeAccess] ConstructorOptional
|
||||
# 159| 5: [BlockStmt] { ... }
|
||||
# 159| 0: [ReturnStmt] return ...
|
||||
# 159| 0: [MethodAccess] invoke(...)
|
||||
# 159| 0: [MethodCall] invoke(...)
|
||||
# 159| -1: [VarAccess] f
|
||||
# 159| 0: [IntegerLiteral] 0
|
||||
# 161| 23: [Method] constructorAdaptedParams
|
||||
@@ -696,7 +696,7 @@ reflection.kt:
|
||||
# 162| 0: [ExprStmt] <Expr>;
|
||||
# 162| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
|
||||
# 162| 0: [TypeAccess] Unit
|
||||
# 162| 1: [MethodAccess] expectsOneParamCons(...)
|
||||
# 162| 1: [MethodCall] expectsOneParamCons(...)
|
||||
# 162| -1: [TypeAccess] ReflectionKt
|
||||
# 162| 0: [StmtExpr] <Stmt>
|
||||
# 162| 0: [BlockStmt] { ... }
|
||||
@@ -730,7 +730,7 @@ reflection.kt:
|
||||
# 162| 0: [Parameter] a0
|
||||
# 162| 5: [BlockStmt] { ... }
|
||||
# 162| 0: [ReturnStmt] return ...
|
||||
# 162| 0: [MethodAccess] <init>(...)
|
||||
# 162| 0: [MethodCall] <init>(...)
|
||||
# 162| -1: [ClassInstanceExpr] new (...)
|
||||
# 162| -3: [TypeAccess] Object
|
||||
# 162| 0: [VarAccess] a0
|
||||
@@ -759,7 +759,7 @@ reflection.kt:
|
||||
# 7| 1: [Parameter] a1
|
||||
# 7| 5: [BlockStmt] { ... }
|
||||
# 7| 0: [ReturnStmt] return ...
|
||||
# 7| 0: [MethodAccess] m(...)
|
||||
# 7| 0: [MethodCall] m(...)
|
||||
# 7| -1: [VarAccess] a0
|
||||
# 7| 0: [VarAccess] a1
|
||||
# 7| -3: [TypeAccess] Function2<Ccc,Integer,Double>
|
||||
@@ -767,9 +767,9 @@ reflection.kt:
|
||||
# 7| 1: [TypeAccess] Integer
|
||||
# 7| 2: [TypeAccess] Double
|
||||
# 8| 1: [ExprStmt] <Expr>;
|
||||
# 8| 0: [MethodAccess] println(...)
|
||||
# 8| 0: [MethodCall] println(...)
|
||||
# 8| -1: [TypeAccess] ConsoleKt
|
||||
# 8| 0: [MethodAccess] getName(...)
|
||||
# 8| 0: [MethodCall] getName(...)
|
||||
# 8| -1: [VarAccess] ref
|
||||
# 10| 2: [LocalVariableDeclStmt] var ...;
|
||||
# 10| 1: [LocalVariableDeclExpr] x0
|
||||
@@ -783,14 +783,14 @@ reflection.kt:
|
||||
# 10| 0: [Parameter] a0
|
||||
# 10| 5: [BlockStmt] { ... }
|
||||
# 10| 0: [ReturnStmt] return ...
|
||||
# 10| 0: [MethodAccess] getP0(...)
|
||||
# 10| 0: [MethodCall] getP0(...)
|
||||
# 10| -1: [VarAccess] a0
|
||||
# 10| 3: [Method] invoke
|
||||
#-----| 4: (Parameters)
|
||||
# 10| 0: [Parameter] a0
|
||||
# 10| 5: [BlockStmt] { ... }
|
||||
# 10| 0: [ReturnStmt] return ...
|
||||
# 10| 0: [MethodAccess] get(...)
|
||||
# 10| 0: [MethodCall] get(...)
|
||||
# 10| -1: [ThisAccess] this
|
||||
# 10| 0: [VarAccess] a0
|
||||
# 10| -3: [TypeAccess] KProperty1<C,Integer>
|
||||
@@ -798,17 +798,17 @@ reflection.kt:
|
||||
# 10| 1: [TypeAccess] Integer
|
||||
# 11| 3: [LocalVariableDeclStmt] var ...;
|
||||
# 11| 1: [LocalVariableDeclExpr] x1
|
||||
# 11| 0: [MethodAccess] get(...)
|
||||
# 11| 0: [MethodCall] get(...)
|
||||
# 11| -1: [VarAccess] x0
|
||||
# 11| 0: [ClassInstanceExpr] new C(...)
|
||||
# 11| -3: [TypeAccess] C
|
||||
# 12| 4: [LocalVariableDeclStmt] var ...;
|
||||
# 12| 1: [LocalVariableDeclExpr] x2
|
||||
# 12| 0: [MethodAccess] getName(...)
|
||||
# 12| 0: [MethodCall] getName(...)
|
||||
# 12| -1: [VarAccess] x0
|
||||
# 13| 5: [LocalVariableDeclStmt] var ...;
|
||||
# 13| 1: [LocalVariableDeclExpr] x3
|
||||
# 13| 0: [MethodAccess] getGetter(...)
|
||||
# 13| 0: [MethodCall] getGetter(...)
|
||||
# 13| -1: [VarAccess] x0
|
||||
# 14| 6: [LocalVariableDeclStmt] var ...;
|
||||
# 14| 1: [LocalVariableDeclExpr] x4
|
||||
@@ -834,7 +834,7 @@ reflection.kt:
|
||||
# 14| 0: [Parameter] a0
|
||||
# 14| 5: [BlockStmt] { ... }
|
||||
# 14| 0: [ReturnStmt] return ...
|
||||
# 14| 0: [MethodAccess] get(...)
|
||||
# 14| 0: [MethodCall] get(...)
|
||||
# 14| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 14| -1: [ThisAccess] this
|
||||
# 14| 0: [VarAccess] a0
|
||||
@@ -861,13 +861,13 @@ reflection.kt:
|
||||
# 15| 3: [Method] get
|
||||
# 15| 5: [BlockStmt] { ... }
|
||||
# 15| 0: [ReturnStmt] return ...
|
||||
# 15| 0: [MethodAccess] getP0(...)
|
||||
# 15| 0: [MethodCall] getP0(...)
|
||||
# 15| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 15| -1: [ThisAccess] this
|
||||
# 15| 4: [Method] invoke
|
||||
# 15| 5: [BlockStmt] { ... }
|
||||
# 15| 0: [ReturnStmt] return ...
|
||||
# 15| 0: [MethodAccess] get(...)
|
||||
# 15| 0: [MethodCall] get(...)
|
||||
# 15| -1: [ThisAccess] this
|
||||
# 15| -3: [TypeAccess] KProperty0<Integer>
|
||||
# 15| 0: [TypeAccess] Integer
|
||||
@@ -885,14 +885,14 @@ reflection.kt:
|
||||
# 17| 0: [Parameter] a0
|
||||
# 17| 5: [BlockStmt] { ... }
|
||||
# 17| 0: [ReturnStmt] return ...
|
||||
# 17| 0: [MethodAccess] getP1(...)
|
||||
# 17| 0: [MethodCall] getP1(...)
|
||||
# 17| -1: [VarAccess] a0
|
||||
# 17| 3: [Method] invoke
|
||||
#-----| 4: (Parameters)
|
||||
# 17| 0: [Parameter] a0
|
||||
# 17| 5: [BlockStmt] { ... }
|
||||
# 17| 0: [ReturnStmt] return ...
|
||||
# 17| 0: [MethodAccess] get(...)
|
||||
# 17| 0: [MethodCall] get(...)
|
||||
# 17| -1: [ThisAccess] this
|
||||
# 17| 0: [VarAccess] a0
|
||||
# 17| 4: [Method] set
|
||||
@@ -901,7 +901,7 @@ reflection.kt:
|
||||
# 17| 1: [Parameter] a1
|
||||
# 17| 5: [BlockStmt] { ... }
|
||||
# 17| 0: [ReturnStmt] return ...
|
||||
# 17| 0: [MethodAccess] setP1(...)
|
||||
# 17| 0: [MethodCall] setP1(...)
|
||||
# 17| -1: [VarAccess] a0
|
||||
# 17| 0: [VarAccess] a1
|
||||
# 17| -3: [TypeAccess] KMutableProperty1<C,Integer>
|
||||
@@ -909,18 +909,18 @@ reflection.kt:
|
||||
# 17| 1: [TypeAccess] Integer
|
||||
# 18| 9: [LocalVariableDeclStmt] var ...;
|
||||
# 18| 1: [LocalVariableDeclExpr] y1
|
||||
# 18| 0: [MethodAccess] set(...)
|
||||
# 18| 0: [MethodCall] set(...)
|
||||
# 18| -1: [VarAccess] y0
|
||||
# 18| 0: [ClassInstanceExpr] new C(...)
|
||||
# 18| -3: [TypeAccess] C
|
||||
# 18| 1: [IntegerLiteral] 5
|
||||
# 19| 10: [LocalVariableDeclStmt] var ...;
|
||||
# 19| 1: [LocalVariableDeclExpr] y2
|
||||
# 19| 0: [MethodAccess] getName(...)
|
||||
# 19| 0: [MethodCall] getName(...)
|
||||
# 19| -1: [VarAccess] y0
|
||||
# 20| 11: [LocalVariableDeclStmt] var ...;
|
||||
# 20| 1: [LocalVariableDeclExpr] y3
|
||||
# 20| 0: [MethodAccess] getSetter(...)
|
||||
# 20| 0: [MethodCall] getSetter(...)
|
||||
# 20| -1: [VarAccess] y0
|
||||
# 21| 12: [LocalVariableDeclStmt] var ...;
|
||||
# 21| 1: [LocalVariableDeclExpr] y4
|
||||
@@ -947,7 +947,7 @@ reflection.kt:
|
||||
# 21| 1: [Parameter] a1
|
||||
# 21| 5: [BlockStmt] { ... }
|
||||
# 21| 0: [ReturnStmt] return ...
|
||||
# 21| 0: [MethodAccess] set(...)
|
||||
# 21| 0: [MethodCall] set(...)
|
||||
# 21| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 21| -1: [ThisAccess] this
|
||||
# 21| 0: [VarAccess] a0
|
||||
@@ -976,20 +976,20 @@ reflection.kt:
|
||||
# 22| 3: [Method] get
|
||||
# 22| 5: [BlockStmt] { ... }
|
||||
# 22| 0: [ReturnStmt] return ...
|
||||
# 22| 0: [MethodAccess] getP1(...)
|
||||
# 22| 0: [MethodCall] getP1(...)
|
||||
# 22| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 22| -1: [ThisAccess] this
|
||||
# 22| 4: [Method] invoke
|
||||
# 22| 5: [BlockStmt] { ... }
|
||||
# 22| 0: [ReturnStmt] return ...
|
||||
# 22| 0: [MethodAccess] get(...)
|
||||
# 22| 0: [MethodCall] get(...)
|
||||
# 22| -1: [ThisAccess] this
|
||||
# 22| 5: [Method] set
|
||||
#-----| 4: (Parameters)
|
||||
# 22| 0: [Parameter] a0
|
||||
# 22| 5: [BlockStmt] { ... }
|
||||
# 22| 0: [ReturnStmt] return ...
|
||||
# 22| 0: [MethodAccess] setP1(...)
|
||||
# 22| 0: [MethodCall] setP1(...)
|
||||
# 22| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 22| -1: [ThisAccess] this
|
||||
# 22| 0: [VarAccess] a0
|
||||
@@ -1004,10 +1004,10 @@ reflection.kt:
|
||||
# 24| 0: [TypeAccess] C
|
||||
# 24| 1: [TypeAccess] Integer
|
||||
# 24| 2: [TypeAccess] Integer
|
||||
# 24| 1: [MethodAccess] single(...)
|
||||
# 24| 1: [MethodCall] single(...)
|
||||
# 24| -2: [TypeAccess] KCallable<?>
|
||||
# 24| -1: [TypeAccess] CollectionsKt
|
||||
# 24| 0: [MethodAccess] getMembers(...)
|
||||
# 24| 0: [MethodCall] getMembers(...)
|
||||
# 24| -1: [TypeLiteral] C.class
|
||||
# 24| 0: [TypeAccess] C
|
||||
# 24| 1: [LambdaExpr] ...->...
|
||||
@@ -1024,7 +1024,7 @@ reflection.kt:
|
||||
# 24| 5: [BlockStmt] { ... }
|
||||
# 24| 0: [ReturnStmt] return ...
|
||||
# 24| 0: [ValueEQExpr] ... (value equals) ...
|
||||
# 24| 0: [MethodAccess] getName(...)
|
||||
# 24| 0: [MethodCall] getName(...)
|
||||
# 24| -1: [VarAccess] it
|
||||
# 24| 1: [StringLiteral] "p3"
|
||||
# 24| -3: [TypeAccess] Function1<KCallable<?>,Boolean>
|
||||
@@ -1032,7 +1032,7 @@ reflection.kt:
|
||||
# 24| 1: [TypeAccess] Boolean
|
||||
# 25| 15: [LocalVariableDeclStmt] var ...;
|
||||
# 25| 1: [LocalVariableDeclExpr] z0
|
||||
# 25| 0: [MethodAccess] get(...)
|
||||
# 25| 0: [MethodCall] get(...)
|
||||
# 25| -1: [VarAccess] prop
|
||||
# 25| 0: [ClassInstanceExpr] new C(...)
|
||||
# 25| -3: [TypeAccess] C
|
||||
@@ -1130,7 +1130,7 @@ reflection.kt:
|
||||
# 59| 3: [TypeAccess] Unit
|
||||
# 59| 5: [BlockStmt] { ... }
|
||||
# 60| 0: [ExprStmt] <Expr>;
|
||||
# 60| 0: [MethodAccess] println(...)
|
||||
# 60| 0: [MethodCall] println(...)
|
||||
# 60| -1: [TypeAccess] ConsoleKt
|
||||
# 60| 0: [MemberRefExpr] ...::...
|
||||
# 60| -4: [AnonymousClass] new Function2<Generic<Integer>,Integer,String>(...) { ... }
|
||||
@@ -1144,7 +1144,7 @@ reflection.kt:
|
||||
# 60| 1: [Parameter] a1
|
||||
# 60| 5: [BlockStmt] { ... }
|
||||
# 60| 0: [ReturnStmt] return ...
|
||||
# 60| 0: [MethodAccess] m1(...)
|
||||
# 60| 0: [MethodCall] m1(...)
|
||||
# 60| -1: [VarAccess] a0
|
||||
# 60| 0: [VarAccess] a1
|
||||
# 60| -3: [TypeAccess] Function2<Generic<Integer>,Integer,String>
|
||||
@@ -1153,7 +1153,7 @@ reflection.kt:
|
||||
# 60| 1: [TypeAccess] Integer
|
||||
# 60| 2: [TypeAccess] String
|
||||
# 61| 1: [ExprStmt] <Expr>;
|
||||
# 61| 0: [MethodAccess] println(...)
|
||||
# 61| 0: [MethodCall] println(...)
|
||||
# 61| -1: [TypeAccess] ConsoleKt
|
||||
# 61| 0: [MemberRefExpr] ...::...
|
||||
# 61| -4: [AnonymousClass] new Function1<Integer,String>(...) { ... }
|
||||
@@ -1176,7 +1176,7 @@ reflection.kt:
|
||||
# 61| 0: [Parameter] a0
|
||||
# 61| 5: [BlockStmt] { ... }
|
||||
# 61| 0: [ReturnStmt] return ...
|
||||
# 61| 0: [MethodAccess] m1(...)
|
||||
# 61| 0: [MethodCall] m1(...)
|
||||
# 61| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 61| -1: [ThisAccess] this
|
||||
# 61| 0: [VarAccess] a0
|
||||
@@ -1187,7 +1187,7 @@ reflection.kt:
|
||||
# 61| -3: [TypeAccess] Generic<Integer>
|
||||
# 61| 0: [TypeAccess] Integer
|
||||
# 62| 2: [ExprStmt] <Expr>;
|
||||
# 62| 0: [MethodAccess] println(...)
|
||||
# 62| 0: [MethodCall] println(...)
|
||||
# 62| -1: [TypeAccess] ConsoleKt
|
||||
# 62| 0: [MemberRefExpr] ...::...
|
||||
# 62| -4: [AnonymousClass] new Function1<Generic<Integer>,String>(...) { ... }
|
||||
@@ -1200,7 +1200,7 @@ reflection.kt:
|
||||
# 62| 0: [Parameter] a0
|
||||
# 62| 5: [BlockStmt] { ... }
|
||||
# 62| 0: [ReturnStmt] return ...
|
||||
# 62| 0: [MethodAccess] ext1(...)
|
||||
# 62| 0: [MethodCall] ext1(...)
|
||||
# 62| -2: [TypeAccess] Integer
|
||||
# 62| -1: [TypeAccess] ReflectionKt
|
||||
# 62| 0: [VarAccess] a0
|
||||
@@ -1209,7 +1209,7 @@ reflection.kt:
|
||||
# 62| 0: [TypeAccess] Integer
|
||||
# 62| 1: [TypeAccess] String
|
||||
# 63| 3: [ExprStmt] <Expr>;
|
||||
# 63| 0: [MethodAccess] println(...)
|
||||
# 63| 0: [MethodCall] println(...)
|
||||
# 63| -1: [TypeAccess] ConsoleKt
|
||||
# 63| 0: [MemberRefExpr] ...::...
|
||||
# 63| -4: [AnonymousClass] new Function0<String>(...) { ... }
|
||||
@@ -1230,7 +1230,7 @@ reflection.kt:
|
||||
# 63| 3: [Method] invoke
|
||||
# 63| 5: [BlockStmt] { ... }
|
||||
# 63| 0: [ReturnStmt] return ...
|
||||
# 63| 0: [MethodAccess] ext1(...)
|
||||
# 63| 0: [MethodCall] ext1(...)
|
||||
# 63| -2: [TypeAccess] Integer
|
||||
# 63| -1: [TypeAccess] ReflectionKt
|
||||
# 63| 0: [VarAccess] this.<extensionReceiver>
|
||||
@@ -1241,7 +1241,7 @@ reflection.kt:
|
||||
# 63| -3: [TypeAccess] Generic<Integer>
|
||||
# 63| 0: [TypeAccess] Integer
|
||||
# 64| 4: [ExprStmt] <Expr>;
|
||||
# 64| 0: [MethodAccess] println(...)
|
||||
# 64| 0: [MethodCall] println(...)
|
||||
# 64| -1: [TypeAccess] ConsoleKt
|
||||
# 64| 0: [MemberRefExpr] ...::...
|
||||
# 64| -4: [AnonymousClass] new Function1<Generic<Integer>,String>(...) { ... }
|
||||
@@ -1254,7 +1254,7 @@ reflection.kt:
|
||||
# 64| 0: [Parameter] a0
|
||||
# 64| 5: [BlockStmt] { ... }
|
||||
# 64| 0: [ReturnStmt] return ...
|
||||
# 64| 0: [MethodAccess] ext2(...)
|
||||
# 64| 0: [MethodCall] ext2(...)
|
||||
# 64| -1: [TypeAccess] ReflectionKt
|
||||
# 64| 0: [VarAccess] a0
|
||||
# 64| -3: [TypeAccess] Function1<Generic<Integer>,String>
|
||||
@@ -1262,7 +1262,7 @@ reflection.kt:
|
||||
# 64| 0: [TypeAccess] Integer
|
||||
# 64| 1: [TypeAccess] String
|
||||
# 65| 5: [ExprStmt] <Expr>;
|
||||
# 65| 0: [MethodAccess] println(...)
|
||||
# 65| 0: [MethodCall] println(...)
|
||||
# 65| -1: [TypeAccess] ConsoleKt
|
||||
# 65| 0: [MemberRefExpr] ...::...
|
||||
# 65| -4: [AnonymousClass] new Function0<String>(...) { ... }
|
||||
@@ -1283,7 +1283,7 @@ reflection.kt:
|
||||
# 65| 3: [Method] invoke
|
||||
# 65| 5: [BlockStmt] { ... }
|
||||
# 65| 0: [ReturnStmt] return ...
|
||||
# 65| 0: [MethodAccess] ext2(...)
|
||||
# 65| 0: [MethodCall] ext2(...)
|
||||
# 65| -1: [TypeAccess] ReflectionKt
|
||||
# 65| 0: [VarAccess] this.<extensionReceiver>
|
||||
# 65| -1: [ThisAccess] this
|
||||
@@ -1293,7 +1293,7 @@ reflection.kt:
|
||||
# 65| -3: [TypeAccess] Generic<Integer>
|
||||
# 65| 0: [TypeAccess] Integer
|
||||
# 67| 6: [ExprStmt] <Expr>;
|
||||
# 67| 0: [MethodAccess] println(...)
|
||||
# 67| 0: [MethodCall] println(...)
|
||||
# 67| -1: [TypeAccess] ConsoleKt
|
||||
# 67| 0: [PropertyRefExpr] ...::...
|
||||
# 67| -4: [AnonymousClass] new KMutableProperty1<Generic<Integer>,Integer>(...) { ... }
|
||||
@@ -1305,14 +1305,14 @@ reflection.kt:
|
||||
# 67| 0: [Parameter] a0
|
||||
# 67| 5: [BlockStmt] { ... }
|
||||
# 67| 0: [ReturnStmt] return ...
|
||||
# 67| 0: [MethodAccess] getP2(...)
|
||||
# 67| 0: [MethodCall] getP2(...)
|
||||
# 67| -1: [VarAccess] a0
|
||||
# 67| 3: [Method] invoke
|
||||
#-----| 4: (Parameters)
|
||||
# 67| 0: [Parameter] a0
|
||||
# 67| 5: [BlockStmt] { ... }
|
||||
# 67| 0: [ReturnStmt] return ...
|
||||
# 67| 0: [MethodAccess] get(...)
|
||||
# 67| 0: [MethodCall] get(...)
|
||||
# 67| -1: [ThisAccess] this
|
||||
# 67| 0: [VarAccess] a0
|
||||
# 67| 4: [Method] set
|
||||
@@ -1321,7 +1321,7 @@ reflection.kt:
|
||||
# 67| 1: [Parameter] a1
|
||||
# 67| 5: [BlockStmt] { ... }
|
||||
# 67| 0: [ReturnStmt] return ...
|
||||
# 67| 0: [MethodAccess] setP2(...)
|
||||
# 67| 0: [MethodCall] setP2(...)
|
||||
# 67| -1: [VarAccess] a0
|
||||
# 67| 0: [VarAccess] a1
|
||||
# 67| -3: [TypeAccess] KMutableProperty1<Generic<Integer>,Integer>
|
||||
@@ -1329,7 +1329,7 @@ reflection.kt:
|
||||
# 67| 0: [TypeAccess] Integer
|
||||
# 67| 1: [TypeAccess] Integer
|
||||
# 68| 7: [ExprStmt] <Expr>;
|
||||
# 68| 0: [MethodAccess] println(...)
|
||||
# 68| 0: [MethodCall] println(...)
|
||||
# 68| -1: [TypeAccess] ConsoleKt
|
||||
# 68| 0: [PropertyRefExpr] ...::...
|
||||
# 68| -4: [AnonymousClass] new KMutableProperty0<Integer>(...) { ... }
|
||||
@@ -1349,20 +1349,20 @@ reflection.kt:
|
||||
# 68| 3: [Method] get
|
||||
# 68| 5: [BlockStmt] { ... }
|
||||
# 68| 0: [ReturnStmt] return ...
|
||||
# 68| 0: [MethodAccess] getP2(...)
|
||||
# 68| 0: [MethodCall] getP2(...)
|
||||
# 68| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 68| -1: [ThisAccess] this
|
||||
# 68| 4: [Method] invoke
|
||||
# 68| 5: [BlockStmt] { ... }
|
||||
# 68| 0: [ReturnStmt] return ...
|
||||
# 68| 0: [MethodAccess] get(...)
|
||||
# 68| 0: [MethodCall] get(...)
|
||||
# 68| -1: [ThisAccess] this
|
||||
# 68| 5: [Method] set
|
||||
#-----| 4: (Parameters)
|
||||
# 68| 0: [Parameter] a0
|
||||
# 68| 5: [BlockStmt] { ... }
|
||||
# 68| 0: [ReturnStmt] return ...
|
||||
# 68| 0: [MethodAccess] setP2(...)
|
||||
# 68| 0: [MethodCall] setP2(...)
|
||||
# 68| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 68| -1: [ThisAccess] this
|
||||
# 68| 0: [VarAccess] a0
|
||||
@@ -1372,7 +1372,7 @@ reflection.kt:
|
||||
# 68| -3: [TypeAccess] Generic<Integer>
|
||||
# 68| 0: [TypeAccess] Integer
|
||||
# 70| 8: [ExprStmt] <Expr>;
|
||||
# 70| 0: [MethodAccess] println(...)
|
||||
# 70| 0: [MethodCall] println(...)
|
||||
# 70| -1: [TypeAccess] ConsoleKt
|
||||
# 70| 0: [PropertyRefExpr] ...::...
|
||||
# 70| -4: [AnonymousClass] new KProperty0<Integer>(...) { ... }
|
||||
@@ -1391,19 +1391,19 @@ reflection.kt:
|
||||
# 70| 3: [Method] get
|
||||
# 70| 5: [BlockStmt] { ... }
|
||||
# 70| 0: [ReturnStmt] return ...
|
||||
# 70| 0: [MethodAccess] getMAX_VALUE(...)
|
||||
# 70| 0: [MethodCall] getMAX_VALUE(...)
|
||||
# 70| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 70| -1: [ThisAccess] this
|
||||
# 70| 4: [Method] invoke
|
||||
# 70| 5: [BlockStmt] { ... }
|
||||
# 70| 0: [ReturnStmt] return ...
|
||||
# 70| 0: [MethodAccess] get(...)
|
||||
# 70| 0: [MethodCall] get(...)
|
||||
# 70| -1: [ThisAccess] this
|
||||
# 70| -3: [TypeAccess] KProperty0<Integer>
|
||||
# 70| 0: [TypeAccess] Integer
|
||||
# 70| 0: [VarAccess] Companion
|
||||
# 71| 9: [ExprStmt] <Expr>;
|
||||
# 71| 0: [MethodAccess] println(...)
|
||||
# 71| 0: [MethodCall] println(...)
|
||||
# 71| -1: [TypeAccess] ConsoleKt
|
||||
# 71| 0: [PropertyRefExpr] ...::...
|
||||
# 71| -4: [AnonymousClass] new KProperty0<Integer>(...) { ... }
|
||||
@@ -1417,12 +1417,12 @@ reflection.kt:
|
||||
# 71| 3: [Method] invoke
|
||||
# 71| 5: [BlockStmt] { ... }
|
||||
# 71| 0: [ReturnStmt] return ...
|
||||
# 71| 0: [MethodAccess] get(...)
|
||||
# 71| 0: [MethodCall] get(...)
|
||||
# 71| -1: [ThisAccess] this
|
||||
# 71| -3: [TypeAccess] KProperty0<Integer>
|
||||
# 71| 0: [TypeAccess] Integer
|
||||
# 72| 10: [ExprStmt] <Expr>;
|
||||
# 72| 0: [MethodAccess] println(...)
|
||||
# 72| 0: [MethodCall] println(...)
|
||||
# 72| -1: [TypeAccess] ConsoleKt
|
||||
# 72| 0: [PropertyRefExpr] ...::...
|
||||
# 72| -4: [AnonymousClass] new KMutableProperty0<Integer>(...) { ... }
|
||||
@@ -1447,7 +1447,7 @@ reflection.kt:
|
||||
# 72| 4: [Method] invoke
|
||||
# 72| 5: [BlockStmt] { ... }
|
||||
# 72| 0: [ReturnStmt] return ...
|
||||
# 72| 0: [MethodAccess] get(...)
|
||||
# 72| 0: [MethodCall] get(...)
|
||||
# 72| -1: [ThisAccess] this
|
||||
# 72| 5: [Method] set
|
||||
#-----| 4: (Parameters)
|
||||
@@ -1477,7 +1477,7 @@ reflection.kt:
|
||||
# 76| 0: [TypeAccess] T1
|
||||
# 76| 5: [BlockStmt] { ... }
|
||||
# 76| 0: [ReturnStmt] return ...
|
||||
# 76| 0: [MethodAccess] toString(...)
|
||||
# 76| 0: [MethodCall] toString(...)
|
||||
# 76| -1: [ThisAccess] this
|
||||
# 78| 3: [Method] getP2
|
||||
# 78| 3: [TypeAccess] T1
|
||||
@@ -1528,7 +1528,7 @@ reflection.kt:
|
||||
# 89| 3: [TypeAccess] Unit
|
||||
# 89| 5: [BlockStmt] { ... }
|
||||
# 90| 0: [ExprStmt] <Expr>;
|
||||
# 90| 0: [MethodAccess] fn11(...)
|
||||
# 90| 0: [MethodCall] fn11(...)
|
||||
# 90| -3: [TypeAccess] Inner<String>
|
||||
# 90| 0: [TypeAccess] String
|
||||
# 90| 1: [TypeAccess] T
|
||||
@@ -1611,7 +1611,7 @@ reflection.kt:
|
||||
# 108| 3: [TypeAccess] Unit
|
||||
# 108| 5: [BlockStmt] { ... }
|
||||
# 109| 0: [ExprStmt] <Expr>;
|
||||
# 109| 0: [MethodAccess] println(...)
|
||||
# 109| 0: [MethodCall] println(...)
|
||||
# 109| -1: [TypeAccess] ConsoleKt
|
||||
# 109| 0: [PropertyRefExpr] ...::...
|
||||
# 109| -4: [AnonymousClass] new KMutableProperty0<Integer>(...) { ... }
|
||||
@@ -1630,20 +1630,20 @@ reflection.kt:
|
||||
# 109| 3: [Method] get
|
||||
# 109| 5: [BlockStmt] { ... }
|
||||
# 109| 0: [ReturnStmt] return ...
|
||||
# 109| 0: [MethodAccess] getProp1(...)
|
||||
# 109| 0: [MethodCall] getProp1(...)
|
||||
# 109| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 109| -1: [ThisAccess] this
|
||||
# 109| 4: [Method] invoke
|
||||
# 109| 5: [BlockStmt] { ... }
|
||||
# 109| 0: [ReturnStmt] return ...
|
||||
# 109| 0: [MethodAccess] get(...)
|
||||
# 109| 0: [MethodCall] get(...)
|
||||
# 109| -1: [ThisAccess] this
|
||||
# 109| 5: [Method] set
|
||||
#-----| 4: (Parameters)
|
||||
# 109| 0: [Parameter] a0
|
||||
# 109| 5: [BlockStmt] { ... }
|
||||
# 109| 0: [ReturnStmt] return ...
|
||||
# 109| 0: [MethodAccess] setProp1(...)
|
||||
# 109| 0: [MethodCall] setProp1(...)
|
||||
# 109| -1: [VarAccess] this.<dispatchReceiver>
|
||||
# 109| -1: [ThisAccess] this
|
||||
# 109| 0: [VarAccess] a0
|
||||
@@ -1682,7 +1682,7 @@ reflection.kt:
|
||||
# 116| 0: [Parameter] a0
|
||||
# 116| 5: [BlockStmt] { ... }
|
||||
# 116| 0: [ReturnStmt] return ...
|
||||
# 116| 0: [MethodAccess] fn1(...)
|
||||
# 116| 0: [MethodCall] fn1(...)
|
||||
# 116| -1: [ClassInstanceExpr] new (...)
|
||||
# 116| -3: [TypeAccess] Object
|
||||
# 116| 0: [VarAccess] a0
|
||||
@@ -1731,7 +1731,7 @@ reflection.kt:
|
||||
# 140| 0: [VarAccess] p2
|
||||
# 140| 1: [IntegerLiteral] 0
|
||||
# 140| 1: [ReturnStmt] return ...
|
||||
# 140| 0: [MethodAccess] takesOptionalParam(...)
|
||||
# 140| 0: [MethodCall] takesOptionalParam(...)
|
||||
# 140| -1: [VarAccess] p0
|
||||
# 140| 0: [VarAccess] p1
|
||||
# 140| 1: [VarAccess] p2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java
|
||||
import semmle.code.java.Diagnostics
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma, ma.getCallee().getDeclaringType().getQualifiedName(), ma.getCallee().getName()
|
||||
|
||||
query predicate diag(Diagnostic d) { any() }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma.getQualifier(), ma.getQualifier().getAPrimaryQlClass(), ma.getCallee().toString()
|
||||
|
||||
@@ -119,7 +119,7 @@ stmts.kt:
|
||||
# 31| 2: [EnhancedForStmt] for (... : ...)
|
||||
#-----| 0: (Single Local Variable Declaration)
|
||||
# 31| 1: [LocalVariableDeclExpr] i
|
||||
# 31| 1: [MethodAccess] rangeTo(...)
|
||||
# 31| 1: [MethodCall] rangeTo(...)
|
||||
# 31| -1: [VarAccess] x
|
||||
# 31| 0: [VarAccess] y
|
||||
# 31| 2: [BlockStmt] { ... }
|
||||
@@ -134,7 +134,7 @@ stmts.kt:
|
||||
# 35| 0: [EnhancedForStmt] for (... : ...)
|
||||
#-----| 0: (Single Local Variable Declaration)
|
||||
# 35| 1: [LocalVariableDeclExpr] i
|
||||
# 35| 1: [MethodAccess] rangeTo(...)
|
||||
# 35| 1: [MethodCall] rangeTo(...)
|
||||
# 35| -1: [VarAccess] x
|
||||
# 35| 0: [VarAccess] y
|
||||
# 35| 2: [BlockStmt] { ... }
|
||||
@@ -154,20 +154,20 @@ stmts.kt:
|
||||
# 41| 4: [EnhancedForStmt] for (... : ...)
|
||||
#-----| 0: (Single Local Variable Declaration)
|
||||
# 41| 1: [LocalVariableDeclExpr] tmp3_loop_parameter
|
||||
# 41| 1: [MethodAccess] withIndex(...)
|
||||
# 41| 1: [MethodCall] withIndex(...)
|
||||
# 41| -2: [TypeAccess] Integer
|
||||
# 41| -1: [TypeAccess] CollectionsKt
|
||||
# 41| 0: [MethodAccess] rangeTo(...)
|
||||
# 41| 0: [MethodCall] rangeTo(...)
|
||||
# 41| -1: [VarAccess] x
|
||||
# 41| 0: [VarAccess] y
|
||||
# 41| 2: [BlockStmt] { ... }
|
||||
# 41| 0: [LocalVariableDeclStmt] var ...;
|
||||
# 41| 1: [LocalVariableDeclExpr] v
|
||||
# 0| 0: [MethodAccess] component1(...)
|
||||
# 0| 0: [MethodCall] component1(...)
|
||||
# 41| -1: [VarAccess] tmp3_loop_parameter
|
||||
# 41| 1: [LocalVariableDeclStmt] var ...;
|
||||
# 41| 1: [LocalVariableDeclExpr] i
|
||||
# 0| 0: [MethodAccess] component2(...)
|
||||
# 0| 0: [MethodCall] component2(...)
|
||||
# 0| -1: [VarAccess] tmp3_loop_parameter
|
||||
# 41| 2: [BlockStmt] { ... }
|
||||
# 42| 0: [ExprStmt] <Expr>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
| stmts.kt:0:0:0:0 | component1(...) | MethodAccess |
|
||||
| stmts.kt:0:0:0:0 | component2(...) | MethodAccess |
|
||||
| stmts.kt:0:0:0:0 | component1(...) | MethodCall |
|
||||
| stmts.kt:0:0:0:0 | component2(...) | MethodCall |
|
||||
| stmts.kt:0:0:0:0 | tmp3_loop_parameter | VarAccess |
|
||||
| stmts.kt:2:1:20:1 | int | TypeAccess |
|
||||
| stmts.kt:2:20:2:25 | int | TypeAccess |
|
||||
@@ -67,7 +67,7 @@
|
||||
| stmts.kt:28:15:28:15 | y | VarAccess |
|
||||
| stmts.kt:31:10:31:10 | i | LocalVariableDeclExpr |
|
||||
| stmts.kt:31:15:31:15 | x | VarAccess |
|
||||
| stmts.kt:31:15:31:18 | rangeTo(...) | MethodAccess |
|
||||
| stmts.kt:31:15:31:18 | rangeTo(...) | MethodCall |
|
||||
| stmts.kt:31:18:31:18 | y | VarAccess |
|
||||
| stmts.kt:32:9:32:24 | when ... | WhenExpr |
|
||||
| stmts.kt:32:13:32:13 | x | VarAccess |
|
||||
@@ -75,7 +75,7 @@
|
||||
| stmts.kt:32:17:32:17 | y | VarAccess |
|
||||
| stmts.kt:35:18:35:18 | i | LocalVariableDeclExpr |
|
||||
| stmts.kt:35:23:35:23 | x | VarAccess |
|
||||
| stmts.kt:35:23:35:26 | rangeTo(...) | MethodAccess |
|
||||
| stmts.kt:35:23:35:26 | rangeTo(...) | MethodCall |
|
||||
| stmts.kt:35:26:35:26 | y | VarAccess |
|
||||
| stmts.kt:37:13:37:36 | when ... | WhenExpr |
|
||||
| stmts.kt:37:17:37:17 | x | VarAccess |
|
||||
@@ -89,10 +89,10 @@
|
||||
| stmts.kt:41:19:41:36 | tmp3_loop_parameter | LocalVariableDeclExpr |
|
||||
| stmts.kt:41:19:41:36 | tmp3_loop_parameter | VarAccess |
|
||||
| stmts.kt:41:20:41:20 | x | VarAccess |
|
||||
| stmts.kt:41:20:41:23 | rangeTo(...) | MethodAccess |
|
||||
| stmts.kt:41:20:41:23 | rangeTo(...) | MethodCall |
|
||||
| stmts.kt:41:20:41:36 | CollectionsKt | TypeAccess |
|
||||
| stmts.kt:41:20:41:36 | Integer | TypeAccess |
|
||||
| stmts.kt:41:20:41:36 | withIndex(...) | MethodAccess |
|
||||
| stmts.kt:41:20:41:36 | withIndex(...) | MethodCall |
|
||||
| stmts.kt:41:23:41:23 | y | VarAccess |
|
||||
| stmts.kt:42:9:42:24 | when ... | WhenExpr |
|
||||
| stmts.kt:42:13:42:13 | x | VarAccess |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma
|
||||
from MethodCall ma
|
||||
select ma
|
||||
|
||||
@@ -2,9 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) {
|
||||
n.asExpr().(MethodAccess).getMethod().getName() = "source"
|
||||
}
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().getName() = "source" }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
n.asExpr().(Argument).getCall().getCallee().getName() = "sink"
|
||||
|
||||
@@ -7,7 +7,7 @@ module Config implements DataFlow::ConfigSig {
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
n.asExpr() = any(MethodAccess ma | ma.getMethod().getName() = "sink").getAnArgument()
|
||||
n.asExpr() = any(MethodCall ma | ma.getMethod().getName() = "sink").getAnArgument()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ jdk/StringMatch.java:
|
||||
# 4| 3: [TypeAccess] void
|
||||
# 4| 5: [BlockStmt] { ... }
|
||||
# 5| 0: [ExprStmt] <Expr>;
|
||||
# 5| 0: [MethodAccess] matches(...)
|
||||
# 5| 0: [MethodCall] matches(...)
|
||||
# 5| -1: [VarAccess] STR
|
||||
# 5| 0: [StringLiteral] "[a-z]+"
|
||||
# 5| 0: [RegExpPlus] [a-z]+
|
||||
@@ -82,42 +82,42 @@ jdk/StringMatch.java:
|
||||
# 8| 3: [TypeAccess] void
|
||||
# 8| 5: [BlockStmt] { ... }
|
||||
# 9| 0: [ExprStmt] <Expr>;
|
||||
# 9| 0: [MethodAccess] contains(...)
|
||||
# 9| 0: [MethodCall] contains(...)
|
||||
# 9| -1: [VarAccess] STR
|
||||
# 9| 0: [StringLiteral] "the"
|
||||
# 12| 6: [Method] c
|
||||
# 12| 3: [TypeAccess] void
|
||||
# 12| 5: [BlockStmt] { ... }
|
||||
# 13| 0: [ExprStmt] <Expr>;
|
||||
# 13| 0: [MethodAccess] startsWith(...)
|
||||
# 13| 0: [MethodCall] startsWith(...)
|
||||
# 13| -1: [VarAccess] STR
|
||||
# 13| 0: [StringLiteral] "the"
|
||||
# 16| 7: [Method] d
|
||||
# 16| 3: [TypeAccess] void
|
||||
# 16| 5: [BlockStmt] { ... }
|
||||
# 17| 0: [ExprStmt] <Expr>;
|
||||
# 17| 0: [MethodAccess] endsWith(...)
|
||||
# 17| 0: [MethodCall] endsWith(...)
|
||||
# 17| -1: [VarAccess] STR
|
||||
# 17| 0: [StringLiteral] "dog"
|
||||
# 20| 8: [Method] e
|
||||
# 20| 3: [TypeAccess] void
|
||||
# 20| 5: [BlockStmt] { ... }
|
||||
# 21| 0: [ExprStmt] <Expr>;
|
||||
# 21| 0: [MethodAccess] indexOf(...)
|
||||
# 21| 0: [MethodCall] indexOf(...)
|
||||
# 21| -1: [VarAccess] STR
|
||||
# 21| 0: [StringLiteral] "lazy"
|
||||
# 24| 9: [Method] f
|
||||
# 24| 3: [TypeAccess] void
|
||||
# 24| 5: [BlockStmt] { ... }
|
||||
# 25| 0: [ExprStmt] <Expr>;
|
||||
# 25| 0: [MethodAccess] lastIndexOf(...)
|
||||
# 25| 0: [MethodCall] lastIndexOf(...)
|
||||
# 25| -1: [VarAccess] STR
|
||||
# 25| 0: [StringLiteral] "lazy"
|
||||
# 28| 10: [Method] g
|
||||
# 28| 3: [TypeAccess] void
|
||||
# 28| 5: [BlockStmt] { ... }
|
||||
# 29| 0: [ExprStmt] <Expr>;
|
||||
# 29| 0: [MethodAccess] regionMatches(...)
|
||||
# 29| 0: [MethodCall] regionMatches(...)
|
||||
# 29| -1: [VarAccess] STR
|
||||
# 29| 0: [IntegerLiteral] 0
|
||||
# 29| 1: [StringLiteral] "fox"
|
||||
@@ -127,7 +127,7 @@ jdk/StringMatch.java:
|
||||
# 32| 3: [TypeAccess] void
|
||||
# 32| 5: [BlockStmt] { ... }
|
||||
# 33| 0: [ExprStmt] <Expr>;
|
||||
# 33| 0: [MethodAccess] regionMatches(...)
|
||||
# 33| 0: [MethodCall] regionMatches(...)
|
||||
# 33| -1: [VarAccess] STR
|
||||
# 33| 0: [BooleanLiteral] true
|
||||
# 33| 1: [IntegerLiteral] 0
|
||||
@@ -144,14 +144,14 @@ jdk/SystemGetPropertyCall.java:
|
||||
# 6| 3: [TypeAccess] void
|
||||
# 6| 5: [BlockStmt] { ... }
|
||||
# 7| 0: [ExprStmt] <Expr>;
|
||||
# 7| 0: [MethodAccess] getProperty(...)
|
||||
# 7| 0: [MethodCall] getProperty(...)
|
||||
# 7| -1: [TypeAccess] System
|
||||
# 7| 0: [StringLiteral] "user.dir"
|
||||
# 10| 5: [Method] b
|
||||
# 10| 3: [TypeAccess] void
|
||||
# 10| 5: [BlockStmt] { ... }
|
||||
# 11| 0: [ExprStmt] <Expr>;
|
||||
# 11| 0: [MethodAccess] getProperty(...)
|
||||
# 11| 0: [MethodCall] getProperty(...)
|
||||
# 11| -1: [TypeAccess] System
|
||||
# 11| 0: [StringLiteral] "user.dir"
|
||||
# 11| 1: [StringLiteral] "HOME"
|
||||
@@ -159,13 +159,13 @@ jdk/SystemGetPropertyCall.java:
|
||||
# 14| 3: [TypeAccess] void
|
||||
# 14| 5: [BlockStmt] { ... }
|
||||
# 15| 0: [ExprStmt] <Expr>;
|
||||
# 15| 0: [MethodAccess] getProperty(...)
|
||||
# 15| 0: [MethodCall] getProperty(...)
|
||||
# 15| -1: [TypeAccess] System
|
||||
# 15| 0: [VarAccess] USER_DIR_PROPERTY
|
||||
# 18| 7: [Method] d
|
||||
# 18| 3: [TypeAccess] void
|
||||
# 18| 5: [BlockStmt] { ... }
|
||||
# 19| 0: [ExprStmt] <Expr>;
|
||||
# 19| 0: [MethodAccess] getProperty(...)
|
||||
# 19| 0: [MethodCall] getProperty(...)
|
||||
# 19| -1: [TypeAccess] System
|
||||
# 19| 0: [StringLiteral] "random.property"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java
|
||||
|
||||
from MethodAccess ma, StringPartialMatchMethod m
|
||||
from MethodCall ma, StringPartialMatchMethod m
|
||||
where ma.getMethod() = m
|
||||
select ma, ma.getArgument(m.getMatchParameterIndex())
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import java
|
||||
|
||||
from MethodAccessSystemGetProperty ma
|
||||
from MethodCallSystemGetProperty ma
|
||||
where ma.hasCompileTimeConstantGetPropertyName("user.dir")
|
||||
select ma
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import default
|
||||
import semmle.code.java.security.UnsafeDeserializationQuery
|
||||
|
||||
from Method m, MethodAccess ma
|
||||
from Method m, MethodCall ma
|
||||
where ma.getMethod() = m and unsafeDeserialization(ma, _)
|
||||
select ma, m.getDeclaringType().getName()
|
||||
|
||||
@@ -13,7 +13,7 @@ collections/Test.java:
|
||||
# 6| 1: [TypeAccess] Integer
|
||||
# 8| 4: [BlockStmt] { ... }
|
||||
# 9| 0: [ExprStmt] <Expr>;
|
||||
# 9| 0: [MethodAccess] put(...)
|
||||
# 9| 0: [MethodCall] put(...)
|
||||
# 9| -1: [VarAccess] m
|
||||
# 9| 0: [StringLiteral] "key"
|
||||
# 9| 1: [IntegerLiteral] 23
|
||||
|
||||
@@ -28,13 +28,13 @@ constructors/A.java:
|
||||
# 15| 0: [StringLiteral] "instance string"
|
||||
# 17| 8: [BlockStmt] { ... }
|
||||
# 18| 0: [ExprStmt] <Expr>;
|
||||
# 18| 0: [MethodAccess] println(...)
|
||||
# 18| 0: [MethodCall] println(...)
|
||||
# 18| -1: [VarAccess] System.out
|
||||
# 18| -1: [TypeAccess] System
|
||||
# 18| 0: [StringLiteral] "<obinit>"
|
||||
# 21| 9: [BlockStmt] { ... }
|
||||
# 22| 0: [ExprStmt] <Expr>;
|
||||
# 22| 0: [MethodAccess] println(...)
|
||||
# 22| 0: [MethodCall] println(...)
|
||||
# 22| -1: [VarAccess] System.out
|
||||
# 22| -1: [TypeAccess] System
|
||||
# 22| 0: [StringLiteral] "<clinit>"
|
||||
|
||||
@@ -5,7 +5,7 @@ class PathTestConf extends ActionConfiguration {
|
||||
PathTestConf() { this = "PathTestConf" }
|
||||
|
||||
override predicate isAction(ControlFlowNode node) {
|
||||
node.(MethodAccess).getMethod().hasName("action")
|
||||
node.(MethodCall).getMethod().hasName("action")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node src) { src.asExpr() instanceof ClassInstanceExpr }
|
||||
|
||||
predicate isSink(DataFlow::Node sink) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod().hasName("sink") and
|
||||
ma.getAnArgument() = sink.asExpr()
|
||||
)
|
||||
|
||||
@@ -3,10 +3,10 @@ import semmle.code.java.dataflow.DataFlow
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("source") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("source") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ module HasFlowTest implements TestSig {
|
||||
exists(DataFlow::Node src, DataFlow::Node sink | Flow::flow(src, sink) |
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = src.asExpr().(MethodAccess).getAnArgument().toString()
|
||||
value = src.asExpr().(MethodCall).getAnArgument().toString()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ module Flow = DataFlow::Global<Config>;
|
||||
|
||||
int explorationLimit() { result = 100 }
|
||||
|
||||
module PartialFlow = Flow::FlowExploration<explorationLimit/0>;
|
||||
module PartialFlow = Flow::FlowExplorationFwd<explorationLimit/0>;
|
||||
|
||||
from PartialFlow::PartialPathNode src, PartialFlow::PartialPathNode sink
|
||||
where PartialFlow::partialFlow(src, sink, _)
|
||||
|
||||
@@ -8,12 +8,12 @@ module Config implements DataFlow::ConfigSig {
|
||||
or
|
||||
src.asParameter().getCallable().hasName("taintSteps")
|
||||
or
|
||||
src.asExpr() = any(MethodAccess ma | ma.getMethod().hasName("source")).getAnArgument()
|
||||
src.asExpr() = any(MethodCall ma | ma.getMethod().hasName("source")).getAnArgument()
|
||||
)
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node sink) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
sink.asExpr() = ma.getAnArgument() and
|
||||
ma.getMethod().hasName("sink")
|
||||
or
|
||||
|
||||
@@ -12,7 +12,7 @@ module TaintFlowConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n instanceof ThreatModelFlowSource }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node src) { src.asExpr() instanceof ClassInstanceExpr }
|
||||
|
||||
predicate isSink(DataFlow::Node sink) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod().hasName("sink") and
|
||||
ma.getAnArgument() = sink.asExpr()
|
||||
)
|
||||
|
||||
@@ -3,12 +3,12 @@ import semmle.code.java.dataflow.DataFlow
|
||||
import DataFlow
|
||||
|
||||
predicate src0(Node n) {
|
||||
n.asExpr().(MethodAccess).getMethod().hasName("src") or
|
||||
n.asExpr().(MethodCall).getMethod().hasName("src") or
|
||||
n.asExpr().(FieldAccess).getField().hasName("fsrc")
|
||||
}
|
||||
|
||||
predicate sink0(Node n) {
|
||||
exists(MethodAccess sink |
|
||||
exists(MethodCall sink |
|
||||
sink.getMethod().hasName("sink") and
|
||||
sink.getAnArgument() = n.asExpr()
|
||||
)
|
||||
|
||||
@@ -5,14 +5,14 @@ module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node src) {
|
||||
src.asExpr().(VarAccess).getVariable().hasName("args")
|
||||
or
|
||||
src.asExpr().(MethodAccess).getMethod().hasName("source")
|
||||
src.asExpr().(MethodCall).getMethod().hasName("source")
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node sink) {
|
||||
sink.asExpr().(Argument).getCall() =
|
||||
any(MethodAccess ma |
|
||||
any(MethodCall ma |
|
||||
ma.getMethod().hasName("exec") and
|
||||
ma.getQualifier().(MethodAccess).getMethod().hasName("getRuntime")
|
||||
ma.getQualifier().(MethodCall).getMethod().hasName("getRuntime")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ where
|
||||
) and
|
||||
not summaryStep(src, sink)
|
||||
or
|
||||
exists(ArgumentNode arg, MethodAccess call, DataFlow::ParameterNode p, int i |
|
||||
exists(ArgumentNode arg, MethodCall call, DataFlow::ParameterNode p, int i |
|
||||
src = arg and
|
||||
p.isParameterOf(any(DataFlowCallable c |
|
||||
c.asCallable() = call.getMethod().getSourceDeclaration()
|
||||
|
||||
@@ -2,12 +2,10 @@ import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node src) {
|
||||
src.asExpr().(MethodAccess).getMethod().hasName("source")
|
||||
}
|
||||
predicate isSource(DataFlow::Node src) { src.asExpr().(MethodCall).getMethod().hasName("source") }
|
||||
|
||||
predicate isSink(DataFlow::Node sink) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
sink.asExpr() = ma.getAnArgument() and
|
||||
ma.getMethod().hasName("sink")
|
||||
)
|
||||
|
||||
@@ -1,18 +1,10 @@
|
||||
edges
|
||||
| A.java:4:16:4:18 | this <constr(this)> [post update] [elem] | A.java:22:17:22:25 | new Box(...) [elem] |
|
||||
| A.java:5:19:5:22 | elem | A.java:24:10:24:19 | other.elem |
|
||||
| A.java:12:5:12:5 | b [post update] : Box [elem] | A.java:13:12:13:12 | b : Box [elem] |
|
||||
| A.java:12:14:12:18 | src(...) : Object | A.java:12:5:12:5 | b [post update] : Box [elem] |
|
||||
| A.java:12:14:12:18 | src(...) : Object | A.java:12:5:12:18 | ...=... : Object |
|
||||
| A.java:13:12:13:12 | b : Box [elem] | A.java:17:13:17:16 | f1(...) : Box [elem] |
|
||||
| A.java:17:13:17:16 | f1(...) : Box [elem] | A.java:18:8:18:8 | b : Box [elem] |
|
||||
| A.java:18:8:18:8 | b : Box [elem] | A.java:21:11:21:15 | b : Box [elem] |
|
||||
| A.java:22:17:22:25 | new Box(...) [elem] | A.java:23:13:23:17 | other [elem] |
|
||||
| A.java:23:13:23:17 | other [elem] | A.java:24:10:24:14 | other [elem] |
|
||||
| A.java:23:13:23:17 | other [post update] [elem] | A.java:24:10:24:14 | other [elem] |
|
||||
| A.java:24:10:24:14 | other [elem] | A.java:24:10:24:19 | other.elem |
|
||||
| A.java:28:5:28:5 | b [post update] [elem] | A.java:23:13:23:17 | other [post update] [elem] |
|
||||
| A.java:28:14:28:25 | new Object(...) | A.java:28:5:28:5 | b [post update] [elem] |
|
||||
#select
|
||||
| 0 | A.java:12:5:12:5 | b [post update] : Box [elem] |
|
||||
| 0 | A.java:12:5:12:18 | ...=... : Object |
|
||||
|
||||
@@ -3,14 +3,14 @@ import semmle.code.java.dataflow.DataFlow
|
||||
import DataFlow
|
||||
|
||||
module Config implements ConfigSig {
|
||||
predicate isSource(Node n) { n.asExpr().(MethodAccess).getMethod().hasName("src") }
|
||||
predicate isSource(Node n) { n.asExpr().(MethodCall).getMethod().hasName("src") }
|
||||
|
||||
predicate isSink(Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") }
|
||||
}
|
||||
|
||||
int explorationLimit() { result = 10 }
|
||||
|
||||
module PartialFlow = Global<Config>::FlowExploration<explorationLimit/0>;
|
||||
module PartialFlow = Global<Config>::FlowExplorationFwd<explorationLimit/0>;
|
||||
|
||||
import PartialFlow::PartialPathGraph
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
edges
|
||||
| A.java:4:16:4:18 | this <constr(this)> [post update] [elem] | A.java:22:17:22:25 | new Box(...) [elem] |
|
||||
| A.java:5:19:5:22 | elem | A.java:24:10:24:19 | other.elem |
|
||||
| A.java:12:5:12:5 | b [post update] : Box [elem] | A.java:13:12:13:12 | b : Box [elem] |
|
||||
| A.java:12:14:12:18 | src(...) : Object | A.java:12:5:12:5 | b [post update] : Box [elem] |
|
||||
| A.java:12:14:12:18 | src(...) : Object | A.java:12:5:12:18 | ...=... : Object |
|
||||
| A.java:13:12:13:12 | b : Box [elem] | A.java:17:13:17:16 | f1(...) : Box [elem] |
|
||||
| A.java:17:13:17:16 | f1(...) : Box [elem] | A.java:18:8:18:8 | b : Box [elem] |
|
||||
| A.java:18:8:18:8 | b : Box [elem] | A.java:21:11:21:15 | b : Box [elem] |
|
||||
| A.java:22:17:22:25 | new Box(...) [elem] | A.java:23:13:23:17 | other [elem] |
|
||||
| A.java:23:13:23:17 | other [elem] | A.java:24:10:24:14 | other [elem] |
|
||||
| A.java:23:13:23:17 | other [post update] [elem] | A.java:24:10:24:14 | other [elem] |
|
||||
|
||||
@@ -3,17 +3,17 @@ import semmle.code.java.dataflow.DataFlow
|
||||
import DataFlow
|
||||
|
||||
module Config implements ConfigSig {
|
||||
predicate isSource(Node n) { n.asExpr().(MethodAccess).getMethod().hasName("src") }
|
||||
predicate isSource(Node n) { n.asExpr().(MethodCall).getMethod().hasName("src") }
|
||||
|
||||
predicate isSink(Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") }
|
||||
}
|
||||
|
||||
int explorationLimit() { result = 10 }
|
||||
|
||||
module PartialFlow = Global<Config>::FlowExploration<explorationLimit/0>;
|
||||
module PartialFlow = Global<Config>::FlowExplorationRev<explorationLimit/0>;
|
||||
|
||||
import PartialFlow::PartialPathGraph
|
||||
|
||||
from PartialFlow::PartialPathNode n, int dist
|
||||
where PartialFlow::partialFlowRev(n, _, dist)
|
||||
where PartialFlow::partialFlow(n, _, dist)
|
||||
select dist, n
|
||||
|
||||
@@ -2,7 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("source") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("source") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") }
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import TestUtilities.InlineExpectationsTest
|
||||
import DataFlow
|
||||
|
||||
predicate src(Node n, string s) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
n.asExpr() = ma and
|
||||
ma.getMethod().hasName("source") and
|
||||
ma.getAnArgument().(StringLiteral).getValue() = s
|
||||
@@ -12,7 +12,7 @@ predicate src(Node n, string s) {
|
||||
}
|
||||
|
||||
predicate sink(Node n, string s) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod().hasName("sink") and
|
||||
n.asExpr() = ma.getArgument(0) and
|
||||
ma.getArgument(1).(StringLiteral).getValue() = s
|
||||
@@ -20,7 +20,7 @@ predicate sink(Node n, string s) {
|
||||
}
|
||||
|
||||
predicate bar(Node n, string s) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod().hasName("stateBarrier") and
|
||||
n.asExpr() = ma.getArgument(0) and
|
||||
ma.getArgument(1).(StringLiteral).getValue() = s
|
||||
@@ -28,7 +28,7 @@ predicate bar(Node n, string s) {
|
||||
}
|
||||
|
||||
predicate step(Node n1, Node n2, string s1, string s2) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod().hasName("step") and
|
||||
n1.asExpr() = ma.getArgument(0) and
|
||||
ma.getArgument(1).(StringLiteral).getValue() = s1 and
|
||||
@@ -57,7 +57,9 @@ int explorationLimit() { result = 0 }
|
||||
|
||||
module Flow = TaintTracking::GlobalWithState<Config>;
|
||||
|
||||
module PartialFlow = Flow::FlowExploration<explorationLimit/0>;
|
||||
module PartialFlowFwd = Flow::FlowExplorationFwd<explorationLimit/0>;
|
||||
|
||||
module PartialFlowRev = Flow::FlowExplorationRev<explorationLimit/0>;
|
||||
|
||||
module HasFlowTest implements TestSig {
|
||||
string getARelevantTag() { result = ["pFwd", "pRev", "flow"] }
|
||||
@@ -72,8 +74,8 @@ module HasFlowTest implements TestSig {
|
||||
)
|
||||
or
|
||||
tag = "pFwd" and
|
||||
exists(PartialFlow::PartialPathNode src, PartialFlow::PartialPathNode node |
|
||||
PartialFlow::partialFlow(src, node, _) and
|
||||
exists(PartialFlowFwd::PartialPathNode src, PartialFlowFwd::PartialPathNode node |
|
||||
PartialFlowFwd::partialFlow(src, node, _) and
|
||||
checkNode(node.getNode()) and
|
||||
node.getNode().getLocation() = location and
|
||||
element = node.toString() and
|
||||
@@ -81,8 +83,8 @@ module HasFlowTest implements TestSig {
|
||||
)
|
||||
or
|
||||
tag = "pRev" and
|
||||
exists(PartialFlow::PartialPathNode node, PartialFlow::PartialPathNode sink |
|
||||
PartialFlow::partialFlowRev(node, sink, _) and
|
||||
exists(PartialFlowRev::PartialPathNode node, PartialFlowRev::PartialPathNode sink |
|
||||
PartialFlowRev::partialFlow(node, sink, _) and
|
||||
checkNode(node.getNode()) and
|
||||
node.getNode().getLocation() = location and
|
||||
element = node.toString() and
|
||||
|
||||
@@ -2,7 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("source") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("source") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { any() }
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.TaintTracking
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { n.asExpr().(Argument).getCall().getCallee().hasName("sink") }
|
||||
}
|
||||
|
||||
@@ -2,12 +2,10 @@ import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
exists(MethodAccess sink |
|
||||
sink.getAnArgument() = n.asExpr() and sink.getMethod().hasName("sink")
|
||||
)
|
||||
exists(MethodCall sink | sink.getAnArgument() = n.asExpr() and sink.getMethod().hasName("sink"))
|
||||
}
|
||||
|
||||
predicate isAdditionalFlowStep(DataFlow::Node n1, DataFlow::Node n2) {
|
||||
|
||||
@@ -2,7 +2,7 @@ import java
|
||||
import semmle.code.java.dataflow.TaintTracking
|
||||
|
||||
predicate step(Expr e1, Expr e2) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod().hasName("step") and
|
||||
ma = e2 and
|
||||
ma.getQualifier() = e1
|
||||
@@ -10,14 +10,14 @@ predicate step(Expr e1, Expr e2) {
|
||||
}
|
||||
|
||||
predicate isSink0(Expr sink) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod().hasName("sink") and
|
||||
ma.getAnArgument() = sink
|
||||
)
|
||||
}
|
||||
|
||||
module FirstConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("src") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("src") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { any() }
|
||||
|
||||
@@ -29,7 +29,7 @@ module FirstConfig implements DataFlow::ConfigSig {
|
||||
module FirstFlow = DataFlow::Global<FirstConfig>;
|
||||
|
||||
module SecondConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("src") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("src") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) { isSink0(n.asExpr()) }
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ class LocalSource extends DataFlow::Node instanceof UserInput {
|
||||
}
|
||||
|
||||
predicate isTestSink(DataFlow::Node n) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
}
|
||||
|
||||
module LocalValueConfig implements DataFlow::ConfigSig {
|
||||
|
||||
@@ -3,7 +3,7 @@ import semmle.code.java.dataflow.FlowSources
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
predicate isTestSink(DataFlow::Node n) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
}
|
||||
|
||||
module RemoteValueConfig implements DataFlow::ConfigSig {
|
||||
|
||||
@@ -3,16 +3,14 @@ import semmle.code.java.dataflow.DataFlow
|
||||
import DataFlow
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(Node n) { n.asExpr().(MethodAccess).getMethod().hasName("source") }
|
||||
predicate isSource(Node n) { n.asExpr().(MethodCall).getMethod().hasName("source") }
|
||||
|
||||
predicate isSink(Node n) {
|
||||
exists(MethodAccess sink |
|
||||
sink.getAnArgument() = n.asExpr() and sink.getMethod().hasName("sink")
|
||||
)
|
||||
exists(MethodCall sink | sink.getAnArgument() = n.asExpr() and sink.getMethod().hasName("sink"))
|
||||
}
|
||||
|
||||
predicate isAdditionalFlowStep(Node n1, Node n2) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod().hasName("customStep") and
|
||||
ma.getAnArgument() = n1.asExpr() and
|
||||
ma = n2.asExpr()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import default
|
||||
import semmle.code.java.dataflow.DefUse
|
||||
|
||||
from VariableUpdate d, RValue u, Variable v
|
||||
from VariableUpdate d, VarRead u, Variable v
|
||||
where defUsePair(d, u) and u.getVariable() = v
|
||||
select v, d.getLocation().getStartLine(), u.getLocation().getStartLine()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import default
|
||||
import semmle.code.java.dataflow.DefUse
|
||||
|
||||
from RValue u, Parameter v
|
||||
from VarRead u, Parameter v
|
||||
where parameterDefUsePair(v, u)
|
||||
select v, u.getLocation().getStartLine()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import default
|
||||
import semmle.code.java.dataflow.DefUse
|
||||
|
||||
from RValue u1, RValue u2, Variable v
|
||||
from VarRead u1, VarRead u2, Variable v
|
||||
where useUsePair(u1, u2) and u1.getVariable() = v
|
||||
select v, u1.getLocation().getStartLine(), u2.getLocation().getStartLine()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java
|
||||
import semmle.code.java.dispatch.VirtualDispatch
|
||||
|
||||
from MethodAccess ma, Method m
|
||||
from MethodCall ma, Method m
|
||||
where
|
||||
m = viableImpl(ma) and
|
||||
m.fromSource() and
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import java
|
||||
import semmle.code.java.dispatch.VirtualDispatch
|
||||
|
||||
from MethodAccess ma, Method m
|
||||
from MethodCall ma, Method m
|
||||
where
|
||||
ma.getFile().toString().matches("ViableCallable%") and
|
||||
ma.getMethod().getSourceDeclaration().fromSource() and
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import default
|
||||
import semmle.code.java.dispatch.VirtualDispatch
|
||||
|
||||
from MethodAccess m
|
||||
from MethodCall m
|
||||
where
|
||||
m.getEnclosingCallable().getName() = "run" and
|
||||
m.getMethod().fromSource()
|
||||
|
||||
@@ -22,9 +22,9 @@ Test.java:
|
||||
# 8| 0: [TypeAccess] int
|
||||
# 8| 1: [LocalVariableDeclExpr] ret
|
||||
# 8| 0: [ErrorExpr] <error expr>
|
||||
# 8| 0: [MethodAccess] yield(...)
|
||||
# 8| 0: [MethodCall] yield(...)
|
||||
# 8| 0: [VarAccess] x
|
||||
# 9| 1: [ExprStmt] <Expr>;
|
||||
# 9| 0: [MethodAccess] secondCall(...)
|
||||
# 9| 0: [MethodCall] secondCall(...)
|
||||
# 10| 2: [ReturnStmt] return ...
|
||||
# 10| 0: [VarAccess] ret
|
||||
|
||||
@@ -123,7 +123,7 @@ module JaxRsTest implements TestSig {
|
||||
)
|
||||
or
|
||||
tag = "MessageBodyReaderReadFromCall" and
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod() instanceof MessageBodyReaderReadFrom and
|
||||
ma.getLocation() = location and
|
||||
element = ma.toString() and
|
||||
@@ -131,7 +131,7 @@ module JaxRsTest implements TestSig {
|
||||
)
|
||||
or
|
||||
tag = "MessageBodyReaderReadCall" and
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
ma.getMethod() instanceof MessageBodyReaderRead and
|
||||
ma.getLocation() = location and
|
||||
element = ma.toString() and
|
||||
|
||||
@@ -6,7 +6,7 @@ import TestUtilities.InlineExpectationsTest
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) {
|
||||
source.asExpr().(MethodAccess).getMethod().hasName("taint")
|
||||
source.asExpr().(MethodCall).getMethod().hasName("taint")
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node sink) { sink.asExpr() = any(ReturnStmt r).getResult() }
|
||||
|
||||
@@ -6,7 +6,7 @@ import TestUtilities.InlineExpectationsTest
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) {
|
||||
source.asExpr().(MethodAccess).getMethod().hasName("taint")
|
||||
source.asExpr().(MethodCall).getMethod().hasName("taint")
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node sink) { sink instanceof QueryInjectionSink }
|
||||
|
||||
@@ -3,6 +3,6 @@ import semmle.code.java.dataflow.FlowSources
|
||||
import TestUtilities.InlineFlowTest
|
||||
import DefaultFlowTest
|
||||
|
||||
query predicate valueOf(MethodAccess ma) {
|
||||
query predicate valueOf(MethodCall ma) {
|
||||
ma.getMethod().hasQualifiedName("java.lang", "String", "valueOf")
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ import TestUtilities.InlineFlowTest
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) {
|
||||
n.asExpr().(MethodAccess).getMethod().hasName("taint")
|
||||
n.asExpr().(MethodCall).getMethod().hasName("taint")
|
||||
or
|
||||
n instanceof ThreatModelFlowSource
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
or
|
||||
n instanceof XssSink
|
||||
or
|
||||
|
||||
@@ -3,20 +3,20 @@ import semmle.code.java.dataflow.TaintTracking
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
module TaintFlowConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
}
|
||||
}
|
||||
|
||||
module TaintFlow = TaintTracking::Global<TaintFlowConfig>;
|
||||
|
||||
module ValueFlowConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodAccess).getMethod().hasName("taint") }
|
||||
predicate isSource(DataFlow::Node n) { n.asExpr().(MethodCall).getMethod().hasName("taint") }
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
}
|
||||
|
||||
int fieldFlowBranchLimit() { result = 100 }
|
||||
|
||||
@@ -6,7 +6,7 @@ module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node src) { src instanceof ThreatModelFlowSource }
|
||||
|
||||
predicate isSink(DataFlow::Node sink) {
|
||||
exists(MethodAccess ma |
|
||||
exists(MethodCall ma |
|
||||
sink.asExpr() = ma.getAnArgument() and
|
||||
ma.getMethod().hasName("sink")
|
||||
) and
|
||||
|
||||
@@ -6,7 +6,7 @@ module TestConfig implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource }
|
||||
|
||||
predicate isSink(DataFlow::Node sink) {
|
||||
exists(MethodAccess call |
|
||||
exists(MethodCall call |
|
||||
call.getMethod().hasName("sink") and call.getArgument(0) = sink.asExpr()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node node) { node instanceof ThreatModelFlowSource }
|
||||
|
||||
predicate isSink(DataFlow::Node node) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | node.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | node.asExpr() = ma.getAnArgument())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ import TestUtilities.InlineFlowTest
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node n) {
|
||||
n.asExpr().(MethodAccess).getMethod().hasName("taint")
|
||||
n.asExpr().(MethodCall).getMethod().hasName("taint")
|
||||
or
|
||||
n instanceof ThreatModelFlowSource
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node n) {
|
||||
exists(MethodAccess ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
exists(MethodCall ma | ma.getMethod().hasName("sink") | n.asExpr() = ma.getAnArgument())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user