You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by fl...@apache.org on 2018/10/09 14:47:15 UTC

[tinkerpop] branch TINKERPOP-1972-master created (now b88f932)

This is an automated email from the ASF dual-hosted git repository.

florianhockmann pushed a change to branch TINKERPOP-1972-master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.


      at b88f932  Merge branch 'TINKERPOP-1972-tp33' into TINKERPOP-1972-master

This branch includes the following new commits:

     new b88f932  Merge branch 'TINKERPOP-1972-tp33' into TINKERPOP-1972-master

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[tinkerpop] 01/01: Merge branch 'TINKERPOP-1972-tp33' into TINKERPOP-1972-master

Posted by fl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

florianhockmann pushed a commit to branch TINKERPOP-1972-master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit b88f93299ba56dad52fabb0ea085015b3d8fbd70
Merge: ecc7dca e4765ea
Author: Florian Hockmann <fh...@florian-hockmann.de>
AuthorDate: Tue Oct 9 16:36:56 2018 +0200

    Merge branch 'TINKERPOP-1972-tp33' into TINKERPOP-1972-master

 gremlin-dotnet/glv/GraphTraversal.template          |  5 +++--
 gremlin-dotnet/glv/GraphTraversalSource.template    |  5 +++--
 gremlin-dotnet/glv/generate.groovy                  | 16 +++++++---------
 .../Gremlin.Net/Process/Traversal/GraphTraversal.cs |  5 +++--
 .../Process/Traversal/GraphTraversalSource.cs       |  5 +++--
 .../Gherkin/GherkinTestRunner.cs                    |  6 +++---
 .../Gherkin/TraversalEvaluation/TraversalParser.cs  | 21 +++++++++++++++++++--
 .../BytecodeGeneration/BytecodeGenerationTests.cs   | 12 ++++++++++++
 8 files changed, 53 insertions(+), 22 deletions(-)

diff --cc gremlin-dotnet/glv/GraphTraversalSource.template
index 23d66e5,bbc3684..f3093e5
--- a/gremlin-dotnet/glv/GraphTraversalSource.template
+++ b/gremlin-dotnet/glv/GraphTraversalSource.template
@@@ -127,12 -128,12 +128,12 @@@ namespace Gremlin.Net.Process.Traversa
          ///     Spawns a <see cref="GraphTraversal{SType, EType}" /> off this graph traversal source and adds the <%= method.methodName %> step to that
          ///     traversal.
          /// </summary>
 -        public GraphTraversal<$method.typeNameString> <%= toCSharpMethodName.call(method.methodName) %><%= method.tParam %>(<%= method.parameters %>)
 +        public GraphTraversal<$method.t1, $method.t2> <%= toCSharpMethodName.call(method.methodName) %><%= method.tParam %>(<%= method.parameters %>)
          {
 -            var traversal = new GraphTraversal<$method.typeNameString>(TraversalStrategies, new Bytecode(Bytecode));
 +            var traversal = new GraphTraversal<$method.t1, $method.t2>(TraversalStrategies, new Bytecode(Bytecode));
              <%  if (method.parameters.contains("params ")) {
-           %>var args = new List<$method.argsListType>(<%= method.paramNames.init().size() %> + <%= method.paramNames.last() %>.Length) {<%= method.paramNames.init().join(", ") %>};
-             args.AddRange(<%= method.paramNames.last() %>);
+           %>var args = new List<object>(<%= method.paramNames.init().size() %> + <%= method.paramNames.last() %>.Length) {<%= method.paramNames.init().join(", ") %>};
+             args.AddRange(<%= method.paramNames.last() %><% if (method.isArgsCastNecessary) { %>.Cast<object>()<% } %>);
              traversal.Bytecode.AddStep("<%= method.methodName %>", args.ToArray());<%
              }
              else {
diff --cc gremlin-dotnet/glv/generate.groovy
index 0655fd1,f39680c..7985ca0
--- a/gremlin-dotnet/glv/generate.groovy
+++ b/gremlin-dotnet/glv/generate.groovy
@@@ -276,8 -254,8 +274,8 @@@ def binding = ["pmethods": P.class.getM
                              def tParam = getCSharpGenericTypeParam(t2)
                              def parameters = getCSharpParamString(javaMethod, true)
                              def paramNames = getParamNames(javaMethod.parameters)
-                             def argsListType = getArgsListType(parameters)
-                             return ["methodName": javaMethod.name, "t1":t1, "t2":t2, "tParam":tParam, "parameters":parameters, "paramNames":paramNames, "argsListType":argsListType]
+                             def isArgsCastNecessary = isParamsArgCastNecessary(parameters)
 -                            return ["methodName": javaMethod.name, "typeNameString": typeNameString, "tParam":tParam, "parameters":parameters, "paramNames":paramNames, "isArgsCastNecessary":isArgsCastNecessary]
++                            return ["methodName": javaMethod.name, "t1":t1, "t2":t2, "tParam":tParam, "parameters":parameters, "paramNames":paramNames, "isArgsCastNecessary":isArgsCastNecessary]
                          },
                 "graphStepMethods": GraphTraversal.getMethods().
                          findAll { GraphTraversal.class.equals(it.returnType) }.