Skip to content

Commit

Permalink
Rename on plugins and new 1.10 patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskarth committed Jul 13, 2023
1 parent be01e0a commit e483b5d
Show file tree
Hide file tree
Showing 40 changed files with 75 additions and 77 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def allJar = tasks.register('allJar', Jar) {allJar ->
manifest {
attributes (
'Main-Class': 'org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler',
'Implementation-Name': "Quiltflower",
'Implementation-Name': "Vineflower",
'Implementation-Version': project.version
)
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/idea-not-null/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
archivesBaseName = 'quiltflower-plugin-idea-not-null'
archivesBaseName = 'vineflower-idea-not-null'

dependencies {
implementation project(":")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.plugin.ideanonnull;
package org.vineflower.ideanotnull;

import org.jetbrains.java.decompiler.api.passes.Pass;
import org.jetbrains.java.decompiler.api.passes.PassContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package org.quiltmc.quiltflower.plugin.ideanonnull;
package org.vineflower.ideanotnull;

import org.jetbrains.java.decompiler.api.Plugin;
import org.jetbrains.java.decompiler.api.java.JavaPassLocation;
import org.jetbrains.java.decompiler.api.java.JavaPassRegistrar;
import org.jetbrains.java.decompiler.api.passes.NamedPass;
import org.jetbrains.java.decompiler.api.passes.Pass;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.quiltmc.quiltflower.plugin.ideanonnull.IdeaNotNullPlugin
org.vineflower.ideanotnull.IdeaNotNullPlugin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.plugin.ideanotnull;
package org.vineflower.ideanotnull;

import org.jetbrains.java.decompiler.SingleClassesTestBase;
import org.jetbrains.java.decompiler.main.extern.IFernflowerPreferences;
Expand Down
23 changes: 12 additions & 11 deletions plugins/kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ plugins {

apply plugin: 'maven-publish'

group = 'org.quiltmc'
group = 'org.vineflower'
version = "0.1.0"
archivesBaseName = 'quiltflower-kotlin'
archivesBaseName = 'vineflower-kotlin'

sourceSets {
testDataKotlin.kotlin.srcDirs files("testData/src/kt/")
Expand Down Expand Up @@ -44,12 +44,13 @@ shadowJar {

build.dependsOn(shadowJar)

publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "quiltflower-kotlin"
from components.java
artifact(shadowJar)
}
}
}
// TODO: re-enable after we're publishing for this!
//publishing {
// publications {
// mavenJava(MavenPublication) {
// artifactId = "vineflower-kotlin"
// from components.java
// artifact(shadowJar)
// }
// }
//}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin;
package org.vineflower.kotlin;

import kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf;
import kotlin.reflect.jvm.internal.impl.metadata.jvm.JvmProtoBuf;
Expand All @@ -7,15 +7,15 @@
import org.jetbrains.java.decompiler.main.DecompilerContext;
import org.jetbrains.java.decompiler.main.extern.IFernflowerLogger;
import org.jetbrains.java.decompiler.util.Key;
import org.quiltmc.quiltflower.kotlin.metadata.BitEncoding;
import org.vineflower.kotlin.metadata.BitEncoding;
import org.jetbrains.java.decompiler.modules.decompiler.exps.AnnotationExprent;
import org.jetbrains.java.decompiler.modules.decompiler.exps.ConstExprent;
import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent;
import org.jetbrains.java.decompiler.modules.decompiler.exps.NewExprent;
import org.jetbrains.java.decompiler.struct.StructClass;
import org.jetbrains.java.decompiler.struct.attr.StructAnnotationAttribute;
import org.jetbrains.java.decompiler.struct.attr.StructGeneralAttribute;
import org.quiltmc.quiltflower.kotlin.metadata.MetadataNameResolver;
import org.vineflower.kotlin.metadata.MetadataNameResolver;

import java.io.ByteArrayInputStream;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.quiltmc.quiltflower.kotlin;
package org.vineflower.kotlin;

import kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf;
import org.jetbrains.java.decompiler.main.DecompilerContext;
import org.jetbrains.java.decompiler.util.Key;
import org.quiltmc.quiltflower.kotlin.metadata.MetadataNameResolver;
import org.vineflower.kotlin.metadata.MetadataNameResolver;

public class KotlinDecompilationContext {
public enum KotlinType {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin;
package org.vineflower.kotlin;

import org.jetbrains.java.decompiler.main.collectors.ImportCollector;
import org.jetbrains.java.decompiler.util.TextBuffer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin;
package org.vineflower.kotlin;

import org.jetbrains.java.decompiler.api.Plugin;
import org.jetbrains.java.decompiler.api.language.LanguageSpec;
Expand All @@ -8,7 +8,7 @@
import org.jetbrains.java.decompiler.api.passes.WrappedPass;
import org.jetbrains.java.decompiler.modules.decompiler.*;
import org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper;
import org.quiltmc.quiltflower.kotlin.pass.*;
import org.vineflower.kotlin.pass.*;

public class KotlinPlugin implements Plugin {
private static final StackVarsProcessor.StackSimplifyOptions INLINE_ALL_VARS = new StackVarsProcessor.StackSimplifyOptions()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.quiltmc.quiltflower.kotlin;
package org.vineflower.kotlin;

import kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf;
import net.fabricmc.fernflower.api.IFabricJavadocProvider;
Expand Down Expand Up @@ -37,10 +37,9 @@
import org.jetbrains.java.decompiler.util.TextBuffer;
import org.jetbrains.java.decompiler.util.TextUtil;
import org.jetbrains.java.decompiler.util.collections.VBStyleCollection;
import org.quiltmc.quiltflower.kotlin.expr.KAnnotationExprent;
import org.quiltmc.quiltflower.kotlin.metadata.MetadataNameResolver;
import org.quiltmc.quiltflower.kotlin.util.KTypes;
import org.quiltmc.quiltflower.kotlin.util.ProtobufFlags;
import org.vineflower.kotlin.expr.KAnnotationExprent;
import org.vineflower.kotlin.util.KTypes;
import org.vineflower.kotlin.util.ProtobufFlags;

import java.io.IOException;
import java.util.*;
Expand Down Expand Up @@ -96,7 +95,7 @@ public KotlinWriter() {
private static boolean invokeProcessors(TextBuffer buffer, ClassNode node) {
ClassWrapper wrapper = node.getWrapper();
if (wrapper == null) {
buffer.append("/* $QF: Couldn't be decompiled. Class " + node.classStruct.qualifiedName + " wasn't processed yet! */");
buffer.append("/* $VF: Couldn't be decompiled. Class " + node.classStruct.qualifiedName + " wasn't processed yet! */");
List<String> lines = new ArrayList<>();
lines.addAll(KotlinWriter.getErrorComment());
for (String line : lines) {
Expand Down Expand Up @@ -129,7 +128,7 @@ private static boolean invokeProcessors(TextBuffer buffer, ClassNode node) {
DecompilerContext.getLogger().writeMessage("Class " + node.simpleName + " couldn't be written.",
IFernflowerLogger.Severity.WARN,
t);
buffer.append("// $QF: Couldn't be decompiled");
buffer.append("// $VF: Couldn't be decompiled");
buffer.appendLineSeparator();
if (DecompilerContext.getOption(IFernflowerPreferences.DUMP_EXCEPTION_ON_ERROR)) {
List<String> lines = new ArrayList<>();
Expand Down Expand Up @@ -209,7 +208,7 @@ public void writeClass(ClassNode node, TextBuffer buffer, int indent) {

buffer
.appendIndent(indent)
.append("// $QF: Compiled from " + sourceFile)
.append("// $VF: Compiled from " + sourceFile)
.appendLineSeparator();
}
}
Expand Down Expand Up @@ -1101,7 +1100,7 @@ else if (methodWrapper.varproc.getVarFinal(new VarVersionPair(index, 0)) == VarT

private static void dumpError(TextBuffer buffer, MethodWrapper wrapper, int indent) {
List<String> lines = new ArrayList<>();
lines.add("$QF: Couldn't be decompiled");
lines.add("$VF: Couldn't be decompiled");
boolean exceptions = DecompilerContext.getOption(IFernflowerPreferences.DUMP_EXCEPTION_ON_ERROR);
boolean bytecode = DecompilerContext.getOption(IFernflowerPreferences.DUMP_BYTECODE_ON_ERROR);
if (exceptions) {
Expand Down Expand Up @@ -1345,7 +1344,7 @@ private static void appendRenameComment(TextBuffer buffer, String oldName, MType
if (oldName == null) return;

buffer.appendIndent(indent);
buffer.append("// $QF: renamed from: ");
buffer.append("// $VF: renamed from: ");

switch (type) {
case CLASS:
Expand Down Expand Up @@ -1394,11 +1393,11 @@ public static List<String> getErrorComment() {
}

private static void appendComment(TextBuffer buffer, String comment, int indent) {
buffer.appendIndent(indent).append("// $QF: ").append(comment).appendLineSeparator();
buffer.appendIndent(indent).append("// $VF: ").append(comment).appendLineSeparator();
}

private static void appendInlineComment(TextBuffer buffer, String comment) {
buffer.append("/* $QF: ").append(comment).append(" */");
buffer.append("/* $VF: ").append(comment).append(" */");
}

private static void appendJavadoc(TextBuffer buffer, String javaDoc, int indent) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.quiltmc.quiltflower.kotlin.expr;
package org.vineflower.kotlin.expr;

import org.jetbrains.java.decompiler.main.DecompilerContext;
import org.jetbrains.java.decompiler.modules.decompiler.exps.*;
import org.jetbrains.java.decompiler.struct.gen.VarType;
import org.jetbrains.java.decompiler.util.TextBuffer;
import org.quiltmc.quiltflower.kotlin.util.KTypes;
import org.quiltmc.quiltflower.kotlin.util.KUtils;
import org.vineflower.kotlin.util.KTypes;
import org.vineflower.kotlin.util.KUtils;

public class KAnnotationExprent extends AnnotationExprent implements KExprent {
public enum UseSiteTarget {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.expr;
package org.vineflower.kotlin.expr;

import org.jetbrains.java.decompiler.modules.decompiler.exps.ConstExprent;
import org.jetbrains.java.decompiler.modules.decompiler.exps.ExprUtil;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.expr;
package org.vineflower.kotlin.expr;

/**
* Marker interface for Kotlin exprents.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.quiltmc.quiltflower.kotlin.expr;
package org.vineflower.kotlin.expr;

import org.jetbrains.java.decompiler.modules.decompiler.exps.ExprUtil;
import org.jetbrains.java.decompiler.modules.decompiler.exps.FieldExprent;
import org.jetbrains.java.decompiler.struct.gen.VarType;
import org.jetbrains.java.decompiler.util.TextBuffer;
import org.quiltmc.quiltflower.kotlin.util.KTypes;
import org.vineflower.kotlin.util.KTypes;

public class KFieldExprent extends FieldExprent implements KExprent {
public KFieldExprent(FieldExprent field) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.expr;
package org.vineflower.kotlin.expr;

import org.jetbrains.java.decompiler.code.CodeConstants;
import org.jetbrains.java.decompiler.modules.decompiler.exps.ConstExprent;
Expand All @@ -9,8 +9,8 @@
import org.jetbrains.java.decompiler.struct.gen.VarType;
import org.jetbrains.java.decompiler.util.TextBuffer;
import org.jetbrains.java.decompiler.util.Typed;
import org.quiltmc.quiltflower.kotlin.util.KTypes;
import org.quiltmc.quiltflower.kotlin.util.KUtils;
import org.vineflower.kotlin.util.KTypes;
import org.vineflower.kotlin.util.KUtils;

import java.util.ArrayList;
import java.util.BitSet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.expr;
package org.vineflower.kotlin.expr;

import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent;
import org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.quiltmc.quiltflower.kotlin.expr;
package org.vineflower.kotlin.expr;

import org.jetbrains.java.decompiler.modules.decompiler.exps.Exprent;
import org.jetbrains.java.decompiler.modules.decompiler.exps.VarExprent;
import org.jetbrains.java.decompiler.modules.decompiler.vars.VarProcessor;
import org.jetbrains.java.decompiler.struct.gen.VarType;
import org.jetbrains.java.decompiler.util.TextBuffer;
import org.quiltmc.quiltflower.kotlin.KotlinWriter;
import org.quiltmc.quiltflower.kotlin.util.KTypes;
import org.vineflower.kotlin.KotlinWriter;
import org.vineflower.kotlin.util.KTypes;

import java.util.BitSet;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/

package org.quiltmc.quiltflower.kotlin.metadata;
package org.vineflower.kotlin.metadata;

public class BitEncoding {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.metadata;
package org.vineflower.kotlin.metadata;

import kotlin.reflect.jvm.internal.impl.metadata.jvm.JvmProtoBuf;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.pass;
package org.vineflower.kotlin.pass;

import org.jetbrains.java.decompiler.api.passes.Pass;
import org.jetbrains.java.decompiler.api.passes.PassContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.pass;
package org.vineflower.kotlin.pass;

import org.jetbrains.java.decompiler.api.passes.Pass;
import org.jetbrains.java.decompiler.api.passes.PassContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.pass;
package org.vineflower.kotlin.pass;

import org.jetbrains.java.decompiler.api.passes.Pass;
import org.jetbrains.java.decompiler.api.passes.PassContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package org.quiltmc.quiltflower.kotlin.pass;
package org.vineflower.kotlin.pass;

import org.jetbrains.java.decompiler.api.passes.Pass;
import org.jetbrains.java.decompiler.api.passes.PassContext;
import org.jetbrains.java.decompiler.modules.decompiler.exps.*;
import org.jetbrains.java.decompiler.modules.decompiler.stats.BasicBlockStatement;
import org.jetbrains.java.decompiler.modules.decompiler.stats.IfStatement;
import org.jetbrains.java.decompiler.modules.decompiler.stats.Statement;
import org.quiltmc.quiltflower.kotlin.expr.*;
import org.quiltmc.quiltflower.kotlin.util.KUtils;
import org.vineflower.kotlin.util.KUtils;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.pass;
package org.vineflower.kotlin.pass;

import org.jetbrains.java.decompiler.api.passes.Pass;
import org.jetbrains.java.decompiler.api.passes.PassContext;
Expand All @@ -10,7 +10,7 @@
import org.jetbrains.java.decompiler.modules.decompiler.flow.DirectNode;
import org.jetbrains.java.decompiler.modules.decompiler.flow.FlattenStatementsHelper;
import org.jetbrains.java.decompiler.struct.match.MatchEngine;
import org.quiltmc.quiltflower.kotlin.expr.KFunctionExprent;
import org.vineflower.kotlin.expr.KFunctionExprent;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.pass;
package org.vineflower.kotlin.pass;

import org.jetbrains.java.decompiler.api.passes.Pass;
import org.jetbrains.java.decompiler.api.passes.PassContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.util;
package org.vineflower.kotlin.util;

import org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor;
import org.jetbrains.java.decompiler.struct.gen.VarType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.quiltmc.quiltflower.kotlin.util;
package org.vineflower.kotlin.util;

import org.jetbrains.java.decompiler.modules.decompiler.exps.*;
import org.quiltmc.quiltflower.kotlin.expr.*;
import org.vineflower.kotlin.expr.*;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin.util;
package org.vineflower.kotlin.util;

import kotlin.reflect.jvm.internal.impl.metadata.ProtoBuf;

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.quiltmc.quiltflower.kotlin.KotlinPlugin
org.vineflower.kotlin.KotlinPlugin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.quiltmc.quiltflower.kotlin;
package org.vineflower.kotlin;

import org.jetbrains.java.decompiler.DecompilerTestFixture;
import org.jetbrains.java.decompiler.SingleClassesTestBase;
Expand Down
Loading

0 comments on commit e483b5d

Please sign in to comment.