Skip to content

Commit

Permalink
Make patches directory a submodule for pip install .
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Mar 21, 2024
1 parent 7c59eb7 commit b94002b
Show file tree
Hide file tree
Showing 65 changed files with 170 additions and 170 deletions.
2 changes: 1 addition & 1 deletion suite/auto-sync/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ dependencies = [
requires-python = ">= 3.11"

[tool.setuptools]
packages = ["autosync", "autosync.cpptranslator"]
packages = ["autosync", "autosync.cpptranslator", "autosync.cpptranslator.patches"]
package-dir = {"" = "src"}
120 changes: 60 additions & 60 deletions suite/auto-sync/src/autosync/cpptranslator/CppTranslator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,70 @@
from tree_sitter import Language, Node, Parser, Query, Tree

from autosync.cpptranslator.Configurator import Configurator
from autosync.cpptranslator.Patches.AddCSDetail import AddCSDetail
from autosync.cpptranslator.Patches.AddOperand import AddOperand
from autosync.cpptranslator.Patches.Assert import Assert
from autosync.cpptranslator.Patches.BitCastStdArray import BitCastStdArray
from autosync.cpptranslator.Patches.CheckDecoderStatus import CheckDecoderStatus
from autosync.cpptranslator.Patches.ClassConstructorDef import ClassConstructorDef
from autosync.cpptranslator.Patches.ClassesDef import ClassesDef
from autosync.cpptranslator.Patches.ConstMCInstParameter import ConstMCInstParameter
from autosync.cpptranslator.Patches.ConstMCOperand import ConstMCOperand
from autosync.cpptranslator.Patches.CppInitCast import CppInitCast
from autosync.cpptranslator.Patches.CreateOperand0 import CreateOperand0
from autosync.cpptranslator.Patches.CreateOperand1 import CreateOperand1
from autosync.cpptranslator.Patches.DeclarationInConditionClause import (
from autosync.cpptranslator.patches.AddCSDetail import AddCSDetail
from autosync.cpptranslator.patches.AddOperand import AddOperand
from autosync.cpptranslator.patches.Assert import Assert
from autosync.cpptranslator.patches.BitCastStdArray import BitCastStdArray
from autosync.cpptranslator.patches.CheckDecoderStatus import CheckDecoderStatus
from autosync.cpptranslator.patches.ClassConstructorDef import ClassConstructorDef
from autosync.cpptranslator.patches.ClassesDef import ClassesDef
from autosync.cpptranslator.patches.ConstMCInstParameter import ConstMCInstParameter
from autosync.cpptranslator.patches.ConstMCOperand import ConstMCOperand
from autosync.cpptranslator.patches.CppInitCast import CppInitCast
from autosync.cpptranslator.patches.CreateOperand0 import CreateOperand0
from autosync.cpptranslator.patches.CreateOperand1 import CreateOperand1
from autosync.cpptranslator.patches.DeclarationInConditionClause import (
DeclarationInConditionalClause,
)
from autosync.cpptranslator.Patches.DecodeInstruction import DecodeInstruction
from autosync.cpptranslator.Patches.DecoderCast import DecoderCast
from autosync.cpptranslator.Patches.DecoderParameter import DecoderParameter
from autosync.cpptranslator.Patches.FallThrough import FallThrough
from autosync.cpptranslator.Patches.FeatureBits import FeatureBits
from autosync.cpptranslator.Patches.FeatureBitsDecl import FeatureBitsDecl
from autosync.cpptranslator.Patches.FieldFromInstr import FieldFromInstr
from autosync.cpptranslator.Patches.GetNumOperands import GetNumOperands
from autosync.cpptranslator.Patches.GetOpcode import GetOpcode
from autosync.cpptranslator.Patches.GetOperand import GetOperand
from autosync.cpptranslator.Patches.GetOperandRegImm import GetOperandRegImm
from autosync.cpptranslator.Patches.GetRegClass import GetRegClass
from autosync.cpptranslator.Patches.GetRegFromClass import GetRegFromClass
from autosync.cpptranslator.Patches.GetSubReg import GetSubReg
from autosync.cpptranslator.Patches.Includes import Includes
from autosync.cpptranslator.Patches.InlineToStaticInline import InlineToStaticInline
from autosync.cpptranslator.Patches.IsOptionalDef import IsOptionalDef
from autosync.cpptranslator.Patches.IsPredicate import IsPredicate
from autosync.cpptranslator.Patches.IsRegImm import IsOperandRegImm
from autosync.cpptranslator.Patches.LLVMFallThrough import LLVMFallThrough
from autosync.cpptranslator.Patches.LLVMunreachable import LLVMUnreachable
from autosync.cpptranslator.Patches.MethodToFunctions import MethodToFunction
from autosync.cpptranslator.Patches.MethodTypeQualifier import MethodTypeQualifier
from autosync.cpptranslator.Patches.NamespaceAnon import NamespaceAnon
from autosync.cpptranslator.Patches.NamespaceArch import NamespaceArch
from autosync.cpptranslator.Patches.NamespaceLLVM import NamespaceLLVM
from autosync.cpptranslator.Patches.OutStreamParam import OutStreamParam
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.Patches.PredicateBlockFunctions import (
from autosync.cpptranslator.patches.DecodeInstruction import DecodeInstruction
from autosync.cpptranslator.patches.DecoderCast import DecoderCast
from autosync.cpptranslator.patches.DecoderParameter import DecoderParameter
from autosync.cpptranslator.patches.FallThrough import FallThrough
from autosync.cpptranslator.patches.FeatureBits import FeatureBits
from autosync.cpptranslator.patches.FeatureBitsDecl import FeatureBitsDecl
from autosync.cpptranslator.patches.FieldFromInstr import FieldFromInstr
from autosync.cpptranslator.patches.GetNumOperands import GetNumOperands
from autosync.cpptranslator.patches.GetOpcode import GetOpcode
from autosync.cpptranslator.patches.GetOperand import GetOperand
from autosync.cpptranslator.patches.GetOperandRegImm import GetOperandRegImm
from autosync.cpptranslator.patches.GetRegClass import GetRegClass
from autosync.cpptranslator.patches.GetRegFromClass import GetRegFromClass
from autosync.cpptranslator.patches.GetSubReg import GetSubReg
from autosync.cpptranslator.patches.Includes import Includes
from autosync.cpptranslator.patches.InlineToStaticInline import InlineToStaticInline
from autosync.cpptranslator.patches.IsOptionalDef import IsOptionalDef
from autosync.cpptranslator.patches.IsPredicate import IsPredicate
from autosync.cpptranslator.patches.IsRegImm import IsOperandRegImm
from autosync.cpptranslator.patches.LLVMFallThrough import LLVMFallThrough
from autosync.cpptranslator.patches.LLVMunreachable import LLVMUnreachable
from autosync.cpptranslator.patches.MethodToFunctions import MethodToFunction
from autosync.cpptranslator.patches.MethodTypeQualifier import MethodTypeQualifier
from autosync.cpptranslator.patches.NamespaceAnon import NamespaceAnon
from autosync.cpptranslator.patches.NamespaceArch import NamespaceArch
from autosync.cpptranslator.patches.NamespaceLLVM import NamespaceLLVM
from autosync.cpptranslator.patches.OutStreamParam import OutStreamParam
from autosync.cpptranslator.patches.Patch import Patch
from autosync.cpptranslator.patches.PredicateBlockFunctions import (
PredicateBlockFunctions,
)
from autosync.cpptranslator.Patches.PrintAnnotation import PrintAnnotation
from autosync.cpptranslator.Patches.PrintRegImmShift import PrintRegImmShift
from autosync.cpptranslator.Patches.QualifiedIdentifier import QualifiedIdentifier
from autosync.cpptranslator.Patches.ReferencesDecl import ReferencesDecl
from autosync.cpptranslator.Patches.RegClassContains import RegClassContains
from autosync.cpptranslator.Patches.SetOpcode import SetOpcode
from autosync.cpptranslator.Patches.SignExtend import SignExtend
from autosync.cpptranslator.Patches.SizeAssignments import SizeAssignment
from autosync.cpptranslator.Patches.STIArgument import STIArgument
from autosync.cpptranslator.Patches.STIFeatureBits import STIFeatureBits
from autosync.cpptranslator.Patches.STParameter import SubtargetInfoParam
from autosync.cpptranslator.Patches.StreamOperation import StreamOperations
from autosync.cpptranslator.Patches.TemplateDeclaration import TemplateDeclaration
from autosync.cpptranslator.Patches.TemplateDefinition import TemplateDefinition
from autosync.cpptranslator.Patches.TemplateParamDecl import TemplateParamDecl
from autosync.cpptranslator.Patches.TemplateRefs import TemplateRefs
from autosync.cpptranslator.Patches.UseMarkup import UseMarkup
from autosync.cpptranslator.Patches.UsingDeclaration import UsingDeclaration
from autosync.cpptranslator.patches.PrintAnnotation import PrintAnnotation
from autosync.cpptranslator.patches.PrintRegImmShift import PrintRegImmShift
from autosync.cpptranslator.patches.QualifiedIdentifier import QualifiedIdentifier
from autosync.cpptranslator.patches.ReferencesDecl import ReferencesDecl
from autosync.cpptranslator.patches.RegClassContains import RegClassContains
from autosync.cpptranslator.patches.SetOpcode import SetOpcode
from autosync.cpptranslator.patches.SignExtend import SignExtend
from autosync.cpptranslator.patches.SizeAssignments import SizeAssignment
from autosync.cpptranslator.patches.STIArgument import STIArgument
from autosync.cpptranslator.patches.STIFeatureBits import STIFeatureBits
from autosync.cpptranslator.patches.STParameter import SubtargetInfoParam
from autosync.cpptranslator.patches.StreamOperation import StreamOperations
from autosync.cpptranslator.patches.TemplateDeclaration import TemplateDeclaration
from autosync.cpptranslator.patches.TemplateDefinition import TemplateDefinition
from autosync.cpptranslator.patches.TemplateParamDecl import TemplateParamDecl
from autosync.cpptranslator.patches.TemplateRefs import TemplateRefs
from autosync.cpptranslator.patches.UseMarkup import UseMarkup
from autosync.cpptranslator.patches.UsingDeclaration import UsingDeclaration
from autosync.cpptranslator.TemplateCollector import TemplateCollector
from autosync.Helper import (
convert_loglevel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from tree_sitter import Language, Node, Parser, Query

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.patches.Helper import get_text


class TemplateRefInstance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import (
from autosync.cpptranslator.patches.Helper import (
get_MCInst_var_name,
get_text,
template_param_list_to_dict,
)
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Patch import Patch


class AddCSDetail(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class AddOperand(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Patch import Patch


class Assert(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class BitCastStdArray(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class CheckDecoderStatus(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Patch import Patch


class ClassConstructorDef(Patch):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class ClassesDef(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class ConstMCInstParameter(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class ConstMCOperand(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class CppInitCast(Patch):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class CreateOperand0(Patch):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_MCInst_var_name, get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_MCInst_var_name, get_text
from autosync.cpptranslator.patches.Patch import Patch


class CreateOperand1(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_capture_node, get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_capture_node, get_text
from autosync.cpptranslator.patches.Patch import Patch


class DeclarationInConditionalClause(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class DecodeInstruction(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Patch import Patch


class DecoderCast(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Patch import Patch


class DecoderParameter(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Patch import Patch


class FallThrough(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_MCInst_var_name, get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_MCInst_var_name, get_text
from autosync.cpptranslator.patches.Patch import Patch


class FeatureBits(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Patch import Patch


class FeatureBitsDecl(Patch):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_function_params_of_node, get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_function_params_of_node, get_text
from autosync.cpptranslator.patches.Patch import Patch


class FieldFromInstr(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class GetNumOperands(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class GetOpcode(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_text
from autosync.cpptranslator.patches.Patch import Patch


class GetOperand(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import get_capture_node, get_text
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Helper import get_capture_node, get_text
from autosync.cpptranslator.patches.Patch import Patch


class GetOperandRegImm(Patch):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from tree_sitter import Node

from autosync.cpptranslator.Patches.Helper import (
from autosync.cpptranslator.patches.Helper import (
get_capture_node,
get_MCInst_var_name,
get_text,
)
from autosync.cpptranslator.Patches.Patch import Patch
from autosync.cpptranslator.patches.Patch import Patch


class GetRegClass(Patch):
Expand Down
Loading

0 comments on commit b94002b

Please sign in to comment.