Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Add factorial/sentence case element #8

Merged
merged 11 commits into from May 9, 2022
Merged

Add factorial/sentence case element #8

merged 11 commits into from May 9, 2022

Conversation

Steffan153
Copy link
Contributor

@Steffan153 Steffan153 commented May 7, 2022

This also adds decrement element, exclusive zero range, exclusive one range, and parity

I tried putting the code into Myxal, but it didn't work, so you can paste it in once Myxal works.

Parsing program...
Compiling program...
Extracting runtime classes...
Writing to jar...
Performing post-compilation optimisations...
ProGuard, version undefined
Unexpected error while computing stack sizes:
  Class       = [jyxal/Main]
  Method      = [main([Ljava/lang/String;)V]
  Exception   = [java.lang.IllegalArgumentException] (Stack size becomes negative after instruction [20] invokestatic #39 = Methodref(io/github/seggan/myxal/runtime/RuntimeMethods.factorial(Lio/github/seggan/myxal/runtime/ProgramStack;)Ljava/lang/Object;) in [jyxal/Main.main([Ljava/lang/String;)V])
Unexpected error while editing code:
  Class       = [jyxal/Main]
  Method      = [main([Ljava/lang/String;)V]
  Exception   = [java.lang.IllegalArgumentException] (Stack size becomes negative after instruction [20] invokestatic #39 = Methodref(io/github/seggan/myxal/runtime/RuntimeMethods.factorial(Lio/github/seggan/myxal/runtime/ProgramStack;)Ljava/lang/Object;) in [jyxal/Main.main([Ljava/lang/String;)V])
Exception in thread "main" java.lang.IllegalArgumentException: Stack size becomes negative after instruction [20] invokestatic #39 = Methodref(io/github/seggan/myxal/runtime/RuntimeMethods.factorial(Lio/github/seggan/myxal/runtime/ProgramStack;)Ljava/lang/Object;) in [jyxal/Main.main([Ljava/lang/String;)V]
        at proguard.classfile.attribute.visitor.StackSizeComputer.evaluateInstructionBlock(StackSizeComputer.java:348)
        at proguard.classfile.attribute.visitor.StackSizeComputer.visitCodeAttribute0(StackSizeComputer.java:162)
        at proguard.classfile.attribute.visitor.StackSizeComputer.visitCodeAttribute(StackSizeComputer.java:124)
        at proguard.classfile.editor.StackSizeUpdater.visitCodeAttribute(StackSizeUpdater.java:44)
        at proguard.classfile.editor.CodeAttributeEditor.visitCodeAttribute0(CodeAttributeEditor.java:595)
        at proguard.classfile.editor.CodeAttributeEditor.visitCodeAttribute(CodeAttributeEditor.java:530)
        at proguard.classfile.util.DynamicMemberReferenceInitializer.visitCodeAttribute(DynamicMemberReferenceInitializer.java:195)
        at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:138)
        at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:148)
        at proguard.classfile.attribute.visitor.AllAttributeVisitor.visitProgramMember(AllAttributeVisitor.java:94)
        at proguard.classfile.visitor.MemberVisitor.visitProgramMethod(MemberVisitor.java:57)
        at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:140)
        at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:695)
        at proguard.classfile.visitor.AllMethodVisitor.visitAnyClass(AllMethodVisitor.java:46)
        at proguard.classfile.visitor.ClassVisitor.visitProgramClass(ClassVisitor.java:40)
        at proguard.classfile.ProgramClass.accept(ProgramClass.java:544)
        at proguard.classfile.ClassPool.classesAccept(ClassPool.java:291)
        at proguard.Initializer.execute(Initializer.java:228)
        at proguard.pass.PassRunner.run(PassRunner.java:24)
        at proguard.ProGuard.initialize(ProGuard.java:328)
        at proguard.ProGuard.execute(ProGuard.java:130)
        at io.github.seggan.myxal.app.Main.doMain(Main.kt:126)
        at io.github.seggan.myxal.app.Main.main(Main.kt:140)

@Steffan153 Steffan153 requested a review from Seggan May 7, 2022 00:52
Copy link
Member

@Seggan Seggan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... sorry, but you could do a lot better

Seggan
Seggan previously requested changes May 7, 2022
Copy link
Member

@Seggan Seggan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops hit wrong button

Copy link
Member

@Seggan Seggan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better. just some naming conventions

Seggan
Seggan previously requested changes May 7, 2022
Copy link
Member

@Seggan Seggan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whats with me hitting the wrong buttons

Co-authored-by: Seggan <segganew@gmail.com>
Copy link
Member

@Seggan Seggan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there

Copy link
Member

@cgccuser cgccuser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually know how Myxal works but here's some minor stuff.

Steffan153 and others added 2 commits May 7, 2022 14:41
Co-authored-by: cgccuser <91574512+cgccuser@users.noreply.github.com>
Co-authored-by: cgccuser <91574512+cgccuser@users.noreply.github.com>
@Steffan153 Steffan153 dismissed stale reviews from Seggan and cgccuser May 9, 2022 18:25

@Steffan153 Steffan153 merged commit 19c9470 into master May 9, 2022
@Steffan153 Steffan153 deleted the factorial branch May 9, 2022 23:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants