From e42db4bf3121cd07e0be487a7ebf985309cc0f74 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Tue, 19 Mar 2013 22:23:13 +0400 Subject: [PATCH] Renamed generator. --- compiler/frontend/src/jet/ExtensionFunctions.jet | 2 +- compiler/frontend/src/jet/Functions.jet | 2 +- ...lesAndFunctions.java => GenerateFunctions.java} | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) rename generators/org/jetbrains/jet/generators/runtime/{GenerateTuplesAndFunctions.java => GenerateFunctions.java} (85%) diff --git a/compiler/frontend/src/jet/ExtensionFunctions.jet b/compiler/frontend/src/jet/ExtensionFunctions.jet index 1613f44ba88..580f3358e71 100644 --- a/compiler/frontend/src/jet/ExtensionFunctions.jet +++ b/compiler/frontend/src/jet/ExtensionFunctions.jet @@ -1,4 +1,4 @@ -// Generated by org.jetbrains.jet.generators.runtime.GenerateTuplesAndFunctions +// Generated by org.jetbrains.jet.generators.runtime.GenerateFunctions package jet diff --git a/compiler/frontend/src/jet/Functions.jet b/compiler/frontend/src/jet/Functions.jet index 2faac1d5a03..727a60f3fea 100644 --- a/compiler/frontend/src/jet/Functions.jet +++ b/compiler/frontend/src/jet/Functions.jet @@ -1,4 +1,4 @@ -// Generated by org.jetbrains.jet.generators.runtime.GenerateTuplesAndFunctions +// Generated by org.jetbrains.jet.generators.runtime.GenerateFunctions package jet diff --git a/generators/org/jetbrains/jet/generators/runtime/GenerateTuplesAndFunctions.java b/generators/org/jetbrains/jet/generators/runtime/GenerateFunctions.java similarity index 85% rename from generators/org/jetbrains/jet/generators/runtime/GenerateTuplesAndFunctions.java rename to generators/org/jetbrains/jet/generators/runtime/GenerateFunctions.java index d3e0435eae1..dfc11f9598d 100644 --- a/generators/org/jetbrains/jet/generators/runtime/GenerateTuplesAndFunctions.java +++ b/generators/org/jetbrains/jet/generators/runtime/GenerateFunctions.java @@ -20,12 +20,12 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.PrintStream; -public class GenerateTuplesAndFunctions { - private static final int TUPLE_COUNT = 23; +public class GenerateFunctions { + private static final int MAX_PARAM_COUNT = 22; private static void generateFunctions(PrintStream out, int count, boolean extension) { generated(out); - for (int i = 0; i < count; i++) { + for (int i = 0; i <= count; i++) { out.print("public abstract class " + (extension ? "ExtensionFunction" : "Function") + i); out.print("<"); if (extension) { @@ -53,7 +53,7 @@ public class GenerateTuplesAndFunctions { } private static void generated(PrintStream out) { - out.println("// Generated by " + GenerateTuplesAndFunctions.class.getName()); + out.println("// Generated by " + GenerateFunctions.class.getName()); out.println(); out.println("package jet"); out.println(); @@ -64,14 +64,14 @@ public class GenerateTuplesAndFunctions { assert baseDir.exists() : "Base dir does not exist: " + baseDir.getAbsolutePath(); PrintStream functions = new PrintStream(new File(baseDir, "Functions.jet")); - generateFunctions(functions, TUPLE_COUNT, false); + generateFunctions(functions, MAX_PARAM_COUNT, false); functions.close(); PrintStream extensionFunctions = new PrintStream(new File(baseDir, "ExtensionFunctions.jet")); - generateFunctions(extensionFunctions, TUPLE_COUNT, true); + generateFunctions(extensionFunctions, MAX_PARAM_COUNT, true); extensionFunctions.close(); } - private GenerateTuplesAndFunctions() { + private GenerateFunctions() { } }