Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 76f728a

Browse files
committed
renamed "jumpTargets" to "jump_targets"
1 parent 059d728 commit 76f728a

10 files changed

Lines changed: 17 additions & 10 deletions

File tree

javascript/extractor/src/com/semmle/js/extractor/ASTExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ public Label visit(JumpStatement nd, Context c) {
12221222
Label key = super.visit(nd, c);
12231223
visit(nd.getLabel(), key, 0, IdContext.label);
12241224
Label targetKey = trapwriter.localID(contextManager.getTarget(nd));
1225-
trapwriter.addTuple("jumpTargets", key, targetKey);
1225+
trapwriter.addTuple("jump_targets", key, targetKey);
12261226
return key;
12271227
}
12281228

javascript/extractor/tests/cfg/output/trap/tst.js.trap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ stmts(#20369,6,#20365,3,"continue;")
10641064
locations_default(#20370,#10000,13,5,13,13)
10651065
hasLocation(#20369,#20370)
10661066
stmt_containers(#20369,#20001)
1067-
jumpTargets(#20369,#20365)
1067+
jump_targets(#20369,#20365)
10681068
#20371=*
10691069
stmts(#20371,17,#20001,2,"functio ... (p);\n}")
10701070
#20372=@"loc,{#10000},15,1,18,1"

javascript/extractor/tests/stmts/output/trap/conditionals.js.trap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ stmts(#20102,5,#20098,0,"break;")
313313
locations_default(#20103,#10000,10,5,10,10)
314314
hasLocation(#20102,#20103)
315315
stmt_containers(#20102,#20001)
316-
jumpTargets(#20102,#20093)
316+
jump_targets(#20102,#20093)
317317
#20104=*
318318
stmts(#20104,19,#20093,2,"default:")
319319
hasLocation(#20104,#20023)

javascript/extractor/tests/stmts/output/trap/loops.js.trap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ hasLocation(#20258,#20097)
718718
enclosingStmt(#20258,#20256)
719719
exprContainers(#20258,#20001)
720720
literals("outer","outer",#20258)
721-
jumpTargets(#20256,#20237)
721+
jump_targets(#20256,#20237)
722722
#20259=*
723723
stmts(#20259,3,#20252,2,"if (e)\n ... ntinue;")
724724
#20260=@"loc,{#10000},7,14,10,21"
@@ -746,14 +746,14 @@ hasLocation(#20265,#20113)
746746
enclosingStmt(#20265,#20263)
747747
exprContainers(#20265,#20001)
748748
literals("outer","outer",#20265)
749-
jumpTargets(#20263,#20237)
749+
jump_targets(#20263,#20237)
750750
#20266=*
751751
stmts(#20266,6,#20259,2,"continue;")
752752
#20267=@"loc,{#10000},10,13,10,21"
753753
locations_default(#20267,#10000,10,13,10,21)
754754
hasLocation(#20266,#20267)
755755
stmt_containers(#20266,#20001)
756-
jumpTargets(#20266,#20250)
756+
jump_targets(#20266,#20250)
757757
#20268=*
758758
stmts(#20268,13,#20001,2,"do {\n ... ile(a);")
759759
#20269=@"loc,{#10000},13,1,15,11"

javascript/extractor/tests/stmts/output/trap/switch.js.trap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ stmts(#20136,5,#20134,0,"break;")
386386
locations_default(#20137,#10000,3,5,3,10)
387387
hasLocation(#20136,#20137)
388388
stmt_containers(#20136,#20001)
389-
jumpTargets(#20136,#20130)
389+
jump_targets(#20136,#20130)
390390
#20138=*
391391
stmts(#20138,19,#20130,1,"case 23 ... += 19;")
392392
#20139=@"loc,{#10000},4,1,5,12"

javascript/ql/src/semmle/javascript/Aliases.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,8 @@ deprecated predicate isClosureModule(TopLevel toplevel) { is_closure_module(topl
9696
* Use `ASTNode#getContainer()` instead.
9797
*/
9898
deprecated predicate stmtContainers(Stmt stmt, StmtContainer container) { stmt_containers(stmt, container) }
99+
/**
100+
* Alias for the predicate `jump_targets` defined in the .dbscheme.
101+
* Use `JumpStmt#getTarget()` instead.
102+
*/
103+
deprecated predicate jumpTargets(Stmt jump, Stmt target) { jump_targets(jump, target) }

javascript/ql/src/semmle/javascript/Stmt.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ class BreakOrContinueStmt extends TBreakOrContinueStmt, JumpStmt {
509509
predicate hasTargetLabel() { exists(getTargetLabel()) }
510510

511511
/** Gets the statement this statement breaks out of or continues with. */
512-
override Stmt getTarget() { jumpTargets(this, result) }
512+
override Stmt getTarget() { jump_targets(this, result) }
513513

514514
override predicate isSubjectToSemicolonInsertion() { any() }
515515
}

javascript/ql/src/semmlecode.javascript.dbscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ stmts (unique int id: @stmt,
142142
stmt_containers (unique int stmt: @stmt ref,
143143
int container: @stmt_container ref);
144144

145-
jumpTargets (unique int jump: @stmt ref,
145+
jump_targets (unique int jump: @stmt ref,
146146
int target: @stmt ref);
147147

148148
@stmtparent = @stmt | @toplevel | @functionexpr | @arrowfunctionexpr;

javascript/ql/src/semmlecode.javascript.dbscheme.stats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10133,7 +10133,7 @@
1013310133
</dependencies>
1013410134
</relation>
1013510135
<relation>
10136-
<name>jumpTargets</name>
10136+
<name>jump_targets</name>
1013710137
<cardinality>11791</cardinality>
1013810138
<columnsizes>
1013910139
<e>

javascript/upgrades/c73fbfca57f3d593b9ff50c6aa3a886d6888efec/upgrade.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ is_closure_module.rel: reorder isClosureModule.rel(int toplevel) toplevel
1212
isClosureModule.rel: delete
1313
stmt_containers.rel: reorder stmtContainers.rel(int stmt, int container) stmt container
1414
stmtContainers.rel: delete
15+
jump_targets.rel: reorder jumpTargets.rel(int jump, int target) jump target
16+
jumpTargets.rel: delete

0 commit comments

Comments
 (0)