@@ -404,8 +404,8 @@ protected Label visit(SourceElement nd, int kind, String tostring, Context c) {
404404 if (nd .hasLoc ()) locationManager .emitNodeLocation (nd , lbl );
405405 Statement enclosingStmt = contextManager .getCurrentStatement ();
406406 if (enclosingStmt != null )
407- trapwriter .addTuple ("enclosingStmt " , lbl , trapwriter .localID (enclosingStmt ));
408- trapwriter .addTuple ("exprContainers " , lbl , contextManager .getCurrentContainerKey ());
407+ trapwriter .addTuple ("enclosing_stmt " , lbl , trapwriter .localID (enclosingStmt ));
408+ trapwriter .addTuple ("expr_containers " , lbl , contextManager .getCurrentContainerKey ());
409409 return lbl ;
410410 }
411411
@@ -416,7 +416,7 @@ public Label visit(Statement nd, Context c) {
416416 String tostring = lexicalExtractor .mkToString (nd );
417417 trapwriter .addTuple ("stmts" , lbl , kind , c .parent , c .childIndex , tostring );
418418 locationManager .emitNodeLocation (nd , lbl );
419- trapwriter .addTuple ("stmtContainers " , lbl , contextManager .getCurrentContainerKey ());
419+ trapwriter .addTuple ("stmt_containers " , lbl , contextManager .getCurrentContainerKey ());
420420 contextManager .setCurrentStatement (nd );
421421 return lbl ;
422422 }
@@ -691,16 +691,16 @@ public Label visit(Program nd, Context c) {
691691 scopeManager .enterScope (3 , moduleScopeKey , toplevelLabel );
692692 scopeManager .addVariables (
693693 sourceType .getPredefinedLocals (platform , locationManager .getSourceFileExtension ()));
694- trapwriter .addTuple ("isModule " , toplevelLabel );
694+ trapwriter .addTuple ("is_module " , toplevelLabel );
695695 }
696696
697697 // Emit the specific source type.
698698 switch (sourceType ) {
699699 case CLOSURE_MODULE :
700- trapwriter .addTuple ("isClosureModule " , toplevelLabel );
700+ trapwriter .addTuple ("is_closure_module " , toplevelLabel );
701701 break ;
702702 case MODULE :
703- trapwriter .addTuple ("isES2015Module " , toplevelLabel );
703+ trapwriter .addTuple ("is_es2015_module " , toplevelLabel );
704704 break ;
705705 default :
706706 break ;
@@ -810,7 +810,7 @@ public Label visit(UpdateExpression nd, Context c) {
810810 public Label visit (YieldExpression nd , Context c ) {
811811 Label key = super .visit (nd , c );
812812 visit (nd .getArgument (), key , 0 );
813- if (nd .isDelegating ()) trapwriter .addTuple ("isDelegating " , key );
813+ if (nd .isDelegating ()) trapwriter .addTuple ("is_delegating " , key );
814814 return key ;
815815 }
816816
@@ -822,7 +822,7 @@ public Label visit(YieldExpression nd, Context c) {
822822 public Label visit (VariableDeclaration nd , Context c ) {
823823 Label key = super .visit (nd , c );
824824 if (nd .hasDeclareKeyword ()) {
825- trapwriter .addTuple ("hasDeclareKeyword " , key );
825+ trapwriter .addTuple ("has_declare_keyword " , key );
826826 }
827827 visitAll (nd .getDeclarations (), key );
828828 return key ;
@@ -881,17 +881,17 @@ public Label visit(BlockStatement nd, Context c) {
881881 public Label visit (FunctionDeclaration nd , Context c ) {
882882 Label key = super .visit (nd , c );
883883 if (nd .hasDeclareKeyword ()) {
884- trapwriter .addTuple ("hasDeclareKeyword " , key );
884+ trapwriter .addTuple ("has_declare_keyword " , key );
885885 }
886886 extractFunction (nd , key );
887887 emitStaticType (nd , key );
888888 return key ;
889889 }
890890
891891 private void extractFunctionAttributes (IFunction nd , Label key ) {
892- if (nd .isGenerator ()) trapwriter .addTuple ("isGenerator " , key );
893- if (nd .hasRest ()) trapwriter .addTuple ("hasRestParameter " , key );
894- if (nd .isAsync ()) trapwriter .addTuple ("isAsync " , key );
892+ if (nd .isGenerator ()) trapwriter .addTuple ("is_generator " , key );
893+ if (nd .hasRest ()) trapwriter .addTuple ("has_rest_parameter " , key );
894+ if (nd .isAsync ()) trapwriter .addTuple ("is_async " , key );
895895 }
896896
897897 @ Override
@@ -939,7 +939,7 @@ private void extractFunction(IFunction nd, Label key) {
939939
940940 // Extract optional parameters
941941 if (nd .getOptionalParameterIndices ().contains (i )) {
942- trapwriter .addTuple ("isOptionalParameterDeclaration " , paramKey );
942+ trapwriter .addTuple ("is_optional_parameter_declaration " , paramKey );
943943 }
944944 ++i ;
945945 }
@@ -948,7 +948,7 @@ private void extractFunction(IFunction nd, Label key) {
948948 if (!(nd instanceof ArrowFunctionExpression )) {
949949 if (!scopeManager .declaredInCurrentScope ("arguments" ))
950950 scopeManager .addVariables ("arguments" );
951- trapwriter .addTuple ("isArgumentsObject " , scopeManager .getVarKey ("arguments" ));
951+ trapwriter .addTuple ("is_arguments_object " , scopeManager .getVarKey ("arguments" ));
952952 }
953953
954954 // add return type at index -3
@@ -1084,15 +1084,15 @@ public Label visit(EnhancedForStatement nd, Context c) {
10841084 contextManager .leaveLoopStmt ();
10851085 if (!lexicals .isEmpty ()) scopeManager .leaveScope ();
10861086 if (nd instanceof ForOfStatement && ((ForOfStatement ) nd ).isAwait ())
1087- trapwriter .addTuple ("isForAwaitOf " , key );
1087+ trapwriter .addTuple ("is_for_await_of " , key );
10881088 return key ;
10891089 }
10901090
10911091 @ Override
10921092 public Label visit (ArrayExpression nd , Context c ) {
10931093 Label key = super .visit (nd , c );
10941094 visitAll (nd .getElements (), key , IdContext .varBind , 0 );
1095- trapwriter .addTuple ("arraySize " , key , nd .getElements ().size ());
1095+ trapwriter .addTuple ("array_size " , key , nd .getElements ().size ());
10961096 return key ;
10971097 }
10981098
@@ -1102,7 +1102,7 @@ public Label visit(ArrayPattern nd, Context c) {
11021102 visitAll (nd .getElements (), key , c .idcontext , 0 );
11031103 visit (nd .getRest (), key , -1 , c .idcontext );
11041104 visitAll (nd .getDefaults (), key , IdContext .varBind , -2 , -1 );
1105- trapwriter .addTuple ("arraySize " , key , nd .getElements ().size ());
1105+ trapwriter .addTuple ("array_size " , key , nd .getElements ().size ());
11061106 return key ;
11071107 }
11081108
@@ -1132,8 +1132,8 @@ public Label visit(Property nd, Context c) {
11321132 visit (nd .getKey (), propkey , 0 , nd .isComputed () ? IdContext .varBind : IdContext .label );
11331133 visit (nd .getValue (), propkey , 1 , c .idcontext );
11341134 visit (nd .getDefaultValue (), propkey , 2 , IdContext .varBind );
1135- if (nd .isComputed ()) trapwriter .addTuple ("isComputed " , propkey );
1136- if (nd .isMethod ()) trapwriter .addTuple ("isMethod " , propkey );
1135+ if (nd .isComputed ()) trapwriter .addTuple ("is_computed " , propkey );
1136+ if (nd .isMethod ()) trapwriter .addTuple ("is_method " , propkey );
11371137 return propkey ;
11381138 }
11391139
@@ -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
@@ -1284,10 +1284,10 @@ public Label visit(TemplateElement nd, Context c) {
12841284 public Label visit (ClassDeclaration nd , Context c ) {
12851285 Label lbl = super .visit (nd , c );
12861286 if (nd .hasDeclareKeyword ()) {
1287- trapwriter .addTuple ("hasDeclareKeyword " , lbl );
1287+ trapwriter .addTuple ("has_declare_keyword " , lbl );
12881288 }
12891289 if (nd .hasAbstractKeyword ()) {
1290- trapwriter .addTuple ("isAbstractClass " , lbl );
1290+ trapwriter .addTuple ("is_abstract_class " , lbl );
12911291 }
12921292 return visit (nd .getClassDef (), lbl , nd , false );
12931293 }
@@ -1361,7 +1361,7 @@ public Label visit(NamespaceDeclaration nd, Context c) {
13611361 nd .isInstantiated () ? IdContext .varAndNamespaceDecl : IdContext .namespaceDecl ;
13621362 visit (nd .getName (), lbl , -1 , context );
13631363 if (nd .hasDeclareKeyword ()) {
1364- trapwriter .addTuple ("hasDeclareKeyword " , lbl );
1364+ trapwriter .addTuple ("has_declare_keyword " , lbl );
13651365 }
13661366 DeclaredNames hoistedVars =
13671367 scopeManager .collectDeclaredNames (nd .getBody (), isStrict , false , DeclKind .none );
@@ -1375,7 +1375,7 @@ public Label visit(NamespaceDeclaration nd, Context c) {
13751375 contextManager .leaveContainer ();
13761376 scopeManager .leaveScope ();
13771377 if (nd .isInstantiated ()) {
1378- trapwriter .addTuple ("isInstantiated " , lbl );
1378+ trapwriter .addTuple ("is_instantiated " , lbl );
13791379 }
13801380 return lbl ;
13811381 }
@@ -1520,7 +1520,7 @@ public Label visit(MemberDefinition<?> nd, Context c) {
15201520 if (ctor != null ) contextManager .leaveContainer ();
15211521
15221522 if (nd instanceof MethodDefinition && !nd .isCallSignature () && !nd .isIndexSignature ())
1523- trapwriter .addTuple ("isMethod " , methkey );
1523+ trapwriter .addTuple ("is_method " , methkey );
15241524 // Emit tuples for isStatic, isAbstract, isComputed, etc
15251525 for (int i = 0 ; i < DeclarationFlags .numberOfFlags ; ++i ) {
15261526 if (DeclarationFlags .hasNthFlag (nd .getFlags (), i )) {
@@ -1539,7 +1539,7 @@ public Label visit(MemberDefinition<?> nd, Context c) {
15391539 }
15401540
15411541 if (nd .hasDeclareKeyword ()) {
1542- trapwriter .addTuple ("hasDeclareKeyword " , methkey );
1542+ trapwriter .addTuple ("has_declare_keyword " , methkey );
15431543 }
15441544
15451545 return methkey ;
@@ -1575,7 +1575,7 @@ public Label visit(ExportNamedDeclaration nd, Context c) {
15751575 IdContext .export ;
15761576 visitAll (nd .getSpecifiers (), lbl , childContext , 0 );
15771577 if (nd .hasTypeKeyword ()) {
1578- trapwriter .addTuple ("hasTypeKeyword " , lbl );
1578+ trapwriter .addTuple ("has_type_keyword " , lbl );
15791579 }
15801580 return lbl ;
15811581 }
@@ -1596,7 +1596,7 @@ public Label visit(ImportDeclaration nd, Context c) {
15961596 visitAll (nd .getSpecifiers (), lbl , childContext , 0 );
15971597 emitNodeSymbol (nd , lbl );
15981598 if (nd .hasTypeKeyword ()) {
1599- trapwriter .addTuple ("hasTypeKeyword " , lbl );
1599+ trapwriter .addTuple ("has_type_keyword " , lbl );
16001600 }
16011601 return lbl ;
16021602 }
@@ -1866,7 +1866,7 @@ public Label visit(PredicateTypeExpr nd, Context c) {
18661866 visit (nd .getExpression (), key , 0 , IdContext .varInTypeBind );
18671867 visit (nd .getTypeExpr (), key , 1 , IdContext .typeBind );
18681868 if (nd .hasAssertsKeyword ()) {
1869- trapwriter .addTuple ("hasAssertsKeyword " , key );
1869+ trapwriter .addTuple ("has_asserts_keyword " , key );
18701870 }
18711871 return key ;
18721872 }
@@ -1944,10 +1944,10 @@ public Label visit(EnumDeclaration nd, Context c) {
19441944 visitAll (nd .getMembers (), key , IdContext .varAndTypeDecl , 1 , 1 );
19451945 scopeManager .leaveScope ();
19461946 if (nd .isConst ()) {
1947- trapwriter .addTuple ("isConstEnum " , key );
1947+ trapwriter .addTuple ("is_const_enum " , key );
19481948 }
19491949 if (nd .hasDeclareKeyword ()) {
1950- trapwriter .addTuple ("hasDeclareKeyword " , key );
1950+ trapwriter .addTuple ("has_declare_keyword " , key );
19511951 }
19521952 emitNodeSymbol (nd , key );
19531953 return key ;
@@ -1968,7 +1968,7 @@ public Label visit(EnumMember nd, Context c) {
19681968 @ Override
19691969 public Label visit (ExternalModuleDeclaration nd , Context c ) {
19701970 Label key = super .visit (nd , c );
1971- trapwriter .addTuple ("hasDeclareKeyword " , key );
1971+ trapwriter .addTuple ("has_declare_keyword " , key );
19721972 visit (nd .getName (), key , -1 , IdContext .label );
19731973 DeclaredNames hoistedVars =
19741974 scopeManager .collectDeclaredNames (nd .getBody (), isStrict , false , DeclKind .none );
@@ -2013,7 +2013,7 @@ public Label visit(GlobalAugmentationDeclaration nd, Context c) {
20132013 // The fake scope does not exist at the QL level, as it is indistinguishable
20142014 // from the global scope.
20152015 Label key = super .visit (nd , c );
2016- trapwriter .addTuple ("hasDeclareKeyword " , key );
2016+ trapwriter .addTuple ("has_declare_keyword " , key );
20172017 DeclaredNames hoistedVars =
20182018 scopeManager .collectDeclaredNames (nd .getBody (), isStrict , false , DeclKind .none );
20192019 DeclaredNames lexicalVars =
0 commit comments