mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
renamed "arraySize" to "array_size"
This commit is contained in:
@@ -1092,7 +1092,7 @@ public class ASTExtractor {
|
|||||||
public Label visit(ArrayExpression nd, Context c) {
|
public Label visit(ArrayExpression nd, Context c) {
|
||||||
Label key = super.visit(nd, c);
|
Label key = super.visit(nd, c);
|
||||||
visitAll(nd.getElements(), key, IdContext.varBind, 0);
|
visitAll(nd.getElements(), key, IdContext.varBind, 0);
|
||||||
trapwriter.addTuple("arraySize", key, nd.getElements().size());
|
trapwriter.addTuple("array_size", key, nd.getElements().size());
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1102,7 +1102,7 @@ public class ASTExtractor {
|
|||||||
visitAll(nd.getElements(), key, c.idcontext, 0);
|
visitAll(nd.getElements(), key, c.idcontext, 0);
|
||||||
visit(nd.getRest(), key, -1, c.idcontext);
|
visit(nd.getRest(), key, -1, c.idcontext);
|
||||||
visitAll(nd.getDefaults(), key, IdContext.varBind, -2, -1);
|
visitAll(nd.getDefaults(), key, IdContext.varBind, -2, -1);
|
||||||
trapwriter.addTuple("arraySize", key, nd.getElements().size());
|
trapwriter.addTuple("array_size", key, nd.getElements().size());
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ literals("y","y",#20023)
|
|||||||
#20024=@"var;{y};{#20000}"
|
#20024=@"var;{y};{#20000}"
|
||||||
variables(#20024,"y",#20000)
|
variables(#20024,"y",#20000)
|
||||||
bind(#20023,#20024)
|
bind(#20023,#20024)
|
||||||
arraySize(#20018,1)
|
array_size(#20018,1)
|
||||||
#20025=*
|
#20025=*
|
||||||
entry_cfg_node(#20025,#20001)
|
entry_cfg_node(#20025,#20001)
|
||||||
#20026=@"loc,{#10000},1,1,1,0"
|
#20026=@"loc,{#10000},1,1,1,0"
|
||||||
|
|||||||
@@ -865,7 +865,7 @@ literals("g","g",#20273)
|
|||||||
#20274=@"var;{g};{#20000}"
|
#20274=@"var;{g};{#20000}"
|
||||||
variables(#20274,"g",#20000)
|
variables(#20274,"g",#20000)
|
||||||
bind(#20273,#20274)
|
bind(#20273,#20274)
|
||||||
arraySize(#20269,1)
|
array_size(#20269,1)
|
||||||
#20275=*
|
#20275=*
|
||||||
stmts(#20275,18,#20001,8,"var e = ... </elt>;")
|
stmts(#20275,18,#20001,8,"var e = ... </elt>;")
|
||||||
#20276=@"loc,{#10000},10,1,13,9"
|
#20276=@"loc,{#10000},10,1,13,9"
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ hasLocation(#20031,#20011)
|
|||||||
enclosing_stmt(#20031,#20024)
|
enclosing_stmt(#20031,#20024)
|
||||||
expr_containers(#20031,#20001)
|
expr_containers(#20031,#20001)
|
||||||
literals("42","42",#20031)
|
literals("42","42",#20031)
|
||||||
arraySize(#20027,1)
|
array_size(#20027,1)
|
||||||
#20032=*
|
#20032=*
|
||||||
exprs(#20032,7,#20025,1,"[]")
|
exprs(#20032,7,#20025,1,"[]")
|
||||||
#20033=@"loc,{#10000},1,10,1,11"
|
#20033=@"loc,{#10000},1,10,1,11"
|
||||||
@@ -108,7 +108,7 @@ locations_default(#20033,#10000,1,10,1,11)
|
|||||||
hasLocation(#20032,#20033)
|
hasLocation(#20032,#20033)
|
||||||
enclosing_stmt(#20032,#20024)
|
enclosing_stmt(#20032,#20024)
|
||||||
expr_containers(#20032,#20001)
|
expr_containers(#20032,#20001)
|
||||||
arraySize(#20032,0)
|
array_size(#20032,0)
|
||||||
#20034=*
|
#20034=*
|
||||||
entry_cfg_node(#20034,#20001)
|
entry_cfg_node(#20034,#20001)
|
||||||
#20035=@"loc,{#10000},1,1,1,0"
|
#20035=@"loc,{#10000},1,1,1,0"
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ enclosing_stmt(#20066,#20060)
|
|||||||
expr_containers(#20066,#20051)
|
expr_containers(#20066,#20051)
|
||||||
literals("ys","ys",#20066)
|
literals("ys","ys",#20066)
|
||||||
decl(#20066,#20054)
|
decl(#20066,#20054)
|
||||||
arraySize(#20064,1)
|
array_size(#20064,1)
|
||||||
#20067=*
|
#20067=*
|
||||||
exprs(#20067,79,#20062,1,"o")
|
exprs(#20067,79,#20062,1,"o")
|
||||||
hasLocation(#20067,#20037)
|
hasLocation(#20067,#20037)
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ regexpterm(#20113,14,#20112,0,"abc")
|
|||||||
locations_default(#20114,#10000,1,14,1,16)
|
locations_default(#20114,#10000,1,14,1,16)
|
||||||
hasLocation(#20113,#20114)
|
hasLocation(#20113,#20114)
|
||||||
regexpConstValue(#20113,"abc")
|
regexpConstValue(#20113,"abc")
|
||||||
arraySize(#20104,3)
|
array_size(#20104,3)
|
||||||
#20115=*
|
#20115=*
|
||||||
exprs(#20115,0,#20102,1,"map")
|
exprs(#20115,0,#20102,1,"map")
|
||||||
hasLocation(#20115,#20025)
|
hasLocation(#20115,#20025)
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ hasLocation(#20035,#20011)
|
|||||||
enclosing_stmt(#20035,#20026)
|
enclosing_stmt(#20035,#20026)
|
||||||
expr_containers(#20035,#20001)
|
expr_containers(#20035,#20001)
|
||||||
literals("x","x",#20035)
|
literals("x","x",#20035)
|
||||||
arraySize(#20029,1)
|
array_size(#20029,1)
|
||||||
#20036=*
|
#20036=*
|
||||||
exprs(#20036,7,#20027,1,"[42]")
|
exprs(#20036,7,#20027,1,"[42]")
|
||||||
#20037=@"loc,{#10000},1,9,1,12"
|
#20037=@"loc,{#10000},1,9,1,12"
|
||||||
@@ -126,7 +126,7 @@ hasLocation(#20038,#20019)
|
|||||||
enclosing_stmt(#20038,#20026)
|
enclosing_stmt(#20038,#20026)
|
||||||
expr_containers(#20038,#20001)
|
expr_containers(#20038,#20001)
|
||||||
literals("42","42",#20038)
|
literals("42","42",#20038)
|
||||||
arraySize(#20036,1)
|
array_size(#20036,1)
|
||||||
#20039=*
|
#20039=*
|
||||||
entry_cfg_node(#20039,#20001)
|
entry_cfg_node(#20039,#20001)
|
||||||
#20040=@"loc,{#10000},1,1,1,0"
|
#20040=@"loc,{#10000},1,1,1,0"
|
||||||
|
|||||||
@@ -511,7 +511,7 @@ hasLocation(#20188,#20041)
|
|||||||
expr_containers(#20188,#20177)
|
expr_containers(#20188,#20177)
|
||||||
literals("y","y",#20188)
|
literals("y","y",#20188)
|
||||||
decl(#20188,#20184)
|
decl(#20188,#20184)
|
||||||
arraySize(#20185,2)
|
array_size(#20185,2)
|
||||||
#20189=@"var;{arguments};{#20180}"
|
#20189=@"var;{arguments};{#20180}"
|
||||||
variables(#20189,"arguments",#20180)
|
variables(#20189,"arguments",#20180)
|
||||||
isArgumentsObject(#20189)
|
isArgumentsObject(#20189)
|
||||||
@@ -562,8 +562,8 @@ enclosing_stmt(#20201,#20192)
|
|||||||
expr_containers(#20201,#20177)
|
expr_containers(#20201,#20177)
|
||||||
literals("c","c",#20201)
|
literals("c","c",#20201)
|
||||||
decl(#20201,#20182)
|
decl(#20201,#20182)
|
||||||
arraySize(#20199,2)
|
array_size(#20199,2)
|
||||||
arraySize(#20196,2)
|
array_size(#20196,2)
|
||||||
#20202=*
|
#20202=*
|
||||||
exprs(#20202,79,#20194,1,"x")
|
exprs(#20202,79,#20194,1,"x")
|
||||||
hasLocation(#20202,#20069)
|
hasLocation(#20202,#20069)
|
||||||
@@ -610,7 +610,7 @@ enclosing_stmt(#20212,#20207)
|
|||||||
expr_containers(#20212,#20177)
|
expr_containers(#20212,#20177)
|
||||||
literals("c","c",#20212)
|
literals("c","c",#20212)
|
||||||
bind(#20212,#20182)
|
bind(#20212,#20182)
|
||||||
arraySize(#20209,2)
|
array_size(#20209,2)
|
||||||
#20213=*
|
#20213=*
|
||||||
stmts(#20213,20,#20203,1,"catch ( ... (d);\n\t}")
|
stmts(#20213,20,#20203,1,"catch ( ... (d);\n\t}")
|
||||||
#20214=@"loc,{#10000},5,4,7,2"
|
#20214=@"loc,{#10000},5,4,7,2"
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ exprs(#20042,7,#20040,0,"[,]")
|
|||||||
hasLocation(#20042,#20041)
|
hasLocation(#20042,#20041)
|
||||||
enclosing_stmt(#20042,#20040)
|
enclosing_stmt(#20042,#20040)
|
||||||
expr_containers(#20042,#20001)
|
expr_containers(#20042,#20001)
|
||||||
arraySize(#20042,1)
|
array_size(#20042,1)
|
||||||
#20043=*
|
#20043=*
|
||||||
entry_cfg_node(#20043,#20001)
|
entry_cfg_node(#20043,#20001)
|
||||||
#20044=@"loc,{#10000},1,1,1,0"
|
#20044=@"loc,{#10000},1,1,1,0"
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ exprs(#20043,7,#20041,0,"[,]")
|
|||||||
hasLocation(#20043,#20042)
|
hasLocation(#20043,#20042)
|
||||||
enclosing_stmt(#20043,#20041)
|
enclosing_stmt(#20043,#20041)
|
||||||
expr_containers(#20043,#20001)
|
expr_containers(#20043,#20001)
|
||||||
arraySize(#20043,1)
|
array_size(#20043,1)
|
||||||
#20044=*
|
#20044=*
|
||||||
entry_cfg_node(#20044,#20001)
|
entry_cfg_node(#20044,#20001)
|
||||||
#20045=@"loc,{#10000},1,1,1,0"
|
#20045=@"loc,{#10000},1,1,1,0"
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ hasLocation(#20098,#20037)
|
|||||||
enclosing_stmt(#20098,#20092)
|
enclosing_stmt(#20098,#20092)
|
||||||
expr_containers(#20098,#20001)
|
expr_containers(#20098,#20001)
|
||||||
literals("3","3",#20098)
|
literals("3","3",#20098)
|
||||||
arraySize(#20094,3)
|
array_size(#20094,3)
|
||||||
#20099=*
|
#20099=*
|
||||||
scopes(#20099,6)
|
scopes(#20099,6)
|
||||||
scopenodes(#20092,#20099)
|
scopenodes(#20092,#20099)
|
||||||
@@ -394,7 +394,7 @@ locations_default(#20129,#10000,6,19,6,20)
|
|||||||
hasLocation(#20128,#20129)
|
hasLocation(#20128,#20129)
|
||||||
enclosing_stmt(#20128,#20126)
|
enclosing_stmt(#20128,#20126)
|
||||||
expr_containers(#20128,#20118)
|
expr_containers(#20128,#20118)
|
||||||
arraySize(#20128,0)
|
array_size(#20128,0)
|
||||||
#20130=*
|
#20130=*
|
||||||
stmts(#20130,18,#20126,0,"var x")
|
stmts(#20130,18,#20126,0,"var x")
|
||||||
#20131=@"loc,{#10000},6,10,6,14"
|
#20131=@"loc,{#10000},6,10,6,14"
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ literals("as","as",#20044)
|
|||||||
#20045=@"var;{as};{#20000}"
|
#20045=@"var;{as};{#20000}"
|
||||||
variables(#20045,"as",#20000)
|
variables(#20045,"as",#20000)
|
||||||
bind(#20044,#20045)
|
bind(#20044,#20045)
|
||||||
arraySize(#20038,2)
|
array_size(#20038,2)
|
||||||
#20046=*
|
#20046=*
|
||||||
stmts(#20046,2,#20001,1,"new Array(...elts);")
|
stmts(#20046,2,#20001,1,"new Array(...elts);")
|
||||||
hasLocation(#20046,#20005)
|
hasLocation(#20046,#20005)
|
||||||
|
|||||||
@@ -717,7 +717,7 @@ locations_default(#20224,#10000,13,1,13,2)
|
|||||||
hasLocation(#20223,#20224)
|
hasLocation(#20223,#20224)
|
||||||
enclosing_stmt(#20223,#20220)
|
enclosing_stmt(#20223,#20220)
|
||||||
expr_containers(#20223,#20001)
|
expr_containers(#20223,#20001)
|
||||||
arraySize(#20223,0)
|
array_size(#20223,0)
|
||||||
#20225=*
|
#20225=*
|
||||||
exprs(#20225,79,#20221,1,"Array")
|
exprs(#20225,79,#20221,1,"Array")
|
||||||
hasLocation(#20225,#20135)
|
hasLocation(#20225,#20135)
|
||||||
|
|||||||
@@ -1173,7 +1173,7 @@ regexpterm(#20405,14,#20404,0,"hi")
|
|||||||
locations_default(#20406,#10000,16,13,16,14)
|
locations_default(#20406,#10000,16,13,16,14)
|
||||||
hasLocation(#20405,#20406)
|
hasLocation(#20405,#20406)
|
||||||
regexpConstValue(#20405,"hi")
|
regexpConstValue(#20405,"hi")
|
||||||
arraySize(#20400,4)
|
array_size(#20400,4)
|
||||||
#20407=*
|
#20407=*
|
||||||
stmts(#20407,2,#20001,16,"({ x: 2 ... ) {}});")
|
stmts(#20407,2,#20001,16,"({ x: 2 ... ) {}});")
|
||||||
#20408=@"loc,{#10000},17,1,21,17"
|
#20408=@"loc,{#10000},17,1,21,17"
|
||||||
@@ -1528,7 +1528,7 @@ locations_default(#20498,#10000,28,1,28,4)
|
|||||||
hasLocation(#20497,#20498)
|
hasLocation(#20497,#20498)
|
||||||
enclosing_stmt(#20497,#20496)
|
enclosing_stmt(#20497,#20496)
|
||||||
expr_containers(#20497,#20001)
|
expr_containers(#20497,#20001)
|
||||||
arraySize(#20497,2)
|
array_size(#20497,2)
|
||||||
#20499=*
|
#20499=*
|
||||||
stmts(#20499,2,#20001,24,"[1,];")
|
stmts(#20499,2,#20001,24,"[1,];")
|
||||||
hasLocation(#20499,#20059)
|
hasLocation(#20499,#20059)
|
||||||
@@ -1546,7 +1546,7 @@ hasLocation(#20502,#20297)
|
|||||||
enclosing_stmt(#20502,#20499)
|
enclosing_stmt(#20502,#20499)
|
||||||
expr_containers(#20502,#20001)
|
expr_containers(#20502,#20001)
|
||||||
literals("1","1",#20502)
|
literals("1","1",#20502)
|
||||||
arraySize(#20500,1)
|
array_size(#20500,1)
|
||||||
#20503=*
|
#20503=*
|
||||||
stmts(#20503,2,#20001,25,"({ z: 56, });")
|
stmts(#20503,2,#20001,25,"({ z: 56, });")
|
||||||
hasLocation(#20503,#20061)
|
hasLocation(#20503,#20061)
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ enclosing_stmt(#20039,#20033)
|
|||||||
expr_containers(#20039,#20001)
|
expr_containers(#20039,#20001)
|
||||||
literals("y","y",#20039)
|
literals("y","y",#20039)
|
||||||
decl(#20039,#20032)
|
decl(#20039,#20032)
|
||||||
arraySize(#20036,2)
|
array_size(#20036,2)
|
||||||
#20040=*
|
#20040=*
|
||||||
exprs(#20040,7,#20034,1,"[1,2]")
|
exprs(#20040,7,#20034,1,"[1,2]")
|
||||||
#20041=@"loc,{#10000},1,13,1,17"
|
#20041=@"loc,{#10000},1,13,1,17"
|
||||||
@@ -141,7 +141,7 @@ hasLocation(#20043,#20025)
|
|||||||
enclosing_stmt(#20043,#20033)
|
enclosing_stmt(#20043,#20033)
|
||||||
expr_containers(#20043,#20001)
|
expr_containers(#20043,#20001)
|
||||||
literals("2","2",#20043)
|
literals("2","2",#20043)
|
||||||
arraySize(#20040,2)
|
array_size(#20040,2)
|
||||||
#20044=*
|
#20044=*
|
||||||
entry_cfg_node(#20044,#20001)
|
entry_cfg_node(#20044,#20001)
|
||||||
#20045=@"loc,{#10000},1,1,1,0"
|
#20045=@"loc,{#10000},1,1,1,0"
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ enclosing_stmt(#20093,#20086)
|
|||||||
expr_containers(#20093,#20063)
|
expr_containers(#20093,#20063)
|
||||||
literals("y","y",#20093)
|
literals("y","y",#20093)
|
||||||
bind(#20093,#20073)
|
bind(#20093,#20073)
|
||||||
arraySize(#20090,2)
|
array_size(#20090,2)
|
||||||
#20094=*
|
#20094=*
|
||||||
exprs(#20094,79,#20088,1,"z")
|
exprs(#20094,79,#20088,1,"z")
|
||||||
hasLocation(#20094,#20055)
|
hasLocation(#20094,#20055)
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ hasLocation(#20021,#20011)
|
|||||||
enclosing_stmt(#20021,#20018)
|
enclosing_stmt(#20021,#20018)
|
||||||
expr_containers(#20021,#20001)
|
expr_containers(#20021,#20001)
|
||||||
literals("1","1",#20021)
|
literals("1","1",#20021)
|
||||||
arraySize(#20019,3)
|
array_size(#20019,3)
|
||||||
#20022=*
|
#20022=*
|
||||||
entry_cfg_node(#20022,#20001)
|
entry_cfg_node(#20022,#20001)
|
||||||
#20023=@"loc,{#10000},1,1,1,0"
|
#20023=@"loc,{#10000},1,1,1,0"
|
||||||
|
|||||||
@@ -947,7 +947,7 @@ enclosing_stmt(#20302,#20284)
|
|||||||
expr_containers(#20302,#20212)
|
expr_containers(#20302,#20212)
|
||||||
literals("EmptyBlock","EmptyBlock",#20302)
|
literals("EmptyBlock","EmptyBlock",#20302)
|
||||||
bind(#20302,#20217)
|
bind(#20302,#20217)
|
||||||
arraySize(#20289,7)
|
array_size(#20289,7)
|
||||||
is_instantiated(#20212)
|
is_instantiated(#20212)
|
||||||
#20303=*
|
#20303=*
|
||||||
entry_cfg_node(#20303,#20001)
|
entry_cfg_node(#20303,#20001)
|
||||||
|
|||||||
@@ -125,3 +125,8 @@ deprecated predicate enclosingStmt(ExprOrType expr, Stmt stmt) { enclosing_stmt(
|
|||||||
* Use `ASTNode#getContainer()` instead.
|
* Use `ASTNode#getContainer()` instead.
|
||||||
*/
|
*/
|
||||||
deprecated predicate exprContainers(ExprOrType expr, StmtContainer container) { expr_containers(expr, container) }
|
deprecated predicate exprContainers(ExprOrType expr, StmtContainer container) { expr_containers(expr, container) }
|
||||||
|
/**
|
||||||
|
* Alias for the predicate `array_size` defined in the .dbscheme.
|
||||||
|
* Use `ArrayExpr#getSize()` instead.
|
||||||
|
*/
|
||||||
|
deprecated predicate arraySize(Expr ae, int sz) { array_size(ae, sz) }
|
||||||
|
|||||||
@@ -510,7 +510,7 @@ class ArrayExpr extends @arrayexpr, Expr {
|
|||||||
Expr getAnElement() { result = this.getAChildExpr() }
|
Expr getAnElement() { result = this.getAChildExpr() }
|
||||||
|
|
||||||
/** Gets the number of elements in this array literal. */
|
/** Gets the number of elements in this array literal. */
|
||||||
int getSize() { arraySize(this, result) }
|
int getSize() { array_size(this, result) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if this array literal includes a trailing comma after the
|
* Holds if this array literal includes a trailing comma after the
|
||||||
|
|||||||
@@ -504,7 +504,7 @@ class ArrayPattern extends DestructuringPattern, @arraypattern {
|
|||||||
predicate hasRest() { exists(getRest()) }
|
predicate hasRest() { exists(getRest()) }
|
||||||
|
|
||||||
/** Gets the number of elements in this array pattern, not including any rest pattern. */
|
/** Gets the number of elements in this array pattern, not including any rest pattern. */
|
||||||
int getSize() { arraySize(this, result) }
|
int getSize() { array_size(this, result) }
|
||||||
|
|
||||||
/** Holds if the `i`th element of this array pattern is omitted. */
|
/** Holds if the `i`th element of this array pattern is omitted. */
|
||||||
predicate elementIsOmitted(int i) {
|
predicate elementIsOmitted(int i) {
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ enclosing_stmt (unique int expr: @exprortype ref,
|
|||||||
expr_containers (unique int expr: @exprortype ref,
|
expr_containers (unique int expr: @exprortype ref,
|
||||||
int container: @stmt_container ref);
|
int container: @stmt_container ref);
|
||||||
|
|
||||||
arraySize (unique int ae: @arraylike ref,
|
array_size (unique int ae: @arraylike ref,
|
||||||
int sz: int ref);
|
int sz: int ref);
|
||||||
|
|
||||||
isDelegating (int yield: @yieldexpr ref);
|
isDelegating (int yield: @yieldexpr ref);
|
||||||
|
|||||||
@@ -11393,7 +11393,7 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</relation>
|
</relation>
|
||||||
<relation>
|
<relation>
|
||||||
<name>arraySize</name>
|
<name>array_size</name>
|
||||||
<cardinality>28188</cardinality>
|
<cardinality>28188</cardinality>
|
||||||
<columnsizes>
|
<columnsizes>
|
||||||
<e>
|
<e>
|
||||||
|
|||||||
@@ -24,3 +24,5 @@ enclosing_stmt.rel: reorder enclosingStmt.rel(int expr, int stmt) expr stmt
|
|||||||
enclosingStmt.rel: delete
|
enclosingStmt.rel: delete
|
||||||
expr_containers.rel: reorder exprContainers.rel(int expr, int container) expr container
|
expr_containers.rel: reorder exprContainers.rel(int expr, int container) expr container
|
||||||
exprContainers.rel: delete
|
exprContainers.rel: delete
|
||||||
|
array_size.rel: reorder arraySize.rel(int ae, int sz) ae sz
|
||||||
|
arraySize.rel: delete
|
||||||
|
|||||||
Reference in New Issue
Block a user