From 3d3c47135f3b53fdea4555a73bff028381974ced Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 00:28:34 +0900 Subject: [PATCH 01/96] Initial refactor commit --- .DS_Store | Bin 6148 -> 0 bytes .gitignore | 5 + JavaTest/build.xml | 73 - JavaTest/build/built-jar.properties | 4 - .../JavaTest$testClass$testClass2.class | Bin 1029 -> 0 bytes .../classes/javatest/JavaTest$testClass.class | Bin 1091 -> 0 bytes .../build/classes/javatest/JavaTest.class | Bin 2487 -> 0 bytes JavaTest/dist/JavaTest.jar | Bin 5577 -> 0 bytes JavaTest/dist/README.TXT | 32 - JavaTest/manifest.mf | 3 - JavaTest/nbproject/build-impl.xml | 1413 ----------------- JavaTest/nbproject/genfiles.properties | 8 - JavaTest/nbproject/private/private.properties | 2 - JavaTest/nbproject/private/private.xml | 7 - JavaTest/nbproject/project.properties | 73 - JavaTest/nbproject/project.xml | 15 - JavaTest/src/javatest/JavaTest.java | 162 -- .../JavaAnnotationDefaultAttribute.php | 13 - PHPJava/Attributes/JavaAttributeInfo.php | 44 - .../JavaBootstrapMethodsAttribute.php | 13 - PHPJava/Attributes/JavaCodeAttribute.php | 81 - .../Attributes/JavaConstantValueAttribute.php | 13 - .../Attributes/JavaDeprecatedAttribute.php | 13 - .../JavaEnclosingMethodAttribute.php | 13 - .../Attributes/JavaExceptionsAttribute.php | 13 - .../Attributes/JavaInnerClassesAttribute.php | 33 - .../JavaLineNumberTableAttribute.php | 32 - .../JavaLocalVariableTableAttribute.php | 22 - .../JavaLocalVariableTypeTableAttribute.php | 13 - ...vaRuntimeInvisibleAnnotationsAttribute.php | 13 - ...InvisibleParameterAnnotationsAttribute.php | 13 - ...JavaRuntimeVisibleAnnotationsAttribute.php | 13 - ...meVisibleParameterAnnotationsAttribute.php | 13 - PHPJava/Attributes/JavaSignatureAttribute.php | 13 - .../JavaSourceDebugExtensionAttribute.php | 13 - .../Attributes/JavaSourceFileAttribute.php | 23 - .../Attributes/JavaStackMapTableAttribute.php | 31 - PHPJava/Attributes/JavaSyntheticAttribute.php | 13 - PHPJava/Common/JavaAttribute.php | 19 - PHPJava/Common/JavaBinaryStream.php | 102 -- PHPJava/Common/JavaEnum.php | 36 - PHPJava/Common/JavaInvoker.php | 58 - PHPJava/Common/JavaStatement.php | 126 -- PHPJava/Common/JavaStructure.php | 19 - PHPJava/Common/JavaType.php | 38 - PHPJava/Core/JavaArchive.php | 123 -- PHPJava/Core/JavaClass.php | 785 --------- PHPJava/Core/JavaDecompile.php | 7 - PHPJava/Core/JavaManipulator.php | 54 - PHPJava/Core/JavaManipulatorInfo.php | 27 - PHPJava/Enums/JavaAccessFlagEnum.php | 14 - PHPJava/Enums/JavaClassAccessFlagEnum.php | 14 - PHPJava/Enums/JavaClassConstantEnum.php | 17 - PHPJava/Enums/JavaMnemonicEnum.php | 212 --- PHPJava/Exceptions/JavaArchiveException.php | 3 - .../JavaArrayIndexOutOfBoundsException.php | 3 - PHPJava/Exceptions/JavaAttributeException.php | 3 - PHPJava/Exceptions/JavaClassException.php | 3 - PHPJava/Exceptions/JavaClassUndefined.php | 3 - PHPJava/Exceptions/JavaInvokerException.php | 5 - .../Exceptions/JavaManipulatorException.php | 3 - .../Exceptions/JavaNullPointerException.php | 3 - PHPJava/Exceptions/JavaPlatformException.php | 3 - .../Exceptions/JavaPlatformHasNotClass.php | 3 - PHPJava/Exceptions/JavaStatementException.php | 5 - PHPJava/Invoker/JavaMethodInvoker.php | 246 --- PHPJava/Platform/java/io/PrintStream.php | 34 - .../java/lang/NullPointerException.php | 9 - PHPJava/Platform/java/lang/String.php | 62 - PHPJava/Platform/java/lang/StringBuilder.php | 42 - PHPJava/Platform/java/lang/System.php | 9 - PHPJava/Statements/JavaStatement_aaload.php | 23 - PHPJava/Statements/JavaStatement_aastore.php | 18 - .../Statements/JavaStatement_aconst_null.php | 14 - PHPJava/Statements/JavaStatement_aload.php | 16 - PHPJava/Statements/JavaStatement_aload_0.php | 14 - PHPJava/Statements/JavaStatement_aload_1.php | 15 - PHPJava/Statements/JavaStatement_aload_2.php | 14 - PHPJava/Statements/JavaStatement_aload_3.php | 14 - .../Statements/JavaStatement_anewarray.php | 23 - PHPJava/Statements/JavaStatement_areturn.php | 11 - .../Statements/JavaStatement_arraylength.php | 13 - PHPJava/Statements/JavaStatement_astore.php | 12 - PHPJava/Statements/JavaStatement_astore_0.php | 11 - PHPJava/Statements/JavaStatement_astore_1.php | 11 - PHPJava/Statements/JavaStatement_astore_2.php | 11 - PHPJava/Statements/JavaStatement_astore_3.php | 11 - PHPJava/Statements/JavaStatement_athrow.php | 30 - PHPJava/Statements/JavaStatement_baload.php | 11 - PHPJava/Statements/JavaStatement_bastore.php | 11 - PHPJava/Statements/JavaStatement_bipush.php | 11 - .../Statements/JavaStatement_breakpoint.php | 11 - PHPJava/Statements/JavaStatement_caload.php | 11 - PHPJava/Statements/JavaStatement_castore.php | 11 - .../Statements/JavaStatement_checkcast.php | 11 - PHPJava/Statements/JavaStatement_d2f.php | 11 - PHPJava/Statements/JavaStatement_d2i.php | 11 - PHPJava/Statements/JavaStatement_d2l.php | 11 - PHPJava/Statements/JavaStatement_dadd.php | 14 - PHPJava/Statements/JavaStatement_daload.php | 17 - PHPJava/Statements/JavaStatement_dastore.php | 18 - PHPJava/Statements/JavaStatement_dcmpg.php | 11 - PHPJava/Statements/JavaStatement_dcmpl.php | 11 - PHPJava/Statements/JavaStatement_dconst_0.php | 11 - PHPJava/Statements/JavaStatement_dconst_1.php | 11 - PHPJava/Statements/JavaStatement_ddiv.php | 11 - PHPJava/Statements/JavaStatement_dload.php | 15 - PHPJava/Statements/JavaStatement_dload_0.php | 11 - PHPJava/Statements/JavaStatement_dload_1.php | 11 - PHPJava/Statements/JavaStatement_dload_2.php | 11 - PHPJava/Statements/JavaStatement_dload_3.php | 11 - PHPJava/Statements/JavaStatement_dmul.php | 16 - PHPJava/Statements/JavaStatement_dneg.php | 11 - PHPJava/Statements/JavaStatement_drem.php | 11 - PHPJava/Statements/JavaStatement_dreturn.php | 11 - PHPJava/Statements/JavaStatement_dstore.php | 17 - PHPJava/Statements/JavaStatement_dstore_0.php | 11 - PHPJava/Statements/JavaStatement_dstore_1.php | 11 - PHPJava/Statements/JavaStatement_dstore_2.php | 11 - PHPJava/Statements/JavaStatement_dstore_3.php | 11 - PHPJava/Statements/JavaStatement_dsub.php | 14 - PHPJava/Statements/JavaStatement_dup.php | 11 - PHPJava/Statements/JavaStatement_dup2.php | 11 - PHPJava/Statements/JavaStatement_dup2_x1.php | 11 - PHPJava/Statements/JavaStatement_dup2_x2.php | 11 - PHPJava/Statements/JavaStatement_dup_x1.php | 11 - PHPJava/Statements/JavaStatement_dup_x2.php | 11 - PHPJava/Statements/JavaStatement_f2d.php | 11 - PHPJava/Statements/JavaStatement_f2i.php | 11 - PHPJava/Statements/JavaStatement_f2l.php | 11 - PHPJava/Statements/JavaStatement_fadd.php | 11 - PHPJava/Statements/JavaStatement_faload.php | 11 - PHPJava/Statements/JavaStatement_fastore.php | 11 - PHPJava/Statements/JavaStatement_fcmpg.php | 11 - PHPJava/Statements/JavaStatement_fcmpl.php | 11 - PHPJava/Statements/JavaStatement_fconst_0.php | 11 - PHPJava/Statements/JavaStatement_fconst_1.php | 11 - PHPJava/Statements/JavaStatement_fconst_2.php | 11 - PHPJava/Statements/JavaStatement_fdiv.php | 11 - PHPJava/Statements/JavaStatement_fload.php | 11 - PHPJava/Statements/JavaStatement_fload_0.php | 11 - PHPJava/Statements/JavaStatement_fload_1.php | 11 - PHPJava/Statements/JavaStatement_fload_2.php | 11 - PHPJava/Statements/JavaStatement_fload_3.php | 11 - PHPJava/Statements/JavaStatement_fmul.php | 11 - PHPJava/Statements/JavaStatement_fneg.php | 11 - PHPJava/Statements/JavaStatement_frem.php | 11 - PHPJava/Statements/JavaStatement_freturn.php | 11 - PHPJava/Statements/JavaStatement_fstore.php | 11 - PHPJava/Statements/JavaStatement_fstore_0.php | 11 - PHPJava/Statements/JavaStatement_fstore_1.php | 11 - PHPJava/Statements/JavaStatement_fstore_2.php | 11 - PHPJava/Statements/JavaStatement_fstore_3.php | 11 - PHPJava/Statements/JavaStatement_fsub.php | 11 - PHPJava/Statements/JavaStatement_getfield.php | 27 - .../Statements/JavaStatement_getstatic.php | 44 - PHPJava/Statements/JavaStatement_goto.php | 13 - PHPJava/Statements/JavaStatement_goto_w.php | 11 - PHPJava/Statements/JavaStatement_i2b.php | 11 - PHPJava/Statements/JavaStatement_i2c.php | 11 - PHPJava/Statements/JavaStatement_i2d.php | 11 - PHPJava/Statements/JavaStatement_i2f.php | 11 - PHPJava/Statements/JavaStatement_i2l.php | 11 - PHPJava/Statements/JavaStatement_i2s.php | 13 - PHPJava/Statements/JavaStatement_iadd.php | 14 - PHPJava/Statements/JavaStatement_iaload.php | 14 - PHPJava/Statements/JavaStatement_iand.php | 14 - PHPJava/Statements/JavaStatement_iastore.php | 15 - PHPJava/Statements/JavaStatement_iconst_0.php | 11 - PHPJava/Statements/JavaStatement_iconst_1.php | 11 - PHPJava/Statements/JavaStatement_iconst_2.php | 11 - PHPJava/Statements/JavaStatement_iconst_3.php | 11 - PHPJava/Statements/JavaStatement_iconst_4.php | 11 - PHPJava/Statements/JavaStatement_iconst_5.php | 11 - .../Statements/JavaStatement_iconst_m1.php | 11 - PHPJava/Statements/JavaStatement_idiv.php | 11 - .../Statements/JavaStatement_if_acmpeq.php | 20 - .../Statements/JavaStatement_if_acmpne.php | 20 - .../Statements/JavaStatement_if_icmpeq.php | 11 - .../Statements/JavaStatement_if_icmpge.php | 21 - .../Statements/JavaStatement_if_icmpgt.php | 21 - .../Statements/JavaStatement_if_icmple.php | 11 - .../Statements/JavaStatement_if_icmplt.php | 19 - .../Statements/JavaStatement_if_icmpne.php | 20 - PHPJava/Statements/JavaStatement_ifeq.php | 20 - PHPJava/Statements/JavaStatement_ifge.php | 11 - PHPJava/Statements/JavaStatement_ifgt.php | 11 - PHPJava/Statements/JavaStatement_ifle.php | 11 - PHPJava/Statements/JavaStatement_iflt.php | 11 - PHPJava/Statements/JavaStatement_ifne.php | 19 - .../Statements/JavaStatement_ifnonnull.php | 11 - PHPJava/Statements/JavaStatement_ifnull.php | 11 - PHPJava/Statements/JavaStatement_iinc.php | 14 - PHPJava/Statements/JavaStatement_iload.php | 13 - PHPJava/Statements/JavaStatement_iload_0.php | 11 - PHPJava/Statements/JavaStatement_iload_1.php | 11 - PHPJava/Statements/JavaStatement_iload_2.php | 11 - PHPJava/Statements/JavaStatement_iload_3.php | 11 - PHPJava/Statements/JavaStatement_impdep1.php | 11 - PHPJava/Statements/JavaStatement_impdep2.php | 11 - PHPJava/Statements/JavaStatement_imul.php | 14 - PHPJava/Statements/JavaStatement_ineg.php | 13 - .../Statements/JavaStatement_instanceof.php | 11 - .../JavaStatement_invokedynamic.php | 11 - .../JavaStatement_invokeinterface.php | 11 - .../JavaStatement_invokespecial.php | 33 - .../Statements/JavaStatement_invokestatic.php | 39 - .../JavaStatement_invokevirtual.php | 61 - PHPJava/Statements/JavaStatement_ior.php | 14 - PHPJava/Statements/JavaStatement_irem.php | 11 - PHPJava/Statements/JavaStatement_ireturn.php | 14 - PHPJava/Statements/JavaStatement_ishl.php | 14 - PHPJava/Statements/JavaStatement_ishr.php | 15 - PHPJava/Statements/JavaStatement_istore.php | 12 - PHPJava/Statements/JavaStatement_istore_0.php | 11 - PHPJava/Statements/JavaStatement_istore_1.php | 11 - PHPJava/Statements/JavaStatement_istore_2.php | 11 - PHPJava/Statements/JavaStatement_istore_3.php | 11 - PHPJava/Statements/JavaStatement_isub.php | 14 - PHPJava/Statements/JavaStatement_iushr.php | 14 - PHPJava/Statements/JavaStatement_ixor.php | 14 - PHPJava/Statements/JavaStatement_jsr.php | 11 - PHPJava/Statements/JavaStatement_jsr_w.php | 11 - PHPJava/Statements/JavaStatement_l2d.php | 11 - PHPJava/Statements/JavaStatement_l2f.php | 11 - PHPJava/Statements/JavaStatement_l2i.php | 11 - PHPJava/Statements/JavaStatement_ladd.php | 14 - PHPJava/Statements/JavaStatement_laload.php | 17 - PHPJava/Statements/JavaStatement_land.php | 14 - PHPJava/Statements/JavaStatement_lastore.php | 18 - PHPJava/Statements/JavaStatement_lcmp.php | 11 - PHPJava/Statements/JavaStatement_lconst_0.php | 11 - PHPJava/Statements/JavaStatement_lconst_1.php | 11 - PHPJava/Statements/JavaStatement_ldc.php | 40 - PHPJava/Statements/JavaStatement_ldc2_w.php | 15 - PHPJava/Statements/JavaStatement_ldc_w.php | 11 - PHPJava/Statements/JavaStatement_ldiv.php | 11 - PHPJava/Statements/JavaStatement_lload.php | 13 - PHPJava/Statements/JavaStatement_lload_0.php | 11 - PHPJava/Statements/JavaStatement_lload_1.php | 11 - PHPJava/Statements/JavaStatement_lload_2.php | 11 - PHPJava/Statements/JavaStatement_lload_3.php | 11 - PHPJava/Statements/JavaStatement_lmul.php | 14 - PHPJava/Statements/JavaStatement_lneg.php | 11 - .../Statements/JavaStatement_lookupswitch.php | 38 - PHPJava/Statements/JavaStatement_lor.php | 14 - PHPJava/Statements/JavaStatement_lrem.php | 11 - PHPJava/Statements/JavaStatement_lreturn.php | 11 - PHPJava/Statements/JavaStatement_lshl.php | 14 - PHPJava/Statements/JavaStatement_lshr.php | 14 - PHPJava/Statements/JavaStatement_lstore.php | 12 - PHPJava/Statements/JavaStatement_lstore_0.php | 11 - PHPJava/Statements/JavaStatement_lstore_1.php | 11 - PHPJava/Statements/JavaStatement_lstore_2.php | 11 - PHPJava/Statements/JavaStatement_lstore_3.php | 11 - PHPJava/Statements/JavaStatement_lsub.php | 14 - PHPJava/Statements/JavaStatement_lushr.php | 14 - PHPJava/Statements/JavaStatement_lxor.php | 11 - .../Statements/JavaStatement_monitorenter.php | 11 - .../Statements/JavaStatement_monitorexit.php | 11 - .../JavaStatement_multianewarray.php | 11 - PHPJava/Statements/JavaStatement_new.php | 99 -- PHPJava/Statements/JavaStatement_newarray.php | 17 - PHPJava/Statements/JavaStatement_nop.php | 10 - PHPJava/Statements/JavaStatement_pop.php | 11 - PHPJava/Statements/JavaStatement_pop2.php | 11 - PHPJava/Statements/JavaStatement_putfield.php | 20 - .../Statements/JavaStatement_putstatic.php | 21 - PHPJava/Statements/JavaStatement_ret.php | 11 - PHPJava/Statements/JavaStatement_return.php | 11 - PHPJava/Statements/JavaStatement_saload.php | 11 - PHPJava/Statements/JavaStatement_sastore.php | 11 - PHPJava/Statements/JavaStatement_sipush.php | 11 - PHPJava/Statements/JavaStatement_swap.php | 11 - .../Statements/JavaStatement_tableswitch.php | 37 - PHPJava/Statements/JavaStatement_wide.php | 11 - PHPJava/Stream/JavaByteCodeStream.php | 71 - .../Structures/JavaStructureAppendFrame.php | 25 - PHPJava/Structures/JavaStructureChopFrame.php | 18 - PHPJava/Structures/JavaStructureClass.php | 22 - PHPJava/Structures/JavaStructureClasses.php | 64 - PHPJava/Structures/JavaStructureDouble.php | 23 - .../JavaStructureDoubleVariableInfo.php | 15 - .../JavaStructureExceptionTable.php | 57 - PHPJava/Structures/JavaStructureFieldInfo.php | 53 - PHPJava/Structures/JavaStructureFieldRef.php | 29 - PHPJava/Structures/JavaStructureFloat.php | 21 - .../JavaStructureFloatVariableInfo.php | 15 - PHPJava/Structures/JavaStructureFullFrame.php | 38 - PHPJava/Structures/JavaStructureInteger.php | 22 - .../JavaStructureIntegerVariableInfo.php | 15 - .../JavaStructureLineNumberTable.php | 32 - .../JavaStructureLocalVariableTable.php | 24 - PHPJava/Structures/JavaStructureLong.php | 28 - .../JavaStructureLongVariableInfo.php | 15 - .../Structures/JavaStructureMethodInfo.php | 53 - PHPJava/Structures/JavaStructureMethodref.php | 29 - .../Structures/JavaStructureNameAndType.php | 29 - .../JavaStructureNullVariableInfo.php | 15 - .../JavaStructureObjectVariableInfo.php | 17 - PHPJava/Structures/JavaStructureSameFrame.php | 16 - .../JavaStructureSameFrameExtended.php | 19 - ...JavaStructureSameLocals1StackItemFrame.php | 19 - ...ctureSameLocals1StackItemFrameExtended.php | 21 - .../Structures/JavaStructureStackMapFrame.php | 56 - PHPJava/Structures/JavaStructureString.php | 21 - .../JavaStructureTopVariableInfo.php | 15 - ...StructureUninitializedThisVariableInfo.php | 15 - ...JavaStructureUninitializedVariableInfo.php | 17 - PHPJava/Structures/JavaStructureUtf8.php | 34 - .../JavaStructureVerificationTypeInfo.php | 36 - PHPJava/Types/JavaTypeBoolean.php | 5 - PHPJava/Types/JavaTypeByte.php | 5 - PHPJava/Types/JavaTypeChar.php | 5 - PHPJava/Types/JavaTypeDouble.php | 5 - PHPJava/Types/JavaTypeFloat.php | 5 - PHPJava/Types/JavaTypeInt.php | 5 - PHPJava/Types/JavaTypeLong.php | 5 - PHPJava/Types/JavaTypeShort.php | 5 - PHPJava/Utils/BinaryTools.php | 329 ---- PHPJava/Utils/BinaryToolsException.php | 3 - README.md | 124 +- Test.class | Bin 1852 -> 0 bytes composer.json | 20 + license | 19 + nbproject/private/private.properties | 4 - nbproject/private/private.xml | 7 - nbproject/project.properties | 7 - nbproject/project.xml | 9 - .../private/config.properties => src/.gitkeep | 0 src/constants/.gitkeep | 0 src/core/.gitkeep | 0 src/emulator/java/io/.gitkeep | 0 src/emulator/java/lang/.gitkeep | 0 src/exceptions/.gitkeep | 0 src/kernel/attributes/.gitkeep | 0 src/kernel/mnemonics/.gitkeep | 0 src/kernel/structures/.gitkeep | 0 src/kernel/types/.gitkeep | 0 src/utilities/.gitkeep | 0 test.java | 288 ---- test.php | 81 - tests/.gitkeep | 0 343 files changed, 45 insertions(+), 9092 deletions(-) delete mode 100644 .DS_Store create mode 100644 .gitignore delete mode 100644 JavaTest/build.xml delete mode 100644 JavaTest/build/built-jar.properties delete mode 100644 JavaTest/build/classes/javatest/JavaTest$testClass$testClass2.class delete mode 100644 JavaTest/build/classes/javatest/JavaTest$testClass.class delete mode 100644 JavaTest/build/classes/javatest/JavaTest.class delete mode 100644 JavaTest/dist/JavaTest.jar delete mode 100644 JavaTest/dist/README.TXT delete mode 100644 JavaTest/manifest.mf delete mode 100644 JavaTest/nbproject/build-impl.xml delete mode 100644 JavaTest/nbproject/genfiles.properties delete mode 100644 JavaTest/nbproject/private/private.properties delete mode 100644 JavaTest/nbproject/private/private.xml delete mode 100644 JavaTest/nbproject/project.properties delete mode 100644 JavaTest/nbproject/project.xml delete mode 100644 JavaTest/src/javatest/JavaTest.java delete mode 100644 PHPJava/Attributes/JavaAnnotationDefaultAttribute.php delete mode 100644 PHPJava/Attributes/JavaAttributeInfo.php delete mode 100644 PHPJava/Attributes/JavaBootstrapMethodsAttribute.php delete mode 100644 PHPJava/Attributes/JavaCodeAttribute.php delete mode 100644 PHPJava/Attributes/JavaConstantValueAttribute.php delete mode 100644 PHPJava/Attributes/JavaDeprecatedAttribute.php delete mode 100644 PHPJava/Attributes/JavaEnclosingMethodAttribute.php delete mode 100644 PHPJava/Attributes/JavaExceptionsAttribute.php delete mode 100644 PHPJava/Attributes/JavaInnerClassesAttribute.php delete mode 100644 PHPJava/Attributes/JavaLineNumberTableAttribute.php delete mode 100644 PHPJava/Attributes/JavaLocalVariableTableAttribute.php delete mode 100644 PHPJava/Attributes/JavaLocalVariableTypeTableAttribute.php delete mode 100644 PHPJava/Attributes/JavaRuntimeInvisibleAnnotationsAttribute.php delete mode 100644 PHPJava/Attributes/JavaRuntimeInvisibleParameterAnnotationsAttribute.php delete mode 100644 PHPJava/Attributes/JavaRuntimeVisibleAnnotationsAttribute.php delete mode 100644 PHPJava/Attributes/JavaRuntimeVisibleParameterAnnotationsAttribute.php delete mode 100644 PHPJava/Attributes/JavaSignatureAttribute.php delete mode 100644 PHPJava/Attributes/JavaSourceDebugExtensionAttribute.php delete mode 100644 PHPJava/Attributes/JavaSourceFileAttribute.php delete mode 100644 PHPJava/Attributes/JavaStackMapTableAttribute.php delete mode 100644 PHPJava/Attributes/JavaSyntheticAttribute.php delete mode 100644 PHPJava/Common/JavaAttribute.php delete mode 100644 PHPJava/Common/JavaBinaryStream.php delete mode 100644 PHPJava/Common/JavaEnum.php delete mode 100644 PHPJava/Common/JavaInvoker.php delete mode 100644 PHPJava/Common/JavaStatement.php delete mode 100644 PHPJava/Common/JavaStructure.php delete mode 100644 PHPJava/Common/JavaType.php delete mode 100644 PHPJava/Core/JavaArchive.php delete mode 100644 PHPJava/Core/JavaClass.php delete mode 100644 PHPJava/Core/JavaDecompile.php delete mode 100644 PHPJava/Core/JavaManipulator.php delete mode 100644 PHPJava/Core/JavaManipulatorInfo.php delete mode 100644 PHPJava/Enums/JavaAccessFlagEnum.php delete mode 100644 PHPJava/Enums/JavaClassAccessFlagEnum.php delete mode 100644 PHPJava/Enums/JavaClassConstantEnum.php delete mode 100644 PHPJava/Enums/JavaMnemonicEnum.php delete mode 100644 PHPJava/Exceptions/JavaArchiveException.php delete mode 100644 PHPJava/Exceptions/JavaArrayIndexOutOfBoundsException.php delete mode 100644 PHPJava/Exceptions/JavaAttributeException.php delete mode 100644 PHPJava/Exceptions/JavaClassException.php delete mode 100644 PHPJava/Exceptions/JavaClassUndefined.php delete mode 100644 PHPJava/Exceptions/JavaInvokerException.php delete mode 100644 PHPJava/Exceptions/JavaManipulatorException.php delete mode 100644 PHPJava/Exceptions/JavaNullPointerException.php delete mode 100644 PHPJava/Exceptions/JavaPlatformException.php delete mode 100644 PHPJava/Exceptions/JavaPlatformHasNotClass.php delete mode 100644 PHPJava/Exceptions/JavaStatementException.php delete mode 100644 PHPJava/Invoker/JavaMethodInvoker.php delete mode 100644 PHPJava/Platform/java/io/PrintStream.php delete mode 100644 PHPJava/Platform/java/lang/NullPointerException.php delete mode 100644 PHPJava/Platform/java/lang/String.php delete mode 100644 PHPJava/Platform/java/lang/StringBuilder.php delete mode 100644 PHPJava/Platform/java/lang/System.php delete mode 100644 PHPJava/Statements/JavaStatement_aaload.php delete mode 100644 PHPJava/Statements/JavaStatement_aastore.php delete mode 100644 PHPJava/Statements/JavaStatement_aconst_null.php delete mode 100644 PHPJava/Statements/JavaStatement_aload.php delete mode 100644 PHPJava/Statements/JavaStatement_aload_0.php delete mode 100644 PHPJava/Statements/JavaStatement_aload_1.php delete mode 100644 PHPJava/Statements/JavaStatement_aload_2.php delete mode 100644 PHPJava/Statements/JavaStatement_aload_3.php delete mode 100644 PHPJava/Statements/JavaStatement_anewarray.php delete mode 100644 PHPJava/Statements/JavaStatement_areturn.php delete mode 100644 PHPJava/Statements/JavaStatement_arraylength.php delete mode 100644 PHPJava/Statements/JavaStatement_astore.php delete mode 100644 PHPJava/Statements/JavaStatement_astore_0.php delete mode 100644 PHPJava/Statements/JavaStatement_astore_1.php delete mode 100644 PHPJava/Statements/JavaStatement_astore_2.php delete mode 100644 PHPJava/Statements/JavaStatement_astore_3.php delete mode 100644 PHPJava/Statements/JavaStatement_athrow.php delete mode 100644 PHPJava/Statements/JavaStatement_baload.php delete mode 100644 PHPJava/Statements/JavaStatement_bastore.php delete mode 100644 PHPJava/Statements/JavaStatement_bipush.php delete mode 100644 PHPJava/Statements/JavaStatement_breakpoint.php delete mode 100644 PHPJava/Statements/JavaStatement_caload.php delete mode 100644 PHPJava/Statements/JavaStatement_castore.php delete mode 100644 PHPJava/Statements/JavaStatement_checkcast.php delete mode 100644 PHPJava/Statements/JavaStatement_d2f.php delete mode 100644 PHPJava/Statements/JavaStatement_d2i.php delete mode 100644 PHPJava/Statements/JavaStatement_d2l.php delete mode 100644 PHPJava/Statements/JavaStatement_dadd.php delete mode 100644 PHPJava/Statements/JavaStatement_daload.php delete mode 100644 PHPJava/Statements/JavaStatement_dastore.php delete mode 100644 PHPJava/Statements/JavaStatement_dcmpg.php delete mode 100644 PHPJava/Statements/JavaStatement_dcmpl.php delete mode 100644 PHPJava/Statements/JavaStatement_dconst_0.php delete mode 100644 PHPJava/Statements/JavaStatement_dconst_1.php delete mode 100644 PHPJava/Statements/JavaStatement_ddiv.php delete mode 100644 PHPJava/Statements/JavaStatement_dload.php delete mode 100644 PHPJava/Statements/JavaStatement_dload_0.php delete mode 100644 PHPJava/Statements/JavaStatement_dload_1.php delete mode 100644 PHPJava/Statements/JavaStatement_dload_2.php delete mode 100644 PHPJava/Statements/JavaStatement_dload_3.php delete mode 100644 PHPJava/Statements/JavaStatement_dmul.php delete mode 100644 PHPJava/Statements/JavaStatement_dneg.php delete mode 100644 PHPJava/Statements/JavaStatement_drem.php delete mode 100644 PHPJava/Statements/JavaStatement_dreturn.php delete mode 100644 PHPJava/Statements/JavaStatement_dstore.php delete mode 100644 PHPJava/Statements/JavaStatement_dstore_0.php delete mode 100644 PHPJava/Statements/JavaStatement_dstore_1.php delete mode 100644 PHPJava/Statements/JavaStatement_dstore_2.php delete mode 100644 PHPJava/Statements/JavaStatement_dstore_3.php delete mode 100644 PHPJava/Statements/JavaStatement_dsub.php delete mode 100644 PHPJava/Statements/JavaStatement_dup.php delete mode 100644 PHPJava/Statements/JavaStatement_dup2.php delete mode 100644 PHPJava/Statements/JavaStatement_dup2_x1.php delete mode 100644 PHPJava/Statements/JavaStatement_dup2_x2.php delete mode 100644 PHPJava/Statements/JavaStatement_dup_x1.php delete mode 100644 PHPJava/Statements/JavaStatement_dup_x2.php delete mode 100644 PHPJava/Statements/JavaStatement_f2d.php delete mode 100644 PHPJava/Statements/JavaStatement_f2i.php delete mode 100644 PHPJava/Statements/JavaStatement_f2l.php delete mode 100644 PHPJava/Statements/JavaStatement_fadd.php delete mode 100644 PHPJava/Statements/JavaStatement_faload.php delete mode 100644 PHPJava/Statements/JavaStatement_fastore.php delete mode 100644 PHPJava/Statements/JavaStatement_fcmpg.php delete mode 100644 PHPJava/Statements/JavaStatement_fcmpl.php delete mode 100644 PHPJava/Statements/JavaStatement_fconst_0.php delete mode 100644 PHPJava/Statements/JavaStatement_fconst_1.php delete mode 100644 PHPJava/Statements/JavaStatement_fconst_2.php delete mode 100644 PHPJava/Statements/JavaStatement_fdiv.php delete mode 100644 PHPJava/Statements/JavaStatement_fload.php delete mode 100644 PHPJava/Statements/JavaStatement_fload_0.php delete mode 100644 PHPJava/Statements/JavaStatement_fload_1.php delete mode 100644 PHPJava/Statements/JavaStatement_fload_2.php delete mode 100644 PHPJava/Statements/JavaStatement_fload_3.php delete mode 100644 PHPJava/Statements/JavaStatement_fmul.php delete mode 100644 PHPJava/Statements/JavaStatement_fneg.php delete mode 100644 PHPJava/Statements/JavaStatement_frem.php delete mode 100644 PHPJava/Statements/JavaStatement_freturn.php delete mode 100644 PHPJava/Statements/JavaStatement_fstore.php delete mode 100644 PHPJava/Statements/JavaStatement_fstore_0.php delete mode 100644 PHPJava/Statements/JavaStatement_fstore_1.php delete mode 100644 PHPJava/Statements/JavaStatement_fstore_2.php delete mode 100644 PHPJava/Statements/JavaStatement_fstore_3.php delete mode 100644 PHPJava/Statements/JavaStatement_fsub.php delete mode 100644 PHPJava/Statements/JavaStatement_getfield.php delete mode 100644 PHPJava/Statements/JavaStatement_getstatic.php delete mode 100644 PHPJava/Statements/JavaStatement_goto.php delete mode 100644 PHPJava/Statements/JavaStatement_goto_w.php delete mode 100644 PHPJava/Statements/JavaStatement_i2b.php delete mode 100644 PHPJava/Statements/JavaStatement_i2c.php delete mode 100644 PHPJava/Statements/JavaStatement_i2d.php delete mode 100644 PHPJava/Statements/JavaStatement_i2f.php delete mode 100644 PHPJava/Statements/JavaStatement_i2l.php delete mode 100644 PHPJava/Statements/JavaStatement_i2s.php delete mode 100644 PHPJava/Statements/JavaStatement_iadd.php delete mode 100644 PHPJava/Statements/JavaStatement_iaload.php delete mode 100644 PHPJava/Statements/JavaStatement_iand.php delete mode 100644 PHPJava/Statements/JavaStatement_iastore.php delete mode 100644 PHPJava/Statements/JavaStatement_iconst_0.php delete mode 100644 PHPJava/Statements/JavaStatement_iconst_1.php delete mode 100644 PHPJava/Statements/JavaStatement_iconst_2.php delete mode 100644 PHPJava/Statements/JavaStatement_iconst_3.php delete mode 100644 PHPJava/Statements/JavaStatement_iconst_4.php delete mode 100644 PHPJava/Statements/JavaStatement_iconst_5.php delete mode 100644 PHPJava/Statements/JavaStatement_iconst_m1.php delete mode 100644 PHPJava/Statements/JavaStatement_idiv.php delete mode 100644 PHPJava/Statements/JavaStatement_if_acmpeq.php delete mode 100644 PHPJava/Statements/JavaStatement_if_acmpne.php delete mode 100644 PHPJava/Statements/JavaStatement_if_icmpeq.php delete mode 100644 PHPJava/Statements/JavaStatement_if_icmpge.php delete mode 100644 PHPJava/Statements/JavaStatement_if_icmpgt.php delete mode 100644 PHPJava/Statements/JavaStatement_if_icmple.php delete mode 100644 PHPJava/Statements/JavaStatement_if_icmplt.php delete mode 100644 PHPJava/Statements/JavaStatement_if_icmpne.php delete mode 100644 PHPJava/Statements/JavaStatement_ifeq.php delete mode 100644 PHPJava/Statements/JavaStatement_ifge.php delete mode 100644 PHPJava/Statements/JavaStatement_ifgt.php delete mode 100644 PHPJava/Statements/JavaStatement_ifle.php delete mode 100644 PHPJava/Statements/JavaStatement_iflt.php delete mode 100644 PHPJava/Statements/JavaStatement_ifne.php delete mode 100644 PHPJava/Statements/JavaStatement_ifnonnull.php delete mode 100644 PHPJava/Statements/JavaStatement_ifnull.php delete mode 100644 PHPJava/Statements/JavaStatement_iinc.php delete mode 100644 PHPJava/Statements/JavaStatement_iload.php delete mode 100644 PHPJava/Statements/JavaStatement_iload_0.php delete mode 100644 PHPJava/Statements/JavaStatement_iload_1.php delete mode 100644 PHPJava/Statements/JavaStatement_iload_2.php delete mode 100644 PHPJava/Statements/JavaStatement_iload_3.php delete mode 100644 PHPJava/Statements/JavaStatement_impdep1.php delete mode 100644 PHPJava/Statements/JavaStatement_impdep2.php delete mode 100644 PHPJava/Statements/JavaStatement_imul.php delete mode 100644 PHPJava/Statements/JavaStatement_ineg.php delete mode 100644 PHPJava/Statements/JavaStatement_instanceof.php delete mode 100644 PHPJava/Statements/JavaStatement_invokedynamic.php delete mode 100644 PHPJava/Statements/JavaStatement_invokeinterface.php delete mode 100644 PHPJava/Statements/JavaStatement_invokespecial.php delete mode 100644 PHPJava/Statements/JavaStatement_invokestatic.php delete mode 100644 PHPJava/Statements/JavaStatement_invokevirtual.php delete mode 100644 PHPJava/Statements/JavaStatement_ior.php delete mode 100644 PHPJava/Statements/JavaStatement_irem.php delete mode 100644 PHPJava/Statements/JavaStatement_ireturn.php delete mode 100644 PHPJava/Statements/JavaStatement_ishl.php delete mode 100644 PHPJava/Statements/JavaStatement_ishr.php delete mode 100644 PHPJava/Statements/JavaStatement_istore.php delete mode 100644 PHPJava/Statements/JavaStatement_istore_0.php delete mode 100644 PHPJava/Statements/JavaStatement_istore_1.php delete mode 100644 PHPJava/Statements/JavaStatement_istore_2.php delete mode 100644 PHPJava/Statements/JavaStatement_istore_3.php delete mode 100644 PHPJava/Statements/JavaStatement_isub.php delete mode 100644 PHPJava/Statements/JavaStatement_iushr.php delete mode 100644 PHPJava/Statements/JavaStatement_ixor.php delete mode 100644 PHPJava/Statements/JavaStatement_jsr.php delete mode 100644 PHPJava/Statements/JavaStatement_jsr_w.php delete mode 100644 PHPJava/Statements/JavaStatement_l2d.php delete mode 100644 PHPJava/Statements/JavaStatement_l2f.php delete mode 100644 PHPJava/Statements/JavaStatement_l2i.php delete mode 100644 PHPJava/Statements/JavaStatement_ladd.php delete mode 100644 PHPJava/Statements/JavaStatement_laload.php delete mode 100644 PHPJava/Statements/JavaStatement_land.php delete mode 100644 PHPJava/Statements/JavaStatement_lastore.php delete mode 100644 PHPJava/Statements/JavaStatement_lcmp.php delete mode 100644 PHPJava/Statements/JavaStatement_lconst_0.php delete mode 100644 PHPJava/Statements/JavaStatement_lconst_1.php delete mode 100644 PHPJava/Statements/JavaStatement_ldc.php delete mode 100644 PHPJava/Statements/JavaStatement_ldc2_w.php delete mode 100644 PHPJava/Statements/JavaStatement_ldc_w.php delete mode 100644 PHPJava/Statements/JavaStatement_ldiv.php delete mode 100644 PHPJava/Statements/JavaStatement_lload.php delete mode 100644 PHPJava/Statements/JavaStatement_lload_0.php delete mode 100644 PHPJava/Statements/JavaStatement_lload_1.php delete mode 100644 PHPJava/Statements/JavaStatement_lload_2.php delete mode 100644 PHPJava/Statements/JavaStatement_lload_3.php delete mode 100644 PHPJava/Statements/JavaStatement_lmul.php delete mode 100644 PHPJava/Statements/JavaStatement_lneg.php delete mode 100644 PHPJava/Statements/JavaStatement_lookupswitch.php delete mode 100644 PHPJava/Statements/JavaStatement_lor.php delete mode 100644 PHPJava/Statements/JavaStatement_lrem.php delete mode 100644 PHPJava/Statements/JavaStatement_lreturn.php delete mode 100644 PHPJava/Statements/JavaStatement_lshl.php delete mode 100644 PHPJava/Statements/JavaStatement_lshr.php delete mode 100644 PHPJava/Statements/JavaStatement_lstore.php delete mode 100644 PHPJava/Statements/JavaStatement_lstore_0.php delete mode 100644 PHPJava/Statements/JavaStatement_lstore_1.php delete mode 100644 PHPJava/Statements/JavaStatement_lstore_2.php delete mode 100644 PHPJava/Statements/JavaStatement_lstore_3.php delete mode 100644 PHPJava/Statements/JavaStatement_lsub.php delete mode 100644 PHPJava/Statements/JavaStatement_lushr.php delete mode 100644 PHPJava/Statements/JavaStatement_lxor.php delete mode 100644 PHPJava/Statements/JavaStatement_monitorenter.php delete mode 100644 PHPJava/Statements/JavaStatement_monitorexit.php delete mode 100644 PHPJava/Statements/JavaStatement_multianewarray.php delete mode 100644 PHPJava/Statements/JavaStatement_new.php delete mode 100644 PHPJava/Statements/JavaStatement_newarray.php delete mode 100644 PHPJava/Statements/JavaStatement_nop.php delete mode 100644 PHPJava/Statements/JavaStatement_pop.php delete mode 100644 PHPJava/Statements/JavaStatement_pop2.php delete mode 100644 PHPJava/Statements/JavaStatement_putfield.php delete mode 100644 PHPJava/Statements/JavaStatement_putstatic.php delete mode 100644 PHPJava/Statements/JavaStatement_ret.php delete mode 100644 PHPJava/Statements/JavaStatement_return.php delete mode 100644 PHPJava/Statements/JavaStatement_saload.php delete mode 100644 PHPJava/Statements/JavaStatement_sastore.php delete mode 100644 PHPJava/Statements/JavaStatement_sipush.php delete mode 100644 PHPJava/Statements/JavaStatement_swap.php delete mode 100644 PHPJava/Statements/JavaStatement_tableswitch.php delete mode 100644 PHPJava/Statements/JavaStatement_wide.php delete mode 100644 PHPJava/Stream/JavaByteCodeStream.php delete mode 100644 PHPJava/Structures/JavaStructureAppendFrame.php delete mode 100644 PHPJava/Structures/JavaStructureChopFrame.php delete mode 100644 PHPJava/Structures/JavaStructureClass.php delete mode 100644 PHPJava/Structures/JavaStructureClasses.php delete mode 100644 PHPJava/Structures/JavaStructureDouble.php delete mode 100644 PHPJava/Structures/JavaStructureDoubleVariableInfo.php delete mode 100644 PHPJava/Structures/JavaStructureExceptionTable.php delete mode 100644 PHPJava/Structures/JavaStructureFieldInfo.php delete mode 100644 PHPJava/Structures/JavaStructureFieldRef.php delete mode 100644 PHPJava/Structures/JavaStructureFloat.php delete mode 100644 PHPJava/Structures/JavaStructureFloatVariableInfo.php delete mode 100644 PHPJava/Structures/JavaStructureFullFrame.php delete mode 100644 PHPJava/Structures/JavaStructureInteger.php delete mode 100644 PHPJava/Structures/JavaStructureIntegerVariableInfo.php delete mode 100644 PHPJava/Structures/JavaStructureLineNumberTable.php delete mode 100644 PHPJava/Structures/JavaStructureLocalVariableTable.php delete mode 100644 PHPJava/Structures/JavaStructureLong.php delete mode 100644 PHPJava/Structures/JavaStructureLongVariableInfo.php delete mode 100644 PHPJava/Structures/JavaStructureMethodInfo.php delete mode 100644 PHPJava/Structures/JavaStructureMethodref.php delete mode 100644 PHPJava/Structures/JavaStructureNameAndType.php delete mode 100644 PHPJava/Structures/JavaStructureNullVariableInfo.php delete mode 100644 PHPJava/Structures/JavaStructureObjectVariableInfo.php delete mode 100644 PHPJava/Structures/JavaStructureSameFrame.php delete mode 100644 PHPJava/Structures/JavaStructureSameFrameExtended.php delete mode 100644 PHPJava/Structures/JavaStructureSameLocals1StackItemFrame.php delete mode 100644 PHPJava/Structures/JavaStructureSameLocals1StackItemFrameExtended.php delete mode 100644 PHPJava/Structures/JavaStructureStackMapFrame.php delete mode 100644 PHPJava/Structures/JavaStructureString.php delete mode 100644 PHPJava/Structures/JavaStructureTopVariableInfo.php delete mode 100644 PHPJava/Structures/JavaStructureUninitializedThisVariableInfo.php delete mode 100644 PHPJava/Structures/JavaStructureUninitializedVariableInfo.php delete mode 100644 PHPJava/Structures/JavaStructureUtf8.php delete mode 100644 PHPJava/Structures/JavaStructureVerificationTypeInfo.php delete mode 100644 PHPJava/Types/JavaTypeBoolean.php delete mode 100644 PHPJava/Types/JavaTypeByte.php delete mode 100644 PHPJava/Types/JavaTypeChar.php delete mode 100644 PHPJava/Types/JavaTypeDouble.php delete mode 100644 PHPJava/Types/JavaTypeFloat.php delete mode 100644 PHPJava/Types/JavaTypeInt.php delete mode 100644 PHPJava/Types/JavaTypeLong.php delete mode 100644 PHPJava/Types/JavaTypeShort.php delete mode 100644 PHPJava/Utils/BinaryTools.php delete mode 100644 PHPJava/Utils/BinaryToolsException.php delete mode 100644 Test.class create mode 100644 composer.json create mode 100644 license delete mode 100644 nbproject/private/private.properties delete mode 100644 nbproject/private/private.xml delete mode 100644 nbproject/project.properties delete mode 100644 nbproject/project.xml rename nbproject/private/config.properties => src/.gitkeep (100%) create mode 100644 src/constants/.gitkeep create mode 100644 src/core/.gitkeep create mode 100644 src/emulator/java/io/.gitkeep create mode 100644 src/emulator/java/lang/.gitkeep create mode 100644 src/exceptions/.gitkeep create mode 100644 src/kernel/attributes/.gitkeep create mode 100644 src/kernel/mnemonics/.gitkeep create mode 100644 src/kernel/structures/.gitkeep create mode 100644 src/kernel/types/.gitkeep create mode 100644 src/utilities/.gitkeep delete mode 100644 test.java delete mode 100644 test.php create mode 100644 tests/.gitkeep diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 - - - - - - - - - - Builds, tests, and runs the project JavaTest. - - - diff --git a/JavaTest/build/built-jar.properties b/JavaTest/build/built-jar.properties deleted file mode 100644 index 4d862759..00000000 --- a/JavaTest/build/built-jar.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Sat, 27 Sep 2014 16:16:26 +0900 - - -D\:\\PHPJava\\JavaTest= diff --git a/JavaTest/build/classes/javatest/JavaTest$testClass$testClass2.class b/JavaTest/build/classes/javatest/JavaTest$testClass$testClass2.class deleted file mode 100644 index 32d943b413c99389195637cf522d547a07ae0e85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1029 zcmaJ=ZEq4m5Pp_ok2{x^LTlBEf?x$|IZNv+wZ1elkq}=(L*mB+HtjXX9XS>g{ULrZ z{s|4zL=%62Kgu|JV4Y##8nOn$NJnr> zo$EScxUD0HyfO<)Y#6wMO$|j2Cd0fuvb)(W4R;xIDY|msvASIb{>pWQ9~gqnWcAqk zV5xVrLdpRt*;DT_!R*?uE%z8wxtX5%IzxEhYYB$Ms_lx`y>>(R2Uf$On|Rf0T29^a zZDo%x!>T|A<1|}|VP=kTT_q}vNrt(cN^8`-p5GKNZIvqepG8se;#fq2V;M;eTO1{9 zGpwoy)3Mw`vnGApJ$%u#otE$!mdB+OWvVUYk=H76?BE{9eLT?ckmC^^tD7>%E}m%E z<9Lc^4C@M1g`d;KiMknL38;PSO3^0TUXQ|7f_a#>XTBvClDG(~ zttMu5I>K!+Y!16QNwu6G22Hb9fx#a`ze{3z()7GERVEGL6MYqiYq`oS pH~=3*8$r@9w6|X;;4>rm5Uvwo2saR?GfrBJ_IQcXL`k~}_76Mp_x}I@ diff --git a/JavaTest/build/classes/javatest/JavaTest$testClass.class b/JavaTest/build/classes/javatest/JavaTest$testClass.class deleted file mode 100644 index f9de75144802696c83a65e81228478a793f984fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1091 zcmaJ>?QRl56g@*}mtChqp`~hDM8VJr2cN^P|m6A4ih8j}7p3ryN=V3#b5i9Uiq zj3&nS&{Ue(#0T)9jCTM_8wfvk=6=k*_nbR-_Rrs6zX5FExr!ieX$T>q;x<+l+|l4i zA^=_PNfjxirL-oOjD{=>1?w6(?#d;nU_-$@2GtX7uh1~tZ3h0*wuReM1gYAYE5|V7 z9a`UJ!&hTWtcvE*|rHQD4rP%J18r zXi}@34mlQjO*JgXctcD);v>wayhF3q5_X*-)9>SXy7^>3XtV>^kOr6r*^Y+^GGEDc0_;xOcs72KdF6r$I}LLqtMB>6xC zj73_nkhV#>k9IAU{t1>kf$w|o%vEXYc|JnLH(Vo~Q;f7OVVQOsT*L-hn)Lo;mdp=K zox;C=g6Z%~7fR|F>==PA)Go9xE}eq!Q;peDx{J%hLSYIAKH)k(L&q1a;cKs8w4ZcP fP{%Z#h*L=)(UL@NB20Ujq#*qY=E%cIih%tCy=(-= diff --git a/JavaTest/build/classes/javatest/JavaTest.class b/JavaTest/build/classes/javatest/JavaTest.class deleted file mode 100644 index a8c34408edee365edc1fd4f6982e60654f34bf6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2487 zcmaJ?+jA3D9R5zS$!@lrUecyeNFZEm6p3ex9QrZY%Zh;w1`5X zIF3I0=7ZyiGj$vvpp0S0I{4;;|Ao^hpM68d`khTeTEe)KbM|+B=Xbu}?c0+-{{7_% zfc?0q;}wj0Rv-Gs(nu)lgBPbXoK|s0r#LF7vp$@|c^wzIRXDj&Wv9e ztJTD1h9b#90CA1u3dgj7CQB^~A^o!lVdwC=677^Lr(w)O>xtW?M(88yd^T?NC1lzC z<$|_LKm+aQFc3v68&?cXph51eLpE?69V+q$uHm|hSp##pVW15$feq4nEeA?PXV`@Q z7&qngi2w|Iid(FZf!mlD@W^Dk4D7*Pns!jpCLd{iN8;ZV*iwOhS+B^UmHD4m?tHm2 z|9EBozMSv=D$q2@fFf2hZ!?L=_*^72m5B&!uF9%XFIk2K18;+2)bv}nosOJIXYC1r z`br2V#;2_~%fCiduGm`D+)U15|J><3ZG*)YC(<3m{5*2Bx6CBF)9ApiR|}{aX=IZD zN_0Rn+G}PqR*GTljaGA|nm!e}hj_l~L}gpcrOTl=MXL=Npx3&ZH*J0f!L^=?CFpKF z|3XA%{r|XJhf{RkEmLeR;;*9{H+U;~c})Ut4$_k|FFVAXHz~un2ST!!^Q&C-(vl>D z(e@aktqHE5p*-Z;g?*fB9UKJ;QETu8UXzwZd)~+gxboq3bQZB(Gqm;sq9@=PT88)B zW2ndW6rg!}!^&*$5`5tT^ssWHEH1cLOUebeC`n3rGpyXKh_@@^r)4ov<49i-)7_~A zl_eP8p|A`;{nmDQf{HTsBLn2qyUK@e7e_>{Ib=mTTReff0_x8!qM2etQLLdDkYcQa z6;ujn3^Y+yK(K)3uhGq5OPhfW)GuKp=Rgamm=rc~DxQ+67Eb}2oui?kQm=oDnq`C; zTW z6;^1Y;UK!mAF_f`^)M5+ILO%cGS3>~^fF!-8bpk@NQ^nYLyH*nRf2d_ysP4nio=2o zeTD-nj_A7j4^BQs?NfNTbJRxy_TjxE0kJ|Tl>lQ(r#I-W*YCqv@CyDGSN|^eE5eSj zKaG`c$sUEu8d9{lRq0=l{VVCbl-S7!G7YCW%}f`#&ea@rmeS96BW^t}3S(h;CE27j z;G`|3LFyzO$DBgB9qE1QSSad-D0$$mP~qgP ZI{+#p)F_>#-bKntlIpaO7tk(<{{V^R5gGsh diff --git a/JavaTest/dist/JavaTest.jar b/JavaTest/dist/JavaTest.jar deleted file mode 100644 index 4582f54bac8f5c400c26e3f1e54fc9e394aca334..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5577 zcmd5=-A`NR8UMZZv5$Q?24VsU2_#OSiGg53Lh}KHh7eewKxm-(>e|G>X>ej}VoVZ} zE-fjYrcRqS?L$*FO;Zyo)3l4`qmDGD?y9@!)&7B9Ou5>{u68l0tIB@Qv5gI;P8w;_ zET8v0?|Yv2dEe*b{XNe)Bd~d}7wZb~oJ>1{dJ31B`>Kh8jB5zx>$>!5mVm15dwoWCEN`TH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-|0zPQPn#32s)k`p}*fJg%-cuQhNyVW2Bbg=OQFKQkwYm|rcm_}I=I=)L;og@Kg4FX{%ST%q2>N9Y|^u2 zsM?jnR(onqrB-hI79~rlubsR1`nRW0^MJOTQ6bgJl;ec>;5XRK z)?}}YKJc@xWK!MCwweie3pLtGjv9Komi*i3mF=wk0yx50IL>5z0(CfvdW>;c&2s)BT392GN8W9vkWigckx~<9XIZHmD|| zNE3BDN{%KN%M{|$(XHc{jvmDb{R(Y5jvI#lADsFUrC-9uC%s+k7n)asO{jibZJ`D@CgFI|Hk8w*UgelnTo*A&$^|Fh z#1JXBZ4@1juV}k6s>-C2QFwq%BBpc+JEVl$DJ5Lp+VlGXjr4tP?FaU@(&by}%K3FM zIz}kZgV$E%?q*+pCFPTkVEXGHVY3KTw$AASROb#oT>KQr9Sj)>QiB`d?u|J|Wj?^ImAv-tJ16-r<4MxD)IcqTlG8QuT5)Sj>6|!z)+-d3 U72+aT%NGkbKBhh! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - Must select one file in the IDE or set profile.class - This target only works when run from inside the NetBeans IDE. - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - Must select some files in the IDE or set test.includes - - - - - Must select one file in the IDE or set run.class - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - Must select some files in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - Must select one file in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/JavaTest/nbproject/genfiles.properties b/JavaTest/nbproject/genfiles.properties deleted file mode 100644 index 92b78354..00000000 --- a/JavaTest/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=e3ffc9d9 -build.xml.script.CRC32=74429054 -build.xml.stylesheet.CRC32=8064a381@1.75.1.48 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=e3ffc9d9 -nbproject/build-impl.xml.script.CRC32=11fe2361 -nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.1.48 diff --git a/JavaTest/nbproject/private/private.properties b/JavaTest/nbproject/private/private.properties deleted file mode 100644 index 9ce0e3cf..00000000 --- a/JavaTest/nbproject/private/private.properties +++ /dev/null @@ -1,2 +0,0 @@ -compile.on.save=true -user.properties.file=C:\\Users\\memory\\AppData\\Roaming\\NetBeans\\8.0.1\\build.properties diff --git a/JavaTest/nbproject/private/private.xml b/JavaTest/nbproject/private/private.xml deleted file mode 100644 index 6807a2ba..00000000 --- a/JavaTest/nbproject/private/private.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/JavaTest/nbproject/project.properties b/JavaTest/nbproject/project.properties deleted file mode 100644 index b2e9ea5a..00000000 --- a/JavaTest/nbproject/project.properties +++ /dev/null @@ -1,73 +0,0 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false -annotation.processing.processor.options= -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -build.classes.dir=${build.dir}/classes -build.classes.excludes=**/*.java,**/*.form -# This directory is removed when the project is cleaned: -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -# Only compile against the classpath explicitly listed here: -build.sysclasspath=ignore -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -# Uncomment to specify the preferred debugger connection transport: -#debug.transport=dt_socket -debug.classpath=\ - ${run.classpath} -debug.test.classpath=\ - ${run.test.classpath} -# \u914d\u7f6ejar\u304b\u3089\u9664\u5916\u3059\u308b\u5fc5\u8981\u304c\u3042\u308bbuild.classes.dir\u5185\u306e\u30d5\u30a1\u30a4\u30eb -dist.archive.excludes= -# This directory is removed when the project is cleaned: -dist.dir=dist -dist.jar=${dist.dir}/JavaTest.jar -dist.javadoc.dir=${dist.dir}/javadoc -excludes= -includes=** -jar.compress=false -javac.classpath= -# Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.7 -javac.target=1.7 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class=javatest.JavaTest -manifest.file=manifest.mf -meta.inf.dir=${src.dir}/META-INF -mkdist.disabled=false -platform.active=default_platform -run.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -# Space-separated list of JVM arguments used when running the project. -# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. -# To set system properties for unit tests define test-sys-prop.name=value: -run.jvmargs= -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/JavaTest/nbproject/project.xml b/JavaTest/nbproject/project.xml deleted file mode 100644 index 6a319e33..00000000 --- a/JavaTest/nbproject/project.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - org.netbeans.modules.java.j2seproject - - - JavaTest - - - - - - - - - diff --git a/JavaTest/src/javatest/JavaTest.java b/JavaTest/src/javatest/JavaTest.java deleted file mode 100644 index 767ede0c..00000000 --- a/JavaTest/src/javatest/JavaTest.java +++ /dev/null @@ -1,162 +0,0 @@ - -package javatest; - -public class JavaTest { - - long z = -22222222222222222L; - static int c = 100; - static String b = "Hello World"; - - public static void main (String[] args) { - - String x = "String"; - - // new instance - JavaTest _a = new JavaTest(); - - // test call - _a.javaTest(); - - - int t = 2; - //t *= 1; - //t = ~1; - t <<= 1; - System.out.println(t); - t >>= 1; - System.out.println(t); - t -= 1; - System.out.println(t); - t += 1; - System.out.println(t); - t = 1; - System.out.println(t); - t >>>= 1; - System.out.println(t); - t |= 1; - System.out.println(t); - t &= 1; - System.out.println(t); - t = 345321; - System.out.println((short) t); -/* - long t1 = 111; - t1 *= 1; - t1 = ~1; - t1 <<= 1; - t1 >>= 1; - t1 -= 1; - t1 += 1; - t1 = 1; - t1 >>>= 1; - t1 |= 1; - t1 &= 1; - - double t2 = 111; - t2 *= 1; - t2 = ~1; - t2 -= 1; - t2 += 1; - t2 = 1; - - boolean _b = false; - _b = true && true; - _b = true && false; - _b = true || true; - _b = true || false;*/ - - try { - - for (int i = 0; i < JavaTest.c; i++) { - - StringBuilder b = new StringBuilder(); - - switch (i + 1) { - - case -1: - - b.append("a"); - - break; - case 1: - - b.append("b"); - - break; - case 2: - - b.append("c"); - - break; - - } - - if (!x.equals(i + "")) { - - - System.out.println("Test:" + JavaTest.b + "/" + x + "*****" + i + "/" + b); - - } - - if (i == 10) { - - throw new NullPointerException(); - - } - - } - - } catch (NullPointerException e) { - - System.out.println("ぬるぷっぷー"); - - } - - } - - public static String test (int n, String m, int l, int i, int v, int k) { - - int j = 1; - - for (; j <= 10; j++) { - - j++; - - } - - return "Java emulate by php " + n + "/" + m + "/" + l + "/" + i + "/" + v + "/" + k + "/" + j; - - } - - public void javaTest () { - - testClass _c = new testClass(); - _c.t(); - - } - - public class testClass { - - public void t () { - - System.out.println("testClass.t method." + JavaTest.this.z); - - testClass2 _c = new testClass2(); - _c.t(); - - - } - - public class testClass2 { - - public void t () { - - System.out.println("testClass2.t method." + JavaTest.this.z); - - } - - } - - } - -} \ No newline at end of file diff --git a/PHPJava/Attributes/JavaAnnotationDefaultAttribute.php b/PHPJava/Attributes/JavaAnnotationDefaultAttribute.php deleted file mode 100644 index 1a22aacb..00000000 --- a/PHPJava/Attributes/JavaAnnotationDefaultAttribute.php +++ /dev/null @@ -1,13 +0,0 @@ -AttributeNameIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->AttributeLength = $this->Class->getJavaBinaryStream()->readUnsignedInt(); - - $cpInfo = $this->Class->getCpInfo(); - - $classAttributeName = 'Java' . $cpInfo[$this->AttributeNameIndex]->getString() . 'Attribute'; - - $this->AttributeData = new $classAttributeName($Class); - - - } - - public function getAttributeData () { - - return $this->AttributeData; - - } - - public function getAttributeNameIndex () { - - return $this->AttributeNameIndex; - - } - - public function getAttributeLength () { - - return $this->AttributeLength; - - } - -} \ No newline at end of file diff --git a/PHPJava/Attributes/JavaBootstrapMethodsAttribute.php b/PHPJava/Attributes/JavaBootstrapMethodsAttribute.php deleted file mode 100644 index e745a0c8..00000000 --- a/PHPJava/Attributes/JavaBootstrapMethodsAttribute.php +++ /dev/null @@ -1,13 +0,0 @@ -MaxStack = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->MaxLocals = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->CodeLength = $this->Class->getJavaBinaryStream()->readUnsignedInt(); - - // read opcode - $this->Code = array(); - - for ($i = 0; $i < $this->CodeLength; $i++) { - - $this->Code[$i] = $this->Class->getJavaBinaryStream()->readUnsignedByte(); - $this->RawCode .= chr($this->Code[$i]); - - } - - // read exception table - $this->ExceptionTableLength = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->ExceptionTableLength; $i++) { - - $this->ExceptionTables[$i] = new JavaStructureExceptionTable($this->Class); - - $this->ExceptionTables[$i]->setStartPc($this->Class->getJavaBinaryStream()->readUnsignedShort()); - $this->ExceptionTables[$i]->setEndPc($this->Class->getJavaBinaryStream()->readUnsignedShort()); - $this->ExceptionTables[$i]->setHandlerPc($this->Class->getJavaBinaryStream()->readUnsignedShort()); - $this->ExceptionTables[$i]->setCatchType($this->Class->getJavaBinaryStream()->readUnsignedShort()); - - } - - $this->AttributesCount = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->AttributesCount; $i++) { - - $this->AttributeInfo[] = new JavaAttributeInfo($this->Class); - - } - - } - - public function getExceptionTables () { - - return $this->ExceptionTables; - - } - - public function getCode () { - - return $this->RawCode; - - } - - public function getOpCodes () { - - return $this->Code; - - } - - public function getOpCodeLength () { - - return $this->CodeLength; - - } - -} \ No newline at end of file diff --git a/PHPJava/Attributes/JavaConstantValueAttribute.php b/PHPJava/Attributes/JavaConstantValueAttribute.php deleted file mode 100644 index 3156370d..00000000 --- a/PHPJava/Attributes/JavaConstantValueAttribute.php +++ /dev/null @@ -1,13 +0,0 @@ -NumberOfClasses = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->NumberOfClasses; $i++) { - - $this->Classes[$i] = new JavaStructureClasses($this->Class); - - $this->Classes[$i]->setInnerClassInfoIndex($this->Class->getJavaBinaryStream()->readUnsignedShort()); - $this->Classes[$i]->setOuterClassInfoIndex($this->Class->getJavaBinaryStream()->readUnsignedShort()); - $this->Classes[$i]->setInnerNameIndex($this->Class->getJavaBinaryStream()->readUnsignedShort()); - $this->Classes[$i]->setInnerClassAccessFlag($this->Class->getJavaBinaryStream()->readUnsignedShort()); - - } - - } - - public function getClasses () { - - return $this->Classes; - - } - -} \ No newline at end of file diff --git a/PHPJava/Attributes/JavaLineNumberTableAttribute.php b/PHPJava/Attributes/JavaLineNumberTableAttribute.php deleted file mode 100644 index 6de564f4..00000000 --- a/PHPJava/Attributes/JavaLineNumberTableAttribute.php +++ /dev/null @@ -1,32 +0,0 @@ -LineNumberTableLength = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->LineNumberTableLength; $i++) { - - $this->LineNumberTables[$i] = new JavaStructureLineNumberTable($Class); - - $this->LineNumberTables[$i]->setStartPc($this->Class->getJavaBinaryStream()->readUnsignedShort()); - $this->LineNumberTables[$i]->setLineNumber($this->Class->getJavaBinaryStream()->readUnsignedShort()); - - } - - } - - public function getLineNumberTables () { - - return $this->LineNumberTables; - - } - - -} \ No newline at end of file diff --git a/PHPJava/Attributes/JavaLocalVariableTableAttribute.php b/PHPJava/Attributes/JavaLocalVariableTableAttribute.php deleted file mode 100644 index 8470175e..00000000 --- a/PHPJava/Attributes/JavaLocalVariableTableAttribute.php +++ /dev/null @@ -1,22 +0,0 @@ -LocalVariableTableLength = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->LocalVariableTableLength; $i++) { - - $this->LocalVariableTables[] = new JavaStructureLocalVariableTable($Class); - - } - - } - -} \ No newline at end of file diff --git a/PHPJava/Attributes/JavaLocalVariableTypeTableAttribute.php b/PHPJava/Attributes/JavaLocalVariableTypeTableAttribute.php deleted file mode 100644 index 94780ca3..00000000 --- a/PHPJava/Attributes/JavaLocalVariableTypeTableAttribute.php +++ /dev/null @@ -1,13 +0,0 @@ -SourceFileIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - - } - - public function getSourceFileIndex () { - - return $this->SourceFileIndex; - - } - - -} \ No newline at end of file diff --git a/PHPJava/Attributes/JavaStackMapTableAttribute.php b/PHPJava/Attributes/JavaStackMapTableAttribute.php deleted file mode 100644 index 96c91210..00000000 --- a/PHPJava/Attributes/JavaStackMapTableAttribute.php +++ /dev/null @@ -1,31 +0,0 @@ -NumberOfEntries = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->NumberOfEntries; $i++) { - - $this->StackMapFrames[] = new JavaStructureStackMapFrame($Class); - - - } - - } - - public function getStackMapFrames () { - - return $this->StackMapFrames; - - } - -} - \ No newline at end of file diff --git a/PHPJava/Attributes/JavaSyntheticAttribute.php b/PHPJava/Attributes/JavaSyntheticAttribute.php deleted file mode 100644 index 571682b1..00000000 --- a/PHPJava/Attributes/JavaSyntheticAttribute.php +++ /dev/null @@ -1,13 +0,0 @@ -Class = &$Class; - - } - - public function getClass () { - - return $this->Class; - - } - -} \ No newline at end of file diff --git a/PHPJava/Common/JavaBinaryStream.php b/PHPJava/Common/JavaBinaryStream.php deleted file mode 100644 index 49e65843..00000000 --- a/PHPJava/Common/JavaBinaryStream.php +++ /dev/null @@ -1,102 +0,0 @@ -Handle = &$handle; - - } - - - public final function read ($bytes = 1) { - - $this->Offset += $bytes; - - return fread($this->Handle, $bytes); - - } - - public function readByte () { - - return current(unpack('c', $this->read(1))); - - } - - public function readUnsignedByte () { - - return (int) sprintf('%u', ord($this->read(1))); - - } - - public function readUnsignedInt () { - - return base_convert(bin2hex($this->read(4)), 16, 10); - - } - - public function readUnsignedShort () { - - return (int) sprintf('%u', hexdec(bin2hex($this->read(2)))); - - } - - public function readInt () { - - return BinaryTools::toSigned($this->readUnsignedInt(), 4); - - } - - public function readShort () { - - $short = (int) sprintf('%u', hexdec(bin2hex($this->read(2)))); - - return (($short & 0x8000) > 0) ? ($short - 0xFFFF - 1) : $short ; - - } - - public function readUnsignedLong () { - - if (PHP_INT_MAX === 2147483647) { - - return base_convert(bin2hex($this->read(8)), 16, 10); - - } - - return (int) sprintf('%u', hexdec(bin2hex($this->read(8)))); - - } - - public function readLong () { - - return BinaryTools::toSigned($this->readUnsignedLong(), 8); - - } - - public function seek ($bytes) { - - $this->Offset += $bytes; - - fseek($this->Handle, $bytes, SEEK_CUR); - - } - - public function setOffset ($pointer) { - - $this->Offset = $pointer; - - fseek($this->Handle, $pointer, SEEK_SET); - - } - - public function getOffset () { - - return $this->Offset; - - } - - -} \ No newline at end of file diff --git a/PHPJava/Common/JavaEnum.php b/PHPJava/Common/JavaEnum.php deleted file mode 100644 index 93714047..00000000 --- a/PHPJava/Common/JavaEnum.php +++ /dev/null @@ -1,36 +0,0 @@ -getConstants(); - - $keys = array_keys($constants); - $values = array_values($constants); - - foreach ($values as $i => $constantValue) { - - if ($value === $constantValue) { - - return $keys[$i]; - - } - - } - - return null; - - } - - public function getValues () { - - $reflectionClass = new ReflectionClass($this); - - return array_values($reflectionClass->getConstants()); - - } - -} diff --git a/PHPJava/Common/JavaInvoker.php b/PHPJava/Common/JavaInvoker.php deleted file mode 100644 index 49c89e96..00000000 --- a/PHPJava/Common/JavaInvoker.php +++ /dev/null @@ -1,58 +0,0 @@ -Class = &$Class; - $this->Platform = __DIR__ . '/../Platform'; - - } - - public function getClass () { - - return $this->Class; - - } - - public function loadInnerClass ($class) { - - if ($this->getClass()->getClassFile() . '/../' . $class . '.class') { - - $this->Loaded[] = str_replace('.', '/', $class); - - - } - - } - - public function loadPlatform ($class) { - - $className = str_replace('.', '/', $class); - - if (is_file($this->Platform . '/' . $className . '.php')) { - - if (in_array($className, $this->Loaded)) { - - return; - } - - require_once $this->Platform . '/' . $className . '.php'; - - $this->Loaded[] = str_replace('.', '/', $class); - - } else { - - throw new JavaPlatformHasNotClass($class); - - } - - } - -} \ No newline at end of file diff --git a/PHPJava/Common/JavaStatement.php b/PHPJava/Common/JavaStatement.php deleted file mode 100644 index ef4215c1..00000000 --- a/PHPJava/Common/JavaStatement.php +++ /dev/null @@ -1,126 +0,0 @@ -MethodName = $methodName; - $this->Invoker = &$invoker; - $this->ByteCodeStream = &$byteCodeStream; - $this->Stacks = &$stacks; - $this->Localstorage = &$localstorage; - $this->CpInfo = &$CpInfo; - $this->AttributeData = &$attributeData; - $this->Pointer = $pointer; - - } - - public function pushStack ($value) { - - $this->Stacks[] = $value; - - } - - public function pushStackByReference (&$value) { - - $this->Stacks[] = &$value; - - } - - public function dupStack () { - - $this->pushStack($this->Stacks[sizeof($this->Stacks) - 1]); - - } - - public function getStack () { - - return array_pop($this->Stacks); - - } - - public function popStack () { - - array_pop($this->Stacks); - - } - - public function getStacks () { - - return $this->Stacks; - - } - - public function getOperands () { - - return $this->Operands; - - } - - public function setLocalstorage ($index, $value) { - - $this->Localstorage[(int) $index] = $value; - - } - - - public function getLocalstorage ($index) { - - return $this->Localstorage[(int) $index]; - - } - - public function getLocalstorages () { - - return $this->Localstorage; - - } - - public function getByteCodeStream () { - - return $this->ByteCodeStream; - - } - - public function getPointer () { - - return $this->Pointer; - - } - - public function getCpInfo () { - - return $this->CpInfo; - - } - - public function getInvoker () { - - return $this->Invoker; - - } - - public function getMethodName () { - - return $this->MethodName; - - } - - public function getAttributeData () { - - return $this->AttributeData; - - } - -} \ No newline at end of file diff --git a/PHPJava/Common/JavaStructure.php b/PHPJava/Common/JavaStructure.php deleted file mode 100644 index 4e6f750b..00000000 --- a/PHPJava/Common/JavaStructure.php +++ /dev/null @@ -1,19 +0,0 @@ -Class = &$Class; - - } - - public function getClass () { - - return $this->Class; - - } - -} \ No newline at end of file diff --git a/PHPJava/Common/JavaType.php b/PHPJava/Common/JavaType.php deleted file mode 100644 index 2e9484fc..00000000 --- a/PHPJava/Common/JavaType.php +++ /dev/null @@ -1,38 +0,0 @@ -value = $value; - } - - /** - * 設定されている値を返します。 - * - * @return mixed 設定されている値を返します - */ - public function getValue () { - return $this->value; - } - - /** - * 値を出力します。 - * - * @return string - */ - public function __toString() { - return (string) $this->getValue(); - } - -} diff --git a/PHPJava/Core/JavaArchive.php b/PHPJava/Core/JavaArchive.php deleted file mode 100644 index c71f9fe1..00000000 --- a/PHPJava/Core/JavaArchive.php +++ /dev/null @@ -1,123 +0,0 @@ -open($file)) { - - for ($i = 0; $i < $archive->numFiles; $i++) { - - $name = $archive->getNameIndex($i); - - if ($name[strlen($name) - 1] !== '/') { - - $this->Files[$name] = $archive->getFromIndex($i); - - } - - } - - } - - foreach (glob(__DIR__ . '/../{Common,Exceptions,Enums,Stream,Invoker,Attributes,Structures,Utils}/*.php', GLOB_BRACE) as $file) { - - require_once($file); - - } - - $this->Manipulator = new JavaManipulator(); - - - foreach ($this->Files as $fileName => $data) { - - if (!preg_match('/\.class$/', $fileName)) { - - // load class only - - continue; - - } - - if (strpos($fileName, '$') === false) { - - $this->Manipulator->registerClass(new JavaClass($fileName, $data), $this); - - } - - } - - } - - public function getClassBytecode ($name) { - - $className = str_replace('.', '/', $name); - $name = $className . '.class'; - - // search - foreach ($this->Files as $fileName => $data) { - - if ($name === $fileName) { - - return $data; - - } - - } - - throw new JavaArchiveException('Not found class'); - - } - - public function getClass ($name) { - - $className = str_replace('.', '/', $name); - $name = $className . '.class'; - - // search - foreach ($this->Files as $fileName => $data) { - - if ($name === $fileName) { - - return $this->Manipulator->$className->getClass()->getMethodInvoker(); - - } - - } - - throw new JavaArchiveException('Not found class'); - - } - - public function hasClass ($name) { - - $className = str_replace('.', '/', $name); - $name = $className . '.class'; - - // search - foreach ($this->Files as $fileName => $data) { - - if ($name === $fileName) { - - return true; - - } - - } - - return false; - - } - - public function getFiles () { - - return $this->Files; - - } - -} \ No newline at end of file diff --git a/PHPJava/Core/JavaClass.php b/PHPJava/Core/JavaClass.php deleted file mode 100644 index fcf0b9a2..00000000 --- a/PHPJava/Core/JavaClass.php +++ /dev/null @@ -1,785 +0,0 @@ - null, - 'Instances' => null - ); - - /** - * @var int 読み込まれているメソッドの数を格納します。 - */ - private $MethodCount = 0; - - /** - * @var JavaStructureMethodInfo[] メソッドの情報を格納したオブジェクトを格納します。 - */ - private $Methods = array(); - - /** - * @var int Constant Poolの数を格納します。 - */ - private $cpPool = 0; - - /** - * @var object Constant Poolの情報を格納したオブジェクトを格納します。 - */ - private $cpInfo = array(); - - /** - * @var int アトリビュートの数を格納します。 - */ - private $AttributesCount = 0; - - /** - * @var JavaAttributeInfo[] アトリビュートの情報を格納したオブジェクトを格納します。 - */ - private $AttributeInfo = array(); - - /** - * @var JavaMethodInvoker Javaのメソッドを呼ぶためのオブジェクトを格納します。 - */ - private $MethodInvoker = null; - - /** - * @var string ニーモニックを読み込んだログを書き込みます。 - */ - private $Trace = ''; - - /** - * @var string ニーモニックを読み込んだログを書き込みます。 - */ - private $TraceHeader = ''; - - /** - * @var string ニーモニックを読み込んだログを書き込みます。 - */ - private $TraceBuffering = ''; - - /** - * @var JavaManipulator このクラスを管理しているJARの情報を格納します。 - */ - private $Manipulator = null; - - /** - * @var JavaBinaryStream Javaのバイトコード読んでいくためのクラスを格納します。 - */ - protected $JavaBinaryStream = null; - - /** - * JavaClassを読み込みます。 - * - * @param string $file ファイル名を指定します。 - * @param string|null $byteCode Javaのバイトコードを渡します。nullの場合$fileから読み込みます。 - * @return void - */ - public function __construct ($file, $byteCode = null) { - - $this->ClassFile = $file; - - foreach (glob(__DIR__ . '/../{Common,Exceptions,Enums,Stream,Invoker,Attributes,Structures,Types,Utils}/*.php', GLOB_BRACE) as $loadFile) { - - require_once($loadFile); - - } - - if ($byteCode === null) { - - $this->Handle = fopen($file, 'r'); - - } else { - - $this->Handle = fopen('php://memory', 'rw'); - fwrite($this->Handle, $byteCode); - rewind($this->Handle); - - } - - $this->ClassFields = (object) $this->ClassFields; - $this->ClassFields->Statics = (object) $this->ClassFields->Statics; - $this->ClassFields->Instances = (object) $this->ClassFields->Instances; - - $this->JavaBinaryStream = new JavaBinaryStream($this->Handle); - - // read magic byte - if ($this->MagicBytes !== BinaryTools::toHex($this->JavaBinaryStream->readUnsignedInt())) { - - throw new JavaClassException($this->ClassFile . ' is not java class'); - - } - - // read minor version - $this->MinorVersion = $this->JavaBinaryStream->readUnsignedShort(); - - // read major version - $this->MajorVersion = $this->JavaBinaryStream->readUnsignedShort(); - - // read cp_pool - $this->cpPool = $this->JavaBinaryStream->readUnsignedShort(); - - for ($entry = 1; $entry < $this->cpPool; $entry++) { - - $this->cpInfo[$entry] = $this->__CpInfo($entry); - - if ($this->cpInfo[$entry] instanceof \JavaStructureLong || - $this->cpInfo[$entry] instanceof \JavaStructureDouble) { - - // Java ConstantPool Problem - $entry++; - - } - - } - - // read access flag - $this->AccessFlag = $this->JavaBinaryStream->readUnsignedShort(); - - // read this class - $this->ThisClass = $this->JavaBinaryStream->readUnsignedShort(); - - // read super class - $this->SuperClass = $this->JavaBinaryStream->readUnsignedShort(); - - // read interfaces - $this->InterfaceCount = $this->JavaBinaryStream->readUnsignedShort(); - - for ($i = 0; $i < $this->InterfaceCount; $i++) { - - $this->Interfaces[] = $this->JavaBinaryStream->readUnsignedShort(); - - } - - // read fields - $this->FieldCount = $this->JavaBinaryStream->readUnsignedShort(); - - for ($i = 0; $i < $this->FieldCount; $i++) { - - $this->Fields[] = $this->__Fields(); - - } - - // read methods - $this->MethodCount = $this->JavaBinaryStream->readUnsignedShort(); - - for ($i = 0; $i < $this->MethodCount; $i++) { - - $this->Methods[] = $this->__Method(); - - } - - $this->AttributesCount = $this->JavaBinaryStream->readUnsignedShort(); - - for ($i = 0; $i < $this->AttributesCount; $i++) { - - $this->AttributeInfo[] = new JavaAttributeInfo($this); - - } - - $this->MethodInvoker = new JavaMethodInvoker($this); - - // find clinit - foreach ($this->getMethods() as $method) { - - if ($this->cpInfo[$method->getNameIndex()]->getString() === '') { - - // call clinit - call_user_func_array(array( - $this->MethodInvoker, - '' - ), array()); - - } - - } - - } - - /** - * Constant Poolの情報を取得します。 - */ - private function __CpInfo () { - - // read tag - switch ($this->JavaBinaryStream->readUnsignedByte()) { - - case JavaClassConstantEnum::CONSTANT_Class: - - return new JavaStructureClass($this); - - break; - case JavaClassConstantEnum::CONSTANT_Fieldref: - - return new JavaStructureFieldref($this); - - break; - case JavaClassConstantEnum::CONSTANT_Methodref: - - return new JavaStructureMethodref($this); - - break; - case JavaClassConstantEnum::CONSTANT_InterfaceMethodref: - - return new JavaStructureInterfaceMethodref($this); - - break; - case JavaClassConstantEnum::CONSTANT_String: - - return new JavaStructureString($this); - - break; - case JavaClassConstantEnum::CONSTANT_Integer: - - return new JavaStructureInteger($this); - - break; - case JavaClassConstantEnum::CONSTANT_Float: - - return new JavaStructureFloat($this); - - break; - case JavaClassConstantEnum::CONSTANT_Long: - - return new JavaStructureLong($this); - - break; - case JavaClassConstantEnum::CONSTANT_Double: - - - return new JavaStructureDouble($this); - - break; - case JavaClassConstantEnum::CONSTANT_NameAndType: - - return new JavaStructureNameAndType($this); - - break; - case JavaClassConstantEnum::CONSTANT_Utf8: - - return new JavaStructureUtf8($this); - - break; - - } - - } - - /** - * フィールドの情報を取得します。 - * @return JavaStructureFieldInfo - */ - private function __Fields () { - - return new JavaStructureFieldInfo($this); - - } - - /** - * メソッドの情報を取得します。 - * @return JavaStructureMethodInfo - */ - private function __Method () { - - return new JavaStructureMethodInfo($this); - - } - - /** - * 読み込まれているファイルのハンドルを取得します。 - * @return resource - */ - public function getHandle () { - - return $this->Handle; - - } - - /** - * Constant Poolの情報を取得します。 - * @return object - */ - public function getCpInfo () { - - return $this->cpInfo; - - } - - /** - * メソッドの情報を取得します。 - * @return JavaStructureMethodInfo[] - */ - public function getMethods () { - - return $this->Methods; - - } - - /** - * メソッドの情報を取得します。 - * @return JavaStructureFieldInfo[] - */ - public function getFields () { - - return $this->Fields; - - } - - /** - * Javaのメソッドを呼び出すオブジェクトを取得します。 - * @return JavaMethodInvoker - */ - public function getMethodInvoker () { - - return $this->MethodInvoker; - - } - - /** - * Javaの引数やクラス定義におけるシグネチャを取得します。 - * @return array - */ - public static function parseSignature ($signature) { - - return self::_parseSignature($signature); - - } - - /** - * Javaの引数やクラス定義におけるシグネチャを取得します。 - * @return array - */ - private static function _parseSignature ($signature, $i = 0) { - - $data = array(); - $deepArray = 0; - - for ($size = strlen($signature); $i < $size; ) { - - switch ($signature[$i]) { - - case 'B': - case 'C': - case 'D': - case 'F': - case 'I': - case 'J': - case 'S': - case 'V': - case 'Z': - - $data[] = array( - - 'type' => self::_getSignatureType($signature[$i]), - 'deepArray' => $deepArray - - ); - - $deepArray = 0; - - - - break; - case 'L': - - // class name - $build = ''; - - // read to ; - for ($i++; $i < $size && $signature[$i] !== ';'; $i++) { - - $build .= $signature[$i]; - - } - - $data[] = array( - - 'type' => 'class', - 'deepArray' => $deepArray, - 'className' => $build - - ); - - $deepArray = 0; - - break; - case '[': - - // array - $deepArray++; - - for ($i++; $signature[$i] === '['; $i++) { - - $deepArray++; - - } - - // loop - continue 2; - - break; - case '(': - - $build = ''; - - // read to ) - for ($i++; $i < $size && $signature[$i] !== ')'; $i++) { - - $build .= $signature[$i]; - - } - - $data['arguments'] = ($build !== '') ? self::_parseSignature($build) : array(); - $data['argumentsCount'] = sizeof($data['arguments']); - - break; - - } - - $i++; - - } - - return $data; - - } - - /** - * シグネチャにおける型付を取得します。 - * @return string - */ - public static function _getSignatureType ($signature) { - - switch ($signature) { - - case 'B': return 'byte'; - case 'C': return 'char'; - case 'D': return 'double'; - case 'F': return 'float'; - case 'I': return 'int'; - case 'J': return 'long'; - case 'S': return 'short'; - case 'V': return 'void'; - case 'Z': return 'boolean'; - - } - - return 'Undefined'; - - } - - /** - * メソッド実行時のトレース情報を格納します。 - * - * @param string $methodName 実行されたメソッド名を指定します。 - * @param string $accessibility メソッドにおけるアクセス修飾子を指定します。 - * @param array $signature パースされたシグネチャの情報を指定します。 - * @return void - */ - public function appendMethodTrace ($methodName, $accessibility, $signature) { - - $arguments = array(); - - foreach ($signature['arguments'] as $argument) { - - $arguments[] = str_replace('/', '.', ($argument['type'] === 'class' ? $argument['className'] : $argument['type'])) . str_repeat('[]', $argument['deepArray']); - - } - - $this->TraceHeader .= implode(' ', $accessibility) . ' ' . str_replace('/', '.', ($signature[0]['type'] === 'class' ? $signature[0]['className'] : $signature[0]['type'])) . ' ' . $methodName . ' (' . implode(', ', $arguments) . ')' . "\n"; - - } - - /** - * 実行されたバイトコードのトレースをします。 - * - * @param int $opcode オペレーションコードを指定します。 - * @param int $programCounter オペレーションコードがどこまで実行されたか指定します。 - * @param array $stacks 現状のスタックの状況を指定します。 - * @param array $operands 渡されているオペランドの情報を指定します。 - * @return void - */ - public function appendTrace ($opcode, $programCounter, $stacks, $operands) { - - $mnemonic = new JavaMnemonicEnum(); - - $mnemonicName = preg_replace('/^MNEMONIC_/', '', $mnemonic->getName($opcode)); - - foreach ($operands as $key => $operand) { - - if (is_object($operands[$key])) { - - $operands[$key] = '#' . get_class($operands[$key]); - - } - - } - - $this->Trace .= '#' . $programCounter . "\t" . sprintf('0x%02X', $opcode) . "\t" . $mnemonicName . (strlen($mnemonicName) < 8 ? "\t" : '') . "\t" . sizeof($stacks) . "\t" . implode("\t", $operands) . "\n"; - - } - - /** - * トレースのヘッダー情報を定義します。 - * - * @return string - */ - private function traceHeader () { - - $trace = ''; - - $trace .= $this->TraceHeader; - $trace .= "PC\tOPCODE\tMNEMONIC\tSTACKS\tOPERAND(s)\n"; - $trace .= "----------------------------------------------------------------\n"; - return $trace; - - } - - /** - * トレース情報を別の変数に移し替えます。 - * @return void - */ - public function traceCompletion () { - - $trace = $this->traceHeader(); - $this->TraceBuffering[] = $trace . $this->Trace; - - $this->TraceHeader = ''; - $this->Trace = ''; - - - } - - /** - * 現時点までに実行されたオペコードのトレース情報を出力します。 - * - * @return string - */ - public function traceDump () { - echo $this->traceHeader(); - echo $this->Trace; - } - - /** - * トレース情報を出力します。 - * - * @return void - */ - public function trace () { - - echo implode("\n", $this->TraceBuffering); - - } - - /** - * Javaのバイトコードを読み取っているストリームを返します。 - * - * @return JavaBinaryStream - */ - public function getJavaBinaryStream () { - - return $this->JavaBinaryStream; - - } - - /** - * 読み込んでいる対象のクラスの情報を返します。 - * - * @return object - */ - public function getThisClass () { - - return $this->cpInfo[$this->ThisClass]; - - } - - /** - * 読み込んでいる対象の親クラスの情報を返します。 - * - * @return object - */ - public function getSuperClass () { - - return $this->cpInfo[$this->SuperClass]; - - } - - /** - * 管理しているjarファイルを定義します。 - * - * @return void - */ - public function setManipulator (JavaManipulator &$manipulator) { - - $this->Manipulator = $manipulator; - - } - - /** - * 管理しているjarファイルを返します - * - * @return JavaManipulator - */ - public function getManipulator () { - - return $this->Manipulator; - - } - - /** - * アトリビュートの情報を返します - * - * @return JavaAttributeInfo[] - */ - public function getAttributeInfo () { - - return $this->AttributeInfo; - - } - - /** - * 読み込んでいるクラスファイルの情報を返します - * - * @return string - */ - public function getClassFile () { - - return $this->ClassFile; - - } - - /** - * このクラスにおける静的なメンバを定義します。 - * - * @return void - */ - public function setStatic ($key, $value) { - - $this->ClassFields->Statics->{$key} = $value; - - } - - /** - * このクラスにおける動的なメンバを定義します。 - * - * @return void - */ - public function setInstance ($key, $value) { - - $this->ClassFields->Instances->{$key} = $value; - - } - - /** - * このクラスにおける静的なメンバを返します - * - * @param mixed $key Javaで定義されている変数名を指定 - * @return mixed - */ - public function getStatic ($key) { - - return isset($this->ClassFields->Statics->{$key}) ? $this->ClassFields->Statics->{$key} : null; - - } - - /** - * このクラスにおける動的なメンバを返します - * - * @param mixed $key Javaで定義されている変数名を指定 - * @return mixed - */ - public function getInstance ($key) { - - return isset($this->ClassFields->Instances->{$key}) ? $this->ClassFields->Instances->{$key} : null; - - } - - /** - * Javaのコンストラクタを呼びます。 - * - * @param mixed $... コンストラクタに渡す引数を指定します。 - * @return JavaMethodInvoker - */ - public function construct () { - $instance = new JavaMethodInvoker($this, true); - - $args = func_get_args(); - - // find init - foreach ($this->getMethods() as $method) { - - if ($this->cpInfo[$method->getNameIndex()]->getString() === '') { - - // call init - call_user_func_array(array( - $instance, - '' - ), $args); - break; - - } - - } - - return $instance; - - } - -} \ No newline at end of file diff --git a/PHPJava/Core/JavaDecompile.php b/PHPJava/Core/JavaDecompile.php deleted file mode 100644 index 413c3266..00000000 --- a/PHPJava/Core/JavaDecompile.php +++ /dev/null @@ -1,7 +0,0 @@ -Classes[] = new JavaManipulatorInfo($class, $archive); - - $class->setManipulator($this); - - return $class->getMethodInvoker(); - - } - - public function __get ($className) { - - foreach ($this->Classes as &$class) { - - $cpInfo = $class->getClass()->getCpInfo(); - - if ($cpInfo[$class->getClass()->getThisClass()->getClassIndex()]->getString() === $className) { - - return $class; - - } - - } - - throw new JavaManipulatorException('Not found class'); - - } - - public function getRegisteredClasses () { - - return sizeof($this->Classses); - - } - - public function getRegisteredArchives () { - - return sizeof($this->Archives); - - } - -} \ No newline at end of file diff --git a/PHPJava/Core/JavaManipulatorInfo.php b/PHPJava/Core/JavaManipulatorInfo.php deleted file mode 100644 index be05602c..00000000 --- a/PHPJava/Core/JavaManipulatorInfo.php +++ /dev/null @@ -1,27 +0,0 @@ -Class = $class; - $this->Archive = $archive; - - } - - public function getClass () { - - return $this->Class; - - } - - public function getArchive () { - - return $this->Archive; - - } - -} \ No newline at end of file diff --git a/PHPJava/Enums/JavaAccessFlagEnum.php b/PHPJava/Enums/JavaAccessFlagEnum.php deleted file mode 100644 index 42594b1f..00000000 --- a/PHPJava/Enums/JavaAccessFlagEnum.php +++ /dev/null @@ -1,14 +0,0 @@ -_constructed = $constructed; - } - - /** - * Javaのメンバをコールします。 - * - * @param $fieldName フィールド名 - * @return mixed - */ - public function __get ($fieldName) { - - $cpInfo = $this->getClass()->getCpInfo(); - - foreach ($this->getClass()->getFields() as $fieldInfo) { - - $cpFieldName = $cpInfo[$fieldInfo->getNameIndex()]->getString(); - - if ($fieldName === $cpFieldName) { - - $accessibility = $this->_getAccessiblity($fieldInfo); - $fieldSignature = JavaClass::parseSignature($cpInfo[$fieldInfo->getDescriptorIndex()]->getString()); - - // 静的メンバの場合 - if (in_array('static', $accessibility)) { - return $this->getClass()->getStatic($fieldName); - } - $type = 'JavaType' . ucfirst($fieldSignature[0]['type']); - return new $type($this->getClass()->getInstance($fieldName)); - } - } - - throw new JavaInvokerException('undefined field "' . $fieldName . '"'); - - } - - /** - * Javaのメンバの値を設定します。 - * - * @param string $fieldName フィールド名 - * @param mixed $value 書き換える値 - * @return mixed - */ - public function __set($fieldName, $value) { - - $cpInfo = $this->getClass()->getCpInfo(); - - foreach ($this->getClass()->getFields() as $fieldInfo) { - - $cpFieldName = $cpInfo[$fieldInfo->getNameIndex()]->getString(); - - if ($fieldName === $cpFieldName) { - - $accessibility = $this->_getAccessiblity($fieldInfo); - $fieldSignature = JavaClass::parseSignature($cpInfo[$fieldInfo->getDescriptorIndex()]->getString()); - - // 静的メンバの場合 - if (in_array('static', $accessibility)) { - $this->getClass()->setStatic($fieldName, $value); - return; - } - $this->getClass()->setInstance($fieldName, $value); - return; - } - } - - throw new JavaInvokerException('undefined field "' . $fieldName . '"'); - } - - /** - * Javaのメソッドをエミュレートします。 - * - * @param $fieldName フィールド名 - * @return mixed - */ - public function __call ($methodName, $arguments) { - - $cpInfo = $this->getClass()->getCpInfo(); - - foreach ($this->getClass()->getMethods() as $methodInfo) { - - $cpMethodName = $cpInfo[$methodInfo->getNameIndex()]->getString(); - - if ($methodName === $cpMethodName) { - - $accessibility = $this->_getAccessiblity($methodInfo); - - // メソッドのシグネチャを取得する - $javaArguments = JavaClass::parseSignature($cpInfo[$methodInfo->getDescriptorIndex()]->getString()); - - $argumentsCount = sizeof($arguments); - - if ($argumentsCount !== $javaArguments['argumentsCount']) { - - // 引数の配列の大きさが違う - continue; - - } else { - - foreach ($arguments as $argument) { - - // 型比較 - - - } - - } - - $this->getClass()->appendMethodTrace($methodName, $accessibility, $javaArguments); - - foreach ($methodInfo->getAttributes() as $attribute) { - - $attributeData = $attribute->getAttributeData(); - - if ($attributeData instanceof \JavaCodeAttribute) { - - $handle = fopen('php://memory', 'rw'); - fwrite($handle, $attributeData->getCode()); - rewind($handle); - - $byteCodeStream = new JavaByteCodeStream($handle); - - // 局所変数格納用 - $localstorage = array( - 0 => null, - 1 => null, - 2 => null, - 3 => null - ); - - $i = 0; - if ($this->_constructed) { - $localstorage[0] = $this->getClass(); - $i = 1; - } - - foreach ($arguments as $argument) { - - $localstorage[$i] = $argument; - $i++; - - } - - $stacks = array(); - - $mnemonic = new JavaMnemonicEnum(); - - for (; $byteCodeStream->getOffset() < $attributeData->getOpCodeLength(); ) { - - $opcode = $byteCodeStream->readUnsignedByte(); - - $pointer = $byteCodeStream->getOffset() - 1; - - $name = 'JavaStatement_' . preg_replace('/^MNEMONIC_/', '', $mnemonic->getName($opcode)); - - $mnemonicExecutor = dirname(__DIR__) . '/Statements/' . $name . '.php'; - - if (!is_file($mnemonicExecutor)) { - throw new JavaInvokerException('"' . $name . ' (' . sprintf('0x02X', $opcode) . ')" of mnemonic is not implemented. please report this message to administrator.'); - } - - require_once $mnemonicExecutor; - - $statement = new $name($methodName, $this, $byteCodeStream, $stacks, $localstorage, $cpInfo, $attributeData, $pointer); - $returnValue = $statement->execute(); - - // write trace - $this->getClass()->appendTrace($opcode, $pointer, $stacks, $byteCodeStream->getOperands()); - - if ($returnValue !== null) { - $this->getClass()->traceCompletion(); - return $returnValue; - } - - } - - $this->getClass()->traceCompletion(); - return; - - } - - } - - return; - - } - - - } - - throw new JavaInvokerException('undefined method "' . $methodName . '"'); - - } - - /** - * 型の変換を行います - * - * @param mixed $value 変換対象を指定 - * @return int 変換された型を返します。 - */ - public function valueOf ($value) { - - return (int) $value; - - } - - /** - * アクセス修飾子を取得します。 - * - * @param JavaMethodInfo|JavaFieldInfo $info アクセス修飾子を取得したいストラクチャを指定 - * @return array アクセス修飾子を返します。 - */ - private function _getAccessiblity ($info) { - - $accessFlag = new JavaAccessFlagEnum(); - $accessibility = array(); - - foreach ($accessFlag->getValues() as $value) { - - if (($info->getAccessFlag() & $value) != 0) { - - $accessibility[] = strtolower(preg_replace('/^CONSTANT_/', '', $accessFlag->getName($value))); - - } - - } - - return $accessibility; - } - -} diff --git a/PHPJava/Platform/java/io/PrintStream.php b/PHPJava/Platform/java/io/PrintStream.php deleted file mode 100644 index d89fb0c9..00000000 --- a/PHPJava/Platform/java/io/PrintStream.php +++ /dev/null @@ -1,34 +0,0 @@ -getString() . "\n"; - - } else if (is_string($arg) || - is_int($arg) || - $arg instanceof \JavaType || - $arg instanceof \java\lang\String) { - - echo $arg . "\n"; - - } else if ($arg === null) { - - echo "\n"; - - } else { - - throw new \JavaPlatformException('cannot convert to string'); - - } - - } - -} diff --git a/PHPJava/Platform/java/lang/NullPointerException.php b/PHPJava/Platform/java/lang/NullPointerException.php deleted file mode 100644 index 6a6d89a6..00000000 --- a/PHPJava/Platform/java/lang/NullPointerException.php +++ /dev/null @@ -1,9 +0,0 @@ -Object = $Object; - - } - - public function equals ($Object) { - - if ($this->Object instanceof \JavaStructureUtf8) { - - if ($Object instanceof \Java\lang\String) { - - if ($this->toString() === $Object->toString()) { - - return true; - - } - - } else if ($this->toString() === $Object) { - - return true; - - } - - } - - return false; - - } - - public function toString () { - - return $this->Object->getString(); - - } - - public function rawObject () { - - return $this->Object; - - } - - // php magic method - public function __toString () { - - if (!($this->Object instanceof \JavaStructureUtf8)) { - return (string) $this->Object; - } - - return $this->Object->getString(); - - } - -} diff --git a/PHPJava/Platform/java/lang/StringBuilder.php b/PHPJava/Platform/java/lang/StringBuilder.php deleted file mode 100644 index 90222760..00000000 --- a/PHPJava/Platform/java/lang/StringBuilder.php +++ /dev/null @@ -1,42 +0,0 @@ -sequence .= $arg->toString(); - - } else { - - $this->sequence .= $arg; - - } - - return $this; - - } - - public function toString ($arg = null) { - - return $this->sequence; - - } - - // php magic method - public function __toString () { - - return $this->sequence; - - } - -} \ No newline at end of file diff --git a/PHPJava/Platform/java/lang/System.php b/PHPJava/Platform/java/lang/System.php deleted file mode 100644 index 6d743052..00000000 --- a/PHPJava/Platform/java/lang/System.php +++ /dev/null @@ -1,9 +0,0 @@ -getStack(); - $arrayref = $this->getStack(); - - if (!isset($arrayref[$index])) { - - throw new JavaArrayIndexOutOfBoundsException($this->getMethodName() . ': ' . $index . ' of array index'); - - } - - $this->pushStack($arrayref[$index]); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_aastore.php b/PHPJava/Statements/JavaStatement_aastore.php deleted file mode 100644 index e52961a1..00000000 --- a/PHPJava/Statements/JavaStatement_aastore.php +++ /dev/null @@ -1,18 +0,0 @@ -getStack(); - $index = $this->getStack(); - $arrayref = $this->getStack(); - - $arrayref[$index] = $value; - - } - -} diff --git a/PHPJava/Statements/JavaStatement_aconst_null.php b/PHPJava/Statements/JavaStatement_aconst_null.php deleted file mode 100644 index d5915e14..00000000 --- a/PHPJava/Statements/JavaStatement_aconst_null.php +++ /dev/null @@ -1,14 +0,0 @@ -pushStack(null); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_aload.php b/PHPJava/Statements/JavaStatement_aload.php deleted file mode 100644 index fdbef9be..00000000 --- a/PHPJava/Statements/JavaStatement_aload.php +++ /dev/null @@ -1,16 +0,0 @@ -getByteCodeStream()->readByte(); - - $this->pushStack($this->getLocalstorage($index)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_aload_0.php b/PHPJava/Statements/JavaStatement_aload_0.php deleted file mode 100644 index b10ea9ec..00000000 --- a/PHPJava/Statements/JavaStatement_aload_0.php +++ /dev/null @@ -1,14 +0,0 @@ -pushStack($this->getLocalstorage(0)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_aload_1.php b/PHPJava/Statements/JavaStatement_aload_1.php deleted file mode 100644 index f810606f..00000000 --- a/PHPJava/Statements/JavaStatement_aload_1.php +++ /dev/null @@ -1,15 +0,0 @@ -pushStack($this->getLocalstorage(1)); - - - } - -} diff --git a/PHPJava/Statements/JavaStatement_aload_2.php b/PHPJava/Statements/JavaStatement_aload_2.php deleted file mode 100644 index 44906067..00000000 --- a/PHPJava/Statements/JavaStatement_aload_2.php +++ /dev/null @@ -1,14 +0,0 @@ -pushStack($this->getLocalstorage(2)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_aload_3.php b/PHPJava/Statements/JavaStatement_aload_3.php deleted file mode 100644 index df78b6e2..00000000 --- a/PHPJava/Statements/JavaStatement_aload_3.php +++ /dev/null @@ -1,14 +0,0 @@ -pushStack($this->getLocalstorage(3)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_anewarray.php b/PHPJava/Statements/JavaStatement_anewarray.php deleted file mode 100644 index 83b48c14..00000000 --- a/PHPJava/Statements/JavaStatement_anewarray.php +++ /dev/null @@ -1,23 +0,0 @@ -getByteCodeStream()->readUnsignedShort(); - - // 空の配列を渡す (nullで埋める) - $count = $this->getStack(); - // need reference - $ref = new ArrayIterator(array_fill(0, $count, null)); - $this->pushStackByReference($ref); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_areturn.php b/PHPJava/Statements/JavaStatement_areturn.php deleted file mode 100644 index 053d45da..00000000 --- a/PHPJava/Statements/JavaStatement_areturn.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_arraylength.php b/PHPJava/Statements/JavaStatement_arraylength.php deleted file mode 100644 index fd90efc0..00000000 --- a/PHPJava/Statements/JavaStatement_arraylength.php +++ /dev/null @@ -1,13 +0,0 @@ -getStack(); - - $this->pushStack(sizeof($arrayref)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_astore.php b/PHPJava/Statements/JavaStatement_astore.php deleted file mode 100644 index 95474cc9..00000000 --- a/PHPJava/Statements/JavaStatement_astore.php +++ /dev/null @@ -1,12 +0,0 @@ -getByteCodeStream()->readUnsignedByte(); - $this->setLocalstorage($index, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_astore_0.php b/PHPJava/Statements/JavaStatement_astore_0.php deleted file mode 100644 index 2e8265df..00000000 --- a/PHPJava/Statements/JavaStatement_astore_0.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(0, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_astore_1.php b/PHPJava/Statements/JavaStatement_astore_1.php deleted file mode 100644 index 1ce1a0de..00000000 --- a/PHPJava/Statements/JavaStatement_astore_1.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(1, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_astore_2.php b/PHPJava/Statements/JavaStatement_astore_2.php deleted file mode 100644 index d81e9e28..00000000 --- a/PHPJava/Statements/JavaStatement_astore_2.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(2, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_astore_3.php b/PHPJava/Statements/JavaStatement_astore_3.php deleted file mode 100644 index 8622de5f..00000000 --- a/PHPJava/Statements/JavaStatement_astore_3.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(3, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_athrow.php b/PHPJava/Statements/JavaStatement_athrow.php deleted file mode 100644 index 9c1698b9..00000000 --- a/PHPJava/Statements/JavaStatement_athrow.php +++ /dev/null @@ -1,30 +0,0 @@ -getCpInfo(); - - $objectref = $this->getStack(); - - $className = str_replace('\\', '/', get_class($objectref)); - - foreach ($this->getAttributeData()->getExceptionTables() as $exception) { - - if ($cpInfo[$cpInfo[$exception->getCatchType()]->getClassIndex()]->getString() === $className && - $exception->getStartPc() <= $this->getPointer() && - $exception->getEndPc() >= $this->getPointer()) { - - $this->getByteCodeStream()->setOffset($exception->getHandlerPc()); - return; - - } - - } - - throw new JavaStatementException('exception table was broken.'); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_baload.php b/PHPJava/Statements/JavaStatement_baload.php deleted file mode 100644 index 3512b38b..00000000 --- a/PHPJava/Statements/JavaStatement_baload.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack($this->getByteCodeStream()->readByte()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_breakpoint.php b/PHPJava/Statements/JavaStatement_breakpoint.php deleted file mode 100644 index 3c28d1fd..00000000 --- a/PHPJava/Statements/JavaStatement_breakpoint.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::add($value1, $value2, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_daload.php b/PHPJava/Statements/JavaStatement_daload.php deleted file mode 100644 index 600bb5f4..00000000 --- a/PHPJava/Statements/JavaStatement_daload.php +++ /dev/null @@ -1,17 +0,0 @@ -getStack(); - $arrayref = $this->getStack(); - - $this->pushStack($arrayref[$index]); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dastore.php b/PHPJava/Statements/JavaStatement_dastore.php deleted file mode 100644 index b006dc10..00000000 --- a/PHPJava/Statements/JavaStatement_dastore.php +++ /dev/null @@ -1,18 +0,0 @@ -getStack(); - $index = $this->getStack(); - $arrayref = $this->getStack(); - - $arrayref[$index] = $value; - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dcmpg.php b/PHPJava/Statements/JavaStatement_dcmpg.php deleted file mode 100644 index 9a74dd52..00000000 --- a/PHPJava/Statements/JavaStatement_dcmpg.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(0); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dconst_1.php b/PHPJava/Statements/JavaStatement_dconst_1.php deleted file mode 100644 index d44caee4..00000000 --- a/PHPJava/Statements/JavaStatement_dconst_1.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(1); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ddiv.php b/PHPJava/Statements/JavaStatement_ddiv.php deleted file mode 100644 index d51b2d6f..00000000 --- a/PHPJava/Statements/JavaStatement_ddiv.php +++ /dev/null @@ -1,11 +0,0 @@ -getByteCodeStream()->readUnsignedByte(); - $this->pushStack($this->getLocalstorage($index)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dload_0.php b/PHPJava/Statements/JavaStatement_dload_0.php deleted file mode 100644 index 1d88a1ae..00000000 --- a/PHPJava/Statements/JavaStatement_dload_0.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::multiply($value1, $value2, 8)); - - - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dneg.php b/PHPJava/Statements/JavaStatement_dneg.php deleted file mode 100644 index bb4667e3..00000000 --- a/PHPJava/Statements/JavaStatement_dneg.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dstore.php b/PHPJava/Statements/JavaStatement_dstore.php deleted file mode 100644 index 024d2218..00000000 --- a/PHPJava/Statements/JavaStatement_dstore.php +++ /dev/null @@ -1,17 +0,0 @@ -getByteCodeStream()->readUnsignedByte(); - $value = $this->getStack(); - - $this->setLocalstorage($index, BinaryTools::convertDoubleToIEEE754($value)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dstore_0.php b/PHPJava/Statements/JavaStatement_dstore_0.php deleted file mode 100644 index 8e53ac99..00000000 --- a/PHPJava/Statements/JavaStatement_dstore_0.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(0, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dstore_1.php b/PHPJava/Statements/JavaStatement_dstore_1.php deleted file mode 100644 index d9bdb378..00000000 --- a/PHPJava/Statements/JavaStatement_dstore_1.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(1, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dstore_2.php b/PHPJava/Statements/JavaStatement_dstore_2.php deleted file mode 100644 index 6b45400a..00000000 --- a/PHPJava/Statements/JavaStatement_dstore_2.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(2, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dstore_3.php b/PHPJava/Statements/JavaStatement_dstore_3.php deleted file mode 100644 index e1bfda96..00000000 --- a/PHPJava/Statements/JavaStatement_dstore_3.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(3, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dsub.php b/PHPJava/Statements/JavaStatement_dsub.php deleted file mode 100644 index c3ace5fa..00000000 --- a/PHPJava/Statements/JavaStatement_dsub.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $rightValue = $this->getStack(); - - $this->pushStack(BinaryTools::sub($leftValue, $rightValue, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dup.php b/PHPJava/Statements/JavaStatement_dup.php deleted file mode 100644 index 6fc18a19..00000000 --- a/PHPJava/Statements/JavaStatement_dup.php +++ /dev/null @@ -1,11 +0,0 @@ -dupStack(); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_dup2.php b/PHPJava/Statements/JavaStatement_dup2.php deleted file mode 100644 index cd36b202..00000000 --- a/PHPJava/Statements/JavaStatement_dup2.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_fstore.php b/PHPJava/Statements/JavaStatement_fstore.php deleted file mode 100644 index ac863f18..00000000 --- a/PHPJava/Statements/JavaStatement_fstore.php +++ /dev/null @@ -1,11 +0,0 @@ -getCpInfo(); - - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - - $get = $this->getStack(); - - $return = $get->getInstance($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()); - - if ($return !== null) { - - $this->pushStack($return); - - } else { - - throw new JavaStatementException('Cannot get ' . $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() . ''); - - } - - } - -} diff --git a/PHPJava/Statements/JavaStatement_getstatic.php b/PHPJava/Statements/JavaStatement_getstatic.php deleted file mode 100644 index ba527746..00000000 --- a/PHPJava/Statements/JavaStatement_getstatic.php +++ /dev/null @@ -1,44 +0,0 @@ -getCpInfo(); - - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - - $class = $cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString(); - - $signature = JavaClass::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); - - foreach ($this->getInvoker()->getClass()->getFields() as $field) { - - if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { - - // push stack - $this->pushStack($this->getInvoker()->getClass()->getStatic($cpInfo[$field->getNameIndex()]->getString())); - - return; - - } - - } - - if (isset($signature[0]['className'])) { - - $this->getInvoker()->loadPlatform($class); - $this->getInvoker()->loadPlatform($signature[0]['className']); - $className = str_replace('/', '\\', $signature[0]['className']); - - $this->pushStack(new $className()); - return; - - } - - throw new JavaStatementException('Has not class or field'); - - - } - -} diff --git a/PHPJava/Statements/JavaStatement_goto.php b/PHPJava/Statements/JavaStatement_goto.php deleted file mode 100644 index 3c7efc8b..00000000 --- a/PHPJava/Statements/JavaStatement_goto.php +++ /dev/null @@ -1,13 +0,0 @@ -getByteCodeStream()->readShort(); - - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_goto_w.php b/PHPJava/Statements/JavaStatement_goto_w.php deleted file mode 100644 index beaf2033..00000000 --- a/PHPJava/Statements/JavaStatement_goto_w.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack(); - - $this->pushStack(base_convert(substr(sprintf('%032s', base_convert($value, 10, 2)), 16), 2, 10)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iadd.php b/PHPJava/Statements/JavaStatement_iadd.php deleted file mode 100644 index d1842c6e..00000000 --- a/PHPJava/Statements/JavaStatement_iadd.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $rightValue = $this->getStack(); - - $this->pushStack(BinaryTools::add($leftValue, $rightValue, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iaload.php b/PHPJava/Statements/JavaStatement_iaload.php deleted file mode 100644 index a58db46e..00000000 --- a/PHPJava/Statements/JavaStatement_iaload.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $arrayref = $this->getStack(); - - $this->pushStack($arrayref[$index]); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iand.php b/PHPJava/Statements/JavaStatement_iand.php deleted file mode 100644 index 5ff1166c..00000000 --- a/PHPJava/Statements/JavaStatement_iand.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::andBits($value1, $value2, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iastore.php b/PHPJava/Statements/JavaStatement_iastore.php deleted file mode 100644 index 87ea436c..00000000 --- a/PHPJava/Statements/JavaStatement_iastore.php +++ /dev/null @@ -1,15 +0,0 @@ -getStack(); - $arrayref = $this->getStack(); - $value = $this->getStack(); - - $value[$arrayref] = $data; - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iconst_0.php b/PHPJava/Statements/JavaStatement_iconst_0.php deleted file mode 100644 index 8be84ef1..00000000 --- a/PHPJava/Statements/JavaStatement_iconst_0.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(0); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iconst_1.php b/PHPJava/Statements/JavaStatement_iconst_1.php deleted file mode 100644 index 85f5b44e..00000000 --- a/PHPJava/Statements/JavaStatement_iconst_1.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(1); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iconst_2.php b/PHPJava/Statements/JavaStatement_iconst_2.php deleted file mode 100644 index 425fc06f..00000000 --- a/PHPJava/Statements/JavaStatement_iconst_2.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(2); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iconst_3.php b/PHPJava/Statements/JavaStatement_iconst_3.php deleted file mode 100644 index 89d1dab6..00000000 --- a/PHPJava/Statements/JavaStatement_iconst_3.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(3); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iconst_4.php b/PHPJava/Statements/JavaStatement_iconst_4.php deleted file mode 100644 index 403714aa..00000000 --- a/PHPJava/Statements/JavaStatement_iconst_4.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(4); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iconst_5.php b/PHPJava/Statements/JavaStatement_iconst_5.php deleted file mode 100644 index 0ea93695..00000000 --- a/PHPJava/Statements/JavaStatement_iconst_5.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(5); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iconst_m1.php b/PHPJava/Statements/JavaStatement_iconst_m1.php deleted file mode 100644 index 8c6d4585..00000000 --- a/PHPJava/Statements/JavaStatement_iconst_m1.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(-1); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_idiv.php b/PHPJava/Statements/JavaStatement_idiv.php deleted file mode 100644 index 447bcb7e..00000000 --- a/PHPJava/Statements/JavaStatement_idiv.php +++ /dev/null @@ -1,11 +0,0 @@ -getByteCodeStream()->readShort(); - - $leftOperand = $this->getStack(); - $rightOperand = $this->getStack(); - - if ($leftOperand === $rightOperand) { - - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - - } - - } - -} diff --git a/PHPJava/Statements/JavaStatement_if_acmpne.php b/PHPJava/Statements/JavaStatement_if_acmpne.php deleted file mode 100644 index d1b3f4d1..00000000 --- a/PHPJava/Statements/JavaStatement_if_acmpne.php +++ /dev/null @@ -1,20 +0,0 @@ -getByteCodeStream()->readShort(); - - $leftOperand = $this->getStack(); - $rightOperand = $this->getStack(); - - if ($leftOperand !== $rightOperand) { - - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - - } - - } - -} diff --git a/PHPJava/Statements/JavaStatement_if_icmpeq.php b/PHPJava/Statements/JavaStatement_if_icmpeq.php deleted file mode 100644 index 80751cba..00000000 --- a/PHPJava/Statements/JavaStatement_if_icmpeq.php +++ /dev/null @@ -1,11 +0,0 @@ -getByteCodeStream()->readShort(); - - $leftOperand = $this->getStack(); - $rightOperand = $this->getStack(); - - if ($leftOperand <= $rightOperand) { - - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - - } - - } - -} diff --git a/PHPJava/Statements/JavaStatement_if_icmpgt.php b/PHPJava/Statements/JavaStatement_if_icmpgt.php deleted file mode 100644 index d8179f62..00000000 --- a/PHPJava/Statements/JavaStatement_if_icmpgt.php +++ /dev/null @@ -1,21 +0,0 @@ -getByteCodeStream()->readShort(); - - $leftOperand = $this->getStack(); - $rightOperand = $this->getStack(); - - if ($leftOperand < $rightOperand) { - - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - - } - - - } - -} diff --git a/PHPJava/Statements/JavaStatement_if_icmple.php b/PHPJava/Statements/JavaStatement_if_icmple.php deleted file mode 100644 index 9beeb4a8..00000000 --- a/PHPJava/Statements/JavaStatement_if_icmple.php +++ /dev/null @@ -1,11 +0,0 @@ -getByteCodeStream()->readShort(); - - $leftOperand = $this->getStack(); - $rightOperand = $this->getStack(); - - if ($rightOperand < $leftOperand) { - - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - - } - } - -} diff --git a/PHPJava/Statements/JavaStatement_if_icmpne.php b/PHPJava/Statements/JavaStatement_if_icmpne.php deleted file mode 100644 index e68bca61..00000000 --- a/PHPJava/Statements/JavaStatement_if_icmpne.php +++ /dev/null @@ -1,20 +0,0 @@ -getByteCodeStream()->readShort(); - - $leftOperand = $this->getStack(); - $rightOperand = $this->getStack(); - - if ($leftOperand != $rightOperand) { - - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - - } - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ifeq.php b/PHPJava/Statements/JavaStatement_ifeq.php deleted file mode 100644 index 43c45ee6..00000000 --- a/PHPJava/Statements/JavaStatement_ifeq.php +++ /dev/null @@ -1,20 +0,0 @@ -getByteCodeStream()->readShort(); - - $operand = $this->getStack(); - - if ($operand == 0) { - - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - - } - - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ifge.php b/PHPJava/Statements/JavaStatement_ifge.php deleted file mode 100644 index 4ad6d881..00000000 --- a/PHPJava/Statements/JavaStatement_ifge.php +++ /dev/null @@ -1,11 +0,0 @@ -getByteCodeStream()->readShort(); - - $operand = $this->getStack(); - - if ($operand != 0) { - - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - - } - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ifnonnull.php b/PHPJava/Statements/JavaStatement_ifnonnull.php deleted file mode 100644 index 16e0933a..00000000 --- a/PHPJava/Statements/JavaStatement_ifnonnull.php +++ /dev/null @@ -1,11 +0,0 @@ -getByteCodeStream()->readUnsignedByte(); - $const = $this->getByteCodeStream()->readByte(); - - $this->setLocalstorage($index, $this->getLocalstorage($index) + $const); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iload.php b/PHPJava/Statements/JavaStatement_iload.php deleted file mode 100644 index 508e6065..00000000 --- a/PHPJava/Statements/JavaStatement_iload.php +++ /dev/null @@ -1,13 +0,0 @@ -getByteCodeStream()->readUnsignedByte(); - - $this->pushStack($this->getLocalstorage($index)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iload_0.php b/PHPJava/Statements/JavaStatement_iload_0.php deleted file mode 100644 index 34a2d685..00000000 --- a/PHPJava/Statements/JavaStatement_iload_0.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack($this->getLocalstorage(0)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iload_1.php b/PHPJava/Statements/JavaStatement_iload_1.php deleted file mode 100644 index a3960caf..00000000 --- a/PHPJava/Statements/JavaStatement_iload_1.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack($this->getLocalstorage(1)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iload_2.php b/PHPJava/Statements/JavaStatement_iload_2.php deleted file mode 100644 index 85d80206..00000000 --- a/PHPJava/Statements/JavaStatement_iload_2.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack($this->getLocalstorage(2)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iload_3.php b/PHPJava/Statements/JavaStatement_iload_3.php deleted file mode 100644 index 8f53fab1..00000000 --- a/PHPJava/Statements/JavaStatement_iload_3.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack($this->getLocalstorage(3)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_impdep1.php b/PHPJava/Statements/JavaStatement_impdep1.php deleted file mode 100644 index 1e4c87eb..00000000 --- a/PHPJava/Statements/JavaStatement_impdep1.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::multiply($value1, $value2, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ineg.php b/PHPJava/Statements/JavaStatement_ineg.php deleted file mode 100644 index 715dedf6..00000000 --- a/PHPJava/Statements/JavaStatement_ineg.php +++ /dev/null @@ -1,13 +0,0 @@ -getStack(); - - $this->pushStack(BinaryTools::negate($value, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_instanceof.php b/PHPJava/Statements/JavaStatement_instanceof.php deleted file mode 100644 index 379a6e46..00000000 --- a/PHPJava/Statements/JavaStatement_instanceof.php +++ /dev/null @@ -1,11 +0,0 @@ -getCpInfo(); - - - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - - // $invokeClassName = '\\' . str_replace('/', '\\', $cpList[$class->getClassIndex()]->getString()); - - - $nameAndTypeIndex = $cpInfo[$cp->getNameAndTypeIndex()]; - - // signature - $signature = JavaClass::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); - - $invokeClassName = $this->getStack(); - - $arguments = array(); - - for ($i = 0; $i < $signature['argumentsCount']; $i++) { - - $arguments[] = $this->getStack(); - - } - - - } - -} diff --git a/PHPJava/Statements/JavaStatement_invokestatic.php b/PHPJava/Statements/JavaStatement_invokestatic.php deleted file mode 100644 index bf98cf83..00000000 --- a/PHPJava/Statements/JavaStatement_invokestatic.php +++ /dev/null @@ -1,39 +0,0 @@ -getCpInfo(); - - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - - $methodName = $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString(); - - $signature = JavaClass::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); - - $arguments = array(); - - for ($i = 0; $i < $signature['argumentsCount']; $i++) { - - $arguments[] = $this->getStack(); - - } - - krsort($arguments); - - // call invoker - $return = call_user_func_array(array( - $this->getInvoker(), - $methodName - ), $arguments); - - if ($signature[0]['type'] !== 'void') { - - $this->pushStack($return); - - } - - } - -} diff --git a/PHPJava/Statements/JavaStatement_invokevirtual.php b/PHPJava/Statements/JavaStatement_invokevirtual.php deleted file mode 100644 index f6d4fecc..00000000 --- a/PHPJava/Statements/JavaStatement_invokevirtual.php +++ /dev/null @@ -1,61 +0,0 @@ -getCpInfo(); - - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - - $class = $cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString(); - - $nameAndTypeIndex = $cpInfo[$cp->getNameAndTypeIndex()]; - - // signature - $signature = JavaClass::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); - $arguments = array(); - - for ($i = 0; $i < $signature['argumentsCount']; $i++) { - - $arguments[] = $this->getStack(); - - } - - $invokerClass = $this->getStack(); - - if ($invokerClass instanceof \JavaClass) { - - $result = call_user_func_array(array( - - $invokerClass->getMethodInvoker(), - $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() - - ), $arguments); - - - } else { - - // load platform - $this->getInvoker()->loadPlatform($class); - $invokerClassName = '\\' . str_replace('/', '\\', $class); - - $result = call_user_func_array(array( - - $invokerClass, - $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() - - ), $arguments); - - } - - if ($signature[0]['type'] !== 'void') { - - $this->pushStack($result); - - } - - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ior.php b/PHPJava/Statements/JavaStatement_ior.php deleted file mode 100644 index 4e86b370..00000000 --- a/PHPJava/Statements/JavaStatement_ior.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::orBits($value1, $value2, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_irem.php b/PHPJava/Statements/JavaStatement_irem.php deleted file mode 100644 index d82eb18c..00000000 --- a/PHPJava/Statements/JavaStatement_irem.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ishl.php b/PHPJava/Statements/JavaStatement_ishl.php deleted file mode 100644 index 68eca89d..00000000 --- a/PHPJava/Statements/JavaStatement_ishl.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::shiftLeft($value1, $value2, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ishr.php b/PHPJava/Statements/JavaStatement_ishr.php deleted file mode 100644 index 00ede8c8..00000000 --- a/PHPJava/Statements/JavaStatement_ishr.php +++ /dev/null @@ -1,15 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::shiftRight($value1, $value2, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_istore.php b/PHPJava/Statements/JavaStatement_istore.php deleted file mode 100644 index c5a1e0e8..00000000 --- a/PHPJava/Statements/JavaStatement_istore.php +++ /dev/null @@ -1,12 +0,0 @@ -getByteCodeStream()->readUnsignedByte(); - $this->setLocalstorage($index, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_istore_0.php b/PHPJava/Statements/JavaStatement_istore_0.php deleted file mode 100644 index afa182a7..00000000 --- a/PHPJava/Statements/JavaStatement_istore_0.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(0, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_istore_1.php b/PHPJava/Statements/JavaStatement_istore_1.php deleted file mode 100644 index 0243f967..00000000 --- a/PHPJava/Statements/JavaStatement_istore_1.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(1, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_istore_2.php b/PHPJava/Statements/JavaStatement_istore_2.php deleted file mode 100644 index f183ad65..00000000 --- a/PHPJava/Statements/JavaStatement_istore_2.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(2, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_istore_3.php b/PHPJava/Statements/JavaStatement_istore_3.php deleted file mode 100644 index 04094cc1..00000000 --- a/PHPJava/Statements/JavaStatement_istore_3.php +++ /dev/null @@ -1,11 +0,0 @@ -setLocalstorage(3, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_isub.php b/PHPJava/Statements/JavaStatement_isub.php deleted file mode 100644 index c7be6b4e..00000000 --- a/PHPJava/Statements/JavaStatement_isub.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $rightValue = $this->getStack(); - - $this->pushStack(BinaryTools::sub($leftValue, $rightValue, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_iushr.php b/PHPJava/Statements/JavaStatement_iushr.php deleted file mode 100644 index 37c6d4dd..00000000 --- a/PHPJava/Statements/JavaStatement_iushr.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::unsignedShiftRight($value1, $value2, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ixor.php b/PHPJava/Statements/JavaStatement_ixor.php deleted file mode 100644 index f9096c35..00000000 --- a/PHPJava/Statements/JavaStatement_ixor.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::xorBits($value1, $value2, 4)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_jsr.php b/PHPJava/Statements/JavaStatement_jsr.php deleted file mode 100644 index cae0798a..00000000 --- a/PHPJava/Statements/JavaStatement_jsr.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::add($value1, $value2, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_laload.php b/PHPJava/Statements/JavaStatement_laload.php deleted file mode 100644 index dd8d6649..00000000 --- a/PHPJava/Statements/JavaStatement_laload.php +++ /dev/null @@ -1,17 +0,0 @@ -getStack(); - $arrayref = $this->getStack(); - - $this->pushStack($arrayref[$index]); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_land.php b/PHPJava/Statements/JavaStatement_land.php deleted file mode 100644 index 162d1806..00000000 --- a/PHPJava/Statements/JavaStatement_land.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::andBits($value1, $value2, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lastore.php b/PHPJava/Statements/JavaStatement_lastore.php deleted file mode 100644 index c93bddcb..00000000 --- a/PHPJava/Statements/JavaStatement_lastore.php +++ /dev/null @@ -1,18 +0,0 @@ -getStack(); - $index = $this->getStack(); - $arrayref = $this->getStack(); - - $arrayref[$index] = $value; - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lcmp.php b/PHPJava/Statements/JavaStatement_lcmp.php deleted file mode 100644 index b59989e3..00000000 --- a/PHPJava/Statements/JavaStatement_lcmp.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(0); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lconst_1.php b/PHPJava/Statements/JavaStatement_lconst_1.php deleted file mode 100644 index 705b04a4..00000000 --- a/PHPJava/Statements/JavaStatement_lconst_1.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack(1); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ldc.php b/PHPJava/Statements/JavaStatement_ldc.php deleted file mode 100644 index 16e3db85..00000000 --- a/PHPJava/Statements/JavaStatement_ldc.php +++ /dev/null @@ -1,40 +0,0 @@ -getCpInfo(); - - $data = $cpInfo[$this->getByteCodeStream()->readUnsignedByte()]; - - $value = null; - - if ($data instanceof \JavaStructureString) { - - $value = $cpInfo[$data->getStringIndex()]; - - if ($value instanceof \JavaStructureUtf8) { - - // convert java string - $this->getInvoker()->loadPlatform('java.lang.String'); - - $value = new \java\lang\String($value); - - } - - } else if (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { - - $value = $data->getBytes(); - - } else { - - $value = $cpInfo[$cpInfo[$this->getByteCodeStream()->readUnsignedByte()]->getStringIndex()]; - - } - - $this->pushStack($value); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ldc2_w.php b/PHPJava/Statements/JavaStatement_ldc2_w.php deleted file mode 100644 index b58e51bb..00000000 --- a/PHPJava/Statements/JavaStatement_ldc2_w.php +++ /dev/null @@ -1,15 +0,0 @@ -getCpInfo(); - - $data = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - - $this->pushStack($data->getBytes()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ldc_w.php b/PHPJava/Statements/JavaStatement_ldc_w.php deleted file mode 100644 index f5ba644d..00000000 --- a/PHPJava/Statements/JavaStatement_ldc_w.php +++ /dev/null @@ -1,11 +0,0 @@ -getByteCodeStream()->readUnsignedByte(); - - $this->pushStack($this->getLocalstorage($index)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lload_0.php b/PHPJava/Statements/JavaStatement_lload_0.php deleted file mode 100644 index c6bf30fb..00000000 --- a/PHPJava/Statements/JavaStatement_lload_0.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::multiply($value1, $value2, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lneg.php b/PHPJava/Statements/JavaStatement_lneg.php deleted file mode 100644 index 70d482b4..00000000 --- a/PHPJava/Statements/JavaStatement_lneg.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack(); - - $paddingData = $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte(); - - $offsets = array(); - - $offsets['default'] = $this->getByteCodeStream()->readInt(); - $switchSize = $this->getByteCodeStream()->readUnsignedInt(); - - - for ($i = 0; $i < $switchSize; $i++) { - - $label = $this->getByteCodeStream()->readInt(); - - $offsets[(string) $label] = $this->getByteCodeStream()->readInt(); - - } - - if (isset($offsets[$key])) { - - // goto PC - $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); - return; - - } - - // goto default - $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lor.php b/PHPJava/Statements/JavaStatement_lor.php deleted file mode 100644 index 143cf270..00000000 --- a/PHPJava/Statements/JavaStatement_lor.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::orBits($value1, $value2, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lrem.php b/PHPJava/Statements/JavaStatement_lrem.php deleted file mode 100644 index 3bbb6013..00000000 --- a/PHPJava/Statements/JavaStatement_lrem.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lshl.php b/PHPJava/Statements/JavaStatement_lshl.php deleted file mode 100644 index 90526f12..00000000 --- a/PHPJava/Statements/JavaStatement_lshl.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::shiftLeft($value1, $value2, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lshr.php b/PHPJava/Statements/JavaStatement_lshr.php deleted file mode 100644 index fbb163d4..00000000 --- a/PHPJava/Statements/JavaStatement_lshr.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::shiftRight($value1, $value2, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lstore.php b/PHPJava/Statements/JavaStatement_lstore.php deleted file mode 100644 index 351f41ce..00000000 --- a/PHPJava/Statements/JavaStatement_lstore.php +++ /dev/null @@ -1,12 +0,0 @@ -getByteCodeStream()->readUnsignedByte(); - $this->setLocalstorage($index, $this->getStack()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lstore_0.php b/PHPJava/Statements/JavaStatement_lstore_0.php deleted file mode 100644 index 51220b97..00000000 --- a/PHPJava/Statements/JavaStatement_lstore_0.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::sub($value1, $value2, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lushr.php b/PHPJava/Statements/JavaStatement_lushr.php deleted file mode 100644 index 41e8e90a..00000000 --- a/PHPJava/Statements/JavaStatement_lushr.php +++ /dev/null @@ -1,14 +0,0 @@ -getStack(); - $value2 = $this->getStack(); - - $this->pushStack(BinaryTools::unsignedShiftRight($value1, $value2, 8)); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_lxor.php b/PHPJava/Statements/JavaStatement_lxor.php deleted file mode 100644 index 6fb819bf..00000000 --- a/PHPJava/Statements/JavaStatement_lxor.php +++ /dev/null @@ -1,11 +0,0 @@ -getCpInfo(); - - $class = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - - $className = $cpInfo[$class->getClassIndex()]->getString(); - - if (isset($this->getInvoker()->getClass()->getManipulator()->$className) && - $this->getInvoker()->getClass()->getManipulator()->$className !== null) { - - // call constructor - call_user_func_array( - array( - $this->getInvoker()->getClass()->getManipulator()->$className->getMethodInvoker(), - '' - ), - array() - ); - - $this->pushStack($this->getInvoker()->getClass()->getManipulator()->$className); - - } else { - - if (($this->getInvoker()->getClass()->getManipulator() !== null && - $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && - $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) || - is_file(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class')) { - - $javaClass = null; - - if ($this->getInvoker()->getClass()->getManipulator() !== null && - $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && - $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) { - - $javaClass = new JavaClass($className . '.class', $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->getClassBytecode($className)); - - } else { - - $javaClass = new JavaClass(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class'); - - } - - $outerClasses = explode('$', $className); - - $javaClass->setInstance('this', $javaClass); - - for ($i = 1, $size = sizeof($outerClasses); $i < $size; $i++) { - - $javaClass->setInstance('this$' . ($i - 1), $this->getInvoker()->getClass()->getManipulator()->{implode('$', array_slice($outerClasses, 0, $i))}); - - - } - - if (method_exists($javaClass->getMethodInvoker(), '')) { - - // call constructor - call_user_func_array( - array( - $javaClass->getMethodInvoker(), - '' - ), - array( - $this->getInvoker()->getClass() - ) - ); - - } - - if ($this->getInvoker()->getClass()->getManipulator() !== null) { - - // regist to manipulator - $this->getInvoker()->getClass()->getManipulator()->registerClass($javaClass); - - } - - // push to stack - $this->pushStack($javaClass); - - } else { - - // load platform - $this->getInvoker()->loadPlatform($className); - - $invokeClassName = '\\' . str_replace('/', '\\', $className); - - $this->pushStack(new $invokeClassName()); - - } - - } - - } - -} diff --git a/PHPJava/Statements/JavaStatement_newarray.php b/PHPJava/Statements/JavaStatement_newarray.php deleted file mode 100644 index 3b1b453c..00000000 --- a/PHPJava/Statements/JavaStatement_newarray.php +++ /dev/null @@ -1,17 +0,0 @@ -getByteCodeStream()->readUnsignedByte(); - $count = $this->getStack(); - - // need reference - $ref = new ArrayIterator(array_fill(0, $count, null)); - $this->pushStackByReference($ref); - - - } - -} diff --git a/PHPJava/Statements/JavaStatement_nop.php b/PHPJava/Statements/JavaStatement_nop.php deleted file mode 100644 index dacee615..00000000 --- a/PHPJava/Statements/JavaStatement_nop.php +++ /dev/null @@ -1,10 +0,0 @@ -popStack(); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_pop2.php b/PHPJava/Statements/JavaStatement_pop2.php deleted file mode 100644 index 4199b57b..00000000 --- a/PHPJava/Statements/JavaStatement_pop2.php +++ /dev/null @@ -1,11 +0,0 @@ -getCpInfo(); - - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - $class = $cpInfo[$cp->getNameAndTypeIndex()]; - - $value = $this->getStack(); - $name = $cpInfo[$class->getNameIndex()]->getString(); - - $objectref = $this->getStack(); - - $objectref->setInstance($name, $value); - } - -} diff --git a/PHPJava/Statements/JavaStatement_putstatic.php b/PHPJava/Statements/JavaStatement_putstatic.php deleted file mode 100644 index 6391ab43..00000000 --- a/PHPJava/Statements/JavaStatement_putstatic.php +++ /dev/null @@ -1,21 +0,0 @@ -getCpInfo(); - - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - - $class = $cpInfo[$cp->getNameAndTypeIndex()]; - $name = $cpInfo[$class->getNameIndex()]->getString(); - - $value = $this->getStack(); - - // set field - $this->getInvoker()->getClass()->setStatic($name, $value); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_ret.php b/PHPJava/Statements/JavaStatement_ret.php deleted file mode 100644 index d0fc4299..00000000 --- a/PHPJava/Statements/JavaStatement_ret.php +++ /dev/null @@ -1,11 +0,0 @@ -pushStack($this->getByteCodeStream()->readShort()); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_swap.php b/PHPJava/Statements/JavaStatement_swap.php deleted file mode 100644 index 78cf3752..00000000 --- a/PHPJava/Statements/JavaStatement_swap.php +++ /dev/null @@ -1,11 +0,0 @@ -getStack(); - - $paddingData = $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte(); - - $offsets = array(); - - $offsets['default'] = $this->getByteCodeStream()->readInt(); - - $lowByte = $this->getByteCodeStream()->readInt(); - $highByte = $this->getByteCodeStream()->readInt(); - - for ($i = $lowByte; $i <= $highByte; $i++) { - - $offsets[$i] = $this->getByteCodeStream()->readInt(); - - } - - if (isset($offsets[$key])) { - - // goto PC - $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); - return; - - } - - // goto default - $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); - - } - -} diff --git a/PHPJava/Statements/JavaStatement_wide.php b/PHPJava/Statements/JavaStatement_wide.php deleted file mode 100644 index a2f015e5..00000000 --- a/PHPJava/Statements/JavaStatement_wide.php +++ /dev/null @@ -1,11 +0,0 @@ -OperandStacks[] = $result; - - return $result; - - } - - public function readUnsignedByte () { - - $result = parent::readUnsignedByte(); - $this->OperandStacks[] = $result; - - return $result; - - } - - public function readInt () { - - $result = parent::readInt(); - $this->OperandStacks[] = $result; - - return $result; - - } - - public function readUnsignedInt () { - - $result = parent::readUnsignedInt(); - $this->OperandStacks[] = $result; - - return $result; - - } - - public function readShort () { - - $result = parent::readShort(); - $this->OperandStacks[] = $result; - - return $result; - - } - - public function readUnsignedShort () { - - $result = parent::readUnsignedShort(); - $this->OperandStacks[] = $result; - - return $result; - - } - - public function getOperands () { - - $operands = $this->OperandStacks; - - $this->OperandStacks = array(); - - return $operands; - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureAppendFrame.php b/PHPJava/Structures/JavaStructureAppendFrame.php deleted file mode 100644 index e8014220..00000000 --- a/PHPJava/Structures/JavaStructureAppendFrame.php +++ /dev/null @@ -1,25 +0,0 @@ -FrameType = $Class->getJavaBinaryStream()->readUnsignedByte(); - $this->OffsetDelta = $Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0, $s = $this->FrameType - 251; $i < $s; $i++) { - - $this->Locals[] = new JavaStructureVarificationTypeInfo($Class); - - } - - } - -} - diff --git a/PHPJava/Structures/JavaStructureChopFrame.php b/PHPJava/Structures/JavaStructureChopFrame.php deleted file mode 100644 index 5db9cb49..00000000 --- a/PHPJava/Structures/JavaStructureChopFrame.php +++ /dev/null @@ -1,18 +0,0 @@ -FrameType = $Class->getJavaBinaryStream()->readUnsignedByte(); - $this->OffsetDelta = $Class->getJavaBinaryStream()->readUnsignedShort(); - - } - -} - diff --git a/PHPJava/Structures/JavaStructureClass.php b/PHPJava/Structures/JavaStructureClass.php deleted file mode 100644 index 35c0f99d..00000000 --- a/PHPJava/Structures/JavaStructureClass.php +++ /dev/null @@ -1,22 +0,0 @@ -ClassIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - } - - public function getClassIndex () { - - return $this->ClassIndex; - - } - - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureClasses.php b/PHPJava/Structures/JavaStructureClasses.php deleted file mode 100644 index 665e1994..00000000 --- a/PHPJava/Structures/JavaStructureClasses.php +++ /dev/null @@ -1,64 +0,0 @@ -InnerClassInfoIndex = $InnerClassInfoIndex; - - } - - public function setOuterClassInfoIndex ($OuterClassInfoIndex) { - - $this->OuterClassInfoIndex = $OuterClassInfoIndex; - - } - - public function setInnerNameIndex ($InnerNameIndex) { - - $this->InnerNameIndex = $InnerNameIndex; - - } - - public function setInnerClassAccessFlag ($InnerClassAccessFlag) { - - $this->InnerClassAccessFlag = $InnerClassAccessFlag; - - } - - public function getInnerClassInfoIndex () { - - return $this->InnerClassInfoIndex; - - } - - public function getOuterClassInfoIndex () { - - return $this->OuterClassInfoIndex; - - } - - public function getInnerNameIndex () { - - return $this->InnerNameIndex; - - } - - public function getInnerClassAccessFlag () { - - return $this->InnerClassAccessFlag; - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureDouble.php b/PHPJava/Structures/JavaStructureDouble.php deleted file mode 100644 index 4746e349..00000000 --- a/PHPJava/Structures/JavaStructureDouble.php +++ /dev/null @@ -1,23 +0,0 @@ -HighBytes = $Class->getJavaBinaryStream()->readUnsignedInt(); - $this->LowBytes = $Class->getJavaBinaryStream()->readUnsignedInt(); - - } - - public function getBytes () { - - return ($this->HighBytes << 32) + $this->LowBytes; - - } - -} diff --git a/PHPJava/Structures/JavaStructureDoubleVariableInfo.php b/PHPJava/Structures/JavaStructureDoubleVariableInfo.php deleted file mode 100644 index dd553d8a..00000000 --- a/PHPJava/Structures/JavaStructureDoubleVariableInfo.php +++ /dev/null @@ -1,15 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureExceptionTable.php b/PHPJava/Structures/JavaStructureExceptionTable.php deleted file mode 100644 index a69eed65..00000000 --- a/PHPJava/Structures/JavaStructureExceptionTable.php +++ /dev/null @@ -1,57 +0,0 @@ -StartPc = $StartPc; - - } - - public function setEndPc ($EndPc) { - - $this->EndPc = $EndPc; - - } - - public function setHandlerPc ($HandlerPc) { - - $this->HandlerPc = $HandlerPc; - - } - - public function setCatchType ($CatchType) { - - $this->CatchType = $CatchType; - - } - public function getStartPc () { - - return $this->StartPc; - - } - - public function getEndPc () { - - return $this->EndPc; - - } - - public function getHandlerPc () { - - return $this->HandlerPc; - - } - - public function getCatchType () { - - return $this->CatchType; - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureFieldInfo.php b/PHPJava/Structures/JavaStructureFieldInfo.php deleted file mode 100644 index 4a7d58c9..00000000 --- a/PHPJava/Structures/JavaStructureFieldInfo.php +++ /dev/null @@ -1,53 +0,0 @@ -AccessFlag = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->NameIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->DescriptorIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->AttributeCount = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->AttributeCount; $i++) { - - $this->Attributes[$i] = new JavaAttributeInfo($Class); - - } - - } - - public function getAccessFlag () { - - return $this->AccessFlag; - - } - - public function getNameIndex () { - - return $this->NameIndex; - - } - - public function getDescriptorIndex () { - - return $this->DescriptorIndex; - - } - - public function getAttributes () { - - return $this->Attributes; - - } - - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureFieldRef.php b/PHPJava/Structures/JavaStructureFieldRef.php deleted file mode 100644 index 551896e2..00000000 --- a/PHPJava/Structures/JavaStructureFieldRef.php +++ /dev/null @@ -1,29 +0,0 @@ -ClassIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->NameAndTypeIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - } - - public function getClassIndex () { - - return $this->ClassIndex; - - } - - public function getNameAndTypeIndex () { - - return $this->NameAndTypeIndex; - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureFloat.php b/PHPJava/Structures/JavaStructureFloat.php deleted file mode 100644 index 553d1044..00000000 --- a/PHPJava/Structures/JavaStructureFloat.php +++ /dev/null @@ -1,21 +0,0 @@ -Bytes = $Class->getJavaBinaryStream()->readUnsignedInt(); - - } - - public function getBytes () { - - return $this->Bytes; - - } - -} diff --git a/PHPJava/Structures/JavaStructureFloatVariableInfo.php b/PHPJava/Structures/JavaStructureFloatVariableInfo.php deleted file mode 100644 index 27633640..00000000 --- a/PHPJava/Structures/JavaStructureFloatVariableInfo.php +++ /dev/null @@ -1,15 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureFullFrame.php b/PHPJava/Structures/JavaStructureFullFrame.php deleted file mode 100644 index 08b5c71b..00000000 --- a/PHPJava/Structures/JavaStructureFullFrame.php +++ /dev/null @@ -1,38 +0,0 @@ -FrameType = $Class->getJavaBinaryStream()->readUnsignedByte(); - $this->OffsetDelta = $Class->getJavaBinaryStream()->readUnsignedShort(); - $this->NumberOfLocals = $Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->NumberOfLocals; $i++) { - - $this->Locals[] = new JavaStructureVarificationTypeInfo($Class); - - } - - $this->NumberOfStackItems = $Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->NumberOfStackItems; $i++) { - - $this->Stack[] = new JavaStructureVarificationTypeInfo($Class); - - } - - } - -} - diff --git a/PHPJava/Structures/JavaStructureInteger.php b/PHPJava/Structures/JavaStructureInteger.php deleted file mode 100644 index 7266e3f0..00000000 --- a/PHPJava/Structures/JavaStructureInteger.php +++ /dev/null @@ -1,22 +0,0 @@ -Bytes = $Class->getJavaBinaryStream()->readInt(); - - - } - - public function getBytes () { - - return $this->Bytes; - - } - -} diff --git a/PHPJava/Structures/JavaStructureIntegerVariableInfo.php b/PHPJava/Structures/JavaStructureIntegerVariableInfo.php deleted file mode 100644 index ad6ed2e5..00000000 --- a/PHPJava/Structures/JavaStructureIntegerVariableInfo.php +++ /dev/null @@ -1,15 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureLineNumberTable.php b/PHPJava/Structures/JavaStructureLineNumberTable.php deleted file mode 100644 index 1906800a..00000000 --- a/PHPJava/Structures/JavaStructureLineNumberTable.php +++ /dev/null @@ -1,32 +0,0 @@ -StartPc = $StartPc; - - } - - public function setLineNumber ($LineNumber) { - - $this->LineNumber = $LineNumber; - - } - - public function getStartPc () { - - return $this->StartPc; - - } - - public function getLineNumber () { - - return $this->LineNumber; - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureLocalVariableTable.php b/PHPJava/Structures/JavaStructureLocalVariableTable.php deleted file mode 100644 index 69928b84..00000000 --- a/PHPJava/Structures/JavaStructureLocalVariableTable.php +++ /dev/null @@ -1,24 +0,0 @@ -StartPc = $Class->getJavaBinaryStream()->readUnsignedShort(); - $this->Length = $Class->getJavaBinaryStream()->readUnsignedShort(); - $this->NameIndex = $Class->getJavaBinaryStream()->readUnsignedShort(); - $this->DescriptorIndex = $Class->getJavaBinaryStream()->readUnsignedShort(); - $this->Index = $Class->getJavaBinaryStream()->readUnsignedShort(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureLong.php b/PHPJava/Structures/JavaStructureLong.php deleted file mode 100644 index b55a227a..00000000 --- a/PHPJava/Structures/JavaStructureLong.php +++ /dev/null @@ -1,28 +0,0 @@ -HighBytes = $Class->getJavaBinaryStream()->readUnsignedInt(); - //$this->LowBytes = $Class->getJavaBinaryStream()->readUnsignedInt(); - - $this->Bytes = $Class->getJavaBinaryStream()->readLong(); - - } - - public function getBytes () { - - //return ($this->HighBytes << 32) + $this->LowBytes; - return $this->Bytes; - - } - -} diff --git a/PHPJava/Structures/JavaStructureLongVariableInfo.php b/PHPJava/Structures/JavaStructureLongVariableInfo.php deleted file mode 100644 index ee752eee..00000000 --- a/PHPJava/Structures/JavaStructureLongVariableInfo.php +++ /dev/null @@ -1,15 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureMethodInfo.php b/PHPJava/Structures/JavaStructureMethodInfo.php deleted file mode 100644 index 1e694115..00000000 --- a/PHPJava/Structures/JavaStructureMethodInfo.php +++ /dev/null @@ -1,53 +0,0 @@ -AccessFlag = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->NameIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->DescriptorIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->AttributeCount = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->AttributeCount; $i++) { - - $this->Attributes[$i] = new JavaAttributeInfo($Class); - - } - - } - - public function getAccessFlag () { - - return $this->AccessFlag; - - } - - public function getNameIndex () { - - return $this->NameIndex; - - } - - public function getDescriptorIndex () { - - return $this->DescriptorIndex; - - } - - public function getAttributes () { - - return $this->Attributes; - - } - - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureMethodref.php b/PHPJava/Structures/JavaStructureMethodref.php deleted file mode 100644 index 9eae3e33..00000000 --- a/PHPJava/Structures/JavaStructureMethodref.php +++ /dev/null @@ -1,29 +0,0 @@ -ClassIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->NameAndTypeIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - } - - public function getClassIndex () { - - return $this->ClassIndex; - - } - - public function getNameAndTypeIndex () { - - return $this->NameAndTypeIndex; - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureNameAndType.php b/PHPJava/Structures/JavaStructureNameAndType.php deleted file mode 100644 index d0a08cb4..00000000 --- a/PHPJava/Structures/JavaStructureNameAndType.php +++ /dev/null @@ -1,29 +0,0 @@ -NameIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - $this->DescriptorIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - } - - public function getNameIndex () { - - return $this->NameIndex; - - } - - public function getDescriptorIndex () { - - return $this->DescriptorIndex; - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureNullVariableInfo.php b/PHPJava/Structures/JavaStructureNullVariableInfo.php deleted file mode 100644 index 7337c78f..00000000 --- a/PHPJava/Structures/JavaStructureNullVariableInfo.php +++ /dev/null @@ -1,15 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureObjectVariableInfo.php b/PHPJava/Structures/JavaStructureObjectVariableInfo.php deleted file mode 100644 index b987ab7c..00000000 --- a/PHPJava/Structures/JavaStructureObjectVariableInfo.php +++ /dev/null @@ -1,17 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - $this->cpoolIndex = $Class->getJavaBinaryStream()->readUnsignedShort(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureSameFrame.php b/PHPJava/Structures/JavaStructureSameFrame.php deleted file mode 100644 index 04a720c6..00000000 --- a/PHPJava/Structures/JavaStructureSameFrame.php +++ /dev/null @@ -1,16 +0,0 @@ -FrameType = $Class->getJavaBinaryStream()->readUnsignedByte(); - - } - -} - diff --git a/PHPJava/Structures/JavaStructureSameFrameExtended.php b/PHPJava/Structures/JavaStructureSameFrameExtended.php deleted file mode 100644 index d6398f4a..00000000 --- a/PHPJava/Structures/JavaStructureSameFrameExtended.php +++ /dev/null @@ -1,19 +0,0 @@ -FrameType = $Class->getJavaBinaryStream()->readUnsignedByte(); - $this->OffsetDelta = $Class->getJavaBinaryStream()->readUnsignedShort(); - - - } - -} - diff --git a/PHPJava/Structures/JavaStructureSameLocals1StackItemFrame.php b/PHPJava/Structures/JavaStructureSameLocals1StackItemFrame.php deleted file mode 100644 index f96e5a1c..00000000 --- a/PHPJava/Structures/JavaStructureSameLocals1StackItemFrame.php +++ /dev/null @@ -1,19 +0,0 @@ -FrameType = $Class->getJavaBinaryStream()->readUnsignedByte(); - - $this->Stack[] = new JavaStructureVarificationTypeInfo($Class); - - } - -} - diff --git a/PHPJava/Structures/JavaStructureSameLocals1StackItemFrameExtended.php b/PHPJava/Structures/JavaStructureSameLocals1StackItemFrameExtended.php deleted file mode 100644 index 7d258ad3..00000000 --- a/PHPJava/Structures/JavaStructureSameLocals1StackItemFrameExtended.php +++ /dev/null @@ -1,21 +0,0 @@ -FrameType = $Class->getJavaBinaryStream()->readUnsignedByte(); - $this->OffsetDelta = $Class->getJavaBinaryStream()->readUnsignedShort(); - - $this->Locals[] = new JavaStructureVarificationTypeInfo($Class); - - } - -} - diff --git a/PHPJava/Structures/JavaStructureStackMapFrame.php b/PHPJava/Structures/JavaStructureStackMapFrame.php deleted file mode 100644 index 42088610..00000000 --- a/PHPJava/Structures/JavaStructureStackMapFrame.php +++ /dev/null @@ -1,56 +0,0 @@ -FrameType = $Class->getJavaBinaryStream()->readUnsignedByte(); - - // back by frametype - $Class->getJavaBinaryStream()->seek(-1); - - if ($this->FrameType >= 0 && $this->FrameType <= 63) { - - $this->SameFrame = new JavaStructureSameFrame($Class); - - } else if ($this->FrameType >= 64 && $this->FrameType <= 127) { - - $this->SameLocals1StackItemFrame = new JavaStructureSameLocals1StackItemFrame($Class); - - } else if ($this->FrameType == 247) { - - $this->SameLocals1StackItemFrameExtended = new JavaStructureSameLocals1StackItemFrameExtended($Class); - - } else if ($this->FrameType >= 248 && $this->FrameType <= 250) { - - $this->ChopFrame = new JavaStructureChopFrame($Class); - - } else if ($this->FrameType == 251) { - - $this->SameFrameExtended = new JavaStructureSameFrameExtended($Class); - - } else if ($this->FrameType >= 252 && $this->FrameType <= 254) { - - $this->AppendFrame = new JavaStructureAppendFrame($Class); - - } else if ($this->FrameType == 255) { - - $this->FullFrame = new JavaStructureFullFrame($Class); - - } - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureString.php b/PHPJava/Structures/JavaStructureString.php deleted file mode 100644 index b047c8a2..00000000 --- a/PHPJava/Structures/JavaStructureString.php +++ /dev/null @@ -1,21 +0,0 @@ -StringIndex = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - } - - public function getStringIndex () { - - return $this->StringIndex; - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureTopVariableInfo.php b/PHPJava/Structures/JavaStructureTopVariableInfo.php deleted file mode 100644 index ea6d8ace..00000000 --- a/PHPJava/Structures/JavaStructureTopVariableInfo.php +++ /dev/null @@ -1,15 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureUninitializedThisVariableInfo.php b/PHPJava/Structures/JavaStructureUninitializedThisVariableInfo.php deleted file mode 100644 index ac9b308e..00000000 --- a/PHPJava/Structures/JavaStructureUninitializedThisVariableInfo.php +++ /dev/null @@ -1,15 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureUninitializedVariableInfo.php b/PHPJava/Structures/JavaStructureUninitializedVariableInfo.php deleted file mode 100644 index 8b160406..00000000 --- a/PHPJava/Structures/JavaStructureUninitializedVariableInfo.php +++ /dev/null @@ -1,17 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - $this->Offset = $Class->getJavaBinaryStream()->readUnsignedShort(); - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureUtf8.php b/PHPJava/Structures/JavaStructureUtf8.php deleted file mode 100644 index b115b52c..00000000 --- a/PHPJava/Structures/JavaStructureUtf8.php +++ /dev/null @@ -1,34 +0,0 @@ -Length = $this->Class->getJavaBinaryStream()->readUnsignedShort(); - - for ($i = 0; $i < $this->Length; $i++) { - - $this->String .= chr($this->Class->getJavaBinaryStream()->readUnsignedByte()); - - } - - } - - public function getLength () { - - return $this->Length; - - } - - public function getString () { - - return $this->String; - - } - -} \ No newline at end of file diff --git a/PHPJava/Structures/JavaStructureVerificationTypeInfo.php b/PHPJava/Structures/JavaStructureVerificationTypeInfo.php deleted file mode 100644 index 45b7f403..00000000 --- a/PHPJava/Structures/JavaStructureVerificationTypeInfo.php +++ /dev/null @@ -1,36 +0,0 @@ -Tag = $Class->getJavaBinaryStream()->readUnsignedByte(); - // back by tag - $Class->getJavaBinaryStream()->seek(-1); - - if ($this->Tag == 0) { - $this->TopVariableInfo = new JavaStructureTopVariableInfo($Class); - } else if ($this->Tag == 1) { - $this->IntegerVariableInfo = new JavaStructureIntegerVariableInfo($Class); - } else if ($this->Tag == 2) { - $this->FloatVariableInfo = new JavaStructureFloatVariableInfo($Class); - } else if ($this->Tag == 4) { - $this->LongVariableInfo = new JavaStructureLongVariableInfo($Class); - } else if ($this->Tag == 3) { - $this->DoubleVariableInfo = new JavaStructureDoubleVariableInfo($Class); - } else if ($this->Tag == 5) { - $this->NullVariableInfo = new JavaStructureNullVariableInfo($Class); - } else if ($this->Tag == 6) { - $this->UninitializedThisVariableInfo = new JavaStructureUninitializedThisVariableInfo($Class); - } else if ($this->Tag == 7) { - $this->ObjectVariableInfo = new JavaStructureObjectVariableInfo($Class); - } else if ($this->Tag == 8) { - $this->UninitializedVariableInfo = new JavaStructureUninitializedVariableInfo($Class); - } - -} - -} - diff --git a/PHPJava/Types/JavaTypeBoolean.php b/PHPJava/Types/JavaTypeBoolean.php deleted file mode 100644 index 0d3c82f1..00000000 --- a/PHPJava/Types/JavaTypeBoolean.php +++ /dev/null @@ -1,5 +0,0 @@ -= 0 && $bits[$index] === '1'; $index--) { - - // nop - - } - - if ($index === -1) { - - throw new BinaryToolsException('Passed parameter was overflow'); - - } - - $bits[$index] = '1'; - - for ($i = $index + 1; $i < $bitSize; $i++) { - - $bits[$i] = '0'; - - } - - - return $bits; - - } - - public final static function toSigned ($value, $bytes) { - - $convert = base_convert((string) $value, 10, 2); - $bitSize = strlen($convert); - - if ($bitSize < ($bytes * 8) || $convert[0] !== '1') { - - return $value; - - } - - return '-' . base_convert(self::addOneBit(self::reverseBits($convert)), 2, 10); - - } - - public final static function negate ($value, $bytes) { - - $value = base_convert((string) $value, 10, 2); - - if (sprintf('%0' . $bytes . 's', $value) === str_repeat('0', $bytes)) { - - // zero number was overflow - return '0'; - - } - - $convert = self::addOneBit(self::reverseBits($value)); - - if ($convert[0] === '1') { - - $convert = '-' . base_convert($convert, 2, 10); - - } else { - - $convert = base_convert($convert, 2, 10); - - } - - return $convert; - - } - - public final static function multiply ($value1, $value2, $bytes) { - - if (function_exists('gmp_mul')) { - - $a = gmp_init($value1); - $b = gmp_init($value2); - - return gmp_strval(gmp_mul($a, $b)); - - } else if (function_exists('bcmul')) { - - return bcmul($value1, $value2); - - } else { - - throw new BinaryToolsException('Cannot multiply values.'); - - } - - } - - public final static function add ($value1, $value2, $bytes) { - - if (function_exists('gmp_add')) { - - $a = gmp_init($value1); - $b = gmp_init($value2); - - return gmp_strval(gmp_add($a, $b)); - - } else if (function_exists('bcadd')) { - - return bcadd($value1, $value2); - - } else { - - throw new BinaryToolsException('Cannot add values.'); - - } - - } - - public final static function sub ($value1, $value2, $bytes) { - - if (function_exists('gmp_sub')) { - - $a = gmp_init($value1); - $b = gmp_init($value2); - - return gmp_strval(gmp_sub($a, $b)); - - } else if (function_exists('bcsub')) { - - return bcsub($value1, $value2); - - } else { - - throw new BinaryToolsException('Cannot sub values.'); - - } - - } - - public final static function div ($value1, $value2, $bytes) { - - if (function_exists('gmp_div')) { - - $a = gmp_init($value1); - $b = gmp_init($value2); - - return gmp_strval(gmp_div($a, $b)); - - } else if (function_exists('bcdiv')) { - - return bcdiv($value1, $value2); - - } else { - - throw new BinaryToolsException('Cannot div values.'); - - } - - } - - public final static function shiftLeft ($value1, $value2, $bytes) { - - $bits = base_convert($value1, 10, 2); - - $bits = sprintf('%0' . ($bytes * 8) . 's', $bits . str_repeat('0', $value2)); - - return base_convert($bits, 2, 10); - - } - - public final static function unsignedShiftRight ($value1, $value2, $bytes) { - - $bits = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); - - $bits = sprintf('%0' . ($bytes * 8) . 's', substr($bits, 0, strlen($bits) - $value1)); - - if ($bits === '') { - - $bits = '0'; - - } - - return base_convert($bits, 2, 10); - - } - - public final static function shiftRight ($value1, $value2, $bytes) { - - return self::toSigned(self::unsignedShiftRight($value1, $value2, $bytes), $bytes); - - } - - public final static function orBits ($value1, $value2, $bytes) { - - $value1 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value1, 10, 2)); - $value2 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); - - $build = ''; - for ($i = 0; $i < $bytes * 8; $i++) { - - if ($value1[$i] === '1' || $value2[$i] == '1') { - - $build .= '1'; - - } else { - - $build .= '0'; - - } - - } - - return base_convert($build, 2, 10); - - } - - public final static function xorBits ($value1, $value2, $bytes) { - - $value1 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value1, 10, 2)); - $value2 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); - - $build = ''; - for ($i = 0; $i < $bytes * 8; $i++) { - - if (($value1[$i] === '1' && $value2[$i] === '0') || - ($value1[$i] === '0' && $value2[$i] === '1')) { - - $build .= '1'; - - } else { - - $build .= '0'; - - } - - } - - return base_convert($build, 2, 10); - - } - - public final static function andBits ($value1, $value2, $bytes) { - - $value1 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value1, 10, 2)); - $value2 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); - - $build = ''; - for ($i = 0; $i < $bytes * 8; $i++) { - - if ($value1[$i] === '1' && $value2[$i] === '1') { - - $build .= '1'; - - } else { - - $build .= '0'; - - } - - } - - return base_convert($build, 2, 10); - - } - - public final static function convertDoubleToIEEE754 ($doubleValue, $rounded = 8) { - - $doubleValue = sprintf('%063s', base_convert($doubleValue, 10, 2)); - - $sign = $doubleValue[0]; - $exponent = substr($doubleValue, 1, 10); - $fraction = substr($doubleValue, 11); - - // double scale - $scale = 52; - - $fractionData = 0; - for ($i = 0; $i < 52; $i++) { - $fractionData = bcadd($fractionData, bcmul($fraction[$i], bcpow(2, -1 * ($i + 1), $scale), $scale), $scale); - } - - // calc sign - $operand1 = -1 * $sign; - - // calc fraction - $operand2 = bcadd(1, $fractionData, $scale); - - // calc exponent and bias(?) - $operand3 = bcpow(2, bindec($exponent), $scale); - - return bcmul(-2, bcmul(bcmul($operand1, $operand2, $scale), $operand3, $scale), $rounded); - - } - -} diff --git a/PHPJava/Utils/BinaryToolsException.php b/PHPJava/Utils/BinaryToolsException.php deleted file mode 100644 index a14c0157..00000000 --- a/PHPJava/Utils/BinaryToolsException.php +++ /dev/null @@ -1,3 +0,0 @@ -getMethodInvoker()->main(array(999, 888)); -``` - -上記のようにして、 `test.class` のmainメソッドを呼び出すことが可能となります。 -(mainメソッドの引数はString[]を取るため、配列型を渡しています。) - -また、Javaのバイトコードではコンストラクタの定義は``とされており、PHPで呼び出すのは -`call_user_func`や`$javaClass->{''}()`等としないと表現が難しいですが、 -PHPJavaでは、下記の方法でJavaのコンストラクタを簡易的に呼び出す方法を提供しています。 - -```php -construct(); - -// 静的なメソッド -$invoker->main(array(999, 888)); -// または -$javaClass->getMethodInvoker()->main(array(999, 888)); - - -// 動的なメソッド -$invoker->abc(1234); -``` - - - -## メンバの呼び出しについて -PHPJavaではstaticであるかどうかを区別しません。 -メンバの呼び出しは非常に単純で、下記のように実行すると、Javaのクラスで定義されているメンバを取得することが可能です。 - -```php -construct(); - -// Java側で `String stringValue="Hello World"` と定義されていた場合、 -// Hello Worldと出力をします。 -var_dump((string) $invoker->stringValue); - -// クラスを調べるとjava\lang\Stringという扱いになります。 -var_dump(get_class($invoker->stringValue)); - -// プリミティブな型の場合JavaType*が出力されます。 -// Java側で`int intvalue=1111`と定義されていた場合下記の例ではJavaTypeIntが出力されます。 -var_dump(get_class($invoker->intValue)); - -// なお、値を取得すると1111となります。 -var_dump((string) $invoker>intValue); -var_dump($invoker->intValue->getValue()); - -``` - - -## 型の定義について -PHPJavaでは、呼び出すメソッドが静的、あるいは動的かを区別しません。 -これは、PHPで簡易的にJavaのメソッドを呼び出すためです。 - -また、PHPは動的型付けのため、PHPJavaではJavaへの引数においても厳密に比較しません。 -したがって、Javaへ引数を渡す際には暗黙の型変換が行われます。 - -また、PHPのint型の最大値が32bit及び64bit環境により異なることから、 -巨大な数字の計算時には`bcmath関数`または `gmp関数` を用いて計算を行います。 -(優先的に`bcmath関数`を使用するようにしており利用できなければ、`gmp関数`を使用するようにしています。) - -bcmath関数: http://php.net/manual/ja/book.bc.php - -gmp関数: http://php.net/manual/ja/ref.gmp.php - -なお、下記はJavaのメソッドを実行した際に返却される型の情報です。 -null以外の全ての値は`JavaType*`オブジェクトとして適切に扱われます。 - -|Javaの型 |PHPの型 | -|:-------------:|:-------------:| -|null |null | -|boolean |JavaTypeBoolean | -|char |JavaTypeChar | -|byte |JavaTypeByte | -|short |JavaTypeShort | -|int |JavaTypeInt | -|long |JavaTypeLong | -|float |JavaTypeFloat | -|double |JavaTypeDouble | - -## エミュレーションについて - -PHPJavaではJavaにデフォルトでビルトインされている機能は一切使用していません。 -つまり、PHPJava単体で、Javaをエミュレーションすることが可能となります。 - - - -# Javaにおけるスレッドの扱いについて -Javaにはマルチスレッドを扱うための機能が備わっていますが、PHP 5.6現在ではそのような機能はありません。 -Javaにおけるスレッドの扱いをPHPJavaで表現するには、pthreads(http://php.net/manual/ja/book.pthreads.php) の導入を必要とします。 - -# TODO - -- 全ニーモニックへの対応 -- JARへの対応 -- アノテーションへの対応 -- PHPDocの追加 \ No newline at end of file +TBD diff --git a/Test.class b/Test.class deleted file mode 100644 index 7e24ece7e763441059dcbc29ed2114a3263c6a53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1852 zcmaJ>TT@$A6#h0j$vK>aLJx#XAv9Imh9FHpa-551;Pk`51gH4Mpp zSi>0&Z4!=XxGeW8Iz}<3VO;88)i9x9Qp%^Kr)d>4I$EUtI~ry+gjLK5h&!C)oXebJ zoDl(IV#QoHL$(>e6$+*W=fu0_c&uW4I4#g{ zl!8l{m>soJWQfk*$4$9>AV7MTU@`{}A|QuO>9fy+GdN4t5CuUwq;^#LXH=~v*HanW zo=L>wX)86dv1}#Nu>`p@_U}L5fAGcr{oVchkL3FKPXcx0Ov7)jW^6NU`6IXe$&ZqL z0r#k7+X??dB4tMfYD%uBBP-T2nXLVfIvi3gvhjj#`1V@bT4kvd8G7*MDUT&WGwg*l z^(}Li9Z{RR?66osO-d!3X()j)S#Xz`Oj>aU*BL0UU3obRJkx&*?aM4m$67j3481N; zt|(j9`Xpo8Ys}!qoAboEDt?5r&HrqBt~x4mSfRg4yn@cWRfUiLT~xYYI4Abty1ol_ z(mCi;HU@W~`Ld|=DR+u+({WG`ZaPE(DaAvda<>HUmEdPZXy`fgC4D-&6|b@b_czGy z!NWVN`kY=xS^AD4att1DaF-GL<$q3@LwA$YIF?2A!WQZYYx2-dcwEAcf-kR5rN{#+C+|z#AaSgxn zJMcSh3NIp}1yRw4ArVBJk*$ajW9&f^=WxP>#ETo!L#WS{B0flS!DMl`6G8miCf8NOHsmx z${&^3_LA*_%tb`rf8ZT?D(m4SPLs-YHt+_iTt_YL=F(76@f;3O%~#R=?;AMFP~~vf YM4!NI_@AKR=o3)r(@C`+s#V~^KdixwK>z>% diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..8ec3d3f5 --- /dev/null +++ b/composer.json @@ -0,0 +1,20 @@ +{ + "name": "memory/php-java", + "description": "JVM emulator by PHP", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "memory" + } + ], + "require": {}, + "autoload": { + "psr-4": { + "PHPJava\\": "src/" + } + }, + "require-dev": { + "phpunit/phpunit": "^8.0" + } +} diff --git a/license b/license new file mode 100644 index 00000000..4d98acb7 --- /dev/null +++ b/license @@ -0,0 +1,19 @@ +Copyright (c) 2019 memory + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties deleted file mode 100644 index 08c19796..00000000 --- a/nbproject/private/private.properties +++ /dev/null @@ -1,4 +0,0 @@ -copy.src.on.open=false -index.file=index.php -run.as=SCRIPT -url=http://localhost/PHPJar/ diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml deleted file mode 100644 index 6807a2ba..00000000 --- a/nbproject/private/private.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/nbproject/project.properties b/nbproject/project.properties deleted file mode 100644 index d37ef956..00000000 --- a/nbproject/project.properties +++ /dev/null @@ -1,7 +0,0 @@ -include.path=${php.global.include.path} -php.version=PHP_54 -source.encoding=UTF-8 -src.dir=. -tags.asp=false -tags.short=false -web.root=. diff --git a/nbproject/project.xml b/nbproject/project.xml deleted file mode 100644 index 4795c601..00000000 --- a/nbproject/project.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - org.netbeans.modules.php.project - - - PHPJava - - - diff --git a/nbproject/private/config.properties b/src/.gitkeep similarity index 100% rename from nbproject/private/config.properties rename to src/.gitkeep diff --git a/src/constants/.gitkeep b/src/constants/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/core/.gitkeep b/src/core/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/emulator/java/io/.gitkeep b/src/emulator/java/io/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/emulator/java/lang/.gitkeep b/src/emulator/java/lang/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/exceptions/.gitkeep b/src/exceptions/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/kernel/attributes/.gitkeep b/src/kernel/attributes/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/kernel/mnemonics/.gitkeep b/src/kernel/mnemonics/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/kernel/structures/.gitkeep b/src/kernel/structures/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/kernel/types/.gitkeep b/src/kernel/types/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/utilities/.gitkeep b/src/utilities/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test.java b/test.java deleted file mode 100644 index fe561e60..00000000 --- a/test.java +++ /dev/null @@ -1,288 +0,0 @@ -class Test { - - long z = -22222222222222222L; - static int c = 100; - static String b = "Hello World"; - - /** - * test for "Integer" value - * - * @param value - * @return - */ - public int testInt (int value) { - - System.out.println(this.testPrivateInteger(value)); - return value; - } - - /** - * test for "Short" value - * - * @param value - * @return - */ - public short testShort (short value) { - return value; - } - - /** - * test for "Long" value - * - * @param value - * @return - */ - public long testLong (long value) { - return value; - } - - /** - * test for "Float" value - * - * @param value - * @return - */ - public float testLong (float value) { - return value; - } - - /** - * test for "Double" value - * - * @param value - * @return - */ - public double testLong (double value) { - return value; - } - - /** - * test for "Char" value - * - * @param value - * @return - */ - public char testChar (char value) { - return value; - } - - /** - * test for "Byte" value - * - * @param value - * @return - */ - public byte testByte (byte value) { - return value; - } - - /** - * test for "Boolean" value - * - * @param value - * @return - */ - public boolean testBoolean (boolean value) { - return value; - } - - /** - * test for "String" value - * - * @param value - * @return - */ - public String testString (String value) { - return value; - } - - /** - * main method - * - * @param args - */ - public static void main (String[] args) { - - String x = "String"; - - // new instance - Test _a = new Test(); - - // test call - // _a.javaTest(); - - - int t = 2; - //t *= 1; - //t = ~1; - t <<= 1; - System.out.println(t); - t >>= 1; - System.out.println(t); - t -= 1; - System.out.println(t); - t += 1; - System.out.println(t); - t = 1; - System.out.println(t); - t >>>= 1; - System.out.println(t); - t |= 1; - System.out.println(t); - t &= 1; - System.out.println(t); - t = 345321; - System.out.println((short) t); - - long t1 = 111; - t1 *= 1; - t1 = ~1; - t1 <<= 1; - t1 >>= 1; - t1 -= 1; - t1 += 1; - t1 = 1; - t1 >>>= 1; - t1 |= 1; - t1 &= 1; - - double t2 = 2; - t2 *= 1; - t2 = ~1; - t2 -= 1; - t2 += 1; - t2 = 1; - - /*boolean _b = false; - _b = true && true; - _b = true && false; - _b = true || true; - _b = true || false;*/ - - try { - - for (int i = 0; i < Test.c; i++) { - - StringBuilder b = new StringBuilder(); - - switch (i + 1) { - - case -1: - - b.append("a"); - - break; - case 1: - - b.append("b"); - - break; - case 2: - - b.append("c"); - - break; - - } - - if (!x.equals(i + "")) { - - - System.out.println("Test:" + Test.b + "/" + x + "*****" + i + "/" + b); - - } - - if (i == 10) { - - throw new NullPointerException(); - - } - - } - - } catch (NullPointerException e) { - - System.out.println("ぬるぷっぷー"); - - } - - String[] test = {"4", "5", "6"}; - for (String i : test) { - - System.out.println(i); - - } - - int[] test2 = {1, 2, 3}; - for (int i : test2) { - - System.out.println(i); - - } - - long[] test3 = {1L, 2L, 3L}; - for (long i : test3) { - - System.out.println(i); - - } - - double[] test4 = {3.4, 3.5, 3.6, 81263.12312321, -99}; - for (double i : test4) { - - System.out.println(i); - - } - - } - - public static String test (int n, String m, int l, int i, int v, int k) { - - int j = 1; - - for (; j <= 10; j++) { - - j++; - - } - - return "Java emulate by php " + n + "/" + m + "/" + l + "/" + i + "/" + v + "/" + k + "/" + j; - - } - - private int testPrivateInteger (int value) { - return value + 1 * 2 + 3; - } - - /*public void javaTest () { - - testClass _c = new testClass(); - _c.t(); - - } - - public class testClass { - - public void t () { - - System.out.println("testClass.t method." + Test.this.z); - - testClass2 _c = new testClass2(); - _c.t(); - - - } - - public class testClass2 { - - public void t () { - - System.out.println("testClass2.t method." + Test.this.z); - - } - - } - - }*/ - -} \ No newline at end of file diff --git a/test.php b/test.php deleted file mode 100644 index 48c8c2a8..00000000 --- a/test.php +++ /dev/null @@ -1,81 +0,0 @@ -construct(); - - // 動的メンバコールテスト - var_dump(get_class($invoker->z)); - - // 動的メンバ値変更&コールテスト - $invoker->z = 9999; - - // 格納されている値 - var_dump($invoker->z->getValue()); - - // 実際の値 - var_dump((string) $invoker->z); - - // 静的メンバコールテスト - var_dump(get_class($invoker->b)); - - // toString - var_dump((string) $invoker->b); - - // メインメソッドを呼ぶ - // $invoker->getMethodInvoker()->main(array(999, 888)); - - // testIntを呼ぶ - var_dump($invoker->testInt(1111)); - - // testIntを呼ぶ - var_dump((string) $invoker->testInt(1111)); - - // testString(java/lang/String)を呼ぶ - var_dump($invoker->testString("8888")); - // - // testString(java/lang/String)を呼ぶ - var_dump((string) $invoker->testString("8888")); - - $javaClass->trace(); - -/* - // $a = new JavaArchive('JavaTest/dist/JavaTest.jar'); - - // var_dump($a->getClass('javatest.JavaTest')->main(array(999, 888))); - $manipulator = new JavaManipulator(); - - $invoker = $manipulator->registerClass(new JavaClass('test.class')); - - // call main method - var_dump($invoker->main(array(999, 888))); - - // var_dump($invoker->test(999, 999, 999, 999, 999, 999)); - - $invoker->getClass()->trace();*/ - -} catch (Exception $e) { - - $javaClass->trace(); - - var_dump($e->getMessage(), $e->getFile(), $e->getLine()); - -} \ No newline at end of file diff --git a/tests/.gitkeep b/tests/.gitkeep new file mode 100644 index 00000000..e69de29b From dfe4d386d5e806998afdd6ec3c5c38ff84675d7d Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 00:37:45 +0900 Subject: [PATCH 02/96] Add types --- src/kernel/types/.gitkeep | 0 src/kernel/types/Boolean.php | 8 ++++++++ src/kernel/types/Byte.php | 8 ++++++++ src/kernel/types/Char.php | 8 ++++++++ src/kernel/types/Double.php | 8 ++++++++ src/kernel/types/Float.php | 8 ++++++++ src/kernel/types/Int.php | 8 ++++++++ src/kernel/types/Long.php | 8 ++++++++ src/kernel/types/Short.php | 8 ++++++++ src/kernel/types/Type.php | 22 ++++++++++++++++++++++ 10 files changed, 86 insertions(+) delete mode 100644 src/kernel/types/.gitkeep create mode 100644 src/kernel/types/Boolean.php create mode 100644 src/kernel/types/Byte.php create mode 100644 src/kernel/types/Char.php create mode 100644 src/kernel/types/Double.php create mode 100644 src/kernel/types/Float.php create mode 100644 src/kernel/types/Int.php create mode 100644 src/kernel/types/Long.php create mode 100644 src/kernel/types/Short.php create mode 100644 src/kernel/types/Type.php diff --git a/src/kernel/types/.gitkeep b/src/kernel/types/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/kernel/types/Boolean.php b/src/kernel/types/Boolean.php new file mode 100644 index 00000000..4950be77 --- /dev/null +++ b/src/kernel/types/Boolean.php @@ -0,0 +1,8 @@ +value = $value; + } + + public function getValue() + { + return $this->value; + } + + public function __toString() + { + return (string) $this->getValue(); + } +} From f1504d4ff2d656b595cd06a10d261a828fc14737 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 01:03:15 +0900 Subject: [PATCH 03/96] Add mnemonic lists --- composer.json | 4 +- src/kernel/maps/Map.php | 29 +++++ src/kernel/maps/Mnemonics.php | 212 ++++++++++++++++++++++++++++++++++ 3 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 src/kernel/maps/Map.php create mode 100644 src/kernel/maps/Mnemonics.php diff --git a/composer.json b/composer.json index 8ec3d3f5..b40837fb 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,9 @@ "name": "memory" } ], - "require": {}, + "require": { + "php": ">=7.2" + }, "autoload": { "psr-4": { "PHPJava\\": "src/" diff --git a/src/kernel/maps/Map.php b/src/kernel/maps/Map.php new file mode 100644 index 00000000..65ccec90 --- /dev/null +++ b/src/kernel/maps/Map.php @@ -0,0 +1,29 @@ +getConstants(); + if (($key = array_search($value, $constants, true)) !== false) { + return $key; + } + } catch (\ReflectionException $e) { + } + return null; + } + + public function getValues(): array + { + + try { + $reflectionClass = new \ReflectionClass($this); + return array_values($reflectionClass->getConstants()); + } catch (\ReflectionException $e) { + } + return []; + } +} diff --git a/src/kernel/maps/Mnemonics.php b/src/kernel/maps/Mnemonics.php new file mode 100644 index 00000000..8bf9ac67 --- /dev/null +++ b/src/kernel/maps/Mnemonics.php @@ -0,0 +1,212 @@ + Date: Sat, 23 Feb 2019 11:23:22 +0900 Subject: [PATCH 04/96] Copied mnemonics --- src/exceptions/.gitkeep | 0 src/exceptions/NotImplementedException.php | 7 ++ src/kernel/core/Accumulator.php | 7 ++ src/kernel/mnemonics/.gitkeep | 0 src/kernel/mnemonics/MnemonicInterface.php | 8 ++ src/kernel/mnemonics/_aaload.php | 28 ++++++ src/kernel/mnemonics/_aastore.php | 23 +++++ src/kernel/mnemonics/_aconst_null.php | 19 ++++ src/kernel/mnemonics/_aload.php | 21 +++++ src/kernel/mnemonics/_aload_0.php | 19 ++++ src/kernel/mnemonics/_aload_1.php | 20 ++++ src/kernel/mnemonics/_aload_2.php | 19 ++++ src/kernel/mnemonics/_aload_3.php | 19 ++++ src/kernel/mnemonics/_anewarray.php | 28 ++++++ src/kernel/mnemonics/_areturn.php | 16 ++++ src/kernel/mnemonics/_arraylength.php | 18 ++++ src/kernel/mnemonics/_astore.php | 17 ++++ src/kernel/mnemonics/_astore_0.php | 16 ++++ src/kernel/mnemonics/_astore_1.php | 16 ++++ src/kernel/mnemonics/_astore_2.php | 16 ++++ src/kernel/mnemonics/_astore_3.php | 16 ++++ src/kernel/mnemonics/_athrow.php | 35 +++++++ src/kernel/mnemonics/_baload.php | 15 +++ src/kernel/mnemonics/_bastore.php | 15 +++ src/kernel/mnemonics/_bipush.php | 16 ++++ src/kernel/mnemonics/_breakpoint.php | 15 +++ src/kernel/mnemonics/_caload.php | 15 +++ src/kernel/mnemonics/_castore.php | 15 +++ src/kernel/mnemonics/_checkcast.php | 15 +++ src/kernel/mnemonics/_d2f.php | 15 +++ src/kernel/mnemonics/_d2i.php | 15 +++ src/kernel/mnemonics/_d2l.php | 15 +++ src/kernel/mnemonics/_dadd.php | 19 ++++ src/kernel/mnemonics/_daload.php | 22 +++++ src/kernel/mnemonics/_dastore.php | 23 +++++ src/kernel/mnemonics/_dcmpg.php | 15 +++ src/kernel/mnemonics/_dcmpl.php | 15 +++ src/kernel/mnemonics/_dconst_0.php | 16 ++++ src/kernel/mnemonics/_dconst_1.php | 16 ++++ src/kernel/mnemonics/_ddiv.php | 15 +++ src/kernel/mnemonics/_dload.php | 20 ++++ src/kernel/mnemonics/_dload_0.php | 15 +++ src/kernel/mnemonics/_dload_1.php | 15 +++ src/kernel/mnemonics/_dload_2.php | 15 +++ src/kernel/mnemonics/_dload_3.php | 15 +++ src/kernel/mnemonics/_dmul.php | 21 +++++ src/kernel/mnemonics/_dneg.php | 15 +++ src/kernel/mnemonics/_drem.php | 15 +++ src/kernel/mnemonics/_dreturn.php | 16 ++++ src/kernel/mnemonics/_dstore.php | 22 +++++ src/kernel/mnemonics/_dstore_0.php | 16 ++++ src/kernel/mnemonics/_dstore_1.php | 16 ++++ src/kernel/mnemonics/_dstore_2.php | 16 ++++ src/kernel/mnemonics/_dstore_3.php | 16 ++++ src/kernel/mnemonics/_dsub.php | 19 ++++ src/kernel/mnemonics/_dup.php | 16 ++++ src/kernel/mnemonics/_dup2.php | 15 +++ src/kernel/mnemonics/_dup2_x1.php | 15 +++ src/kernel/mnemonics/_dup2_x2.php | 15 +++ src/kernel/mnemonics/_dup_x1.php | 15 +++ src/kernel/mnemonics/_dup_x2.php | 15 +++ src/kernel/mnemonics/_f2d.php | 15 +++ src/kernel/mnemonics/_f2i.php | 15 +++ src/kernel/mnemonics/_f2l.php | 15 +++ src/kernel/mnemonics/_fadd.php | 15 +++ src/kernel/mnemonics/_faload.php | 15 +++ src/kernel/mnemonics/_fastore.php | 15 +++ src/kernel/mnemonics/_fcmpg.php | 15 +++ src/kernel/mnemonics/_fcmpl.php | 15 +++ src/kernel/mnemonics/_fconst_0.php | 15 +++ src/kernel/mnemonics/_fconst_1.php | 15 +++ src/kernel/mnemonics/_fconst_2.php | 15 +++ src/kernel/mnemonics/_fdiv.php | 15 +++ src/kernel/mnemonics/_fload.php | 15 +++ src/kernel/mnemonics/_fload_0.php | 15 +++ src/kernel/mnemonics/_fload_1.php | 15 +++ src/kernel/mnemonics/_fload_2.php | 15 +++ src/kernel/mnemonics/_fload_3.php | 15 +++ src/kernel/mnemonics/_fmul.php | 15 +++ src/kernel/mnemonics/_fneg.php | 15 +++ src/kernel/mnemonics/_frem.php | 15 +++ src/kernel/mnemonics/_freturn.php | 16 ++++ src/kernel/mnemonics/_fstore.php | 15 +++ src/kernel/mnemonics/_fstore_0.php | 15 +++ src/kernel/mnemonics/_fstore_1.php | 15 +++ src/kernel/mnemonics/_fstore_2.php | 15 +++ src/kernel/mnemonics/_fstore_3.php | 15 +++ src/kernel/mnemonics/_fsub.php | 15 +++ src/kernel/mnemonics/_getfield.php | 32 +++++++ src/kernel/mnemonics/_getstatic.php | 49 ++++++++++ src/kernel/mnemonics/_goto.php | 18 ++++ src/kernel/mnemonics/_goto_w.php | 15 +++ src/kernel/mnemonics/_i2b.php | 15 +++ src/kernel/mnemonics/_i2c.php | 15 +++ src/kernel/mnemonics/_i2d.php | 15 +++ src/kernel/mnemonics/_i2f.php | 15 +++ src/kernel/mnemonics/_i2l.php | 15 +++ src/kernel/mnemonics/_i2s.php | 18 ++++ src/kernel/mnemonics/_iadd.php | 19 ++++ src/kernel/mnemonics/_iaload.php | 19 ++++ src/kernel/mnemonics/_iand.php | 19 ++++ src/kernel/mnemonics/_iastore.php | 20 ++++ src/kernel/mnemonics/_iconst_0.php | 16 ++++ src/kernel/mnemonics/_iconst_1.php | 16 ++++ src/kernel/mnemonics/_iconst_2.php | 16 ++++ src/kernel/mnemonics/_iconst_3.php | 16 ++++ src/kernel/mnemonics/_iconst_4.php | 16 ++++ src/kernel/mnemonics/_iconst_5.php | 16 ++++ src/kernel/mnemonics/_iconst_m1.php | 16 ++++ src/kernel/mnemonics/_idiv.php | 15 +++ src/kernel/mnemonics/_if_acmpeq.php | 25 +++++ src/kernel/mnemonics/_if_acmpne.php | 25 +++++ src/kernel/mnemonics/_if_icmpeq.php | 15 +++ src/kernel/mnemonics/_if_icmpge.php | 26 ++++++ src/kernel/mnemonics/_if_icmpgt.php | 26 ++++++ src/kernel/mnemonics/_if_icmple.php | 15 +++ src/kernel/mnemonics/_if_icmplt.php | 24 +++++ src/kernel/mnemonics/_if_icmpne.php | 25 +++++ src/kernel/mnemonics/_ifeq.php | 25 +++++ src/kernel/mnemonics/_ifge.php | 15 +++ src/kernel/mnemonics/_ifgt.php | 15 +++ src/kernel/mnemonics/_ifle.php | 15 +++ src/kernel/mnemonics/_iflt.php | 15 +++ src/kernel/mnemonics/_ifne.php | 24 +++++ src/kernel/mnemonics/_ifnonnull.php | 15 +++ src/kernel/mnemonics/_ifnull.php | 15 +++ src/kernel/mnemonics/_iinc.php | 19 ++++ src/kernel/mnemonics/_iload.php | 18 ++++ src/kernel/mnemonics/_iload_0.php | 16 ++++ src/kernel/mnemonics/_iload_1.php | 16 ++++ src/kernel/mnemonics/_iload_2.php | 16 ++++ src/kernel/mnemonics/_iload_3.php | 16 ++++ src/kernel/mnemonics/_impdep1.php | 15 +++ src/kernel/mnemonics/_impdep2.php | 15 +++ src/kernel/mnemonics/_imul.php | 19 ++++ src/kernel/mnemonics/_ineg.php | 18 ++++ src/kernel/mnemonics/_instanceof.php | 15 +++ src/kernel/mnemonics/_invokedynamic.php | 15 +++ src/kernel/mnemonics/_invokeinterface.php | 15 +++ src/kernel/mnemonics/_invokespecial.php | 38 ++++++++ src/kernel/mnemonics/_invokestatic.php | 44 +++++++++ src/kernel/mnemonics/_invokevirtual.php | 66 +++++++++++++ src/kernel/mnemonics/_ior.php | 19 ++++ src/kernel/mnemonics/_irem.php | 15 +++ src/kernel/mnemonics/_ireturn.php | 19 ++++ src/kernel/mnemonics/_ishl.php | 19 ++++ src/kernel/mnemonics/_ishr.php | 20 ++++ src/kernel/mnemonics/_istore.php | 17 ++++ src/kernel/mnemonics/_istore_0.php | 16 ++++ src/kernel/mnemonics/_istore_1.php | 16 ++++ src/kernel/mnemonics/_istore_2.php | 16 ++++ src/kernel/mnemonics/_istore_3.php | 16 ++++ src/kernel/mnemonics/_isub.php | 19 ++++ src/kernel/mnemonics/_iushr.php | 19 ++++ src/kernel/mnemonics/_ixor.php | 19 ++++ src/kernel/mnemonics/_jsr.php | 15 +++ src/kernel/mnemonics/_jsr_w.php | 15 +++ src/kernel/mnemonics/_l2d.php | 15 +++ src/kernel/mnemonics/_l2f.php | 15 +++ src/kernel/mnemonics/_l2i.php | 15 +++ src/kernel/mnemonics/_ladd.php | 19 ++++ src/kernel/mnemonics/_laload.php | 22 +++++ src/kernel/mnemonics/_land.php | 19 ++++ src/kernel/mnemonics/_lastore.php | 23 +++++ src/kernel/mnemonics/_lcmp.php | 15 +++ src/kernel/mnemonics/_lconst_0.php | 16 ++++ src/kernel/mnemonics/_lconst_1.php | 16 ++++ src/kernel/mnemonics/_ldc.php | 45 +++++++++ src/kernel/mnemonics/_ldc2_w.php | 20 ++++ src/kernel/mnemonics/_ldc_w.php | 15 +++ src/kernel/mnemonics/_ldiv.php | 15 +++ src/kernel/mnemonics/_lload.php | 18 ++++ src/kernel/mnemonics/_lload_0.php | 15 +++ src/kernel/mnemonics/_lload_1.php | 15 +++ src/kernel/mnemonics/_lload_2.php | 15 +++ src/kernel/mnemonics/_lload_3.php | 15 +++ src/kernel/mnemonics/_lmul.php | 19 ++++ src/kernel/mnemonics/_lneg.php | 15 +++ src/kernel/mnemonics/_lookupswitch.php | 43 +++++++++ src/kernel/mnemonics/_lor.php | 19 ++++ src/kernel/mnemonics/_lrem.php | 15 +++ src/kernel/mnemonics/_lreturn.php | 16 ++++ src/kernel/mnemonics/_lshl.php | 19 ++++ src/kernel/mnemonics/_lshr.php | 19 ++++ src/kernel/mnemonics/_lstore.php | 17 ++++ src/kernel/mnemonics/_lstore_0.php | 15 +++ src/kernel/mnemonics/_lstore_1.php | 15 +++ src/kernel/mnemonics/_lstore_2.php | 15 +++ src/kernel/mnemonics/_lstore_3.php | 15 +++ src/kernel/mnemonics/_lsub.php | 19 ++++ src/kernel/mnemonics/_lushr.php | 19 ++++ src/kernel/mnemonics/_lxor.php | 15 +++ src/kernel/mnemonics/_monitorenter.php | 15 +++ src/kernel/mnemonics/_monitorexit.php | 15 +++ src/kernel/mnemonics/_multianewarray.php | 15 +++ src/kernel/mnemonics/_new.php | 104 +++++++++++++++++++++ src/kernel/mnemonics/_newarray.php | 22 +++++ src/kernel/mnemonics/_nop.php | 15 +++ src/kernel/mnemonics/_pop.php | 16 ++++ src/kernel/mnemonics/_pop2.php | 15 +++ src/kernel/mnemonics/_putfield.php | 25 +++++ src/kernel/mnemonics/_putstatic.php | 26 ++++++ src/kernel/mnemonics/_ret.php | 15 +++ src/kernel/mnemonics/_return.php | 16 ++++ src/kernel/mnemonics/_saload.php | 15 +++ src/kernel/mnemonics/_sastore.php | 15 +++ src/kernel/mnemonics/_sipush.php | 16 ++++ src/kernel/mnemonics/_swap.php | 15 +++ src/kernel/mnemonics/_tableswitch.php | 42 +++++++++ src/kernel/mnemonics/_wide.php | 15 +++ tools/copy.php | 13 +++ 211 files changed, 3834 insertions(+) delete mode 100644 src/exceptions/.gitkeep create mode 100644 src/exceptions/NotImplementedException.php create mode 100644 src/kernel/core/Accumulator.php delete mode 100644 src/kernel/mnemonics/.gitkeep create mode 100644 src/kernel/mnemonics/MnemonicInterface.php create mode 100644 src/kernel/mnemonics/_aaload.php create mode 100644 src/kernel/mnemonics/_aastore.php create mode 100644 src/kernel/mnemonics/_aconst_null.php create mode 100644 src/kernel/mnemonics/_aload.php create mode 100644 src/kernel/mnemonics/_aload_0.php create mode 100644 src/kernel/mnemonics/_aload_1.php create mode 100644 src/kernel/mnemonics/_aload_2.php create mode 100644 src/kernel/mnemonics/_aload_3.php create mode 100644 src/kernel/mnemonics/_anewarray.php create mode 100644 src/kernel/mnemonics/_areturn.php create mode 100644 src/kernel/mnemonics/_arraylength.php create mode 100644 src/kernel/mnemonics/_astore.php create mode 100644 src/kernel/mnemonics/_astore_0.php create mode 100644 src/kernel/mnemonics/_astore_1.php create mode 100644 src/kernel/mnemonics/_astore_2.php create mode 100644 src/kernel/mnemonics/_astore_3.php create mode 100644 src/kernel/mnemonics/_athrow.php create mode 100644 src/kernel/mnemonics/_baload.php create mode 100644 src/kernel/mnemonics/_bastore.php create mode 100644 src/kernel/mnemonics/_bipush.php create mode 100644 src/kernel/mnemonics/_breakpoint.php create mode 100644 src/kernel/mnemonics/_caload.php create mode 100644 src/kernel/mnemonics/_castore.php create mode 100644 src/kernel/mnemonics/_checkcast.php create mode 100644 src/kernel/mnemonics/_d2f.php create mode 100644 src/kernel/mnemonics/_d2i.php create mode 100644 src/kernel/mnemonics/_d2l.php create mode 100644 src/kernel/mnemonics/_dadd.php create mode 100644 src/kernel/mnemonics/_daload.php create mode 100644 src/kernel/mnemonics/_dastore.php create mode 100644 src/kernel/mnemonics/_dcmpg.php create mode 100644 src/kernel/mnemonics/_dcmpl.php create mode 100644 src/kernel/mnemonics/_dconst_0.php create mode 100644 src/kernel/mnemonics/_dconst_1.php create mode 100644 src/kernel/mnemonics/_ddiv.php create mode 100644 src/kernel/mnemonics/_dload.php create mode 100644 src/kernel/mnemonics/_dload_0.php create mode 100644 src/kernel/mnemonics/_dload_1.php create mode 100644 src/kernel/mnemonics/_dload_2.php create mode 100644 src/kernel/mnemonics/_dload_3.php create mode 100644 src/kernel/mnemonics/_dmul.php create mode 100644 src/kernel/mnemonics/_dneg.php create mode 100644 src/kernel/mnemonics/_drem.php create mode 100644 src/kernel/mnemonics/_dreturn.php create mode 100644 src/kernel/mnemonics/_dstore.php create mode 100644 src/kernel/mnemonics/_dstore_0.php create mode 100644 src/kernel/mnemonics/_dstore_1.php create mode 100644 src/kernel/mnemonics/_dstore_2.php create mode 100644 src/kernel/mnemonics/_dstore_3.php create mode 100644 src/kernel/mnemonics/_dsub.php create mode 100644 src/kernel/mnemonics/_dup.php create mode 100644 src/kernel/mnemonics/_dup2.php create mode 100644 src/kernel/mnemonics/_dup2_x1.php create mode 100644 src/kernel/mnemonics/_dup2_x2.php create mode 100644 src/kernel/mnemonics/_dup_x1.php create mode 100644 src/kernel/mnemonics/_dup_x2.php create mode 100644 src/kernel/mnemonics/_f2d.php create mode 100644 src/kernel/mnemonics/_f2i.php create mode 100644 src/kernel/mnemonics/_f2l.php create mode 100644 src/kernel/mnemonics/_fadd.php create mode 100644 src/kernel/mnemonics/_faload.php create mode 100644 src/kernel/mnemonics/_fastore.php create mode 100644 src/kernel/mnemonics/_fcmpg.php create mode 100644 src/kernel/mnemonics/_fcmpl.php create mode 100644 src/kernel/mnemonics/_fconst_0.php create mode 100644 src/kernel/mnemonics/_fconst_1.php create mode 100644 src/kernel/mnemonics/_fconst_2.php create mode 100644 src/kernel/mnemonics/_fdiv.php create mode 100644 src/kernel/mnemonics/_fload.php create mode 100644 src/kernel/mnemonics/_fload_0.php create mode 100644 src/kernel/mnemonics/_fload_1.php create mode 100644 src/kernel/mnemonics/_fload_2.php create mode 100644 src/kernel/mnemonics/_fload_3.php create mode 100644 src/kernel/mnemonics/_fmul.php create mode 100644 src/kernel/mnemonics/_fneg.php create mode 100644 src/kernel/mnemonics/_frem.php create mode 100644 src/kernel/mnemonics/_freturn.php create mode 100644 src/kernel/mnemonics/_fstore.php create mode 100644 src/kernel/mnemonics/_fstore_0.php create mode 100644 src/kernel/mnemonics/_fstore_1.php create mode 100644 src/kernel/mnemonics/_fstore_2.php create mode 100644 src/kernel/mnemonics/_fstore_3.php create mode 100644 src/kernel/mnemonics/_fsub.php create mode 100644 src/kernel/mnemonics/_getfield.php create mode 100644 src/kernel/mnemonics/_getstatic.php create mode 100644 src/kernel/mnemonics/_goto.php create mode 100644 src/kernel/mnemonics/_goto_w.php create mode 100644 src/kernel/mnemonics/_i2b.php create mode 100644 src/kernel/mnemonics/_i2c.php create mode 100644 src/kernel/mnemonics/_i2d.php create mode 100644 src/kernel/mnemonics/_i2f.php create mode 100644 src/kernel/mnemonics/_i2l.php create mode 100644 src/kernel/mnemonics/_i2s.php create mode 100644 src/kernel/mnemonics/_iadd.php create mode 100644 src/kernel/mnemonics/_iaload.php create mode 100644 src/kernel/mnemonics/_iand.php create mode 100644 src/kernel/mnemonics/_iastore.php create mode 100644 src/kernel/mnemonics/_iconst_0.php create mode 100644 src/kernel/mnemonics/_iconst_1.php create mode 100644 src/kernel/mnemonics/_iconst_2.php create mode 100644 src/kernel/mnemonics/_iconst_3.php create mode 100644 src/kernel/mnemonics/_iconst_4.php create mode 100644 src/kernel/mnemonics/_iconst_5.php create mode 100644 src/kernel/mnemonics/_iconst_m1.php create mode 100644 src/kernel/mnemonics/_idiv.php create mode 100644 src/kernel/mnemonics/_if_acmpeq.php create mode 100644 src/kernel/mnemonics/_if_acmpne.php create mode 100644 src/kernel/mnemonics/_if_icmpeq.php create mode 100644 src/kernel/mnemonics/_if_icmpge.php create mode 100644 src/kernel/mnemonics/_if_icmpgt.php create mode 100644 src/kernel/mnemonics/_if_icmple.php create mode 100644 src/kernel/mnemonics/_if_icmplt.php create mode 100644 src/kernel/mnemonics/_if_icmpne.php create mode 100644 src/kernel/mnemonics/_ifeq.php create mode 100644 src/kernel/mnemonics/_ifge.php create mode 100644 src/kernel/mnemonics/_ifgt.php create mode 100644 src/kernel/mnemonics/_ifle.php create mode 100644 src/kernel/mnemonics/_iflt.php create mode 100644 src/kernel/mnemonics/_ifne.php create mode 100644 src/kernel/mnemonics/_ifnonnull.php create mode 100644 src/kernel/mnemonics/_ifnull.php create mode 100644 src/kernel/mnemonics/_iinc.php create mode 100644 src/kernel/mnemonics/_iload.php create mode 100644 src/kernel/mnemonics/_iload_0.php create mode 100644 src/kernel/mnemonics/_iload_1.php create mode 100644 src/kernel/mnemonics/_iload_2.php create mode 100644 src/kernel/mnemonics/_iload_3.php create mode 100644 src/kernel/mnemonics/_impdep1.php create mode 100644 src/kernel/mnemonics/_impdep2.php create mode 100644 src/kernel/mnemonics/_imul.php create mode 100644 src/kernel/mnemonics/_ineg.php create mode 100644 src/kernel/mnemonics/_instanceof.php create mode 100644 src/kernel/mnemonics/_invokedynamic.php create mode 100644 src/kernel/mnemonics/_invokeinterface.php create mode 100644 src/kernel/mnemonics/_invokespecial.php create mode 100644 src/kernel/mnemonics/_invokestatic.php create mode 100644 src/kernel/mnemonics/_invokevirtual.php create mode 100644 src/kernel/mnemonics/_ior.php create mode 100644 src/kernel/mnemonics/_irem.php create mode 100644 src/kernel/mnemonics/_ireturn.php create mode 100644 src/kernel/mnemonics/_ishl.php create mode 100644 src/kernel/mnemonics/_ishr.php create mode 100644 src/kernel/mnemonics/_istore.php create mode 100644 src/kernel/mnemonics/_istore_0.php create mode 100644 src/kernel/mnemonics/_istore_1.php create mode 100644 src/kernel/mnemonics/_istore_2.php create mode 100644 src/kernel/mnemonics/_istore_3.php create mode 100644 src/kernel/mnemonics/_isub.php create mode 100644 src/kernel/mnemonics/_iushr.php create mode 100644 src/kernel/mnemonics/_ixor.php create mode 100644 src/kernel/mnemonics/_jsr.php create mode 100644 src/kernel/mnemonics/_jsr_w.php create mode 100644 src/kernel/mnemonics/_l2d.php create mode 100644 src/kernel/mnemonics/_l2f.php create mode 100644 src/kernel/mnemonics/_l2i.php create mode 100644 src/kernel/mnemonics/_ladd.php create mode 100644 src/kernel/mnemonics/_laload.php create mode 100644 src/kernel/mnemonics/_land.php create mode 100644 src/kernel/mnemonics/_lastore.php create mode 100644 src/kernel/mnemonics/_lcmp.php create mode 100644 src/kernel/mnemonics/_lconst_0.php create mode 100644 src/kernel/mnemonics/_lconst_1.php create mode 100644 src/kernel/mnemonics/_ldc.php create mode 100644 src/kernel/mnemonics/_ldc2_w.php create mode 100644 src/kernel/mnemonics/_ldc_w.php create mode 100644 src/kernel/mnemonics/_ldiv.php create mode 100644 src/kernel/mnemonics/_lload.php create mode 100644 src/kernel/mnemonics/_lload_0.php create mode 100644 src/kernel/mnemonics/_lload_1.php create mode 100644 src/kernel/mnemonics/_lload_2.php create mode 100644 src/kernel/mnemonics/_lload_3.php create mode 100644 src/kernel/mnemonics/_lmul.php create mode 100644 src/kernel/mnemonics/_lneg.php create mode 100644 src/kernel/mnemonics/_lookupswitch.php create mode 100644 src/kernel/mnemonics/_lor.php create mode 100644 src/kernel/mnemonics/_lrem.php create mode 100644 src/kernel/mnemonics/_lreturn.php create mode 100644 src/kernel/mnemonics/_lshl.php create mode 100644 src/kernel/mnemonics/_lshr.php create mode 100644 src/kernel/mnemonics/_lstore.php create mode 100644 src/kernel/mnemonics/_lstore_0.php create mode 100644 src/kernel/mnemonics/_lstore_1.php create mode 100644 src/kernel/mnemonics/_lstore_2.php create mode 100644 src/kernel/mnemonics/_lstore_3.php create mode 100644 src/kernel/mnemonics/_lsub.php create mode 100644 src/kernel/mnemonics/_lushr.php create mode 100644 src/kernel/mnemonics/_lxor.php create mode 100644 src/kernel/mnemonics/_monitorenter.php create mode 100644 src/kernel/mnemonics/_monitorexit.php create mode 100644 src/kernel/mnemonics/_multianewarray.php create mode 100644 src/kernel/mnemonics/_new.php create mode 100644 src/kernel/mnemonics/_newarray.php create mode 100644 src/kernel/mnemonics/_nop.php create mode 100644 src/kernel/mnemonics/_pop.php create mode 100644 src/kernel/mnemonics/_pop2.php create mode 100644 src/kernel/mnemonics/_putfield.php create mode 100644 src/kernel/mnemonics/_putstatic.php create mode 100644 src/kernel/mnemonics/_ret.php create mode 100644 src/kernel/mnemonics/_return.php create mode 100644 src/kernel/mnemonics/_saload.php create mode 100644 src/kernel/mnemonics/_sastore.php create mode 100644 src/kernel/mnemonics/_sipush.php create mode 100644 src/kernel/mnemonics/_swap.php create mode 100644 src/kernel/mnemonics/_tableswitch.php create mode 100644 src/kernel/mnemonics/_wide.php create mode 100644 tools/copy.php diff --git a/src/exceptions/.gitkeep b/src/exceptions/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/exceptions/NotImplementedException.php b/src/exceptions/NotImplementedException.php new file mode 100644 index 00000000..56361245 --- /dev/null +++ b/src/exceptions/NotImplementedException.php @@ -0,0 +1,7 @@ +getStack(); + $arrayref = $this->getStack(); + + if (!isset($arrayref[$index])) { + + throw new JavaArrayIndexOutOfBoundsException($this->getMethodName() . ': ' . $index . ' of array index'); + + } + + $this->pushStack($arrayref[$index]); + + } + +} diff --git a/src/kernel/mnemonics/_aastore.php b/src/kernel/mnemonics/_aastore.php new file mode 100644 index 00000000..8588fa0c --- /dev/null +++ b/src/kernel/mnemonics/_aastore.php @@ -0,0 +1,23 @@ +getStack(); + $index = $this->getStack(); + $arrayref = $this->getStack(); + + $arrayref[$index] = $value; + + } + +} diff --git a/src/kernel/mnemonics/_aconst_null.php b/src/kernel/mnemonics/_aconst_null.php new file mode 100644 index 00000000..c0f044a0 --- /dev/null +++ b/src/kernel/mnemonics/_aconst_null.php @@ -0,0 +1,19 @@ +pushStack(null); + + } + +} diff --git a/src/kernel/mnemonics/_aload.php b/src/kernel/mnemonics/_aload.php new file mode 100644 index 00000000..b29d5fff --- /dev/null +++ b/src/kernel/mnemonics/_aload.php @@ -0,0 +1,21 @@ +getByteCodeStream()->readByte(); + + $this->pushStack($this->getLocalstorage($index)); + + } + +} diff --git a/src/kernel/mnemonics/_aload_0.php b/src/kernel/mnemonics/_aload_0.php new file mode 100644 index 00000000..d864fc46 --- /dev/null +++ b/src/kernel/mnemonics/_aload_0.php @@ -0,0 +1,19 @@ +pushStack($this->getLocalstorage(0)); + + } + +} diff --git a/src/kernel/mnemonics/_aload_1.php b/src/kernel/mnemonics/_aload_1.php new file mode 100644 index 00000000..be5f3bd7 --- /dev/null +++ b/src/kernel/mnemonics/_aload_1.php @@ -0,0 +1,20 @@ +pushStack($this->getLocalstorage(1)); + + + } + +} diff --git a/src/kernel/mnemonics/_aload_2.php b/src/kernel/mnemonics/_aload_2.php new file mode 100644 index 00000000..31ab83e7 --- /dev/null +++ b/src/kernel/mnemonics/_aload_2.php @@ -0,0 +1,19 @@ +pushStack($this->getLocalstorage(2)); + + } + +} diff --git a/src/kernel/mnemonics/_aload_3.php b/src/kernel/mnemonics/_aload_3.php new file mode 100644 index 00000000..736ed4e3 --- /dev/null +++ b/src/kernel/mnemonics/_aload_3.php @@ -0,0 +1,19 @@ +pushStack($this->getLocalstorage(3)); + + } + +} diff --git a/src/kernel/mnemonics/_anewarray.php b/src/kernel/mnemonics/_anewarray.php new file mode 100644 index 00000000..2d583f78 --- /dev/null +++ b/src/kernel/mnemonics/_anewarray.php @@ -0,0 +1,28 @@ +getByteCodeStream()->readUnsignedShort(); + + // 空の配列を渡す (nullで埋める) + $count = $this->getStack(); + // need reference + $ref = new ArrayIterator(array_fill(0, $count, null)); + $this->pushStackByReference($ref); + + } + +} diff --git a/src/kernel/mnemonics/_areturn.php b/src/kernel/mnemonics/_areturn.php new file mode 100644 index 00000000..f5b2e17c --- /dev/null +++ b/src/kernel/mnemonics/_areturn.php @@ -0,0 +1,16 @@ +getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_arraylength.php b/src/kernel/mnemonics/_arraylength.php new file mode 100644 index 00000000..fa651902 --- /dev/null +++ b/src/kernel/mnemonics/_arraylength.php @@ -0,0 +1,18 @@ +getStack(); + + $this->pushStack(sizeof($arrayref)); + + } + +} diff --git a/src/kernel/mnemonics/_astore.php b/src/kernel/mnemonics/_astore.php new file mode 100644 index 00000000..e2bf8c44 --- /dev/null +++ b/src/kernel/mnemonics/_astore.php @@ -0,0 +1,17 @@ +getByteCodeStream()->readUnsignedByte(); + $this->setLocalstorage($index, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_astore_0.php b/src/kernel/mnemonics/_astore_0.php new file mode 100644 index 00000000..34ab7277 --- /dev/null +++ b/src/kernel/mnemonics/_astore_0.php @@ -0,0 +1,16 @@ +setLocalstorage(0, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_astore_1.php b/src/kernel/mnemonics/_astore_1.php new file mode 100644 index 00000000..7685380e --- /dev/null +++ b/src/kernel/mnemonics/_astore_1.php @@ -0,0 +1,16 @@ +setLocalstorage(1, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_astore_2.php b/src/kernel/mnemonics/_astore_2.php new file mode 100644 index 00000000..b4dfaaa3 --- /dev/null +++ b/src/kernel/mnemonics/_astore_2.php @@ -0,0 +1,16 @@ +setLocalstorage(2, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_astore_3.php b/src/kernel/mnemonics/_astore_3.php new file mode 100644 index 00000000..2fe1b0ad --- /dev/null +++ b/src/kernel/mnemonics/_astore_3.php @@ -0,0 +1,16 @@ +setLocalstorage(3, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_athrow.php b/src/kernel/mnemonics/_athrow.php new file mode 100644 index 00000000..ceffb1d0 --- /dev/null +++ b/src/kernel/mnemonics/_athrow.php @@ -0,0 +1,35 @@ +getCpInfo(); + + $objectref = $this->getStack(); + + $className = str_replace('\\', '/', get_class($objectref)); + + foreach ($this->getAttributeData()->getExceptionTables() as $exception) { + + if ($cpInfo[$cpInfo[$exception->getCatchType()]->getClassIndex()]->getString() === $className && + $exception->getStartPc() <= $this->getPointer() && + $exception->getEndPc() >= $this->getPointer()) { + + $this->getByteCodeStream()->setOffset($exception->getHandlerPc()); + return; + + } + + } + + throw new Exception('exception table was broken.'); + + } + +} diff --git a/src/kernel/mnemonics/_baload.php b/src/kernel/mnemonics/_baload.php new file mode 100644 index 00000000..cdbb8299 --- /dev/null +++ b/src/kernel/mnemonics/_baload.php @@ -0,0 +1,15 @@ +pushStack($this->getByteCodeStream()->readByte()); + + } + +} diff --git a/src/kernel/mnemonics/_breakpoint.php b/src/kernel/mnemonics/_breakpoint.php new file mode 100644 index 00000000..9ee1d82c --- /dev/null +++ b/src/kernel/mnemonics/_breakpoint.php @@ -0,0 +1,15 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::add($value1, $value2, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_daload.php b/src/kernel/mnemonics/_daload.php new file mode 100644 index 00000000..e605768f --- /dev/null +++ b/src/kernel/mnemonics/_daload.php @@ -0,0 +1,22 @@ +getStack(); + $arrayref = $this->getStack(); + + $this->pushStack($arrayref[$index]); + + } + +} diff --git a/src/kernel/mnemonics/_dastore.php b/src/kernel/mnemonics/_dastore.php new file mode 100644 index 00000000..c3fb6a7d --- /dev/null +++ b/src/kernel/mnemonics/_dastore.php @@ -0,0 +1,23 @@ +getStack(); + $index = $this->getStack(); + $arrayref = $this->getStack(); + + $arrayref[$index] = $value; + + } + +} diff --git a/src/kernel/mnemonics/_dcmpg.php b/src/kernel/mnemonics/_dcmpg.php new file mode 100644 index 00000000..fdbddf9a --- /dev/null +++ b/src/kernel/mnemonics/_dcmpg.php @@ -0,0 +1,15 @@ +pushStack(0); + + } + +} diff --git a/src/kernel/mnemonics/_dconst_1.php b/src/kernel/mnemonics/_dconst_1.php new file mode 100644 index 00000000..1a44bd5d --- /dev/null +++ b/src/kernel/mnemonics/_dconst_1.php @@ -0,0 +1,16 @@ +pushStack(1); + + } + +} diff --git a/src/kernel/mnemonics/_ddiv.php b/src/kernel/mnemonics/_ddiv.php new file mode 100644 index 00000000..008c5c95 --- /dev/null +++ b/src/kernel/mnemonics/_ddiv.php @@ -0,0 +1,15 @@ +getByteCodeStream()->readUnsignedByte(); + $this->pushStack($this->getLocalstorage($index)); + + } + +} diff --git a/src/kernel/mnemonics/_dload_0.php b/src/kernel/mnemonics/_dload_0.php new file mode 100644 index 00000000..c606f7e0 --- /dev/null +++ b/src/kernel/mnemonics/_dload_0.php @@ -0,0 +1,15 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::multiply($value1, $value2, 8)); + + + + } + +} diff --git a/src/kernel/mnemonics/_dneg.php b/src/kernel/mnemonics/_dneg.php new file mode 100644 index 00000000..32d47a7c --- /dev/null +++ b/src/kernel/mnemonics/_dneg.php @@ -0,0 +1,15 @@ +getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_dstore.php b/src/kernel/mnemonics/_dstore.php new file mode 100644 index 00000000..edd994c6 --- /dev/null +++ b/src/kernel/mnemonics/_dstore.php @@ -0,0 +1,22 @@ +getByteCodeStream()->readUnsignedByte(); + $value = $this->getStack(); + + $this->setLocalstorage($index, BinaryTools::convertDoubleToIEEE754($value)); + + } + +} diff --git a/src/kernel/mnemonics/_dstore_0.php b/src/kernel/mnemonics/_dstore_0.php new file mode 100644 index 00000000..564a591e --- /dev/null +++ b/src/kernel/mnemonics/_dstore_0.php @@ -0,0 +1,16 @@ +setLocalstorage(0, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_dstore_1.php b/src/kernel/mnemonics/_dstore_1.php new file mode 100644 index 00000000..b7445c22 --- /dev/null +++ b/src/kernel/mnemonics/_dstore_1.php @@ -0,0 +1,16 @@ +setLocalstorage(1, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_dstore_2.php b/src/kernel/mnemonics/_dstore_2.php new file mode 100644 index 00000000..ce0ea0cb --- /dev/null +++ b/src/kernel/mnemonics/_dstore_2.php @@ -0,0 +1,16 @@ +setLocalstorage(2, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_dstore_3.php b/src/kernel/mnemonics/_dstore_3.php new file mode 100644 index 00000000..5bd183de --- /dev/null +++ b/src/kernel/mnemonics/_dstore_3.php @@ -0,0 +1,16 @@ +setLocalstorage(3, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_dsub.php b/src/kernel/mnemonics/_dsub.php new file mode 100644 index 00000000..4654b2df --- /dev/null +++ b/src/kernel/mnemonics/_dsub.php @@ -0,0 +1,19 @@ +getStack(); + $rightValue = $this->getStack(); + + $this->pushStack(BinaryTools::sub($leftValue, $rightValue, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_dup.php b/src/kernel/mnemonics/_dup.php new file mode 100644 index 00000000..a2b4d194 --- /dev/null +++ b/src/kernel/mnemonics/_dup.php @@ -0,0 +1,16 @@ +dupStack(); + + } + +} diff --git a/src/kernel/mnemonics/_dup2.php b/src/kernel/mnemonics/_dup2.php new file mode 100644 index 00000000..c57377df --- /dev/null +++ b/src/kernel/mnemonics/_dup2.php @@ -0,0 +1,15 @@ +getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_fstore.php b/src/kernel/mnemonics/_fstore.php new file mode 100644 index 00000000..842e7de6 --- /dev/null +++ b/src/kernel/mnemonics/_fstore.php @@ -0,0 +1,15 @@ +getCpInfo(); + + $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + + $get = $this->getStack(); + + $return = $get->getInstance($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()); + + if ($return !== null) { + + $this->pushStack($return); + + } else { + + throw new Exception('Cannot get ' . $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() . ''); + + } + + } + +} diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/mnemonics/_getstatic.php new file mode 100644 index 00000000..df6c4e0a --- /dev/null +++ b/src/kernel/mnemonics/_getstatic.php @@ -0,0 +1,49 @@ +getCpInfo(); + + $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + + $class = $cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString(); + + $signature = JavaClass::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); + + foreach ($this->getInvoker()->getClass()->getFields() as $field) { + + if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { + + // push stack + $this->pushStack($this->getInvoker()->getClass()->getStatic($cpInfo[$field->getNameIndex()]->getString())); + + return; + + } + + } + + if (isset($signature[0]['className'])) { + + $this->getInvoker()->loadPlatform($class); + $this->getInvoker()->loadPlatform($signature[0]['className']); + $className = str_replace('/', '\\', $signature[0]['className']); + + $this->pushStack(new $className()); + return; + + } + + throw new Exception('Has not class or field'); + + + } + +} diff --git a/src/kernel/mnemonics/_goto.php b/src/kernel/mnemonics/_goto.php new file mode 100644 index 00000000..a057ddaa --- /dev/null +++ b/src/kernel/mnemonics/_goto.php @@ -0,0 +1,18 @@ +getByteCodeStream()->readShort(); + + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + + } + +} diff --git a/src/kernel/mnemonics/_goto_w.php b/src/kernel/mnemonics/_goto_w.php new file mode 100644 index 00000000..a534efd0 --- /dev/null +++ b/src/kernel/mnemonics/_goto_w.php @@ -0,0 +1,15 @@ +getStack(); + + $this->pushStack(base_convert(substr(sprintf('%032s', base_convert($value, 10, 2)), 16), 2, 10)); + + } + +} diff --git a/src/kernel/mnemonics/_iadd.php b/src/kernel/mnemonics/_iadd.php new file mode 100644 index 00000000..824072fd --- /dev/null +++ b/src/kernel/mnemonics/_iadd.php @@ -0,0 +1,19 @@ +getStack(); + $rightValue = $this->getStack(); + + $this->pushStack(BinaryTools::add($leftValue, $rightValue, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_iaload.php b/src/kernel/mnemonics/_iaload.php new file mode 100644 index 00000000..94301ad0 --- /dev/null +++ b/src/kernel/mnemonics/_iaload.php @@ -0,0 +1,19 @@ +getStack(); + $arrayref = $this->getStack(); + + $this->pushStack($arrayref[$index]); + + } + +} diff --git a/src/kernel/mnemonics/_iand.php b/src/kernel/mnemonics/_iand.php new file mode 100644 index 00000000..291a0eda --- /dev/null +++ b/src/kernel/mnemonics/_iand.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::andBits($value1, $value2, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_iastore.php b/src/kernel/mnemonics/_iastore.php new file mode 100644 index 00000000..cad0f5d5 --- /dev/null +++ b/src/kernel/mnemonics/_iastore.php @@ -0,0 +1,20 @@ +getStack(); + $arrayref = $this->getStack(); + $value = $this->getStack(); + + $value[$arrayref] = $data; + + } + +} diff --git a/src/kernel/mnemonics/_iconst_0.php b/src/kernel/mnemonics/_iconst_0.php new file mode 100644 index 00000000..de29a060 --- /dev/null +++ b/src/kernel/mnemonics/_iconst_0.php @@ -0,0 +1,16 @@ +pushStack(0); + + } + +} diff --git a/src/kernel/mnemonics/_iconst_1.php b/src/kernel/mnemonics/_iconst_1.php new file mode 100644 index 00000000..f8544c6c --- /dev/null +++ b/src/kernel/mnemonics/_iconst_1.php @@ -0,0 +1,16 @@ +pushStack(1); + + } + +} diff --git a/src/kernel/mnemonics/_iconst_2.php b/src/kernel/mnemonics/_iconst_2.php new file mode 100644 index 00000000..cfc9ffa4 --- /dev/null +++ b/src/kernel/mnemonics/_iconst_2.php @@ -0,0 +1,16 @@ +pushStack(2); + + } + +} diff --git a/src/kernel/mnemonics/_iconst_3.php b/src/kernel/mnemonics/_iconst_3.php new file mode 100644 index 00000000..12f83606 --- /dev/null +++ b/src/kernel/mnemonics/_iconst_3.php @@ -0,0 +1,16 @@ +pushStack(3); + + } + +} diff --git a/src/kernel/mnemonics/_iconst_4.php b/src/kernel/mnemonics/_iconst_4.php new file mode 100644 index 00000000..0343fd68 --- /dev/null +++ b/src/kernel/mnemonics/_iconst_4.php @@ -0,0 +1,16 @@ +pushStack(4); + + } + +} diff --git a/src/kernel/mnemonics/_iconst_5.php b/src/kernel/mnemonics/_iconst_5.php new file mode 100644 index 00000000..a6a006a6 --- /dev/null +++ b/src/kernel/mnemonics/_iconst_5.php @@ -0,0 +1,16 @@ +pushStack(5); + + } + +} diff --git a/src/kernel/mnemonics/_iconst_m1.php b/src/kernel/mnemonics/_iconst_m1.php new file mode 100644 index 00000000..5421dd62 --- /dev/null +++ b/src/kernel/mnemonics/_iconst_m1.php @@ -0,0 +1,16 @@ +pushStack(-1); + + } + +} diff --git a/src/kernel/mnemonics/_idiv.php b/src/kernel/mnemonics/_idiv.php new file mode 100644 index 00000000..531c72fb --- /dev/null +++ b/src/kernel/mnemonics/_idiv.php @@ -0,0 +1,15 @@ +getByteCodeStream()->readShort(); + + $leftOperand = $this->getStack(); + $rightOperand = $this->getStack(); + + if ($leftOperand === $rightOperand) { + + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + + } + + } + +} diff --git a/src/kernel/mnemonics/_if_acmpne.php b/src/kernel/mnemonics/_if_acmpne.php new file mode 100644 index 00000000..1433f705 --- /dev/null +++ b/src/kernel/mnemonics/_if_acmpne.php @@ -0,0 +1,25 @@ +getByteCodeStream()->readShort(); + + $leftOperand = $this->getStack(); + $rightOperand = $this->getStack(); + + if ($leftOperand !== $rightOperand) { + + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + + } + + } + +} diff --git a/src/kernel/mnemonics/_if_icmpeq.php b/src/kernel/mnemonics/_if_icmpeq.php new file mode 100644 index 00000000..4419886a --- /dev/null +++ b/src/kernel/mnemonics/_if_icmpeq.php @@ -0,0 +1,15 @@ +getByteCodeStream()->readShort(); + + $leftOperand = $this->getStack(); + $rightOperand = $this->getStack(); + + if ($leftOperand <= $rightOperand) { + + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + + } + + } + +} diff --git a/src/kernel/mnemonics/_if_icmpgt.php b/src/kernel/mnemonics/_if_icmpgt.php new file mode 100644 index 00000000..ff3365c6 --- /dev/null +++ b/src/kernel/mnemonics/_if_icmpgt.php @@ -0,0 +1,26 @@ +getByteCodeStream()->readShort(); + + $leftOperand = $this->getStack(); + $rightOperand = $this->getStack(); + + if ($leftOperand < $rightOperand) { + + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + + } + + + } + +} diff --git a/src/kernel/mnemonics/_if_icmple.php b/src/kernel/mnemonics/_if_icmple.php new file mode 100644 index 00000000..c01e8562 --- /dev/null +++ b/src/kernel/mnemonics/_if_icmple.php @@ -0,0 +1,15 @@ +getByteCodeStream()->readShort(); + + $leftOperand = $this->getStack(); + $rightOperand = $this->getStack(); + + if ($rightOperand < $leftOperand) { + + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + + } + } + +} diff --git a/src/kernel/mnemonics/_if_icmpne.php b/src/kernel/mnemonics/_if_icmpne.php new file mode 100644 index 00000000..02d5f604 --- /dev/null +++ b/src/kernel/mnemonics/_if_icmpne.php @@ -0,0 +1,25 @@ +getByteCodeStream()->readShort(); + + $leftOperand = $this->getStack(); + $rightOperand = $this->getStack(); + + if ($leftOperand != $rightOperand) { + + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + + } + + } + +} diff --git a/src/kernel/mnemonics/_ifeq.php b/src/kernel/mnemonics/_ifeq.php new file mode 100644 index 00000000..a9130e98 --- /dev/null +++ b/src/kernel/mnemonics/_ifeq.php @@ -0,0 +1,25 @@ +getByteCodeStream()->readShort(); + + $operand = $this->getStack(); + + if ($operand == 0) { + + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + + } + + + } + +} diff --git a/src/kernel/mnemonics/_ifge.php b/src/kernel/mnemonics/_ifge.php new file mode 100644 index 00000000..26c69da4 --- /dev/null +++ b/src/kernel/mnemonics/_ifge.php @@ -0,0 +1,15 @@ +getByteCodeStream()->readShort(); + + $operand = $this->getStack(); + + if ($operand != 0) { + + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + + } + + } + +} diff --git a/src/kernel/mnemonics/_ifnonnull.php b/src/kernel/mnemonics/_ifnonnull.php new file mode 100644 index 00000000..dfefb1e1 --- /dev/null +++ b/src/kernel/mnemonics/_ifnonnull.php @@ -0,0 +1,15 @@ +getByteCodeStream()->readUnsignedByte(); + $const = $this->getByteCodeStream()->readByte(); + + $this->setLocalstorage($index, $this->getLocalstorage($index) + $const); + + } + +} diff --git a/src/kernel/mnemonics/_iload.php b/src/kernel/mnemonics/_iload.php new file mode 100644 index 00000000..3e2242a4 --- /dev/null +++ b/src/kernel/mnemonics/_iload.php @@ -0,0 +1,18 @@ +getByteCodeStream()->readUnsignedByte(); + + $this->pushStack($this->getLocalstorage($index)); + + } + +} diff --git a/src/kernel/mnemonics/_iload_0.php b/src/kernel/mnemonics/_iload_0.php new file mode 100644 index 00000000..5252a940 --- /dev/null +++ b/src/kernel/mnemonics/_iload_0.php @@ -0,0 +1,16 @@ +pushStack($this->getLocalstorage(0)); + + } + +} diff --git a/src/kernel/mnemonics/_iload_1.php b/src/kernel/mnemonics/_iload_1.php new file mode 100644 index 00000000..65ccefb3 --- /dev/null +++ b/src/kernel/mnemonics/_iload_1.php @@ -0,0 +1,16 @@ +pushStack($this->getLocalstorage(1)); + + } + +} diff --git a/src/kernel/mnemonics/_iload_2.php b/src/kernel/mnemonics/_iload_2.php new file mode 100644 index 00000000..79253c9a --- /dev/null +++ b/src/kernel/mnemonics/_iload_2.php @@ -0,0 +1,16 @@ +pushStack($this->getLocalstorage(2)); + + } + +} diff --git a/src/kernel/mnemonics/_iload_3.php b/src/kernel/mnemonics/_iload_3.php new file mode 100644 index 00000000..7b1bca64 --- /dev/null +++ b/src/kernel/mnemonics/_iload_3.php @@ -0,0 +1,16 @@ +pushStack($this->getLocalstorage(3)); + + } + +} diff --git a/src/kernel/mnemonics/_impdep1.php b/src/kernel/mnemonics/_impdep1.php new file mode 100644 index 00000000..1bff6a92 --- /dev/null +++ b/src/kernel/mnemonics/_impdep1.php @@ -0,0 +1,15 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::multiply($value1, $value2, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_ineg.php b/src/kernel/mnemonics/_ineg.php new file mode 100644 index 00000000..8dffba40 --- /dev/null +++ b/src/kernel/mnemonics/_ineg.php @@ -0,0 +1,18 @@ +getStack(); + + $this->pushStack(BinaryTools::negate($value, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_instanceof.php b/src/kernel/mnemonics/_instanceof.php new file mode 100644 index 00000000..47d581ea --- /dev/null +++ b/src/kernel/mnemonics/_instanceof.php @@ -0,0 +1,15 @@ +getCpInfo(); + + + $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + + // $invokeClassName = '\\' . str_replace('/', '\\', $cpList[$class->getClassIndex()]->getString()); + + + $nameAndTypeIndex = $cpInfo[$cp->getNameAndTypeIndex()]; + + // signature + $signature = JavaClass::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); + + $invokeClassName = $this->getStack(); + + $arguments = array(); + + for ($i = 0; $i < $signature['argumentsCount']; $i++) { + + $arguments[] = $this->getStack(); + + } + + + } + +} diff --git a/src/kernel/mnemonics/_invokestatic.php b/src/kernel/mnemonics/_invokestatic.php new file mode 100644 index 00000000..49d8219b --- /dev/null +++ b/src/kernel/mnemonics/_invokestatic.php @@ -0,0 +1,44 @@ +getCpInfo(); + + $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + + $methodName = $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString(); + + $signature = JavaClass::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); + + $arguments = array(); + + for ($i = 0; $i < $signature['argumentsCount']; $i++) { + + $arguments[] = $this->getStack(); + + } + + krsort($arguments); + + // call invoker + $return = call_user_func_array(array( + $this->getInvoker(), + $methodName + ), $arguments); + + if ($signature[0]['type'] !== 'void') { + + $this->pushStack($return); + + } + + } + +} diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php new file mode 100644 index 00000000..d2d3f14b --- /dev/null +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -0,0 +1,66 @@ +getCpInfo(); + + $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + + $class = $cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString(); + + $nameAndTypeIndex = $cpInfo[$cp->getNameAndTypeIndex()]; + + // signature + $signature = JavaClass::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); + $arguments = array(); + + for ($i = 0; $i < $signature['argumentsCount']; $i++) { + + $arguments[] = $this->getStack(); + + } + + $invokerClass = $this->getStack(); + + if ($invokerClass instanceof \JavaClass) { + + $result = call_user_func_array(array( + + $invokerClass->getMethodInvoker(), + $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() + + ), $arguments); + + + } else { + + // load platform + $this->getInvoker()->loadPlatform($class); + $invokerClassName = '\\' . str_replace('/', '\\', $class); + + $result = call_user_func_array(array( + + $invokerClass, + $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() + + ), $arguments); + + } + + if ($signature[0]['type'] !== 'void') { + + $this->pushStack($result); + + } + + + } + +} diff --git a/src/kernel/mnemonics/_ior.php b/src/kernel/mnemonics/_ior.php new file mode 100644 index 00000000..ac85a405 --- /dev/null +++ b/src/kernel/mnemonics/_ior.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::orBits($value1, $value2, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_irem.php b/src/kernel/mnemonics/_irem.php new file mode 100644 index 00000000..28eee91b --- /dev/null +++ b/src/kernel/mnemonics/_irem.php @@ -0,0 +1,15 @@ +getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_ishl.php b/src/kernel/mnemonics/_ishl.php new file mode 100644 index 00000000..887e80cb --- /dev/null +++ b/src/kernel/mnemonics/_ishl.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::shiftLeft($value1, $value2, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_ishr.php b/src/kernel/mnemonics/_ishr.php new file mode 100644 index 00000000..ff050d85 --- /dev/null +++ b/src/kernel/mnemonics/_ishr.php @@ -0,0 +1,20 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::shiftRight($value1, $value2, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_istore.php b/src/kernel/mnemonics/_istore.php new file mode 100644 index 00000000..ae604c3c --- /dev/null +++ b/src/kernel/mnemonics/_istore.php @@ -0,0 +1,17 @@ +getByteCodeStream()->readUnsignedByte(); + $this->setLocalstorage($index, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_istore_0.php b/src/kernel/mnemonics/_istore_0.php new file mode 100644 index 00000000..7c1dc337 --- /dev/null +++ b/src/kernel/mnemonics/_istore_0.php @@ -0,0 +1,16 @@ +setLocalstorage(0, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_istore_1.php b/src/kernel/mnemonics/_istore_1.php new file mode 100644 index 00000000..06d50c73 --- /dev/null +++ b/src/kernel/mnemonics/_istore_1.php @@ -0,0 +1,16 @@ +setLocalstorage(1, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_istore_2.php b/src/kernel/mnemonics/_istore_2.php new file mode 100644 index 00000000..fef10eb2 --- /dev/null +++ b/src/kernel/mnemonics/_istore_2.php @@ -0,0 +1,16 @@ +setLocalstorage(2, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_istore_3.php b/src/kernel/mnemonics/_istore_3.php new file mode 100644 index 00000000..0bf204b7 --- /dev/null +++ b/src/kernel/mnemonics/_istore_3.php @@ -0,0 +1,16 @@ +setLocalstorage(3, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_isub.php b/src/kernel/mnemonics/_isub.php new file mode 100644 index 00000000..c0ef56d6 --- /dev/null +++ b/src/kernel/mnemonics/_isub.php @@ -0,0 +1,19 @@ +getStack(); + $rightValue = $this->getStack(); + + $this->pushStack(BinaryTools::sub($leftValue, $rightValue, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_iushr.php b/src/kernel/mnemonics/_iushr.php new file mode 100644 index 00000000..eeff4f4f --- /dev/null +++ b/src/kernel/mnemonics/_iushr.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::unsignedShiftRight($value1, $value2, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_ixor.php b/src/kernel/mnemonics/_ixor.php new file mode 100644 index 00000000..3e7f5833 --- /dev/null +++ b/src/kernel/mnemonics/_ixor.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::xorBits($value1, $value2, 4)); + + } + +} diff --git a/src/kernel/mnemonics/_jsr.php b/src/kernel/mnemonics/_jsr.php new file mode 100644 index 00000000..421088bd --- /dev/null +++ b/src/kernel/mnemonics/_jsr.php @@ -0,0 +1,15 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::add($value1, $value2, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_laload.php b/src/kernel/mnemonics/_laload.php new file mode 100644 index 00000000..a202ff5c --- /dev/null +++ b/src/kernel/mnemonics/_laload.php @@ -0,0 +1,22 @@ +getStack(); + $arrayref = $this->getStack(); + + $this->pushStack($arrayref[$index]); + + } + +} diff --git a/src/kernel/mnemonics/_land.php b/src/kernel/mnemonics/_land.php new file mode 100644 index 00000000..22d57f22 --- /dev/null +++ b/src/kernel/mnemonics/_land.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::andBits($value1, $value2, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_lastore.php b/src/kernel/mnemonics/_lastore.php new file mode 100644 index 00000000..b3f4c118 --- /dev/null +++ b/src/kernel/mnemonics/_lastore.php @@ -0,0 +1,23 @@ +getStack(); + $index = $this->getStack(); + $arrayref = $this->getStack(); + + $arrayref[$index] = $value; + + } + +} diff --git a/src/kernel/mnemonics/_lcmp.php b/src/kernel/mnemonics/_lcmp.php new file mode 100644 index 00000000..f644f4db --- /dev/null +++ b/src/kernel/mnemonics/_lcmp.php @@ -0,0 +1,15 @@ +pushStack(0); + + } + +} diff --git a/src/kernel/mnemonics/_lconst_1.php b/src/kernel/mnemonics/_lconst_1.php new file mode 100644 index 00000000..bae4779b --- /dev/null +++ b/src/kernel/mnemonics/_lconst_1.php @@ -0,0 +1,16 @@ +pushStack(1); + + } + +} diff --git a/src/kernel/mnemonics/_ldc.php b/src/kernel/mnemonics/_ldc.php new file mode 100644 index 00000000..a2bd7618 --- /dev/null +++ b/src/kernel/mnemonics/_ldc.php @@ -0,0 +1,45 @@ +getCpInfo(); + + $data = $cpInfo[$this->getByteCodeStream()->readUnsignedByte()]; + + $value = null; + + if ($data instanceof \JavaStructureString) { + + $value = $cpInfo[$data->getStringIndex()]; + + if ($value instanceof \JavaStructureUtf8) { + + // convert java string + $this->getInvoker()->loadPlatform('java.lang.String'); + + $value = new \java\lang\String($value); + + } + + } else if (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { + + $value = $data->getBytes(); + + } else { + + $value = $cpInfo[$cpInfo[$this->getByteCodeStream()->readUnsignedByte()]->getStringIndex()]; + + } + + $this->pushStack($value); + + } + +} diff --git a/src/kernel/mnemonics/_ldc2_w.php b/src/kernel/mnemonics/_ldc2_w.php new file mode 100644 index 00000000..9e3894ec --- /dev/null +++ b/src/kernel/mnemonics/_ldc2_w.php @@ -0,0 +1,20 @@ +getCpInfo(); + + $data = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + + $this->pushStack($data->getBytes()); + + } + +} diff --git a/src/kernel/mnemonics/_ldc_w.php b/src/kernel/mnemonics/_ldc_w.php new file mode 100644 index 00000000..cda67137 --- /dev/null +++ b/src/kernel/mnemonics/_ldc_w.php @@ -0,0 +1,15 @@ +getByteCodeStream()->readUnsignedByte(); + + $this->pushStack($this->getLocalstorage($index)); + + } + +} diff --git a/src/kernel/mnemonics/_lload_0.php b/src/kernel/mnemonics/_lload_0.php new file mode 100644 index 00000000..8e8ecd74 --- /dev/null +++ b/src/kernel/mnemonics/_lload_0.php @@ -0,0 +1,15 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::multiply($value1, $value2, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_lneg.php b/src/kernel/mnemonics/_lneg.php new file mode 100644 index 00000000..dcbd3f5c --- /dev/null +++ b/src/kernel/mnemonics/_lneg.php @@ -0,0 +1,15 @@ +getStack(); + + $paddingData = $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte(); + + $offsets = array(); + + $offsets['default'] = $this->getByteCodeStream()->readInt(); + $switchSize = $this->getByteCodeStream()->readUnsignedInt(); + + + for ($i = 0; $i < $switchSize; $i++) { + + $label = $this->getByteCodeStream()->readInt(); + + $offsets[(string) $label] = $this->getByteCodeStream()->readInt(); + + } + + if (isset($offsets[$key])) { + + // goto PC + $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); + return; + + } + + // goto default + $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); + + } + +} diff --git a/src/kernel/mnemonics/_lor.php b/src/kernel/mnemonics/_lor.php new file mode 100644 index 00000000..baba418d --- /dev/null +++ b/src/kernel/mnemonics/_lor.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::orBits($value1, $value2, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_lrem.php b/src/kernel/mnemonics/_lrem.php new file mode 100644 index 00000000..970b512a --- /dev/null +++ b/src/kernel/mnemonics/_lrem.php @@ -0,0 +1,15 @@ +getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_lshl.php b/src/kernel/mnemonics/_lshl.php new file mode 100644 index 00000000..a1234e62 --- /dev/null +++ b/src/kernel/mnemonics/_lshl.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::shiftLeft($value1, $value2, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_lshr.php b/src/kernel/mnemonics/_lshr.php new file mode 100644 index 00000000..cf77b7ee --- /dev/null +++ b/src/kernel/mnemonics/_lshr.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::shiftRight($value1, $value2, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_lstore.php b/src/kernel/mnemonics/_lstore.php new file mode 100644 index 00000000..297ff83c --- /dev/null +++ b/src/kernel/mnemonics/_lstore.php @@ -0,0 +1,17 @@ +getByteCodeStream()->readUnsignedByte(); + $this->setLocalstorage($index, $this->getStack()); + + } + +} diff --git a/src/kernel/mnemonics/_lstore_0.php b/src/kernel/mnemonics/_lstore_0.php new file mode 100644 index 00000000..d82594cd --- /dev/null +++ b/src/kernel/mnemonics/_lstore_0.php @@ -0,0 +1,15 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::sub($value1, $value2, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_lushr.php b/src/kernel/mnemonics/_lushr.php new file mode 100644 index 00000000..2debcadb --- /dev/null +++ b/src/kernel/mnemonics/_lushr.php @@ -0,0 +1,19 @@ +getStack(); + $value2 = $this->getStack(); + + $this->pushStack(BinaryTools::unsignedShiftRight($value1, $value2, 8)); + + } + +} diff --git a/src/kernel/mnemonics/_lxor.php b/src/kernel/mnemonics/_lxor.php new file mode 100644 index 00000000..db128558 --- /dev/null +++ b/src/kernel/mnemonics/_lxor.php @@ -0,0 +1,15 @@ +getCpInfo(); + + $class = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + + $className = $cpInfo[$class->getClassIndex()]->getString(); + + if (isset($this->getInvoker()->getClass()->getManipulator()->$className) && + $this->getInvoker()->getClass()->getManipulator()->$className !== null) { + + // call constructor + call_user_func_array( + array( + $this->getInvoker()->getClass()->getManipulator()->$className->getMethodInvoker(), + '' + ), + array() + ); + + $this->pushStack($this->getInvoker()->getClass()->getManipulator()->$className); + + } else { + + if (($this->getInvoker()->getClass()->getManipulator() !== null && + $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && + $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) || + is_file(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class')) { + + $javaClass = null; + + if ($this->getInvoker()->getClass()->getManipulator() !== null && + $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && + $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) { + + $javaClass = new JavaClass($className . '.class', $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->getClassBytecode($className)); + + } else { + + $javaClass = new JavaClass(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class'); + + } + + $outerClasses = explode('$', $className); + + $javaClass->setInstance('this', $javaClass); + + for ($i = 1, $size = sizeof($outerClasses); $i < $size; $i++) { + + $javaClass->setInstance('this$' . ($i - 1), $this->getInvoker()->getClass()->getManipulator()->{implode('$', array_slice($outerClasses, 0, $i))}); + + + } + + if (method_exists($javaClass->getMethodInvoker(), '')) { + + // call constructor + call_user_func_array( + array( + $javaClass->getMethodInvoker(), + '' + ), + array( + $this->getInvoker()->getClass() + ) + ); + + } + + if ($this->getInvoker()->getClass()->getManipulator() !== null) { + + // regist to manipulator + $this->getInvoker()->getClass()->getManipulator()->registerClass($javaClass); + + } + + // push to stack + $this->pushStack($javaClass); + + } else { + + // load platform + $this->getInvoker()->loadPlatform($className); + + $invokeClassName = '\\' . str_replace('/', '\\', $className); + + $this->pushStack(new $invokeClassName()); + + } + + } + + } + +} diff --git a/src/kernel/mnemonics/_newarray.php b/src/kernel/mnemonics/_newarray.php new file mode 100644 index 00000000..d7a4087d --- /dev/null +++ b/src/kernel/mnemonics/_newarray.php @@ -0,0 +1,22 @@ +getByteCodeStream()->readUnsignedByte(); + $count = $this->getStack(); + + // need reference + $ref = new ArrayIterator(array_fill(0, $count, null)); + $this->pushStackByReference($ref); + + + } + +} diff --git a/src/kernel/mnemonics/_nop.php b/src/kernel/mnemonics/_nop.php new file mode 100644 index 00000000..9430451e --- /dev/null +++ b/src/kernel/mnemonics/_nop.php @@ -0,0 +1,15 @@ +popStack(); + + } + +} diff --git a/src/kernel/mnemonics/_pop2.php b/src/kernel/mnemonics/_pop2.php new file mode 100644 index 00000000..629c1740 --- /dev/null +++ b/src/kernel/mnemonics/_pop2.php @@ -0,0 +1,15 @@ +getCpInfo(); + + $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $class = $cpInfo[$cp->getNameAndTypeIndex()]; + + $value = $this->getStack(); + $name = $cpInfo[$class->getNameIndex()]->getString(); + + $objectref = $this->getStack(); + + $objectref->setInstance($name, $value); + } + +} diff --git a/src/kernel/mnemonics/_putstatic.php b/src/kernel/mnemonics/_putstatic.php new file mode 100644 index 00000000..8ef9a1dc --- /dev/null +++ b/src/kernel/mnemonics/_putstatic.php @@ -0,0 +1,26 @@ +getCpInfo(); + + $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + + $class = $cpInfo[$cp->getNameAndTypeIndex()]; + $name = $cpInfo[$class->getNameIndex()]->getString(); + + $value = $this->getStack(); + + // set field + $this->getInvoker()->getClass()->setStatic($name, $value); + + } + +} diff --git a/src/kernel/mnemonics/_ret.php b/src/kernel/mnemonics/_ret.php new file mode 100644 index 00000000..03c318eb --- /dev/null +++ b/src/kernel/mnemonics/_ret.php @@ -0,0 +1,15 @@ +pushStack($this->getByteCodeStream()->readShort()); + + } + +} diff --git a/src/kernel/mnemonics/_swap.php b/src/kernel/mnemonics/_swap.php new file mode 100644 index 00000000..991bb0c1 --- /dev/null +++ b/src/kernel/mnemonics/_swap.php @@ -0,0 +1,15 @@ +getStack(); + + $paddingData = $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte(); + + $offsets = array(); + + $offsets['default'] = $this->getByteCodeStream()->readInt(); + + $lowByte = $this->getByteCodeStream()->readInt(); + $highByte = $this->getByteCodeStream()->readInt(); + + for ($i = $lowByte; $i <= $highByte; $i++) { + + $offsets[$i] = $this->getByteCodeStream()->readInt(); + + } + + if (isset($offsets[$key])) { + + // goto PC + $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); + return; + + } + + // goto default + $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); + + } + +} diff --git a/src/kernel/mnemonics/_wide.php b/src/kernel/mnemonics/_wide.php new file mode 100644 index 00000000..1cfef072 --- /dev/null +++ b/src/kernel/mnemonics/_wide.php @@ -0,0 +1,15 @@ + Date: Sat, 23 Feb 2019 12:20:05 +0900 Subject: [PATCH 05/96] Update --- src/kernel/maps/AccessFlagEnum.php | 13 + src/kernel/maps/ClassAccessFlagEnum.php | 14 + src/kernel/maps/ClassConstantEnum.php | 17 + src/kernel/maps/Mnemonics.php | 411 ++++++++++++------------ 4 files changed, 249 insertions(+), 206 deletions(-) create mode 100644 src/kernel/maps/AccessFlagEnum.php create mode 100644 src/kernel/maps/ClassAccessFlagEnum.php create mode 100644 src/kernel/maps/ClassConstantEnum.php diff --git a/src/kernel/maps/AccessFlagEnum.php b/src/kernel/maps/AccessFlagEnum.php new file mode 100644 index 00000000..fde3e558 --- /dev/null +++ b/src/kernel/maps/AccessFlagEnum.php @@ -0,0 +1,13 @@ + Date: Sat, 23 Feb 2019 12:40:43 +0900 Subject: [PATCH 06/96] Add extra line --- src/kernel/maps/AccessFlagEnum.php | 2 +- src/kernel/maps/ClassAccessFlagEnum.php | 2 +- src/kernel/maps/ClassConstantEnum.php | 2 +- src/kernel/maps/Map.php | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/kernel/maps/AccessFlagEnum.php b/src/kernel/maps/AccessFlagEnum.php index fde3e558..1cda5840 100644 --- a/src/kernel/maps/AccessFlagEnum.php +++ b/src/kernel/maps/AccessFlagEnum.php @@ -10,4 +10,4 @@ class AccessFlagEnum extends Map const _Final = 0x0010; const _Volatile = 0x0040; const _Transient = 0x0080; -} \ No newline at end of file +} diff --git a/src/kernel/maps/ClassAccessFlagEnum.php b/src/kernel/maps/ClassAccessFlagEnum.php index bb5d05d3..6b7d0723 100644 --- a/src/kernel/maps/ClassAccessFlagEnum.php +++ b/src/kernel/maps/ClassAccessFlagEnum.php @@ -11,4 +11,4 @@ class ClassAccessFlagEnum extends Map const _Synthetic = 0x1000; const _Annotation = 0x2000; const _Enum = 0x4000; -} \ No newline at end of file +} diff --git a/src/kernel/maps/ClassConstantEnum.php b/src/kernel/maps/ClassConstantEnum.php index 7f8f99a9..8d64ec9b 100644 --- a/src/kernel/maps/ClassConstantEnum.php +++ b/src/kernel/maps/ClassConstantEnum.php @@ -14,4 +14,4 @@ class ClassConstantEnum extends Map const _Double = 0x0006; const _NameAndType = 0x000C; const _Utf8 = 0x0001; -} \ No newline at end of file +} diff --git a/src/kernel/maps/Map.php b/src/kernel/maps/Map.php index 65ccec90..8da07fb0 100644 --- a/src/kernel/maps/Map.php +++ b/src/kernel/maps/Map.php @@ -6,9 +6,7 @@ class Map public function getName(string $value): ?string { try { - $reflectionClass = new \ReflectionClass($this); - $constants = $reflectionClass->getConstants(); - if (($key = array_search($value, $constants, true)) !== false) { + if (($key = array_search($value, (new \ReflectionClass($this))->getConstants(), true)) !== false) { return $key; } } catch (\ReflectionException $e) { From 67a1a28773139fdde2d6b7ebda7d25811fcd296c Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 13:15:30 +0900 Subject: [PATCH 07/96] Update attributes --- src/kernel/attributes/.gitkeep | 0 .../attributes/AnnotationDefaultAttribute.php | 15 +++++ src/kernel/attributes/AttributeInfo.php | 31 ++++++++++ src/kernel/attributes/AttributeInterface.php | 7 +++ .../attributes/BootstrapMethodsAttribute.php | 15 +++++ src/kernel/attributes/CodeAttribute.php | 56 +++++++++++++++++++ .../attributes/ConstantValueAttribute.php | 15 +++++ src/kernel/attributes/DeprecatedAttribute.php | 15 +++++ .../attributes/EnclosingMethodAttribute.php | 15 +++++ src/kernel/attributes/ExceptionsAttribute.php | 15 +++++ .../attributes/InnerClassesAttribute.php | 40 +++++++++++++ .../attributes/LineNumberTableAttribute.php | 39 +++++++++++++ .../LocalVariableTableAttribute.php | 20 +++++++ .../LocalVariableTypeTableAttribute.php | 15 +++++ .../RuntimeInvisibleAnnotationsAttribute.php | 15 +++++ ...InvisibleParameterAnnotationsAttribute.php | 15 +++++ .../RuntimeVisibleAnnotationsAttribute.php | 15 +++++ ...meVisibleParameterAnnotationsAttribute.php | 15 +++++ src/kernel/attributes/SignatureAttribute.php | 15 +++++ .../SourceDebugExtensionAttribute.php | 15 +++++ src/kernel/attributes/SourceFileAttribute.php | 30 ++++++++++ .../attributes/StackMapTableAttribute.php | 38 +++++++++++++ src/kernel/attributes/SyntheticAttribute.php | 15 +++++ src/kernel/core/BinaryReader.php | 7 +++ tools/copy_attr.php | 17 ++++++ 25 files changed, 495 insertions(+) delete mode 100644 src/kernel/attributes/.gitkeep create mode 100644 src/kernel/attributes/AnnotationDefaultAttribute.php create mode 100644 src/kernel/attributes/AttributeInfo.php create mode 100644 src/kernel/attributes/AttributeInterface.php create mode 100644 src/kernel/attributes/BootstrapMethodsAttribute.php create mode 100644 src/kernel/attributes/CodeAttribute.php create mode 100644 src/kernel/attributes/ConstantValueAttribute.php create mode 100644 src/kernel/attributes/DeprecatedAttribute.php create mode 100644 src/kernel/attributes/EnclosingMethodAttribute.php create mode 100644 src/kernel/attributes/ExceptionsAttribute.php create mode 100644 src/kernel/attributes/InnerClassesAttribute.php create mode 100644 src/kernel/attributes/LineNumberTableAttribute.php create mode 100644 src/kernel/attributes/LocalVariableTableAttribute.php create mode 100644 src/kernel/attributes/LocalVariableTypeTableAttribute.php create mode 100644 src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php create mode 100644 src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php create mode 100644 src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php create mode 100644 src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php create mode 100644 src/kernel/attributes/SignatureAttribute.php create mode 100644 src/kernel/attributes/SourceDebugExtensionAttribute.php create mode 100644 src/kernel/attributes/SourceFileAttribute.php create mode 100644 src/kernel/attributes/StackMapTableAttribute.php create mode 100644 src/kernel/attributes/SyntheticAttribute.php create mode 100644 src/kernel/core/BinaryReader.php create mode 100644 tools/copy_attr.php diff --git a/src/kernel/attributes/.gitkeep b/src/kernel/attributes/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/kernel/attributes/AnnotationDefaultAttribute.php b/src/kernel/attributes/AnnotationDefaultAttribute.php new file mode 100644 index 00000000..2c8c0a02 --- /dev/null +++ b/src/kernel/attributes/AnnotationDefaultAttribute.php @@ -0,0 +1,15 @@ +AttributeNameIndex = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->AttributeLength = $this->getJavaBinaryStream()->readUnsignedInt(); + $cpInfo = $this->getCpInfo(); + $classAttributeName = 'Java' . $cpInfo[$this->AttributeNameIndex]->getString() . 'Attribute'; + $this->AttributeData = new $classAttributeName($Class); + } + public function getAttributeData () { + return $this->AttributeData; + } + public function getAttributeNameIndex () { + return $this->AttributeNameIndex; + } + public function getAttributeLength () { + return $this->AttributeLength; + } +} \ No newline at end of file diff --git a/src/kernel/attributes/AttributeInterface.php b/src/kernel/attributes/AttributeInterface.php new file mode 100644 index 00000000..df1827f7 --- /dev/null +++ b/src/kernel/attributes/AttributeInterface.php @@ -0,0 +1,7 @@ +MaxStack = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->MaxLocals = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->CodeLength = $this->getJavaBinaryStream()->readUnsignedInt(); + // read opcode + $this->Code = array(); + for ($i = 0; $i < $this->CodeLength; $i++) { + $this->Code[$i] = $this->getJavaBinaryStream()->readUnsignedByte(); + $this->RawCode .= chr($this->Code[$i]); + } + // read exception table + $this->ExceptionTableLength = $this->getJavaBinaryStream()->readUnsignedShort(); + for ($i = 0; $i < $this->ExceptionTableLength; $i++) { + $this->ExceptionTables[$i] = new JavaStructureExceptionTable($this); + $this->ExceptionTables[$i]->setStartPc($this->getJavaBinaryStream()->readUnsignedShort()); + $this->ExceptionTables[$i]->setEndPc($this->getJavaBinaryStream()->readUnsignedShort()); + $this->ExceptionTables[$i]->setHandlerPc($this->getJavaBinaryStream()->readUnsignedShort()); + $this->ExceptionTables[$i]->setCatchType($this->getJavaBinaryStream()->readUnsignedShort()); + } + $this->AttributesCount = $this->getJavaBinaryStream()->readUnsignedShort(); + for ($i = 0; $i < $this->AttributesCount; $i++) { + $this->AttributeInfo[] = new JavaAttributeInfo($this); + } + } + public function getExceptionTables () { + return $this->ExceptionTables; + } + public function getCode () { + return $this->RawCode; + } + public function getOpCodes () { + return $this->Code; + } + public function getOpCodeLength () { + return $this->CodeLength; + } +} \ No newline at end of file diff --git a/src/kernel/attributes/ConstantValueAttribute.php b/src/kernel/attributes/ConstantValueAttribute.php new file mode 100644 index 00000000..2ba679a3 --- /dev/null +++ b/src/kernel/attributes/ConstantValueAttribute.php @@ -0,0 +1,15 @@ +NumberOfClasses = $this->getJavaBinaryStream()->readUnsignedShort(); + + for ($i = 0; $i < $this->NumberOfClasses; $i++) { + + $thises[$i] = new JavaStructureClasses($this); + + $thises[$i]->setInnerClassInfoIndex($this->getJavaBinaryStream()->readUnsignedShort()); + $thises[$i]->setOuterClassInfoIndex($this->getJavaBinaryStream()->readUnsignedShort()); + $thises[$i]->setInnerNameIndex($this->getJavaBinaryStream()->readUnsignedShort()); + $thises[$i]->setInnerClassAccessFlag($this->getJavaBinaryStream()->readUnsignedShort()); + + } + + } + + public function getClasses () { + + return $thises; + + } + +} \ No newline at end of file diff --git a/src/kernel/attributes/LineNumberTableAttribute.php b/src/kernel/attributes/LineNumberTableAttribute.php new file mode 100644 index 00000000..aa016363 --- /dev/null +++ b/src/kernel/attributes/LineNumberTableAttribute.php @@ -0,0 +1,39 @@ +LineNumberTableLength = $this->getJavaBinaryStream()->readUnsignedShort(); + + for ($i = 0; $i < $this->LineNumberTableLength; $i++) { + + $this->LineNumberTables[$i] = new JavaStructureLineNumberTable($Class); + + $this->LineNumberTables[$i]->setStartPc($this->getJavaBinaryStream()->readUnsignedShort()); + $this->LineNumberTables[$i]->setLineNumber($this->getJavaBinaryStream()->readUnsignedShort()); + + } + + } + + public function getLineNumberTables () { + + return $this->LineNumberTables; + + } + + +} \ No newline at end of file diff --git a/src/kernel/attributes/LocalVariableTableAttribute.php b/src/kernel/attributes/LocalVariableTableAttribute.php new file mode 100644 index 00000000..f2ff24fa --- /dev/null +++ b/src/kernel/attributes/LocalVariableTableAttribute.php @@ -0,0 +1,20 @@ +LocalVariableTableLength = $this->getJavaBinaryStream()->readUnsignedShort(); + for ($i = 0; $i < $this->LocalVariableTableLength; $i++) { + $this->LocalVariableTables[] = new JavaStructureLocalVariableTable($Class); + } + } +} \ No newline at end of file diff --git a/src/kernel/attributes/LocalVariableTypeTableAttribute.php b/src/kernel/attributes/LocalVariableTypeTableAttribute.php new file mode 100644 index 00000000..2f14df85 --- /dev/null +++ b/src/kernel/attributes/LocalVariableTypeTableAttribute.php @@ -0,0 +1,15 @@ +SourceFileIndex = $this->getJavaBinaryStream()->readUnsignedShort(); + + + } + + public function getSourceFileIndex () { + + return $this->SourceFileIndex; + + } + + +} \ No newline at end of file diff --git a/src/kernel/attributes/StackMapTableAttribute.php b/src/kernel/attributes/StackMapTableAttribute.php new file mode 100644 index 00000000..54bf95d8 --- /dev/null +++ b/src/kernel/attributes/StackMapTableAttribute.php @@ -0,0 +1,38 @@ +NumberOfEntries = $this->getJavaBinaryStream()->readUnsignedShort(); + + for ($i = 0; $i < $this->NumberOfEntries; $i++) { + + $this->StackMapFrames[] = new JavaStructureStackMapFrame($Class); + + + } + + } + + public function getStackMapFrames () { + + return $this->StackMapFrames; + + } + +} + \ No newline at end of file diff --git a/src/kernel/attributes/SyntheticAttribute.php b/src/kernel/attributes/SyntheticAttribute.php new file mode 100644 index 00000000..55a48662 --- /dev/null +++ b/src/kernel/attributes/SyntheticAttribute.php @@ -0,0 +1,15 @@ +Class', '$this', $a); + var_dump($class, $a); + file_put_contents(__DIR__ . '/../src/kernel/attributes/' . $class, $a); +} \ No newline at end of file From 110c545023201e0dae32b6baecea289553825fb6 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 13:18:12 +0900 Subject: [PATCH 08/96] Add extra line --- src/kernel/attributes/AnnotationDefaultAttribute.php | 2 +- src/kernel/attributes/AttributeInfo.php | 2 +- src/kernel/attributes/BootstrapMethodsAttribute.php | 2 +- src/kernel/attributes/CodeAttribute.php | 2 +- src/kernel/attributes/ConstantValueAttribute.php | 2 +- src/kernel/attributes/DeprecatedAttribute.php | 2 +- src/kernel/attributes/EnclosingMethodAttribute.php | 2 +- src/kernel/attributes/ExceptionsAttribute.php | 2 +- src/kernel/attributes/InnerClassesAttribute.php | 2 +- src/kernel/attributes/LineNumberTableAttribute.php | 2 +- src/kernel/attributes/LocalVariableTableAttribute.php | 2 +- src/kernel/attributes/LocalVariableTypeTableAttribute.php | 2 +- src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php | 2 +- .../RuntimeInvisibleParameterAnnotationsAttribute.php | 2 +- src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php | 2 +- .../attributes/RuntimeVisibleParameterAnnotationsAttribute.php | 2 +- src/kernel/attributes/SignatureAttribute.php | 2 +- src/kernel/attributes/SourceDebugExtensionAttribute.php | 2 +- src/kernel/attributes/SourceFileAttribute.php | 2 +- src/kernel/attributes/StackMapTableAttribute.php | 2 +- src/kernel/attributes/SyntheticAttribute.php | 2 +- tools/copy_attr.php | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/kernel/attributes/AnnotationDefaultAttribute.php b/src/kernel/attributes/AnnotationDefaultAttribute.php index 2c8c0a02..242115f8 100644 --- a/src/kernel/attributes/AnnotationDefaultAttribute.php +++ b/src/kernel/attributes/AnnotationDefaultAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/AttributeInfo.php b/src/kernel/attributes/AttributeInfo.php index 92089e74..16eaa3ad 100644 --- a/src/kernel/attributes/AttributeInfo.php +++ b/src/kernel/attributes/AttributeInfo.php @@ -28,4 +28,4 @@ public function getAttributeNameIndex () { public function getAttributeLength () { return $this->AttributeLength; } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/BootstrapMethodsAttribute.php b/src/kernel/attributes/BootstrapMethodsAttribute.php index c0730fa7..5bbc1d2b 100644 --- a/src/kernel/attributes/BootstrapMethodsAttribute.php +++ b/src/kernel/attributes/BootstrapMethodsAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/CodeAttribute.php b/src/kernel/attributes/CodeAttribute.php index aa8c3b9f..dcaf8c6c 100644 --- a/src/kernel/attributes/CodeAttribute.php +++ b/src/kernel/attributes/CodeAttribute.php @@ -53,4 +53,4 @@ public function getOpCodes () { public function getOpCodeLength () { return $this->CodeLength; } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/ConstantValueAttribute.php b/src/kernel/attributes/ConstantValueAttribute.php index 2ba679a3..23b3ecda 100644 --- a/src/kernel/attributes/ConstantValueAttribute.php +++ b/src/kernel/attributes/ConstantValueAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/DeprecatedAttribute.php b/src/kernel/attributes/DeprecatedAttribute.php index ec02ccfd..4ad1e16a 100644 --- a/src/kernel/attributes/DeprecatedAttribute.php +++ b/src/kernel/attributes/DeprecatedAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/EnclosingMethodAttribute.php b/src/kernel/attributes/EnclosingMethodAttribute.php index c5bc0504..17f73340 100644 --- a/src/kernel/attributes/EnclosingMethodAttribute.php +++ b/src/kernel/attributes/EnclosingMethodAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/ExceptionsAttribute.php b/src/kernel/attributes/ExceptionsAttribute.php index af9d0f58..16c83cb2 100644 --- a/src/kernel/attributes/ExceptionsAttribute.php +++ b/src/kernel/attributes/ExceptionsAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/InnerClassesAttribute.php b/src/kernel/attributes/InnerClassesAttribute.php index 5e353f5f..d5085a55 100644 --- a/src/kernel/attributes/InnerClassesAttribute.php +++ b/src/kernel/attributes/InnerClassesAttribute.php @@ -37,4 +37,4 @@ public function getClasses () { } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/LineNumberTableAttribute.php b/src/kernel/attributes/LineNumberTableAttribute.php index aa016363..48a97172 100644 --- a/src/kernel/attributes/LineNumberTableAttribute.php +++ b/src/kernel/attributes/LineNumberTableAttribute.php @@ -36,4 +36,4 @@ public function getLineNumberTables () { } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/LocalVariableTableAttribute.php b/src/kernel/attributes/LocalVariableTableAttribute.php index f2ff24fa..3a91e694 100644 --- a/src/kernel/attributes/LocalVariableTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTableAttribute.php @@ -17,4 +17,4 @@ public function execute(): void $this->LocalVariableTables[] = new JavaStructureLocalVariableTable($Class); } } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/LocalVariableTypeTableAttribute.php b/src/kernel/attributes/LocalVariableTypeTableAttribute.php index 2f14df85..c94e0e8f 100644 --- a/src/kernel/attributes/LocalVariableTypeTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTypeTableAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php index 5e0f3a4d..3790918d 100644 --- a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php index 0ac00785..65b261d8 100644 --- a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php index 0d4b580c..1860454d 100644 --- a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php index 1f7bad7e..147777d1 100644 --- a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/SignatureAttribute.php b/src/kernel/attributes/SignatureAttribute.php index 942583d0..eab86356 100644 --- a/src/kernel/attributes/SignatureAttribute.php +++ b/src/kernel/attributes/SignatureAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/SourceDebugExtensionAttribute.php b/src/kernel/attributes/SourceDebugExtensionAttribute.php index ec98811b..ea768dd7 100644 --- a/src/kernel/attributes/SourceDebugExtensionAttribute.php +++ b/src/kernel/attributes/SourceDebugExtensionAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/SourceFileAttribute.php b/src/kernel/attributes/SourceFileAttribute.php index 35c06ec7..f1580fc9 100644 --- a/src/kernel/attributes/SourceFileAttribute.php +++ b/src/kernel/attributes/SourceFileAttribute.php @@ -27,4 +27,4 @@ public function getSourceFileIndex () { } -} \ No newline at end of file +} diff --git a/src/kernel/attributes/StackMapTableAttribute.php b/src/kernel/attributes/StackMapTableAttribute.php index 54bf95d8..239afc53 100644 --- a/src/kernel/attributes/StackMapTableAttribute.php +++ b/src/kernel/attributes/StackMapTableAttribute.php @@ -35,4 +35,4 @@ public function getStackMapFrames () { } } - \ No newline at end of file + diff --git a/src/kernel/attributes/SyntheticAttribute.php b/src/kernel/attributes/SyntheticAttribute.php index 55a48662..5f4066fc 100644 --- a/src/kernel/attributes/SyntheticAttribute.php +++ b/src/kernel/attributes/SyntheticAttribute.php @@ -12,4 +12,4 @@ public function execute(): void throw new NotImplementedException(__CLASS__); } -} \ No newline at end of file +} diff --git a/tools/copy_attr.php b/tools/copy_attr.php index 05da2345..17399df2 100644 --- a/tools/copy_attr.php +++ b/tools/copy_attr.php @@ -13,5 +13,5 @@ $a = str_replace('Class', '$this', $a); var_dump($class, $a); - file_put_contents(__DIR__ . '/../src/kernel/attributes/' . $class, $a); + file_put_contents(__DIR__ . '/../src/kernel/attributes/' . $class, $a . "\n"); } \ No newline at end of file From ff8c669eb5d3f6845771964ca059c508d2a6aedd Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 13:35:46 +0900 Subject: [PATCH 09/96] Add BinaryReader and BinaryTool --- .../attributes/AnnotationDefaultAttribute.php | 1 + src/kernel/attributes/AttributeInfo.php | 5 +++-- .../attributes/BootstrapMethodsAttribute.php | 1 + src/kernel/attributes/CodeAttribute.php | 21 ++++++++++--------- .../attributes/ConstantValueAttribute.php | 1 + src/kernel/attributes/DeprecatedAttribute.php | 1 + .../attributes/EnclosingMethodAttribute.php | 1 + src/kernel/attributes/ExceptionsAttribute.php | 1 + .../attributes/InnerClassesAttribute.php | 11 +++++----- .../attributes/LineNumberTableAttribute.php | 7 ++++--- .../LocalVariableTableAttribute.php | 3 ++- .../LocalVariableTypeTableAttribute.php | 1 + .../RuntimeInvisibleAnnotationsAttribute.php | 1 + ...InvisibleParameterAnnotationsAttribute.php | 1 + .../RuntimeVisibleAnnotationsAttribute.php | 1 + ...meVisibleParameterAnnotationsAttribute.php | 1 + src/kernel/attributes/SignatureAttribute.php | 1 + .../SourceDebugExtensionAttribute.php | 1 + src/kernel/attributes/SourceFileAttribute.php | 3 ++- .../attributes/StackMapTableAttribute.php | 3 ++- src/kernel/attributes/SyntheticAttribute.php | 1 + src/kernel/mnemonics/_aaload.php | 1 + src/kernel/mnemonics/_aastore.php | 1 + src/kernel/mnemonics/_aconst_null.php | 1 + src/kernel/mnemonics/_aload.php | 1 + src/kernel/mnemonics/_aload_0.php | 1 + src/kernel/mnemonics/_aload_1.php | 1 + src/kernel/mnemonics/_aload_2.php | 1 + src/kernel/mnemonics/_aload_3.php | 1 + src/kernel/mnemonics/_anewarray.php | 1 + src/kernel/mnemonics/_areturn.php | 1 + src/kernel/mnemonics/_arraylength.php | 1 + src/kernel/mnemonics/_astore.php | 1 + src/kernel/mnemonics/_astore_0.php | 1 + src/kernel/mnemonics/_astore_1.php | 1 + src/kernel/mnemonics/_astore_2.php | 1 + src/kernel/mnemonics/_astore_3.php | 1 + src/kernel/mnemonics/_athrow.php | 1 + src/kernel/mnemonics/_baload.php | 1 + src/kernel/mnemonics/_bastore.php | 1 + src/kernel/mnemonics/_bipush.php | 1 + src/kernel/mnemonics/_breakpoint.php | 1 + src/kernel/mnemonics/_caload.php | 1 + src/kernel/mnemonics/_castore.php | 1 + src/kernel/mnemonics/_checkcast.php | 1 + src/kernel/mnemonics/_d2f.php | 1 + src/kernel/mnemonics/_d2i.php | 1 + src/kernel/mnemonics/_d2l.php | 1 + src/kernel/mnemonics/_dadd.php | 3 ++- src/kernel/mnemonics/_daload.php | 1 + src/kernel/mnemonics/_dastore.php | 1 + src/kernel/mnemonics/_dcmpg.php | 1 + src/kernel/mnemonics/_dcmpl.php | 1 + src/kernel/mnemonics/_dconst_0.php | 1 + src/kernel/mnemonics/_dconst_1.php | 1 + src/kernel/mnemonics/_ddiv.php | 1 + src/kernel/mnemonics/_dload.php | 1 + src/kernel/mnemonics/_dload_0.php | 1 + src/kernel/mnemonics/_dload_1.php | 1 + src/kernel/mnemonics/_dload_2.php | 1 + src/kernel/mnemonics/_dload_3.php | 1 + src/kernel/mnemonics/_dmul.php | 3 ++- src/kernel/mnemonics/_dneg.php | 1 + src/kernel/mnemonics/_drem.php | 1 + src/kernel/mnemonics/_dreturn.php | 1 + src/kernel/mnemonics/_dstore.php | 3 ++- src/kernel/mnemonics/_dstore_0.php | 1 + src/kernel/mnemonics/_dstore_1.php | 1 + src/kernel/mnemonics/_dstore_2.php | 1 + src/kernel/mnemonics/_dstore_3.php | 1 + src/kernel/mnemonics/_dsub.php | 3 ++- src/kernel/mnemonics/_dup.php | 1 + src/kernel/mnemonics/_dup2.php | 1 + src/kernel/mnemonics/_dup2_x1.php | 1 + src/kernel/mnemonics/_dup2_x2.php | 1 + src/kernel/mnemonics/_dup_x1.php | 1 + src/kernel/mnemonics/_dup_x2.php | 1 + src/kernel/mnemonics/_f2d.php | 1 + src/kernel/mnemonics/_f2i.php | 1 + src/kernel/mnemonics/_f2l.php | 1 + src/kernel/mnemonics/_fadd.php | 1 + src/kernel/mnemonics/_faload.php | 1 + src/kernel/mnemonics/_fastore.php | 1 + src/kernel/mnemonics/_fcmpg.php | 1 + src/kernel/mnemonics/_fcmpl.php | 1 + src/kernel/mnemonics/_fconst_0.php | 1 + src/kernel/mnemonics/_fconst_1.php | 1 + src/kernel/mnemonics/_fconst_2.php | 1 + src/kernel/mnemonics/_fdiv.php | 1 + src/kernel/mnemonics/_fload.php | 1 + src/kernel/mnemonics/_fload_0.php | 1 + src/kernel/mnemonics/_fload_1.php | 1 + src/kernel/mnemonics/_fload_2.php | 1 + src/kernel/mnemonics/_fload_3.php | 1 + src/kernel/mnemonics/_fmul.php | 1 + src/kernel/mnemonics/_fneg.php | 1 + src/kernel/mnemonics/_frem.php | 1 + src/kernel/mnemonics/_freturn.php | 1 + src/kernel/mnemonics/_fstore.php | 1 + src/kernel/mnemonics/_fstore_0.php | 1 + src/kernel/mnemonics/_fstore_1.php | 1 + src/kernel/mnemonics/_fstore_2.php | 1 + src/kernel/mnemonics/_fstore_3.php | 1 + src/kernel/mnemonics/_fsub.php | 1 + src/kernel/mnemonics/_getfield.php | 1 + src/kernel/mnemonics/_getstatic.php | 1 + src/kernel/mnemonics/_goto.php | 1 + src/kernel/mnemonics/_goto_w.php | 1 + src/kernel/mnemonics/_i2b.php | 1 + src/kernel/mnemonics/_i2c.php | 1 + src/kernel/mnemonics/_i2d.php | 1 + src/kernel/mnemonics/_i2f.php | 1 + src/kernel/mnemonics/_i2l.php | 1 + src/kernel/mnemonics/_i2s.php | 1 + src/kernel/mnemonics/_iadd.php | 3 ++- src/kernel/mnemonics/_iaload.php | 1 + src/kernel/mnemonics/_iand.php | 3 ++- src/kernel/mnemonics/_iastore.php | 1 + src/kernel/mnemonics/_iconst_0.php | 1 + src/kernel/mnemonics/_iconst_1.php | 1 + src/kernel/mnemonics/_iconst_2.php | 1 + src/kernel/mnemonics/_iconst_3.php | 1 + src/kernel/mnemonics/_iconst_4.php | 1 + src/kernel/mnemonics/_iconst_5.php | 1 + src/kernel/mnemonics/_iconst_m1.php | 1 + src/kernel/mnemonics/_idiv.php | 1 + src/kernel/mnemonics/_if_acmpeq.php | 1 + src/kernel/mnemonics/_if_acmpne.php | 1 + src/kernel/mnemonics/_if_icmpeq.php | 1 + src/kernel/mnemonics/_if_icmpge.php | 1 + src/kernel/mnemonics/_if_icmpgt.php | 1 + src/kernel/mnemonics/_if_icmple.php | 1 + src/kernel/mnemonics/_if_icmplt.php | 1 + src/kernel/mnemonics/_if_icmpne.php | 1 + src/kernel/mnemonics/_ifeq.php | 1 + src/kernel/mnemonics/_ifge.php | 1 + src/kernel/mnemonics/_ifgt.php | 1 + src/kernel/mnemonics/_ifle.php | 1 + src/kernel/mnemonics/_iflt.php | 1 + src/kernel/mnemonics/_ifne.php | 1 + src/kernel/mnemonics/_ifnonnull.php | 1 + src/kernel/mnemonics/_ifnull.php | 1 + src/kernel/mnemonics/_iinc.php | 1 + src/kernel/mnemonics/_iload.php | 1 + src/kernel/mnemonics/_iload_0.php | 1 + src/kernel/mnemonics/_iload_1.php | 1 + src/kernel/mnemonics/_iload_2.php | 1 + src/kernel/mnemonics/_iload_3.php | 1 + src/kernel/mnemonics/_impdep1.php | 1 + src/kernel/mnemonics/_impdep2.php | 1 + src/kernel/mnemonics/_imul.php | 3 ++- src/kernel/mnemonics/_ineg.php | 3 ++- src/kernel/mnemonics/_instanceof.php | 1 + src/kernel/mnemonics/_invokedynamic.php | 1 + src/kernel/mnemonics/_invokeinterface.php | 1 + src/kernel/mnemonics/_invokespecial.php | 1 + src/kernel/mnemonics/_invokestatic.php | 1 + src/kernel/mnemonics/_invokevirtual.php | 1 + src/kernel/mnemonics/_ior.php | 3 ++- src/kernel/mnemonics/_irem.php | 1 + src/kernel/mnemonics/_ireturn.php | 1 + src/kernel/mnemonics/_ishl.php | 3 ++- src/kernel/mnemonics/_ishr.php | 3 ++- src/kernel/mnemonics/_istore.php | 1 + src/kernel/mnemonics/_istore_0.php | 1 + src/kernel/mnemonics/_istore_1.php | 1 + src/kernel/mnemonics/_istore_2.php | 1 + src/kernel/mnemonics/_istore_3.php | 1 + src/kernel/mnemonics/_isub.php | 3 ++- src/kernel/mnemonics/_iushr.php | 3 ++- src/kernel/mnemonics/_ixor.php | 3 ++- src/kernel/mnemonics/_jsr.php | 1 + src/kernel/mnemonics/_jsr_w.php | 1 + src/kernel/mnemonics/_l2d.php | 1 + src/kernel/mnemonics/_l2f.php | 1 + src/kernel/mnemonics/_l2i.php | 1 + src/kernel/mnemonics/_ladd.php | 3 ++- src/kernel/mnemonics/_laload.php | 1 + src/kernel/mnemonics/_land.php | 3 ++- src/kernel/mnemonics/_lastore.php | 1 + src/kernel/mnemonics/_lcmp.php | 1 + src/kernel/mnemonics/_lconst_0.php | 1 + src/kernel/mnemonics/_lconst_1.php | 1 + src/kernel/mnemonics/_ldc.php | 1 + src/kernel/mnemonics/_ldc2_w.php | 1 + src/kernel/mnemonics/_ldc_w.php | 1 + src/kernel/mnemonics/_ldiv.php | 1 + src/kernel/mnemonics/_lload.php | 1 + src/kernel/mnemonics/_lload_0.php | 1 + src/kernel/mnemonics/_lload_1.php | 1 + src/kernel/mnemonics/_lload_2.php | 1 + src/kernel/mnemonics/_lload_3.php | 1 + src/kernel/mnemonics/_lmul.php | 3 ++- src/kernel/mnemonics/_lneg.php | 1 + src/kernel/mnemonics/_lookupswitch.php | 1 + src/kernel/mnemonics/_lor.php | 3 ++- src/kernel/mnemonics/_lrem.php | 1 + src/kernel/mnemonics/_lreturn.php | 1 + src/kernel/mnemonics/_lshl.php | 3 ++- src/kernel/mnemonics/_lshr.php | 3 ++- src/kernel/mnemonics/_lstore.php | 1 + src/kernel/mnemonics/_lstore_0.php | 1 + src/kernel/mnemonics/_lstore_1.php | 1 + src/kernel/mnemonics/_lstore_2.php | 1 + src/kernel/mnemonics/_lstore_3.php | 1 + src/kernel/mnemonics/_lsub.php | 3 ++- src/kernel/mnemonics/_lushr.php | 3 ++- src/kernel/mnemonics/_lxor.php | 1 + src/kernel/mnemonics/_monitorenter.php | 1 + src/kernel/mnemonics/_monitorexit.php | 1 + src/kernel/mnemonics/_multianewarray.php | 1 + src/kernel/mnemonics/_new.php | 1 + src/kernel/mnemonics/_newarray.php | 1 + src/kernel/mnemonics/_nop.php | 1 + src/kernel/mnemonics/_pop.php | 1 + src/kernel/mnemonics/_pop2.php | 1 + src/kernel/mnemonics/_putfield.php | 1 + src/kernel/mnemonics/_putstatic.php | 1 + src/kernel/mnemonics/_ret.php | 1 + src/kernel/mnemonics/_return.php | 1 + src/kernel/mnemonics/_saload.php | 1 + src/kernel/mnemonics/_sastore.php | 1 + src/kernel/mnemonics/_sipush.php | 1 + src/kernel/mnemonics/_swap.php | 1 + src/kernel/mnemonics/_tableswitch.php | 1 + src/kernel/mnemonics/_wide.php | 1 + src/utilities/.gitkeep | 0 src/utilities/BinaryTool.php | 7 +++++++ tools/copy.php | 4 +++- tools/copy_attr.php | 4 +++- 230 files changed, 284 insertions(+), 47 deletions(-) delete mode 100644 src/utilities/.gitkeep create mode 100644 src/utilities/BinaryTool.php diff --git a/src/kernel/attributes/AnnotationDefaultAttribute.php b/src/kernel/attributes/AnnotationDefaultAttribute.php index 242115f8..e079fdb9 100644 --- a/src/kernel/attributes/AnnotationDefaultAttribute.php +++ b/src/kernel/attributes/AnnotationDefaultAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class AnnotationDefaultAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/AttributeInfo.php b/src/kernel/attributes/AttributeInfo.php index 16eaa3ad..14786b9e 100644 --- a/src/kernel/attributes/AttributeInfo.php +++ b/src/kernel/attributes/AttributeInfo.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class AttributeInfo implements AttributeInterface { @@ -13,8 +14,8 @@ final class AttributeInfo implements AttributeInterface public function execute(): void { - $this->AttributeNameIndex = $this->getJavaBinaryStream()->readUnsignedShort(); - $this->AttributeLength = $this->getJavaBinaryStream()->readUnsignedInt(); + $this->AttributeNameIndex = $this->readUnsignedShort(); + $this->AttributeLength = $this->readUnsignedInt(); $cpInfo = $this->getCpInfo(); $classAttributeName = 'Java' . $cpInfo[$this->AttributeNameIndex]->getString() . 'Attribute'; $this->AttributeData = new $classAttributeName($Class); diff --git a/src/kernel/attributes/BootstrapMethodsAttribute.php b/src/kernel/attributes/BootstrapMethodsAttribute.php index 5bbc1d2b..1dd994e6 100644 --- a/src/kernel/attributes/BootstrapMethodsAttribute.php +++ b/src/kernel/attributes/BootstrapMethodsAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class BootstrapMethodsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/CodeAttribute.php b/src/kernel/attributes/CodeAttribute.php index dcaf8c6c..06f0d298 100644 --- a/src/kernel/attributes/CodeAttribute.php +++ b/src/kernel/attributes/CodeAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class CodeAttribute implements AttributeInterface { @@ -18,25 +19,25 @@ final class CodeAttribute implements AttributeInterface public function execute(): void { - $this->MaxStack = $this->getJavaBinaryStream()->readUnsignedShort(); - $this->MaxLocals = $this->getJavaBinaryStream()->readUnsignedShort(); - $this->CodeLength = $this->getJavaBinaryStream()->readUnsignedInt(); + $this->MaxStack = $this->readUnsignedShort(); + $this->MaxLocals = $this->readUnsignedShort(); + $this->CodeLength = $this->readUnsignedInt(); // read opcode $this->Code = array(); for ($i = 0; $i < $this->CodeLength; $i++) { - $this->Code[$i] = $this->getJavaBinaryStream()->readUnsignedByte(); + $this->Code[$i] = $this->readUnsignedByte(); $this->RawCode .= chr($this->Code[$i]); } // read exception table - $this->ExceptionTableLength = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->ExceptionTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->ExceptionTableLength; $i++) { $this->ExceptionTables[$i] = new JavaStructureExceptionTable($this); - $this->ExceptionTables[$i]->setStartPc($this->getJavaBinaryStream()->readUnsignedShort()); - $this->ExceptionTables[$i]->setEndPc($this->getJavaBinaryStream()->readUnsignedShort()); - $this->ExceptionTables[$i]->setHandlerPc($this->getJavaBinaryStream()->readUnsignedShort()); - $this->ExceptionTables[$i]->setCatchType($this->getJavaBinaryStream()->readUnsignedShort()); + $this->ExceptionTables[$i]->setStartPc($this->readUnsignedShort()); + $this->ExceptionTables[$i]->setEndPc($this->readUnsignedShort()); + $this->ExceptionTables[$i]->setHandlerPc($this->readUnsignedShort()); + $this->ExceptionTables[$i]->setCatchType($this->readUnsignedShort()); } - $this->AttributesCount = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->AttributesCount = $this->readUnsignedShort(); for ($i = 0; $i < $this->AttributesCount; $i++) { $this->AttributeInfo[] = new JavaAttributeInfo($this); } diff --git a/src/kernel/attributes/ConstantValueAttribute.php b/src/kernel/attributes/ConstantValueAttribute.php index 23b3ecda..2cc6eba3 100644 --- a/src/kernel/attributes/ConstantValueAttribute.php +++ b/src/kernel/attributes/ConstantValueAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class ConstantValueAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/DeprecatedAttribute.php b/src/kernel/attributes/DeprecatedAttribute.php index 4ad1e16a..0bd6b566 100644 --- a/src/kernel/attributes/DeprecatedAttribute.php +++ b/src/kernel/attributes/DeprecatedAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class DeprecatedAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/EnclosingMethodAttribute.php b/src/kernel/attributes/EnclosingMethodAttribute.php index 17f73340..cd9d9013 100644 --- a/src/kernel/attributes/EnclosingMethodAttribute.php +++ b/src/kernel/attributes/EnclosingMethodAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class EnclosingMethodAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/ExceptionsAttribute.php b/src/kernel/attributes/ExceptionsAttribute.php index 16c83cb2..a09f15d1 100644 --- a/src/kernel/attributes/ExceptionsAttribute.php +++ b/src/kernel/attributes/ExceptionsAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class ExceptionsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/InnerClassesAttribute.php b/src/kernel/attributes/InnerClassesAttribute.php index d5085a55..46d5d4ca 100644 --- a/src/kernel/attributes/InnerClassesAttribute.php +++ b/src/kernel/attributes/InnerClassesAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class InnerClassesAttribute implements AttributeInterface { @@ -16,16 +17,16 @@ public function execute(): void - $this->NumberOfClasses = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->NumberOfClasses = $this->readUnsignedShort(); for ($i = 0; $i < $this->NumberOfClasses; $i++) { $thises[$i] = new JavaStructureClasses($this); - $thises[$i]->setInnerClassInfoIndex($this->getJavaBinaryStream()->readUnsignedShort()); - $thises[$i]->setOuterClassInfoIndex($this->getJavaBinaryStream()->readUnsignedShort()); - $thises[$i]->setInnerNameIndex($this->getJavaBinaryStream()->readUnsignedShort()); - $thises[$i]->setInnerClassAccessFlag($this->getJavaBinaryStream()->readUnsignedShort()); + $thises[$i]->setInnerClassInfoIndex($this->readUnsignedShort()); + $thises[$i]->setOuterClassInfoIndex($this->readUnsignedShort()); + $thises[$i]->setInnerNameIndex($this->readUnsignedShort()); + $thises[$i]->setInnerClassAccessFlag($this->readUnsignedShort()); } diff --git a/src/kernel/attributes/LineNumberTableAttribute.php b/src/kernel/attributes/LineNumberTableAttribute.php index 48a97172..1f40fdb8 100644 --- a/src/kernel/attributes/LineNumberTableAttribute.php +++ b/src/kernel/attributes/LineNumberTableAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class LineNumberTableAttribute implements AttributeInterface { @@ -16,14 +17,14 @@ public function execute(): void - $this->LineNumberTableLength = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->LineNumberTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->LineNumberTableLength; $i++) { $this->LineNumberTables[$i] = new JavaStructureLineNumberTable($Class); - $this->LineNumberTables[$i]->setStartPc($this->getJavaBinaryStream()->readUnsignedShort()); - $this->LineNumberTables[$i]->setLineNumber($this->getJavaBinaryStream()->readUnsignedShort()); + $this->LineNumberTables[$i]->setStartPc($this->readUnsignedShort()); + $this->LineNumberTables[$i]->setLineNumber($this->readUnsignedShort()); } diff --git a/src/kernel/attributes/LocalVariableTableAttribute.php b/src/kernel/attributes/LocalVariableTableAttribute.php index 3a91e694..e79d5f5f 100644 --- a/src/kernel/attributes/LocalVariableTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTableAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class LocalVariableTableAttribute implements AttributeInterface { @@ -12,7 +13,7 @@ final class LocalVariableTableAttribute implements AttributeInterface public function execute(): void { - $this->LocalVariableTableLength = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->LocalVariableTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->LocalVariableTableLength; $i++) { $this->LocalVariableTables[] = new JavaStructureLocalVariableTable($Class); } diff --git a/src/kernel/attributes/LocalVariableTypeTableAttribute.php b/src/kernel/attributes/LocalVariableTypeTableAttribute.php index c94e0e8f..b41863de 100644 --- a/src/kernel/attributes/LocalVariableTypeTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTypeTableAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class LocalVariableTypeTableAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php index 3790918d..c93b1257 100644 --- a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class RuntimeInvisibleAnnotationsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php index 65b261d8..8a7f100e 100644 --- a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class RuntimeInvisibleParameterAnnotationsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php index 1860454d..2f8e4195 100644 --- a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class RuntimeVisibleAnnotationsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php index 147777d1..2756b89e 100644 --- a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class RuntimeVisibleParameterAnnotationsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/SignatureAttribute.php b/src/kernel/attributes/SignatureAttribute.php index eab86356..eb167615 100644 --- a/src/kernel/attributes/SignatureAttribute.php +++ b/src/kernel/attributes/SignatureAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class SignatureAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/SourceDebugExtensionAttribute.php b/src/kernel/attributes/SourceDebugExtensionAttribute.php index ea768dd7..cda02b23 100644 --- a/src/kernel/attributes/SourceDebugExtensionAttribute.php +++ b/src/kernel/attributes/SourceDebugExtensionAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class SourceDebugExtensionAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/SourceFileAttribute.php b/src/kernel/attributes/SourceFileAttribute.php index f1580fc9..9ed1b856 100644 --- a/src/kernel/attributes/SourceFileAttribute.php +++ b/src/kernel/attributes/SourceFileAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class SourceFileAttribute implements AttributeInterface { @@ -15,7 +16,7 @@ public function execute(): void - $this->SourceFileIndex = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->SourceFileIndex = $this->readUnsignedShort(); } diff --git a/src/kernel/attributes/StackMapTableAttribute.php b/src/kernel/attributes/StackMapTableAttribute.php index 239afc53..8f0d119c 100644 --- a/src/kernel/attributes/StackMapTableAttribute.php +++ b/src/kernel/attributes/StackMapTableAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class StackMapTableAttribute implements AttributeInterface { @@ -17,7 +18,7 @@ public function execute(): void - $this->NumberOfEntries = $this->getJavaBinaryStream()->readUnsignedShort(); + $this->NumberOfEntries = $this->readUnsignedShort(); for ($i = 0; $i < $this->NumberOfEntries; $i++) { diff --git a/src/kernel/attributes/SyntheticAttribute.php b/src/kernel/attributes/SyntheticAttribute.php index 5f4066fc..922fe21c 100644 --- a/src/kernel/attributes/SyntheticAttribute.php +++ b/src/kernel/attributes/SyntheticAttribute.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class SyntheticAttribute implements AttributeInterface { diff --git a/src/kernel/mnemonics/_aaload.php b/src/kernel/mnemonics/_aaload.php index 6aece844..1b4b8952 100644 --- a/src/kernel/mnemonics/_aaload.php +++ b/src/kernel/mnemonics/_aaload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _aaload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aastore.php b/src/kernel/mnemonics/_aastore.php index 8588fa0c..879a491d 100644 --- a/src/kernel/mnemonics/_aastore.php +++ b/src/kernel/mnemonics/_aastore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _aastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aconst_null.php b/src/kernel/mnemonics/_aconst_null.php index c0f044a0..1bc5924e 100644 --- a/src/kernel/mnemonics/_aconst_null.php +++ b/src/kernel/mnemonics/_aconst_null.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _aconst_null implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload.php b/src/kernel/mnemonics/_aload.php index b29d5fff..5948aff1 100644 --- a/src/kernel/mnemonics/_aload.php +++ b/src/kernel/mnemonics/_aload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _aload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload_0.php b/src/kernel/mnemonics/_aload_0.php index d864fc46..14e95556 100644 --- a/src/kernel/mnemonics/_aload_0.php +++ b/src/kernel/mnemonics/_aload_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _aload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload_1.php b/src/kernel/mnemonics/_aload_1.php index be5f3bd7..91b8cdfd 100644 --- a/src/kernel/mnemonics/_aload_1.php +++ b/src/kernel/mnemonics/_aload_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _aload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload_2.php b/src/kernel/mnemonics/_aload_2.php index 31ab83e7..a215dc7a 100644 --- a/src/kernel/mnemonics/_aload_2.php +++ b/src/kernel/mnemonics/_aload_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _aload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload_3.php b/src/kernel/mnemonics/_aload_3.php index 736ed4e3..da823b7c 100644 --- a/src/kernel/mnemonics/_aload_3.php +++ b/src/kernel/mnemonics/_aload_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _aload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_anewarray.php b/src/kernel/mnemonics/_anewarray.php index 2d583f78..e1e75269 100644 --- a/src/kernel/mnemonics/_anewarray.php +++ b/src/kernel/mnemonics/_anewarray.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _anewarray implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_areturn.php b/src/kernel/mnemonics/_areturn.php index f5b2e17c..e8988acf 100644 --- a/src/kernel/mnemonics/_areturn.php +++ b/src/kernel/mnemonics/_areturn.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _areturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_arraylength.php b/src/kernel/mnemonics/_arraylength.php index fa651902..66ff50b0 100644 --- a/src/kernel/mnemonics/_arraylength.php +++ b/src/kernel/mnemonics/_arraylength.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _arraylength implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore.php b/src/kernel/mnemonics/_astore.php index e2bf8c44..834e7656 100644 --- a/src/kernel/mnemonics/_astore.php +++ b/src/kernel/mnemonics/_astore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _astore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore_0.php b/src/kernel/mnemonics/_astore_0.php index 34ab7277..8121e519 100644 --- a/src/kernel/mnemonics/_astore_0.php +++ b/src/kernel/mnemonics/_astore_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _astore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore_1.php b/src/kernel/mnemonics/_astore_1.php index 7685380e..ccfb2fef 100644 --- a/src/kernel/mnemonics/_astore_1.php +++ b/src/kernel/mnemonics/_astore_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _astore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore_2.php b/src/kernel/mnemonics/_astore_2.php index b4dfaaa3..1361c21c 100644 --- a/src/kernel/mnemonics/_astore_2.php +++ b/src/kernel/mnemonics/_astore_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _astore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore_3.php b/src/kernel/mnemonics/_astore_3.php index 2fe1b0ad..7b3841ff 100644 --- a/src/kernel/mnemonics/_astore_3.php +++ b/src/kernel/mnemonics/_astore_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _astore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_athrow.php b/src/kernel/mnemonics/_athrow.php index ceffb1d0..6d7ce840 100644 --- a/src/kernel/mnemonics/_athrow.php +++ b/src/kernel/mnemonics/_athrow.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _athrow implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_baload.php b/src/kernel/mnemonics/_baload.php index cdbb8299..5352f104 100644 --- a/src/kernel/mnemonics/_baload.php +++ b/src/kernel/mnemonics/_baload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _baload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_bastore.php b/src/kernel/mnemonics/_bastore.php index f4b9eb44..5cbc879c 100644 --- a/src/kernel/mnemonics/_bastore.php +++ b/src/kernel/mnemonics/_bastore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _bastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_bipush.php b/src/kernel/mnemonics/_bipush.php index 56b48fe5..48994e34 100644 --- a/src/kernel/mnemonics/_bipush.php +++ b/src/kernel/mnemonics/_bipush.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _bipush implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_breakpoint.php b/src/kernel/mnemonics/_breakpoint.php index 9ee1d82c..8dc2ab7b 100644 --- a/src/kernel/mnemonics/_breakpoint.php +++ b/src/kernel/mnemonics/_breakpoint.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _breakpoint implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_caload.php b/src/kernel/mnemonics/_caload.php index 6f1662e9..ad67a330 100644 --- a/src/kernel/mnemonics/_caload.php +++ b/src/kernel/mnemonics/_caload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _caload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_castore.php b/src/kernel/mnemonics/_castore.php index 3f9084fd..171e66e3 100644 --- a/src/kernel/mnemonics/_castore.php +++ b/src/kernel/mnemonics/_castore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _castore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_checkcast.php b/src/kernel/mnemonics/_checkcast.php index 9b0f0f67..a4a642e1 100644 --- a/src/kernel/mnemonics/_checkcast.php +++ b/src/kernel/mnemonics/_checkcast.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _checkcast implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_d2f.php b/src/kernel/mnemonics/_d2f.php index b447da39..05b57e98 100644 --- a/src/kernel/mnemonics/_d2f.php +++ b/src/kernel/mnemonics/_d2f.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _d2f implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_d2i.php b/src/kernel/mnemonics/_d2i.php index 8a9b84e0..691f658e 100644 --- a/src/kernel/mnemonics/_d2i.php +++ b/src/kernel/mnemonics/_d2i.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _d2i implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_d2l.php b/src/kernel/mnemonics/_d2l.php index 8ee9c888..9b1fa3e3 100644 --- a/src/kernel/mnemonics/_d2l.php +++ b/src/kernel/mnemonics/_d2l.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _d2l implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dadd.php b/src/kernel/mnemonics/_dadd.php index 749d02d4..d6d20223 100644 --- a/src/kernel/mnemonics/_dadd.php +++ b/src/kernel/mnemonics/_dadd.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dadd implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::add($value1, $value2, 8)); + $this->pushStack(BinaryTool::add($value1, $value2, 8)); } diff --git a/src/kernel/mnemonics/_daload.php b/src/kernel/mnemonics/_daload.php index e605768f..63ed600e 100644 --- a/src/kernel/mnemonics/_daload.php +++ b/src/kernel/mnemonics/_daload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _daload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dastore.php b/src/kernel/mnemonics/_dastore.php index c3fb6a7d..5a3bdaa1 100644 --- a/src/kernel/mnemonics/_dastore.php +++ b/src/kernel/mnemonics/_dastore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dcmpg.php b/src/kernel/mnemonics/_dcmpg.php index fdbddf9a..86b4a95f 100644 --- a/src/kernel/mnemonics/_dcmpg.php +++ b/src/kernel/mnemonics/_dcmpg.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dcmpg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dcmpl.php b/src/kernel/mnemonics/_dcmpl.php index 10441b11..74b1ee80 100644 --- a/src/kernel/mnemonics/_dcmpl.php +++ b/src/kernel/mnemonics/_dcmpl.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dcmpl implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dconst_0.php b/src/kernel/mnemonics/_dconst_0.php index 345a61e3..597406bb 100644 --- a/src/kernel/mnemonics/_dconst_0.php +++ b/src/kernel/mnemonics/_dconst_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dconst_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dconst_1.php b/src/kernel/mnemonics/_dconst_1.php index 1a44bd5d..e38e07ed 100644 --- a/src/kernel/mnemonics/_dconst_1.php +++ b/src/kernel/mnemonics/_dconst_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dconst_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ddiv.php b/src/kernel/mnemonics/_ddiv.php index 008c5c95..50b1f8b3 100644 --- a/src/kernel/mnemonics/_ddiv.php +++ b/src/kernel/mnemonics/_ddiv.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ddiv implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload.php b/src/kernel/mnemonics/_dload.php index 4c11575c..574292af 100644 --- a/src/kernel/mnemonics/_dload.php +++ b/src/kernel/mnemonics/_dload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload_0.php b/src/kernel/mnemonics/_dload_0.php index c606f7e0..d4429b47 100644 --- a/src/kernel/mnemonics/_dload_0.php +++ b/src/kernel/mnemonics/_dload_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload_1.php b/src/kernel/mnemonics/_dload_1.php index 382d7625..03cc3d46 100644 --- a/src/kernel/mnemonics/_dload_1.php +++ b/src/kernel/mnemonics/_dload_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload_2.php b/src/kernel/mnemonics/_dload_2.php index 6d298df3..c91dbe7b 100644 --- a/src/kernel/mnemonics/_dload_2.php +++ b/src/kernel/mnemonics/_dload_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload_3.php b/src/kernel/mnemonics/_dload_3.php index 46735072..ebebfb7a 100644 --- a/src/kernel/mnemonics/_dload_3.php +++ b/src/kernel/mnemonics/_dload_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dmul.php b/src/kernel/mnemonics/_dmul.php index f1b80ab2..eb766faa 100644 --- a/src/kernel/mnemonics/_dmul.php +++ b/src/kernel/mnemonics/_dmul.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dmul implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::multiply($value1, $value2, 8)); + $this->pushStack(BinaryTool::multiply($value1, $value2, 8)); diff --git a/src/kernel/mnemonics/_dneg.php b/src/kernel/mnemonics/_dneg.php index 32d47a7c..6793464e 100644 --- a/src/kernel/mnemonics/_dneg.php +++ b/src/kernel/mnemonics/_dneg.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dneg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_drem.php b/src/kernel/mnemonics/_drem.php index fe5ed048..268d572a 100644 --- a/src/kernel/mnemonics/_drem.php +++ b/src/kernel/mnemonics/_drem.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _drem implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dreturn.php b/src/kernel/mnemonics/_dreturn.php index f9eb1fb6..c7383e28 100644 --- a/src/kernel/mnemonics/_dreturn.php +++ b/src/kernel/mnemonics/_dreturn.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dreturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dstore.php b/src/kernel/mnemonics/_dstore.php index edd994c6..a1f41767 100644 --- a/src/kernel/mnemonics/_dstore.php +++ b/src/kernel/mnemonics/_dstore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dstore implements MnemonicInterface { @@ -15,7 +16,7 @@ public function execute(): void $index = $this->getByteCodeStream()->readUnsignedByte(); $value = $this->getStack(); - $this->setLocalstorage($index, BinaryTools::convertDoubleToIEEE754($value)); + $this->setLocalstorage($index, BinaryTool::convertDoubleToIEEE754($value)); } diff --git a/src/kernel/mnemonics/_dstore_0.php b/src/kernel/mnemonics/_dstore_0.php index 564a591e..e5afde4e 100644 --- a/src/kernel/mnemonics/_dstore_0.php +++ b/src/kernel/mnemonics/_dstore_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dstore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dstore_1.php b/src/kernel/mnemonics/_dstore_1.php index b7445c22..6c8d1d73 100644 --- a/src/kernel/mnemonics/_dstore_1.php +++ b/src/kernel/mnemonics/_dstore_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dstore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dstore_2.php b/src/kernel/mnemonics/_dstore_2.php index ce0ea0cb..99f3bce4 100644 --- a/src/kernel/mnemonics/_dstore_2.php +++ b/src/kernel/mnemonics/_dstore_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dstore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dstore_3.php b/src/kernel/mnemonics/_dstore_3.php index 5bd183de..e4963a07 100644 --- a/src/kernel/mnemonics/_dstore_3.php +++ b/src/kernel/mnemonics/_dstore_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dstore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dsub.php b/src/kernel/mnemonics/_dsub.php index 4654b2df..1be01788 100644 --- a/src/kernel/mnemonics/_dsub.php +++ b/src/kernel/mnemonics/_dsub.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dsub implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $leftValue = $this->getStack(); $rightValue = $this->getStack(); - $this->pushStack(BinaryTools::sub($leftValue, $rightValue, 8)); + $this->pushStack(BinaryTool::sub($leftValue, $rightValue, 8)); } diff --git a/src/kernel/mnemonics/_dup.php b/src/kernel/mnemonics/_dup.php index a2b4d194..56bcf117 100644 --- a/src/kernel/mnemonics/_dup.php +++ b/src/kernel/mnemonics/_dup.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dup implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup2.php b/src/kernel/mnemonics/_dup2.php index c57377df..1e83657b 100644 --- a/src/kernel/mnemonics/_dup2.php +++ b/src/kernel/mnemonics/_dup2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dup2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup2_x1.php b/src/kernel/mnemonics/_dup2_x1.php index b897ce4d..5466fa77 100644 --- a/src/kernel/mnemonics/_dup2_x1.php +++ b/src/kernel/mnemonics/_dup2_x1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dup2_x1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup2_x2.php b/src/kernel/mnemonics/_dup2_x2.php index 99e71f76..108d95a8 100644 --- a/src/kernel/mnemonics/_dup2_x2.php +++ b/src/kernel/mnemonics/_dup2_x2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dup2_x2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup_x1.php b/src/kernel/mnemonics/_dup_x1.php index a1aeb691..4ba074f2 100644 --- a/src/kernel/mnemonics/_dup_x1.php +++ b/src/kernel/mnemonics/_dup_x1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dup_x1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup_x2.php b/src/kernel/mnemonics/_dup_x2.php index 1d74edaa..8ac33a5d 100644 --- a/src/kernel/mnemonics/_dup_x2.php +++ b/src/kernel/mnemonics/_dup_x2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _dup_x2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_f2d.php b/src/kernel/mnemonics/_f2d.php index ec276e51..c6b97d2b 100644 --- a/src/kernel/mnemonics/_f2d.php +++ b/src/kernel/mnemonics/_f2d.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _f2d implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_f2i.php b/src/kernel/mnemonics/_f2i.php index 976a196b..e7bf00b3 100644 --- a/src/kernel/mnemonics/_f2i.php +++ b/src/kernel/mnemonics/_f2i.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _f2i implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_f2l.php b/src/kernel/mnemonics/_f2l.php index c88c8fe9..f977243f 100644 --- a/src/kernel/mnemonics/_f2l.php +++ b/src/kernel/mnemonics/_f2l.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _f2l implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fadd.php b/src/kernel/mnemonics/_fadd.php index 7e445c87..6a324351 100644 --- a/src/kernel/mnemonics/_fadd.php +++ b/src/kernel/mnemonics/_fadd.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fadd implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_faload.php b/src/kernel/mnemonics/_faload.php index 5c13aa36..c9359085 100644 --- a/src/kernel/mnemonics/_faload.php +++ b/src/kernel/mnemonics/_faload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _faload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fastore.php b/src/kernel/mnemonics/_fastore.php index 02ec8f1a..33364f47 100644 --- a/src/kernel/mnemonics/_fastore.php +++ b/src/kernel/mnemonics/_fastore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fcmpg.php b/src/kernel/mnemonics/_fcmpg.php index 052f6a98..a5f661f3 100644 --- a/src/kernel/mnemonics/_fcmpg.php +++ b/src/kernel/mnemonics/_fcmpg.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fcmpg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fcmpl.php b/src/kernel/mnemonics/_fcmpl.php index 6ad1d32e..4223ed78 100644 --- a/src/kernel/mnemonics/_fcmpl.php +++ b/src/kernel/mnemonics/_fcmpl.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fcmpl implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fconst_0.php b/src/kernel/mnemonics/_fconst_0.php index a9e76273..6d029bcd 100644 --- a/src/kernel/mnemonics/_fconst_0.php +++ b/src/kernel/mnemonics/_fconst_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fconst_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fconst_1.php b/src/kernel/mnemonics/_fconst_1.php index 2bb37934..1cbdc66c 100644 --- a/src/kernel/mnemonics/_fconst_1.php +++ b/src/kernel/mnemonics/_fconst_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fconst_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fconst_2.php b/src/kernel/mnemonics/_fconst_2.php index c7e025b1..6ce8c3c2 100644 --- a/src/kernel/mnemonics/_fconst_2.php +++ b/src/kernel/mnemonics/_fconst_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fconst_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fdiv.php b/src/kernel/mnemonics/_fdiv.php index ce553543..ce9daeb5 100644 --- a/src/kernel/mnemonics/_fdiv.php +++ b/src/kernel/mnemonics/_fdiv.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fdiv implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload.php b/src/kernel/mnemonics/_fload.php index cf0c756c..ac5979f5 100644 --- a/src/kernel/mnemonics/_fload.php +++ b/src/kernel/mnemonics/_fload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload_0.php b/src/kernel/mnemonics/_fload_0.php index 95630d8e..e77328d0 100644 --- a/src/kernel/mnemonics/_fload_0.php +++ b/src/kernel/mnemonics/_fload_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload_1.php b/src/kernel/mnemonics/_fload_1.php index c514dc55..e0c9e383 100644 --- a/src/kernel/mnemonics/_fload_1.php +++ b/src/kernel/mnemonics/_fload_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload_2.php b/src/kernel/mnemonics/_fload_2.php index 1b75d3bc..a21cb452 100644 --- a/src/kernel/mnemonics/_fload_2.php +++ b/src/kernel/mnemonics/_fload_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload_3.php b/src/kernel/mnemonics/_fload_3.php index 2094feed..61fe6262 100644 --- a/src/kernel/mnemonics/_fload_3.php +++ b/src/kernel/mnemonics/_fload_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fmul.php b/src/kernel/mnemonics/_fmul.php index 54554b11..58840299 100644 --- a/src/kernel/mnemonics/_fmul.php +++ b/src/kernel/mnemonics/_fmul.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fmul implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fneg.php b/src/kernel/mnemonics/_fneg.php index 6228ea21..1c6b78ad 100644 --- a/src/kernel/mnemonics/_fneg.php +++ b/src/kernel/mnemonics/_fneg.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fneg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_frem.php b/src/kernel/mnemonics/_frem.php index 80d87e8e..6c431463 100644 --- a/src/kernel/mnemonics/_frem.php +++ b/src/kernel/mnemonics/_frem.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _frem implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_freturn.php b/src/kernel/mnemonics/_freturn.php index eb45682f..85158548 100644 --- a/src/kernel/mnemonics/_freturn.php +++ b/src/kernel/mnemonics/_freturn.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _freturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore.php b/src/kernel/mnemonics/_fstore.php index 842e7de6..26a66f5c 100644 --- a/src/kernel/mnemonics/_fstore.php +++ b/src/kernel/mnemonics/_fstore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fstore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore_0.php b/src/kernel/mnemonics/_fstore_0.php index 99bdb693..5f6171af 100644 --- a/src/kernel/mnemonics/_fstore_0.php +++ b/src/kernel/mnemonics/_fstore_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fstore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore_1.php b/src/kernel/mnemonics/_fstore_1.php index c1c8da64..ca4c1bd4 100644 --- a/src/kernel/mnemonics/_fstore_1.php +++ b/src/kernel/mnemonics/_fstore_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fstore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore_2.php b/src/kernel/mnemonics/_fstore_2.php index 28c4ff36..90afb34f 100644 --- a/src/kernel/mnemonics/_fstore_2.php +++ b/src/kernel/mnemonics/_fstore_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fstore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore_3.php b/src/kernel/mnemonics/_fstore_3.php index 3a720e12..f2aa8c21 100644 --- a/src/kernel/mnemonics/_fstore_3.php +++ b/src/kernel/mnemonics/_fstore_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fstore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fsub.php b/src/kernel/mnemonics/_fsub.php index 2d5d32b4..1d253956 100644 --- a/src/kernel/mnemonics/_fsub.php +++ b/src/kernel/mnemonics/_fsub.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _fsub implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_getfield.php b/src/kernel/mnemonics/_getfield.php index c0c63144..183c61eb 100644 --- a/src/kernel/mnemonics/_getfield.php +++ b/src/kernel/mnemonics/_getfield.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _getfield implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/mnemonics/_getstatic.php index df6c4e0a..85e6c363 100644 --- a/src/kernel/mnemonics/_getstatic.php +++ b/src/kernel/mnemonics/_getstatic.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _getstatic implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_goto.php b/src/kernel/mnemonics/_goto.php index a057ddaa..458b5220 100644 --- a/src/kernel/mnemonics/_goto.php +++ b/src/kernel/mnemonics/_goto.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _goto implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_goto_w.php b/src/kernel/mnemonics/_goto_w.php index a534efd0..04728454 100644 --- a/src/kernel/mnemonics/_goto_w.php +++ b/src/kernel/mnemonics/_goto_w.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _goto_w implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2b.php b/src/kernel/mnemonics/_i2b.php index 489cc532..843d99bc 100644 --- a/src/kernel/mnemonics/_i2b.php +++ b/src/kernel/mnemonics/_i2b.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _i2b implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2c.php b/src/kernel/mnemonics/_i2c.php index 4aef5589..bf2f0899 100644 --- a/src/kernel/mnemonics/_i2c.php +++ b/src/kernel/mnemonics/_i2c.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _i2c implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2d.php b/src/kernel/mnemonics/_i2d.php index 006f3017..596287aa 100644 --- a/src/kernel/mnemonics/_i2d.php +++ b/src/kernel/mnemonics/_i2d.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _i2d implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2f.php b/src/kernel/mnemonics/_i2f.php index 450f4fff..46d84850 100644 --- a/src/kernel/mnemonics/_i2f.php +++ b/src/kernel/mnemonics/_i2f.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _i2f implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2l.php b/src/kernel/mnemonics/_i2l.php index 0073709a..6fd90c13 100644 --- a/src/kernel/mnemonics/_i2l.php +++ b/src/kernel/mnemonics/_i2l.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _i2l implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2s.php b/src/kernel/mnemonics/_i2s.php index 1efbd0e0..6587f6ec 100644 --- a/src/kernel/mnemonics/_i2s.php +++ b/src/kernel/mnemonics/_i2s.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _i2s implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iadd.php b/src/kernel/mnemonics/_iadd.php index 824072fd..25415ae0 100644 --- a/src/kernel/mnemonics/_iadd.php +++ b/src/kernel/mnemonics/_iadd.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iadd implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $leftValue = $this->getStack(); $rightValue = $this->getStack(); - $this->pushStack(BinaryTools::add($leftValue, $rightValue, 4)); + $this->pushStack(BinaryTool::add($leftValue, $rightValue, 4)); } diff --git a/src/kernel/mnemonics/_iaload.php b/src/kernel/mnemonics/_iaload.php index 94301ad0..5dfc63e2 100644 --- a/src/kernel/mnemonics/_iaload.php +++ b/src/kernel/mnemonics/_iaload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iaload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iand.php b/src/kernel/mnemonics/_iand.php index 291a0eda..7dbc6990 100644 --- a/src/kernel/mnemonics/_iand.php +++ b/src/kernel/mnemonics/_iand.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iand implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::andBits($value1, $value2, 4)); + $this->pushStack(BinaryTool::andBits($value1, $value2, 4)); } diff --git a/src/kernel/mnemonics/_iastore.php b/src/kernel/mnemonics/_iastore.php index cad0f5d5..ea2ea4e1 100644 --- a/src/kernel/mnemonics/_iastore.php +++ b/src/kernel/mnemonics/_iastore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_0.php b/src/kernel/mnemonics/_iconst_0.php index de29a060..f3e40216 100644 --- a/src/kernel/mnemonics/_iconst_0.php +++ b/src/kernel/mnemonics/_iconst_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iconst_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_1.php b/src/kernel/mnemonics/_iconst_1.php index f8544c6c..cdbb4a90 100644 --- a/src/kernel/mnemonics/_iconst_1.php +++ b/src/kernel/mnemonics/_iconst_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iconst_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_2.php b/src/kernel/mnemonics/_iconst_2.php index cfc9ffa4..39327302 100644 --- a/src/kernel/mnemonics/_iconst_2.php +++ b/src/kernel/mnemonics/_iconst_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iconst_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_3.php b/src/kernel/mnemonics/_iconst_3.php index 12f83606..a34a4554 100644 --- a/src/kernel/mnemonics/_iconst_3.php +++ b/src/kernel/mnemonics/_iconst_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iconst_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_4.php b/src/kernel/mnemonics/_iconst_4.php index 0343fd68..12099ed1 100644 --- a/src/kernel/mnemonics/_iconst_4.php +++ b/src/kernel/mnemonics/_iconst_4.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iconst_4 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_5.php b/src/kernel/mnemonics/_iconst_5.php index a6a006a6..7afd4c36 100644 --- a/src/kernel/mnemonics/_iconst_5.php +++ b/src/kernel/mnemonics/_iconst_5.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iconst_5 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_m1.php b/src/kernel/mnemonics/_iconst_m1.php index 5421dd62..829cbb72 100644 --- a/src/kernel/mnemonics/_iconst_m1.php +++ b/src/kernel/mnemonics/_iconst_m1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iconst_m1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_idiv.php b/src/kernel/mnemonics/_idiv.php index 531c72fb..7bd4dc6a 100644 --- a/src/kernel/mnemonics/_idiv.php +++ b/src/kernel/mnemonics/_idiv.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _idiv implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_acmpeq.php b/src/kernel/mnemonics/_if_acmpeq.php index 007f0d21..7acb913f 100644 --- a/src/kernel/mnemonics/_if_acmpeq.php +++ b/src/kernel/mnemonics/_if_acmpeq.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _if_acmpeq implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_acmpne.php b/src/kernel/mnemonics/_if_acmpne.php index 1433f705..d7318fff 100644 --- a/src/kernel/mnemonics/_if_acmpne.php +++ b/src/kernel/mnemonics/_if_acmpne.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _if_acmpne implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmpeq.php b/src/kernel/mnemonics/_if_icmpeq.php index 4419886a..3c095335 100644 --- a/src/kernel/mnemonics/_if_icmpeq.php +++ b/src/kernel/mnemonics/_if_icmpeq.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _if_icmpeq implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmpge.php b/src/kernel/mnemonics/_if_icmpge.php index 00c8fdb9..1000d9ef 100644 --- a/src/kernel/mnemonics/_if_icmpge.php +++ b/src/kernel/mnemonics/_if_icmpge.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _if_icmpge implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmpgt.php b/src/kernel/mnemonics/_if_icmpgt.php index ff3365c6..94332326 100644 --- a/src/kernel/mnemonics/_if_icmpgt.php +++ b/src/kernel/mnemonics/_if_icmpgt.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _if_icmpgt implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmple.php b/src/kernel/mnemonics/_if_icmple.php index c01e8562..76023e12 100644 --- a/src/kernel/mnemonics/_if_icmple.php +++ b/src/kernel/mnemonics/_if_icmple.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _if_icmple implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmplt.php b/src/kernel/mnemonics/_if_icmplt.php index d720ff1e..83981528 100644 --- a/src/kernel/mnemonics/_if_icmplt.php +++ b/src/kernel/mnemonics/_if_icmplt.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _if_icmplt implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmpne.php b/src/kernel/mnemonics/_if_icmpne.php index 02d5f604..2e63b83c 100644 --- a/src/kernel/mnemonics/_if_icmpne.php +++ b/src/kernel/mnemonics/_if_icmpne.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _if_icmpne implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifeq.php b/src/kernel/mnemonics/_ifeq.php index a9130e98..7ec066a4 100644 --- a/src/kernel/mnemonics/_ifeq.php +++ b/src/kernel/mnemonics/_ifeq.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ifeq implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifge.php b/src/kernel/mnemonics/_ifge.php index 26c69da4..8767df31 100644 --- a/src/kernel/mnemonics/_ifge.php +++ b/src/kernel/mnemonics/_ifge.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ifge implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifgt.php b/src/kernel/mnemonics/_ifgt.php index 813eb1a5..91121a82 100644 --- a/src/kernel/mnemonics/_ifgt.php +++ b/src/kernel/mnemonics/_ifgt.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ifgt implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifle.php b/src/kernel/mnemonics/_ifle.php index 75af4e36..018464b7 100644 --- a/src/kernel/mnemonics/_ifle.php +++ b/src/kernel/mnemonics/_ifle.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ifle implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iflt.php b/src/kernel/mnemonics/_iflt.php index 7f1cda72..7f786798 100644 --- a/src/kernel/mnemonics/_iflt.php +++ b/src/kernel/mnemonics/_iflt.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iflt implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifne.php b/src/kernel/mnemonics/_ifne.php index 706d4bc0..681e3213 100644 --- a/src/kernel/mnemonics/_ifne.php +++ b/src/kernel/mnemonics/_ifne.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ifne implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifnonnull.php b/src/kernel/mnemonics/_ifnonnull.php index dfefb1e1..1a5da12d 100644 --- a/src/kernel/mnemonics/_ifnonnull.php +++ b/src/kernel/mnemonics/_ifnonnull.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ifnonnull implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifnull.php b/src/kernel/mnemonics/_ifnull.php index 338c2059..3db7ca68 100644 --- a/src/kernel/mnemonics/_ifnull.php +++ b/src/kernel/mnemonics/_ifnull.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ifnull implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iinc.php b/src/kernel/mnemonics/_iinc.php index ec7ae4bc..6b8085a6 100644 --- a/src/kernel/mnemonics/_iinc.php +++ b/src/kernel/mnemonics/_iinc.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iinc implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload.php b/src/kernel/mnemonics/_iload.php index 3e2242a4..516d6770 100644 --- a/src/kernel/mnemonics/_iload.php +++ b/src/kernel/mnemonics/_iload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload_0.php b/src/kernel/mnemonics/_iload_0.php index 5252a940..d609b141 100644 --- a/src/kernel/mnemonics/_iload_0.php +++ b/src/kernel/mnemonics/_iload_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload_1.php b/src/kernel/mnemonics/_iload_1.php index 65ccefb3..dff4d01e 100644 --- a/src/kernel/mnemonics/_iload_1.php +++ b/src/kernel/mnemonics/_iload_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload_2.php b/src/kernel/mnemonics/_iload_2.php index 79253c9a..173044ac 100644 --- a/src/kernel/mnemonics/_iload_2.php +++ b/src/kernel/mnemonics/_iload_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload_3.php b/src/kernel/mnemonics/_iload_3.php index 7b1bca64..6d98ca4b 100644 --- a/src/kernel/mnemonics/_iload_3.php +++ b/src/kernel/mnemonics/_iload_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_impdep1.php b/src/kernel/mnemonics/_impdep1.php index 1bff6a92..af8db5b6 100644 --- a/src/kernel/mnemonics/_impdep1.php +++ b/src/kernel/mnemonics/_impdep1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _impdep1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_impdep2.php b/src/kernel/mnemonics/_impdep2.php index 4070f194..6e17b600 100644 --- a/src/kernel/mnemonics/_impdep2.php +++ b/src/kernel/mnemonics/_impdep2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _impdep2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_imul.php b/src/kernel/mnemonics/_imul.php index f256fa16..5b23c344 100644 --- a/src/kernel/mnemonics/_imul.php +++ b/src/kernel/mnemonics/_imul.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _imul implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::multiply($value1, $value2, 4)); + $this->pushStack(BinaryTool::multiply($value1, $value2, 4)); } diff --git a/src/kernel/mnemonics/_ineg.php b/src/kernel/mnemonics/_ineg.php index 8dffba40..7e5dd25b 100644 --- a/src/kernel/mnemonics/_ineg.php +++ b/src/kernel/mnemonics/_ineg.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ineg implements MnemonicInterface { @@ -11,7 +12,7 @@ public function execute(): void { $value = $this->getStack(); - $this->pushStack(BinaryTools::negate($value, 4)); + $this->pushStack(BinaryTool::negate($value, 4)); } diff --git a/src/kernel/mnemonics/_instanceof.php b/src/kernel/mnemonics/_instanceof.php index 47d581ea..bb00340e 100644 --- a/src/kernel/mnemonics/_instanceof.php +++ b/src/kernel/mnemonics/_instanceof.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _instanceof implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokedynamic.php b/src/kernel/mnemonics/_invokedynamic.php index 0975a111..4937936f 100644 --- a/src/kernel/mnemonics/_invokedynamic.php +++ b/src/kernel/mnemonics/_invokedynamic.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _invokedynamic implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokeinterface.php b/src/kernel/mnemonics/_invokeinterface.php index 84d91f37..15630b0d 100644 --- a/src/kernel/mnemonics/_invokeinterface.php +++ b/src/kernel/mnemonics/_invokeinterface.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _invokeinterface implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokespecial.php b/src/kernel/mnemonics/_invokespecial.php index 7d994a87..cb39c492 100644 --- a/src/kernel/mnemonics/_invokespecial.php +++ b/src/kernel/mnemonics/_invokespecial.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _invokespecial implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokestatic.php b/src/kernel/mnemonics/_invokestatic.php index 49d8219b..a7660b88 100644 --- a/src/kernel/mnemonics/_invokestatic.php +++ b/src/kernel/mnemonics/_invokestatic.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _invokestatic implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index d2d3f14b..5299eaa6 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _invokevirtual implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ior.php b/src/kernel/mnemonics/_ior.php index ac85a405..8597c286 100644 --- a/src/kernel/mnemonics/_ior.php +++ b/src/kernel/mnemonics/_ior.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ior implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::orBits($value1, $value2, 4)); + $this->pushStack(BinaryTool::orBits($value1, $value2, 4)); } diff --git a/src/kernel/mnemonics/_irem.php b/src/kernel/mnemonics/_irem.php index 28eee91b..e101d334 100644 --- a/src/kernel/mnemonics/_irem.php +++ b/src/kernel/mnemonics/_irem.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _irem implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ireturn.php b/src/kernel/mnemonics/_ireturn.php index c693518e..bbd3433c 100644 --- a/src/kernel/mnemonics/_ireturn.php +++ b/src/kernel/mnemonics/_ireturn.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ireturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ishl.php b/src/kernel/mnemonics/_ishl.php index 887e80cb..64eda264 100644 --- a/src/kernel/mnemonics/_ishl.php +++ b/src/kernel/mnemonics/_ishl.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ishl implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::shiftLeft($value1, $value2, 4)); + $this->pushStack(BinaryTool::shiftLeft($value1, $value2, 4)); } diff --git a/src/kernel/mnemonics/_ishr.php b/src/kernel/mnemonics/_ishr.php index ff050d85..d454d353 100644 --- a/src/kernel/mnemonics/_ishr.php +++ b/src/kernel/mnemonics/_ishr.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ishr implements MnemonicInterface { @@ -13,7 +14,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::shiftRight($value1, $value2, 4)); + $this->pushStack(BinaryTool::shiftRight($value1, $value2, 4)); } diff --git a/src/kernel/mnemonics/_istore.php b/src/kernel/mnemonics/_istore.php index ae604c3c..a4849e5f 100644 --- a/src/kernel/mnemonics/_istore.php +++ b/src/kernel/mnemonics/_istore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _istore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_istore_0.php b/src/kernel/mnemonics/_istore_0.php index 7c1dc337..77d834c7 100644 --- a/src/kernel/mnemonics/_istore_0.php +++ b/src/kernel/mnemonics/_istore_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _istore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_istore_1.php b/src/kernel/mnemonics/_istore_1.php index 06d50c73..d86090fa 100644 --- a/src/kernel/mnemonics/_istore_1.php +++ b/src/kernel/mnemonics/_istore_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _istore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_istore_2.php b/src/kernel/mnemonics/_istore_2.php index fef10eb2..4216db44 100644 --- a/src/kernel/mnemonics/_istore_2.php +++ b/src/kernel/mnemonics/_istore_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _istore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_istore_3.php b/src/kernel/mnemonics/_istore_3.php index 0bf204b7..07fa510f 100644 --- a/src/kernel/mnemonics/_istore_3.php +++ b/src/kernel/mnemonics/_istore_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _istore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_isub.php b/src/kernel/mnemonics/_isub.php index c0ef56d6..ec676a87 100644 --- a/src/kernel/mnemonics/_isub.php +++ b/src/kernel/mnemonics/_isub.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _isub implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $leftValue = $this->getStack(); $rightValue = $this->getStack(); - $this->pushStack(BinaryTools::sub($leftValue, $rightValue, 4)); + $this->pushStack(BinaryTool::sub($leftValue, $rightValue, 4)); } diff --git a/src/kernel/mnemonics/_iushr.php b/src/kernel/mnemonics/_iushr.php index eeff4f4f..d7571250 100644 --- a/src/kernel/mnemonics/_iushr.php +++ b/src/kernel/mnemonics/_iushr.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _iushr implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::unsignedShiftRight($value1, $value2, 4)); + $this->pushStack(BinaryTool::unsignedShiftRight($value1, $value2, 4)); } diff --git a/src/kernel/mnemonics/_ixor.php b/src/kernel/mnemonics/_ixor.php index 3e7f5833..074a5bb7 100644 --- a/src/kernel/mnemonics/_ixor.php +++ b/src/kernel/mnemonics/_ixor.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ixor implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::xorBits($value1, $value2, 4)); + $this->pushStack(BinaryTool::xorBits($value1, $value2, 4)); } diff --git a/src/kernel/mnemonics/_jsr.php b/src/kernel/mnemonics/_jsr.php index 421088bd..3923d3d4 100644 --- a/src/kernel/mnemonics/_jsr.php +++ b/src/kernel/mnemonics/_jsr.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _jsr implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_jsr_w.php b/src/kernel/mnemonics/_jsr_w.php index 91673a2c..8a578a71 100644 --- a/src/kernel/mnemonics/_jsr_w.php +++ b/src/kernel/mnemonics/_jsr_w.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _jsr_w implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_l2d.php b/src/kernel/mnemonics/_l2d.php index 93114fa9..182ace35 100644 --- a/src/kernel/mnemonics/_l2d.php +++ b/src/kernel/mnemonics/_l2d.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _l2d implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_l2f.php b/src/kernel/mnemonics/_l2f.php index 6506c52c..5387c8f8 100644 --- a/src/kernel/mnemonics/_l2f.php +++ b/src/kernel/mnemonics/_l2f.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _l2f implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_l2i.php b/src/kernel/mnemonics/_l2i.php index 6387bb1f..717f5af7 100644 --- a/src/kernel/mnemonics/_l2i.php +++ b/src/kernel/mnemonics/_l2i.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _l2i implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ladd.php b/src/kernel/mnemonics/_ladd.php index cf71aef8..f2d41aa3 100644 --- a/src/kernel/mnemonics/_ladd.php +++ b/src/kernel/mnemonics/_ladd.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ladd implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::add($value1, $value2, 8)); + $this->pushStack(BinaryTool::add($value1, $value2, 8)); } diff --git a/src/kernel/mnemonics/_laload.php b/src/kernel/mnemonics/_laload.php index a202ff5c..6f0b79b9 100644 --- a/src/kernel/mnemonics/_laload.php +++ b/src/kernel/mnemonics/_laload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _laload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_land.php b/src/kernel/mnemonics/_land.php index 22d57f22..c0076ff2 100644 --- a/src/kernel/mnemonics/_land.php +++ b/src/kernel/mnemonics/_land.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _land implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::andBits($value1, $value2, 8)); + $this->pushStack(BinaryTool::andBits($value1, $value2, 8)); } diff --git a/src/kernel/mnemonics/_lastore.php b/src/kernel/mnemonics/_lastore.php index b3f4c118..eaad9c60 100644 --- a/src/kernel/mnemonics/_lastore.php +++ b/src/kernel/mnemonics/_lastore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lcmp.php b/src/kernel/mnemonics/_lcmp.php index f644f4db..11876f79 100644 --- a/src/kernel/mnemonics/_lcmp.php +++ b/src/kernel/mnemonics/_lcmp.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lcmp implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lconst_0.php b/src/kernel/mnemonics/_lconst_0.php index 56e08ee0..eb984e51 100644 --- a/src/kernel/mnemonics/_lconst_0.php +++ b/src/kernel/mnemonics/_lconst_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lconst_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lconst_1.php b/src/kernel/mnemonics/_lconst_1.php index bae4779b..2895ccd8 100644 --- a/src/kernel/mnemonics/_lconst_1.php +++ b/src/kernel/mnemonics/_lconst_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lconst_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ldc.php b/src/kernel/mnemonics/_ldc.php index a2bd7618..bdf45b86 100644 --- a/src/kernel/mnemonics/_ldc.php +++ b/src/kernel/mnemonics/_ldc.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ldc implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ldc2_w.php b/src/kernel/mnemonics/_ldc2_w.php index 9e3894ec..7dd8e49c 100644 --- a/src/kernel/mnemonics/_ldc2_w.php +++ b/src/kernel/mnemonics/_ldc2_w.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ldc2_w implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ldc_w.php b/src/kernel/mnemonics/_ldc_w.php index cda67137..cf1a9876 100644 --- a/src/kernel/mnemonics/_ldc_w.php +++ b/src/kernel/mnemonics/_ldc_w.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ldc_w implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ldiv.php b/src/kernel/mnemonics/_ldiv.php index 32ce0726..f312a843 100644 --- a/src/kernel/mnemonics/_ldiv.php +++ b/src/kernel/mnemonics/_ldiv.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ldiv implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload.php b/src/kernel/mnemonics/_lload.php index 05bb4a27..ffbc272d 100644 --- a/src/kernel/mnemonics/_lload.php +++ b/src/kernel/mnemonics/_lload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload_0.php b/src/kernel/mnemonics/_lload_0.php index 8e8ecd74..d4b4dfb7 100644 --- a/src/kernel/mnemonics/_lload_0.php +++ b/src/kernel/mnemonics/_lload_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload_1.php b/src/kernel/mnemonics/_lload_1.php index c4086b3c..6a306eeb 100644 --- a/src/kernel/mnemonics/_lload_1.php +++ b/src/kernel/mnemonics/_lload_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload_2.php b/src/kernel/mnemonics/_lload_2.php index 8d37869d..658ec7ae 100644 --- a/src/kernel/mnemonics/_lload_2.php +++ b/src/kernel/mnemonics/_lload_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload_3.php b/src/kernel/mnemonics/_lload_3.php index f94d6d4a..b3502fb1 100644 --- a/src/kernel/mnemonics/_lload_3.php +++ b/src/kernel/mnemonics/_lload_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lmul.php b/src/kernel/mnemonics/_lmul.php index 0856fe10..d20ea660 100644 --- a/src/kernel/mnemonics/_lmul.php +++ b/src/kernel/mnemonics/_lmul.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lmul implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::multiply($value1, $value2, 8)); + $this->pushStack(BinaryTool::multiply($value1, $value2, 8)); } diff --git a/src/kernel/mnemonics/_lneg.php b/src/kernel/mnemonics/_lneg.php index dcbd3f5c..fce9e150 100644 --- a/src/kernel/mnemonics/_lneg.php +++ b/src/kernel/mnemonics/_lneg.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lneg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lookupswitch.php b/src/kernel/mnemonics/_lookupswitch.php index 8a755a81..844eab73 100644 --- a/src/kernel/mnemonics/_lookupswitch.php +++ b/src/kernel/mnemonics/_lookupswitch.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lookupswitch implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lor.php b/src/kernel/mnemonics/_lor.php index baba418d..5742cdf3 100644 --- a/src/kernel/mnemonics/_lor.php +++ b/src/kernel/mnemonics/_lor.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lor implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::orBits($value1, $value2, 8)); + $this->pushStack(BinaryTool::orBits($value1, $value2, 8)); } diff --git a/src/kernel/mnemonics/_lrem.php b/src/kernel/mnemonics/_lrem.php index 970b512a..0638099c 100644 --- a/src/kernel/mnemonics/_lrem.php +++ b/src/kernel/mnemonics/_lrem.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lrem implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lreturn.php b/src/kernel/mnemonics/_lreturn.php index a3a5b11e..bb940a48 100644 --- a/src/kernel/mnemonics/_lreturn.php +++ b/src/kernel/mnemonics/_lreturn.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lreturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lshl.php b/src/kernel/mnemonics/_lshl.php index a1234e62..6d1d9846 100644 --- a/src/kernel/mnemonics/_lshl.php +++ b/src/kernel/mnemonics/_lshl.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lshl implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::shiftLeft($value1, $value2, 8)); + $this->pushStack(BinaryTool::shiftLeft($value1, $value2, 8)); } diff --git a/src/kernel/mnemonics/_lshr.php b/src/kernel/mnemonics/_lshr.php index cf77b7ee..de2e3d15 100644 --- a/src/kernel/mnemonics/_lshr.php +++ b/src/kernel/mnemonics/_lshr.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lshr implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::shiftRight($value1, $value2, 8)); + $this->pushStack(BinaryTool::shiftRight($value1, $value2, 8)); } diff --git a/src/kernel/mnemonics/_lstore.php b/src/kernel/mnemonics/_lstore.php index 297ff83c..4593af8f 100644 --- a/src/kernel/mnemonics/_lstore.php +++ b/src/kernel/mnemonics/_lstore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lstore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lstore_0.php b/src/kernel/mnemonics/_lstore_0.php index d82594cd..44c82078 100644 --- a/src/kernel/mnemonics/_lstore_0.php +++ b/src/kernel/mnemonics/_lstore_0.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lstore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lstore_1.php b/src/kernel/mnemonics/_lstore_1.php index 0157747f..6ea939bd 100644 --- a/src/kernel/mnemonics/_lstore_1.php +++ b/src/kernel/mnemonics/_lstore_1.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lstore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lstore_2.php b/src/kernel/mnemonics/_lstore_2.php index 52f692f6..15993916 100644 --- a/src/kernel/mnemonics/_lstore_2.php +++ b/src/kernel/mnemonics/_lstore_2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lstore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lstore_3.php b/src/kernel/mnemonics/_lstore_3.php index c8b056f7..c3a535ad 100644 --- a/src/kernel/mnemonics/_lstore_3.php +++ b/src/kernel/mnemonics/_lstore_3.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lstore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lsub.php b/src/kernel/mnemonics/_lsub.php index 9f0e1ff9..504b9315 100644 --- a/src/kernel/mnemonics/_lsub.php +++ b/src/kernel/mnemonics/_lsub.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lsub implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::sub($value1, $value2, 8)); + $this->pushStack(BinaryTool::sub($value1, $value2, 8)); } diff --git a/src/kernel/mnemonics/_lushr.php b/src/kernel/mnemonics/_lushr.php index 2debcadb..0646e61a 100644 --- a/src/kernel/mnemonics/_lushr.php +++ b/src/kernel/mnemonics/_lushr.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lushr implements MnemonicInterface { @@ -12,7 +13,7 @@ public function execute(): void $value1 = $this->getStack(); $value2 = $this->getStack(); - $this->pushStack(BinaryTools::unsignedShiftRight($value1, $value2, 8)); + $this->pushStack(BinaryTool::unsignedShiftRight($value1, $value2, 8)); } diff --git a/src/kernel/mnemonics/_lxor.php b/src/kernel/mnemonics/_lxor.php index db128558..e0b00dc6 100644 --- a/src/kernel/mnemonics/_lxor.php +++ b/src/kernel/mnemonics/_lxor.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _lxor implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_monitorenter.php b/src/kernel/mnemonics/_monitorenter.php index 1e9ab341..e8741e8c 100644 --- a/src/kernel/mnemonics/_monitorenter.php +++ b/src/kernel/mnemonics/_monitorenter.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _monitorenter implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_monitorexit.php b/src/kernel/mnemonics/_monitorexit.php index 68b570cd..f5ca89cc 100644 --- a/src/kernel/mnemonics/_monitorexit.php +++ b/src/kernel/mnemonics/_monitorexit.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _monitorexit implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_multianewarray.php b/src/kernel/mnemonics/_multianewarray.php index 13aeaa20..df8fb7ad 100644 --- a/src/kernel/mnemonics/_multianewarray.php +++ b/src/kernel/mnemonics/_multianewarray.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _multianewarray implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_new.php b/src/kernel/mnemonics/_new.php index 2c8a6de2..6ffe09e8 100644 --- a/src/kernel/mnemonics/_new.php +++ b/src/kernel/mnemonics/_new.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _new implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_newarray.php b/src/kernel/mnemonics/_newarray.php index d7a4087d..f3bc3937 100644 --- a/src/kernel/mnemonics/_newarray.php +++ b/src/kernel/mnemonics/_newarray.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _newarray implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_nop.php b/src/kernel/mnemonics/_nop.php index 9430451e..506d08a0 100644 --- a/src/kernel/mnemonics/_nop.php +++ b/src/kernel/mnemonics/_nop.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _nop implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_pop.php b/src/kernel/mnemonics/_pop.php index 1c146343..9f8db312 100644 --- a/src/kernel/mnemonics/_pop.php +++ b/src/kernel/mnemonics/_pop.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _pop implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_pop2.php b/src/kernel/mnemonics/_pop2.php index 629c1740..868c9471 100644 --- a/src/kernel/mnemonics/_pop2.php +++ b/src/kernel/mnemonics/_pop2.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _pop2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_putfield.php b/src/kernel/mnemonics/_putfield.php index eb4d1be9..e0b846fa 100644 --- a/src/kernel/mnemonics/_putfield.php +++ b/src/kernel/mnemonics/_putfield.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _putfield implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_putstatic.php b/src/kernel/mnemonics/_putstatic.php index 8ef9a1dc..5f2bb0e6 100644 --- a/src/kernel/mnemonics/_putstatic.php +++ b/src/kernel/mnemonics/_putstatic.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _putstatic implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ret.php b/src/kernel/mnemonics/_ret.php index 03c318eb..108c5cc3 100644 --- a/src/kernel/mnemonics/_ret.php +++ b/src/kernel/mnemonics/_ret.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _ret implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_return.php b/src/kernel/mnemonics/_return.php index fc1d6654..b920a83b 100644 --- a/src/kernel/mnemonics/_return.php +++ b/src/kernel/mnemonics/_return.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _return implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_saload.php b/src/kernel/mnemonics/_saload.php index 0a112f9b..a9fd9c9a 100644 --- a/src/kernel/mnemonics/_saload.php +++ b/src/kernel/mnemonics/_saload.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _saload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_sastore.php b/src/kernel/mnemonics/_sastore.php index 869e4186..5e7aecfb 100644 --- a/src/kernel/mnemonics/_sastore.php +++ b/src/kernel/mnemonics/_sastore.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _sastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_sipush.php b/src/kernel/mnemonics/_sipush.php index 64d079ba..b61d23e9 100644 --- a/src/kernel/mnemonics/_sipush.php +++ b/src/kernel/mnemonics/_sipush.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _sipush implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_swap.php b/src/kernel/mnemonics/_swap.php index 991bb0c1..0ba88a15 100644 --- a/src/kernel/mnemonics/_swap.php +++ b/src/kernel/mnemonics/_swap.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _swap implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_tableswitch.php b/src/kernel/mnemonics/_tableswitch.php index e5f346fe..5a73fb38 100644 --- a/src/kernel/mnemonics/_tableswitch.php +++ b/src/kernel/mnemonics/_tableswitch.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _tableswitch implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_wide.php b/src/kernel/mnemonics/_wide.php index 1cfef072..045722dd 100644 --- a/src/kernel/mnemonics/_wide.php +++ b/src/kernel/mnemonics/_wide.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; +use \PHPJava\Kernel\Utilities\BinaryTool; final class _wide implements MnemonicInterface { diff --git a/src/utilities/.gitkeep b/src/utilities/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/utilities/BinaryTool.php b/src/utilities/BinaryTool.php new file mode 100644 index 00000000..d8f89aad --- /dev/null +++ b/src/utilities/BinaryTool.php @@ -0,0 +1,7 @@ +Class', '$this', $a); + $a = str_replace('BinaryTools::', 'BinaryTool::', $a); + $a = str_replace('getJavaBinaryStream()->', '', $a); var_dump($class, $a); file_put_contents(__DIR__ . '/../src/kernel/attributes/' . $class, $a . "\n"); } \ No newline at end of file From fe0479d0c5ce85df781a6a7e59e84ab936077c40 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 14:04:16 +0900 Subject: [PATCH 10/96] Add Java structure readers --- src/kernel/structures/.gitkeep | 0 src/kernel/structures/StructureInterface.php | 8 ++++ src/kernel/structures/_AppendFrame.php | 23 ++++++++++ src/kernel/structures/_ChopFrame.php | 19 +++++++++ src/kernel/structures/_Class.php | 19 +++++++++ src/kernel/structures/_Classes.php | 42 +++++++++++++++++++ src/kernel/structures/_Double.php | 22 ++++++++++ src/kernel/structures/_DoubleVariableInfo.php | 16 +++++++ src/kernel/structures/_ExceptionTable.php | 39 +++++++++++++++++ src/kernel/structures/_FieldInfo.php | 38 +++++++++++++++++ src/kernel/structures/_FieldRef.php | 24 +++++++++++ src/kernel/structures/_Float.php | 20 +++++++++ src/kernel/structures/_FloatVariableInfo.php | 16 +++++++ src/kernel/structures/_FullFrame.php | 31 ++++++++++++++ src/kernel/structures/_Integer.php | 20 +++++++++ .../structures/_IntegerVariableInfo.php | 16 +++++++ src/kernel/structures/_LineNumberTable.php | 25 +++++++++++ src/kernel/structures/_LocalVariableTable.php | 24 +++++++++++ src/kernel/structures/_Long.php | 25 +++++++++++ src/kernel/structures/_LongVariableInfo.php | 16 +++++++ src/kernel/structures/_MethodInfo.php | 38 +++++++++++++++++ src/kernel/structures/_Methodref.php | 24 +++++++++++ src/kernel/structures/_NameAndType.php | 24 +++++++++++ src/kernel/structures/_NullVariableInfo.php | 16 +++++++ src/kernel/structures/_ObjectVariableInfo.php | 18 ++++++++ src/kernel/structures/_SameFrame.php | 17 ++++++++ src/kernel/structures/_SameFrameExtended.php | 19 +++++++++ .../structures/_SameLocals1StackItemFrame.php | 19 +++++++++ .../_SameLocals1StackItemFrameExtended.php | 21 ++++++++++ src/kernel/structures/_StackMapFrame.php | 40 ++++++++++++++++++ src/kernel/structures/_String.php | 19 +++++++++ src/kernel/structures/_TopVariableInfo.php | 16 +++++++ .../_UninitializedThisVariableInfo.php | 16 +++++++ .../structures/_UninitializedVariableInfo.php | 18 ++++++++ src/kernel/structures/_Utf8.php | 26 ++++++++++++ .../structures/_VerificationTypeInfo.php | 37 ++++++++++++++++ tools/copy_attr.php | 4 +- tools/copy_strt.php | 19 +++++++++ 38 files changed, 832 insertions(+), 2 deletions(-) delete mode 100644 src/kernel/structures/.gitkeep create mode 100644 src/kernel/structures/StructureInterface.php create mode 100644 src/kernel/structures/_AppendFrame.php create mode 100644 src/kernel/structures/_ChopFrame.php create mode 100644 src/kernel/structures/_Class.php create mode 100644 src/kernel/structures/_Classes.php create mode 100644 src/kernel/structures/_Double.php create mode 100644 src/kernel/structures/_DoubleVariableInfo.php create mode 100644 src/kernel/structures/_ExceptionTable.php create mode 100644 src/kernel/structures/_FieldInfo.php create mode 100644 src/kernel/structures/_FieldRef.php create mode 100644 src/kernel/structures/_Float.php create mode 100644 src/kernel/structures/_FloatVariableInfo.php create mode 100644 src/kernel/structures/_FullFrame.php create mode 100644 src/kernel/structures/_Integer.php create mode 100644 src/kernel/structures/_IntegerVariableInfo.php create mode 100644 src/kernel/structures/_LineNumberTable.php create mode 100644 src/kernel/structures/_LocalVariableTable.php create mode 100644 src/kernel/structures/_Long.php create mode 100644 src/kernel/structures/_LongVariableInfo.php create mode 100644 src/kernel/structures/_MethodInfo.php create mode 100644 src/kernel/structures/_Methodref.php create mode 100644 src/kernel/structures/_NameAndType.php create mode 100644 src/kernel/structures/_NullVariableInfo.php create mode 100644 src/kernel/structures/_ObjectVariableInfo.php create mode 100644 src/kernel/structures/_SameFrame.php create mode 100644 src/kernel/structures/_SameFrameExtended.php create mode 100644 src/kernel/structures/_SameLocals1StackItemFrame.php create mode 100644 src/kernel/structures/_SameLocals1StackItemFrameExtended.php create mode 100644 src/kernel/structures/_StackMapFrame.php create mode 100644 src/kernel/structures/_String.php create mode 100644 src/kernel/structures/_TopVariableInfo.php create mode 100644 src/kernel/structures/_UninitializedThisVariableInfo.php create mode 100644 src/kernel/structures/_UninitializedVariableInfo.php create mode 100644 src/kernel/structures/_Utf8.php create mode 100644 src/kernel/structures/_VerificationTypeInfo.php create mode 100644 tools/copy_strt.php diff --git a/src/kernel/structures/.gitkeep b/src/kernel/structures/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/kernel/structures/StructureInterface.php b/src/kernel/structures/StructureInterface.php new file mode 100644 index 00000000..2906a1e9 --- /dev/null +++ b/src/kernel/structures/StructureInterface.php @@ -0,0 +1,8 @@ +FrameType = $this->readUnsignedByte(); + $this->OffsetDelta = $this->readUnsignedShort(); + for ($i = 0, $s = $this->FrameType - 251; $i < $s; $i++) { + $this->Locals[] = new _VerificationTypeInfo($this->getClass()); + } + } +} + diff --git a/src/kernel/structures/_ChopFrame.php b/src/kernel/structures/_ChopFrame.php new file mode 100644 index 00000000..d98ab10c --- /dev/null +++ b/src/kernel/structures/_ChopFrame.php @@ -0,0 +1,19 @@ +FrameType = $this->readUnsignedByte(); + $this->OffsetDelta = $this->readUnsignedShort(); + } +} + diff --git a/src/kernel/structures/_Class.php b/src/kernel/structures/_Class.php new file mode 100644 index 00000000..37fcb8de --- /dev/null +++ b/src/kernel/structures/_Class.php @@ -0,0 +1,19 @@ +getClass()Index = null; + public function execute(): void + { + $this->ClassIndex = $this->Class->readUnsignedShort(); + } + public function getClassIndex () { + return $this->ClassIndex; + } +} diff --git a/src/kernel/structures/_Classes.php b/src/kernel/structures/_Classes.php new file mode 100644 index 00000000..c826908e --- /dev/null +++ b/src/kernel/structures/_Classes.php @@ -0,0 +1,42 @@ +InnerClassInfoIndex = $InnerClassInfoIndex; + } + public function setOuterClassInfoIndex ($OuterClassInfoIndex) { + $this->OuterClassInfoIndex = $OuterClassInfoIndex; + } + public function setInnerNameIndex ($InnerNameIndex) { + $this->InnerNameIndex = $InnerNameIndex; + } + public function setInnerClassAccessFlag ($InnerClassAccessFlag) { + $this->InnerClassAccessFlag = $InnerClassAccessFlag; + } + public function getInnerClassInfoIndex () { + return $this->InnerClassInfoIndex; + } + public function getOuterClassInfoIndex () { + return $this->OuterClassInfoIndex; + } + public function getInnerNameIndex () { + return $this->InnerNameIndex; + } + public function getInnerClassAccessFlag () { + return $this->InnerClassAccessFlag; + } +} diff --git a/src/kernel/structures/_Double.php b/src/kernel/structures/_Double.php new file mode 100644 index 00000000..216a9341 --- /dev/null +++ b/src/kernel/structures/_Double.php @@ -0,0 +1,22 @@ +HighBytes = $this->readUnsignedInt(); + $this->LowBytes = $this->readUnsignedInt(); + } + public function getBytes () { + return ($this->HighBytes << 32) + $this->LowBytes; + } +} + diff --git a/src/kernel/structures/_DoubleVariableInfo.php b/src/kernel/structures/_DoubleVariableInfo.php new file mode 100644 index 00000000..5e100d4d --- /dev/null +++ b/src/kernel/structures/_DoubleVariableInfo.php @@ -0,0 +1,16 @@ +Tag = $this->readUnsignedByte(); + } +} diff --git a/src/kernel/structures/_ExceptionTable.php b/src/kernel/structures/_ExceptionTable.php new file mode 100644 index 00000000..4b0d5e35 --- /dev/null +++ b/src/kernel/structures/_ExceptionTable.php @@ -0,0 +1,39 @@ +StartPc = $StartPc; + } + public function setEndPc ($EndPc) { + $this->EndPc = $EndPc; + } + public function setHandlerPc ($HandlerPc) { + $this->HandlerPc = $HandlerPc; + } + public function setCatchType ($CatchType) { + $this->CatchType = $CatchType; + } + public function getStartPc () { + return $this->StartPc; + } + public function getEndPc () { + return $this->EndPc; + } + public function getHandlerPc () { + return $this->HandlerPc; + } + public function getCatchType () { + return $this->CatchType; + } +} diff --git a/src/kernel/structures/_FieldInfo.php b/src/kernel/structures/_FieldInfo.php new file mode 100644 index 00000000..6bebbdbc --- /dev/null +++ b/src/kernel/structures/_FieldInfo.php @@ -0,0 +1,38 @@ +AccessFlag = $this->Class->readUnsignedShort(); + $this->NameIndex = $this->Class->readUnsignedShort(); + $this->DescriptorIndex = $this->Class->readUnsignedShort(); + $this->AttributeCount = $this->Class->readUnsignedShort(); + for ($i = 0; $i < $this->AttributeCount; $i++) { + $this->Attributes[$i] = new JavaAttributeInfo($this->getClass()); + } + } + public function getAccessFlag () { + return $this->AccessFlag; + } + public function getNameIndex () { + return $this->NameIndex; + } + public function getDescriptorIndex () { + return $this->DescriptorIndex; + } + public function getAttributes () { + return $this->Attributes; + } +} diff --git a/src/kernel/structures/_FieldRef.php b/src/kernel/structures/_FieldRef.php new file mode 100644 index 00000000..aa1cbf6c --- /dev/null +++ b/src/kernel/structures/_FieldRef.php @@ -0,0 +1,24 @@ +getClass()Index = null; + private $NameAndTypeIndex = null; + public function execute(): void + { + $this->ClassIndex = $this->Class->readUnsignedShort(); + $this->NameAndTypeIndex = $this->Class->readUnsignedShort(); + } + public function getClassIndex () { + return $this->ClassIndex; + } + public function getNameAndTypeIndex () { + return $this->NameAndTypeIndex; + } +} diff --git a/src/kernel/structures/_Float.php b/src/kernel/structures/_Float.php new file mode 100644 index 00000000..1ab60102 --- /dev/null +++ b/src/kernel/structures/_Float.php @@ -0,0 +1,20 @@ +Bytes = $this->readUnsignedInt(); + } + public function getBytes () { + return $this->Bytes; + } +} + diff --git a/src/kernel/structures/_FloatVariableInfo.php b/src/kernel/structures/_FloatVariableInfo.php new file mode 100644 index 00000000..af1af98e --- /dev/null +++ b/src/kernel/structures/_FloatVariableInfo.php @@ -0,0 +1,16 @@ +Tag = $this->readUnsignedByte(); + } +} diff --git a/src/kernel/structures/_FullFrame.php b/src/kernel/structures/_FullFrame.php new file mode 100644 index 00000000..e14bf946 --- /dev/null +++ b/src/kernel/structures/_FullFrame.php @@ -0,0 +1,31 @@ +FrameType = $this->readUnsignedByte(); + $this->OffsetDelta = $this->readUnsignedShort(); + $this->NumberOfLocals = $this->readUnsignedShort(); + for ($i = 0; $i < $this->NumberOfLocals; $i++) { + $this->Locals[] = new _VerificationTypeInfo($this->getClass()); + } + $this->NumberOfStackItems = $this->readUnsignedShort(); + for ($i = 0; $i < $this->NumberOfStackItems; $i++) { + $this->Stack[] = new _VerificationTypeInfo($this->getClass()); + } + } +} + diff --git a/src/kernel/structures/_Integer.php b/src/kernel/structures/_Integer.php new file mode 100644 index 00000000..d750d27d --- /dev/null +++ b/src/kernel/structures/_Integer.php @@ -0,0 +1,20 @@ +Bytes = $this->readInt(); + } + public function getBytes () { + return $this->Bytes; + } +} + diff --git a/src/kernel/structures/_IntegerVariableInfo.php b/src/kernel/structures/_IntegerVariableInfo.php new file mode 100644 index 00000000..a061bcb0 --- /dev/null +++ b/src/kernel/structures/_IntegerVariableInfo.php @@ -0,0 +1,16 @@ +Tag = $this->readUnsignedByte(); + } +} diff --git a/src/kernel/structures/_LineNumberTable.php b/src/kernel/structures/_LineNumberTable.php new file mode 100644 index 00000000..9996dcec --- /dev/null +++ b/src/kernel/structures/_LineNumberTable.php @@ -0,0 +1,25 @@ +StartPc = $StartPc; + } + public function setLineNumber ($LineNumber) { + $this->LineNumber = $LineNumber; + } + public function getStartPc () { + return $this->StartPc; + } + public function getLineNumber () { + return $this->LineNumber; + } +} diff --git a/src/kernel/structures/_LocalVariableTable.php b/src/kernel/structures/_LocalVariableTable.php new file mode 100644 index 00000000..878957a3 --- /dev/null +++ b/src/kernel/structures/_LocalVariableTable.php @@ -0,0 +1,24 @@ +StartPc = $this->readUnsignedShort(); + $this->Length = $this->readUnsignedShort(); + $this->NameIndex = $this->readUnsignedShort(); + $this->DescriptorIndex = $this->readUnsignedShort(); + $this->Index = $this->readUnsignedShort(); + } +} diff --git a/src/kernel/structures/_Long.php b/src/kernel/structures/_Long.php new file mode 100644 index 00000000..feed8887 --- /dev/null +++ b/src/kernel/structures/_Long.php @@ -0,0 +1,25 @@ +HighBytes = $this->readUnsignedInt(); + //$this->LowBytes = $this->readUnsignedInt(); + $this->Bytes = $this->readLong(); + } + public function getBytes () { + //return ($this->HighBytes << 32) + $this->LowBytes; + return $this->Bytes; + } +} + diff --git a/src/kernel/structures/_LongVariableInfo.php b/src/kernel/structures/_LongVariableInfo.php new file mode 100644 index 00000000..2ad068bf --- /dev/null +++ b/src/kernel/structures/_LongVariableInfo.php @@ -0,0 +1,16 @@ +Tag = $this->readUnsignedByte(); + } +} diff --git a/src/kernel/structures/_MethodInfo.php b/src/kernel/structures/_MethodInfo.php new file mode 100644 index 00000000..99e191a2 --- /dev/null +++ b/src/kernel/structures/_MethodInfo.php @@ -0,0 +1,38 @@ +AccessFlag = $this->Class->readUnsignedShort(); + $this->NameIndex = $this->Class->readUnsignedShort(); + $this->DescriptorIndex = $this->Class->readUnsignedShort(); + $this->AttributeCount = $this->Class->readUnsignedShort(); + for ($i = 0; $i < $this->AttributeCount; $i++) { + $this->Attributes[$i] = new JavaAttributeInfo($this->getClass()); + } + } + public function getAccessFlag () { + return $this->AccessFlag; + } + public function getNameIndex () { + return $this->NameIndex; + } + public function getDescriptorIndex () { + return $this->DescriptorIndex; + } + public function getAttributes () { + return $this->Attributes; + } +} diff --git a/src/kernel/structures/_Methodref.php b/src/kernel/structures/_Methodref.php new file mode 100644 index 00000000..f03d24f7 --- /dev/null +++ b/src/kernel/structures/_Methodref.php @@ -0,0 +1,24 @@ +getClass()Index = null; + private $NameAndTypeIndex = null; + public function execute(): void + { + $this->ClassIndex = $this->Class->readUnsignedShort(); + $this->NameAndTypeIndex = $this->Class->readUnsignedShort(); + } + public function getClassIndex () { + return $this->ClassIndex; + } + public function getNameAndTypeIndex () { + return $this->NameAndTypeIndex; + } +} diff --git a/src/kernel/structures/_NameAndType.php b/src/kernel/structures/_NameAndType.php new file mode 100644 index 00000000..5612025a --- /dev/null +++ b/src/kernel/structures/_NameAndType.php @@ -0,0 +1,24 @@ +NameIndex = $this->Class->readUnsignedShort(); + $this->DescriptorIndex = $this->Class->readUnsignedShort(); + } + public function getNameIndex () { + return $this->NameIndex; + } + public function getDescriptorIndex () { + return $this->DescriptorIndex; + } +} diff --git a/src/kernel/structures/_NullVariableInfo.php b/src/kernel/structures/_NullVariableInfo.php new file mode 100644 index 00000000..3827c19e --- /dev/null +++ b/src/kernel/structures/_NullVariableInfo.php @@ -0,0 +1,16 @@ +Tag = $this->readUnsignedByte(); + } +} diff --git a/src/kernel/structures/_ObjectVariableInfo.php b/src/kernel/structures/_ObjectVariableInfo.php new file mode 100644 index 00000000..54b8b433 --- /dev/null +++ b/src/kernel/structures/_ObjectVariableInfo.php @@ -0,0 +1,18 @@ +Tag = $this->readUnsignedByte(); + $this->cpoolIndex = $this->readUnsignedShort(); + } +} diff --git a/src/kernel/structures/_SameFrame.php b/src/kernel/structures/_SameFrame.php new file mode 100644 index 00000000..b2289668 --- /dev/null +++ b/src/kernel/structures/_SameFrame.php @@ -0,0 +1,17 @@ +FrameType = $this->readUnsignedByte(); + } +} + diff --git a/src/kernel/structures/_SameFrameExtended.php b/src/kernel/structures/_SameFrameExtended.php new file mode 100644 index 00000000..d3e2434f --- /dev/null +++ b/src/kernel/structures/_SameFrameExtended.php @@ -0,0 +1,19 @@ +FrameType = $this->readUnsignedByte(); + $this->OffsetDelta = $this->readUnsignedShort(); + } +} + diff --git a/src/kernel/structures/_SameLocals1StackItemFrame.php b/src/kernel/structures/_SameLocals1StackItemFrame.php new file mode 100644 index 00000000..4c3f7a91 --- /dev/null +++ b/src/kernel/structures/_SameLocals1StackItemFrame.php @@ -0,0 +1,19 @@ +FrameType = $this->readUnsignedByte(); + $this->Stack[] = new _VerificationTypeInfo($this->getClass()); + } +} + diff --git a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php new file mode 100644 index 00000000..03d89e26 --- /dev/null +++ b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php @@ -0,0 +1,21 @@ +FrameType = $this->readUnsignedByte(); + $this->OffsetDelta = $this->readUnsignedShort(); + $this->Locals[] = new _VerificationTypeInfo($this->getClass()); + } +} + diff --git a/src/kernel/structures/_StackMapFrame.php b/src/kernel/structures/_StackMapFrame.php new file mode 100644 index 00000000..ae503205 --- /dev/null +++ b/src/kernel/structures/_StackMapFrame.php @@ -0,0 +1,40 @@ +FrameType = $this->readUnsignedByte(); + // back by frametype + $this->getClass()->seek(-1); + if ($this->FrameType >= 0 && $this->FrameType <= 63) { + $this->SameFrame = new _SameFrame($this->getClass()); + } else if ($this->FrameType >= 64 && $this->FrameType <= 127) { + $this->SameLocals1StackItemFrame = new _SameLocals1StackItemFrame($this->getClass()); + } else if ($this->FrameType == 247) { + $this->SameLocals1StackItemFrameExtended = new _SameLocals1StackItemFrameExtended($this->getClass()); + } else if ($this->FrameType >= 248 && $this->FrameType <= 250) { + $this->ChopFrame = new _ChopFrame($this->getClass()); + } else if ($this->FrameType == 251) { + $this->SameFrameExtended = new _SameFrameExtended($this->getClass()); + } else if ($this->FrameType >= 252 && $this->FrameType <= 254) { + $this->AppendFrame = new _AppendFrame($this->getClass()); + } else if ($this->FrameType == 255) { + $this->FullFrame = new _FullFrame($this->getClass()); + } + } +} diff --git a/src/kernel/structures/_String.php b/src/kernel/structures/_String.php new file mode 100644 index 00000000..5705c3cd --- /dev/null +++ b/src/kernel/structures/_String.php @@ -0,0 +1,19 @@ +StringIndex = $this->Class->readUnsignedShort(); + } + public function getStringIndex () { + return $this->StringIndex; + } +} diff --git a/src/kernel/structures/_TopVariableInfo.php b/src/kernel/structures/_TopVariableInfo.php new file mode 100644 index 00000000..445db58f --- /dev/null +++ b/src/kernel/structures/_TopVariableInfo.php @@ -0,0 +1,16 @@ +Tag = $this->readUnsignedByte(); + } +} diff --git a/src/kernel/structures/_UninitializedThisVariableInfo.php b/src/kernel/structures/_UninitializedThisVariableInfo.php new file mode 100644 index 00000000..bdd4aa38 --- /dev/null +++ b/src/kernel/structures/_UninitializedThisVariableInfo.php @@ -0,0 +1,16 @@ +Tag = $this->readUnsignedByte(); + } +} diff --git a/src/kernel/structures/_UninitializedVariableInfo.php b/src/kernel/structures/_UninitializedVariableInfo.php new file mode 100644 index 00000000..b97b6894 --- /dev/null +++ b/src/kernel/structures/_UninitializedVariableInfo.php @@ -0,0 +1,18 @@ +Tag = $this->readUnsignedByte(); + $this->Offset = $this->readUnsignedShort(); + } +} diff --git a/src/kernel/structures/_Utf8.php b/src/kernel/structures/_Utf8.php new file mode 100644 index 00000000..094abab2 --- /dev/null +++ b/src/kernel/structures/_Utf8.php @@ -0,0 +1,26 @@ +Length = $this->Class->readUnsignedShort(); + for ($i = 0; $i < $this->Length; $i++) { + $this->String .= chr($this->Class->readUnsignedByte()); + } + } + public function getLength () { + return $this->Length; + } + public function getString () { + return $this->String; + } +} diff --git a/src/kernel/structures/_VerificationTypeInfo.php b/src/kernel/structures/_VerificationTypeInfo.php new file mode 100644 index 00000000..a7f00298 --- /dev/null +++ b/src/kernel/structures/_VerificationTypeInfo.php @@ -0,0 +1,37 @@ +Tag = $this->readUnsignedByte(); + // back by tag + $this->getClass()->seek(-1); + if ($this->Tag == 0) { + $this->TopVariableInfo = new _TopVariableInfo($this->getClass()); + } else if ($this->Tag == 1) { + $this->IntegerVariableInfo = new _IntegerVariableInfo($this->getClass()); + } else if ($this->Tag == 2) { + $this->FloatVariableInfo = new _FloatVariableInfo($this->getClass()); + } else if ($this->Tag == 4) { + $this->LongVariableInfo = new _LongVariableInfo($this->getClass()); + } else if ($this->Tag == 3) { + $this->DoubleVariableInfo = new _DoubleVariableInfo($this->getClass()); + } else if ($this->Tag == 5) { + $this->NullVariableInfo = new _NullVariableInfo($this->getClass()); + } else if ($this->Tag == 6) { + $this->UninitializedThisVariableInfo = new _UninitializedThisVariableInfo($this->getClass()); + } else if ($this->Tag == 7) { + $this->ObjectVariableInfo = new _ObjectVariableInfo($this->getClass()); + } else if ($this->Tag == 8) { + $this->UninitializedVariableInfo = new _UninitializedVariableInfo($this->getClass()); + } +} +} + diff --git a/tools/copy_attr.php b/tools/copy_attr.php index bbe62096..1e7ce4f9 100644 --- a/tools/copy_attr.php +++ b/tools/copy_attr.php @@ -7,11 +7,11 @@ $a = str_replace("parent::__construct(\$Class);", '', $a); $a = str_replace('class Java', 'class ', $a); $a = str_replace('throw new JavaAttributeException(__CLASS__ . \' is not defined.\');', 'throw new NotImplementedException(__CLASS__);', $a); - $a = preg_replace("/[\n]+/", "\n", $a); + $a = preg_replace("/\s*[\\n]+/", "\n", $a); $a = str_replace('extends JavaAttribute {', "implements AttributeInterface\n{\n use \\PHPJava\\Kernel\\Core\\BinaryReader;\n", $a); $a = str_replace('class ', 'final class ', $a); $a = str_replace('Class', '$this', $a); + $a = str_replace('$this->Class', '$this->getCurrentClass()', $a); $a = str_replace('BinaryTools::', 'BinaryTool::', $a); $a = str_replace('getJavaBinaryStream()->', '', $a); var_dump($class, $a); diff --git a/tools/copy_strt.php b/tools/copy_strt.php new file mode 100644 index 00000000..8bebf297 --- /dev/null +++ b/tools/copy_strt.php @@ -0,0 +1,19 @@ +getClass()', $a); + $a = str_replace('getJavaBinaryStream()->', '', $a); + $a = str_replace('extends _ {', "implements StructureInterface\n{\n use \\PHPJava\\Kernel\\Core\\BinaryReader;[LB]", $a); + $a = str_replace('public function __construct (&$this->getClass()) {', "public function execute(): void\n {", $a); + $a = str_replace('parent::__construct($this->getClass());', '', $a); + $a = preg_replace("/\s*[\\n]+/", "\n", $a); + $a = str_replace('getClass()->read', '$this->read', $a); + var_dump($class, $a); + file_put_contents(__DIR__ . '/../src/kernel/structures/' . $class, $a . "\n"); +} From cead14fe327abc65fdf22a2807ff997f09a27a9e Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 14:11:24 +0900 Subject: [PATCH 11/96] Fix PSR-2 --- .gitignore | 1 + src/exceptions/NotImplementedException.php | 1 - .../attributes/AnnotationDefaultAttribute.php | 1 - src/kernel/attributes/AttributeInfo.php | 10 ++++---- .../attributes/BootstrapMethodsAttribute.php | 1 - src/kernel/attributes/CodeAttribute.php | 13 ++++++---- .../attributes/ConstantValueAttribute.php | 1 - src/kernel/attributes/DeprecatedAttribute.php | 1 - .../attributes/EnclosingMethodAttribute.php | 1 - src/kernel/attributes/ExceptionsAttribute.php | 1 - .../attributes/InnerClassesAttribute.php | 12 ++-------- .../attributes/LineNumberTableAttribute.php | 13 ++-------- .../LocalVariableTableAttribute.php | 1 - .../LocalVariableTypeTableAttribute.php | 1 - .../RuntimeInvisibleAnnotationsAttribute.php | 1 - ...InvisibleParameterAnnotationsAttribute.php | 1 - .../RuntimeVisibleAnnotationsAttribute.php | 1 - ...meVisibleParameterAnnotationsAttribute.php | 1 - src/kernel/attributes/SignatureAttribute.php | 1 - .../SourceDebugExtensionAttribute.php | 1 - src/kernel/attributes/SourceFileAttribute.php | 12 ++-------- .../attributes/StackMapTableAttribute.php | 14 ++--------- src/kernel/attributes/SyntheticAttribute.php | 1 - src/kernel/maps/ClassConstantEnum.php | 2 +- src/kernel/maps/Map.php | 1 - src/kernel/maps/Mnemonics.php | 2 +- src/kernel/mnemonics/_aaload.php | 8 ++----- src/kernel/mnemonics/_aastore.php | 6 ++--- src/kernel/mnemonics/_aconst_null.php | 4 +--- src/kernel/mnemonics/_aload.php | 2 -- src/kernel/mnemonics/_aload_0.php | 6 ++--- src/kernel/mnemonics/_aload_1.php | 7 ++---- src/kernel/mnemonics/_aload_2.php | 4 +--- src/kernel/mnemonics/_aload_3.php | 4 +--- src/kernel/mnemonics/_anewarray.php | 6 ++--- src/kernel/mnemonics/_areturn.php | 6 ++--- src/kernel/mnemonics/_arraylength.php | 6 ++--- src/kernel/mnemonics/_astore.php | 6 ++--- src/kernel/mnemonics/_astore_0.php | 6 ++--- src/kernel/mnemonics/_astore_1.php | 6 ++--- src/kernel/mnemonics/_astore_2.php | 6 ++--- src/kernel/mnemonics/_astore_3.php | 6 ++--- src/kernel/mnemonics/_athrow.php | 6 ----- src/kernel/mnemonics/_baload.php | 5 ++-- src/kernel/mnemonics/_bastore.php | 5 ++-- src/kernel/mnemonics/_bipush.php | 2 -- src/kernel/mnemonics/_breakpoint.php | 5 ++-- src/kernel/mnemonics/_caload.php | 5 ++-- src/kernel/mnemonics/_castore.php | 5 ++-- src/kernel/mnemonics/_checkcast.php | 5 ++-- src/kernel/mnemonics/_d2f.php | 5 ++-- src/kernel/mnemonics/_d2i.php | 5 ++-- src/kernel/mnemonics/_d2l.php | 5 ++-- src/kernel/mnemonics/_dadd.php | 6 ++--- src/kernel/mnemonics/_daload.php | 6 ++--- src/kernel/mnemonics/_dastore.php | 8 +++---- src/kernel/mnemonics/_dcmpg.php | 5 ++-- src/kernel/mnemonics/_dcmpl.php | 5 ++-- src/kernel/mnemonics/_dconst_0.php | 6 ++--- src/kernel/mnemonics/_dconst_1.php | 4 +--- src/kernel/mnemonics/_ddiv.php | 5 ++-- src/kernel/mnemonics/_dload.php | 6 ++--- src/kernel/mnemonics/_dload_0.php | 5 ++-- src/kernel/mnemonics/_dload_1.php | 5 ++-- src/kernel/mnemonics/_dload_2.php | 5 ++-- src/kernel/mnemonics/_dload_3.php | 5 ++-- src/kernel/mnemonics/_dmul.php | 8 ++----- src/kernel/mnemonics/_dneg.php | 5 ++-- src/kernel/mnemonics/_drem.php | 5 ++-- src/kernel/mnemonics/_dreturn.php | 6 ++--- src/kernel/mnemonics/_dstore.php | 6 ++--- src/kernel/mnemonics/_dstore_0.php | 6 ++--- src/kernel/mnemonics/_dstore_1.php | 6 ++--- src/kernel/mnemonics/_dstore_2.php | 6 ++--- src/kernel/mnemonics/_dstore_3.php | 4 +--- src/kernel/mnemonics/_dsub.php | 6 ++--- src/kernel/mnemonics/_dup.php | 6 ++--- src/kernel/mnemonics/_dup2.php | 5 ++-- src/kernel/mnemonics/_dup2_x1.php | 5 ++-- src/kernel/mnemonics/_dup2_x2.php | 5 ++-- src/kernel/mnemonics/_dup_x1.php | 5 ++-- src/kernel/mnemonics/_dup_x2.php | 5 ++-- src/kernel/mnemonics/_f2d.php | 5 ++-- src/kernel/mnemonics/_f2i.php | 5 ++-- src/kernel/mnemonics/_f2l.php | 5 ++-- src/kernel/mnemonics/_fadd.php | 5 ++-- src/kernel/mnemonics/_faload.php | 5 ++-- src/kernel/mnemonics/_fastore.php | 5 ++-- src/kernel/mnemonics/_fcmpg.php | 5 ++-- src/kernel/mnemonics/_fcmpl.php | 5 ++-- src/kernel/mnemonics/_fconst_0.php | 5 ++-- src/kernel/mnemonics/_fconst_1.php | 5 ++-- src/kernel/mnemonics/_fconst_2.php | 5 ++-- src/kernel/mnemonics/_fdiv.php | 5 ++-- src/kernel/mnemonics/_fload.php | 5 ++-- src/kernel/mnemonics/_fload_0.php | 5 ++-- src/kernel/mnemonics/_fload_1.php | 5 ++-- src/kernel/mnemonics/_fload_2.php | 5 ++-- src/kernel/mnemonics/_fload_3.php | 5 ++-- src/kernel/mnemonics/_fmul.php | 5 ++-- src/kernel/mnemonics/_fneg.php | 5 ++-- src/kernel/mnemonics/_frem.php | 5 ++-- src/kernel/mnemonics/_freturn.php | 4 +--- src/kernel/mnemonics/_fstore.php | 5 ++-- src/kernel/mnemonics/_fstore_0.php | 5 ++-- src/kernel/mnemonics/_fstore_1.php | 5 ++-- src/kernel/mnemonics/_fstore_2.php | 5 ++-- src/kernel/mnemonics/_fstore_3.php | 5 ++-- src/kernel/mnemonics/_fsub.php | 5 ++-- src/kernel/mnemonics/_getfield.php | 6 ----- src/kernel/mnemonics/_getstatic.php | 10 +------- src/kernel/mnemonics/_goto.php | 4 +--- src/kernel/mnemonics/_goto_w.php | 5 ++-- src/kernel/mnemonics/_i2b.php | 5 ++-- src/kernel/mnemonics/_i2c.php | 5 ++-- src/kernel/mnemonics/_i2d.php | 5 ++-- src/kernel/mnemonics/_i2f.php | 5 ++-- src/kernel/mnemonics/_i2l.php | 5 ++-- src/kernel/mnemonics/_i2s.php | 2 -- src/kernel/mnemonics/_iadd.php | 2 -- src/kernel/mnemonics/_iaload.php | 6 ++--- src/kernel/mnemonics/_iand.php | 2 -- src/kernel/mnemonics/_iastore.php | 6 ++--- src/kernel/mnemonics/_iconst_0.php | 6 ++--- src/kernel/mnemonics/_iconst_1.php | 6 ++--- src/kernel/mnemonics/_iconst_2.php | 6 ++--- src/kernel/mnemonics/_iconst_3.php | 6 ++--- src/kernel/mnemonics/_iconst_4.php | 6 ++--- src/kernel/mnemonics/_iconst_5.php | 6 ++--- src/kernel/mnemonics/_iconst_m1.php | 6 ++--- src/kernel/mnemonics/_idiv.php | 5 ++-- src/kernel/mnemonics/_if_acmpeq.php | 8 ++----- src/kernel/mnemonics/_if_acmpne.php | 8 ++----- src/kernel/mnemonics/_if_icmpeq.php | 5 ++-- src/kernel/mnemonics/_if_icmpge.php | 9 ++----- src/kernel/mnemonics/_if_icmpgt.php | 7 +----- src/kernel/mnemonics/_if_icmple.php | 5 ++-- src/kernel/mnemonics/_if_icmplt.php | 7 ++---- src/kernel/mnemonics/_if_icmpne.php | 8 ++----- src/kernel/mnemonics/_ifeq.php | 9 ++----- src/kernel/mnemonics/_ifge.php | 5 ++-- src/kernel/mnemonics/_ifgt.php | 5 ++-- src/kernel/mnemonics/_ifle.php | 5 ++-- src/kernel/mnemonics/_iflt.php | 5 ++-- src/kernel/mnemonics/_ifne.php | 6 +---- src/kernel/mnemonics/_ifnonnull.php | 5 ++-- src/kernel/mnemonics/_ifnull.php | 5 ++-- src/kernel/mnemonics/_iinc.php | 6 ++--- src/kernel/mnemonics/_iload.php | 4 +--- src/kernel/mnemonics/_iload_0.php | 4 +--- src/kernel/mnemonics/_iload_1.php | 4 +--- src/kernel/mnemonics/_iload_2.php | 6 ++--- src/kernel/mnemonics/_iload_3.php | 4 +--- src/kernel/mnemonics/_impdep1.php | 5 ++-- src/kernel/mnemonics/_impdep2.php | 5 ++-- src/kernel/mnemonics/_imul.php | 2 -- src/kernel/mnemonics/_ineg.php | 2 -- src/kernel/mnemonics/_instanceof.php | 5 ++-- src/kernel/mnemonics/_invokedynamic.php | 5 ++-- src/kernel/mnemonics/_invokeinterface.php | 5 ++-- src/kernel/mnemonics/_invokespecial.php | 9 ++----- src/kernel/mnemonics/_invokestatic.php | 10 ++------ src/kernel/mnemonics/_invokevirtual.php | 11 --------- src/kernel/mnemonics/_ior.php | 2 -- src/kernel/mnemonics/_irem.php | 5 ++-- src/kernel/mnemonics/_ireturn.php | 6 ++--- src/kernel/mnemonics/_ishl.php | 2 -- src/kernel/mnemonics/_ishr.php | 3 --- src/kernel/mnemonics/_istore.php | 4 +--- src/kernel/mnemonics/_istore_0.php | 6 ++--- src/kernel/mnemonics/_istore_1.php | 6 ++--- src/kernel/mnemonics/_istore_2.php | 6 ++--- src/kernel/mnemonics/_istore_3.php | 6 ++--- src/kernel/mnemonics/_isub.php | 2 -- src/kernel/mnemonics/_iushr.php | 2 -- src/kernel/mnemonics/_ixor.php | 2 -- src/kernel/mnemonics/_jsr.php | 5 ++-- src/kernel/mnemonics/_jsr_w.php | 5 ++-- src/kernel/mnemonics/_l2d.php | 5 ++-- src/kernel/mnemonics/_l2f.php | 5 ++-- src/kernel/mnemonics/_l2i.php | 5 ++-- src/kernel/mnemonics/_ladd.php | 2 -- src/kernel/mnemonics/_laload.php | 6 ++--- src/kernel/mnemonics/_land.php | 2 -- src/kernel/mnemonics/_lastore.php | 8 +++---- src/kernel/mnemonics/_lcmp.php | 5 ++-- src/kernel/mnemonics/_lconst_0.php | 2 -- src/kernel/mnemonics/_lconst_1.php | 2 -- src/kernel/mnemonics/_ldc.php | 11 +-------- src/kernel/mnemonics/_ldc2_w.php | 8 +++---- src/kernel/mnemonics/_ldc_w.php | 5 ++-- src/kernel/mnemonics/_ldiv.php | 5 ++-- src/kernel/mnemonics/_lload.php | 2 -- src/kernel/mnemonics/_lload_0.php | 5 ++-- src/kernel/mnemonics/_lload_1.php | 5 ++-- src/kernel/mnemonics/_lload_2.php | 5 ++-- src/kernel/mnemonics/_lload_3.php | 5 ++-- src/kernel/mnemonics/_lmul.php | 2 -- src/kernel/mnemonics/_lneg.php | 5 ++-- src/kernel/mnemonics/_lookupswitch.php | 5 ---- src/kernel/mnemonics/_lor.php | 2 -- src/kernel/mnemonics/_lrem.php | 5 ++-- src/kernel/mnemonics/_lreturn.php | 6 ++--- src/kernel/mnemonics/_lshl.php | 2 -- src/kernel/mnemonics/_lshr.php | 2 -- src/kernel/mnemonics/_lstore.php | 2 -- src/kernel/mnemonics/_lstore_0.php | 5 ++-- src/kernel/mnemonics/_lstore_1.php | 5 ++-- src/kernel/mnemonics/_lstore_2.php | 5 ++-- src/kernel/mnemonics/_lstore_3.php | 5 ++-- src/kernel/mnemonics/_lsub.php | 2 -- src/kernel/mnemonics/_lushr.php | 2 -- src/kernel/mnemonics/_lxor.php | 5 ++-- src/kernel/mnemonics/_monitorenter.php | 5 ++-- src/kernel/mnemonics/_monitorexit.php | 5 ++-- src/kernel/mnemonics/_multianewarray.php | 5 ++-- src/kernel/mnemonics/_new.php | 17 ------------- src/kernel/mnemonics/_newarray.php | 7 ++---- src/kernel/mnemonics/_nop.php | 4 +--- src/kernel/mnemonics/_pop.php | 2 -- src/kernel/mnemonics/_pop2.php | 5 ++-- src/kernel/mnemonics/_putfield.php | 5 ++-- src/kernel/mnemonics/_putstatic.php | 6 ++--- src/kernel/mnemonics/_ret.php | 5 ++-- src/kernel/mnemonics/_return.php | 6 ++--- src/kernel/mnemonics/_saload.php | 5 ++-- src/kernel/mnemonics/_sastore.php | 5 ++-- src/kernel/mnemonics/_sipush.php | 2 -- src/kernel/mnemonics/_swap.php | 5 ++-- src/kernel/mnemonics/_tableswitch.php | 5 ---- src/kernel/mnemonics/_wide.php | 5 ++-- src/kernel/structures/_AppendFrame.php | 1 - src/kernel/structures/_ChopFrame.php | 1 - src/kernel/structures/_Classes.php | 24 ++++++++++++------- src/kernel/structures/_Double.php | 4 ++-- src/kernel/structures/_ExceptionTable.php | 24 ++++++++++++------- src/kernel/structures/_FieldInfo.php | 12 ++++++---- src/kernel/structures/_Float.php | 4 ++-- src/kernel/structures/_FullFrame.php | 1 - src/kernel/structures/_Integer.php | 4 ++-- src/kernel/structures/_LineNumberTable.php | 12 ++++++---- src/kernel/structures/_Long.php | 4 ++-- src/kernel/structures/_MethodInfo.php | 12 ++++++---- src/kernel/structures/_NameAndType.php | 6 +++-- src/kernel/structures/_SameFrame.php | 1 - src/kernel/structures/_SameFrameExtended.php | 1 - .../structures/_SameLocals1StackItemFrame.php | 1 - .../_SameLocals1StackItemFrameExtended.php | 1 - src/kernel/structures/_StackMapFrame.php | 12 +++++----- src/kernel/structures/_String.php | 3 ++- src/kernel/structures/_Utf8.php | 6 +++-- .../structures/_VerificationTypeInfo.php | 19 +++++++-------- src/kernel/types/Boolean.php | 1 - src/kernel/types/Byte.php | 1 - src/kernel/types/Char.php | 1 - src/kernel/types/Double.php | 1 - src/kernel/types/Float.php | 1 - src/kernel/types/Int.php | 1 - src/kernel/types/Long.php | 1 - src/kernel/types/Short.php | 1 - src/utilities/BinaryTool.php | 1 - 261 files changed, 444 insertions(+), 868 deletions(-) diff --git a/.gitignore b/.gitignore index 27f17877..9e3cd75a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ old .idea vendor composer.lock +.php_cs.cache diff --git a/src/exceptions/NotImplementedException.php b/src/exceptions/NotImplementedException.php index 56361245..548bfd84 100644 --- a/src/exceptions/NotImplementedException.php +++ b/src/exceptions/NotImplementedException.php @@ -3,5 +3,4 @@ class NotImplementedException extends \Exception { - } diff --git a/src/kernel/attributes/AnnotationDefaultAttribute.php b/src/kernel/attributes/AnnotationDefaultAttribute.php index e079fdb9..337567cc 100644 --- a/src/kernel/attributes/AnnotationDefaultAttribute.php +++ b/src/kernel/attributes/AnnotationDefaultAttribute.php @@ -10,7 +10,6 @@ final class AnnotationDefaultAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/AttributeInfo.php b/src/kernel/attributes/AttributeInfo.php index 14786b9e..7b05b834 100644 --- a/src/kernel/attributes/AttributeInfo.php +++ b/src/kernel/attributes/AttributeInfo.php @@ -13,20 +13,22 @@ final class AttributeInfo implements AttributeInterface private $AttributeData = null; public function execute(): void { - $this->AttributeNameIndex = $this->readUnsignedShort(); $this->AttributeLength = $this->readUnsignedInt(); $cpInfo = $this->getCpInfo(); $classAttributeName = 'Java' . $cpInfo[$this->AttributeNameIndex]->getString() . 'Attribute'; $this->AttributeData = new $classAttributeName($Class); } - public function getAttributeData () { + public function getAttributeData() + { return $this->AttributeData; } - public function getAttributeNameIndex () { + public function getAttributeNameIndex() + { return $this->AttributeNameIndex; } - public function getAttributeLength () { + public function getAttributeLength() + { return $this->AttributeLength; } } diff --git a/src/kernel/attributes/BootstrapMethodsAttribute.php b/src/kernel/attributes/BootstrapMethodsAttribute.php index 1dd994e6..0e90e755 100644 --- a/src/kernel/attributes/BootstrapMethodsAttribute.php +++ b/src/kernel/attributes/BootstrapMethodsAttribute.php @@ -10,7 +10,6 @@ final class BootstrapMethodsAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/CodeAttribute.php b/src/kernel/attributes/CodeAttribute.php index 06f0d298..4eef4fa0 100644 --- a/src/kernel/attributes/CodeAttribute.php +++ b/src/kernel/attributes/CodeAttribute.php @@ -18,7 +18,6 @@ final class CodeAttribute implements AttributeInterface private $AttributeInfo = array(); public function execute(): void { - $this->MaxStack = $this->readUnsignedShort(); $this->MaxLocals = $this->readUnsignedShort(); $this->CodeLength = $this->readUnsignedInt(); @@ -42,16 +41,20 @@ public function execute(): void $this->AttributeInfo[] = new JavaAttributeInfo($this); } } - public function getExceptionTables () { + public function getExceptionTables() + { return $this->ExceptionTables; } - public function getCode () { + public function getCode() + { return $this->RawCode; } - public function getOpCodes () { + public function getOpCodes() + { return $this->Code; } - public function getOpCodeLength () { + public function getOpCodeLength() + { return $this->CodeLength; } } diff --git a/src/kernel/attributes/ConstantValueAttribute.php b/src/kernel/attributes/ConstantValueAttribute.php index 2cc6eba3..ee83d1c8 100644 --- a/src/kernel/attributes/ConstantValueAttribute.php +++ b/src/kernel/attributes/ConstantValueAttribute.php @@ -10,7 +10,6 @@ final class ConstantValueAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/DeprecatedAttribute.php b/src/kernel/attributes/DeprecatedAttribute.php index 0bd6b566..e3a443ed 100644 --- a/src/kernel/attributes/DeprecatedAttribute.php +++ b/src/kernel/attributes/DeprecatedAttribute.php @@ -10,7 +10,6 @@ final class DeprecatedAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/EnclosingMethodAttribute.php b/src/kernel/attributes/EnclosingMethodAttribute.php index cd9d9013..55fd4445 100644 --- a/src/kernel/attributes/EnclosingMethodAttribute.php +++ b/src/kernel/attributes/EnclosingMethodAttribute.php @@ -10,7 +10,6 @@ final class EnclosingMethodAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/ExceptionsAttribute.php b/src/kernel/attributes/ExceptionsAttribute.php index a09f15d1..7f2df4b9 100644 --- a/src/kernel/attributes/ExceptionsAttribute.php +++ b/src/kernel/attributes/ExceptionsAttribute.php @@ -10,7 +10,6 @@ final class ExceptionsAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/InnerClassesAttribute.php b/src/kernel/attributes/InnerClassesAttribute.php index 46d5d4ca..070c9b29 100644 --- a/src/kernel/attributes/InnerClassesAttribute.php +++ b/src/kernel/attributes/InnerClassesAttribute.php @@ -14,28 +14,20 @@ final class InnerClassesAttribute implements AttributeInterface public function execute(): void { - - - $this->NumberOfClasses = $this->readUnsignedShort(); for ($i = 0; $i < $this->NumberOfClasses; $i++) { - $thises[$i] = new JavaStructureClasses($this); $thises[$i]->setInnerClassInfoIndex($this->readUnsignedShort()); $thises[$i]->setOuterClassInfoIndex($this->readUnsignedShort()); $thises[$i]->setInnerNameIndex($this->readUnsignedShort()); $thises[$i]->setInnerClassAccessFlag($this->readUnsignedShort()); - } - } - public function getClasses () { - + public function getClasses() + { return $thises; - } - } diff --git a/src/kernel/attributes/LineNumberTableAttribute.php b/src/kernel/attributes/LineNumberTableAttribute.php index 1f40fdb8..cd29e1e2 100644 --- a/src/kernel/attributes/LineNumberTableAttribute.php +++ b/src/kernel/attributes/LineNumberTableAttribute.php @@ -14,27 +14,18 @@ final class LineNumberTableAttribute implements AttributeInterface public function execute(): void { - - - $this->LineNumberTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->LineNumberTableLength; $i++) { - $this->LineNumberTables[$i] = new JavaStructureLineNumberTable($Class); $this->LineNumberTables[$i]->setStartPc($this->readUnsignedShort()); $this->LineNumberTables[$i]->setLineNumber($this->readUnsignedShort()); - } - } - public function getLineNumberTables () { - + public function getLineNumberTables() + { return $this->LineNumberTables; - } - - } diff --git a/src/kernel/attributes/LocalVariableTableAttribute.php b/src/kernel/attributes/LocalVariableTableAttribute.php index e79d5f5f..2583ecea 100644 --- a/src/kernel/attributes/LocalVariableTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTableAttribute.php @@ -12,7 +12,6 @@ final class LocalVariableTableAttribute implements AttributeInterface private $LocalVariableTables = array(); public function execute(): void { - $this->LocalVariableTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->LocalVariableTableLength; $i++) { $this->LocalVariableTables[] = new JavaStructureLocalVariableTable($Class); diff --git a/src/kernel/attributes/LocalVariableTypeTableAttribute.php b/src/kernel/attributes/LocalVariableTypeTableAttribute.php index b41863de..cea3f501 100644 --- a/src/kernel/attributes/LocalVariableTypeTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTypeTableAttribute.php @@ -10,7 +10,6 @@ final class LocalVariableTypeTableAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php index c93b1257..0a7cbb6c 100644 --- a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php @@ -10,7 +10,6 @@ final class RuntimeInvisibleAnnotationsAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php index 8a7f100e..616e6479 100644 --- a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php @@ -10,7 +10,6 @@ final class RuntimeInvisibleParameterAnnotationsAttribute implements AttributeIn public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php index 2f8e4195..ff308998 100644 --- a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php @@ -10,7 +10,6 @@ final class RuntimeVisibleAnnotationsAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php index 2756b89e..3a6b58ce 100644 --- a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php @@ -10,7 +10,6 @@ final class RuntimeVisibleParameterAnnotationsAttribute implements AttributeInte public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/SignatureAttribute.php b/src/kernel/attributes/SignatureAttribute.php index eb167615..f816f5df 100644 --- a/src/kernel/attributes/SignatureAttribute.php +++ b/src/kernel/attributes/SignatureAttribute.php @@ -10,7 +10,6 @@ final class SignatureAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/SourceDebugExtensionAttribute.php b/src/kernel/attributes/SourceDebugExtensionAttribute.php index cda02b23..3add2f4e 100644 --- a/src/kernel/attributes/SourceDebugExtensionAttribute.php +++ b/src/kernel/attributes/SourceDebugExtensionAttribute.php @@ -10,7 +10,6 @@ final class SourceDebugExtensionAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/attributes/SourceFileAttribute.php b/src/kernel/attributes/SourceFileAttribute.php index 9ed1b856..f795a2d4 100644 --- a/src/kernel/attributes/SourceFileAttribute.php +++ b/src/kernel/attributes/SourceFileAttribute.php @@ -13,19 +13,11 @@ final class SourceFileAttribute implements AttributeInterface public function execute(): void { - - - $this->SourceFileIndex = $this->readUnsignedShort(); - - } - public function getSourceFileIndex () { - + public function getSourceFileIndex() + { return $this->SourceFileIndex; - } - - } diff --git a/src/kernel/attributes/StackMapTableAttribute.php b/src/kernel/attributes/StackMapTableAttribute.php index 8f0d119c..d48208a3 100644 --- a/src/kernel/attributes/StackMapTableAttribute.php +++ b/src/kernel/attributes/StackMapTableAttribute.php @@ -15,25 +15,15 @@ final class StackMapTableAttribute implements AttributeInterface public function execute(): void { - - - $this->NumberOfEntries = $this->readUnsignedShort(); for ($i = 0; $i < $this->NumberOfEntries; $i++) { - $this->StackMapFrames[] = new JavaStructureStackMapFrame($Class); - - } - } - public function getStackMapFrames () { - + public function getStackMapFrames() + { return $this->StackMapFrames; - } - } - diff --git a/src/kernel/attributes/SyntheticAttribute.php b/src/kernel/attributes/SyntheticAttribute.php index 922fe21c..8e1c1141 100644 --- a/src/kernel/attributes/SyntheticAttribute.php +++ b/src/kernel/attributes/SyntheticAttribute.php @@ -10,7 +10,6 @@ final class SyntheticAttribute implements AttributeInterface public function execute(): void { - throw new NotImplementedException(__CLASS__); } } diff --git a/src/kernel/maps/ClassConstantEnum.php b/src/kernel/maps/ClassConstantEnum.php index 8d64ec9b..64752df5 100644 --- a/src/kernel/maps/ClassConstantEnum.php +++ b/src/kernel/maps/ClassConstantEnum.php @@ -3,7 +3,7 @@ class ClassConstantEnum extends Map { - const _Class = 0x0007; + const _Class = 0x0007; const _Fieldref = 0x0009; const _Methodref = 0x000A; const _InterfaceMethodref = 0x000B; diff --git a/src/kernel/maps/Map.php b/src/kernel/maps/Map.php index 8da07fb0..e68be6c7 100644 --- a/src/kernel/maps/Map.php +++ b/src/kernel/maps/Map.php @@ -16,7 +16,6 @@ public function getName(string $value): ?string public function getValues(): array { - try { $reflectionClass = new \ReflectionClass($this); return array_values($reflectionClass->getConstants()); diff --git a/src/kernel/maps/Mnemonics.php b/src/kernel/maps/Mnemonics.php index d201976d..080fc368 100644 --- a/src/kernel/maps/Mnemonics.php +++ b/src/kernel/maps/Mnemonics.php @@ -208,4 +208,4 @@ class Mnemonics extends Map const _breakpoint = 0xCA; const _impdep1 = 0xFE; const _impdep2 = 0xFF; -} \ No newline at end of file +} diff --git a/src/kernel/mnemonics/_aaload.php b/src/kernel/mnemonics/_aaload.php index 1b4b8952..041f10bf 100644 --- a/src/kernel/mnemonics/_aaload.php +++ b/src/kernel/mnemonics/_aaload.php @@ -12,18 +12,14 @@ final class _aaload implements MnemonicInterface * load onto the stack a reference from an array */ public function execute(): void - { + { $index = $this->getStack(); $arrayref = $this->getStack(); if (!isset($arrayref[$index])) { - throw new JavaArrayIndexOutOfBoundsException($this->getMethodName() . ': ' . $index . ' of array index'); - } $this->pushStack($arrayref[$index]); - } - -} +} diff --git a/src/kernel/mnemonics/_aastore.php b/src/kernel/mnemonics/_aastore.php index 879a491d..b38505e1 100644 --- a/src/kernel/mnemonics/_aastore.php +++ b/src/kernel/mnemonics/_aastore.php @@ -13,12 +13,10 @@ final class _aastore implements MnemonicInterface */ public function execute(): void { - $value = $this->getStack(); + $value = $this->getStack(); $index = $this->getStack(); $arrayref = $this->getStack(); $arrayref[$index] = $value; - } - -} +} diff --git a/src/kernel/mnemonics/_aconst_null.php b/src/kernel/mnemonics/_aconst_null.php index 1bc5924e..c5d55c57 100644 --- a/src/kernel/mnemonics/_aconst_null.php +++ b/src/kernel/mnemonics/_aconst_null.php @@ -14,7 +14,5 @@ final class _aconst_null implements MnemonicInterface public function execute(): void { $this->pushStack(null); - } - -} +} diff --git a/src/kernel/mnemonics/_aload.php b/src/kernel/mnemonics/_aload.php index 5948aff1..a7bcf345 100644 --- a/src/kernel/mnemonics/_aload.php +++ b/src/kernel/mnemonics/_aload.php @@ -16,7 +16,5 @@ public function execute(): void $index = $this->getByteCodeStream()->readByte(); $this->pushStack($this->getLocalstorage($index)); - } - } diff --git a/src/kernel/mnemonics/_aload_0.php b/src/kernel/mnemonics/_aload_0.php index 14e95556..b5b316ab 100644 --- a/src/kernel/mnemonics/_aload_0.php +++ b/src/kernel/mnemonics/_aload_0.php @@ -12,9 +12,7 @@ final class _aload_0 implements MnemonicInterface * load a reference onto the stack from local variable 0 */ public function execute(): void - { + { $this->pushStack($this->getLocalstorage(0)); - } - -} +} diff --git a/src/kernel/mnemonics/_aload_1.php b/src/kernel/mnemonics/_aload_1.php index 91b8cdfd..f83de74b 100644 --- a/src/kernel/mnemonics/_aload_1.php +++ b/src/kernel/mnemonics/_aload_1.php @@ -12,10 +12,7 @@ final class _aload_1 implements MnemonicInterface * load a reference onto the stack from local variable 1 */ public function execute(): void - { + { $this->pushStack($this->getLocalstorage(1)); - - } - -} +} diff --git a/src/kernel/mnemonics/_aload_2.php b/src/kernel/mnemonics/_aload_2.php index a215dc7a..53056ee3 100644 --- a/src/kernel/mnemonics/_aload_2.php +++ b/src/kernel/mnemonics/_aload_2.php @@ -14,7 +14,5 @@ final class _aload_2 implements MnemonicInterface public function execute(): void { $this->pushStack($this->getLocalstorage(2)); - } - -} +} diff --git a/src/kernel/mnemonics/_aload_3.php b/src/kernel/mnemonics/_aload_3.php index da823b7c..9e227a7c 100644 --- a/src/kernel/mnemonics/_aload_3.php +++ b/src/kernel/mnemonics/_aload_3.php @@ -14,7 +14,5 @@ final class _aload_3 implements MnemonicInterface public function execute(): void { $this->pushStack($this->getLocalstorage(3)); - } - -} +} diff --git a/src/kernel/mnemonics/_anewarray.php b/src/kernel/mnemonics/_anewarray.php index e1e75269..8f5d783b 100644 --- a/src/kernel/mnemonics/_anewarray.php +++ b/src/kernel/mnemonics/_anewarray.php @@ -14,7 +14,7 @@ final class _anewarray implements MnemonicInterface * in the constant pool */ public function execute(): void - { + { // 配列のサイズを調べる (PHPでは不要なので実行するだけ) $this->getByteCodeStream()->readUnsignedShort(); @@ -23,7 +23,5 @@ public function execute(): void // need reference $ref = new ArrayIterator(array_fill(0, $count, null)); $this->pushStackByReference($ref); - } - -} +} diff --git a/src/kernel/mnemonics/_areturn.php b/src/kernel/mnemonics/_areturn.php index e8988acf..a40e13a8 100644 --- a/src/kernel/mnemonics/_areturn.php +++ b/src/kernel/mnemonics/_areturn.php @@ -9,9 +9,7 @@ final class _areturn implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { return new \java\lang\String((string) $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_arraylength.php b/src/kernel/mnemonics/_arraylength.php index 66ff50b0..c36c9e31 100644 --- a/src/kernel/mnemonics/_arraylength.php +++ b/src/kernel/mnemonics/_arraylength.php @@ -9,11 +9,9 @@ final class _arraylength implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $arrayref = $this->getStack(); $this->pushStack(sizeof($arrayref)); - } - -} +} diff --git a/src/kernel/mnemonics/_astore.php b/src/kernel/mnemonics/_astore.php index 834e7656..b63140c8 100644 --- a/src/kernel/mnemonics/_astore.php +++ b/src/kernel/mnemonics/_astore.php @@ -9,10 +9,8 @@ final class _astore implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_astore_0.php b/src/kernel/mnemonics/_astore_0.php index 8121e519..e729df33 100644 --- a/src/kernel/mnemonics/_astore_0.php +++ b/src/kernel/mnemonics/_astore_0.php @@ -9,9 +9,7 @@ final class _astore_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(0, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_astore_1.php b/src/kernel/mnemonics/_astore_1.php index ccfb2fef..d1ae620c 100644 --- a/src/kernel/mnemonics/_astore_1.php +++ b/src/kernel/mnemonics/_astore_1.php @@ -9,9 +9,7 @@ final class _astore_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(1, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_astore_2.php b/src/kernel/mnemonics/_astore_2.php index 1361c21c..6fb6aacb 100644 --- a/src/kernel/mnemonics/_astore_2.php +++ b/src/kernel/mnemonics/_astore_2.php @@ -9,9 +9,7 @@ final class _astore_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(2, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_astore_3.php b/src/kernel/mnemonics/_astore_3.php index 7b3841ff..229cd009 100644 --- a/src/kernel/mnemonics/_astore_3.php +++ b/src/kernel/mnemonics/_astore_3.php @@ -9,9 +9,7 @@ final class _astore_3 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(3, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_athrow.php b/src/kernel/mnemonics/_athrow.php index 6d7ce840..85a5c60d 100644 --- a/src/kernel/mnemonics/_athrow.php +++ b/src/kernel/mnemonics/_athrow.php @@ -17,20 +17,14 @@ public function execute(): void $className = str_replace('\\', '/', get_class($objectref)); foreach ($this->getAttributeData()->getExceptionTables() as $exception) { - if ($cpInfo[$cpInfo[$exception->getCatchType()]->getClassIndex()]->getString() === $className && $exception->getStartPc() <= $this->getPointer() && $exception->getEndPc() >= $this->getPointer()) { - $this->getByteCodeStream()->setOffset($exception->getHandlerPc()); return; - } - } throw new Exception('exception table was broken.'); - } - } diff --git a/src/kernel/mnemonics/_baload.php b/src/kernel/mnemonics/_baload.php index 5352f104..212d2247 100644 --- a/src/kernel/mnemonics/_baload.php +++ b/src/kernel/mnemonics/_baload.php @@ -9,8 +9,7 @@ final class _baload implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_bastore.php b/src/kernel/mnemonics/_bastore.php index 5cbc879c..6c849854 100644 --- a/src/kernel/mnemonics/_bastore.php +++ b/src/kernel/mnemonics/_bastore.php @@ -9,8 +9,7 @@ final class _bastore implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_bipush.php b/src/kernel/mnemonics/_bipush.php index 48994e34..e9096160 100644 --- a/src/kernel/mnemonics/_bipush.php +++ b/src/kernel/mnemonics/_bipush.php @@ -11,7 +11,5 @@ final class _bipush implements MnemonicInterface public function execute(): void { $this->pushStack($this->getByteCodeStream()->readByte()); - } - } diff --git a/src/kernel/mnemonics/_breakpoint.php b/src/kernel/mnemonics/_breakpoint.php index 8dc2ab7b..45a8ca3c 100644 --- a/src/kernel/mnemonics/_breakpoint.php +++ b/src/kernel/mnemonics/_breakpoint.php @@ -9,8 +9,7 @@ final class _breakpoint implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_caload.php b/src/kernel/mnemonics/_caload.php index ad67a330..7e399655 100644 --- a/src/kernel/mnemonics/_caload.php +++ b/src/kernel/mnemonics/_caload.php @@ -9,8 +9,7 @@ final class _caload implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_castore.php b/src/kernel/mnemonics/_castore.php index 171e66e3..6ceac9df 100644 --- a/src/kernel/mnemonics/_castore.php +++ b/src/kernel/mnemonics/_castore.php @@ -9,8 +9,7 @@ final class _castore implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_checkcast.php b/src/kernel/mnemonics/_checkcast.php index a4a642e1..f18937e8 100644 --- a/src/kernel/mnemonics/_checkcast.php +++ b/src/kernel/mnemonics/_checkcast.php @@ -9,8 +9,7 @@ final class _checkcast implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_d2f.php b/src/kernel/mnemonics/_d2f.php index 05b57e98..76abfb06 100644 --- a/src/kernel/mnemonics/_d2f.php +++ b/src/kernel/mnemonics/_d2f.php @@ -9,8 +9,7 @@ final class _d2f implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_d2i.php b/src/kernel/mnemonics/_d2i.php index 691f658e..d953c346 100644 --- a/src/kernel/mnemonics/_d2i.php +++ b/src/kernel/mnemonics/_d2i.php @@ -9,8 +9,7 @@ final class _d2i implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_d2l.php b/src/kernel/mnemonics/_d2l.php index 9b1fa3e3..86817e2c 100644 --- a/src/kernel/mnemonics/_d2l.php +++ b/src/kernel/mnemonics/_d2l.php @@ -9,8 +9,7 @@ final class _d2l implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dadd.php b/src/kernel/mnemonics/_dadd.php index d6d20223..a371dc52 100644 --- a/src/kernel/mnemonics/_dadd.php +++ b/src/kernel/mnemonics/_dadd.php @@ -9,12 +9,10 @@ final class _dadd implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $value1 = $this->getStack(); $value2 = $this->getStack(); $this->pushStack(BinaryTool::add($value1, $value2, 8)); - } - -} +} diff --git a/src/kernel/mnemonics/_daload.php b/src/kernel/mnemonics/_daload.php index 63ed600e..478cf0e5 100644 --- a/src/kernel/mnemonics/_daload.php +++ b/src/kernel/mnemonics/_daload.php @@ -12,12 +12,10 @@ final class _daload implements MnemonicInterface * load a double from an array */ public function execute(): void - { + { $index = $this->getStack(); $arrayref = $this->getStack(); $this->pushStack($arrayref[$index]); - } - -} +} diff --git a/src/kernel/mnemonics/_dastore.php b/src/kernel/mnemonics/_dastore.php index 5a3bdaa1..b8dd2828 100644 --- a/src/kernel/mnemonics/_dastore.php +++ b/src/kernel/mnemonics/_dastore.php @@ -12,13 +12,11 @@ final class _dastore implements MnemonicInterface * store a double into an array */ public function execute(): void - { - $value = $this->getStack(); + { + $value = $this->getStack(); $index = $this->getStack(); $arrayref = $this->getStack(); $arrayref[$index] = $value; - } - -} +} diff --git a/src/kernel/mnemonics/_dcmpg.php b/src/kernel/mnemonics/_dcmpg.php index 86b4a95f..fa7784b2 100644 --- a/src/kernel/mnemonics/_dcmpg.php +++ b/src/kernel/mnemonics/_dcmpg.php @@ -9,8 +9,7 @@ final class _dcmpg implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dcmpl.php b/src/kernel/mnemonics/_dcmpl.php index 74b1ee80..4b422422 100644 --- a/src/kernel/mnemonics/_dcmpl.php +++ b/src/kernel/mnemonics/_dcmpl.php @@ -9,8 +9,7 @@ final class _dcmpl implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dconst_0.php b/src/kernel/mnemonics/_dconst_0.php index 597406bb..7fd365d7 100644 --- a/src/kernel/mnemonics/_dconst_0.php +++ b/src/kernel/mnemonics/_dconst_0.php @@ -9,9 +9,7 @@ final class _dconst_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->pushStack(0); - } - -} +} diff --git a/src/kernel/mnemonics/_dconst_1.php b/src/kernel/mnemonics/_dconst_1.php index e38e07ed..f1487f2d 100644 --- a/src/kernel/mnemonics/_dconst_1.php +++ b/src/kernel/mnemonics/_dconst_1.php @@ -11,7 +11,5 @@ final class _dconst_1 implements MnemonicInterface public function execute(): void { $this->pushStack(1); - } - -} +} diff --git a/src/kernel/mnemonics/_ddiv.php b/src/kernel/mnemonics/_ddiv.php index 50b1f8b3..95bb76c7 100644 --- a/src/kernel/mnemonics/_ddiv.php +++ b/src/kernel/mnemonics/_ddiv.php @@ -9,8 +9,7 @@ final class _ddiv implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dload.php b/src/kernel/mnemonics/_dload.php index 574292af..e45d3b79 100644 --- a/src/kernel/mnemonics/_dload.php +++ b/src/kernel/mnemonics/_dload.php @@ -12,10 +12,8 @@ final class _dload implements MnemonicInterface * load a double value from a local variable #index */ public function execute(): void - { + { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); - } - -} +} diff --git a/src/kernel/mnemonics/_dload_0.php b/src/kernel/mnemonics/_dload_0.php index d4429b47..4f32bb3d 100644 --- a/src/kernel/mnemonics/_dload_0.php +++ b/src/kernel/mnemonics/_dload_0.php @@ -9,8 +9,7 @@ final class _dload_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dload_1.php b/src/kernel/mnemonics/_dload_1.php index 03cc3d46..74d5c0fa 100644 --- a/src/kernel/mnemonics/_dload_1.php +++ b/src/kernel/mnemonics/_dload_1.php @@ -9,8 +9,7 @@ final class _dload_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dload_2.php b/src/kernel/mnemonics/_dload_2.php index c91dbe7b..24f8d21d 100644 --- a/src/kernel/mnemonics/_dload_2.php +++ b/src/kernel/mnemonics/_dload_2.php @@ -9,8 +9,7 @@ final class _dload_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dload_3.php b/src/kernel/mnemonics/_dload_3.php index ebebfb7a..6ddd8ead 100644 --- a/src/kernel/mnemonics/_dload_3.php +++ b/src/kernel/mnemonics/_dload_3.php @@ -9,8 +9,7 @@ final class _dload_3 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dmul.php b/src/kernel/mnemonics/_dmul.php index eb766faa..15ac66f8 100644 --- a/src/kernel/mnemonics/_dmul.php +++ b/src/kernel/mnemonics/_dmul.php @@ -9,14 +9,10 @@ final class _dmul implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $value1 = $this->getStack(); $value2 = $this->getStack(); $this->pushStack(BinaryTool::multiply($value1, $value2, 8)); - - - } - -} +} diff --git a/src/kernel/mnemonics/_dneg.php b/src/kernel/mnemonics/_dneg.php index 6793464e..ca51ff0e 100644 --- a/src/kernel/mnemonics/_dneg.php +++ b/src/kernel/mnemonics/_dneg.php @@ -9,8 +9,7 @@ final class _dneg implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_drem.php b/src/kernel/mnemonics/_drem.php index 268d572a..bad7e823 100644 --- a/src/kernel/mnemonics/_drem.php +++ b/src/kernel/mnemonics/_drem.php @@ -9,8 +9,7 @@ final class _drem implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dreturn.php b/src/kernel/mnemonics/_dreturn.php index c7383e28..e50c7ad2 100644 --- a/src/kernel/mnemonics/_dreturn.php +++ b/src/kernel/mnemonics/_dreturn.php @@ -9,9 +9,7 @@ final class _dreturn implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { return new JavaTypeDouble($this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_dstore.php b/src/kernel/mnemonics/_dstore.php index a1f41767..357046b4 100644 --- a/src/kernel/mnemonics/_dstore.php +++ b/src/kernel/mnemonics/_dstore.php @@ -12,12 +12,10 @@ final class _dstore implements MnemonicInterface * store a double value into a local variable #index */ public function execute(): void - { + { $index = $this->getByteCodeStream()->readUnsignedByte(); $value = $this->getStack(); $this->setLocalstorage($index, BinaryTool::convertDoubleToIEEE754($value)); - } - -} +} diff --git a/src/kernel/mnemonics/_dstore_0.php b/src/kernel/mnemonics/_dstore_0.php index e5afde4e..b2734705 100644 --- a/src/kernel/mnemonics/_dstore_0.php +++ b/src/kernel/mnemonics/_dstore_0.php @@ -9,9 +9,7 @@ final class _dstore_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(0, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_dstore_1.php b/src/kernel/mnemonics/_dstore_1.php index 6c8d1d73..90ed1789 100644 --- a/src/kernel/mnemonics/_dstore_1.php +++ b/src/kernel/mnemonics/_dstore_1.php @@ -9,9 +9,7 @@ final class _dstore_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(1, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_dstore_2.php b/src/kernel/mnemonics/_dstore_2.php index 99f3bce4..02468cd6 100644 --- a/src/kernel/mnemonics/_dstore_2.php +++ b/src/kernel/mnemonics/_dstore_2.php @@ -9,9 +9,7 @@ final class _dstore_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(2, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_dstore_3.php b/src/kernel/mnemonics/_dstore_3.php index e4963a07..0fdb1141 100644 --- a/src/kernel/mnemonics/_dstore_3.php +++ b/src/kernel/mnemonics/_dstore_3.php @@ -11,7 +11,5 @@ final class _dstore_3 implements MnemonicInterface public function execute(): void { $this->setLocalstorage(3, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_dsub.php b/src/kernel/mnemonics/_dsub.php index 1be01788..f1b15198 100644 --- a/src/kernel/mnemonics/_dsub.php +++ b/src/kernel/mnemonics/_dsub.php @@ -9,12 +9,10 @@ final class _dsub implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $leftValue = $this->getStack(); $rightValue = $this->getStack(); $this->pushStack(BinaryTool::sub($leftValue, $rightValue, 8)); - } - -} +} diff --git a/src/kernel/mnemonics/_dup.php b/src/kernel/mnemonics/_dup.php index 56bcf117..005df187 100644 --- a/src/kernel/mnemonics/_dup.php +++ b/src/kernel/mnemonics/_dup.php @@ -9,9 +9,7 @@ final class _dup implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->dupStack(); - } - -} +} diff --git a/src/kernel/mnemonics/_dup2.php b/src/kernel/mnemonics/_dup2.php index 1e83657b..2fcfd628 100644 --- a/src/kernel/mnemonics/_dup2.php +++ b/src/kernel/mnemonics/_dup2.php @@ -9,8 +9,7 @@ final class _dup2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dup2_x1.php b/src/kernel/mnemonics/_dup2_x1.php index 5466fa77..e1ab86e5 100644 --- a/src/kernel/mnemonics/_dup2_x1.php +++ b/src/kernel/mnemonics/_dup2_x1.php @@ -9,8 +9,7 @@ final class _dup2_x1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dup2_x2.php b/src/kernel/mnemonics/_dup2_x2.php index 108d95a8..bee9fc24 100644 --- a/src/kernel/mnemonics/_dup2_x2.php +++ b/src/kernel/mnemonics/_dup2_x2.php @@ -9,8 +9,7 @@ final class _dup2_x2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dup_x1.php b/src/kernel/mnemonics/_dup_x1.php index 4ba074f2..966676cc 100644 --- a/src/kernel/mnemonics/_dup_x1.php +++ b/src/kernel/mnemonics/_dup_x1.php @@ -9,8 +9,7 @@ final class _dup_x1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_dup_x2.php b/src/kernel/mnemonics/_dup_x2.php index 8ac33a5d..eaf9edde 100644 --- a/src/kernel/mnemonics/_dup_x2.php +++ b/src/kernel/mnemonics/_dup_x2.php @@ -9,8 +9,7 @@ final class _dup_x2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_f2d.php b/src/kernel/mnemonics/_f2d.php index c6b97d2b..f8d4b068 100644 --- a/src/kernel/mnemonics/_f2d.php +++ b/src/kernel/mnemonics/_f2d.php @@ -9,8 +9,7 @@ final class _f2d implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_f2i.php b/src/kernel/mnemonics/_f2i.php index e7bf00b3..4fffdb71 100644 --- a/src/kernel/mnemonics/_f2i.php +++ b/src/kernel/mnemonics/_f2i.php @@ -9,8 +9,7 @@ final class _f2i implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_f2l.php b/src/kernel/mnemonics/_f2l.php index f977243f..dec42389 100644 --- a/src/kernel/mnemonics/_f2l.php +++ b/src/kernel/mnemonics/_f2l.php @@ -9,8 +9,7 @@ final class _f2l implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fadd.php b/src/kernel/mnemonics/_fadd.php index 6a324351..c00d9f32 100644 --- a/src/kernel/mnemonics/_fadd.php +++ b/src/kernel/mnemonics/_fadd.php @@ -9,8 +9,7 @@ final class _fadd implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_faload.php b/src/kernel/mnemonics/_faload.php index c9359085..a9d39a83 100644 --- a/src/kernel/mnemonics/_faload.php +++ b/src/kernel/mnemonics/_faload.php @@ -9,8 +9,7 @@ final class _faload implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fastore.php b/src/kernel/mnemonics/_fastore.php index 33364f47..19d43402 100644 --- a/src/kernel/mnemonics/_fastore.php +++ b/src/kernel/mnemonics/_fastore.php @@ -9,8 +9,7 @@ final class _fastore implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fcmpg.php b/src/kernel/mnemonics/_fcmpg.php index a5f661f3..ecc5a1b6 100644 --- a/src/kernel/mnemonics/_fcmpg.php +++ b/src/kernel/mnemonics/_fcmpg.php @@ -9,8 +9,7 @@ final class _fcmpg implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fcmpl.php b/src/kernel/mnemonics/_fcmpl.php index 4223ed78..d0d45d32 100644 --- a/src/kernel/mnemonics/_fcmpl.php +++ b/src/kernel/mnemonics/_fcmpl.php @@ -9,8 +9,7 @@ final class _fcmpl implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fconst_0.php b/src/kernel/mnemonics/_fconst_0.php index 6d029bcd..1f6ee52f 100644 --- a/src/kernel/mnemonics/_fconst_0.php +++ b/src/kernel/mnemonics/_fconst_0.php @@ -9,8 +9,7 @@ final class _fconst_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fconst_1.php b/src/kernel/mnemonics/_fconst_1.php index 1cbdc66c..ed3aacd0 100644 --- a/src/kernel/mnemonics/_fconst_1.php +++ b/src/kernel/mnemonics/_fconst_1.php @@ -9,8 +9,7 @@ final class _fconst_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fconst_2.php b/src/kernel/mnemonics/_fconst_2.php index 6ce8c3c2..4e8d3361 100644 --- a/src/kernel/mnemonics/_fconst_2.php +++ b/src/kernel/mnemonics/_fconst_2.php @@ -9,8 +9,7 @@ final class _fconst_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fdiv.php b/src/kernel/mnemonics/_fdiv.php index ce9daeb5..e19464c7 100644 --- a/src/kernel/mnemonics/_fdiv.php +++ b/src/kernel/mnemonics/_fdiv.php @@ -9,8 +9,7 @@ final class _fdiv implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fload.php b/src/kernel/mnemonics/_fload.php index ac5979f5..2d6a5aee 100644 --- a/src/kernel/mnemonics/_fload.php +++ b/src/kernel/mnemonics/_fload.php @@ -9,8 +9,7 @@ final class _fload implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fload_0.php b/src/kernel/mnemonics/_fload_0.php index e77328d0..45e6542b 100644 --- a/src/kernel/mnemonics/_fload_0.php +++ b/src/kernel/mnemonics/_fload_0.php @@ -9,8 +9,7 @@ final class _fload_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fload_1.php b/src/kernel/mnemonics/_fload_1.php index e0c9e383..ec7f9427 100644 --- a/src/kernel/mnemonics/_fload_1.php +++ b/src/kernel/mnemonics/_fload_1.php @@ -9,8 +9,7 @@ final class _fload_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fload_2.php b/src/kernel/mnemonics/_fload_2.php index a21cb452..8273c288 100644 --- a/src/kernel/mnemonics/_fload_2.php +++ b/src/kernel/mnemonics/_fload_2.php @@ -9,8 +9,7 @@ final class _fload_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fload_3.php b/src/kernel/mnemonics/_fload_3.php index 61fe6262..9f88ee13 100644 --- a/src/kernel/mnemonics/_fload_3.php +++ b/src/kernel/mnemonics/_fload_3.php @@ -9,8 +9,7 @@ final class _fload_3 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fmul.php b/src/kernel/mnemonics/_fmul.php index 58840299..2df74a15 100644 --- a/src/kernel/mnemonics/_fmul.php +++ b/src/kernel/mnemonics/_fmul.php @@ -9,8 +9,7 @@ final class _fmul implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fneg.php b/src/kernel/mnemonics/_fneg.php index 1c6b78ad..e1a73d57 100644 --- a/src/kernel/mnemonics/_fneg.php +++ b/src/kernel/mnemonics/_fneg.php @@ -9,8 +9,7 @@ final class _fneg implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_frem.php b/src/kernel/mnemonics/_frem.php index 6c431463..87358242 100644 --- a/src/kernel/mnemonics/_frem.php +++ b/src/kernel/mnemonics/_frem.php @@ -9,8 +9,7 @@ final class _frem implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_freturn.php b/src/kernel/mnemonics/_freturn.php index 85158548..063a70ff 100644 --- a/src/kernel/mnemonics/_freturn.php +++ b/src/kernel/mnemonics/_freturn.php @@ -11,7 +11,5 @@ final class _freturn implements MnemonicInterface public function execute(): void { return new JavaTypeFloat($this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_fstore.php b/src/kernel/mnemonics/_fstore.php index 26a66f5c..e1c07836 100644 --- a/src/kernel/mnemonics/_fstore.php +++ b/src/kernel/mnemonics/_fstore.php @@ -9,8 +9,7 @@ final class _fstore implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fstore_0.php b/src/kernel/mnemonics/_fstore_0.php index 5f6171af..7d8dc330 100644 --- a/src/kernel/mnemonics/_fstore_0.php +++ b/src/kernel/mnemonics/_fstore_0.php @@ -9,8 +9,7 @@ final class _fstore_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fstore_1.php b/src/kernel/mnemonics/_fstore_1.php index ca4c1bd4..b53374d6 100644 --- a/src/kernel/mnemonics/_fstore_1.php +++ b/src/kernel/mnemonics/_fstore_1.php @@ -9,8 +9,7 @@ final class _fstore_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fstore_2.php b/src/kernel/mnemonics/_fstore_2.php index 90afb34f..d1024f47 100644 --- a/src/kernel/mnemonics/_fstore_2.php +++ b/src/kernel/mnemonics/_fstore_2.php @@ -9,8 +9,7 @@ final class _fstore_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fstore_3.php b/src/kernel/mnemonics/_fstore_3.php index f2aa8c21..5df39f8a 100644 --- a/src/kernel/mnemonics/_fstore_3.php +++ b/src/kernel/mnemonics/_fstore_3.php @@ -9,8 +9,7 @@ final class _fstore_3 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_fsub.php b/src/kernel/mnemonics/_fsub.php index 1d253956..9d3c33e0 100644 --- a/src/kernel/mnemonics/_fsub.php +++ b/src/kernel/mnemonics/_fsub.php @@ -9,8 +9,7 @@ final class _fsub implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_getfield.php b/src/kernel/mnemonics/_getfield.php index 183c61eb..2deaf09e 100644 --- a/src/kernel/mnemonics/_getfield.php +++ b/src/kernel/mnemonics/_getfield.php @@ -19,15 +19,9 @@ public function execute(): void $return = $get->getInstance($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()); if ($return !== null) { - $this->pushStack($return); - } else { - throw new Exception('Cannot get ' . $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() . ''); - } - } - } diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/mnemonics/_getstatic.php index 85e6c363..e3c440d3 100644 --- a/src/kernel/mnemonics/_getstatic.php +++ b/src/kernel/mnemonics/_getstatic.php @@ -19,32 +19,24 @@ public function execute(): void $signature = JavaClass::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); foreach ($this->getInvoker()->getClass()->getFields() as $field) { - if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { // push stack $this->pushStack($this->getInvoker()->getClass()->getStatic($cpInfo[$field->getNameIndex()]->getString())); return; - } - } if (isset($signature[0]['className'])) { - $this->getInvoker()->loadPlatform($class); $this->getInvoker()->loadPlatform($signature[0]['className']); $className = str_replace('/', '\\', $signature[0]['className']); $this->pushStack(new $className()); return; - } throw new Exception('Has not class or field'); - - } - -} +} diff --git a/src/kernel/mnemonics/_goto.php b/src/kernel/mnemonics/_goto.php index 458b5220..e415b22f 100644 --- a/src/kernel/mnemonics/_goto.php +++ b/src/kernel/mnemonics/_goto.php @@ -13,7 +13,5 @@ public function execute(): void $offset = $this->getByteCodeStream()->readShort(); $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - -} +} diff --git a/src/kernel/mnemonics/_goto_w.php b/src/kernel/mnemonics/_goto_w.php index 04728454..f30a8b8f 100644 --- a/src/kernel/mnemonics/_goto_w.php +++ b/src/kernel/mnemonics/_goto_w.php @@ -9,8 +9,7 @@ final class _goto_w implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_i2b.php b/src/kernel/mnemonics/_i2b.php index 843d99bc..b6d69137 100644 --- a/src/kernel/mnemonics/_i2b.php +++ b/src/kernel/mnemonics/_i2b.php @@ -9,8 +9,7 @@ final class _i2b implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_i2c.php b/src/kernel/mnemonics/_i2c.php index bf2f0899..9a1bc0a8 100644 --- a/src/kernel/mnemonics/_i2c.php +++ b/src/kernel/mnemonics/_i2c.php @@ -9,8 +9,7 @@ final class _i2c implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_i2d.php b/src/kernel/mnemonics/_i2d.php index 596287aa..b42f7029 100644 --- a/src/kernel/mnemonics/_i2d.php +++ b/src/kernel/mnemonics/_i2d.php @@ -9,8 +9,7 @@ final class _i2d implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_i2f.php b/src/kernel/mnemonics/_i2f.php index 46d84850..87f6807d 100644 --- a/src/kernel/mnemonics/_i2f.php +++ b/src/kernel/mnemonics/_i2f.php @@ -9,8 +9,7 @@ final class _i2f implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_i2l.php b/src/kernel/mnemonics/_i2l.php index 6fd90c13..fc14f2d1 100644 --- a/src/kernel/mnemonics/_i2l.php +++ b/src/kernel/mnemonics/_i2l.php @@ -9,8 +9,7 @@ final class _i2l implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_i2s.php b/src/kernel/mnemonics/_i2s.php index 6587f6ec..6687ae35 100644 --- a/src/kernel/mnemonics/_i2s.php +++ b/src/kernel/mnemonics/_i2s.php @@ -13,7 +13,5 @@ public function execute(): void $value = $this->getStack(); $this->pushStack(base_convert(substr(sprintf('%032s', base_convert($value, 10, 2)), 16), 2, 10)); - } - } diff --git a/src/kernel/mnemonics/_iadd.php b/src/kernel/mnemonics/_iadd.php index 25415ae0..512ead0a 100644 --- a/src/kernel/mnemonics/_iadd.php +++ b/src/kernel/mnemonics/_iadd.php @@ -14,7 +14,5 @@ public function execute(): void $rightValue = $this->getStack(); $this->pushStack(BinaryTool::add($leftValue, $rightValue, 4)); - } - } diff --git a/src/kernel/mnemonics/_iaload.php b/src/kernel/mnemonics/_iaload.php index 5dfc63e2..5db1ea42 100644 --- a/src/kernel/mnemonics/_iaload.php +++ b/src/kernel/mnemonics/_iaload.php @@ -9,12 +9,10 @@ final class _iaload implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $index = $this->getStack(); $arrayref = $this->getStack(); $this->pushStack($arrayref[$index]); - } - -} +} diff --git a/src/kernel/mnemonics/_iand.php b/src/kernel/mnemonics/_iand.php index 7dbc6990..be6a1f33 100644 --- a/src/kernel/mnemonics/_iand.php +++ b/src/kernel/mnemonics/_iand.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::andBits($value1, $value2, 4)); - } - } diff --git a/src/kernel/mnemonics/_iastore.php b/src/kernel/mnemonics/_iastore.php index ea2ea4e1..e034230e 100644 --- a/src/kernel/mnemonics/_iastore.php +++ b/src/kernel/mnemonics/_iastore.php @@ -9,13 +9,11 @@ final class _iastore implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $data = $this->getStack(); $arrayref = $this->getStack(); $value = $this->getStack(); $value[$arrayref] = $data; - } - -} +} diff --git a/src/kernel/mnemonics/_iconst_0.php b/src/kernel/mnemonics/_iconst_0.php index f3e40216..bf0b724a 100644 --- a/src/kernel/mnemonics/_iconst_0.php +++ b/src/kernel/mnemonics/_iconst_0.php @@ -9,9 +9,7 @@ final class _iconst_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->pushStack(0); - } - -} +} diff --git a/src/kernel/mnemonics/_iconst_1.php b/src/kernel/mnemonics/_iconst_1.php index cdbb4a90..0815c477 100644 --- a/src/kernel/mnemonics/_iconst_1.php +++ b/src/kernel/mnemonics/_iconst_1.php @@ -9,9 +9,7 @@ final class _iconst_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->pushStack(1); - } - -} +} diff --git a/src/kernel/mnemonics/_iconst_2.php b/src/kernel/mnemonics/_iconst_2.php index 39327302..fad483bf 100644 --- a/src/kernel/mnemonics/_iconst_2.php +++ b/src/kernel/mnemonics/_iconst_2.php @@ -9,9 +9,7 @@ final class _iconst_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->pushStack(2); - } - -} +} diff --git a/src/kernel/mnemonics/_iconst_3.php b/src/kernel/mnemonics/_iconst_3.php index a34a4554..c6f42d61 100644 --- a/src/kernel/mnemonics/_iconst_3.php +++ b/src/kernel/mnemonics/_iconst_3.php @@ -9,9 +9,7 @@ final class _iconst_3 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->pushStack(3); - } - -} +} diff --git a/src/kernel/mnemonics/_iconst_4.php b/src/kernel/mnemonics/_iconst_4.php index 12099ed1..484e6520 100644 --- a/src/kernel/mnemonics/_iconst_4.php +++ b/src/kernel/mnemonics/_iconst_4.php @@ -9,9 +9,7 @@ final class _iconst_4 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->pushStack(4); - } - -} +} diff --git a/src/kernel/mnemonics/_iconst_5.php b/src/kernel/mnemonics/_iconst_5.php index 7afd4c36..f6103782 100644 --- a/src/kernel/mnemonics/_iconst_5.php +++ b/src/kernel/mnemonics/_iconst_5.php @@ -9,9 +9,7 @@ final class _iconst_5 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->pushStack(5); - } - -} +} diff --git a/src/kernel/mnemonics/_iconst_m1.php b/src/kernel/mnemonics/_iconst_m1.php index 829cbb72..80934a1b 100644 --- a/src/kernel/mnemonics/_iconst_m1.php +++ b/src/kernel/mnemonics/_iconst_m1.php @@ -9,9 +9,7 @@ final class _iconst_m1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->pushStack(-1); - } - -} +} diff --git a/src/kernel/mnemonics/_idiv.php b/src/kernel/mnemonics/_idiv.php index 7bd4dc6a..f2035e87 100644 --- a/src/kernel/mnemonics/_idiv.php +++ b/src/kernel/mnemonics/_idiv.php @@ -9,8 +9,7 @@ final class _idiv implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_if_acmpeq.php b/src/kernel/mnemonics/_if_acmpeq.php index 7acb913f..aa00bd51 100644 --- a/src/kernel/mnemonics/_if_acmpeq.php +++ b/src/kernel/mnemonics/_if_acmpeq.php @@ -9,18 +9,14 @@ final class _if_acmpeq implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand === $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/mnemonics/_if_acmpne.php b/src/kernel/mnemonics/_if_acmpne.php index d7318fff..d900a912 100644 --- a/src/kernel/mnemonics/_if_acmpne.php +++ b/src/kernel/mnemonics/_if_acmpne.php @@ -9,18 +9,14 @@ final class _if_acmpne implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand !== $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/mnemonics/_if_icmpeq.php b/src/kernel/mnemonics/_if_icmpeq.php index 3c095335..67fa00e7 100644 --- a/src/kernel/mnemonics/_if_icmpeq.php +++ b/src/kernel/mnemonics/_if_icmpeq.php @@ -9,8 +9,7 @@ final class _if_icmpeq implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_if_icmpge.php b/src/kernel/mnemonics/_if_icmpge.php index 1000d9ef..b71dbd14 100644 --- a/src/kernel/mnemonics/_if_icmpge.php +++ b/src/kernel/mnemonics/_if_icmpge.php @@ -9,19 +9,14 @@ final class _if_icmpge implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { - + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand <= $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/mnemonics/_if_icmpgt.php b/src/kernel/mnemonics/_if_icmpgt.php index 94332326..9be2de44 100644 --- a/src/kernel/mnemonics/_if_icmpgt.php +++ b/src/kernel/mnemonics/_if_icmpgt.php @@ -16,12 +16,7 @@ public function execute(): void $rightOperand = $this->getStack(); if ($leftOperand < $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - - } - -} +} diff --git a/src/kernel/mnemonics/_if_icmple.php b/src/kernel/mnemonics/_if_icmple.php index 76023e12..eb1d84fb 100644 --- a/src/kernel/mnemonics/_if_icmple.php +++ b/src/kernel/mnemonics/_if_icmple.php @@ -9,8 +9,7 @@ final class _if_icmple implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_if_icmplt.php b/src/kernel/mnemonics/_if_icmplt.php index 83981528..f779b59c 100644 --- a/src/kernel/mnemonics/_if_icmplt.php +++ b/src/kernel/mnemonics/_if_icmplt.php @@ -9,17 +9,14 @@ final class _if_icmplt implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($rightOperand < $leftOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } } - -} +} diff --git a/src/kernel/mnemonics/_if_icmpne.php b/src/kernel/mnemonics/_if_icmpne.php index 2e63b83c..67cdfca2 100644 --- a/src/kernel/mnemonics/_if_icmpne.php +++ b/src/kernel/mnemonics/_if_icmpne.php @@ -9,18 +9,14 @@ final class _if_icmpne implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand != $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/mnemonics/_ifeq.php b/src/kernel/mnemonics/_ifeq.php index 7ec066a4..e92d4cf2 100644 --- a/src/kernel/mnemonics/_ifeq.php +++ b/src/kernel/mnemonics/_ifeq.php @@ -9,18 +9,13 @@ final class _ifeq implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $operand = $this->getStack(); if ($operand == 0) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - - } - -} +} diff --git a/src/kernel/mnemonics/_ifge.php b/src/kernel/mnemonics/_ifge.php index 8767df31..53f95639 100644 --- a/src/kernel/mnemonics/_ifge.php +++ b/src/kernel/mnemonics/_ifge.php @@ -9,8 +9,7 @@ final class _ifge implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_ifgt.php b/src/kernel/mnemonics/_ifgt.php index 91121a82..afdf2beb 100644 --- a/src/kernel/mnemonics/_ifgt.php +++ b/src/kernel/mnemonics/_ifgt.php @@ -9,8 +9,7 @@ final class _ifgt implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_ifle.php b/src/kernel/mnemonics/_ifle.php index 018464b7..58b67b46 100644 --- a/src/kernel/mnemonics/_ifle.php +++ b/src/kernel/mnemonics/_ifle.php @@ -9,8 +9,7 @@ final class _ifle implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_iflt.php b/src/kernel/mnemonics/_iflt.php index 7f786798..1cfc7055 100644 --- a/src/kernel/mnemonics/_iflt.php +++ b/src/kernel/mnemonics/_iflt.php @@ -9,8 +9,7 @@ final class _iflt implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_ifne.php b/src/kernel/mnemonics/_ifne.php index 681e3213..87361272 100644 --- a/src/kernel/mnemonics/_ifne.php +++ b/src/kernel/mnemonics/_ifne.php @@ -15,11 +15,7 @@ public function execute(): void $operand = $this->getStack(); if ($operand != 0) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/mnemonics/_ifnonnull.php b/src/kernel/mnemonics/_ifnonnull.php index 1a5da12d..38bb95f7 100644 --- a/src/kernel/mnemonics/_ifnonnull.php +++ b/src/kernel/mnemonics/_ifnonnull.php @@ -9,8 +9,7 @@ final class _ifnonnull implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_ifnull.php b/src/kernel/mnemonics/_ifnull.php index 3db7ca68..f36761f9 100644 --- a/src/kernel/mnemonics/_ifnull.php +++ b/src/kernel/mnemonics/_ifnull.php @@ -9,8 +9,7 @@ final class _ifnull implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_iinc.php b/src/kernel/mnemonics/_iinc.php index 6b8085a6..68d75ab0 100644 --- a/src/kernel/mnemonics/_iinc.php +++ b/src/kernel/mnemonics/_iinc.php @@ -9,12 +9,10 @@ final class _iinc implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $index = $this->getByteCodeStream()->readUnsignedByte(); $const = $this->getByteCodeStream()->readByte(); $this->setLocalstorage($index, $this->getLocalstorage($index) + $const); - } - -} +} diff --git a/src/kernel/mnemonics/_iload.php b/src/kernel/mnemonics/_iload.php index 516d6770..d30d4dc4 100644 --- a/src/kernel/mnemonics/_iload.php +++ b/src/kernel/mnemonics/_iload.php @@ -13,7 +13,5 @@ public function execute(): void $index = $this->getByteCodeStream()->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); - } - -} +} diff --git a/src/kernel/mnemonics/_iload_0.php b/src/kernel/mnemonics/_iload_0.php index d609b141..d9e2fa65 100644 --- a/src/kernel/mnemonics/_iload_0.php +++ b/src/kernel/mnemonics/_iload_0.php @@ -11,7 +11,5 @@ final class _iload_0 implements MnemonicInterface public function execute(): void { $this->pushStack($this->getLocalstorage(0)); - } - -} +} diff --git a/src/kernel/mnemonics/_iload_1.php b/src/kernel/mnemonics/_iload_1.php index dff4d01e..2a8a8915 100644 --- a/src/kernel/mnemonics/_iload_1.php +++ b/src/kernel/mnemonics/_iload_1.php @@ -11,7 +11,5 @@ final class _iload_1 implements MnemonicInterface public function execute(): void { $this->pushStack($this->getLocalstorage(1)); - } - -} +} diff --git a/src/kernel/mnemonics/_iload_2.php b/src/kernel/mnemonics/_iload_2.php index 173044ac..944b0205 100644 --- a/src/kernel/mnemonics/_iload_2.php +++ b/src/kernel/mnemonics/_iload_2.php @@ -9,9 +9,7 @@ final class _iload_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->pushStack($this->getLocalstorage(2)); - } - -} +} diff --git a/src/kernel/mnemonics/_iload_3.php b/src/kernel/mnemonics/_iload_3.php index 6d98ca4b..97edf0a5 100644 --- a/src/kernel/mnemonics/_iload_3.php +++ b/src/kernel/mnemonics/_iload_3.php @@ -11,7 +11,5 @@ final class _iload_3 implements MnemonicInterface public function execute(): void { $this->pushStack($this->getLocalstorage(3)); - } - -} +} diff --git a/src/kernel/mnemonics/_impdep1.php b/src/kernel/mnemonics/_impdep1.php index af8db5b6..3d452703 100644 --- a/src/kernel/mnemonics/_impdep1.php +++ b/src/kernel/mnemonics/_impdep1.php @@ -9,8 +9,7 @@ final class _impdep1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_impdep2.php b/src/kernel/mnemonics/_impdep2.php index 6e17b600..3b0bc145 100644 --- a/src/kernel/mnemonics/_impdep2.php +++ b/src/kernel/mnemonics/_impdep2.php @@ -9,8 +9,7 @@ final class _impdep2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_imul.php b/src/kernel/mnemonics/_imul.php index 5b23c344..80fcbdd6 100644 --- a/src/kernel/mnemonics/_imul.php +++ b/src/kernel/mnemonics/_imul.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::multiply($value1, $value2, 4)); - } - } diff --git a/src/kernel/mnemonics/_ineg.php b/src/kernel/mnemonics/_ineg.php index 7e5dd25b..81ba5906 100644 --- a/src/kernel/mnemonics/_ineg.php +++ b/src/kernel/mnemonics/_ineg.php @@ -13,7 +13,5 @@ public function execute(): void $value = $this->getStack(); $this->pushStack(BinaryTool::negate($value, 4)); - } - } diff --git a/src/kernel/mnemonics/_instanceof.php b/src/kernel/mnemonics/_instanceof.php index bb00340e..88b509d4 100644 --- a/src/kernel/mnemonics/_instanceof.php +++ b/src/kernel/mnemonics/_instanceof.php @@ -9,8 +9,7 @@ final class _instanceof implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_invokedynamic.php b/src/kernel/mnemonics/_invokedynamic.php index 4937936f..763e67be 100644 --- a/src/kernel/mnemonics/_invokedynamic.php +++ b/src/kernel/mnemonics/_invokedynamic.php @@ -9,8 +9,7 @@ final class _invokedynamic implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_invokeinterface.php b/src/kernel/mnemonics/_invokeinterface.php index 15630b0d..f6c5b9bd 100644 --- a/src/kernel/mnemonics/_invokeinterface.php +++ b/src/kernel/mnemonics/_invokeinterface.php @@ -9,8 +9,7 @@ final class _invokeinterface implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_invokespecial.php b/src/kernel/mnemonics/_invokespecial.php index cb39c492..d1e66753 100644 --- a/src/kernel/mnemonics/_invokespecial.php +++ b/src/kernel/mnemonics/_invokespecial.php @@ -9,7 +9,7 @@ final class _invokespecial implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $cpInfo = $this->getCpInfo(); @@ -28,12 +28,7 @@ public function execute(): void $arguments = array(); for ($i = 0; $i < $signature['argumentsCount']; $i++) { - $arguments[] = $this->getStack(); - } - - } - -} +} diff --git a/src/kernel/mnemonics/_invokestatic.php b/src/kernel/mnemonics/_invokestatic.php index a7660b88..8718efd2 100644 --- a/src/kernel/mnemonics/_invokestatic.php +++ b/src/kernel/mnemonics/_invokestatic.php @@ -9,7 +9,7 @@ final class _invokestatic implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $cpInfo = $this->getCpInfo(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -21,9 +21,7 @@ public function execute(): void $arguments = array(); for ($i = 0; $i < $signature['argumentsCount']; $i++) { - $arguments[] = $this->getStack(); - } krsort($arguments); @@ -35,11 +33,7 @@ public function execute(): void ), $arguments); if ($signature[0]['type'] !== 'void') { - $this->pushStack($return); - } - } - -} +} diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index 5299eaa6..24c66b1b 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -23,23 +23,18 @@ public function execute(): void $arguments = array(); for ($i = 0; $i < $signature['argumentsCount']; $i++) { - $arguments[] = $this->getStack(); - } $invokerClass = $this->getStack(); if ($invokerClass instanceof \JavaClass) { - $result = call_user_func_array(array( $invokerClass->getMethodInvoker(), $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() ), $arguments); - - } else { // load platform @@ -52,16 +47,10 @@ public function execute(): void $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() ), $arguments); - } if ($signature[0]['type'] !== 'void') { - $this->pushStack($result); - } - - } - } diff --git a/src/kernel/mnemonics/_ior.php b/src/kernel/mnemonics/_ior.php index 8597c286..5dc921d2 100644 --- a/src/kernel/mnemonics/_ior.php +++ b/src/kernel/mnemonics/_ior.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::orBits($value1, $value2, 4)); - } - } diff --git a/src/kernel/mnemonics/_irem.php b/src/kernel/mnemonics/_irem.php index e101d334..3a680f63 100644 --- a/src/kernel/mnemonics/_irem.php +++ b/src/kernel/mnemonics/_irem.php @@ -9,8 +9,7 @@ final class _irem implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_ireturn.php b/src/kernel/mnemonics/_ireturn.php index bbd3433c..d47f5268 100644 --- a/src/kernel/mnemonics/_ireturn.php +++ b/src/kernel/mnemonics/_ireturn.php @@ -12,9 +12,7 @@ final class _ireturn implements MnemonicInterface * return an integer from a method */ public function execute(): void - { + { return new JavaTypeInt($this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_ishl.php b/src/kernel/mnemonics/_ishl.php index 64eda264..74cb8101 100644 --- a/src/kernel/mnemonics/_ishl.php +++ b/src/kernel/mnemonics/_ishl.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::shiftLeft($value1, $value2, 4)); - } - } diff --git a/src/kernel/mnemonics/_ishr.php b/src/kernel/mnemonics/_ishr.php index d454d353..5181c655 100644 --- a/src/kernel/mnemonics/_ishr.php +++ b/src/kernel/mnemonics/_ishr.php @@ -10,12 +10,9 @@ final class _ishr implements MnemonicInterface public function execute(): void { - $value1 = $this->getStack(); $value2 = $this->getStack(); $this->pushStack(BinaryTool::shiftRight($value1, $value2, 4)); - } - } diff --git a/src/kernel/mnemonics/_istore.php b/src/kernel/mnemonics/_istore.php index a4849e5f..387f82d7 100644 --- a/src/kernel/mnemonics/_istore.php +++ b/src/kernel/mnemonics/_istore.php @@ -12,7 +12,5 @@ public function execute(): void { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_istore_0.php b/src/kernel/mnemonics/_istore_0.php index 77d834c7..e4340168 100644 --- a/src/kernel/mnemonics/_istore_0.php +++ b/src/kernel/mnemonics/_istore_0.php @@ -9,9 +9,7 @@ final class _istore_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(0, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_istore_1.php b/src/kernel/mnemonics/_istore_1.php index d86090fa..cc6e6cd3 100644 --- a/src/kernel/mnemonics/_istore_1.php +++ b/src/kernel/mnemonics/_istore_1.php @@ -9,9 +9,7 @@ final class _istore_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(1, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_istore_2.php b/src/kernel/mnemonics/_istore_2.php index 4216db44..d0f910db 100644 --- a/src/kernel/mnemonics/_istore_2.php +++ b/src/kernel/mnemonics/_istore_2.php @@ -9,9 +9,7 @@ final class _istore_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(2, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_istore_3.php b/src/kernel/mnemonics/_istore_3.php index 07fa510f..54995054 100644 --- a/src/kernel/mnemonics/_istore_3.php +++ b/src/kernel/mnemonics/_istore_3.php @@ -9,9 +9,7 @@ final class _istore_3 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $this->setLocalstorage(3, $this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_isub.php b/src/kernel/mnemonics/_isub.php index ec676a87..49e7346f 100644 --- a/src/kernel/mnemonics/_isub.php +++ b/src/kernel/mnemonics/_isub.php @@ -14,7 +14,5 @@ public function execute(): void $rightValue = $this->getStack(); $this->pushStack(BinaryTool::sub($leftValue, $rightValue, 4)); - } - } diff --git a/src/kernel/mnemonics/_iushr.php b/src/kernel/mnemonics/_iushr.php index d7571250..85d662c6 100644 --- a/src/kernel/mnemonics/_iushr.php +++ b/src/kernel/mnemonics/_iushr.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::unsignedShiftRight($value1, $value2, 4)); - } - } diff --git a/src/kernel/mnemonics/_ixor.php b/src/kernel/mnemonics/_ixor.php index 074a5bb7..82c47bd2 100644 --- a/src/kernel/mnemonics/_ixor.php +++ b/src/kernel/mnemonics/_ixor.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::xorBits($value1, $value2, 4)); - } - } diff --git a/src/kernel/mnemonics/_jsr.php b/src/kernel/mnemonics/_jsr.php index 3923d3d4..068b951f 100644 --- a/src/kernel/mnemonics/_jsr.php +++ b/src/kernel/mnemonics/_jsr.php @@ -9,8 +9,7 @@ final class _jsr implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_jsr_w.php b/src/kernel/mnemonics/_jsr_w.php index 8a578a71..bd795c6d 100644 --- a/src/kernel/mnemonics/_jsr_w.php +++ b/src/kernel/mnemonics/_jsr_w.php @@ -9,8 +9,7 @@ final class _jsr_w implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_l2d.php b/src/kernel/mnemonics/_l2d.php index 182ace35..7a219859 100644 --- a/src/kernel/mnemonics/_l2d.php +++ b/src/kernel/mnemonics/_l2d.php @@ -9,8 +9,7 @@ final class _l2d implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_l2f.php b/src/kernel/mnemonics/_l2f.php index 5387c8f8..4db83816 100644 --- a/src/kernel/mnemonics/_l2f.php +++ b/src/kernel/mnemonics/_l2f.php @@ -9,8 +9,7 @@ final class _l2f implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_l2i.php b/src/kernel/mnemonics/_l2i.php index 717f5af7..1e65a4be 100644 --- a/src/kernel/mnemonics/_l2i.php +++ b/src/kernel/mnemonics/_l2i.php @@ -9,8 +9,7 @@ final class _l2i implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_ladd.php b/src/kernel/mnemonics/_ladd.php index f2d41aa3..8c0df2fe 100644 --- a/src/kernel/mnemonics/_ladd.php +++ b/src/kernel/mnemonics/_ladd.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::add($value1, $value2, 8)); - } - } diff --git a/src/kernel/mnemonics/_laload.php b/src/kernel/mnemonics/_laload.php index 6f0b79b9..8a017b7e 100644 --- a/src/kernel/mnemonics/_laload.php +++ b/src/kernel/mnemonics/_laload.php @@ -12,12 +12,10 @@ final class _laload implements MnemonicInterface * load a long from an array */ public function execute(): void - { + { $index = $this->getStack(); $arrayref = $this->getStack(); $this->pushStack($arrayref[$index]); - } - -} +} diff --git a/src/kernel/mnemonics/_land.php b/src/kernel/mnemonics/_land.php index c0076ff2..57550dad 100644 --- a/src/kernel/mnemonics/_land.php +++ b/src/kernel/mnemonics/_land.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::andBits($value1, $value2, 8)); - } - } diff --git a/src/kernel/mnemonics/_lastore.php b/src/kernel/mnemonics/_lastore.php index eaad9c60..0d35ae99 100644 --- a/src/kernel/mnemonics/_lastore.php +++ b/src/kernel/mnemonics/_lastore.php @@ -12,13 +12,11 @@ final class _lastore implements MnemonicInterface * store a long to an array */ public function execute(): void - { - $value = $this->getStack(); + { + $value = $this->getStack(); $index = $this->getStack(); $arrayref = $this->getStack(); $arrayref[$index] = $value; - } - -} +} diff --git a/src/kernel/mnemonics/_lcmp.php b/src/kernel/mnemonics/_lcmp.php index 11876f79..2b3781a7 100644 --- a/src/kernel/mnemonics/_lcmp.php +++ b/src/kernel/mnemonics/_lcmp.php @@ -9,8 +9,7 @@ final class _lcmp implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lconst_0.php b/src/kernel/mnemonics/_lconst_0.php index eb984e51..780b340f 100644 --- a/src/kernel/mnemonics/_lconst_0.php +++ b/src/kernel/mnemonics/_lconst_0.php @@ -11,7 +11,5 @@ final class _lconst_0 implements MnemonicInterface public function execute(): void { $this->pushStack(0); - } - } diff --git a/src/kernel/mnemonics/_lconst_1.php b/src/kernel/mnemonics/_lconst_1.php index 2895ccd8..ff19755e 100644 --- a/src/kernel/mnemonics/_lconst_1.php +++ b/src/kernel/mnemonics/_lconst_1.php @@ -11,7 +11,5 @@ final class _lconst_1 implements MnemonicInterface public function execute(): void { $this->pushStack(1); - } - } diff --git a/src/kernel/mnemonics/_ldc.php b/src/kernel/mnemonics/_ldc.php index bdf45b86..50f69b99 100644 --- a/src/kernel/mnemonics/_ldc.php +++ b/src/kernel/mnemonics/_ldc.php @@ -17,7 +17,6 @@ public function execute(): void $value = null; if ($data instanceof \JavaStructureString) { - $value = $cpInfo[$data->getStringIndex()]; if ($value instanceof \JavaStructureUtf8) { @@ -26,21 +25,13 @@ public function execute(): void $this->getInvoker()->loadPlatform('java.lang.String'); $value = new \java\lang\String($value); - } - - } else if (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { - + } elseif (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { $value = $data->getBytes(); - } else { - $value = $cpInfo[$cpInfo[$this->getByteCodeStream()->readUnsignedByte()]->getStringIndex()]; - } $this->pushStack($value); - } - } diff --git a/src/kernel/mnemonics/_ldc2_w.php b/src/kernel/mnemonics/_ldc2_w.php index 7dd8e49c..fd1bb050 100644 --- a/src/kernel/mnemonics/_ldc2_w.php +++ b/src/kernel/mnemonics/_ldc2_w.php @@ -9,13 +9,11 @@ final class _ldc2_w implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $cpInfo = $this->getCpInfo(); $data = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - $this->pushStack($data->getBytes()); - + $this->pushStack($data->getBytes()); } - -} +} diff --git a/src/kernel/mnemonics/_ldc_w.php b/src/kernel/mnemonics/_ldc_w.php index cf1a9876..1f58cfef 100644 --- a/src/kernel/mnemonics/_ldc_w.php +++ b/src/kernel/mnemonics/_ldc_w.php @@ -9,8 +9,7 @@ final class _ldc_w implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_ldiv.php b/src/kernel/mnemonics/_ldiv.php index f312a843..c0b35d44 100644 --- a/src/kernel/mnemonics/_ldiv.php +++ b/src/kernel/mnemonics/_ldiv.php @@ -9,8 +9,7 @@ final class _ldiv implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lload.php b/src/kernel/mnemonics/_lload.php index ffbc272d..5f743c62 100644 --- a/src/kernel/mnemonics/_lload.php +++ b/src/kernel/mnemonics/_lload.php @@ -13,7 +13,5 @@ public function execute(): void $index = $this->getByteCodeStream()->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); - } - } diff --git a/src/kernel/mnemonics/_lload_0.php b/src/kernel/mnemonics/_lload_0.php index d4b4dfb7..c2aeb8a2 100644 --- a/src/kernel/mnemonics/_lload_0.php +++ b/src/kernel/mnemonics/_lload_0.php @@ -9,8 +9,7 @@ final class _lload_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lload_1.php b/src/kernel/mnemonics/_lload_1.php index 6a306eeb..67b7d5e3 100644 --- a/src/kernel/mnemonics/_lload_1.php +++ b/src/kernel/mnemonics/_lload_1.php @@ -9,8 +9,7 @@ final class _lload_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lload_2.php b/src/kernel/mnemonics/_lload_2.php index 658ec7ae..2ef23e02 100644 --- a/src/kernel/mnemonics/_lload_2.php +++ b/src/kernel/mnemonics/_lload_2.php @@ -9,8 +9,7 @@ final class _lload_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lload_3.php b/src/kernel/mnemonics/_lload_3.php index b3502fb1..199a861c 100644 --- a/src/kernel/mnemonics/_lload_3.php +++ b/src/kernel/mnemonics/_lload_3.php @@ -9,8 +9,7 @@ final class _lload_3 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lmul.php b/src/kernel/mnemonics/_lmul.php index d20ea660..a459fdcd 100644 --- a/src/kernel/mnemonics/_lmul.php +++ b/src/kernel/mnemonics/_lmul.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::multiply($value1, $value2, 8)); - } - } diff --git a/src/kernel/mnemonics/_lneg.php b/src/kernel/mnemonics/_lneg.php index fce9e150..7d9b97c1 100644 --- a/src/kernel/mnemonics/_lneg.php +++ b/src/kernel/mnemonics/_lneg.php @@ -9,8 +9,7 @@ final class _lneg implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lookupswitch.php b/src/kernel/mnemonics/_lookupswitch.php index 844eab73..99d4da1e 100644 --- a/src/kernel/mnemonics/_lookupswitch.php +++ b/src/kernel/mnemonics/_lookupswitch.php @@ -21,11 +21,9 @@ public function execute(): void for ($i = 0; $i < $switchSize; $i++) { - $label = $this->getByteCodeStream()->readInt(); $offsets[(string) $label] = $this->getByteCodeStream()->readInt(); - } if (isset($offsets[$key])) { @@ -33,12 +31,9 @@ public function execute(): void // goto PC $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); return; - } // goto default $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); - } - } diff --git a/src/kernel/mnemonics/_lor.php b/src/kernel/mnemonics/_lor.php index 5742cdf3..69f42db7 100644 --- a/src/kernel/mnemonics/_lor.php +++ b/src/kernel/mnemonics/_lor.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::orBits($value1, $value2, 8)); - } - } diff --git a/src/kernel/mnemonics/_lrem.php b/src/kernel/mnemonics/_lrem.php index 0638099c..3745cce9 100644 --- a/src/kernel/mnemonics/_lrem.php +++ b/src/kernel/mnemonics/_lrem.php @@ -9,8 +9,7 @@ final class _lrem implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lreturn.php b/src/kernel/mnemonics/_lreturn.php index bb940a48..806486bd 100644 --- a/src/kernel/mnemonics/_lreturn.php +++ b/src/kernel/mnemonics/_lreturn.php @@ -9,9 +9,7 @@ final class _lreturn implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { return new JavaTypeLong($this->getStack()); - } - -} +} diff --git a/src/kernel/mnemonics/_lshl.php b/src/kernel/mnemonics/_lshl.php index 6d1d9846..a29b938e 100644 --- a/src/kernel/mnemonics/_lshl.php +++ b/src/kernel/mnemonics/_lshl.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::shiftLeft($value1, $value2, 8)); - } - } diff --git a/src/kernel/mnemonics/_lshr.php b/src/kernel/mnemonics/_lshr.php index de2e3d15..b8f3701f 100644 --- a/src/kernel/mnemonics/_lshr.php +++ b/src/kernel/mnemonics/_lshr.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::shiftRight($value1, $value2, 8)); - } - } diff --git a/src/kernel/mnemonics/_lstore.php b/src/kernel/mnemonics/_lstore.php index 4593af8f..b91c7fbf 100644 --- a/src/kernel/mnemonics/_lstore.php +++ b/src/kernel/mnemonics/_lstore.php @@ -12,7 +12,5 @@ public function execute(): void { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); - } - } diff --git a/src/kernel/mnemonics/_lstore_0.php b/src/kernel/mnemonics/_lstore_0.php index 44c82078..ffae4d5c 100644 --- a/src/kernel/mnemonics/_lstore_0.php +++ b/src/kernel/mnemonics/_lstore_0.php @@ -9,8 +9,7 @@ final class _lstore_0 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lstore_1.php b/src/kernel/mnemonics/_lstore_1.php index 6ea939bd..a6e04d96 100644 --- a/src/kernel/mnemonics/_lstore_1.php +++ b/src/kernel/mnemonics/_lstore_1.php @@ -9,8 +9,7 @@ final class _lstore_1 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lstore_2.php b/src/kernel/mnemonics/_lstore_2.php index 15993916..5f2941a5 100644 --- a/src/kernel/mnemonics/_lstore_2.php +++ b/src/kernel/mnemonics/_lstore_2.php @@ -9,8 +9,7 @@ final class _lstore_2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lstore_3.php b/src/kernel/mnemonics/_lstore_3.php index c3a535ad..37f81554 100644 --- a/src/kernel/mnemonics/_lstore_3.php +++ b/src/kernel/mnemonics/_lstore_3.php @@ -9,8 +9,7 @@ final class _lstore_3 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_lsub.php b/src/kernel/mnemonics/_lsub.php index 504b9315..1b50ae98 100644 --- a/src/kernel/mnemonics/_lsub.php +++ b/src/kernel/mnemonics/_lsub.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::sub($value1, $value2, 8)); - } - } diff --git a/src/kernel/mnemonics/_lushr.php b/src/kernel/mnemonics/_lushr.php index 0646e61a..9da4106f 100644 --- a/src/kernel/mnemonics/_lushr.php +++ b/src/kernel/mnemonics/_lushr.php @@ -14,7 +14,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::unsignedShiftRight($value1, $value2, 8)); - } - } diff --git a/src/kernel/mnemonics/_lxor.php b/src/kernel/mnemonics/_lxor.php index e0b00dc6..0f736f7c 100644 --- a/src/kernel/mnemonics/_lxor.php +++ b/src/kernel/mnemonics/_lxor.php @@ -9,8 +9,7 @@ final class _lxor implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_monitorenter.php b/src/kernel/mnemonics/_monitorenter.php index e8741e8c..7e084aed 100644 --- a/src/kernel/mnemonics/_monitorenter.php +++ b/src/kernel/mnemonics/_monitorenter.php @@ -9,8 +9,7 @@ final class _monitorenter implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_monitorexit.php b/src/kernel/mnemonics/_monitorexit.php index f5ca89cc..9727b421 100644 --- a/src/kernel/mnemonics/_monitorexit.php +++ b/src/kernel/mnemonics/_monitorexit.php @@ -9,8 +9,7 @@ final class _monitorexit implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_multianewarray.php b/src/kernel/mnemonics/_multianewarray.php index df8fb7ad..55170b4a 100644 --- a/src/kernel/mnemonics/_multianewarray.php +++ b/src/kernel/mnemonics/_multianewarray.php @@ -9,8 +9,7 @@ final class _multianewarray implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_new.php b/src/kernel/mnemonics/_new.php index 6ffe09e8..5c7d2d28 100644 --- a/src/kernel/mnemonics/_new.php +++ b/src/kernel/mnemonics/_new.php @@ -29,26 +29,19 @@ public function execute(): void ); $this->pushStack($this->getInvoker()->getClass()->getManipulator()->$className); - } else { - if (($this->getInvoker()->getClass()->getManipulator() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) || is_file(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class')) { - $javaClass = null; if ($this->getInvoker()->getClass()->getManipulator() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) { - $javaClass = new JavaClass($className . '.class', $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->getClassBytecode($className)); - } else { - $javaClass = new JavaClass(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class'); - } $outerClasses = explode('$', $className); @@ -56,10 +49,7 @@ public function execute(): void $javaClass->setInstance('this', $javaClass); for ($i = 1, $size = sizeof($outerClasses); $i < $size; $i++) { - $javaClass->setInstance('this$' . ($i - 1), $this->getInvoker()->getClass()->getManipulator()->{implode('$', array_slice($outerClasses, 0, $i))}); - - } if (method_exists($javaClass->getMethodInvoker(), '')) { @@ -74,19 +64,16 @@ public function execute(): void $this->getInvoker()->getClass() ) ); - } if ($this->getInvoker()->getClass()->getManipulator() !== null) { // regist to manipulator $this->getInvoker()->getClass()->getManipulator()->registerClass($javaClass); - } // push to stack $this->pushStack($javaClass); - } else { // load platform @@ -95,11 +82,7 @@ public function execute(): void $invokeClassName = '\\' . str_replace('/', '\\', $className); $this->pushStack(new $invokeClassName()); - } - } - } - } diff --git a/src/kernel/mnemonics/_newarray.php b/src/kernel/mnemonics/_newarray.php index f3bc3937..dcb2e69e 100644 --- a/src/kernel/mnemonics/_newarray.php +++ b/src/kernel/mnemonics/_newarray.php @@ -9,15 +9,12 @@ final class _newarray implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $atype = $this->getByteCodeStream()->readUnsignedByte(); $count = $this->getStack(); // need reference $ref = new ArrayIterator(array_fill(0, $count, null)); $this->pushStackByReference($ref); - - } - -} +} diff --git a/src/kernel/mnemonics/_nop.php b/src/kernel/mnemonics/_nop.php index 506d08a0..8940195d 100644 --- a/src/kernel/mnemonics/_nop.php +++ b/src/kernel/mnemonics/_nop.php @@ -9,8 +9,6 @@ final class _nop implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { - + { } - } diff --git a/src/kernel/mnemonics/_pop.php b/src/kernel/mnemonics/_pop.php index 9f8db312..a6eba138 100644 --- a/src/kernel/mnemonics/_pop.php +++ b/src/kernel/mnemonics/_pop.php @@ -11,7 +11,5 @@ final class _pop implements MnemonicInterface public function execute(): void { $this->popStack(); - } - } diff --git a/src/kernel/mnemonics/_pop2.php b/src/kernel/mnemonics/_pop2.php index 868c9471..1f507e05 100644 --- a/src/kernel/mnemonics/_pop2.php +++ b/src/kernel/mnemonics/_pop2.php @@ -9,8 +9,7 @@ final class _pop2 implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_putfield.php b/src/kernel/mnemonics/_putfield.php index e0b846fa..e8992b10 100644 --- a/src/kernel/mnemonics/_putfield.php +++ b/src/kernel/mnemonics/_putfield.php @@ -9,7 +9,7 @@ final class _putfield implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $cpInfo = $this->getCpInfo(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -22,5 +22,4 @@ public function execute(): void $objectref->setInstance($name, $value); } - -} +} diff --git a/src/kernel/mnemonics/_putstatic.php b/src/kernel/mnemonics/_putstatic.php index 5f2bb0e6..4262982b 100644 --- a/src/kernel/mnemonics/_putstatic.php +++ b/src/kernel/mnemonics/_putstatic.php @@ -9,7 +9,7 @@ final class _putstatic implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { $cpInfo = $this->getCpInfo(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -21,7 +21,5 @@ public function execute(): void // set field $this->getInvoker()->getClass()->setStatic($name, $value); - } - -} +} diff --git a/src/kernel/mnemonics/_ret.php b/src/kernel/mnemonics/_ret.php index 108c5cc3..fac2531f 100644 --- a/src/kernel/mnemonics/_ret.php +++ b/src/kernel/mnemonics/_ret.php @@ -9,8 +9,7 @@ final class _ret implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_return.php b/src/kernel/mnemonics/_return.php index b920a83b..ed4aaf58 100644 --- a/src/kernel/mnemonics/_return.php +++ b/src/kernel/mnemonics/_return.php @@ -9,9 +9,7 @@ final class _return implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { return null; - } - -} +} diff --git a/src/kernel/mnemonics/_saload.php b/src/kernel/mnemonics/_saload.php index a9fd9c9a..a5a0ca88 100644 --- a/src/kernel/mnemonics/_saload.php +++ b/src/kernel/mnemonics/_saload.php @@ -9,8 +9,7 @@ final class _saload implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_sastore.php b/src/kernel/mnemonics/_sastore.php index 5e7aecfb..4e4deb8b 100644 --- a/src/kernel/mnemonics/_sastore.php +++ b/src/kernel/mnemonics/_sastore.php @@ -9,8 +9,7 @@ final class _sastore implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_sipush.php b/src/kernel/mnemonics/_sipush.php index b61d23e9..dce8381c 100644 --- a/src/kernel/mnemonics/_sipush.php +++ b/src/kernel/mnemonics/_sipush.php @@ -11,7 +11,5 @@ final class _sipush implements MnemonicInterface public function execute(): void { $this->pushStack($this->getByteCodeStream()->readShort()); - } - } diff --git a/src/kernel/mnemonics/_swap.php b/src/kernel/mnemonics/_swap.php index 0ba88a15..1f7719e2 100644 --- a/src/kernel/mnemonics/_swap.php +++ b/src/kernel/mnemonics/_swap.php @@ -9,8 +9,7 @@ final class _swap implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/mnemonics/_tableswitch.php b/src/kernel/mnemonics/_tableswitch.php index 5a73fb38..4de84938 100644 --- a/src/kernel/mnemonics/_tableswitch.php +++ b/src/kernel/mnemonics/_tableswitch.php @@ -22,9 +22,7 @@ public function execute(): void $highByte = $this->getByteCodeStream()->readInt(); for ($i = $lowByte; $i <= $highByte; $i++) { - $offsets[$i] = $this->getByteCodeStream()->readInt(); - } if (isset($offsets[$key])) { @@ -32,12 +30,9 @@ public function execute(): void // goto PC $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); return; - } // goto default $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); - } - } diff --git a/src/kernel/mnemonics/_wide.php b/src/kernel/mnemonics/_wide.php index 045722dd..914d81f0 100644 --- a/src/kernel/mnemonics/_wide.php +++ b/src/kernel/mnemonics/_wide.php @@ -9,8 +9,7 @@ final class _wide implements MnemonicInterface use \PHPJava\Kernel\Core\Accumulator; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/structures/_AppendFrame.php b/src/kernel/structures/_AppendFrame.php index 9b1f9dc8..491d1907 100644 --- a/src/kernel/structures/_AppendFrame.php +++ b/src/kernel/structures/_AppendFrame.php @@ -20,4 +20,3 @@ public function execute(): void } } } - diff --git a/src/kernel/structures/_ChopFrame.php b/src/kernel/structures/_ChopFrame.php index d98ab10c..22024e1b 100644 --- a/src/kernel/structures/_ChopFrame.php +++ b/src/kernel/structures/_ChopFrame.php @@ -16,4 +16,3 @@ public function execute(): void $this->OffsetDelta = $this->readUnsignedShort(); } } - diff --git a/src/kernel/structures/_Classes.php b/src/kernel/structures/_Classes.php index c826908e..914c6fcf 100644 --- a/src/kernel/structures/_Classes.php +++ b/src/kernel/structures/_Classes.php @@ -15,28 +15,36 @@ class _Classes implements StructureInterface public function execute(): void { } - public function setInnerClassInfoIndex ($InnerClassInfoIndex) { + public function setInnerClassInfoIndex($InnerClassInfoIndex) + { $this->InnerClassInfoIndex = $InnerClassInfoIndex; } - public function setOuterClassInfoIndex ($OuterClassInfoIndex) { + public function setOuterClassInfoIndex($OuterClassInfoIndex) + { $this->OuterClassInfoIndex = $OuterClassInfoIndex; } - public function setInnerNameIndex ($InnerNameIndex) { + public function setInnerNameIndex($InnerNameIndex) + { $this->InnerNameIndex = $InnerNameIndex; } - public function setInnerClassAccessFlag ($InnerClassAccessFlag) { + public function setInnerClassAccessFlag($InnerClassAccessFlag) + { $this->InnerClassAccessFlag = $InnerClassAccessFlag; } - public function getInnerClassInfoIndex () { + public function getInnerClassInfoIndex() + { return $this->InnerClassInfoIndex; } - public function getOuterClassInfoIndex () { + public function getOuterClassInfoIndex() + { return $this->OuterClassInfoIndex; } - public function getInnerNameIndex () { + public function getInnerNameIndex() + { return $this->InnerNameIndex; } - public function getInnerClassAccessFlag () { + public function getInnerClassAccessFlag() + { return $this->InnerClassAccessFlag; } } diff --git a/src/kernel/structures/_Double.php b/src/kernel/structures/_Double.php index 216a9341..fcb3a4b8 100644 --- a/src/kernel/structures/_Double.php +++ b/src/kernel/structures/_Double.php @@ -15,8 +15,8 @@ public function execute(): void $this->HighBytes = $this->readUnsignedInt(); $this->LowBytes = $this->readUnsignedInt(); } - public function getBytes () { + public function getBytes() + { return ($this->HighBytes << 32) + $this->LowBytes; } } - diff --git a/src/kernel/structures/_ExceptionTable.php b/src/kernel/structures/_ExceptionTable.php index 4b0d5e35..fef2e0c1 100644 --- a/src/kernel/structures/_ExceptionTable.php +++ b/src/kernel/structures/_ExceptionTable.php @@ -12,28 +12,36 @@ class _ExceptionTable implements StructureInterface private $EndPc = null; private $HandlerPc = null; private $CatchType = null; - public function setStartPc ($StartPc) { + public function setStartPc($StartPc) + { $this->StartPc = $StartPc; } - public function setEndPc ($EndPc) { + public function setEndPc($EndPc) + { $this->EndPc = $EndPc; } - public function setHandlerPc ($HandlerPc) { + public function setHandlerPc($HandlerPc) + { $this->HandlerPc = $HandlerPc; } - public function setCatchType ($CatchType) { + public function setCatchType($CatchType) + { $this->CatchType = $CatchType; } - public function getStartPc () { + public function getStartPc() + { return $this->StartPc; } - public function getEndPc () { + public function getEndPc() + { return $this->EndPc; } - public function getHandlerPc () { + public function getHandlerPc() + { return $this->HandlerPc; } - public function getCatchType () { + public function getCatchType() + { return $this->CatchType; } } diff --git a/src/kernel/structures/_FieldInfo.php b/src/kernel/structures/_FieldInfo.php index 6bebbdbc..d64fee10 100644 --- a/src/kernel/structures/_FieldInfo.php +++ b/src/kernel/structures/_FieldInfo.php @@ -23,16 +23,20 @@ public function execute(): void $this->Attributes[$i] = new JavaAttributeInfo($this->getClass()); } } - public function getAccessFlag () { + public function getAccessFlag() + { return $this->AccessFlag; } - public function getNameIndex () { + public function getNameIndex() + { return $this->NameIndex; } - public function getDescriptorIndex () { + public function getDescriptorIndex() + { return $this->DescriptorIndex; } - public function getAttributes () { + public function getAttributes() + { return $this->Attributes; } } diff --git a/src/kernel/structures/_Float.php b/src/kernel/structures/_Float.php index 1ab60102..5b12f43a 100644 --- a/src/kernel/structures/_Float.php +++ b/src/kernel/structures/_Float.php @@ -13,8 +13,8 @@ public function execute(): void { $this->Bytes = $this->readUnsignedInt(); } - public function getBytes () { + public function getBytes() + { return $this->Bytes; } } - diff --git a/src/kernel/structures/_FullFrame.php b/src/kernel/structures/_FullFrame.php index e14bf946..65e393b8 100644 --- a/src/kernel/structures/_FullFrame.php +++ b/src/kernel/structures/_FullFrame.php @@ -28,4 +28,3 @@ public function execute(): void } } } - diff --git a/src/kernel/structures/_Integer.php b/src/kernel/structures/_Integer.php index d750d27d..14bc1f5a 100644 --- a/src/kernel/structures/_Integer.php +++ b/src/kernel/structures/_Integer.php @@ -13,8 +13,8 @@ public function execute(): void { $this->Bytes = $this->readInt(); } - public function getBytes () { + public function getBytes() + { return $this->Bytes; } } - diff --git a/src/kernel/structures/_LineNumberTable.php b/src/kernel/structures/_LineNumberTable.php index 9996dcec..ac2ee318 100644 --- a/src/kernel/structures/_LineNumberTable.php +++ b/src/kernel/structures/_LineNumberTable.php @@ -10,16 +10,20 @@ class _LineNumberTable implements StructureInterface private $StartPc = null; private $LineNumber = null; - public function setStartPc ($StartPc) { + public function setStartPc($StartPc) + { $this->StartPc = $StartPc; } - public function setLineNumber ($LineNumber) { + public function setLineNumber($LineNumber) + { $this->LineNumber = $LineNumber; } - public function getStartPc () { + public function getStartPc() + { return $this->StartPc; } - public function getLineNumber () { + public function getLineNumber() + { return $this->LineNumber; } } diff --git a/src/kernel/structures/_Long.php b/src/kernel/structures/_Long.php index feed8887..77c19c4a 100644 --- a/src/kernel/structures/_Long.php +++ b/src/kernel/structures/_Long.php @@ -17,9 +17,9 @@ public function execute(): void //$this->LowBytes = $this->readUnsignedInt(); $this->Bytes = $this->readLong(); } - public function getBytes () { + public function getBytes() + { //return ($this->HighBytes << 32) + $this->LowBytes; return $this->Bytes; } } - diff --git a/src/kernel/structures/_MethodInfo.php b/src/kernel/structures/_MethodInfo.php index 99e191a2..0010c33e 100644 --- a/src/kernel/structures/_MethodInfo.php +++ b/src/kernel/structures/_MethodInfo.php @@ -23,16 +23,20 @@ public function execute(): void $this->Attributes[$i] = new JavaAttributeInfo($this->getClass()); } } - public function getAccessFlag () { + public function getAccessFlag() + { return $this->AccessFlag; } - public function getNameIndex () { + public function getNameIndex() + { return $this->NameIndex; } - public function getDescriptorIndex () { + public function getDescriptorIndex() + { return $this->DescriptorIndex; } - public function getAttributes () { + public function getAttributes() + { return $this->Attributes; } } diff --git a/src/kernel/structures/_NameAndType.php b/src/kernel/structures/_NameAndType.php index 5612025a..1b5400ce 100644 --- a/src/kernel/structures/_NameAndType.php +++ b/src/kernel/structures/_NameAndType.php @@ -15,10 +15,12 @@ public function execute(): void $this->NameIndex = $this->Class->readUnsignedShort(); $this->DescriptorIndex = $this->Class->readUnsignedShort(); } - public function getNameIndex () { + public function getNameIndex() + { return $this->NameIndex; } - public function getDescriptorIndex () { + public function getDescriptorIndex() + { return $this->DescriptorIndex; } } diff --git a/src/kernel/structures/_SameFrame.php b/src/kernel/structures/_SameFrame.php index b2289668..68ef2833 100644 --- a/src/kernel/structures/_SameFrame.php +++ b/src/kernel/structures/_SameFrame.php @@ -14,4 +14,3 @@ public function execute(): void $this->FrameType = $this->readUnsignedByte(); } } - diff --git a/src/kernel/structures/_SameFrameExtended.php b/src/kernel/structures/_SameFrameExtended.php index d3e2434f..b184adc6 100644 --- a/src/kernel/structures/_SameFrameExtended.php +++ b/src/kernel/structures/_SameFrameExtended.php @@ -16,4 +16,3 @@ public function execute(): void $this->OffsetDelta = $this->readUnsignedShort(); } } - diff --git a/src/kernel/structures/_SameLocals1StackItemFrame.php b/src/kernel/structures/_SameLocals1StackItemFrame.php index 4c3f7a91..87f46c52 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrame.php +++ b/src/kernel/structures/_SameLocals1StackItemFrame.php @@ -16,4 +16,3 @@ public function execute(): void $this->Stack[] = new _VerificationTypeInfo($this->getClass()); } } - diff --git a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php index 03d89e26..58504e34 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php +++ b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php @@ -18,4 +18,3 @@ public function execute(): void $this->Locals[] = new _VerificationTypeInfo($this->getClass()); } } - diff --git a/src/kernel/structures/_StackMapFrame.php b/src/kernel/structures/_StackMapFrame.php index ae503205..c26e9da7 100644 --- a/src/kernel/structures/_StackMapFrame.php +++ b/src/kernel/structures/_StackMapFrame.php @@ -23,17 +23,17 @@ public function execute(): void $this->getClass()->seek(-1); if ($this->FrameType >= 0 && $this->FrameType <= 63) { $this->SameFrame = new _SameFrame($this->getClass()); - } else if ($this->FrameType >= 64 && $this->FrameType <= 127) { + } elseif ($this->FrameType >= 64 && $this->FrameType <= 127) { $this->SameLocals1StackItemFrame = new _SameLocals1StackItemFrame($this->getClass()); - } else if ($this->FrameType == 247) { + } elseif ($this->FrameType == 247) { $this->SameLocals1StackItemFrameExtended = new _SameLocals1StackItemFrameExtended($this->getClass()); - } else if ($this->FrameType >= 248 && $this->FrameType <= 250) { + } elseif ($this->FrameType >= 248 && $this->FrameType <= 250) { $this->ChopFrame = new _ChopFrame($this->getClass()); - } else if ($this->FrameType == 251) { + } elseif ($this->FrameType == 251) { $this->SameFrameExtended = new _SameFrameExtended($this->getClass()); - } else if ($this->FrameType >= 252 && $this->FrameType <= 254) { + } elseif ($this->FrameType >= 252 && $this->FrameType <= 254) { $this->AppendFrame = new _AppendFrame($this->getClass()); - } else if ($this->FrameType == 255) { + } elseif ($this->FrameType == 255) { $this->FullFrame = new _FullFrame($this->getClass()); } } diff --git a/src/kernel/structures/_String.php b/src/kernel/structures/_String.php index 5705c3cd..00f0a8f2 100644 --- a/src/kernel/structures/_String.php +++ b/src/kernel/structures/_String.php @@ -13,7 +13,8 @@ public function execute(): void { $this->StringIndex = $this->Class->readUnsignedShort(); } - public function getStringIndex () { + public function getStringIndex() + { return $this->StringIndex; } } diff --git a/src/kernel/structures/_Utf8.php b/src/kernel/structures/_Utf8.php index 094abab2..cc9c8462 100644 --- a/src/kernel/structures/_Utf8.php +++ b/src/kernel/structures/_Utf8.php @@ -17,10 +17,12 @@ public function execute(): void $this->String .= chr($this->Class->readUnsignedByte()); } } - public function getLength () { + public function getLength() + { return $this->Length; } - public function getString () { + public function getString() + { return $this->String; } } diff --git a/src/kernel/structures/_VerificationTypeInfo.php b/src/kernel/structures/_VerificationTypeInfo.php index a7f00298..4ff8850b 100644 --- a/src/kernel/structures/_VerificationTypeInfo.php +++ b/src/kernel/structures/_VerificationTypeInfo.php @@ -15,23 +15,22 @@ public function execute(): void $this->getClass()->seek(-1); if ($this->Tag == 0) { $this->TopVariableInfo = new _TopVariableInfo($this->getClass()); - } else if ($this->Tag == 1) { + } elseif ($this->Tag == 1) { $this->IntegerVariableInfo = new _IntegerVariableInfo($this->getClass()); - } else if ($this->Tag == 2) { + } elseif ($this->Tag == 2) { $this->FloatVariableInfo = new _FloatVariableInfo($this->getClass()); - } else if ($this->Tag == 4) { + } elseif ($this->Tag == 4) { $this->LongVariableInfo = new _LongVariableInfo($this->getClass()); - } else if ($this->Tag == 3) { + } elseif ($this->Tag == 3) { $this->DoubleVariableInfo = new _DoubleVariableInfo($this->getClass()); - } else if ($this->Tag == 5) { + } elseif ($this->Tag == 5) { $this->NullVariableInfo = new _NullVariableInfo($this->getClass()); - } else if ($this->Tag == 6) { + } elseif ($this->Tag == 6) { $this->UninitializedThisVariableInfo = new _UninitializedThisVariableInfo($this->getClass()); - } else if ($this->Tag == 7) { + } elseif ($this->Tag == 7) { $this->ObjectVariableInfo = new _ObjectVariableInfo($this->getClass()); - } else if ($this->Tag == 8) { + } elseif ($this->Tag == 8) { $this->UninitializedVariableInfo = new _UninitializedVariableInfo($this->getClass()); } + } } -} - diff --git a/src/kernel/types/Boolean.php b/src/kernel/types/Boolean.php index 4950be77..7becc4c6 100644 --- a/src/kernel/types/Boolean.php +++ b/src/kernel/types/Boolean.php @@ -4,5 +4,4 @@ class Boolean extends Type { - } diff --git a/src/kernel/types/Byte.php b/src/kernel/types/Byte.php index df147016..b96b1c01 100644 --- a/src/kernel/types/Byte.php +++ b/src/kernel/types/Byte.php @@ -4,5 +4,4 @@ class Byte extends Type { - } diff --git a/src/kernel/types/Char.php b/src/kernel/types/Char.php index 4c7a14de..f3016f85 100644 --- a/src/kernel/types/Char.php +++ b/src/kernel/types/Char.php @@ -4,5 +4,4 @@ class Char extends Type { - } diff --git a/src/kernel/types/Double.php b/src/kernel/types/Double.php index 734eafb5..408af04f 100644 --- a/src/kernel/types/Double.php +++ b/src/kernel/types/Double.php @@ -4,5 +4,4 @@ class Double extends Type { - } diff --git a/src/kernel/types/Float.php b/src/kernel/types/Float.php index f19d2baf..ec084bd7 100644 --- a/src/kernel/types/Float.php +++ b/src/kernel/types/Float.php @@ -4,5 +4,4 @@ class Float extends Type { - } diff --git a/src/kernel/types/Int.php b/src/kernel/types/Int.php index 0153010a..c3e3fa6c 100644 --- a/src/kernel/types/Int.php +++ b/src/kernel/types/Int.php @@ -4,5 +4,4 @@ class Int extends Type { - } diff --git a/src/kernel/types/Long.php b/src/kernel/types/Long.php index 4e3f1851..183f820f 100644 --- a/src/kernel/types/Long.php +++ b/src/kernel/types/Long.php @@ -4,5 +4,4 @@ class Long extends Type { - } diff --git a/src/kernel/types/Short.php b/src/kernel/types/Short.php index 81d1a66b..ac301cf5 100644 --- a/src/kernel/types/Short.php +++ b/src/kernel/types/Short.php @@ -4,5 +4,4 @@ class Short extends Type { - } diff --git a/src/utilities/BinaryTool.php b/src/utilities/BinaryTool.php index d8f89aad..371212a2 100644 --- a/src/utilities/BinaryTool.php +++ b/src/utilities/BinaryTool.php @@ -3,5 +3,4 @@ class BinaryTool { - } From 2ddb9dc0eb54fce2fa735b50a0da570cbbcadff9 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 14:19:51 +0900 Subject: [PATCH 12/96] Rename Maps --- src/kernel/maps/{AccessFlagEnum.php => AccessFlag.php} | 0 src/kernel/maps/{ClassAccessFlagEnum.php => ClassAccessFlag.php} | 0 src/kernel/maps/{ClassConstantEnum.php => ClassConstant.php} | 0 src/kernel/maps/{Mnemonics.php => Mnemonic.php} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename src/kernel/maps/{AccessFlagEnum.php => AccessFlag.php} (100%) rename src/kernel/maps/{ClassAccessFlagEnum.php => ClassAccessFlag.php} (100%) rename src/kernel/maps/{ClassConstantEnum.php => ClassConstant.php} (100%) rename src/kernel/maps/{Mnemonics.php => Mnemonic.php} (100%) diff --git a/src/kernel/maps/AccessFlagEnum.php b/src/kernel/maps/AccessFlag.php similarity index 100% rename from src/kernel/maps/AccessFlagEnum.php rename to src/kernel/maps/AccessFlag.php diff --git a/src/kernel/maps/ClassAccessFlagEnum.php b/src/kernel/maps/ClassAccessFlag.php similarity index 100% rename from src/kernel/maps/ClassAccessFlagEnum.php rename to src/kernel/maps/ClassAccessFlag.php diff --git a/src/kernel/maps/ClassConstantEnum.php b/src/kernel/maps/ClassConstant.php similarity index 100% rename from src/kernel/maps/ClassConstantEnum.php rename to src/kernel/maps/ClassConstant.php diff --git a/src/kernel/maps/Mnemonics.php b/src/kernel/maps/Mnemonic.php similarity index 100% rename from src/kernel/maps/Mnemonics.php rename to src/kernel/maps/Mnemonic.php From 680e12a9140a80999661cb9504ac2239fdd721c0 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 15:38:17 +0900 Subject: [PATCH 13/96] WIP commit --- src/constants/.gitkeep | 0 src/core/.gitkeep | 0 src/core/JavaClass.php | 18 ++++ src/core/JavaClassReader.php | 24 ++++++ src/core/jvm/ConstantPool.php | 7 ++ src/core/jvm/stream/BinaryReader.php | 83 +++++++++++++++++++ src/core/jvm/validations/MagicByte.php | 20 +++++ .../jvm/validations/ValidatorInterface.php | 7 ++ src/exceptions/ValidatorException.php | 6 ++ src/kernel/maps/AccessFlag.php | 2 +- src/kernel/maps/ClassAccessFlag.php | 2 +- src/kernel/maps/ClassConstant.php | 2 +- src/kernel/maps/Mnemonic.php | 2 +- 13 files changed, 169 insertions(+), 4 deletions(-) delete mode 100644 src/constants/.gitkeep delete mode 100644 src/core/.gitkeep create mode 100644 src/core/JavaClass.php create mode 100644 src/core/JavaClassReader.php create mode 100644 src/core/jvm/ConstantPool.php create mode 100644 src/core/jvm/stream/BinaryReader.php create mode 100644 src/core/jvm/validations/MagicByte.php create mode 100644 src/core/jvm/validations/ValidatorInterface.php create mode 100644 src/exceptions/ValidatorException.php diff --git a/src/constants/.gitkeep b/src/constants/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/core/.gitkeep b/src/core/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php new file mode 100644 index 00000000..3534fb2e --- /dev/null +++ b/src/core/JavaClass.php @@ -0,0 +1,18 @@ +getBinaryReader()->readUnsignedInt()))->isValid()) { + throw new ValidatorException($reader . ' is not Java class.'); + } + + } +} diff --git a/src/core/JavaClassReader.php b/src/core/JavaClassReader.php new file mode 100644 index 00000000..d09d1baf --- /dev/null +++ b/src/core/JavaClassReader.php @@ -0,0 +1,24 @@ +handle = fopen($file, 'r'); + $this->binaryReader = new \PHPJava\Core\JVM\Stream\BinaryReader($this->handle); + } + + public function getBinaryReader(): \PHPJava\Core\JVM\Stream\BinaryReader + { + return $this->binaryReader; + } + + public function __toString(): string + { + return stream_get_meta_data($this->handle)['uri']; + } +} diff --git a/src/core/jvm/ConstantPool.php b/src/core/jvm/ConstantPool.php new file mode 100644 index 00000000..244d0087 --- /dev/null +++ b/src/core/jvm/ConstantPool.php @@ -0,0 +1,7 @@ +handle = $handle; + } + + final public function read($bytes = 1) + { + $this->offset += $bytes; + return fread($this->handle, $bytes); + } + + public function readByte() + { + return current(unpack('c', $this->read(1))); + } + + public function readUnsignedByte() + { + return (int) sprintf('%u', ord($this->read(1))); + } + + public function readUnsignedInt() + { + return base_convert(bin2hex($this->read(4)), 16, 10); + } + + public function readUnsignedShort() + { + return (int) sprintf('%u', hexdec(bin2hex($this->read(2)))); + } + + public function readInt() + { + return hexdec(bin2hex($this->read(4))); + } + + public function readShort() + { + $short = (int) sprintf('%u', hexdec(bin2hex($this->read(2)))); + return (($short & 0x8000) > 0) ? ($short - 0xFFFF - 1) : $short ; + } + + public function readUnsignedLong() + { + if (PHP_INT_MAX === 2147483647) { + return base_convert(bin2hex($this->read(8)), 16, 10); + } + + return (int) sprintf('%u', hexdec(bin2hex($this->read(8)))); + } + + public function readLong() + { + return hexdec(bin2hex($this->read(8))); + } + + public function seek($bytes) + { + $this->offset += $bytes; + fseek($this->handle, $bytes, SEEK_CUR); + } + + public function setOffset($pointer) + { + $this->offset = $pointer; + fseek($this->handle, $pointer, SEEK_SET); + } + + public function getOffset() + { + return $this->offset; + } +} diff --git a/src/core/jvm/validations/MagicByte.php b/src/core/jvm/validations/MagicByte.php new file mode 100644 index 00000000..2cf4055b --- /dev/null +++ b/src/core/jvm/validations/MagicByte.php @@ -0,0 +1,20 @@ +magicByte = $magicByte; + } + + public function isValid(): bool + { + return static::CAFEBABE === BinaryTool::toHex($this->magicByte ?? null); + } +} diff --git a/src/core/jvm/validations/ValidatorInterface.php b/src/core/jvm/validations/ValidatorInterface.php new file mode 100644 index 00000000..36e48d88 --- /dev/null +++ b/src/core/jvm/validations/ValidatorInterface.php @@ -0,0 +1,7 @@ + Date: Sat, 23 Feb 2019 15:57:55 +0900 Subject: [PATCH 14/96] WIP commit --- src/core/JavaClass.php | 16 +- src/core/jvm/ConstantPool.php | 1 - src/core/jvm/validations/MagicByte.php | 2 +- .../attributes/AnnotationDefaultAttribute.php | 2 +- src/kernel/attributes/AttributeInfo.php | 8 +- .../attributes/BootstrapMethodsAttribute.php | 2 +- src/kernel/attributes/CodeAttribute.php | 26 +- .../attributes/ConstantValueAttribute.php | 2 +- src/kernel/attributes/DeprecatedAttribute.php | 2 +- .../attributes/EnclosingMethodAttribute.php | 2 +- src/kernel/attributes/ExceptionsAttribute.php | 2 +- .../attributes/InnerClassesAttribute.php | 24 +- .../attributes/LineNumberTableAttribute.php | 13 +- .../LocalVariableTableAttribute.php | 4 +- .../LocalVariableTypeTableAttribute.php | 2 +- .../RuntimeInvisibleAnnotationsAttribute.php | 2 +- ...InvisibleParameterAnnotationsAttribute.php | 2 +- .../RuntimeVisibleAnnotationsAttribute.php | 2 +- ...meVisibleParameterAnnotationsAttribute.php | 2 +- src/kernel/attributes/SignatureAttribute.php | 2 +- .../SourceDebugExtensionAttribute.php | 2 +- src/kernel/attributes/SourceFileAttribute.php | 7 +- .../attributes/StackMapTableAttribute.php | 9 +- src/kernel/attributes/SyntheticAttribute.php | 2 +- src/kernel/mnemonics/_aaload.php | 2 +- src/kernel/mnemonics/_aastore.php | 2 +- src/kernel/mnemonics/_aconst_null.php | 2 +- src/kernel/mnemonics/_aload.php | 2 +- src/kernel/mnemonics/_aload_0.php | 2 +- src/kernel/mnemonics/_aload_1.php | 2 +- src/kernel/mnemonics/_aload_2.php | 2 +- src/kernel/mnemonics/_aload_3.php | 2 +- src/kernel/mnemonics/_anewarray.php | 2 +- src/kernel/mnemonics/_areturn.php | 2 +- src/kernel/mnemonics/_arraylength.php | 2 +- src/kernel/mnemonics/_astore.php | 2 +- src/kernel/mnemonics/_astore_0.php | 2 +- src/kernel/mnemonics/_astore_1.php | 2 +- src/kernel/mnemonics/_astore_2.php | 2 +- src/kernel/mnemonics/_astore_3.php | 2 +- src/kernel/mnemonics/_athrow.php | 2 +- src/kernel/mnemonics/_baload.php | 2 +- src/kernel/mnemonics/_bastore.php | 2 +- src/kernel/mnemonics/_bipush.php | 2 +- src/kernel/mnemonics/_breakpoint.php | 2 +- src/kernel/mnemonics/_caload.php | 2 +- src/kernel/mnemonics/_castore.php | 2 +- src/kernel/mnemonics/_checkcast.php | 2 +- src/kernel/mnemonics/_d2f.php | 2 +- src/kernel/mnemonics/_d2i.php | 2 +- src/kernel/mnemonics/_d2l.php | 2 +- src/kernel/mnemonics/_dadd.php | 2 +- src/kernel/mnemonics/_daload.php | 2 +- src/kernel/mnemonics/_dastore.php | 2 +- src/kernel/mnemonics/_dcmpg.php | 2 +- src/kernel/mnemonics/_dcmpl.php | 2 +- src/kernel/mnemonics/_dconst_0.php | 2 +- src/kernel/mnemonics/_dconst_1.php | 2 +- src/kernel/mnemonics/_ddiv.php | 2 +- src/kernel/mnemonics/_dload.php | 2 +- src/kernel/mnemonics/_dload_0.php | 2 +- src/kernel/mnemonics/_dload_1.php | 2 +- src/kernel/mnemonics/_dload_2.php | 2 +- src/kernel/mnemonics/_dload_3.php | 2 +- src/kernel/mnemonics/_dmul.php | 2 +- src/kernel/mnemonics/_dneg.php | 2 +- src/kernel/mnemonics/_drem.php | 2 +- src/kernel/mnemonics/_dreturn.php | 2 +- src/kernel/mnemonics/_dstore.php | 2 +- src/kernel/mnemonics/_dstore_0.php | 2 +- src/kernel/mnemonics/_dstore_1.php | 2 +- src/kernel/mnemonics/_dstore_2.php | 2 +- src/kernel/mnemonics/_dstore_3.php | 2 +- src/kernel/mnemonics/_dsub.php | 2 +- src/kernel/mnemonics/_dup.php | 2 +- src/kernel/mnemonics/_dup2.php | 2 +- src/kernel/mnemonics/_dup2_x1.php | 2 +- src/kernel/mnemonics/_dup2_x2.php | 2 +- src/kernel/mnemonics/_dup_x1.php | 2 +- src/kernel/mnemonics/_dup_x2.php | 2 +- src/kernel/mnemonics/_f2d.php | 2 +- src/kernel/mnemonics/_f2i.php | 2 +- src/kernel/mnemonics/_f2l.php | 2 +- src/kernel/mnemonics/_fadd.php | 2 +- src/kernel/mnemonics/_faload.php | 2 +- src/kernel/mnemonics/_fastore.php | 2 +- src/kernel/mnemonics/_fcmpg.php | 2 +- src/kernel/mnemonics/_fcmpl.php | 2 +- src/kernel/mnemonics/_fconst_0.php | 2 +- src/kernel/mnemonics/_fconst_1.php | 2 +- src/kernel/mnemonics/_fconst_2.php | 2 +- src/kernel/mnemonics/_fdiv.php | 2 +- src/kernel/mnemonics/_fload.php | 2 +- src/kernel/mnemonics/_fload_0.php | 2 +- src/kernel/mnemonics/_fload_1.php | 2 +- src/kernel/mnemonics/_fload_2.php | 2 +- src/kernel/mnemonics/_fload_3.php | 2 +- src/kernel/mnemonics/_fmul.php | 2 +- src/kernel/mnemonics/_fneg.php | 2 +- src/kernel/mnemonics/_frem.php | 2 +- src/kernel/mnemonics/_freturn.php | 2 +- src/kernel/mnemonics/_fstore.php | 2 +- src/kernel/mnemonics/_fstore_0.php | 2 +- src/kernel/mnemonics/_fstore_1.php | 2 +- src/kernel/mnemonics/_fstore_2.php | 2 +- src/kernel/mnemonics/_fstore_3.php | 2 +- src/kernel/mnemonics/_fsub.php | 2 +- src/kernel/mnemonics/_getfield.php | 2 +- src/kernel/mnemonics/_getstatic.php | 2 +- src/kernel/mnemonics/_goto.php | 2 +- src/kernel/mnemonics/_goto_w.php | 2 +- src/kernel/mnemonics/_i2b.php | 2 +- src/kernel/mnemonics/_i2c.php | 2 +- src/kernel/mnemonics/_i2d.php | 2 +- src/kernel/mnemonics/_i2f.php | 2 +- src/kernel/mnemonics/_i2l.php | 2 +- src/kernel/mnemonics/_i2s.php | 2 +- src/kernel/mnemonics/_iadd.php | 2 +- src/kernel/mnemonics/_iaload.php | 2 +- src/kernel/mnemonics/_iand.php | 2 +- src/kernel/mnemonics/_iastore.php | 2 +- src/kernel/mnemonics/_iconst_0.php | 2 +- src/kernel/mnemonics/_iconst_1.php | 2 +- src/kernel/mnemonics/_iconst_2.php | 2 +- src/kernel/mnemonics/_iconst_3.php | 2 +- src/kernel/mnemonics/_iconst_4.php | 2 +- src/kernel/mnemonics/_iconst_5.php | 2 +- src/kernel/mnemonics/_iconst_m1.php | 2 +- src/kernel/mnemonics/_idiv.php | 2 +- src/kernel/mnemonics/_if_acmpeq.php | 2 +- src/kernel/mnemonics/_if_acmpne.php | 2 +- src/kernel/mnemonics/_if_icmpeq.php | 2 +- src/kernel/mnemonics/_if_icmpge.php | 2 +- src/kernel/mnemonics/_if_icmpgt.php | 2 +- src/kernel/mnemonics/_if_icmple.php | 2 +- src/kernel/mnemonics/_if_icmplt.php | 2 +- src/kernel/mnemonics/_if_icmpne.php | 2 +- src/kernel/mnemonics/_ifeq.php | 2 +- src/kernel/mnemonics/_ifge.php | 2 +- src/kernel/mnemonics/_ifgt.php | 2 +- src/kernel/mnemonics/_ifle.php | 2 +- src/kernel/mnemonics/_iflt.php | 2 +- src/kernel/mnemonics/_ifne.php | 2 +- src/kernel/mnemonics/_ifnonnull.php | 2 +- src/kernel/mnemonics/_ifnull.php | 2 +- src/kernel/mnemonics/_iinc.php | 2 +- src/kernel/mnemonics/_iload.php | 2 +- src/kernel/mnemonics/_iload_0.php | 2 +- src/kernel/mnemonics/_iload_1.php | 2 +- src/kernel/mnemonics/_iload_2.php | 2 +- src/kernel/mnemonics/_iload_3.php | 2 +- src/kernel/mnemonics/_impdep1.php | 2 +- src/kernel/mnemonics/_impdep2.php | 2 +- src/kernel/mnemonics/_imul.php | 2 +- src/kernel/mnemonics/_ineg.php | 2 +- src/kernel/mnemonics/_instanceof.php | 2 +- src/kernel/mnemonics/_invokedynamic.php | 2 +- src/kernel/mnemonics/_invokeinterface.php | 2 +- src/kernel/mnemonics/_invokespecial.php | 2 +- src/kernel/mnemonics/_invokestatic.php | 2 +- src/kernel/mnemonics/_invokevirtual.php | 2 +- src/kernel/mnemonics/_ior.php | 2 +- src/kernel/mnemonics/_irem.php | 2 +- src/kernel/mnemonics/_ireturn.php | 2 +- src/kernel/mnemonics/_ishl.php | 2 +- src/kernel/mnemonics/_ishr.php | 2 +- src/kernel/mnemonics/_istore.php | 2 +- src/kernel/mnemonics/_istore_0.php | 2 +- src/kernel/mnemonics/_istore_1.php | 2 +- src/kernel/mnemonics/_istore_2.php | 2 +- src/kernel/mnemonics/_istore_3.php | 2 +- src/kernel/mnemonics/_isub.php | 2 +- src/kernel/mnemonics/_iushr.php | 2 +- src/kernel/mnemonics/_ixor.php | 2 +- src/kernel/mnemonics/_jsr.php | 2 +- src/kernel/mnemonics/_jsr_w.php | 2 +- src/kernel/mnemonics/_l2d.php | 2 +- src/kernel/mnemonics/_l2f.php | 2 +- src/kernel/mnemonics/_l2i.php | 2 +- src/kernel/mnemonics/_ladd.php | 2 +- src/kernel/mnemonics/_laload.php | 2 +- src/kernel/mnemonics/_land.php | 2 +- src/kernel/mnemonics/_lastore.php | 2 +- src/kernel/mnemonics/_lcmp.php | 2 +- src/kernel/mnemonics/_lconst_0.php | 2 +- src/kernel/mnemonics/_lconst_1.php | 2 +- src/kernel/mnemonics/_ldc.php | 2 +- src/kernel/mnemonics/_ldc2_w.php | 2 +- src/kernel/mnemonics/_ldc_w.php | 2 +- src/kernel/mnemonics/_ldiv.php | 2 +- src/kernel/mnemonics/_lload.php | 2 +- src/kernel/mnemonics/_lload_0.php | 2 +- src/kernel/mnemonics/_lload_1.php | 2 +- src/kernel/mnemonics/_lload_2.php | 2 +- src/kernel/mnemonics/_lload_3.php | 2 +- src/kernel/mnemonics/_lmul.php | 2 +- src/kernel/mnemonics/_lneg.php | 2 +- src/kernel/mnemonics/_lookupswitch.php | 2 +- src/kernel/mnemonics/_lor.php | 2 +- src/kernel/mnemonics/_lrem.php | 2 +- src/kernel/mnemonics/_lreturn.php | 2 +- src/kernel/mnemonics/_lshl.php | 2 +- src/kernel/mnemonics/_lshr.php | 2 +- src/kernel/mnemonics/_lstore.php | 2 +- src/kernel/mnemonics/_lstore_0.php | 2 +- src/kernel/mnemonics/_lstore_1.php | 2 +- src/kernel/mnemonics/_lstore_2.php | 2 +- src/kernel/mnemonics/_lstore_3.php | 2 +- src/kernel/mnemonics/_lsub.php | 2 +- src/kernel/mnemonics/_lushr.php | 2 +- src/kernel/mnemonics/_lxor.php | 2 +- src/kernel/mnemonics/_monitorenter.php | 2 +- src/kernel/mnemonics/_monitorexit.php | 2 +- src/kernel/mnemonics/_multianewarray.php | 2 +- src/kernel/mnemonics/_new.php | 2 +- src/kernel/mnemonics/_newarray.php | 2 +- src/kernel/mnemonics/_nop.php | 2 +- src/kernel/mnemonics/_pop.php | 2 +- src/kernel/mnemonics/_pop2.php | 2 +- src/kernel/mnemonics/_putfield.php | 2 +- src/kernel/mnemonics/_putstatic.php | 2 +- src/kernel/mnemonics/_ret.php | 2 +- src/kernel/mnemonics/_return.php | 2 +- src/kernel/mnemonics/_saload.php | 2 +- src/kernel/mnemonics/_sastore.php | 2 +- src/kernel/mnemonics/_sipush.php | 2 +- src/kernel/mnemonics/_swap.php | 2 +- src/kernel/mnemonics/_tableswitch.php | 2 +- src/kernel/mnemonics/_wide.php | 2 +- src/kernel/structures/_AppendFrame.php | 2 +- src/kernel/structures/_ChopFrame.php | 2 +- src/kernel/structures/_Class.php | 2 +- src/kernel/structures/_Classes.php | 2 +- src/kernel/structures/_Double.php | 2 +- src/kernel/structures/_DoubleVariableInfo.php | 2 +- src/kernel/structures/_ExceptionTable.php | 2 +- src/kernel/structures/_FieldInfo.php | 2 +- src/kernel/structures/_FieldRef.php | 2 +- src/kernel/structures/_Float.php | 2 +- src/kernel/structures/_FloatVariableInfo.php | 2 +- src/kernel/structures/_FullFrame.php | 2 +- src/kernel/structures/_Integer.php | 2 +- .../structures/_IntegerVariableInfo.php | 2 +- src/kernel/structures/_LineNumberTable.php | 2 +- src/kernel/structures/_LocalVariableTable.php | 2 +- src/kernel/structures/_Long.php | 2 +- src/kernel/structures/_LongVariableInfo.php | 2 +- src/kernel/structures/_MethodInfo.php | 2 +- src/kernel/structures/_Methodref.php | 2 +- src/kernel/structures/_NameAndType.php | 2 +- src/kernel/structures/_NullVariableInfo.php | 2 +- src/kernel/structures/_ObjectVariableInfo.php | 2 +- src/kernel/structures/_SameFrame.php | 2 +- src/kernel/structures/_SameFrameExtended.php | 2 +- .../structures/_SameLocals1StackItemFrame.php | 2 +- .../_SameLocals1StackItemFrameExtended.php | 2 +- src/kernel/structures/_StackMapFrame.php | 2 +- src/kernel/structures/_String.php | 2 +- src/kernel/structures/_TopVariableInfo.php | 2 +- .../_UninitializedThisVariableInfo.php | 2 +- .../structures/_UninitializedVariableInfo.php | 2 +- src/kernel/structures/_Utf8.php | 2 +- .../structures/_VerificationTypeInfo.php | 2 +- src/utilities/BinaryTool.php | 245 +++++++++++++++++- tools/Test.class | Bin 0 -> 1852 bytes tools/copy.php | 2 +- tools/copy_attr.php | 2 +- tools/copy_strt.php | 2 +- tools/test.php | 8 + 269 files changed, 560 insertions(+), 315 deletions(-) create mode 100644 tools/Test.class create mode 100644 tools/test.php diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index 3534fb2e..13933831 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -6,13 +6,27 @@ class JavaClass { + private $versions = [ + 'minor' => null, + 'major' => null, + ]; public function __construct(JavaClassReader $reader) { // Validate Java file if (!(new MagicByte($reader->getBinaryReader()->readUnsignedInt()))->isValid()) { - throw new ValidatorException($reader . ' is not Java class.'); + throw new ValidatorException($reader . ' has broken or not Java class.'); } + // read minor version + $this->versions['minor'] = $reader->getBinaryReader()->readUnsignedShort(); + + // read major version + $this->versions['major'] = $reader->getBinaryReader()->readUnsignedShort(); + + // read constant pool size + $constantPoolSize = $reader->getBinaryReader()->readUnsignedShort(); + + var_dump($this->versions['minor'], $this->versions['major']); } } diff --git a/src/core/jvm/ConstantPool.php b/src/core/jvm/ConstantPool.php index 244d0087..10a3e5e1 100644 --- a/src/core/jvm/ConstantPool.php +++ b/src/core/jvm/ConstantPool.php @@ -3,5 +3,4 @@ class ConstantPool { - } diff --git a/src/core/jvm/validations/MagicByte.php b/src/core/jvm/validations/MagicByte.php index 2cf4055b..2c552404 100644 --- a/src/core/jvm/validations/MagicByte.php +++ b/src/core/jvm/validations/MagicByte.php @@ -1,7 +1,7 @@ AttributeNameIndex = $this->readUnsignedShort(); - $this->AttributeLength = $this->readUnsignedInt(); - $cpInfo = $this->getCpInfo(); + $this->AttributeNameIndex = $this->getCurrentClass()->readUnsignedShort(); + $this->AttributeLength = $this->getCurrentClass()->readUnsignedInt(); + $cpInfo = $this->getCurrentClass()->getCpInfo(); $classAttributeName = 'Java' . $cpInfo[$this->AttributeNameIndex]->getString() . 'Attribute'; $this->AttributeData = new $classAttributeName($Class); } diff --git a/src/kernel/attributes/BootstrapMethodsAttribute.php b/src/kernel/attributes/BootstrapMethodsAttribute.php index 0e90e755..a23905cc 100644 --- a/src/kernel/attributes/BootstrapMethodsAttribute.php +++ b/src/kernel/attributes/BootstrapMethodsAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class BootstrapMethodsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/CodeAttribute.php b/src/kernel/attributes/CodeAttribute.php index 4eef4fa0..81c63596 100644 --- a/src/kernel/attributes/CodeAttribute.php +++ b/src/kernel/attributes/CodeAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class CodeAttribute implements AttributeInterface { @@ -18,27 +18,27 @@ final class CodeAttribute implements AttributeInterface private $AttributeInfo = array(); public function execute(): void { - $this->MaxStack = $this->readUnsignedShort(); - $this->MaxLocals = $this->readUnsignedShort(); - $this->CodeLength = $this->readUnsignedInt(); + $this->MaxStack = $this->getCurrentClass()->readUnsignedShort(); + $this->MaxLocals = $this->getCurrentClass()->readUnsignedShort(); + $this->CodeLength = $this->getCurrentClass()->readUnsignedInt(); // read opcode $this->Code = array(); for ($i = 0; $i < $this->CodeLength; $i++) { - $this->Code[$i] = $this->readUnsignedByte(); + $this->Code[$i] = $this->getCurrentClass()->readUnsignedByte(); $this->RawCode .= chr($this->Code[$i]); } // read exception table - $this->ExceptionTableLength = $this->readUnsignedShort(); + $this->ExceptionTableLength = $this->getCurrentClass()->readUnsignedShort(); for ($i = 0; $i < $this->ExceptionTableLength; $i++) { - $this->ExceptionTables[$i] = new JavaStructureExceptionTable($this); - $this->ExceptionTables[$i]->setStartPc($this->readUnsignedShort()); - $this->ExceptionTables[$i]->setEndPc($this->readUnsignedShort()); - $this->ExceptionTables[$i]->setHandlerPc($this->readUnsignedShort()); - $this->ExceptionTables[$i]->setCatchType($this->readUnsignedShort()); + $this->ExceptionTables[$i] = new JavaStructureExceptionTable($this->getCurrentClass()); + $this->ExceptionTables[$i]->setStartPc($this->getCurrentClass()->readUnsignedShort()); + $this->ExceptionTables[$i]->setEndPc($this->getCurrentClass()->readUnsignedShort()); + $this->ExceptionTables[$i]->setHandlerPc($this->getCurrentClass()->readUnsignedShort()); + $this->ExceptionTables[$i]->setCatchType($this->getCurrentClass()->readUnsignedShort()); } - $this->AttributesCount = $this->readUnsignedShort(); + $this->AttributesCount = $this->getCurrentClass()->readUnsignedShort(); for ($i = 0; $i < $this->AttributesCount; $i++) { - $this->AttributeInfo[] = new JavaAttributeInfo($this); + $this->AttributeInfo[] = new JavaAttributeInfo($this->getCurrentClass()); } } public function getExceptionTables() diff --git a/src/kernel/attributes/ConstantValueAttribute.php b/src/kernel/attributes/ConstantValueAttribute.php index ee83d1c8..7dcde2e4 100644 --- a/src/kernel/attributes/ConstantValueAttribute.php +++ b/src/kernel/attributes/ConstantValueAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class ConstantValueAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/DeprecatedAttribute.php b/src/kernel/attributes/DeprecatedAttribute.php index e3a443ed..db959c31 100644 --- a/src/kernel/attributes/DeprecatedAttribute.php +++ b/src/kernel/attributes/DeprecatedAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class DeprecatedAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/EnclosingMethodAttribute.php b/src/kernel/attributes/EnclosingMethodAttribute.php index 55fd4445..41cf7c9c 100644 --- a/src/kernel/attributes/EnclosingMethodAttribute.php +++ b/src/kernel/attributes/EnclosingMethodAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class EnclosingMethodAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/ExceptionsAttribute.php b/src/kernel/attributes/ExceptionsAttribute.php index 7f2df4b9..7bae357e 100644 --- a/src/kernel/attributes/ExceptionsAttribute.php +++ b/src/kernel/attributes/ExceptionsAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class ExceptionsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/InnerClassesAttribute.php b/src/kernel/attributes/InnerClassesAttribute.php index 070c9b29..07124b49 100644 --- a/src/kernel/attributes/InnerClassesAttribute.php +++ b/src/kernel/attributes/InnerClassesAttribute.php @@ -2,32 +2,26 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class InnerClassesAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; - private $NumberOfClasses = 0; private $Classes = array(); - public function execute(): void { - $this->NumberOfClasses = $this->readUnsignedShort(); - + $this->NumberOfClasses = $this->getCurrentClass()->readUnsignedShort(); for ($i = 0; $i < $this->NumberOfClasses; $i++) { - $thises[$i] = new JavaStructureClasses($this); - - $thises[$i]->setInnerClassInfoIndex($this->readUnsignedShort()); - $thises[$i]->setOuterClassInfoIndex($this->readUnsignedShort()); - $thises[$i]->setInnerNameIndex($this->readUnsignedShort()); - $thises[$i]->setInnerClassAccessFlag($this->readUnsignedShort()); + $this->getCurrentClass()es[$i] = new JavaStructureClasses($this->getCurrentClass()); + $this->getCurrentClass()es[$i]->setInnerClassInfoIndex($this->getCurrentClass()->readUnsignedShort()); + $this->getCurrentClass()es[$i]->setOuterClassInfoIndex($this->getCurrentClass()->readUnsignedShort()); + $this->getCurrentClass()es[$i]->setInnerNameIndex($this->getCurrentClass()->readUnsignedShort()); + $this->getCurrentClass()es[$i]->setInnerClassAccessFlag($this->getCurrentClass()->readUnsignedShort()); } } - - public function getClasses() - { - return $thises; + public function getClasses () { + return $this->getCurrentClass()es; } } diff --git a/src/kernel/attributes/LineNumberTableAttribute.php b/src/kernel/attributes/LineNumberTableAttribute.php index cd29e1e2..84980b90 100644 --- a/src/kernel/attributes/LineNumberTableAttribute.php +++ b/src/kernel/attributes/LineNumberTableAttribute.php @@ -2,28 +2,23 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class LineNumberTableAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; - private $LineNumberTableLength = null; private $LineNumberTables = null; - public function execute(): void { - $this->LineNumberTableLength = $this->readUnsignedShort(); - + $this->LineNumberTableLength = $this->getCurrentClass()->readUnsignedShort(); for ($i = 0; $i < $this->LineNumberTableLength; $i++) { $this->LineNumberTables[$i] = new JavaStructureLineNumberTable($Class); - - $this->LineNumberTables[$i]->setStartPc($this->readUnsignedShort()); - $this->LineNumberTables[$i]->setLineNumber($this->readUnsignedShort()); + $this->LineNumberTables[$i]->setStartPc($this->getCurrentClass()->readUnsignedShort()); + $this->LineNumberTables[$i]->setLineNumber($this->getCurrentClass()->readUnsignedShort()); } } - public function getLineNumberTables() { return $this->LineNumberTables; diff --git a/src/kernel/attributes/LocalVariableTableAttribute.php b/src/kernel/attributes/LocalVariableTableAttribute.php index 2583ecea..61d0fb29 100644 --- a/src/kernel/attributes/LocalVariableTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTableAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class LocalVariableTableAttribute implements AttributeInterface { @@ -12,7 +12,7 @@ final class LocalVariableTableAttribute implements AttributeInterface private $LocalVariableTables = array(); public function execute(): void { - $this->LocalVariableTableLength = $this->readUnsignedShort(); + $this->LocalVariableTableLength = $this->getCurrentClass()->readUnsignedShort(); for ($i = 0; $i < $this->LocalVariableTableLength; $i++) { $this->LocalVariableTables[] = new JavaStructureLocalVariableTable($Class); } diff --git a/src/kernel/attributes/LocalVariableTypeTableAttribute.php b/src/kernel/attributes/LocalVariableTypeTableAttribute.php index cea3f501..5fcb0ef1 100644 --- a/src/kernel/attributes/LocalVariableTypeTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTypeTableAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class LocalVariableTypeTableAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php index 0a7cbb6c..0af1f769 100644 --- a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class RuntimeInvisibleAnnotationsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php index 616e6479..cffaf580 100644 --- a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class RuntimeInvisibleParameterAnnotationsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php index ff308998..5f01842d 100644 --- a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class RuntimeVisibleAnnotationsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php index 3a6b58ce..fc7ac398 100644 --- a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class RuntimeVisibleParameterAnnotationsAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/SignatureAttribute.php b/src/kernel/attributes/SignatureAttribute.php index f816f5df..b200ccd2 100644 --- a/src/kernel/attributes/SignatureAttribute.php +++ b/src/kernel/attributes/SignatureAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class SignatureAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/SourceDebugExtensionAttribute.php b/src/kernel/attributes/SourceDebugExtensionAttribute.php index 3add2f4e..94ed3f1d 100644 --- a/src/kernel/attributes/SourceDebugExtensionAttribute.php +++ b/src/kernel/attributes/SourceDebugExtensionAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class SourceDebugExtensionAttribute implements AttributeInterface { diff --git a/src/kernel/attributes/SourceFileAttribute.php b/src/kernel/attributes/SourceFileAttribute.php index f795a2d4..e132a989 100644 --- a/src/kernel/attributes/SourceFileAttribute.php +++ b/src/kernel/attributes/SourceFileAttribute.php @@ -2,20 +2,17 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class SourceFileAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; - private $SourceFileIndex = null; - public function execute(): void { - $this->SourceFileIndex = $this->readUnsignedShort(); + $this->SourceFileIndex = $this->getCurrentClass()->readUnsignedShort(); } - public function getSourceFileIndex() { return $this->SourceFileIndex; diff --git a/src/kernel/attributes/StackMapTableAttribute.php b/src/kernel/attributes/StackMapTableAttribute.php index d48208a3..56339a0a 100644 --- a/src/kernel/attributes/StackMapTableAttribute.php +++ b/src/kernel/attributes/StackMapTableAttribute.php @@ -2,26 +2,21 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class StackMapTableAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; - private $NumberOfEntries = null; - private $StackMapFrames = array(); - public function execute(): void { - $this->NumberOfEntries = $this->readUnsignedShort(); - + $this->NumberOfEntries = $this->getCurrentClass()->readUnsignedShort(); for ($i = 0; $i < $this->NumberOfEntries; $i++) { $this->StackMapFrames[] = new JavaStructureStackMapFrame($Class); } } - public function getStackMapFrames() { return $this->StackMapFrames; diff --git a/src/kernel/attributes/SyntheticAttribute.php b/src/kernel/attributes/SyntheticAttribute.php index 8e1c1141..9364b482 100644 --- a/src/kernel/attributes/SyntheticAttribute.php +++ b/src/kernel/attributes/SyntheticAttribute.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class SyntheticAttribute implements AttributeInterface { diff --git a/src/kernel/mnemonics/_aaload.php b/src/kernel/mnemonics/_aaload.php index 041f10bf..9a3b2612 100644 --- a/src/kernel/mnemonics/_aaload.php +++ b/src/kernel/mnemonics/_aaload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _aaload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aastore.php b/src/kernel/mnemonics/_aastore.php index b38505e1..751e31af 100644 --- a/src/kernel/mnemonics/_aastore.php +++ b/src/kernel/mnemonics/_aastore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _aastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aconst_null.php b/src/kernel/mnemonics/_aconst_null.php index c5d55c57..cd9a8218 100644 --- a/src/kernel/mnemonics/_aconst_null.php +++ b/src/kernel/mnemonics/_aconst_null.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _aconst_null implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload.php b/src/kernel/mnemonics/_aload.php index a7bcf345..932c7544 100644 --- a/src/kernel/mnemonics/_aload.php +++ b/src/kernel/mnemonics/_aload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _aload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload_0.php b/src/kernel/mnemonics/_aload_0.php index b5b316ab..0df93fd2 100644 --- a/src/kernel/mnemonics/_aload_0.php +++ b/src/kernel/mnemonics/_aload_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _aload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload_1.php b/src/kernel/mnemonics/_aload_1.php index f83de74b..87958356 100644 --- a/src/kernel/mnemonics/_aload_1.php +++ b/src/kernel/mnemonics/_aload_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _aload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload_2.php b/src/kernel/mnemonics/_aload_2.php index 53056ee3..7cf93a6b 100644 --- a/src/kernel/mnemonics/_aload_2.php +++ b/src/kernel/mnemonics/_aload_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _aload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_aload_3.php b/src/kernel/mnemonics/_aload_3.php index 9e227a7c..b55d0a30 100644 --- a/src/kernel/mnemonics/_aload_3.php +++ b/src/kernel/mnemonics/_aload_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _aload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_anewarray.php b/src/kernel/mnemonics/_anewarray.php index 8f5d783b..5fb3a449 100644 --- a/src/kernel/mnemonics/_anewarray.php +++ b/src/kernel/mnemonics/_anewarray.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _anewarray implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_areturn.php b/src/kernel/mnemonics/_areturn.php index a40e13a8..36bf5752 100644 --- a/src/kernel/mnemonics/_areturn.php +++ b/src/kernel/mnemonics/_areturn.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _areturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_arraylength.php b/src/kernel/mnemonics/_arraylength.php index c36c9e31..4e4f4ee4 100644 --- a/src/kernel/mnemonics/_arraylength.php +++ b/src/kernel/mnemonics/_arraylength.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _arraylength implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore.php b/src/kernel/mnemonics/_astore.php index b63140c8..0f318889 100644 --- a/src/kernel/mnemonics/_astore.php +++ b/src/kernel/mnemonics/_astore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _astore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore_0.php b/src/kernel/mnemonics/_astore_0.php index e729df33..62c69859 100644 --- a/src/kernel/mnemonics/_astore_0.php +++ b/src/kernel/mnemonics/_astore_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _astore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore_1.php b/src/kernel/mnemonics/_astore_1.php index d1ae620c..2b2ce75a 100644 --- a/src/kernel/mnemonics/_astore_1.php +++ b/src/kernel/mnemonics/_astore_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _astore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore_2.php b/src/kernel/mnemonics/_astore_2.php index 6fb6aacb..4c1d3a69 100644 --- a/src/kernel/mnemonics/_astore_2.php +++ b/src/kernel/mnemonics/_astore_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _astore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_astore_3.php b/src/kernel/mnemonics/_astore_3.php index 229cd009..20b1ff05 100644 --- a/src/kernel/mnemonics/_astore_3.php +++ b/src/kernel/mnemonics/_astore_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _astore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_athrow.php b/src/kernel/mnemonics/_athrow.php index 85a5c60d..8db418c5 100644 --- a/src/kernel/mnemonics/_athrow.php +++ b/src/kernel/mnemonics/_athrow.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _athrow implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_baload.php b/src/kernel/mnemonics/_baload.php index 212d2247..588544cf 100644 --- a/src/kernel/mnemonics/_baload.php +++ b/src/kernel/mnemonics/_baload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _baload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_bastore.php b/src/kernel/mnemonics/_bastore.php index 6c849854..579389f2 100644 --- a/src/kernel/mnemonics/_bastore.php +++ b/src/kernel/mnemonics/_bastore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _bastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_bipush.php b/src/kernel/mnemonics/_bipush.php index e9096160..db2a3b77 100644 --- a/src/kernel/mnemonics/_bipush.php +++ b/src/kernel/mnemonics/_bipush.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _bipush implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_breakpoint.php b/src/kernel/mnemonics/_breakpoint.php index 45a8ca3c..24c1ed16 100644 --- a/src/kernel/mnemonics/_breakpoint.php +++ b/src/kernel/mnemonics/_breakpoint.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _breakpoint implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_caload.php b/src/kernel/mnemonics/_caload.php index 7e399655..7055cd8a 100644 --- a/src/kernel/mnemonics/_caload.php +++ b/src/kernel/mnemonics/_caload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _caload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_castore.php b/src/kernel/mnemonics/_castore.php index 6ceac9df..5139d47d 100644 --- a/src/kernel/mnemonics/_castore.php +++ b/src/kernel/mnemonics/_castore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _castore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_checkcast.php b/src/kernel/mnemonics/_checkcast.php index f18937e8..57651af5 100644 --- a/src/kernel/mnemonics/_checkcast.php +++ b/src/kernel/mnemonics/_checkcast.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _checkcast implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_d2f.php b/src/kernel/mnemonics/_d2f.php index 76abfb06..cba77645 100644 --- a/src/kernel/mnemonics/_d2f.php +++ b/src/kernel/mnemonics/_d2f.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _d2f implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_d2i.php b/src/kernel/mnemonics/_d2i.php index d953c346..12978589 100644 --- a/src/kernel/mnemonics/_d2i.php +++ b/src/kernel/mnemonics/_d2i.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _d2i implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_d2l.php b/src/kernel/mnemonics/_d2l.php index 86817e2c..b61b4805 100644 --- a/src/kernel/mnemonics/_d2l.php +++ b/src/kernel/mnemonics/_d2l.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _d2l implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dadd.php b/src/kernel/mnemonics/_dadd.php index a371dc52..7ff274f2 100644 --- a/src/kernel/mnemonics/_dadd.php +++ b/src/kernel/mnemonics/_dadd.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dadd implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_daload.php b/src/kernel/mnemonics/_daload.php index 478cf0e5..45a8c06c 100644 --- a/src/kernel/mnemonics/_daload.php +++ b/src/kernel/mnemonics/_daload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _daload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dastore.php b/src/kernel/mnemonics/_dastore.php index b8dd2828..6cbea14f 100644 --- a/src/kernel/mnemonics/_dastore.php +++ b/src/kernel/mnemonics/_dastore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dcmpg.php b/src/kernel/mnemonics/_dcmpg.php index fa7784b2..9f3e362d 100644 --- a/src/kernel/mnemonics/_dcmpg.php +++ b/src/kernel/mnemonics/_dcmpg.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dcmpg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dcmpl.php b/src/kernel/mnemonics/_dcmpl.php index 4b422422..4cdf5a8b 100644 --- a/src/kernel/mnemonics/_dcmpl.php +++ b/src/kernel/mnemonics/_dcmpl.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dcmpl implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dconst_0.php b/src/kernel/mnemonics/_dconst_0.php index 7fd365d7..97a469ef 100644 --- a/src/kernel/mnemonics/_dconst_0.php +++ b/src/kernel/mnemonics/_dconst_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dconst_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dconst_1.php b/src/kernel/mnemonics/_dconst_1.php index f1487f2d..fb189a56 100644 --- a/src/kernel/mnemonics/_dconst_1.php +++ b/src/kernel/mnemonics/_dconst_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dconst_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ddiv.php b/src/kernel/mnemonics/_ddiv.php index 95bb76c7..bb30561d 100644 --- a/src/kernel/mnemonics/_ddiv.php +++ b/src/kernel/mnemonics/_ddiv.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ddiv implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload.php b/src/kernel/mnemonics/_dload.php index e45d3b79..33e5752c 100644 --- a/src/kernel/mnemonics/_dload.php +++ b/src/kernel/mnemonics/_dload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload_0.php b/src/kernel/mnemonics/_dload_0.php index 4f32bb3d..f64f89ce 100644 --- a/src/kernel/mnemonics/_dload_0.php +++ b/src/kernel/mnemonics/_dload_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload_1.php b/src/kernel/mnemonics/_dload_1.php index 74d5c0fa..ea0781e5 100644 --- a/src/kernel/mnemonics/_dload_1.php +++ b/src/kernel/mnemonics/_dload_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload_2.php b/src/kernel/mnemonics/_dload_2.php index 24f8d21d..7d0953a2 100644 --- a/src/kernel/mnemonics/_dload_2.php +++ b/src/kernel/mnemonics/_dload_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dload_3.php b/src/kernel/mnemonics/_dload_3.php index 6ddd8ead..39af3194 100644 --- a/src/kernel/mnemonics/_dload_3.php +++ b/src/kernel/mnemonics/_dload_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dmul.php b/src/kernel/mnemonics/_dmul.php index 15ac66f8..49038c73 100644 --- a/src/kernel/mnemonics/_dmul.php +++ b/src/kernel/mnemonics/_dmul.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dmul implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dneg.php b/src/kernel/mnemonics/_dneg.php index ca51ff0e..74097192 100644 --- a/src/kernel/mnemonics/_dneg.php +++ b/src/kernel/mnemonics/_dneg.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dneg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_drem.php b/src/kernel/mnemonics/_drem.php index bad7e823..64c16940 100644 --- a/src/kernel/mnemonics/_drem.php +++ b/src/kernel/mnemonics/_drem.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _drem implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dreturn.php b/src/kernel/mnemonics/_dreturn.php index e50c7ad2..88a37a3c 100644 --- a/src/kernel/mnemonics/_dreturn.php +++ b/src/kernel/mnemonics/_dreturn.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dreturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dstore.php b/src/kernel/mnemonics/_dstore.php index 357046b4..c6df4692 100644 --- a/src/kernel/mnemonics/_dstore.php +++ b/src/kernel/mnemonics/_dstore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dstore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dstore_0.php b/src/kernel/mnemonics/_dstore_0.php index b2734705..7cabbac2 100644 --- a/src/kernel/mnemonics/_dstore_0.php +++ b/src/kernel/mnemonics/_dstore_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dstore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dstore_1.php b/src/kernel/mnemonics/_dstore_1.php index 90ed1789..7d26fc8c 100644 --- a/src/kernel/mnemonics/_dstore_1.php +++ b/src/kernel/mnemonics/_dstore_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dstore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dstore_2.php b/src/kernel/mnemonics/_dstore_2.php index 02468cd6..245dc20a 100644 --- a/src/kernel/mnemonics/_dstore_2.php +++ b/src/kernel/mnemonics/_dstore_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dstore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dstore_3.php b/src/kernel/mnemonics/_dstore_3.php index 0fdb1141..fadf4547 100644 --- a/src/kernel/mnemonics/_dstore_3.php +++ b/src/kernel/mnemonics/_dstore_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dstore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dsub.php b/src/kernel/mnemonics/_dsub.php index f1b15198..387d0293 100644 --- a/src/kernel/mnemonics/_dsub.php +++ b/src/kernel/mnemonics/_dsub.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dsub implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup.php b/src/kernel/mnemonics/_dup.php index 005df187..76f6d1e6 100644 --- a/src/kernel/mnemonics/_dup.php +++ b/src/kernel/mnemonics/_dup.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dup implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup2.php b/src/kernel/mnemonics/_dup2.php index 2fcfd628..02aeb5e5 100644 --- a/src/kernel/mnemonics/_dup2.php +++ b/src/kernel/mnemonics/_dup2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dup2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup2_x1.php b/src/kernel/mnemonics/_dup2_x1.php index e1ab86e5..0cc33ee0 100644 --- a/src/kernel/mnemonics/_dup2_x1.php +++ b/src/kernel/mnemonics/_dup2_x1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dup2_x1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup2_x2.php b/src/kernel/mnemonics/_dup2_x2.php index bee9fc24..8d83658a 100644 --- a/src/kernel/mnemonics/_dup2_x2.php +++ b/src/kernel/mnemonics/_dup2_x2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dup2_x2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup_x1.php b/src/kernel/mnemonics/_dup_x1.php index 966676cc..c08cfd75 100644 --- a/src/kernel/mnemonics/_dup_x1.php +++ b/src/kernel/mnemonics/_dup_x1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dup_x1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_dup_x2.php b/src/kernel/mnemonics/_dup_x2.php index eaf9edde..cf504031 100644 --- a/src/kernel/mnemonics/_dup_x2.php +++ b/src/kernel/mnemonics/_dup_x2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _dup_x2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_f2d.php b/src/kernel/mnemonics/_f2d.php index f8d4b068..faecab49 100644 --- a/src/kernel/mnemonics/_f2d.php +++ b/src/kernel/mnemonics/_f2d.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _f2d implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_f2i.php b/src/kernel/mnemonics/_f2i.php index 4fffdb71..668ca010 100644 --- a/src/kernel/mnemonics/_f2i.php +++ b/src/kernel/mnemonics/_f2i.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _f2i implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_f2l.php b/src/kernel/mnemonics/_f2l.php index dec42389..9ad39490 100644 --- a/src/kernel/mnemonics/_f2l.php +++ b/src/kernel/mnemonics/_f2l.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _f2l implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fadd.php b/src/kernel/mnemonics/_fadd.php index c00d9f32..0c1fd417 100644 --- a/src/kernel/mnemonics/_fadd.php +++ b/src/kernel/mnemonics/_fadd.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fadd implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_faload.php b/src/kernel/mnemonics/_faload.php index a9d39a83..082ba1e7 100644 --- a/src/kernel/mnemonics/_faload.php +++ b/src/kernel/mnemonics/_faload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _faload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fastore.php b/src/kernel/mnemonics/_fastore.php index 19d43402..d07b3c74 100644 --- a/src/kernel/mnemonics/_fastore.php +++ b/src/kernel/mnemonics/_fastore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fcmpg.php b/src/kernel/mnemonics/_fcmpg.php index ecc5a1b6..a51e400d 100644 --- a/src/kernel/mnemonics/_fcmpg.php +++ b/src/kernel/mnemonics/_fcmpg.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fcmpg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fcmpl.php b/src/kernel/mnemonics/_fcmpl.php index d0d45d32..dc4af6d0 100644 --- a/src/kernel/mnemonics/_fcmpl.php +++ b/src/kernel/mnemonics/_fcmpl.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fcmpl implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fconst_0.php b/src/kernel/mnemonics/_fconst_0.php index 1f6ee52f..af30a7ac 100644 --- a/src/kernel/mnemonics/_fconst_0.php +++ b/src/kernel/mnemonics/_fconst_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fconst_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fconst_1.php b/src/kernel/mnemonics/_fconst_1.php index ed3aacd0..c6ea0695 100644 --- a/src/kernel/mnemonics/_fconst_1.php +++ b/src/kernel/mnemonics/_fconst_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fconst_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fconst_2.php b/src/kernel/mnemonics/_fconst_2.php index 4e8d3361..aee4b6ba 100644 --- a/src/kernel/mnemonics/_fconst_2.php +++ b/src/kernel/mnemonics/_fconst_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fconst_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fdiv.php b/src/kernel/mnemonics/_fdiv.php index e19464c7..a50faae4 100644 --- a/src/kernel/mnemonics/_fdiv.php +++ b/src/kernel/mnemonics/_fdiv.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fdiv implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload.php b/src/kernel/mnemonics/_fload.php index 2d6a5aee..8ea18d42 100644 --- a/src/kernel/mnemonics/_fload.php +++ b/src/kernel/mnemonics/_fload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload_0.php b/src/kernel/mnemonics/_fload_0.php index 45e6542b..eb3405c7 100644 --- a/src/kernel/mnemonics/_fload_0.php +++ b/src/kernel/mnemonics/_fload_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload_1.php b/src/kernel/mnemonics/_fload_1.php index ec7f9427..a424f460 100644 --- a/src/kernel/mnemonics/_fload_1.php +++ b/src/kernel/mnemonics/_fload_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload_2.php b/src/kernel/mnemonics/_fload_2.php index 8273c288..dbde0339 100644 --- a/src/kernel/mnemonics/_fload_2.php +++ b/src/kernel/mnemonics/_fload_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fload_3.php b/src/kernel/mnemonics/_fload_3.php index 9f88ee13..42aec9c1 100644 --- a/src/kernel/mnemonics/_fload_3.php +++ b/src/kernel/mnemonics/_fload_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fmul.php b/src/kernel/mnemonics/_fmul.php index 2df74a15..d5823a88 100644 --- a/src/kernel/mnemonics/_fmul.php +++ b/src/kernel/mnemonics/_fmul.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fmul implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fneg.php b/src/kernel/mnemonics/_fneg.php index e1a73d57..ca20d824 100644 --- a/src/kernel/mnemonics/_fneg.php +++ b/src/kernel/mnemonics/_fneg.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fneg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_frem.php b/src/kernel/mnemonics/_frem.php index 87358242..4074248b 100644 --- a/src/kernel/mnemonics/_frem.php +++ b/src/kernel/mnemonics/_frem.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _frem implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_freturn.php b/src/kernel/mnemonics/_freturn.php index 063a70ff..8ee835db 100644 --- a/src/kernel/mnemonics/_freturn.php +++ b/src/kernel/mnemonics/_freturn.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _freturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore.php b/src/kernel/mnemonics/_fstore.php index e1c07836..77cfe93b 100644 --- a/src/kernel/mnemonics/_fstore.php +++ b/src/kernel/mnemonics/_fstore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fstore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore_0.php b/src/kernel/mnemonics/_fstore_0.php index 7d8dc330..013e408a 100644 --- a/src/kernel/mnemonics/_fstore_0.php +++ b/src/kernel/mnemonics/_fstore_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fstore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore_1.php b/src/kernel/mnemonics/_fstore_1.php index b53374d6..6c2e5e4d 100644 --- a/src/kernel/mnemonics/_fstore_1.php +++ b/src/kernel/mnemonics/_fstore_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fstore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore_2.php b/src/kernel/mnemonics/_fstore_2.php index d1024f47..65bceb53 100644 --- a/src/kernel/mnemonics/_fstore_2.php +++ b/src/kernel/mnemonics/_fstore_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fstore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fstore_3.php b/src/kernel/mnemonics/_fstore_3.php index 5df39f8a..9c587b3a 100644 --- a/src/kernel/mnemonics/_fstore_3.php +++ b/src/kernel/mnemonics/_fstore_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fstore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_fsub.php b/src/kernel/mnemonics/_fsub.php index 9d3c33e0..e4896036 100644 --- a/src/kernel/mnemonics/_fsub.php +++ b/src/kernel/mnemonics/_fsub.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _fsub implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_getfield.php b/src/kernel/mnemonics/_getfield.php index 2deaf09e..08e763a1 100644 --- a/src/kernel/mnemonics/_getfield.php +++ b/src/kernel/mnemonics/_getfield.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _getfield implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/mnemonics/_getstatic.php index e3c440d3..b78cd4be 100644 --- a/src/kernel/mnemonics/_getstatic.php +++ b/src/kernel/mnemonics/_getstatic.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _getstatic implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_goto.php b/src/kernel/mnemonics/_goto.php index e415b22f..be266dd9 100644 --- a/src/kernel/mnemonics/_goto.php +++ b/src/kernel/mnemonics/_goto.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _goto implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_goto_w.php b/src/kernel/mnemonics/_goto_w.php index f30a8b8f..2b27a711 100644 --- a/src/kernel/mnemonics/_goto_w.php +++ b/src/kernel/mnemonics/_goto_w.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _goto_w implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2b.php b/src/kernel/mnemonics/_i2b.php index b6d69137..2b3360a7 100644 --- a/src/kernel/mnemonics/_i2b.php +++ b/src/kernel/mnemonics/_i2b.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _i2b implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2c.php b/src/kernel/mnemonics/_i2c.php index 9a1bc0a8..37ec7c05 100644 --- a/src/kernel/mnemonics/_i2c.php +++ b/src/kernel/mnemonics/_i2c.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _i2c implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2d.php b/src/kernel/mnemonics/_i2d.php index b42f7029..25095b11 100644 --- a/src/kernel/mnemonics/_i2d.php +++ b/src/kernel/mnemonics/_i2d.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _i2d implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2f.php b/src/kernel/mnemonics/_i2f.php index 87f6807d..5c3f6272 100644 --- a/src/kernel/mnemonics/_i2f.php +++ b/src/kernel/mnemonics/_i2f.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _i2f implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2l.php b/src/kernel/mnemonics/_i2l.php index fc14f2d1..9f91b2fa 100644 --- a/src/kernel/mnemonics/_i2l.php +++ b/src/kernel/mnemonics/_i2l.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _i2l implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_i2s.php b/src/kernel/mnemonics/_i2s.php index 6687ae35..639ba157 100644 --- a/src/kernel/mnemonics/_i2s.php +++ b/src/kernel/mnemonics/_i2s.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _i2s implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iadd.php b/src/kernel/mnemonics/_iadd.php index 512ead0a..495d26c8 100644 --- a/src/kernel/mnemonics/_iadd.php +++ b/src/kernel/mnemonics/_iadd.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iadd implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iaload.php b/src/kernel/mnemonics/_iaload.php index 5db1ea42..c7dd5317 100644 --- a/src/kernel/mnemonics/_iaload.php +++ b/src/kernel/mnemonics/_iaload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iaload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iand.php b/src/kernel/mnemonics/_iand.php index be6a1f33..e527da94 100644 --- a/src/kernel/mnemonics/_iand.php +++ b/src/kernel/mnemonics/_iand.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iand implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iastore.php b/src/kernel/mnemonics/_iastore.php index e034230e..6edba729 100644 --- a/src/kernel/mnemonics/_iastore.php +++ b/src/kernel/mnemonics/_iastore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_0.php b/src/kernel/mnemonics/_iconst_0.php index bf0b724a..0868abbf 100644 --- a/src/kernel/mnemonics/_iconst_0.php +++ b/src/kernel/mnemonics/_iconst_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iconst_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_1.php b/src/kernel/mnemonics/_iconst_1.php index 0815c477..f096c652 100644 --- a/src/kernel/mnemonics/_iconst_1.php +++ b/src/kernel/mnemonics/_iconst_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iconst_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_2.php b/src/kernel/mnemonics/_iconst_2.php index fad483bf..744e2e89 100644 --- a/src/kernel/mnemonics/_iconst_2.php +++ b/src/kernel/mnemonics/_iconst_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iconst_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_3.php b/src/kernel/mnemonics/_iconst_3.php index c6f42d61..90a8c27b 100644 --- a/src/kernel/mnemonics/_iconst_3.php +++ b/src/kernel/mnemonics/_iconst_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iconst_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_4.php b/src/kernel/mnemonics/_iconst_4.php index 484e6520..de29ae63 100644 --- a/src/kernel/mnemonics/_iconst_4.php +++ b/src/kernel/mnemonics/_iconst_4.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iconst_4 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_5.php b/src/kernel/mnemonics/_iconst_5.php index f6103782..c7ccabbb 100644 --- a/src/kernel/mnemonics/_iconst_5.php +++ b/src/kernel/mnemonics/_iconst_5.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iconst_5 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iconst_m1.php b/src/kernel/mnemonics/_iconst_m1.php index 80934a1b..ac6482a7 100644 --- a/src/kernel/mnemonics/_iconst_m1.php +++ b/src/kernel/mnemonics/_iconst_m1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iconst_m1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_idiv.php b/src/kernel/mnemonics/_idiv.php index f2035e87..7cf20353 100644 --- a/src/kernel/mnemonics/_idiv.php +++ b/src/kernel/mnemonics/_idiv.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _idiv implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_acmpeq.php b/src/kernel/mnemonics/_if_acmpeq.php index aa00bd51..56d1ec6e 100644 --- a/src/kernel/mnemonics/_if_acmpeq.php +++ b/src/kernel/mnemonics/_if_acmpeq.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _if_acmpeq implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_acmpne.php b/src/kernel/mnemonics/_if_acmpne.php index d900a912..02caae43 100644 --- a/src/kernel/mnemonics/_if_acmpne.php +++ b/src/kernel/mnemonics/_if_acmpne.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _if_acmpne implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmpeq.php b/src/kernel/mnemonics/_if_icmpeq.php index 67fa00e7..586b225b 100644 --- a/src/kernel/mnemonics/_if_icmpeq.php +++ b/src/kernel/mnemonics/_if_icmpeq.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _if_icmpeq implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmpge.php b/src/kernel/mnemonics/_if_icmpge.php index b71dbd14..963c8dce 100644 --- a/src/kernel/mnemonics/_if_icmpge.php +++ b/src/kernel/mnemonics/_if_icmpge.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _if_icmpge implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmpgt.php b/src/kernel/mnemonics/_if_icmpgt.php index 9be2de44..99cd273c 100644 --- a/src/kernel/mnemonics/_if_icmpgt.php +++ b/src/kernel/mnemonics/_if_icmpgt.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _if_icmpgt implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmple.php b/src/kernel/mnemonics/_if_icmple.php index eb1d84fb..f1d612ae 100644 --- a/src/kernel/mnemonics/_if_icmple.php +++ b/src/kernel/mnemonics/_if_icmple.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _if_icmple implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmplt.php b/src/kernel/mnemonics/_if_icmplt.php index f779b59c..6eaba40d 100644 --- a/src/kernel/mnemonics/_if_icmplt.php +++ b/src/kernel/mnemonics/_if_icmplt.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _if_icmplt implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_if_icmpne.php b/src/kernel/mnemonics/_if_icmpne.php index 67cdfca2..cb338e72 100644 --- a/src/kernel/mnemonics/_if_icmpne.php +++ b/src/kernel/mnemonics/_if_icmpne.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _if_icmpne implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifeq.php b/src/kernel/mnemonics/_ifeq.php index e92d4cf2..0193c388 100644 --- a/src/kernel/mnemonics/_ifeq.php +++ b/src/kernel/mnemonics/_ifeq.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ifeq implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifge.php b/src/kernel/mnemonics/_ifge.php index 53f95639..517f49e4 100644 --- a/src/kernel/mnemonics/_ifge.php +++ b/src/kernel/mnemonics/_ifge.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ifge implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifgt.php b/src/kernel/mnemonics/_ifgt.php index afdf2beb..de5c4131 100644 --- a/src/kernel/mnemonics/_ifgt.php +++ b/src/kernel/mnemonics/_ifgt.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ifgt implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifle.php b/src/kernel/mnemonics/_ifle.php index 58b67b46..f394bc28 100644 --- a/src/kernel/mnemonics/_ifle.php +++ b/src/kernel/mnemonics/_ifle.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ifle implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iflt.php b/src/kernel/mnemonics/_iflt.php index 1cfc7055..fa5e25e6 100644 --- a/src/kernel/mnemonics/_iflt.php +++ b/src/kernel/mnemonics/_iflt.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iflt implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifne.php b/src/kernel/mnemonics/_ifne.php index 87361272..40ab772b 100644 --- a/src/kernel/mnemonics/_ifne.php +++ b/src/kernel/mnemonics/_ifne.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ifne implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifnonnull.php b/src/kernel/mnemonics/_ifnonnull.php index 38bb95f7..bc67d23c 100644 --- a/src/kernel/mnemonics/_ifnonnull.php +++ b/src/kernel/mnemonics/_ifnonnull.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ifnonnull implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ifnull.php b/src/kernel/mnemonics/_ifnull.php index f36761f9..7d150d9e 100644 --- a/src/kernel/mnemonics/_ifnull.php +++ b/src/kernel/mnemonics/_ifnull.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ifnull implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iinc.php b/src/kernel/mnemonics/_iinc.php index 68d75ab0..ab2aada2 100644 --- a/src/kernel/mnemonics/_iinc.php +++ b/src/kernel/mnemonics/_iinc.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iinc implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload.php b/src/kernel/mnemonics/_iload.php index d30d4dc4..dfd113bf 100644 --- a/src/kernel/mnemonics/_iload.php +++ b/src/kernel/mnemonics/_iload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload_0.php b/src/kernel/mnemonics/_iload_0.php index d9e2fa65..32939967 100644 --- a/src/kernel/mnemonics/_iload_0.php +++ b/src/kernel/mnemonics/_iload_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload_1.php b/src/kernel/mnemonics/_iload_1.php index 2a8a8915..4115d45b 100644 --- a/src/kernel/mnemonics/_iload_1.php +++ b/src/kernel/mnemonics/_iload_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload_2.php b/src/kernel/mnemonics/_iload_2.php index 944b0205..3a843a16 100644 --- a/src/kernel/mnemonics/_iload_2.php +++ b/src/kernel/mnemonics/_iload_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iload_3.php b/src/kernel/mnemonics/_iload_3.php index 97edf0a5..27dbf5a9 100644 --- a/src/kernel/mnemonics/_iload_3.php +++ b/src/kernel/mnemonics/_iload_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_impdep1.php b/src/kernel/mnemonics/_impdep1.php index 3d452703..e23bb126 100644 --- a/src/kernel/mnemonics/_impdep1.php +++ b/src/kernel/mnemonics/_impdep1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _impdep1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_impdep2.php b/src/kernel/mnemonics/_impdep2.php index 3b0bc145..76bf7f50 100644 --- a/src/kernel/mnemonics/_impdep2.php +++ b/src/kernel/mnemonics/_impdep2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _impdep2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_imul.php b/src/kernel/mnemonics/_imul.php index 80fcbdd6..188a0711 100644 --- a/src/kernel/mnemonics/_imul.php +++ b/src/kernel/mnemonics/_imul.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _imul implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ineg.php b/src/kernel/mnemonics/_ineg.php index 81ba5906..b01f2f32 100644 --- a/src/kernel/mnemonics/_ineg.php +++ b/src/kernel/mnemonics/_ineg.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ineg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_instanceof.php b/src/kernel/mnemonics/_instanceof.php index 88b509d4..d919246b 100644 --- a/src/kernel/mnemonics/_instanceof.php +++ b/src/kernel/mnemonics/_instanceof.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _instanceof implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokedynamic.php b/src/kernel/mnemonics/_invokedynamic.php index 763e67be..a3c1d53b 100644 --- a/src/kernel/mnemonics/_invokedynamic.php +++ b/src/kernel/mnemonics/_invokedynamic.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _invokedynamic implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokeinterface.php b/src/kernel/mnemonics/_invokeinterface.php index f6c5b9bd..dddd89fa 100644 --- a/src/kernel/mnemonics/_invokeinterface.php +++ b/src/kernel/mnemonics/_invokeinterface.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _invokeinterface implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokespecial.php b/src/kernel/mnemonics/_invokespecial.php index d1e66753..5f5c18d7 100644 --- a/src/kernel/mnemonics/_invokespecial.php +++ b/src/kernel/mnemonics/_invokespecial.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _invokespecial implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokestatic.php b/src/kernel/mnemonics/_invokestatic.php index 8718efd2..f3732fe3 100644 --- a/src/kernel/mnemonics/_invokestatic.php +++ b/src/kernel/mnemonics/_invokestatic.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _invokestatic implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index 24c66b1b..c46a3b81 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _invokevirtual implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ior.php b/src/kernel/mnemonics/_ior.php index 5dc921d2..49a33d0b 100644 --- a/src/kernel/mnemonics/_ior.php +++ b/src/kernel/mnemonics/_ior.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ior implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_irem.php b/src/kernel/mnemonics/_irem.php index 3a680f63..fee012ba 100644 --- a/src/kernel/mnemonics/_irem.php +++ b/src/kernel/mnemonics/_irem.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _irem implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ireturn.php b/src/kernel/mnemonics/_ireturn.php index d47f5268..801cf22d 100644 --- a/src/kernel/mnemonics/_ireturn.php +++ b/src/kernel/mnemonics/_ireturn.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ireturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ishl.php b/src/kernel/mnemonics/_ishl.php index 74cb8101..475c46ec 100644 --- a/src/kernel/mnemonics/_ishl.php +++ b/src/kernel/mnemonics/_ishl.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ishl implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ishr.php b/src/kernel/mnemonics/_ishr.php index 5181c655..e23ca1a0 100644 --- a/src/kernel/mnemonics/_ishr.php +++ b/src/kernel/mnemonics/_ishr.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ishr implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_istore.php b/src/kernel/mnemonics/_istore.php index 387f82d7..2f2296c3 100644 --- a/src/kernel/mnemonics/_istore.php +++ b/src/kernel/mnemonics/_istore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _istore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_istore_0.php b/src/kernel/mnemonics/_istore_0.php index e4340168..135c2fa0 100644 --- a/src/kernel/mnemonics/_istore_0.php +++ b/src/kernel/mnemonics/_istore_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _istore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_istore_1.php b/src/kernel/mnemonics/_istore_1.php index cc6e6cd3..652bbcf0 100644 --- a/src/kernel/mnemonics/_istore_1.php +++ b/src/kernel/mnemonics/_istore_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _istore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_istore_2.php b/src/kernel/mnemonics/_istore_2.php index d0f910db..884cbe10 100644 --- a/src/kernel/mnemonics/_istore_2.php +++ b/src/kernel/mnemonics/_istore_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _istore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_istore_3.php b/src/kernel/mnemonics/_istore_3.php index 54995054..6b4db6c3 100644 --- a/src/kernel/mnemonics/_istore_3.php +++ b/src/kernel/mnemonics/_istore_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _istore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_isub.php b/src/kernel/mnemonics/_isub.php index 49e7346f..d12d6928 100644 --- a/src/kernel/mnemonics/_isub.php +++ b/src/kernel/mnemonics/_isub.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _isub implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_iushr.php b/src/kernel/mnemonics/_iushr.php index 85d662c6..575bb128 100644 --- a/src/kernel/mnemonics/_iushr.php +++ b/src/kernel/mnemonics/_iushr.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _iushr implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ixor.php b/src/kernel/mnemonics/_ixor.php index 82c47bd2..2a4d1e21 100644 --- a/src/kernel/mnemonics/_ixor.php +++ b/src/kernel/mnemonics/_ixor.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ixor implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_jsr.php b/src/kernel/mnemonics/_jsr.php index 068b951f..44709506 100644 --- a/src/kernel/mnemonics/_jsr.php +++ b/src/kernel/mnemonics/_jsr.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _jsr implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_jsr_w.php b/src/kernel/mnemonics/_jsr_w.php index bd795c6d..dafd03db 100644 --- a/src/kernel/mnemonics/_jsr_w.php +++ b/src/kernel/mnemonics/_jsr_w.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _jsr_w implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_l2d.php b/src/kernel/mnemonics/_l2d.php index 7a219859..92437265 100644 --- a/src/kernel/mnemonics/_l2d.php +++ b/src/kernel/mnemonics/_l2d.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _l2d implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_l2f.php b/src/kernel/mnemonics/_l2f.php index 4db83816..90727836 100644 --- a/src/kernel/mnemonics/_l2f.php +++ b/src/kernel/mnemonics/_l2f.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _l2f implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_l2i.php b/src/kernel/mnemonics/_l2i.php index 1e65a4be..692eb21f 100644 --- a/src/kernel/mnemonics/_l2i.php +++ b/src/kernel/mnemonics/_l2i.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _l2i implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ladd.php b/src/kernel/mnemonics/_ladd.php index 8c0df2fe..dd121919 100644 --- a/src/kernel/mnemonics/_ladd.php +++ b/src/kernel/mnemonics/_ladd.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ladd implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_laload.php b/src/kernel/mnemonics/_laload.php index 8a017b7e..48679ddb 100644 --- a/src/kernel/mnemonics/_laload.php +++ b/src/kernel/mnemonics/_laload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _laload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_land.php b/src/kernel/mnemonics/_land.php index 57550dad..93c37599 100644 --- a/src/kernel/mnemonics/_land.php +++ b/src/kernel/mnemonics/_land.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _land implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lastore.php b/src/kernel/mnemonics/_lastore.php index 0d35ae99..f0c4085d 100644 --- a/src/kernel/mnemonics/_lastore.php +++ b/src/kernel/mnemonics/_lastore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lcmp.php b/src/kernel/mnemonics/_lcmp.php index 2b3781a7..9c8ccca4 100644 --- a/src/kernel/mnemonics/_lcmp.php +++ b/src/kernel/mnemonics/_lcmp.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lcmp implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lconst_0.php b/src/kernel/mnemonics/_lconst_0.php index 780b340f..f6f63b27 100644 --- a/src/kernel/mnemonics/_lconst_0.php +++ b/src/kernel/mnemonics/_lconst_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lconst_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lconst_1.php b/src/kernel/mnemonics/_lconst_1.php index ff19755e..f4a74979 100644 --- a/src/kernel/mnemonics/_lconst_1.php +++ b/src/kernel/mnemonics/_lconst_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lconst_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ldc.php b/src/kernel/mnemonics/_ldc.php index 50f69b99..985b60f3 100644 --- a/src/kernel/mnemonics/_ldc.php +++ b/src/kernel/mnemonics/_ldc.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ldc implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ldc2_w.php b/src/kernel/mnemonics/_ldc2_w.php index fd1bb050..92d913e6 100644 --- a/src/kernel/mnemonics/_ldc2_w.php +++ b/src/kernel/mnemonics/_ldc2_w.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ldc2_w implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ldc_w.php b/src/kernel/mnemonics/_ldc_w.php index 1f58cfef..1c122c23 100644 --- a/src/kernel/mnemonics/_ldc_w.php +++ b/src/kernel/mnemonics/_ldc_w.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ldc_w implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ldiv.php b/src/kernel/mnemonics/_ldiv.php index c0b35d44..e9731e8c 100644 --- a/src/kernel/mnemonics/_ldiv.php +++ b/src/kernel/mnemonics/_ldiv.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ldiv implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload.php b/src/kernel/mnemonics/_lload.php index 5f743c62..7188f28c 100644 --- a/src/kernel/mnemonics/_lload.php +++ b/src/kernel/mnemonics/_lload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload_0.php b/src/kernel/mnemonics/_lload_0.php index c2aeb8a2..7fd82355 100644 --- a/src/kernel/mnemonics/_lload_0.php +++ b/src/kernel/mnemonics/_lload_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lload_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload_1.php b/src/kernel/mnemonics/_lload_1.php index 67b7d5e3..8d339b89 100644 --- a/src/kernel/mnemonics/_lload_1.php +++ b/src/kernel/mnemonics/_lload_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lload_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload_2.php b/src/kernel/mnemonics/_lload_2.php index 2ef23e02..cfee345c 100644 --- a/src/kernel/mnemonics/_lload_2.php +++ b/src/kernel/mnemonics/_lload_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lload_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lload_3.php b/src/kernel/mnemonics/_lload_3.php index 199a861c..382fefc4 100644 --- a/src/kernel/mnemonics/_lload_3.php +++ b/src/kernel/mnemonics/_lload_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lload_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lmul.php b/src/kernel/mnemonics/_lmul.php index a459fdcd..e6c5643e 100644 --- a/src/kernel/mnemonics/_lmul.php +++ b/src/kernel/mnemonics/_lmul.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lmul implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lneg.php b/src/kernel/mnemonics/_lneg.php index 7d9b97c1..f131e8fe 100644 --- a/src/kernel/mnemonics/_lneg.php +++ b/src/kernel/mnemonics/_lneg.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lneg implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lookupswitch.php b/src/kernel/mnemonics/_lookupswitch.php index 99d4da1e..cdf95d58 100644 --- a/src/kernel/mnemonics/_lookupswitch.php +++ b/src/kernel/mnemonics/_lookupswitch.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lookupswitch implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lor.php b/src/kernel/mnemonics/_lor.php index 69f42db7..d18dc949 100644 --- a/src/kernel/mnemonics/_lor.php +++ b/src/kernel/mnemonics/_lor.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lor implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lrem.php b/src/kernel/mnemonics/_lrem.php index 3745cce9..e3b9b282 100644 --- a/src/kernel/mnemonics/_lrem.php +++ b/src/kernel/mnemonics/_lrem.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lrem implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lreturn.php b/src/kernel/mnemonics/_lreturn.php index 806486bd..ee095b3c 100644 --- a/src/kernel/mnemonics/_lreturn.php +++ b/src/kernel/mnemonics/_lreturn.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lreturn implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lshl.php b/src/kernel/mnemonics/_lshl.php index a29b938e..c81e52f0 100644 --- a/src/kernel/mnemonics/_lshl.php +++ b/src/kernel/mnemonics/_lshl.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lshl implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lshr.php b/src/kernel/mnemonics/_lshr.php index b8f3701f..16bf30ca 100644 --- a/src/kernel/mnemonics/_lshr.php +++ b/src/kernel/mnemonics/_lshr.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lshr implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lstore.php b/src/kernel/mnemonics/_lstore.php index b91c7fbf..66b5254c 100644 --- a/src/kernel/mnemonics/_lstore.php +++ b/src/kernel/mnemonics/_lstore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lstore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lstore_0.php b/src/kernel/mnemonics/_lstore_0.php index ffae4d5c..5ddf44a3 100644 --- a/src/kernel/mnemonics/_lstore_0.php +++ b/src/kernel/mnemonics/_lstore_0.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lstore_0 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lstore_1.php b/src/kernel/mnemonics/_lstore_1.php index a6e04d96..ae7e5a9a 100644 --- a/src/kernel/mnemonics/_lstore_1.php +++ b/src/kernel/mnemonics/_lstore_1.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lstore_1 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lstore_2.php b/src/kernel/mnemonics/_lstore_2.php index 5f2941a5..b8f1d494 100644 --- a/src/kernel/mnemonics/_lstore_2.php +++ b/src/kernel/mnemonics/_lstore_2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lstore_2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lstore_3.php b/src/kernel/mnemonics/_lstore_3.php index 37f81554..422e193c 100644 --- a/src/kernel/mnemonics/_lstore_3.php +++ b/src/kernel/mnemonics/_lstore_3.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lstore_3 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lsub.php b/src/kernel/mnemonics/_lsub.php index 1b50ae98..ce82f007 100644 --- a/src/kernel/mnemonics/_lsub.php +++ b/src/kernel/mnemonics/_lsub.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lsub implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lushr.php b/src/kernel/mnemonics/_lushr.php index 9da4106f..3d8edf7a 100644 --- a/src/kernel/mnemonics/_lushr.php +++ b/src/kernel/mnemonics/_lushr.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lushr implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_lxor.php b/src/kernel/mnemonics/_lxor.php index 0f736f7c..6446cdf9 100644 --- a/src/kernel/mnemonics/_lxor.php +++ b/src/kernel/mnemonics/_lxor.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _lxor implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_monitorenter.php b/src/kernel/mnemonics/_monitorenter.php index 7e084aed..5191f90a 100644 --- a/src/kernel/mnemonics/_monitorenter.php +++ b/src/kernel/mnemonics/_monitorenter.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _monitorenter implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_monitorexit.php b/src/kernel/mnemonics/_monitorexit.php index 9727b421..a988ef6c 100644 --- a/src/kernel/mnemonics/_monitorexit.php +++ b/src/kernel/mnemonics/_monitorexit.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _monitorexit implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_multianewarray.php b/src/kernel/mnemonics/_multianewarray.php index 55170b4a..862122b0 100644 --- a/src/kernel/mnemonics/_multianewarray.php +++ b/src/kernel/mnemonics/_multianewarray.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _multianewarray implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_new.php b/src/kernel/mnemonics/_new.php index 5c7d2d28..4d07a791 100644 --- a/src/kernel/mnemonics/_new.php +++ b/src/kernel/mnemonics/_new.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _new implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_newarray.php b/src/kernel/mnemonics/_newarray.php index dcb2e69e..d2125c2f 100644 --- a/src/kernel/mnemonics/_newarray.php +++ b/src/kernel/mnemonics/_newarray.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _newarray implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_nop.php b/src/kernel/mnemonics/_nop.php index 8940195d..72da13f1 100644 --- a/src/kernel/mnemonics/_nop.php +++ b/src/kernel/mnemonics/_nop.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _nop implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_pop.php b/src/kernel/mnemonics/_pop.php index a6eba138..1340ca1f 100644 --- a/src/kernel/mnemonics/_pop.php +++ b/src/kernel/mnemonics/_pop.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _pop implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_pop2.php b/src/kernel/mnemonics/_pop2.php index 1f507e05..e65a31c4 100644 --- a/src/kernel/mnemonics/_pop2.php +++ b/src/kernel/mnemonics/_pop2.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _pop2 implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_putfield.php b/src/kernel/mnemonics/_putfield.php index e8992b10..a126cfc0 100644 --- a/src/kernel/mnemonics/_putfield.php +++ b/src/kernel/mnemonics/_putfield.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _putfield implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_putstatic.php b/src/kernel/mnemonics/_putstatic.php index 4262982b..ed545157 100644 --- a/src/kernel/mnemonics/_putstatic.php +++ b/src/kernel/mnemonics/_putstatic.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _putstatic implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_ret.php b/src/kernel/mnemonics/_ret.php index fac2531f..4f66353e 100644 --- a/src/kernel/mnemonics/_ret.php +++ b/src/kernel/mnemonics/_ret.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _ret implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_return.php b/src/kernel/mnemonics/_return.php index ed4aaf58..4c094979 100644 --- a/src/kernel/mnemonics/_return.php +++ b/src/kernel/mnemonics/_return.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _return implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_saload.php b/src/kernel/mnemonics/_saload.php index a5a0ca88..5d361231 100644 --- a/src/kernel/mnemonics/_saload.php +++ b/src/kernel/mnemonics/_saload.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _saload implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_sastore.php b/src/kernel/mnemonics/_sastore.php index 4e4deb8b..e32df373 100644 --- a/src/kernel/mnemonics/_sastore.php +++ b/src/kernel/mnemonics/_sastore.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _sastore implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_sipush.php b/src/kernel/mnemonics/_sipush.php index dce8381c..93b98530 100644 --- a/src/kernel/mnemonics/_sipush.php +++ b/src/kernel/mnemonics/_sipush.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _sipush implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_swap.php b/src/kernel/mnemonics/_swap.php index 1f7719e2..4a0210d4 100644 --- a/src/kernel/mnemonics/_swap.php +++ b/src/kernel/mnemonics/_swap.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _swap implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_tableswitch.php b/src/kernel/mnemonics/_tableswitch.php index 4de84938..120bb0d4 100644 --- a/src/kernel/mnemonics/_tableswitch.php +++ b/src/kernel/mnemonics/_tableswitch.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _tableswitch implements MnemonicInterface { diff --git a/src/kernel/mnemonics/_wide.php b/src/kernel/mnemonics/_wide.php index 914d81f0..ced40de9 100644 --- a/src/kernel/mnemonics/_wide.php +++ b/src/kernel/mnemonics/_wide.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; final class _wide implements MnemonicInterface { diff --git a/src/kernel/structures/_AppendFrame.php b/src/kernel/structures/_AppendFrame.php index 491d1907..94b20fae 100644 --- a/src/kernel/structures/_AppendFrame.php +++ b/src/kernel/structures/_AppendFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _AppendFrame implements StructureInterface { diff --git a/src/kernel/structures/_ChopFrame.php b/src/kernel/structures/_ChopFrame.php index 22024e1b..813f509a 100644 --- a/src/kernel/structures/_ChopFrame.php +++ b/src/kernel/structures/_ChopFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _ChopFrame implements StructureInterface { diff --git a/src/kernel/structures/_Class.php b/src/kernel/structures/_Class.php index 37fcb8de..5154757d 100644 --- a/src/kernel/structures/_Class.php +++ b/src/kernel/structures/_Class.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _Class implements StructureInterface { diff --git a/src/kernel/structures/_Classes.php b/src/kernel/structures/_Classes.php index 914c6fcf..7981576d 100644 --- a/src/kernel/structures/_Classes.php +++ b/src/kernel/structures/_Classes.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _Classes implements StructureInterface { diff --git a/src/kernel/structures/_Double.php b/src/kernel/structures/_Double.php index fcb3a4b8..daf214ab 100644 --- a/src/kernel/structures/_Double.php +++ b/src/kernel/structures/_Double.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _Double implements StructureInterface { diff --git a/src/kernel/structures/_DoubleVariableInfo.php b/src/kernel/structures/_DoubleVariableInfo.php index 5e100d4d..5473b08a 100644 --- a/src/kernel/structures/_DoubleVariableInfo.php +++ b/src/kernel/structures/_DoubleVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _DoubleVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_ExceptionTable.php b/src/kernel/structures/_ExceptionTable.php index fef2e0c1..3bad5b06 100644 --- a/src/kernel/structures/_ExceptionTable.php +++ b/src/kernel/structures/_ExceptionTable.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _ExceptionTable implements StructureInterface { diff --git a/src/kernel/structures/_FieldInfo.php b/src/kernel/structures/_FieldInfo.php index d64fee10..cc96b4f6 100644 --- a/src/kernel/structures/_FieldInfo.php +++ b/src/kernel/structures/_FieldInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _FieldInfo implements StructureInterface { diff --git a/src/kernel/structures/_FieldRef.php b/src/kernel/structures/_FieldRef.php index aa1cbf6c..82734c1f 100644 --- a/src/kernel/structures/_FieldRef.php +++ b/src/kernel/structures/_FieldRef.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _Fieldref implements StructureInterface { diff --git a/src/kernel/structures/_Float.php b/src/kernel/structures/_Float.php index 5b12f43a..6cf4495a 100644 --- a/src/kernel/structures/_Float.php +++ b/src/kernel/structures/_Float.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _Float implements StructureInterface { diff --git a/src/kernel/structures/_FloatVariableInfo.php b/src/kernel/structures/_FloatVariableInfo.php index af1af98e..41ed66dc 100644 --- a/src/kernel/structures/_FloatVariableInfo.php +++ b/src/kernel/structures/_FloatVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _FloatVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_FullFrame.php b/src/kernel/structures/_FullFrame.php index 65e393b8..9eea9078 100644 --- a/src/kernel/structures/_FullFrame.php +++ b/src/kernel/structures/_FullFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _FullFrame implements StructureInterface { diff --git a/src/kernel/structures/_Integer.php b/src/kernel/structures/_Integer.php index 14bc1f5a..ac293377 100644 --- a/src/kernel/structures/_Integer.php +++ b/src/kernel/structures/_Integer.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _Integer implements StructureInterface { diff --git a/src/kernel/structures/_IntegerVariableInfo.php b/src/kernel/structures/_IntegerVariableInfo.php index a061bcb0..9b523a17 100644 --- a/src/kernel/structures/_IntegerVariableInfo.php +++ b/src/kernel/structures/_IntegerVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _IntegerVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_LineNumberTable.php b/src/kernel/structures/_LineNumberTable.php index ac2ee318..c25cbb44 100644 --- a/src/kernel/structures/_LineNumberTable.php +++ b/src/kernel/structures/_LineNumberTable.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _LineNumberTable implements StructureInterface { diff --git a/src/kernel/structures/_LocalVariableTable.php b/src/kernel/structures/_LocalVariableTable.php index 878957a3..76a479c4 100644 --- a/src/kernel/structures/_LocalVariableTable.php +++ b/src/kernel/structures/_LocalVariableTable.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _LocalVariableTable implements StructureInterface { diff --git a/src/kernel/structures/_Long.php b/src/kernel/structures/_Long.php index 77c19c4a..4f176eb8 100644 --- a/src/kernel/structures/_Long.php +++ b/src/kernel/structures/_Long.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _Long implements StructureInterface { diff --git a/src/kernel/structures/_LongVariableInfo.php b/src/kernel/structures/_LongVariableInfo.php index 2ad068bf..3ffeba6d 100644 --- a/src/kernel/structures/_LongVariableInfo.php +++ b/src/kernel/structures/_LongVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _LongVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_MethodInfo.php b/src/kernel/structures/_MethodInfo.php index 0010c33e..e3e2bfc2 100644 --- a/src/kernel/structures/_MethodInfo.php +++ b/src/kernel/structures/_MethodInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _MethodInfo implements StructureInterface { diff --git a/src/kernel/structures/_Methodref.php b/src/kernel/structures/_Methodref.php index f03d24f7..e51a3d0b 100644 --- a/src/kernel/structures/_Methodref.php +++ b/src/kernel/structures/_Methodref.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _Methodref implements StructureInterface { diff --git a/src/kernel/structures/_NameAndType.php b/src/kernel/structures/_NameAndType.php index 1b5400ce..8516edb1 100644 --- a/src/kernel/structures/_NameAndType.php +++ b/src/kernel/structures/_NameAndType.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _NameAndType implements StructureInterface { diff --git a/src/kernel/structures/_NullVariableInfo.php b/src/kernel/structures/_NullVariableInfo.php index 3827c19e..89318c45 100644 --- a/src/kernel/structures/_NullVariableInfo.php +++ b/src/kernel/structures/_NullVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _NullVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_ObjectVariableInfo.php b/src/kernel/structures/_ObjectVariableInfo.php index 54b8b433..4b0f6135 100644 --- a/src/kernel/structures/_ObjectVariableInfo.php +++ b/src/kernel/structures/_ObjectVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _ObjectVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_SameFrame.php b/src/kernel/structures/_SameFrame.php index 68ef2833..e8b8bea5 100644 --- a/src/kernel/structures/_SameFrame.php +++ b/src/kernel/structures/_SameFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _SameFrame implements StructureInterface { diff --git a/src/kernel/structures/_SameFrameExtended.php b/src/kernel/structures/_SameFrameExtended.php index b184adc6..1e17b937 100644 --- a/src/kernel/structures/_SameFrameExtended.php +++ b/src/kernel/structures/_SameFrameExtended.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _SameFrameExtended implements StructureInterface { diff --git a/src/kernel/structures/_SameLocals1StackItemFrame.php b/src/kernel/structures/_SameLocals1StackItemFrame.php index 87f46c52..394f5ffb 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrame.php +++ b/src/kernel/structures/_SameLocals1StackItemFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _SameLocals1StackItemFrame implements StructureInterface { diff --git a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php index 58504e34..2a97e98b 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php +++ b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _SameLocals1StackItemFrameExtended implements StructureInterface { diff --git a/src/kernel/structures/_StackMapFrame.php b/src/kernel/structures/_StackMapFrame.php index c26e9da7..71df30a5 100644 --- a/src/kernel/structures/_StackMapFrame.php +++ b/src/kernel/structures/_StackMapFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _StackMapFrame implements StructureInterface { diff --git a/src/kernel/structures/_String.php b/src/kernel/structures/_String.php index 00f0a8f2..cd6ae51c 100644 --- a/src/kernel/structures/_String.php +++ b/src/kernel/structures/_String.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _String implements StructureInterface { diff --git a/src/kernel/structures/_TopVariableInfo.php b/src/kernel/structures/_TopVariableInfo.php index 445db58f..c1701ea8 100644 --- a/src/kernel/structures/_TopVariableInfo.php +++ b/src/kernel/structures/_TopVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _TopVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_UninitializedThisVariableInfo.php b/src/kernel/structures/_UninitializedThisVariableInfo.php index bdd4aa38..25140ef6 100644 --- a/src/kernel/structures/_UninitializedThisVariableInfo.php +++ b/src/kernel/structures/_UninitializedThisVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _UninitializedThisVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_UninitializedVariableInfo.php b/src/kernel/structures/_UninitializedVariableInfo.php index b97b6894..16ec6670 100644 --- a/src/kernel/structures/_UninitializedVariableInfo.php +++ b/src/kernel/structures/_UninitializedVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _UninitializedVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_Utf8.php b/src/kernel/structures/_Utf8.php index cc9c8462..40866399 100644 --- a/src/kernel/structures/_Utf8.php +++ b/src/kernel/structures/_Utf8.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _Utf8 implements StructureInterface { diff --git a/src/kernel/structures/_VerificationTypeInfo.php b/src/kernel/structures/_VerificationTypeInfo.php index 4ff8850b..e1bdcab1 100644 --- a/src/kernel/structures/_VerificationTypeInfo.php +++ b/src/kernel/structures/_VerificationTypeInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Kernel\Utilities\BinaryTool; +use \PHPJava\Utilities\BinaryTool; class _VerificationTypeInfo implements StructureInterface { diff --git a/src/utilities/BinaryTool.php b/src/utilities/BinaryTool.php index 371212a2..7813c642 100644 --- a/src/utilities/BinaryTool.php +++ b/src/utilities/BinaryTool.php @@ -1,6 +1,249 @@ = 0 && $bits[$index] === '1'; $index--) { + + // nop + } + + if ($index === -1) { + throw new BinaryToolsException('Passed parameter was overflow'); + } + + $bits[$index] = '1'; + + for ($i = $index + 1; $i < $bitSize; $i++) { + $bits[$i] = '0'; + } + + + return $bits; + } + + final public static function toSigned($value, $bytes) + { + $convert = base_convert((string) $value, 10, 2); + $bitSize = strlen($convert); + + if ($bitSize < ($bytes * 8) || $convert[0] !== '1') { + return $value; + } + + return '-' . base_convert(self::addOneBit(self::reverseBits($convert)), 2, 10); + } + + final public static function negate($value, $bytes) + { + $value = base_convert((string) $value, 10, 2); + + if (sprintf('%0' . $bytes . 's', $value) === str_repeat('0', $bytes)) { + + // zero number was overflow + return '0'; + } + + $convert = self::addOneBit(self::reverseBits($value)); + + if ($convert[0] === '1') { + $convert = '-' . base_convert($convert, 2, 10); + } else { + $convert = base_convert($convert, 2, 10); + } + + return $convert; + } + + final public static function multiply($value1, $value2, $bytes) + { + if (function_exists('gmp_mul')) { + $a = gmp_init($value1); + $b = gmp_init($value2); + + return gmp_strval(gmp_mul($a, $b)); + } elseif (function_exists('bcmul')) { + return bcmul($value1, $value2); + } else { + throw new BinaryToolsException('Cannot multiply values.'); + } + } + + final public static function add($value1, $value2, $bytes) + { + if (function_exists('gmp_add')) { + $a = gmp_init($value1); + $b = gmp_init($value2); + + return gmp_strval(gmp_add($a, $b)); + } elseif (function_exists('bcadd')) { + return bcadd($value1, $value2); + } else { + throw new BinaryToolsException('Cannot add values.'); + } + } + + final public static function sub($value1, $value2, $bytes) + { + if (function_exists('gmp_sub')) { + $a = gmp_init($value1); + $b = gmp_init($value2); + + return gmp_strval(gmp_sub($a, $b)); + } elseif (function_exists('bcsub')) { + return bcsub($value1, $value2); + } else { + throw new BinaryToolsException('Cannot sub values.'); + } + } + + final public static function div($value1, $value2, $bytes) + { + if (function_exists('gmp_div')) { + $a = gmp_init($value1); + $b = gmp_init($value2); + + return gmp_strval(gmp_div($a, $b)); + } elseif (function_exists('bcdiv')) { + return bcdiv($value1, $value2); + } else { + throw new BinaryToolsException('Cannot div values.'); + } + } + + final public static function shiftLeft($value1, $value2, $bytes) + { + $bits = base_convert($value1, 10, 2); + + $bits = sprintf('%0' . ($bytes * 8) . 's', $bits . str_repeat('0', $value2)); + + return base_convert($bits, 2, 10); + } + + final public static function unsignedShiftRight($value1, $value2, $bytes) + { + $bits = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); + + $bits = sprintf('%0' . ($bytes * 8) . 's', substr($bits, 0, strlen($bits) - $value1)); + + if ($bits === '') { + $bits = '0'; + } + + return base_convert($bits, 2, 10); + } + + final public static function shiftRight($value1, $value2, $bytes) + { + return self::toSigned(self::unsignedShiftRight($value1, $value2, $bytes), $bytes); + } + + final public static function orBits($value1, $value2, $bytes) + { + $value1 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value1, 10, 2)); + $value2 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); + + $build = ''; + for ($i = 0; $i < $bytes * 8; $i++) { + if ($value1[$i] === '1' || $value2[$i] == '1') { + $build .= '1'; + } else { + $build .= '0'; + } + } + + return base_convert($build, 2, 10); + } + + final public static function xorBits($value1, $value2, $bytes) + { + $value1 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value1, 10, 2)); + $value2 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); + + $build = ''; + for ($i = 0; $i < $bytes * 8; $i++) { + if (($value1[$i] === '1' && $value2[$i] === '0') || + ($value1[$i] === '0' && $value2[$i] === '1')) { + $build .= '1'; + } else { + $build .= '0'; + } + } + + return base_convert($build, 2, 10); + } + + final public static function andBits($value1, $value2, $bytes) + { + $value1 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value1, 10, 2)); + $value2 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); + + $build = ''; + for ($i = 0; $i < $bytes * 8; $i++) { + if ($value1[$i] === '1' && $value2[$i] === '1') { + $build .= '1'; + } else { + $build .= '0'; + } + } + + return base_convert($build, 2, 10); + } + + final public static function convertDoubleToIEEE754($doubleValue, $rounded = 8) + { + $doubleValue = sprintf('%063s', base_convert($doubleValue, 10, 2)); + + $sign = $doubleValue[0]; + $exponent = substr($doubleValue, 1, 10); + $fraction = substr($doubleValue, 11); + + // double scale + $scale = 52; + + $fractionData = 0; + for ($i = 0; $i < 52; $i++) { + $fractionData = bcadd($fractionData, bcmul($fraction[$i], bcpow(2, -1 * ($i + 1), $scale), $scale), $scale); + } + + // calc sign + $operand1 = -1 * $sign; + + // calc fraction + $operand2 = bcadd(1, $fractionData, $scale); + + // calc exponent and bias(?) + $operand3 = bcpow(2, bindec($exponent), $scale); + + return bcmul(-2, bcmul(bcmul($operand1, $operand2, $scale), $operand3, $scale), $rounded); + } } diff --git a/tools/Test.class b/tools/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..7e24ece7e763441059dcbc29ed2114a3263c6a53 GIT binary patch literal 1852 zcmaJ>TT@$A6#h0j$vK>aLJx#XAv9Imh9FHpa-551;Pk`51gH4Mpp zSi>0&Z4!=XxGeW8Iz}<3VO;88)i9x9Qp%^Kr)d>4I$EUtI~ry+gjLK5h&!C)oXebJ zoDl(IV#QoHL$(>e6$+*W=fu0_c&uW4I4#g{ zl!8l{m>soJWQfk*$4$9>AV7MTU@`{}A|QuO>9fy+GdN4t5CuUwq;^#LXH=~v*HanW zo=L>wX)86dv1}#Nu>`p@_U}L5fAGcr{oVchkL3FKPXcx0Ov7)jW^6NU`6IXe$&ZqL z0r#k7+X??dB4tMfYD%uBBP-T2nXLVfIvi3gvhjj#`1V@bT4kvd8G7*MDUT&WGwg*l z^(}Li9Z{RR?66osO-d!3X()j)S#Xz`Oj>aU*BL0UU3obRJkx&*?aM4m$67j3481N; zt|(j9`Xpo8Ys}!qoAboEDt?5r&HrqBt~x4mSfRg4yn@cWRfUiLT~xYYI4Abty1ol_ z(mCi;HU@W~`Ld|=DR+u+({WG`ZaPE(DaAvda<>HUmEdPZXy`fgC4D-&6|b@b_czGy z!NWVN`kY=xS^AD4att1DaF-GL<$q3@LwA$YIF?2A!WQZYYx2-dcwEAcf-kR5rN{#+C+|z#AaSgxn zJMcSh3NIp}1yRw4ArVBJk*$ajW9&f^=WxP>#ETo!L#WS{B0flS!DMl`6G8miCf8NOHsmx z${&^3_LA*_%tb`rf8ZT?D(m4SPLs-YHt+_iTt_YL=F(76@f;3O%~#R=?;AMFP~~vf YM4!NI_@AKR=o3)r(@C`+s#V~^KdixwK>z>% literal 0 HcmV?d00001 diff --git a/tools/copy.php b/tools/copy.php index 6cec3283..db200a5e 100644 --- a/tools/copy.php +++ b/tools/copy.php @@ -6,7 +6,7 @@ $a = str_replace("throw new Exception(__CLASS__ . ' hasnot statement.');\n", 'throw new NotImplementedException(__CLASS__);', $a); $a = str_replace('public function execute () {' . "\n", "public function execute(): void\n {", $a); $a = str_replace('extends {', "implements MnemonicInterface\n{\n use \\PHPJava\\Kernel\\Core\\Accumulator;", $a); - $a = str_replace('Class', '$this->getCurrentClass()', $a); $a = str_replace('BinaryTools::', 'BinaryTool::', $a); $a = str_replace('getJavaBinaryStream()->', '', $a); diff --git a/tools/copy_strt.php b/tools/copy_strt.php index 8bebf297..33273689 100644 --- a/tools/copy_strt.php +++ b/tools/copy_strt.php @@ -11,7 +11,7 @@ $a = str_replace('public function __construct (&$this->getClass()) {', "public function execute(): void\n {", $a); $a = str_replace('parent::__construct($this->getClass());', '', $a); $a = preg_replace("/\s*[\\n]+/", "\n", $a); - $a = str_replace('getClass()->read', '$this->read', $a); var_dump($class, $a); diff --git a/tools/test.php b/tools/test.php new file mode 100644 index 00000000..c34e919f --- /dev/null +++ b/tools/test.php @@ -0,0 +1,8 @@ + Date: Sat, 23 Feb 2019 16:46:35 +0900 Subject: [PATCH 15/96] WIP commit --- src/core/JavaClass.php | 11 ++- src/core/jvm/ConstantPool.php | 66 ++++++++++++++++++ src/exceptions/ReadEntryException.php | 6 ++ src/kernel/core/BinaryReader.php | 69 ++++++++++++++++++- src/kernel/maps/ClassConstant.php | 17 ----- src/kernel/maps/ConstantPoolTag.php | 23 +++++++ src/kernel/maps/{Mnemonic.php => OpCode.php} | 2 +- src/kernel/mnemonics/MnemonicInterface.php | 8 --- src/kernel/opcode/OpCodeInterface.php | 8 +++ src/kernel/{mnemonics => opcode}/_aaload.php | 12 ++-- src/kernel/{mnemonics => opcode}/_aastore.php | 10 +-- .../{mnemonics => opcode}/_aconst_null.php | 8 ++- src/kernel/{mnemonics => opcode}/_aload.php | 6 +- src/kernel/{mnemonics => opcode}/_aload_0.php | 10 +-- src/kernel/{mnemonics => opcode}/_aload_1.php | 11 +-- src/kernel/{mnemonics => opcode}/_aload_2.php | 8 ++- src/kernel/{mnemonics => opcode}/_aload_3.php | 8 ++- .../{mnemonics => opcode}/_anewarray.php | 10 +-- src/kernel/{mnemonics => opcode}/_areturn.php | 10 +-- .../{mnemonics => opcode}/_arraylength.php | 10 +-- src/kernel/{mnemonics => opcode}/_astore.php | 10 +-- .../{mnemonics => opcode}/_astore_0.php | 10 +-- .../{mnemonics => opcode}/_astore_1.php | 10 +-- .../{mnemonics => opcode}/_astore_2.php | 10 +-- .../{mnemonics => opcode}/_astore_3.php | 10 +-- src/kernel/{mnemonics => opcode}/_athrow.php | 10 ++- src/kernel/{mnemonics => opcode}/_baload.php | 9 +-- src/kernel/{mnemonics => opcode}/_bastore.php | 9 +-- src/kernel/{mnemonics => opcode}/_bipush.php | 6 +- .../{mnemonics => opcode}/_breakpoint.php | 9 +-- src/kernel/{mnemonics => opcode}/_caload.php | 9 +-- src/kernel/{mnemonics => opcode}/_castore.php | 9 +-- .../{mnemonics => opcode}/_checkcast.php | 9 +-- src/kernel/{mnemonics => opcode}/_d2f.php | 9 +-- src/kernel/{mnemonics => opcode}/_d2i.php | 9 +-- src/kernel/{mnemonics => opcode}/_d2l.php | 9 +-- src/kernel/{mnemonics => opcode}/_dadd.php | 10 +-- src/kernel/{mnemonics => opcode}/_daload.php | 10 +-- src/kernel/{mnemonics => opcode}/_dastore.php | 12 ++-- src/kernel/{mnemonics => opcode}/_dcmpg.php | 9 +-- src/kernel/{mnemonics => opcode}/_dcmpl.php | 9 +-- .../{mnemonics => opcode}/_dconst_0.php | 10 +-- .../{mnemonics => opcode}/_dconst_1.php | 8 ++- src/kernel/{mnemonics => opcode}/_ddiv.php | 9 +-- src/kernel/{mnemonics => opcode}/_dload.php | 10 +-- src/kernel/{mnemonics => opcode}/_dload_0.php | 9 +-- src/kernel/{mnemonics => opcode}/_dload_1.php | 9 +-- src/kernel/{mnemonics => opcode}/_dload_2.php | 9 +-- src/kernel/{mnemonics => opcode}/_dload_3.php | 9 +-- src/kernel/{mnemonics => opcode}/_dmul.php | 12 ++-- src/kernel/{mnemonics => opcode}/_dneg.php | 9 +-- src/kernel/{mnemonics => opcode}/_drem.php | 9 +-- src/kernel/{mnemonics => opcode}/_dreturn.php | 10 +-- src/kernel/{mnemonics => opcode}/_dstore.php | 10 +-- .../{mnemonics => opcode}/_dstore_0.php | 10 +-- .../{mnemonics => opcode}/_dstore_1.php | 10 +-- .../{mnemonics => opcode}/_dstore_2.php | 10 +-- .../{mnemonics => opcode}/_dstore_3.php | 8 ++- src/kernel/{mnemonics => opcode}/_dsub.php | 10 +-- src/kernel/{mnemonics => opcode}/_dup.php | 10 +-- src/kernel/{mnemonics => opcode}/_dup2.php | 9 +-- src/kernel/{mnemonics => opcode}/_dup2_x1.php | 9 +-- src/kernel/{mnemonics => opcode}/_dup2_x2.php | 9 +-- src/kernel/{mnemonics => opcode}/_dup_x1.php | 9 +-- src/kernel/{mnemonics => opcode}/_dup_x2.php | 9 +-- src/kernel/{mnemonics => opcode}/_f2d.php | 9 +-- src/kernel/{mnemonics => opcode}/_f2i.php | 9 +-- src/kernel/{mnemonics => opcode}/_f2l.php | 9 +-- src/kernel/{mnemonics => opcode}/_fadd.php | 9 +-- src/kernel/{mnemonics => opcode}/_faload.php | 9 +-- src/kernel/{mnemonics => opcode}/_fastore.php | 9 +-- src/kernel/{mnemonics => opcode}/_fcmpg.php | 9 +-- src/kernel/{mnemonics => opcode}/_fcmpl.php | 9 +-- .../{mnemonics => opcode}/_fconst_0.php | 9 +-- .../{mnemonics => opcode}/_fconst_1.php | 9 +-- .../{mnemonics => opcode}/_fconst_2.php | 9 +-- src/kernel/{mnemonics => opcode}/_fdiv.php | 9 +-- src/kernel/{mnemonics => opcode}/_fload.php | 9 +-- src/kernel/{mnemonics => opcode}/_fload_0.php | 9 +-- src/kernel/{mnemonics => opcode}/_fload_1.php | 9 +-- src/kernel/{mnemonics => opcode}/_fload_2.php | 9 +-- src/kernel/{mnemonics => opcode}/_fload_3.php | 9 +-- src/kernel/{mnemonics => opcode}/_fmul.php | 9 +-- src/kernel/{mnemonics => opcode}/_fneg.php | 9 +-- src/kernel/{mnemonics => opcode}/_frem.php | 9 +-- src/kernel/{mnemonics => opcode}/_freturn.php | 8 ++- src/kernel/{mnemonics => opcode}/_fstore.php | 9 +-- .../{mnemonics => opcode}/_fstore_0.php | 9 +-- .../{mnemonics => opcode}/_fstore_1.php | 9 +-- .../{mnemonics => opcode}/_fstore_2.php | 9 +-- .../{mnemonics => opcode}/_fstore_3.php | 9 +-- src/kernel/{mnemonics => opcode}/_fsub.php | 9 +-- .../{mnemonics => opcode}/_getfield.php | 10 ++- .../{mnemonics => opcode}/_getstatic.php | 14 +++- src/kernel/{mnemonics => opcode}/_goto.php | 8 ++- src/kernel/{mnemonics => opcode}/_goto_w.php | 9 +-- src/kernel/{mnemonics => opcode}/_i2b.php | 9 +-- src/kernel/{mnemonics => opcode}/_i2c.php | 9 +-- src/kernel/{mnemonics => opcode}/_i2d.php | 9 +-- src/kernel/{mnemonics => opcode}/_i2f.php | 9 +-- src/kernel/{mnemonics => opcode}/_i2l.php | 9 +-- src/kernel/{mnemonics => opcode}/_i2s.php | 6 +- src/kernel/{mnemonics => opcode}/_iadd.php | 6 +- src/kernel/{mnemonics => opcode}/_iaload.php | 10 +-- src/kernel/{mnemonics => opcode}/_iand.php | 6 +- src/kernel/{mnemonics => opcode}/_iastore.php | 10 +-- .../{mnemonics => opcode}/_iconst_0.php | 10 +-- .../{mnemonics => opcode}/_iconst_1.php | 10 +-- .../{mnemonics => opcode}/_iconst_2.php | 10 +-- .../{mnemonics => opcode}/_iconst_3.php | 10 +-- .../{mnemonics => opcode}/_iconst_4.php | 10 +-- .../{mnemonics => opcode}/_iconst_5.php | 10 +-- .../{mnemonics => opcode}/_iconst_m1.php | 10 +-- src/kernel/{mnemonics => opcode}/_idiv.php | 9 +-- .../{mnemonics => opcode}/_if_acmpeq.php | 12 ++-- .../{mnemonics => opcode}/_if_acmpne.php | 12 ++-- .../{mnemonics => opcode}/_if_icmpeq.php | 9 +-- .../{mnemonics => opcode}/_if_icmpge.php | 13 ++-- .../{mnemonics => opcode}/_if_icmpgt.php | 11 ++- .../{mnemonics => opcode}/_if_icmple.php | 9 +-- .../{mnemonics => opcode}/_if_icmplt.php | 11 +-- .../{mnemonics => opcode}/_if_icmpne.php | 12 ++-- src/kernel/{mnemonics => opcode}/_ifeq.php | 13 ++-- src/kernel/{mnemonics => opcode}/_ifge.php | 9 +-- src/kernel/{mnemonics => opcode}/_ifgt.php | 9 +-- src/kernel/{mnemonics => opcode}/_ifle.php | 9 +-- src/kernel/{mnemonics => opcode}/_iflt.php | 9 +-- src/kernel/{mnemonics => opcode}/_ifne.php | 10 ++- .../{mnemonics => opcode}/_ifnonnull.php | 9 +-- src/kernel/{mnemonics => opcode}/_ifnull.php | 9 +-- src/kernel/{mnemonics => opcode}/_iinc.php | 10 +-- src/kernel/{mnemonics => opcode}/_iload.php | 8 ++- src/kernel/{mnemonics => opcode}/_iload_0.php | 8 ++- src/kernel/{mnemonics => opcode}/_iload_1.php | 8 ++- src/kernel/{mnemonics => opcode}/_iload_2.php | 10 +-- src/kernel/{mnemonics => opcode}/_iload_3.php | 8 ++- src/kernel/{mnemonics => opcode}/_impdep1.php | 9 +-- src/kernel/{mnemonics => opcode}/_impdep2.php | 9 +-- src/kernel/{mnemonics => opcode}/_imul.php | 6 +- src/kernel/{mnemonics => opcode}/_ineg.php | 6 +- .../{mnemonics => opcode}/_instanceof.php | 9 +-- .../{mnemonics => opcode}/_invokedynamic.php | 9 +-- .../_invokeinterface.php | 9 +-- .../{mnemonics => opcode}/_invokespecial.php | 13 ++-- .../{mnemonics => opcode}/_invokestatic.php | 14 ++-- .../{mnemonics => opcode}/_invokevirtual.php | 15 +++- src/kernel/{mnemonics => opcode}/_ior.php | 6 +- src/kernel/{mnemonics => opcode}/_irem.php | 9 +-- src/kernel/{mnemonics => opcode}/_ireturn.php | 10 +-- src/kernel/{mnemonics => opcode}/_ishl.php | 6 +- src/kernel/{mnemonics => opcode}/_ishr.php | 7 +- src/kernel/{mnemonics => opcode}/_istore.php | 8 ++- .../{mnemonics => opcode}/_istore_0.php | 10 +-- .../{mnemonics => opcode}/_istore_1.php | 10 +-- .../{mnemonics => opcode}/_istore_2.php | 10 +-- .../{mnemonics => opcode}/_istore_3.php | 10 +-- src/kernel/{mnemonics => opcode}/_isub.php | 6 +- src/kernel/{mnemonics => opcode}/_iushr.php | 6 +- src/kernel/{mnemonics => opcode}/_ixor.php | 6 +- src/kernel/{mnemonics => opcode}/_jsr.php | 9 +-- src/kernel/{mnemonics => opcode}/_jsr_w.php | 9 +-- src/kernel/{mnemonics => opcode}/_l2d.php | 9 +-- src/kernel/{mnemonics => opcode}/_l2f.php | 9 +-- src/kernel/{mnemonics => opcode}/_l2i.php | 9 +-- src/kernel/{mnemonics => opcode}/_ladd.php | 6 +- src/kernel/{mnemonics => opcode}/_laload.php | 10 +-- src/kernel/{mnemonics => opcode}/_land.php | 6 +- src/kernel/{mnemonics => opcode}/_lastore.php | 12 ++-- src/kernel/{mnemonics => opcode}/_lcmp.php | 9 +-- .../{mnemonics => opcode}/_lconst_0.php | 6 +- .../{mnemonics => opcode}/_lconst_1.php | 6 +- src/kernel/{mnemonics => opcode}/_ldc.php | 15 +++- src/kernel/{mnemonics => opcode}/_ldc2_w.php | 12 ++-- src/kernel/{mnemonics => opcode}/_ldc_w.php | 9 +-- src/kernel/{mnemonics => opcode}/_ldiv.php | 9 +-- src/kernel/{mnemonics => opcode}/_lload.php | 6 +- src/kernel/{mnemonics => opcode}/_lload_0.php | 9 +-- src/kernel/{mnemonics => opcode}/_lload_1.php | 9 +-- src/kernel/{mnemonics => opcode}/_lload_2.php | 9 +-- src/kernel/{mnemonics => opcode}/_lload_3.php | 9 +-- src/kernel/{mnemonics => opcode}/_lmul.php | 6 +- src/kernel/{mnemonics => opcode}/_lneg.php | 9 +-- .../{mnemonics => opcode}/_lookupswitch.php | 9 ++- src/kernel/{mnemonics => opcode}/_lor.php | 6 +- src/kernel/{mnemonics => opcode}/_lrem.php | 9 +-- src/kernel/{mnemonics => opcode}/_lreturn.php | 10 +-- src/kernel/{mnemonics => opcode}/_lshl.php | 6 +- src/kernel/{mnemonics => opcode}/_lshr.php | 6 +- src/kernel/{mnemonics => opcode}/_lstore.php | 6 +- .../{mnemonics => opcode}/_lstore_0.php | 9 +-- .../{mnemonics => opcode}/_lstore_1.php | 9 +-- .../{mnemonics => opcode}/_lstore_2.php | 9 +-- .../{mnemonics => opcode}/_lstore_3.php | 9 +-- src/kernel/{mnemonics => opcode}/_lsub.php | 6 +- src/kernel/{mnemonics => opcode}/_lushr.php | 6 +- src/kernel/{mnemonics => opcode}/_lxor.php | 9 +-- .../{mnemonics => opcode}/_monitorenter.php | 9 +-- .../{mnemonics => opcode}/_monitorexit.php | 9 +-- .../{mnemonics => opcode}/_multianewarray.php | 9 +-- src/kernel/{mnemonics => opcode}/_new.php | 21 +++++- .../{mnemonics => opcode}/_newarray.php | 11 +-- src/kernel/{mnemonics => opcode}/_nop.php | 8 ++- src/kernel/{mnemonics => opcode}/_pop.php | 6 +- src/kernel/{mnemonics => opcode}/_pop2.php | 9 +-- .../{mnemonics => opcode}/_putfield.php | 9 +-- .../{mnemonics => opcode}/_putstatic.php | 10 +-- src/kernel/{mnemonics => opcode}/_ret.php | 9 +-- src/kernel/{mnemonics => opcode}/_return.php | 10 +-- src/kernel/{mnemonics => opcode}/_saload.php | 9 +-- src/kernel/{mnemonics => opcode}/_sastore.php | 9 +-- src/kernel/{mnemonics => opcode}/_sipush.php | 6 +- src/kernel/{mnemonics => opcode}/_swap.php | 9 +-- .../{mnemonics => opcode}/_tableswitch.php | 9 ++- src/kernel/{mnemonics => opcode}/_wide.php | 9 +-- src/kernel/structures/_Methodref.php | 2 +- tools/copy.php | 6 +- 216 files changed, 1319 insertions(+), 773 deletions(-) create mode 100644 src/exceptions/ReadEntryException.php delete mode 100644 src/kernel/maps/ClassConstant.php create mode 100644 src/kernel/maps/ConstantPoolTag.php rename src/kernel/maps/{Mnemonic.php => OpCode.php} (99%) delete mode 100644 src/kernel/mnemonics/MnemonicInterface.php create mode 100644 src/kernel/opcode/OpCodeInterface.php rename src/kernel/{mnemonics => opcode}/_aaload.php (82%) rename src/kernel/{mnemonics => opcode}/_aastore.php (72%) rename src/kernel/{mnemonics => opcode}/_aconst_null.php (73%) rename src/kernel/{mnemonics => opcode}/_aload.php (82%) rename src/kernel/{mnemonics => opcode}/_aload_0.php (73%) rename src/kernel/{mnemonics => opcode}/_aload_1.php (74%) rename src/kernel/{mnemonics => opcode}/_aload_2.php (76%) rename src/kernel/{mnemonics => opcode}/_aload_3.php (76%) rename src/kernel/{mnemonics => opcode}/_anewarray.php (87%) rename src/kernel/{mnemonics => opcode}/_areturn.php (71%) rename src/kernel/{mnemonics => opcode}/_arraylength.php (72%) rename src/kernel/{mnemonics => opcode}/_astore.php (75%) rename src/kernel/{mnemonics => opcode}/_astore_0.php (70%) rename src/kernel/{mnemonics => opcode}/_astore_1.php (70%) rename src/kernel/{mnemonics => opcode}/_astore_2.php (68%) rename src/kernel/{mnemonics => opcode}/_astore_3.php (70%) rename src/kernel/{mnemonics => opcode}/_athrow.php (90%) rename src/kernel/{mnemonics => opcode}/_baload.php (70%) rename src/kernel/{mnemonics => opcode}/_bastore.php (70%) rename src/kernel/{mnemonics => opcode}/_bipush.php (74%) rename src/kernel/{mnemonics => opcode}/_breakpoint.php (69%) rename src/kernel/{mnemonics => opcode}/_caload.php (70%) rename src/kernel/{mnemonics => opcode}/_castore.php (70%) rename src/kernel/{mnemonics => opcode}/_checkcast.php (70%) rename src/kernel/{mnemonics => opcode}/_d2f.php (71%) rename src/kernel/{mnemonics => opcode}/_d2i.php (71%) rename src/kernel/{mnemonics => opcode}/_d2l.php (71%) rename src/kernel/{mnemonics => opcode}/_dadd.php (75%) rename src/kernel/{mnemonics => opcode}/_daload.php (78%) rename src/kernel/{mnemonics => opcode}/_dastore.php (70%) rename src/kernel/{mnemonics => opcode}/_dcmpg.php (71%) rename src/kernel/{mnemonics => opcode}/_dcmpl.php (71%) rename src/kernel/{mnemonics => opcode}/_dconst_0.php (66%) rename src/kernel/{mnemonics => opcode}/_dconst_1.php (68%) rename src/kernel/{mnemonics => opcode}/_ddiv.php (71%) rename src/kernel/{mnemonics => opcode}/_dload.php (79%) rename src/kernel/{mnemonics => opcode}/_dload_0.php (70%) rename src/kernel/{mnemonics => opcode}/_dload_1.php (70%) rename src/kernel/{mnemonics => opcode}/_dload_2.php (70%) rename src/kernel/{mnemonics => opcode}/_dload_3.php (70%) rename src/kernel/{mnemonics => opcode}/_dmul.php (72%) rename src/kernel/{mnemonics => opcode}/_dneg.php (71%) rename src/kernel/{mnemonics => opcode}/_drem.php (71%) rename src/kernel/{mnemonics => opcode}/_dreturn.php (70%) rename src/kernel/{mnemonics => opcode}/_dstore.php (80%) rename src/kernel/{mnemonics => opcode}/_dstore_0.php (70%) rename src/kernel/{mnemonics => opcode}/_dstore_1.php (70%) rename src/kernel/{mnemonics => opcode}/_dstore_2.php (70%) rename src/kernel/{mnemonics => opcode}/_dstore_3.php (72%) rename src/kernel/{mnemonics => opcode}/_dsub.php (77%) rename src/kernel/{mnemonics => opcode}/_dup.php (68%) rename src/kernel/{mnemonics => opcode}/_dup2.php (71%) rename src/kernel/{mnemonics => opcode}/_dup2_x1.php (70%) rename src/kernel/{mnemonics => opcode}/_dup2_x2.php (70%) rename src/kernel/{mnemonics => opcode}/_dup_x1.php (70%) rename src/kernel/{mnemonics => opcode}/_dup_x2.php (70%) rename src/kernel/{mnemonics => opcode}/_f2d.php (71%) rename src/kernel/{mnemonics => opcode}/_f2i.php (71%) rename src/kernel/{mnemonics => opcode}/_f2l.php (71%) rename src/kernel/{mnemonics => opcode}/_fadd.php (71%) rename src/kernel/{mnemonics => opcode}/_faload.php (70%) rename src/kernel/{mnemonics => opcode}/_fastore.php (70%) rename src/kernel/{mnemonics => opcode}/_fcmpg.php (71%) rename src/kernel/{mnemonics => opcode}/_fcmpl.php (71%) rename src/kernel/{mnemonics => opcode}/_fconst_0.php (70%) rename src/kernel/{mnemonics => opcode}/_fconst_1.php (70%) rename src/kernel/{mnemonics => opcode}/_fconst_2.php (70%) rename src/kernel/{mnemonics => opcode}/_fdiv.php (71%) rename src/kernel/{mnemonics => opcode}/_fload.php (71%) rename src/kernel/{mnemonics => opcode}/_fload_0.php (70%) rename src/kernel/{mnemonics => opcode}/_fload_1.php (70%) rename src/kernel/{mnemonics => opcode}/_fload_2.php (70%) rename src/kernel/{mnemonics => opcode}/_fload_3.php (70%) rename src/kernel/{mnemonics => opcode}/_fmul.php (71%) rename src/kernel/{mnemonics => opcode}/_fneg.php (71%) rename src/kernel/{mnemonics => opcode}/_frem.php (71%) rename src/kernel/{mnemonics => opcode}/_freturn.php (73%) rename src/kernel/{mnemonics => opcode}/_fstore.php (70%) rename src/kernel/{mnemonics => opcode}/_fstore_0.php (70%) rename src/kernel/{mnemonics => opcode}/_fstore_1.php (70%) rename src/kernel/{mnemonics => opcode}/_fstore_2.php (70%) rename src/kernel/{mnemonics => opcode}/_fstore_3.php (70%) rename src/kernel/{mnemonics => opcode}/_fsub.php (71%) rename src/kernel/{mnemonics => opcode}/_getfield.php (88%) rename src/kernel/{mnemonics => opcode}/_getstatic.php (91%) rename src/kernel/{mnemonics => opcode}/_goto.php (79%) rename src/kernel/{mnemonics => opcode}/_goto_w.php (70%) rename src/kernel/{mnemonics => opcode}/_i2b.php (71%) rename src/kernel/{mnemonics => opcode}/_i2c.php (71%) rename src/kernel/{mnemonics => opcode}/_i2d.php (71%) rename src/kernel/{mnemonics => opcode}/_i2f.php (71%) rename src/kernel/{mnemonics => opcode}/_i2l.php (71%) rename src/kernel/{mnemonics => opcode}/_i2s.php (80%) rename src/kernel/{mnemonics => opcode}/_iadd.php (80%) rename src/kernel/{mnemonics => opcode}/_iaload.php (76%) rename src/kernel/{mnemonics => opcode}/_iand.php (79%) rename src/kernel/{mnemonics => opcode}/_iastore.php (75%) rename src/kernel/{mnemonics => opcode}/_iconst_0.php (67%) rename src/kernel/{mnemonics => opcode}/_iconst_1.php (67%) rename src/kernel/{mnemonics => opcode}/_iconst_2.php (66%) rename src/kernel/{mnemonics => opcode}/_iconst_3.php (67%) rename src/kernel/{mnemonics => opcode}/_iconst_4.php (67%) rename src/kernel/{mnemonics => opcode}/_iconst_5.php (67%) rename src/kernel/{mnemonics => opcode}/_iconst_m1.php (67%) rename src/kernel/{mnemonics => opcode}/_idiv.php (71%) rename src/kernel/{mnemonics => opcode}/_if_acmpeq.php (81%) rename src/kernel/{mnemonics => opcode}/_if_acmpne.php (81%) rename src/kernel/{mnemonics => opcode}/_if_icmpeq.php (70%) rename src/kernel/{mnemonics => opcode}/_if_icmpge.php (81%) rename src/kernel/{mnemonics => opcode}/_if_icmpgt.php (83%) rename src/kernel/{mnemonics => opcode}/_if_icmple.php (70%) rename src/kernel/{mnemonics => opcode}/_if_icmplt.php (82%) rename src/kernel/{mnemonics => opcode}/_if_icmpne.php (81%) rename src/kernel/{mnemonics => opcode}/_ifeq.php (80%) rename src/kernel/{mnemonics => opcode}/_ifge.php (71%) rename src/kernel/{mnemonics => opcode}/_ifgt.php (71%) rename src/kernel/{mnemonics => opcode}/_ifle.php (71%) rename src/kernel/{mnemonics => opcode}/_iflt.php (71%) rename src/kernel/{mnemonics => opcode}/_ifne.php (81%) rename src/kernel/{mnemonics => opcode}/_ifnonnull.php (70%) rename src/kernel/{mnemonics => opcode}/_ifnull.php (70%) rename src/kernel/{mnemonics => opcode}/_iinc.php (79%) rename src/kernel/{mnemonics => opcode}/_iload.php (76%) rename src/kernel/{mnemonics => opcode}/_iload_0.php (71%) rename src/kernel/{mnemonics => opcode}/_iload_1.php (71%) rename src/kernel/{mnemonics => opcode}/_iload_2.php (68%) rename src/kernel/{mnemonics => opcode}/_iload_3.php (71%) rename src/kernel/{mnemonics => opcode}/_impdep1.php (70%) rename src/kernel/{mnemonics => opcode}/_impdep2.php (70%) rename src/kernel/{mnemonics => opcode}/_imul.php (79%) rename src/kernel/{mnemonics => opcode}/_ineg.php (77%) rename src/kernel/{mnemonics => opcode}/_instanceof.php (69%) rename src/kernel/{mnemonics => opcode}/_invokedynamic.php (69%) rename src/kernel/{mnemonics => opcode}/_invokeinterface.php (68%) rename src/kernel/{mnemonics => opcode}/_invokespecial.php (86%) rename src/kernel/{mnemonics => opcode}/_invokestatic.php (86%) rename src/kernel/{mnemonics => opcode}/_invokevirtual.php (94%) rename src/kernel/{mnemonics => opcode}/_ior.php (80%) rename src/kernel/{mnemonics => opcode}/_irem.php (71%) rename src/kernel/{mnemonics => opcode}/_ireturn.php (74%) rename src/kernel/{mnemonics => opcode}/_ishl.php (80%) rename src/kernel/{mnemonics => opcode}/_ishr.php (80%) rename src/kernel/{mnemonics => opcode}/_istore.php (78%) rename src/kernel/{mnemonics => opcode}/_istore_0.php (68%) rename src/kernel/{mnemonics => opcode}/_istore_1.php (68%) rename src/kernel/{mnemonics => opcode}/_istore_2.php (68%) rename src/kernel/{mnemonics => opcode}/_istore_3.php (68%) rename src/kernel/{mnemonics => opcode}/_isub.php (80%) rename src/kernel/{mnemonics => opcode}/_iushr.php (80%) rename src/kernel/{mnemonics => opcode}/_ixor.php (79%) rename src/kernel/{mnemonics => opcode}/_jsr.php (71%) rename src/kernel/{mnemonics => opcode}/_jsr_w.php (71%) rename src/kernel/{mnemonics => opcode}/_l2d.php (71%) rename src/kernel/{mnemonics => opcode}/_l2f.php (71%) rename src/kernel/{mnemonics => opcode}/_l2i.php (71%) rename src/kernel/{mnemonics => opcode}/_ladd.php (79%) rename src/kernel/{mnemonics => opcode}/_laload.php (76%) rename src/kernel/{mnemonics => opcode}/_land.php (79%) rename src/kernel/{mnemonics => opcode}/_lastore.php (69%) rename src/kernel/{mnemonics => opcode}/_lcmp.php (71%) rename src/kernel/{mnemonics => opcode}/_lconst_0.php (71%) rename src/kernel/{mnemonics => opcode}/_lconst_1.php (71%) rename src/kernel/{mnemonics => opcode}/_ldc.php (82%) rename src/kernel/{mnemonics => opcode}/_ldc2_w.php (65%) rename src/kernel/{mnemonics => opcode}/_ldc_w.php (71%) rename src/kernel/{mnemonics => opcode}/_ldiv.php (71%) rename src/kernel/{mnemonics => opcode}/_lload.php (78%) rename src/kernel/{mnemonics => opcode}/_lload_0.php (70%) rename src/kernel/{mnemonics => opcode}/_lload_1.php (70%) rename src/kernel/{mnemonics => opcode}/_lload_2.php (70%) rename src/kernel/{mnemonics => opcode}/_lload_3.php (70%) rename src/kernel/{mnemonics => opcode}/_lmul.php (79%) rename src/kernel/{mnemonics => opcode}/_lneg.php (71%) rename src/kernel/{mnemonics => opcode}/_lookupswitch.php (91%) rename src/kernel/{mnemonics => opcode}/_lor.php (80%) rename src/kernel/{mnemonics => opcode}/_lrem.php (71%) rename src/kernel/{mnemonics => opcode}/_lreturn.php (70%) rename src/kernel/{mnemonics => opcode}/_lshl.php (80%) rename src/kernel/{mnemonics => opcode}/_lshr.php (80%) rename src/kernel/{mnemonics => opcode}/_lstore.php (77%) rename src/kernel/{mnemonics => opcode}/_lstore_0.php (70%) rename src/kernel/{mnemonics => opcode}/_lstore_1.php (70%) rename src/kernel/{mnemonics => opcode}/_lstore_2.php (70%) rename src/kernel/{mnemonics => opcode}/_lstore_3.php (70%) rename src/kernel/{mnemonics => opcode}/_lsub.php (79%) rename src/kernel/{mnemonics => opcode}/_lushr.php (80%) rename src/kernel/{mnemonics => opcode}/_lxor.php (71%) rename src/kernel/{mnemonics => opcode}/_monitorenter.php (69%) rename src/kernel/{mnemonics => opcode}/_monitorexit.php (69%) rename src/kernel/{mnemonics => opcode}/_multianewarray.php (69%) rename src/kernel/{mnemonics => opcode}/_new.php (97%) rename src/kernel/{mnemonics => opcode}/_newarray.php (79%) rename src/kernel/{mnemonics => opcode}/_nop.php (67%) rename src/kernel/{mnemonics => opcode}/_pop.php (72%) rename src/kernel/{mnemonics => opcode}/_pop2.php (71%) rename src/kernel/{mnemonics => opcode}/_putfield.php (85%) rename src/kernel/{mnemonics => opcode}/_putstatic.php (83%) rename src/kernel/{mnemonics => opcode}/_ret.php (71%) rename src/kernel/{mnemonics => opcode}/_return.php (65%) rename src/kernel/{mnemonics => opcode}/_saload.php (70%) rename src/kernel/{mnemonics => opcode}/_sastore.php (70%) rename src/kernel/{mnemonics => opcode}/_sipush.php (74%) rename src/kernel/{mnemonics => opcode}/_swap.php (71%) rename src/kernel/{mnemonics => opcode}/_tableswitch.php (91%) rename src/kernel/{mnemonics => opcode}/_wide.php (71%) diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index 13933831..b5621c1a 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -1,6 +1,7 @@ null, ]; + + private $constantPool; + public function __construct(JavaClassReader $reader) { // Validate Java file @@ -25,8 +29,11 @@ public function __construct(JavaClassReader $reader) $this->versions['major'] = $reader->getBinaryReader()->readUnsignedShort(); // read constant pool size - $constantPoolSize = $reader->getBinaryReader()->readUnsignedShort(); + $this->constantPool = new ConstantPool( + $reader, + $reader->getBinaryReader()->readUnsignedShort() + ); - var_dump($this->versions['minor'], $this->versions['major']); + var_dump($this->constantPool); } } diff --git a/src/core/jvm/ConstantPool.php b/src/core/jvm/ConstantPool.php index 10a3e5e1..4284131a 100644 --- a/src/core/jvm/ConstantPool.php +++ b/src/core/jvm/ConstantPool.php @@ -1,6 +1,72 @@ reader = $reader; + for ($i = 1; $i < $entries; $i++) { + $this->entries[$i] = $this->readEntry($reader->getBinaryReader()->readUnsignedByte()); + if ($this->entries[$i] instanceof _Long || + $this->entries[$i] instanceof _Double) { + $i++; + } + } + } + + public function getEntries(): array + { + return $this->entries; + } + + private function readEntry($entryTag): StructureInterface + { + switch ($entryTag) { + case ConstantPoolTag::CONSTANT_Class: + return new _Class($this->reader); + case ConstantPoolTag::CONSTANT_Fieldref: + return new _Fieldref($this->reader); + case ConstantPoolTag::CONSTANT_Methodref: + return new _Methodref($this->reader); + case ConstantPoolTag::CONSTANT_String: + return new _String($this->reader); + case ConstantPoolTag::CONSTANT_Integer: + return new _Integer($this->reader); + case ConstantPoolTag::CONSTANT_Float: + return new _Float($this->reader); + case ConstantPoolTag::CONSTANT_Long: + return new _Long($this->reader); + case ConstantPoolTag::CONSTANT_Double: + return new _Double($this->reader); + case ConstantPoolTag::CONSTANT_NameAndType: + return new _NameAndType($this->reader); + case ConstantPoolTag::CONSTANT_Utf8: + return new _Utf8($this->reader); + CASE ConstantPoolTag::CONSTANT_MethodHandle: + CASE ConstantPoolTag::CONSTANT_MethodType: + CASE ConstantPoolTag::CONSTANT_Module: + CASE ConstantPoolTag::CONSTANT_Package: + throw new ReadEntryException('Entry tag ' . sprintf('%x', $entryTag) . ' is not implemented.'); + } + throw new ReadEntryException('Entry tag ' . sprintf('%x', $entryTag) . ' is not defined.'); + } } diff --git a/src/exceptions/ReadEntryException.php b/src/exceptions/ReadEntryException.php new file mode 100644 index 00000000..99ac3f2a --- /dev/null +++ b/src/exceptions/ReadEntryException.php @@ -0,0 +1,6 @@ +binaryReader = $reader->getBinaryReader(); + } + + final public function read($bytes = 1) + { + return $this->binaryReader->read($bytes); + } + + public function readByte() + { + return $this->binaryReader->readByte(); + } + + public function readUnsignedByte() + { + return $this->binaryReader->readUnsignedByte(); + } + + public function readUnsignedInt() + { + return $this->binaryReader->readUnsignedInt(); + } + + public function readUnsignedShort() + { + return $this->binaryReader->readUnsignedShort(); + } + + public function readInt() + { + return $this->binaryReader->readInt(); + } + + public function readShort() + { + return $this->binaryReader->readShort(); + } + + public function readUnsignedLong() + { + return $this->binaryReader->readUnsignedLong(); + } + + public function readLong() + { + return $this->binaryReader->readLong(); + } + + public function seek($bytes) + { + $this->binaryReader->seek($bytes); + } + + public function setOffset($pointer) + { + $this->binaryReader->setOffset($pointer); + } + + public function getOffset() + { + return $this->binaryReader->getOffset(); + } } diff --git a/src/kernel/maps/ClassConstant.php b/src/kernel/maps/ClassConstant.php deleted file mode 100644 index 0e8fb6fb..00000000 --- a/src/kernel/maps/ClassConstant.php +++ /dev/null @@ -1,17 +0,0 @@ -getStack(); $arrayref = $this->getStack(); if (!isset($arrayref[$index])) { + throw new JavaArrayIndexOutOfBoundsException($this->getMethodName() . ': ' . $index . ' of array index'); + } $this->pushStack($arrayref[$index]); + } -} + +} diff --git a/src/kernel/mnemonics/_aastore.php b/src/kernel/opcode/_aastore.php similarity index 72% rename from src/kernel/mnemonics/_aastore.php rename to src/kernel/opcode/_aastore.php index 751e31af..ca1ac9a8 100644 --- a/src/kernel/mnemonics/_aastore.php +++ b/src/kernel/opcode/_aastore.php @@ -1,10 +1,10 @@ getStack(); + $value = $this->getStack(); $index = $this->getStack(); $arrayref = $this->getStack(); $arrayref[$index] = $value; + } -} + +} diff --git a/src/kernel/mnemonics/_aconst_null.php b/src/kernel/opcode/_aconst_null.php similarity index 73% rename from src/kernel/mnemonics/_aconst_null.php rename to src/kernel/opcode/_aconst_null.php index cd9a8218..6ee8cda2 100644 --- a/src/kernel/mnemonics/_aconst_null.php +++ b/src/kernel/opcode/_aconst_null.php @@ -1,10 +1,10 @@ pushStack(null); + } -} + +} diff --git a/src/kernel/mnemonics/_aload.php b/src/kernel/opcode/_aload.php similarity index 82% rename from src/kernel/mnemonics/_aload.php rename to src/kernel/opcode/_aload.php index 932c7544..1f6f156e 100644 --- a/src/kernel/mnemonics/_aload.php +++ b/src/kernel/opcode/_aload.php @@ -1,10 +1,10 @@ getByteCodeStream()->readByte(); $this->pushStack($this->getLocalstorage($index)); + } + } diff --git a/src/kernel/mnemonics/_aload_0.php b/src/kernel/opcode/_aload_0.php similarity index 73% rename from src/kernel/mnemonics/_aload_0.php rename to src/kernel/opcode/_aload_0.php index 0df93fd2..ea153dfa 100644 --- a/src/kernel/mnemonics/_aload_0.php +++ b/src/kernel/opcode/_aload_0.php @@ -1,10 +1,10 @@ pushStack($this->getLocalstorage(0)); + } -} + +} diff --git a/src/kernel/mnemonics/_aload_1.php b/src/kernel/opcode/_aload_1.php similarity index 74% rename from src/kernel/mnemonics/_aload_1.php rename to src/kernel/opcode/_aload_1.php index 87958356..7f27daa5 100644 --- a/src/kernel/mnemonics/_aload_1.php +++ b/src/kernel/opcode/_aload_1.php @@ -1,10 +1,10 @@ pushStack($this->getLocalstorage(1)); + + } -} + +} diff --git a/src/kernel/mnemonics/_aload_2.php b/src/kernel/opcode/_aload_2.php similarity index 76% rename from src/kernel/mnemonics/_aload_2.php rename to src/kernel/opcode/_aload_2.php index 7cf93a6b..62a277c3 100644 --- a/src/kernel/mnemonics/_aload_2.php +++ b/src/kernel/opcode/_aload_2.php @@ -1,10 +1,10 @@ pushStack($this->getLocalstorage(2)); + } -} + +} diff --git a/src/kernel/mnemonics/_aload_3.php b/src/kernel/opcode/_aload_3.php similarity index 76% rename from src/kernel/mnemonics/_aload_3.php rename to src/kernel/opcode/_aload_3.php index b55d0a30..2f07ada5 100644 --- a/src/kernel/mnemonics/_aload_3.php +++ b/src/kernel/opcode/_aload_3.php @@ -1,10 +1,10 @@ pushStack($this->getLocalstorage(3)); + } -} + +} diff --git a/src/kernel/mnemonics/_anewarray.php b/src/kernel/opcode/_anewarray.php similarity index 87% rename from src/kernel/mnemonics/_anewarray.php rename to src/kernel/opcode/_anewarray.php index 5fb3a449..7dc350e8 100644 --- a/src/kernel/mnemonics/_anewarray.php +++ b/src/kernel/opcode/_anewarray.php @@ -1,10 +1,10 @@ getByteCodeStream()->readUnsignedShort(); @@ -23,5 +23,7 @@ public function execute(): void // need reference $ref = new ArrayIterator(array_fill(0, $count, null)); $this->pushStackByReference($ref); + } -} + +} diff --git a/src/kernel/mnemonics/_areturn.php b/src/kernel/opcode/_areturn.php similarity index 71% rename from src/kernel/mnemonics/_areturn.php rename to src/kernel/opcode/_areturn.php index 36bf5752..e8dfc654 100644 --- a/src/kernel/mnemonics/_areturn.php +++ b/src/kernel/opcode/_areturn.php @@ -1,15 +1,17 @@ getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_arraylength.php b/src/kernel/opcode/_arraylength.php similarity index 72% rename from src/kernel/mnemonics/_arraylength.php rename to src/kernel/opcode/_arraylength.php index 4e4f4ee4..00c3a79d 100644 --- a/src/kernel/mnemonics/_arraylength.php +++ b/src/kernel/opcode/_arraylength.php @@ -1,17 +1,19 @@ getStack(); $this->pushStack(sizeof($arrayref)); + } -} + +} diff --git a/src/kernel/mnemonics/_astore.php b/src/kernel/opcode/_astore.php similarity index 75% rename from src/kernel/mnemonics/_astore.php rename to src/kernel/opcode/_astore.php index 0f318889..3dc59532 100644 --- a/src/kernel/mnemonics/_astore.php +++ b/src/kernel/opcode/_astore.php @@ -1,16 +1,18 @@ getByteCodeStream()->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_astore_0.php b/src/kernel/opcode/_astore_0.php similarity index 70% rename from src/kernel/mnemonics/_astore_0.php rename to src/kernel/opcode/_astore_0.php index 62c69859..57697b04 100644 --- a/src/kernel/mnemonics/_astore_0.php +++ b/src/kernel/opcode/_astore_0.php @@ -1,15 +1,17 @@ setLocalstorage(0, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_astore_1.php b/src/kernel/opcode/_astore_1.php similarity index 70% rename from src/kernel/mnemonics/_astore_1.php rename to src/kernel/opcode/_astore_1.php index 2b2ce75a..304f8b37 100644 --- a/src/kernel/mnemonics/_astore_1.php +++ b/src/kernel/opcode/_astore_1.php @@ -1,15 +1,17 @@ setLocalstorage(1, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_astore_2.php b/src/kernel/opcode/_astore_2.php similarity index 68% rename from src/kernel/mnemonics/_astore_2.php rename to src/kernel/opcode/_astore_2.php index 4c1d3a69..5fee1c79 100644 --- a/src/kernel/mnemonics/_astore_2.php +++ b/src/kernel/opcode/_astore_2.php @@ -1,15 +1,17 @@ setLocalstorage(2, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_astore_3.php b/src/kernel/opcode/_astore_3.php similarity index 70% rename from src/kernel/mnemonics/_astore_3.php rename to src/kernel/opcode/_astore_3.php index 20b1ff05..32cfdd1c 100644 --- a/src/kernel/mnemonics/_astore_3.php +++ b/src/kernel/opcode/_astore_3.php @@ -1,15 +1,17 @@ setLocalstorage(3, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_athrow.php b/src/kernel/opcode/_athrow.php similarity index 90% rename from src/kernel/mnemonics/_athrow.php rename to src/kernel/opcode/_athrow.php index 8db418c5..d9d59548 100644 --- a/src/kernel/mnemonics/_athrow.php +++ b/src/kernel/opcode/_athrow.php @@ -1,10 +1,10 @@ getAttributeData()->getExceptionTables() as $exception) { + if ($cpInfo[$cpInfo[$exception->getCatchType()]->getClassIndex()]->getString() === $className && $exception->getStartPc() <= $this->getPointer() && $exception->getEndPc() >= $this->getPointer()) { + $this->getByteCodeStream()->setOffset($exception->getHandlerPc()); return; + } + } throw new Exception('exception table was broken.'); + } + } diff --git a/src/kernel/mnemonics/_baload.php b/src/kernel/opcode/_baload.php similarity index 70% rename from src/kernel/mnemonics/_baload.php rename to src/kernel/opcode/_baload.php index 588544cf..44e2f4bf 100644 --- a/src/kernel/mnemonics/_baload.php +++ b/src/kernel/opcode/_baload.php @@ -1,15 +1,16 @@ pushStack($this->getByteCodeStream()->readByte()); + } + } diff --git a/src/kernel/mnemonics/_breakpoint.php b/src/kernel/opcode/_breakpoint.php similarity index 69% rename from src/kernel/mnemonics/_breakpoint.php rename to src/kernel/opcode/_breakpoint.php index 24c1ed16..e9f5fa16 100644 --- a/src/kernel/mnemonics/_breakpoint.php +++ b/src/kernel/opcode/_breakpoint.php @@ -1,15 +1,16 @@ getStack(); $value2 = $this->getStack(); $this->pushStack(BinaryTool::add($value1, $value2, 8)); + } -} + +} diff --git a/src/kernel/mnemonics/_daload.php b/src/kernel/opcode/_daload.php similarity index 78% rename from src/kernel/mnemonics/_daload.php rename to src/kernel/opcode/_daload.php index 45a8c06c..16a9e674 100644 --- a/src/kernel/mnemonics/_daload.php +++ b/src/kernel/opcode/_daload.php @@ -1,10 +1,10 @@ getStack(); $arrayref = $this->getStack(); $this->pushStack($arrayref[$index]); + } -} + +} diff --git a/src/kernel/mnemonics/_dastore.php b/src/kernel/opcode/_dastore.php similarity index 70% rename from src/kernel/mnemonics/_dastore.php rename to src/kernel/opcode/_dastore.php index 6cbea14f..4aaa361b 100644 --- a/src/kernel/mnemonics/_dastore.php +++ b/src/kernel/opcode/_dastore.php @@ -1,10 +1,10 @@ getStack(); + { + $value = $this->getStack(); $index = $this->getStack(); $arrayref = $this->getStack(); $arrayref[$index] = $value; + } -} + +} diff --git a/src/kernel/mnemonics/_dcmpg.php b/src/kernel/opcode/_dcmpg.php similarity index 71% rename from src/kernel/mnemonics/_dcmpg.php rename to src/kernel/opcode/_dcmpg.php index 9f3e362d..4bb534ec 100644 --- a/src/kernel/mnemonics/_dcmpg.php +++ b/src/kernel/opcode/_dcmpg.php @@ -1,15 +1,16 @@ pushStack(0); + } -} + +} diff --git a/src/kernel/mnemonics/_dconst_1.php b/src/kernel/opcode/_dconst_1.php similarity index 68% rename from src/kernel/mnemonics/_dconst_1.php rename to src/kernel/opcode/_dconst_1.php index fb189a56..31690a34 100644 --- a/src/kernel/mnemonics/_dconst_1.php +++ b/src/kernel/opcode/_dconst_1.php @@ -1,15 +1,17 @@ pushStack(1); + } -} + +} diff --git a/src/kernel/mnemonics/_ddiv.php b/src/kernel/opcode/_ddiv.php similarity index 71% rename from src/kernel/mnemonics/_ddiv.php rename to src/kernel/opcode/_ddiv.php index bb30561d..501adf20 100644 --- a/src/kernel/mnemonics/_ddiv.php +++ b/src/kernel/opcode/_ddiv.php @@ -1,15 +1,16 @@ getByteCodeStream()->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); + } -} + +} diff --git a/src/kernel/mnemonics/_dload_0.php b/src/kernel/opcode/_dload_0.php similarity index 70% rename from src/kernel/mnemonics/_dload_0.php rename to src/kernel/opcode/_dload_0.php index f64f89ce..2d244c3e 100644 --- a/src/kernel/mnemonics/_dload_0.php +++ b/src/kernel/opcode/_dload_0.php @@ -1,15 +1,16 @@ getStack(); $value2 = $this->getStack(); $this->pushStack(BinaryTool::multiply($value1, $value2, 8)); + + + } -} + +} diff --git a/src/kernel/mnemonics/_dneg.php b/src/kernel/opcode/_dneg.php similarity index 71% rename from src/kernel/mnemonics/_dneg.php rename to src/kernel/opcode/_dneg.php index 74097192..0e1298e3 100644 --- a/src/kernel/mnemonics/_dneg.php +++ b/src/kernel/opcode/_dneg.php @@ -1,15 +1,16 @@ getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_dstore.php b/src/kernel/opcode/_dstore.php similarity index 80% rename from src/kernel/mnemonics/_dstore.php rename to src/kernel/opcode/_dstore.php index c6df4692..1a52faaa 100644 --- a/src/kernel/mnemonics/_dstore.php +++ b/src/kernel/opcode/_dstore.php @@ -1,10 +1,10 @@ getByteCodeStream()->readUnsignedByte(); $value = $this->getStack(); $this->setLocalstorage($index, BinaryTool::convertDoubleToIEEE754($value)); + } -} + +} diff --git a/src/kernel/mnemonics/_dstore_0.php b/src/kernel/opcode/_dstore_0.php similarity index 70% rename from src/kernel/mnemonics/_dstore_0.php rename to src/kernel/opcode/_dstore_0.php index 7cabbac2..bcbb3f92 100644 --- a/src/kernel/mnemonics/_dstore_0.php +++ b/src/kernel/opcode/_dstore_0.php @@ -1,15 +1,17 @@ setLocalstorage(0, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_dstore_1.php b/src/kernel/opcode/_dstore_1.php similarity index 70% rename from src/kernel/mnemonics/_dstore_1.php rename to src/kernel/opcode/_dstore_1.php index 7d26fc8c..a4d4d909 100644 --- a/src/kernel/mnemonics/_dstore_1.php +++ b/src/kernel/opcode/_dstore_1.php @@ -1,15 +1,17 @@ setLocalstorage(1, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_dstore_2.php b/src/kernel/opcode/_dstore_2.php similarity index 70% rename from src/kernel/mnemonics/_dstore_2.php rename to src/kernel/opcode/_dstore_2.php index 245dc20a..9f8e3c09 100644 --- a/src/kernel/mnemonics/_dstore_2.php +++ b/src/kernel/opcode/_dstore_2.php @@ -1,15 +1,17 @@ setLocalstorage(2, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_dstore_3.php b/src/kernel/opcode/_dstore_3.php similarity index 72% rename from src/kernel/mnemonics/_dstore_3.php rename to src/kernel/opcode/_dstore_3.php index fadf4547..5769b3a9 100644 --- a/src/kernel/mnemonics/_dstore_3.php +++ b/src/kernel/opcode/_dstore_3.php @@ -1,15 +1,17 @@ setLocalstorage(3, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_dsub.php b/src/kernel/opcode/_dsub.php similarity index 77% rename from src/kernel/mnemonics/_dsub.php rename to src/kernel/opcode/_dsub.php index 387d0293..3f23db39 100644 --- a/src/kernel/mnemonics/_dsub.php +++ b/src/kernel/opcode/_dsub.php @@ -1,18 +1,20 @@ getStack(); $rightValue = $this->getStack(); $this->pushStack(BinaryTool::sub($leftValue, $rightValue, 8)); + } -} + +} diff --git a/src/kernel/mnemonics/_dup.php b/src/kernel/opcode/_dup.php similarity index 68% rename from src/kernel/mnemonics/_dup.php rename to src/kernel/opcode/_dup.php index 76f6d1e6..07674530 100644 --- a/src/kernel/mnemonics/_dup.php +++ b/src/kernel/opcode/_dup.php @@ -1,15 +1,17 @@ dupStack(); + } -} + +} diff --git a/src/kernel/mnemonics/_dup2.php b/src/kernel/opcode/_dup2.php similarity index 71% rename from src/kernel/mnemonics/_dup2.php rename to src/kernel/opcode/_dup2.php index 02aeb5e5..330eff2a 100644 --- a/src/kernel/mnemonics/_dup2.php +++ b/src/kernel/opcode/_dup2.php @@ -1,15 +1,16 @@ getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_fstore.php b/src/kernel/opcode/_fstore.php similarity index 70% rename from src/kernel/mnemonics/_fstore.php rename to src/kernel/opcode/_fstore.php index 77cfe93b..05bd5bd3 100644 --- a/src/kernel/mnemonics/_fstore.php +++ b/src/kernel/opcode/_fstore.php @@ -1,15 +1,16 @@ getInstance($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()); if ($return !== null) { + $this->pushStack($return); + } else { + throw new Exception('Cannot get ' . $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() . ''); + } + } + } diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/opcode/_getstatic.php similarity index 91% rename from src/kernel/mnemonics/_getstatic.php rename to src/kernel/opcode/_getstatic.php index b78cd4be..91a83e3a 100644 --- a/src/kernel/mnemonics/_getstatic.php +++ b/src/kernel/opcode/_getstatic.php @@ -1,10 +1,10 @@ getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); foreach ($this->getInvoker()->getClass()->getFields() as $field) { + if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { // push stack $this->pushStack($this->getInvoker()->getClass()->getStatic($cpInfo[$field->getNameIndex()]->getString())); return; + } + } if (isset($signature[0]['className'])) { + $this->getInvoker()->loadPlatform($class); $this->getInvoker()->loadPlatform($signature[0]['className']); $className = str_replace('/', '\\', $signature[0]['className']); $this->pushStack(new $className()); return; + } throw new Exception('Has not class or field'); + + } -} + +} diff --git a/src/kernel/mnemonics/_goto.php b/src/kernel/opcode/_goto.php similarity index 79% rename from src/kernel/mnemonics/_goto.php rename to src/kernel/opcode/_goto.php index be266dd9..19080187 100644 --- a/src/kernel/mnemonics/_goto.php +++ b/src/kernel/opcode/_goto.php @@ -1,10 +1,10 @@ getByteCodeStream()->readShort(); $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + } -} + +} diff --git a/src/kernel/mnemonics/_goto_w.php b/src/kernel/opcode/_goto_w.php similarity index 70% rename from src/kernel/mnemonics/_goto_w.php rename to src/kernel/opcode/_goto_w.php index 2b27a711..5fb51d58 100644 --- a/src/kernel/mnemonics/_goto_w.php +++ b/src/kernel/opcode/_goto_w.php @@ -1,15 +1,16 @@ getStack(); $this->pushStack(base_convert(substr(sprintf('%032s', base_convert($value, 10, 2)), 16), 2, 10)); + } + } diff --git a/src/kernel/mnemonics/_iadd.php b/src/kernel/opcode/_iadd.php similarity index 80% rename from src/kernel/mnemonics/_iadd.php rename to src/kernel/opcode/_iadd.php index 495d26c8..1e160ac4 100644 --- a/src/kernel/mnemonics/_iadd.php +++ b/src/kernel/opcode/_iadd.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::add($leftValue, $rightValue, 4)); + } + } diff --git a/src/kernel/mnemonics/_iaload.php b/src/kernel/opcode/_iaload.php similarity index 76% rename from src/kernel/mnemonics/_iaload.php rename to src/kernel/opcode/_iaload.php index c7dd5317..ca48b13f 100644 --- a/src/kernel/mnemonics/_iaload.php +++ b/src/kernel/opcode/_iaload.php @@ -1,18 +1,20 @@ getStack(); $arrayref = $this->getStack(); $this->pushStack($arrayref[$index]); + } -} + +} diff --git a/src/kernel/mnemonics/_iand.php b/src/kernel/opcode/_iand.php similarity index 79% rename from src/kernel/mnemonics/_iand.php rename to src/kernel/opcode/_iand.php index e527da94..6edbae9b 100644 --- a/src/kernel/mnemonics/_iand.php +++ b/src/kernel/opcode/_iand.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::andBits($value1, $value2, 4)); + } + } diff --git a/src/kernel/mnemonics/_iastore.php b/src/kernel/opcode/_iastore.php similarity index 75% rename from src/kernel/mnemonics/_iastore.php rename to src/kernel/opcode/_iastore.php index 6edba729..67498dfa 100644 --- a/src/kernel/mnemonics/_iastore.php +++ b/src/kernel/opcode/_iastore.php @@ -1,19 +1,21 @@ getStack(); $arrayref = $this->getStack(); $value = $this->getStack(); $value[$arrayref] = $data; + } -} + +} diff --git a/src/kernel/mnemonics/_iconst_0.php b/src/kernel/opcode/_iconst_0.php similarity index 67% rename from src/kernel/mnemonics/_iconst_0.php rename to src/kernel/opcode/_iconst_0.php index 0868abbf..8eff491b 100644 --- a/src/kernel/mnemonics/_iconst_0.php +++ b/src/kernel/opcode/_iconst_0.php @@ -1,15 +1,17 @@ pushStack(0); + } -} + +} diff --git a/src/kernel/mnemonics/_iconst_1.php b/src/kernel/opcode/_iconst_1.php similarity index 67% rename from src/kernel/mnemonics/_iconst_1.php rename to src/kernel/opcode/_iconst_1.php index f096c652..0198ff30 100644 --- a/src/kernel/mnemonics/_iconst_1.php +++ b/src/kernel/opcode/_iconst_1.php @@ -1,15 +1,17 @@ pushStack(1); + } -} + +} diff --git a/src/kernel/mnemonics/_iconst_2.php b/src/kernel/opcode/_iconst_2.php similarity index 66% rename from src/kernel/mnemonics/_iconst_2.php rename to src/kernel/opcode/_iconst_2.php index 744e2e89..88d4196d 100644 --- a/src/kernel/mnemonics/_iconst_2.php +++ b/src/kernel/opcode/_iconst_2.php @@ -1,15 +1,17 @@ pushStack(2); + } -} + +} diff --git a/src/kernel/mnemonics/_iconst_3.php b/src/kernel/opcode/_iconst_3.php similarity index 67% rename from src/kernel/mnemonics/_iconst_3.php rename to src/kernel/opcode/_iconst_3.php index 90a8c27b..0c21b355 100644 --- a/src/kernel/mnemonics/_iconst_3.php +++ b/src/kernel/opcode/_iconst_3.php @@ -1,15 +1,17 @@ pushStack(3); + } -} + +} diff --git a/src/kernel/mnemonics/_iconst_4.php b/src/kernel/opcode/_iconst_4.php similarity index 67% rename from src/kernel/mnemonics/_iconst_4.php rename to src/kernel/opcode/_iconst_4.php index de29ae63..a94c8372 100644 --- a/src/kernel/mnemonics/_iconst_4.php +++ b/src/kernel/opcode/_iconst_4.php @@ -1,15 +1,17 @@ pushStack(4); + } -} + +} diff --git a/src/kernel/mnemonics/_iconst_5.php b/src/kernel/opcode/_iconst_5.php similarity index 67% rename from src/kernel/mnemonics/_iconst_5.php rename to src/kernel/opcode/_iconst_5.php index c7ccabbb..57f9e18c 100644 --- a/src/kernel/mnemonics/_iconst_5.php +++ b/src/kernel/opcode/_iconst_5.php @@ -1,15 +1,17 @@ pushStack(5); + } -} + +} diff --git a/src/kernel/mnemonics/_iconst_m1.php b/src/kernel/opcode/_iconst_m1.php similarity index 67% rename from src/kernel/mnemonics/_iconst_m1.php rename to src/kernel/opcode/_iconst_m1.php index ac6482a7..bffed3c4 100644 --- a/src/kernel/mnemonics/_iconst_m1.php +++ b/src/kernel/opcode/_iconst_m1.php @@ -1,15 +1,17 @@ pushStack(-1); + } -} + +} diff --git a/src/kernel/mnemonics/_idiv.php b/src/kernel/opcode/_idiv.php similarity index 71% rename from src/kernel/mnemonics/_idiv.php rename to src/kernel/opcode/_idiv.php index 7cf20353..2cea3818 100644 --- a/src/kernel/mnemonics/_idiv.php +++ b/src/kernel/opcode/_idiv.php @@ -1,15 +1,16 @@ getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand === $rightOperand) { + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + } + } -} + +} diff --git a/src/kernel/mnemonics/_if_acmpne.php b/src/kernel/opcode/_if_acmpne.php similarity index 81% rename from src/kernel/mnemonics/_if_acmpne.php rename to src/kernel/opcode/_if_acmpne.php index 02caae43..02822b7c 100644 --- a/src/kernel/mnemonics/_if_acmpne.php +++ b/src/kernel/opcode/_if_acmpne.php @@ -1,22 +1,26 @@ getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand !== $rightOperand) { + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + } + } -} + +} diff --git a/src/kernel/mnemonics/_if_icmpeq.php b/src/kernel/opcode/_if_icmpeq.php similarity index 70% rename from src/kernel/mnemonics/_if_icmpeq.php rename to src/kernel/opcode/_if_icmpeq.php index 586b225b..8871ef6d 100644 --- a/src/kernel/mnemonics/_if_icmpeq.php +++ b/src/kernel/opcode/_if_icmpeq.php @@ -1,15 +1,16 @@ getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand <= $rightOperand) { + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + } + } -} + +} diff --git a/src/kernel/mnemonics/_if_icmpgt.php b/src/kernel/opcode/_if_icmpgt.php similarity index 83% rename from src/kernel/mnemonics/_if_icmpgt.php rename to src/kernel/opcode/_if_icmpgt.php index 99cd273c..efb1dde2 100644 --- a/src/kernel/mnemonics/_if_icmpgt.php +++ b/src/kernel/opcode/_if_icmpgt.php @@ -1,10 +1,10 @@ getStack(); if ($leftOperand < $rightOperand) { + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + } + + } -} + +} diff --git a/src/kernel/mnemonics/_if_icmple.php b/src/kernel/opcode/_if_icmple.php similarity index 70% rename from src/kernel/mnemonics/_if_icmple.php rename to src/kernel/opcode/_if_icmple.php index f1d612ae..334c9e93 100644 --- a/src/kernel/mnemonics/_if_icmple.php +++ b/src/kernel/opcode/_if_icmple.php @@ -1,15 +1,16 @@ getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($rightOperand < $leftOperand) { + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + } } -} + +} diff --git a/src/kernel/mnemonics/_if_icmpne.php b/src/kernel/opcode/_if_icmpne.php similarity index 81% rename from src/kernel/mnemonics/_if_icmpne.php rename to src/kernel/opcode/_if_icmpne.php index cb338e72..804de06f 100644 --- a/src/kernel/mnemonics/_if_icmpne.php +++ b/src/kernel/opcode/_if_icmpne.php @@ -1,22 +1,26 @@ getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand != $rightOperand) { + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + } + } -} + +} diff --git a/src/kernel/mnemonics/_ifeq.php b/src/kernel/opcode/_ifeq.php similarity index 80% rename from src/kernel/mnemonics/_ifeq.php rename to src/kernel/opcode/_ifeq.php index 0193c388..709d3b8c 100644 --- a/src/kernel/mnemonics/_ifeq.php +++ b/src/kernel/opcode/_ifeq.php @@ -1,21 +1,26 @@ getByteCodeStream()->readShort(); $operand = $this->getStack(); if ($operand == 0) { + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + } + + } -} + +} diff --git a/src/kernel/mnemonics/_ifge.php b/src/kernel/opcode/_ifge.php similarity index 71% rename from src/kernel/mnemonics/_ifge.php rename to src/kernel/opcode/_ifge.php index 517f49e4..39be59c4 100644 --- a/src/kernel/mnemonics/_ifge.php +++ b/src/kernel/opcode/_ifge.php @@ -1,15 +1,16 @@ getStack(); if ($operand != 0) { + $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + } + } -} + +} diff --git a/src/kernel/mnemonics/_ifnonnull.php b/src/kernel/opcode/_ifnonnull.php similarity index 70% rename from src/kernel/mnemonics/_ifnonnull.php rename to src/kernel/opcode/_ifnonnull.php index bc67d23c..3a237f0f 100644 --- a/src/kernel/mnemonics/_ifnonnull.php +++ b/src/kernel/opcode/_ifnonnull.php @@ -1,15 +1,16 @@ getByteCodeStream()->readUnsignedByte(); $const = $this->getByteCodeStream()->readByte(); $this->setLocalstorage($index, $this->getLocalstorage($index) + $const); + } -} + +} diff --git a/src/kernel/mnemonics/_iload.php b/src/kernel/opcode/_iload.php similarity index 76% rename from src/kernel/mnemonics/_iload.php rename to src/kernel/opcode/_iload.php index dfd113bf..5ad54e51 100644 --- a/src/kernel/mnemonics/_iload.php +++ b/src/kernel/opcode/_iload.php @@ -1,10 +1,10 @@ getByteCodeStream()->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); + } -} + +} diff --git a/src/kernel/mnemonics/_iload_0.php b/src/kernel/opcode/_iload_0.php similarity index 71% rename from src/kernel/mnemonics/_iload_0.php rename to src/kernel/opcode/_iload_0.php index 32939967..ff27e259 100644 --- a/src/kernel/mnemonics/_iload_0.php +++ b/src/kernel/opcode/_iload_0.php @@ -1,15 +1,17 @@ pushStack($this->getLocalstorage(0)); + } -} + +} diff --git a/src/kernel/mnemonics/_iload_1.php b/src/kernel/opcode/_iload_1.php similarity index 71% rename from src/kernel/mnemonics/_iload_1.php rename to src/kernel/opcode/_iload_1.php index 4115d45b..9cdf5694 100644 --- a/src/kernel/mnemonics/_iload_1.php +++ b/src/kernel/opcode/_iload_1.php @@ -1,15 +1,17 @@ pushStack($this->getLocalstorage(1)); + } -} + +} diff --git a/src/kernel/mnemonics/_iload_2.php b/src/kernel/opcode/_iload_2.php similarity index 68% rename from src/kernel/mnemonics/_iload_2.php rename to src/kernel/opcode/_iload_2.php index 3a843a16..ee5a3520 100644 --- a/src/kernel/mnemonics/_iload_2.php +++ b/src/kernel/opcode/_iload_2.php @@ -1,15 +1,17 @@ pushStack($this->getLocalstorage(2)); + } -} + +} diff --git a/src/kernel/mnemonics/_iload_3.php b/src/kernel/opcode/_iload_3.php similarity index 71% rename from src/kernel/mnemonics/_iload_3.php rename to src/kernel/opcode/_iload_3.php index 27dbf5a9..96521b54 100644 --- a/src/kernel/mnemonics/_iload_3.php +++ b/src/kernel/opcode/_iload_3.php @@ -1,15 +1,17 @@ pushStack($this->getLocalstorage(3)); + } -} + +} diff --git a/src/kernel/mnemonics/_impdep1.php b/src/kernel/opcode/_impdep1.php similarity index 70% rename from src/kernel/mnemonics/_impdep1.php rename to src/kernel/opcode/_impdep1.php index e23bb126..e9ce3ceb 100644 --- a/src/kernel/mnemonics/_impdep1.php +++ b/src/kernel/opcode/_impdep1.php @@ -1,15 +1,16 @@ getStack(); $this->pushStack(BinaryTool::multiply($value1, $value2, 4)); + } + } diff --git a/src/kernel/mnemonics/_ineg.php b/src/kernel/opcode/_ineg.php similarity index 77% rename from src/kernel/mnemonics/_ineg.php rename to src/kernel/opcode/_ineg.php index b01f2f32..cd324fd4 100644 --- a/src/kernel/mnemonics/_ineg.php +++ b/src/kernel/opcode/_ineg.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::negate($value, 4)); + } + } diff --git a/src/kernel/mnemonics/_instanceof.php b/src/kernel/opcode/_instanceof.php similarity index 69% rename from src/kernel/mnemonics/_instanceof.php rename to src/kernel/opcode/_instanceof.php index d919246b..f6a08c7e 100644 --- a/src/kernel/mnemonics/_instanceof.php +++ b/src/kernel/opcode/_instanceof.php @@ -1,15 +1,16 @@ getCpInfo(); @@ -28,7 +28,12 @@ public function execute(): void $arguments = array(); for ($i = 0; $i < $signature['argumentsCount']; $i++) { + $arguments[] = $this->getStack(); + } + + } -} + +} diff --git a/src/kernel/mnemonics/_invokestatic.php b/src/kernel/opcode/_invokestatic.php similarity index 86% rename from src/kernel/mnemonics/_invokestatic.php rename to src/kernel/opcode/_invokestatic.php index f3732fe3..40b5c027 100644 --- a/src/kernel/mnemonics/_invokestatic.php +++ b/src/kernel/opcode/_invokestatic.php @@ -1,15 +1,15 @@ getCpInfo(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -21,7 +21,9 @@ public function execute(): void $arguments = array(); for ($i = 0; $i < $signature['argumentsCount']; $i++) { + $arguments[] = $this->getStack(); + } krsort($arguments); @@ -33,7 +35,11 @@ public function execute(): void ), $arguments); if ($signature[0]['type'] !== 'void') { + $this->pushStack($return); + } + } -} + +} diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/opcode/_invokevirtual.php similarity index 94% rename from src/kernel/mnemonics/_invokevirtual.php rename to src/kernel/opcode/_invokevirtual.php index c46a3b81..7aec86a7 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/opcode/_invokevirtual.php @@ -1,10 +1,10 @@ getStack(); + } $invokerClass = $this->getStack(); if ($invokerClass instanceof \JavaClass) { + $result = call_user_func_array(array( $invokerClass->getMethodInvoker(), $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() ), $arguments); + + } else { // load platform @@ -47,10 +52,16 @@ public function execute(): void $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() ), $arguments); + } if ($signature[0]['type'] !== 'void') { + $this->pushStack($result); + } + + } + } diff --git a/src/kernel/mnemonics/_ior.php b/src/kernel/opcode/_ior.php similarity index 80% rename from src/kernel/mnemonics/_ior.php rename to src/kernel/opcode/_ior.php index 49a33d0b..686af018 100644 --- a/src/kernel/mnemonics/_ior.php +++ b/src/kernel/opcode/_ior.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::orBits($value1, $value2, 4)); + } + } diff --git a/src/kernel/mnemonics/_irem.php b/src/kernel/opcode/_irem.php similarity index 71% rename from src/kernel/mnemonics/_irem.php rename to src/kernel/opcode/_irem.php index fee012ba..6e9b2474 100644 --- a/src/kernel/mnemonics/_irem.php +++ b/src/kernel/opcode/_irem.php @@ -1,15 +1,16 @@ getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_ishl.php b/src/kernel/opcode/_ishl.php similarity index 80% rename from src/kernel/mnemonics/_ishl.php rename to src/kernel/opcode/_ishl.php index 475c46ec..801277c8 100644 --- a/src/kernel/mnemonics/_ishl.php +++ b/src/kernel/opcode/_ishl.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::shiftLeft($value1, $value2, 4)); + } + } diff --git a/src/kernel/mnemonics/_ishr.php b/src/kernel/opcode/_ishr.php similarity index 80% rename from src/kernel/mnemonics/_ishr.php rename to src/kernel/opcode/_ishr.php index e23ca1a0..593a9c6e 100644 --- a/src/kernel/mnemonics/_ishr.php +++ b/src/kernel/opcode/_ishr.php @@ -1,18 +1,21 @@ getStack(); $value2 = $this->getStack(); $this->pushStack(BinaryTool::shiftRight($value1, $value2, 4)); + } + } diff --git a/src/kernel/mnemonics/_istore.php b/src/kernel/opcode/_istore.php similarity index 78% rename from src/kernel/mnemonics/_istore.php rename to src/kernel/opcode/_istore.php index 2f2296c3..d3cf2a99 100644 --- a/src/kernel/mnemonics/_istore.php +++ b/src/kernel/opcode/_istore.php @@ -1,10 +1,10 @@ getByteCodeStream()->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_istore_0.php b/src/kernel/opcode/_istore_0.php similarity index 68% rename from src/kernel/mnemonics/_istore_0.php rename to src/kernel/opcode/_istore_0.php index 135c2fa0..546493ef 100644 --- a/src/kernel/mnemonics/_istore_0.php +++ b/src/kernel/opcode/_istore_0.php @@ -1,15 +1,17 @@ setLocalstorage(0, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_istore_1.php b/src/kernel/opcode/_istore_1.php similarity index 68% rename from src/kernel/mnemonics/_istore_1.php rename to src/kernel/opcode/_istore_1.php index 652bbcf0..97b0ac8f 100644 --- a/src/kernel/mnemonics/_istore_1.php +++ b/src/kernel/opcode/_istore_1.php @@ -1,15 +1,17 @@ setLocalstorage(1, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_istore_2.php b/src/kernel/opcode/_istore_2.php similarity index 68% rename from src/kernel/mnemonics/_istore_2.php rename to src/kernel/opcode/_istore_2.php index 884cbe10..dc76082e 100644 --- a/src/kernel/mnemonics/_istore_2.php +++ b/src/kernel/opcode/_istore_2.php @@ -1,15 +1,17 @@ setLocalstorage(2, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_istore_3.php b/src/kernel/opcode/_istore_3.php similarity index 68% rename from src/kernel/mnemonics/_istore_3.php rename to src/kernel/opcode/_istore_3.php index 6b4db6c3..b5b0288d 100644 --- a/src/kernel/mnemonics/_istore_3.php +++ b/src/kernel/opcode/_istore_3.php @@ -1,15 +1,17 @@ setLocalstorage(3, $this->getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_isub.php b/src/kernel/opcode/_isub.php similarity index 80% rename from src/kernel/mnemonics/_isub.php rename to src/kernel/opcode/_isub.php index d12d6928..4924b41f 100644 --- a/src/kernel/mnemonics/_isub.php +++ b/src/kernel/opcode/_isub.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::sub($leftValue, $rightValue, 4)); + } + } diff --git a/src/kernel/mnemonics/_iushr.php b/src/kernel/opcode/_iushr.php similarity index 80% rename from src/kernel/mnemonics/_iushr.php rename to src/kernel/opcode/_iushr.php index 575bb128..d5a24c5a 100644 --- a/src/kernel/mnemonics/_iushr.php +++ b/src/kernel/opcode/_iushr.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::unsignedShiftRight($value1, $value2, 4)); + } + } diff --git a/src/kernel/mnemonics/_ixor.php b/src/kernel/opcode/_ixor.php similarity index 79% rename from src/kernel/mnemonics/_ixor.php rename to src/kernel/opcode/_ixor.php index 2a4d1e21..09e1dd96 100644 --- a/src/kernel/mnemonics/_ixor.php +++ b/src/kernel/opcode/_ixor.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::xorBits($value1, $value2, 4)); + } + } diff --git a/src/kernel/mnemonics/_jsr.php b/src/kernel/opcode/_jsr.php similarity index 71% rename from src/kernel/mnemonics/_jsr.php rename to src/kernel/opcode/_jsr.php index 44709506..7c8dfabc 100644 --- a/src/kernel/mnemonics/_jsr.php +++ b/src/kernel/opcode/_jsr.php @@ -1,15 +1,16 @@ getStack(); $this->pushStack(BinaryTool::add($value1, $value2, 8)); + } + } diff --git a/src/kernel/mnemonics/_laload.php b/src/kernel/opcode/_laload.php similarity index 76% rename from src/kernel/mnemonics/_laload.php rename to src/kernel/opcode/_laload.php index 48679ddb..5d17d69a 100644 --- a/src/kernel/mnemonics/_laload.php +++ b/src/kernel/opcode/_laload.php @@ -1,10 +1,10 @@ getStack(); $arrayref = $this->getStack(); $this->pushStack($arrayref[$index]); + } -} + +} diff --git a/src/kernel/mnemonics/_land.php b/src/kernel/opcode/_land.php similarity index 79% rename from src/kernel/mnemonics/_land.php rename to src/kernel/opcode/_land.php index 93c37599..6b5d52a2 100644 --- a/src/kernel/mnemonics/_land.php +++ b/src/kernel/opcode/_land.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::andBits($value1, $value2, 8)); + } + } diff --git a/src/kernel/mnemonics/_lastore.php b/src/kernel/opcode/_lastore.php similarity index 69% rename from src/kernel/mnemonics/_lastore.php rename to src/kernel/opcode/_lastore.php index f0c4085d..1e22fe1b 100644 --- a/src/kernel/mnemonics/_lastore.php +++ b/src/kernel/opcode/_lastore.php @@ -1,10 +1,10 @@ getStack(); + { + $value = $this->getStack(); $index = $this->getStack(); $arrayref = $this->getStack(); $arrayref[$index] = $value; + } -} + +} diff --git a/src/kernel/mnemonics/_lcmp.php b/src/kernel/opcode/_lcmp.php similarity index 71% rename from src/kernel/mnemonics/_lcmp.php rename to src/kernel/opcode/_lcmp.php index 9c8ccca4..f266720f 100644 --- a/src/kernel/mnemonics/_lcmp.php +++ b/src/kernel/opcode/_lcmp.php @@ -1,15 +1,16 @@ pushStack(0); + } + } diff --git a/src/kernel/mnemonics/_lconst_1.php b/src/kernel/opcode/_lconst_1.php similarity index 71% rename from src/kernel/mnemonics/_lconst_1.php rename to src/kernel/opcode/_lconst_1.php index f4a74979..f96b99b4 100644 --- a/src/kernel/mnemonics/_lconst_1.php +++ b/src/kernel/opcode/_lconst_1.php @@ -1,15 +1,17 @@ pushStack(1); + } + } diff --git a/src/kernel/mnemonics/_ldc.php b/src/kernel/opcode/_ldc.php similarity index 82% rename from src/kernel/mnemonics/_ldc.php rename to src/kernel/opcode/_ldc.php index 985b60f3..566f84ca 100644 --- a/src/kernel/mnemonics/_ldc.php +++ b/src/kernel/opcode/_ldc.php @@ -1,10 +1,10 @@ getStringIndex()]; if ($value instanceof \JavaStructureUtf8) { @@ -25,13 +26,21 @@ public function execute(): void $this->getInvoker()->loadPlatform('java.lang.String'); $value = new \java\lang\String($value); + } - } elseif (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { + + } else if (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { + $value = $data->getBytes(); + } else { + $value = $cpInfo[$cpInfo[$this->getByteCodeStream()->readUnsignedByte()]->getStringIndex()]; + } $this->pushStack($value); + } + } diff --git a/src/kernel/mnemonics/_ldc2_w.php b/src/kernel/opcode/_ldc2_w.php similarity index 65% rename from src/kernel/mnemonics/_ldc2_w.php rename to src/kernel/opcode/_ldc2_w.php index 92d913e6..61f3bd5b 100644 --- a/src/kernel/mnemonics/_ldc2_w.php +++ b/src/kernel/opcode/_ldc2_w.php @@ -1,19 +1,21 @@ getCpInfo(); $data = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - $this->pushStack($data->getBytes()); + $this->pushStack($data->getBytes()); + } -} + +} diff --git a/src/kernel/mnemonics/_ldc_w.php b/src/kernel/opcode/_ldc_w.php similarity index 71% rename from src/kernel/mnemonics/_ldc_w.php rename to src/kernel/opcode/_ldc_w.php index 1c122c23..a5ed460d 100644 --- a/src/kernel/mnemonics/_ldc_w.php +++ b/src/kernel/opcode/_ldc_w.php @@ -1,15 +1,16 @@ getByteCodeStream()->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); + } + } diff --git a/src/kernel/mnemonics/_lload_0.php b/src/kernel/opcode/_lload_0.php similarity index 70% rename from src/kernel/mnemonics/_lload_0.php rename to src/kernel/opcode/_lload_0.php index 7fd82355..40e1663a 100644 --- a/src/kernel/mnemonics/_lload_0.php +++ b/src/kernel/opcode/_lload_0.php @@ -1,15 +1,16 @@ getStack(); $this->pushStack(BinaryTool::multiply($value1, $value2, 8)); + } + } diff --git a/src/kernel/mnemonics/_lneg.php b/src/kernel/opcode/_lneg.php similarity index 71% rename from src/kernel/mnemonics/_lneg.php rename to src/kernel/opcode/_lneg.php index f131e8fe..505d6a12 100644 --- a/src/kernel/mnemonics/_lneg.php +++ b/src/kernel/opcode/_lneg.php @@ -1,15 +1,16 @@ getByteCodeStream()->readInt(); $offsets[(string) $label] = $this->getByteCodeStream()->readInt(); + } if (isset($offsets[$key])) { @@ -31,9 +33,12 @@ public function execute(): void // goto PC $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); return; + } // goto default $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); + } + } diff --git a/src/kernel/mnemonics/_lor.php b/src/kernel/opcode/_lor.php similarity index 80% rename from src/kernel/mnemonics/_lor.php rename to src/kernel/opcode/_lor.php index d18dc949..34e39ed9 100644 --- a/src/kernel/mnemonics/_lor.php +++ b/src/kernel/opcode/_lor.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::orBits($value1, $value2, 8)); + } + } diff --git a/src/kernel/mnemonics/_lrem.php b/src/kernel/opcode/_lrem.php similarity index 71% rename from src/kernel/mnemonics/_lrem.php rename to src/kernel/opcode/_lrem.php index e3b9b282..e3d5c6d1 100644 --- a/src/kernel/mnemonics/_lrem.php +++ b/src/kernel/opcode/_lrem.php @@ -1,15 +1,16 @@ getStack()); + } -} + +} diff --git a/src/kernel/mnemonics/_lshl.php b/src/kernel/opcode/_lshl.php similarity index 80% rename from src/kernel/mnemonics/_lshl.php rename to src/kernel/opcode/_lshl.php index c81e52f0..1f955e73 100644 --- a/src/kernel/mnemonics/_lshl.php +++ b/src/kernel/opcode/_lshl.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::shiftLeft($value1, $value2, 8)); + } + } diff --git a/src/kernel/mnemonics/_lshr.php b/src/kernel/opcode/_lshr.php similarity index 80% rename from src/kernel/mnemonics/_lshr.php rename to src/kernel/opcode/_lshr.php index 16bf30ca..fa42c739 100644 --- a/src/kernel/mnemonics/_lshr.php +++ b/src/kernel/opcode/_lshr.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::shiftRight($value1, $value2, 8)); + } + } diff --git a/src/kernel/mnemonics/_lstore.php b/src/kernel/opcode/_lstore.php similarity index 77% rename from src/kernel/mnemonics/_lstore.php rename to src/kernel/opcode/_lstore.php index 66b5254c..114556d9 100644 --- a/src/kernel/mnemonics/_lstore.php +++ b/src/kernel/opcode/_lstore.php @@ -1,10 +1,10 @@ getByteCodeStream()->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); + } + } diff --git a/src/kernel/mnemonics/_lstore_0.php b/src/kernel/opcode/_lstore_0.php similarity index 70% rename from src/kernel/mnemonics/_lstore_0.php rename to src/kernel/opcode/_lstore_0.php index 5ddf44a3..c1b3c5f7 100644 --- a/src/kernel/mnemonics/_lstore_0.php +++ b/src/kernel/opcode/_lstore_0.php @@ -1,15 +1,16 @@ getStack(); $this->pushStack(BinaryTool::sub($value1, $value2, 8)); + } + } diff --git a/src/kernel/mnemonics/_lushr.php b/src/kernel/opcode/_lushr.php similarity index 80% rename from src/kernel/mnemonics/_lushr.php rename to src/kernel/opcode/_lushr.php index 3d8edf7a..184811aa 100644 --- a/src/kernel/mnemonics/_lushr.php +++ b/src/kernel/opcode/_lushr.php @@ -1,10 +1,10 @@ getStack(); $this->pushStack(BinaryTool::unsignedShiftRight($value1, $value2, 8)); + } + } diff --git a/src/kernel/mnemonics/_lxor.php b/src/kernel/opcode/_lxor.php similarity index 71% rename from src/kernel/mnemonics/_lxor.php rename to src/kernel/opcode/_lxor.php index 6446cdf9..b1f8b6de 100644 --- a/src/kernel/mnemonics/_lxor.php +++ b/src/kernel/opcode/_lxor.php @@ -1,15 +1,16 @@ pushStack($this->getInvoker()->getClass()->getManipulator()->$className); + } else { + if (($this->getInvoker()->getClass()->getManipulator() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) || is_file(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class')) { + $javaClass = null; if ($this->getInvoker()->getClass()->getManipulator() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) { + $javaClass = new JavaClass($className . '.class', $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->getClassBytecode($className)); + } else { + $javaClass = new JavaClass(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class'); + } $outerClasses = explode('$', $className); @@ -49,7 +56,10 @@ public function execute(): void $javaClass->setInstance('this', $javaClass); for ($i = 1, $size = sizeof($outerClasses); $i < $size; $i++) { + $javaClass->setInstance('this$' . ($i - 1), $this->getInvoker()->getClass()->getManipulator()->{implode('$', array_slice($outerClasses, 0, $i))}); + + } if (method_exists($javaClass->getMethodInvoker(), '')) { @@ -64,16 +74,19 @@ public function execute(): void $this->getInvoker()->getClass() ) ); + } if ($this->getInvoker()->getClass()->getManipulator() !== null) { // regist to manipulator $this->getInvoker()->getClass()->getManipulator()->registerClass($javaClass); + } // push to stack $this->pushStack($javaClass); + } else { // load platform @@ -82,7 +95,11 @@ public function execute(): void $invokeClassName = '\\' . str_replace('/', '\\', $className); $this->pushStack(new $invokeClassName()); + } + } + } + } diff --git a/src/kernel/mnemonics/_newarray.php b/src/kernel/opcode/_newarray.php similarity index 79% rename from src/kernel/mnemonics/_newarray.php rename to src/kernel/opcode/_newarray.php index d2125c2f..f1af31a2 100644 --- a/src/kernel/mnemonics/_newarray.php +++ b/src/kernel/opcode/_newarray.php @@ -1,20 +1,23 @@ getByteCodeStream()->readUnsignedByte(); $count = $this->getStack(); // need reference $ref = new ArrayIterator(array_fill(0, $count, null)); $this->pushStackByReference($ref); + + } -} + +} diff --git a/src/kernel/mnemonics/_nop.php b/src/kernel/opcode/_nop.php similarity index 67% rename from src/kernel/mnemonics/_nop.php rename to src/kernel/opcode/_nop.php index 72da13f1..1ed323dc 100644 --- a/src/kernel/mnemonics/_nop.php +++ b/src/kernel/opcode/_nop.php @@ -1,14 +1,16 @@ popStack(); + } + } diff --git a/src/kernel/mnemonics/_pop2.php b/src/kernel/opcode/_pop2.php similarity index 71% rename from src/kernel/mnemonics/_pop2.php rename to src/kernel/opcode/_pop2.php index e65a31c4..d0d54e46 100644 --- a/src/kernel/mnemonics/_pop2.php +++ b/src/kernel/opcode/_pop2.php @@ -1,15 +1,16 @@ getCpInfo(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -22,4 +22,5 @@ public function execute(): void $objectref->setInstance($name, $value); } -} + +} diff --git a/src/kernel/mnemonics/_putstatic.php b/src/kernel/opcode/_putstatic.php similarity index 83% rename from src/kernel/mnemonics/_putstatic.php rename to src/kernel/opcode/_putstatic.php index ed545157..46696a38 100644 --- a/src/kernel/mnemonics/_putstatic.php +++ b/src/kernel/opcode/_putstatic.php @@ -1,15 +1,15 @@ getCpInfo(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -21,5 +21,7 @@ public function execute(): void // set field $this->getInvoker()->getClass()->setStatic($name, $value); + } -} + +} diff --git a/src/kernel/mnemonics/_ret.php b/src/kernel/opcode/_ret.php similarity index 71% rename from src/kernel/mnemonics/_ret.php rename to src/kernel/opcode/_ret.php index 4f66353e..e49759d9 100644 --- a/src/kernel/mnemonics/_ret.php +++ b/src/kernel/opcode/_ret.php @@ -1,15 +1,16 @@ pushStack($this->getByteCodeStream()->readShort()); + } + } diff --git a/src/kernel/mnemonics/_swap.php b/src/kernel/opcode/_swap.php similarity index 71% rename from src/kernel/mnemonics/_swap.php rename to src/kernel/opcode/_swap.php index 4a0210d4..bdb9ab86 100644 --- a/src/kernel/mnemonics/_swap.php +++ b/src/kernel/opcode/_swap.php @@ -1,15 +1,16 @@ getByteCodeStream()->readInt(); for ($i = $lowByte; $i <= $highByte; $i++) { + $offsets[$i] = $this->getByteCodeStream()->readInt(); + } if (isset($offsets[$key])) { @@ -30,9 +32,12 @@ public function execute(): void // goto PC $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); return; + } // goto default $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); + } + } diff --git a/src/kernel/mnemonics/_wide.php b/src/kernel/opcode/_wide.php similarity index 71% rename from src/kernel/mnemonics/_wide.php rename to src/kernel/opcode/_wide.php index ced40de9..71b0f7cb 100644 --- a/src/kernel/mnemonics/_wide.php +++ b/src/kernel/opcode/_wide.php @@ -1,15 +1,16 @@ getClass()Index = null; + private $ClassIndex = null; private $NameAndTypeIndex = null; public function execute(): void { diff --git a/tools/copy.php b/tools/copy.php index db200a5e..749725c1 100644 --- a/tools/copy.php +++ b/tools/copy.php @@ -5,11 +5,11 @@ $a = str_replace('JavaStatement', '', file_get_contents($file)); $a = str_replace("throw new Exception(__CLASS__ . ' hasnot statement.');\n", 'throw new NotImplementedException(__CLASS__);', $a); $a = str_replace('public function execute () {' . "\n", "public function execute(): void\n {", $a); - $a = str_replace('extends {', "implements MnemonicInterface\n{\n use \\PHPJava\\Kernel\\Core\\Accumulator;", $a); - $a = str_replace(' Date: Sat, 23 Feb 2019 17:49:03 +0900 Subject: [PATCH 16/96] WIP commit --- src/core/JavaClass.php | 41 +++++++++++++++++- src/core/JavaClassReader.php | 4 +- src/core/jvm/ActiveFields.php | 21 +++++++++ src/core/jvm/ActiveInterface.php | 19 ++++++++ src/core/jvm/ActiveMethods.php | 22 ++++++++++ src/core/jvm/ConstantPool.php | 27 +++++++++--- src/core/jvm/stream/BinaryReader.php | 2 - .../attributes/AnnotationDefaultAttribute.php | 3 +- src/kernel/attributes/AttributeInfo.php | 9 ++-- .../attributes/BootstrapMethodsAttribute.php | 3 +- src/kernel/attributes/CodeAttribute.php | 27 ++++++------ .../attributes/ConstantValueAttribute.php | 3 +- src/kernel/attributes/DeprecatedAttribute.php | 3 +- .../attributes/EnclosingMethodAttribute.php | 3 +- src/kernel/attributes/ExceptionsAttribute.php | 3 +- .../attributes/InnerClassesAttribute.php | 20 +++++---- .../attributes/LineNumberTableAttribute.php | 9 ++-- .../LocalVariableTableAttribute.php | 5 ++- .../LocalVariableTypeTableAttribute.php | 3 +- .../RuntimeInvisibleAnnotationsAttribute.php | 3 +- ...InvisibleParameterAnnotationsAttribute.php | 3 +- .../RuntimeVisibleAnnotationsAttribute.php | 3 +- ...meVisibleParameterAnnotationsAttribute.php | 3 +- src/kernel/attributes/SignatureAttribute.php | 3 +- .../SourceDebugExtensionAttribute.php | 3 +- src/kernel/attributes/SourceFileAttribute.php | 5 ++- .../attributes/StackMapTableAttribute.php | 5 ++- src/kernel/attributes/SyntheticAttribute.php | 3 +- src/kernel/core/ConstantPool.php | 17 ++++++++ src/kernel/opcode/_aaload.php | 11 ++--- src/kernel/opcode/_aastore.php | 9 ++-- src/kernel/opcode/_aconst_null.php | 7 ++- src/kernel/opcode/_aload.php | 5 +-- src/kernel/opcode/_aload_0.php | 9 ++-- src/kernel/opcode/_aload_1.php | 10 ++--- src/kernel/opcode/_aload_2.php | 7 ++- src/kernel/opcode/_aload_3.php | 7 ++- src/kernel/opcode/_anewarray.php | 9 ++-- src/kernel/opcode/_areturn.php | 9 ++-- src/kernel/opcode/_arraylength.php | 9 ++-- src/kernel/opcode/_astore.php | 9 ++-- src/kernel/opcode/_astore_0.php | 9 ++-- src/kernel/opcode/_astore_1.php | 9 ++-- src/kernel/opcode/_astore_2.php | 9 ++-- src/kernel/opcode/_astore_3.php | 9 ++-- src/kernel/opcode/_athrow.php | 11 ++--- src/kernel/opcode/_baload.php | 8 ++-- src/kernel/opcode/_bastore.php | 8 ++-- src/kernel/opcode/_bipush.php | 5 +-- src/kernel/opcode/_breakpoint.php | 8 ++-- src/kernel/opcode/_caload.php | 8 ++-- src/kernel/opcode/_castore.php | 8 ++-- src/kernel/opcode/_checkcast.php | 8 ++-- src/kernel/opcode/_d2f.php | 8 ++-- src/kernel/opcode/_d2i.php | 8 ++-- src/kernel/opcode/_d2l.php | 8 ++-- src/kernel/opcode/_dadd.php | 9 ++-- src/kernel/opcode/_daload.php | 9 ++-- src/kernel/opcode/_dastore.php | 11 +++-- src/kernel/opcode/_dcmpg.php | 8 ++-- src/kernel/opcode/_dcmpl.php | 8 ++-- src/kernel/opcode/_dconst_0.php | 9 ++-- src/kernel/opcode/_dconst_1.php | 7 ++- src/kernel/opcode/_ddiv.php | 8 ++-- src/kernel/opcode/_dload.php | 9 ++-- src/kernel/opcode/_dload_0.php | 8 ++-- src/kernel/opcode/_dload_1.php | 8 ++-- src/kernel/opcode/_dload_2.php | 8 ++-- src/kernel/opcode/_dload_3.php | 8 ++-- src/kernel/opcode/_dmul.php | 11 ++--- src/kernel/opcode/_dneg.php | 8 ++-- src/kernel/opcode/_drem.php | 8 ++-- src/kernel/opcode/_dreturn.php | 9 ++-- src/kernel/opcode/_dstore.php | 9 ++-- src/kernel/opcode/_dstore_0.php | 9 ++-- src/kernel/opcode/_dstore_1.php | 9 ++-- src/kernel/opcode/_dstore_2.php | 9 ++-- src/kernel/opcode/_dstore_3.php | 7 ++- src/kernel/opcode/_dsub.php | 9 ++-- src/kernel/opcode/_dup.php | 9 ++-- src/kernel/opcode/_dup2.php | 8 ++-- src/kernel/opcode/_dup2_x1.php | 8 ++-- src/kernel/opcode/_dup2_x2.php | 8 ++-- src/kernel/opcode/_dup_x1.php | 8 ++-- src/kernel/opcode/_dup_x2.php | 8 ++-- src/kernel/opcode/_f2d.php | 8 ++-- src/kernel/opcode/_f2i.php | 8 ++-- src/kernel/opcode/_f2l.php | 8 ++-- src/kernel/opcode/_fadd.php | 8 ++-- src/kernel/opcode/_faload.php | 8 ++-- src/kernel/opcode/_fastore.php | 8 ++-- src/kernel/opcode/_fcmpg.php | 8 ++-- src/kernel/opcode/_fcmpl.php | 8 ++-- src/kernel/opcode/_fconst_0.php | 8 ++-- src/kernel/opcode/_fconst_1.php | 8 ++-- src/kernel/opcode/_fconst_2.php | 8 ++-- src/kernel/opcode/_fdiv.php | 8 ++-- src/kernel/opcode/_fload.php | 8 ++-- src/kernel/opcode/_fload_0.php | 8 ++-- src/kernel/opcode/_fload_1.php | 8 ++-- src/kernel/opcode/_fload_2.php | 8 ++-- src/kernel/opcode/_fload_3.php | 8 ++-- src/kernel/opcode/_fmul.php | 8 ++-- src/kernel/opcode/_fneg.php | 8 ++-- src/kernel/opcode/_frem.php | 8 ++-- src/kernel/opcode/_freturn.php | 7 ++- src/kernel/opcode/_fstore.php | 8 ++-- src/kernel/opcode/_fstore_0.php | 8 ++-- src/kernel/opcode/_fstore_1.php | 8 ++-- src/kernel/opcode/_fstore_2.php | 8 ++-- src/kernel/opcode/_fstore_3.php | 8 ++-- src/kernel/opcode/_fsub.php | 8 ++-- src/kernel/opcode/_getfield.php | 11 ++--- src/kernel/opcode/_getstatic.php | 15 ++----- src/kernel/opcode/_goto.php | 7 ++- src/kernel/opcode/_goto_w.php | 8 ++-- src/kernel/opcode/_i2b.php | 8 ++-- src/kernel/opcode/_i2c.php | 8 ++-- src/kernel/opcode/_i2d.php | 8 ++-- src/kernel/opcode/_i2f.php | 8 ++-- src/kernel/opcode/_i2l.php | 8 ++-- src/kernel/opcode/_i2s.php | 5 +-- src/kernel/opcode/_iadd.php | 5 +-- src/kernel/opcode/_iaload.php | 9 ++-- src/kernel/opcode/_iand.php | 5 +-- src/kernel/opcode/_iastore.php | 9 ++-- src/kernel/opcode/_iconst_0.php | 9 ++-- src/kernel/opcode/_iconst_1.php | 9 ++-- src/kernel/opcode/_iconst_2.php | 9 ++-- src/kernel/opcode/_iconst_3.php | 9 ++-- src/kernel/opcode/_iconst_4.php | 9 ++-- src/kernel/opcode/_iconst_5.php | 9 ++-- src/kernel/opcode/_iconst_m1.php | 9 ++-- src/kernel/opcode/_idiv.php | 8 ++-- src/kernel/opcode/_if_acmpeq.php | 11 ++--- src/kernel/opcode/_if_acmpne.php | 11 ++--- src/kernel/opcode/_if_icmpeq.php | 8 ++-- src/kernel/opcode/_if_icmpge.php | 12 ++--- src/kernel/opcode/_if_icmpgt.php | 10 ++--- src/kernel/opcode/_if_icmple.php | 8 ++-- src/kernel/opcode/_if_icmplt.php | 10 ++--- src/kernel/opcode/_if_icmpne.php | 11 ++--- src/kernel/opcode/_ifeq.php | 12 ++--- src/kernel/opcode/_ifge.php | 8 ++-- src/kernel/opcode/_ifgt.php | 8 ++-- src/kernel/opcode/_ifle.php | 8 ++-- src/kernel/opcode/_iflt.php | 8 ++-- src/kernel/opcode/_ifne.php | 9 ++-- src/kernel/opcode/_ifnonnull.php | 8 ++-- src/kernel/opcode/_ifnull.php | 8 ++-- src/kernel/opcode/_iinc.php | 9 ++-- src/kernel/opcode/_iload.php | 7 ++- src/kernel/opcode/_iload_0.php | 7 ++- src/kernel/opcode/_iload_1.php | 7 ++- src/kernel/opcode/_iload_2.php | 9 ++-- src/kernel/opcode/_iload_3.php | 7 ++- src/kernel/opcode/_impdep1.php | 8 ++-- src/kernel/opcode/_impdep2.php | 8 ++-- src/kernel/opcode/_imul.php | 5 +-- src/kernel/opcode/_ineg.php | 5 +-- src/kernel/opcode/_instanceof.php | 8 ++-- src/kernel/opcode/_invokedynamic.php | 8 ++-- src/kernel/opcode/_invokeinterface.php | 8 ++-- src/kernel/opcode/_invokespecial.php | 14 +++--- src/kernel/opcode/_invokestatic.php | 15 +++---- src/kernel/opcode/_invokevirtual.php | 16 ++----- src/kernel/opcode/_ior.php | 5 +-- src/kernel/opcode/_irem.php | 8 ++-- src/kernel/opcode/_ireturn.php | 9 ++-- src/kernel/opcode/_ishl.php | 5 +-- src/kernel/opcode/_ishr.php | 6 +-- src/kernel/opcode/_istore.php | 7 ++- src/kernel/opcode/_istore_0.php | 9 ++-- src/kernel/opcode/_istore_1.php | 9 ++-- src/kernel/opcode/_istore_2.php | 9 ++-- src/kernel/opcode/_istore_3.php | 9 ++-- src/kernel/opcode/_isub.php | 5 +-- src/kernel/opcode/_iushr.php | 5 +-- src/kernel/opcode/_ixor.php | 5 +-- src/kernel/opcode/_jsr.php | 8 ++-- src/kernel/opcode/_jsr_w.php | 8 ++-- src/kernel/opcode/_l2d.php | 8 ++-- src/kernel/opcode/_l2f.php | 8 ++-- src/kernel/opcode/_l2i.php | 8 ++-- src/kernel/opcode/_ladd.php | 5 +-- src/kernel/opcode/_laload.php | 9 ++-- src/kernel/opcode/_land.php | 5 +-- src/kernel/opcode/_lastore.php | 11 +++-- src/kernel/opcode/_lcmp.php | 8 ++-- src/kernel/opcode/_lconst_0.php | 5 +-- src/kernel/opcode/_lconst_1.php | 5 +-- src/kernel/opcode/_ldc.php | 16 ++----- src/kernel/opcode/_ldc2_w.php | 13 +++--- src/kernel/opcode/_ldc_w.php | 8 ++-- src/kernel/opcode/_ldiv.php | 8 ++-- src/kernel/opcode/_lload.php | 5 +-- src/kernel/opcode/_lload_0.php | 8 ++-- src/kernel/opcode/_lload_1.php | 8 ++-- src/kernel/opcode/_lload_2.php | 8 ++-- src/kernel/opcode/_lload_3.php | 8 ++-- src/kernel/opcode/_lmul.php | 5 +-- src/kernel/opcode/_lneg.php | 8 ++-- src/kernel/opcode/_lookupswitch.php | 8 +--- src/kernel/opcode/_lor.php | 5 +-- src/kernel/opcode/_lrem.php | 8 ++-- src/kernel/opcode/_lreturn.php | 9 ++-- src/kernel/opcode/_lshl.php | 5 +-- src/kernel/opcode/_lshr.php | 5 +-- src/kernel/opcode/_lstore.php | 5 +-- src/kernel/opcode/_lstore_0.php | 8 ++-- src/kernel/opcode/_lstore_1.php | 8 ++-- src/kernel/opcode/_lstore_2.php | 8 ++-- src/kernel/opcode/_lstore_3.php | 8 ++-- src/kernel/opcode/_lsub.php | 5 +-- src/kernel/opcode/_lushr.php | 5 +-- src/kernel/opcode/_lxor.php | 8 ++-- src/kernel/opcode/_monitorenter.php | 8 ++-- src/kernel/opcode/_monitorexit.php | 8 ++-- src/kernel/opcode/_multianewarray.php | 8 ++-- src/kernel/opcode/_new.php | 22 ++-------- src/kernel/opcode/_newarray.php | 10 ++--- src/kernel/opcode/_nop.php | 7 ++- src/kernel/opcode/_pop.php | 5 +-- src/kernel/opcode/_pop2.php | 8 ++-- src/kernel/opcode/_putfield.php | 10 ++--- src/kernel/opcode/_putstatic.php | 11 +++-- src/kernel/opcode/_ret.php | 8 ++-- src/kernel/opcode/_return.php | 9 ++-- src/kernel/opcode/_saload.php | 8 ++-- src/kernel/opcode/_sastore.php | 8 ++-- src/kernel/opcode/_sipush.php | 5 +-- src/kernel/opcode/_swap.php | 8 ++-- src/kernel/opcode/_tableswitch.php | 8 +--- src/kernel/opcode/_wide.php | 8 ++-- src/kernel/structures/_AppendFrame.php | 2 +- src/kernel/structures/_ChopFrame.php | 2 +- src/kernel/structures/_Class.php | 9 ++-- src/kernel/structures/_Classes.php | 2 +- src/kernel/structures/_Double.php | 2 +- src/kernel/structures/_DoubleVariableInfo.php | 2 +- src/kernel/structures/_ExceptionTable.php | 2 +- src/kernel/structures/_FieldInfo.php | 12 ++--- src/kernel/structures/_FieldRef.php | 14 +++--- src/kernel/structures/_Float.php | 2 +- src/kernel/structures/_FloatVariableInfo.php | 2 +- src/kernel/structures/_FullFrame.php | 2 +- src/kernel/structures/_Integer.php | 2 +- .../structures/_IntegerVariableInfo.php | 2 +- src/kernel/structures/_LineNumberTable.php | 2 +- src/kernel/structures/_LocalVariableTable.php | 2 +- src/kernel/structures/_Long.php | 2 +- src/kernel/structures/_LongVariableInfo.php | 2 +- src/kernel/structures/_MethodInfo.php | 12 ++--- src/kernel/structures/_Methodref.php | 12 ++--- src/kernel/structures/_NameAndType.php | 6 +-- src/kernel/structures/_NullVariableInfo.php | 2 +- src/kernel/structures/_ObjectVariableInfo.php | 2 +- src/kernel/structures/_SameFrame.php | 2 +- src/kernel/structures/_SameFrameExtended.php | 2 +- .../structures/_SameLocals1StackItemFrame.php | 2 +- .../_SameLocals1StackItemFrameExtended.php | 2 +- src/kernel/structures/_StackMapFrame.php | 2 +- src/kernel/structures/_String.php | 4 +- src/kernel/structures/_TopVariableInfo.php | 2 +- .../_UninitializedThisVariableInfo.php | 2 +- .../structures/_UninitializedVariableInfo.php | 2 +- src/kernel/structures/_Utf8.php | 6 +-- .../structures/_VerificationTypeInfo.php | 2 +- tools/Test.class | Bin 1852 -> 3277 bytes tools/copy.php | 5 ++- tools/copy_attr.php | 7 +-- tools/copy_strt.php | 7 ++- 272 files changed, 1042 insertions(+), 1070 deletions(-) create mode 100644 src/core/jvm/ActiveFields.php create mode 100644 src/core/jvm/ActiveInterface.php create mode 100644 src/core/jvm/ActiveMethods.php create mode 100644 src/kernel/core/ConstantPool.php diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index b5621c1a..29b61ea3 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -1,6 +1,9 @@ null, ]; - private $constantPool; + private $activeInterfaces; + private $activeFields; + private $activeMethods; + + private $accessFlag = 0; + private $thisClass = 0; + private $superClass = 0; public function __construct(JavaClassReader $reader) { @@ -34,6 +43,34 @@ public function __construct(JavaClassReader $reader) $reader->getBinaryReader()->readUnsignedShort() ); - var_dump($this->constantPool); + // read access flag + $this->accessFlag = $reader->getBinaryReader()->readUnsignedShort(); + + // read this class + $this->thisClass = $reader->getBinaryReader()->readUnsignedShort(); + + // read super class + $this->superClass = $reader->getBinaryReader()->readUnsignedShort(); + + // read interfaces + $this->activeInterfaces = new ActiveInterface( + $reader, + $reader->getBinaryReader()->readUnsignedShort() + ); + + // read fields + $this->activeFields = new ActiveFields( + $reader, + $reader->getBinaryReader()->readUnsignedShort(), + $this->constantPool + ); + + // read methods + $this->activeMethods = new ActiveMethods( + $reader, + $reader->getBinaryReader()->readUnsignedShort(), + $this->constantPool + ); + var_dump($this->activeFields); } } diff --git a/src/core/JavaClassReader.php b/src/core/JavaClassReader.php index d09d1baf..c0114f6b 100644 --- a/src/core/JavaClassReader.php +++ b/src/core/JavaClassReader.php @@ -9,10 +9,10 @@ class JavaClassReader public function __construct(string $file) { $this->handle = fopen($file, 'r'); - $this->binaryReader = new \PHPJava\Core\JVM\Stream\BinaryReader($this->handle); + $this->binaryReader = new JVM\Stream\BinaryReader($this->handle); } - public function getBinaryReader(): \PHPJava\Core\JVM\Stream\BinaryReader + public function getBinaryReader(): JVM\Stream\BinaryReader { return $this->binaryReader; } diff --git a/src/core/jvm/ActiveFields.php b/src/core/jvm/ActiveFields.php new file mode 100644 index 00000000..a9363ef3 --- /dev/null +++ b/src/core/jvm/ActiveFields.php @@ -0,0 +1,21 @@ +reader = $reader; + for ($i = 0; $i < $entries; $i++) { + // not implemented, read only + $this->entries[$i] = new _FieldInfo($reader); + $this->entries[$i]->execute(); + } + } +} diff --git a/src/core/jvm/ActiveInterface.php b/src/core/jvm/ActiveInterface.php new file mode 100644 index 00000000..2cb18766 --- /dev/null +++ b/src/core/jvm/ActiveInterface.php @@ -0,0 +1,19 @@ +reader = $reader; + for ($i = 0; $i < $entries; $i++) { + // not implemented, read only + $this->entries[$i] = $reader->getBinaryReader()->readUnsignedShort(); + } + } +} diff --git a/src/core/jvm/ActiveMethods.php b/src/core/jvm/ActiveMethods.php new file mode 100644 index 00000000..0363ddea --- /dev/null +++ b/src/core/jvm/ActiveMethods.php @@ -0,0 +1,22 @@ +reader = $reader; + for ($i = 0; $i < $entries; $i++) { + // not implemented, read only + $this->entries[$i] = new _MethodInfo($reader); + $this->entries[$i]->setConstantPool($constantPool); + $this->entries[$i]->execute(); + } + } +} diff --git a/src/core/jvm/ConstantPool.php b/src/core/jvm/ConstantPool.php index 4284131a..bcb7a8ec 100644 --- a/src/core/jvm/ConstantPool.php +++ b/src/core/jvm/ConstantPool.php @@ -19,13 +19,26 @@ class ConstantPool { private $entries = []; - private $reader = null; + private $reader; + /** + * @param JavaClassReader $reader + * @param int $entries + * @throws ReadEntryException + */ public function __construct(JavaClassReader $reader, int $entries) { $this->reader = $reader; + for ($i = 1; $i < $entries; $i++) { - $this->entries[$i] = $this->readEntry($reader->getBinaryReader()->readUnsignedByte()); + $this->entries[$i] = $this->read( + $reader->getBinaryReader()->readUnsignedByte() + ); + + // execute + $this->entries[$i]->execute(); + + // Java's Long and Double problem. if ($this->entries[$i] instanceof _Long || $this->entries[$i] instanceof _Double) { $i++; @@ -38,7 +51,7 @@ public function getEntries(): array return $this->entries; } - private function readEntry($entryTag): StructureInterface + private function read($entryTag): ?StructureInterface { switch ($entryTag) { case ConstantPoolTag::CONSTANT_Class: @@ -61,10 +74,10 @@ private function readEntry($entryTag): StructureInterface return new _NameAndType($this->reader); case ConstantPoolTag::CONSTANT_Utf8: return new _Utf8($this->reader); - CASE ConstantPoolTag::CONSTANT_MethodHandle: - CASE ConstantPoolTag::CONSTANT_MethodType: - CASE ConstantPoolTag::CONSTANT_Module: - CASE ConstantPoolTag::CONSTANT_Package: + case ConstantPoolTag::CONSTANT_MethodHandle: + case ConstantPoolTag::CONSTANT_MethodType: + case ConstantPoolTag::CONSTANT_Module: + case ConstantPoolTag::CONSTANT_Package: throw new ReadEntryException('Entry tag ' . sprintf('%x', $entryTag) . ' is not implemented.'); } throw new ReadEntryException('Entry tag ' . sprintf('%x', $entryTag) . ' is not defined.'); diff --git a/src/core/jvm/stream/BinaryReader.php b/src/core/jvm/stream/BinaryReader.php index c65e6e2e..1fc0b590 100644 --- a/src/core/jvm/stream/BinaryReader.php +++ b/src/core/jvm/stream/BinaryReader.php @@ -1,8 +1,6 @@ AttributeNameIndex = $this->getCurrentClass()->readUnsignedShort(); - $this->AttributeLength = $this->getCurrentClass()->readUnsignedInt(); - $cpInfo = $this->getCurrentClass()->getCpInfo(); + $this->AttributeNameIndex = $this->readUnsignedShort(); + $this->AttributeLength = $this->readUnsignedInt(); + $cpInfo = $this->getConstantPool()->getEntries(); $classAttributeName = 'Java' . $cpInfo[$this->AttributeNameIndex]->getString() . 'Attribute'; $this->AttributeData = new $classAttributeName($Class); } diff --git a/src/kernel/attributes/BootstrapMethodsAttribute.php b/src/kernel/attributes/BootstrapMethodsAttribute.php index a23905cc..fdb8ea3d 100644 --- a/src/kernel/attributes/BootstrapMethodsAttribute.php +++ b/src/kernel/attributes/BootstrapMethodsAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class BootstrapMethodsAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/CodeAttribute.php b/src/kernel/attributes/CodeAttribute.php index 81c63596..17a2e5d0 100644 --- a/src/kernel/attributes/CodeAttribute.php +++ b/src/kernel/attributes/CodeAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class CodeAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; private $MaxStack = null; private $MaxLocals = null; @@ -18,27 +19,27 @@ final class CodeAttribute implements AttributeInterface private $AttributeInfo = array(); public function execute(): void { - $this->MaxStack = $this->getCurrentClass()->readUnsignedShort(); - $this->MaxLocals = $this->getCurrentClass()->readUnsignedShort(); - $this->CodeLength = $this->getCurrentClass()->readUnsignedInt(); + $this->MaxStack = $this->readUnsignedShort(); + $this->MaxLocals = $this->readUnsignedShort(); + $this->CodeLength = $this->readUnsignedInt(); // read opcode $this->Code = array(); for ($i = 0; $i < $this->CodeLength; $i++) { - $this->Code[$i] = $this->getCurrentClass()->readUnsignedByte(); + $this->Code[$i] = $this->readUnsignedByte(); $this->RawCode .= chr($this->Code[$i]); } // read exception table - $this->ExceptionTableLength = $this->getCurrentClass()->readUnsignedShort(); + $this->ExceptionTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->ExceptionTableLength; $i++) { - $this->ExceptionTables[$i] = new JavaStructureExceptionTable($this->getCurrentClass()); - $this->ExceptionTables[$i]->setStartPc($this->getCurrentClass()->readUnsignedShort()); - $this->ExceptionTables[$i]->setEndPc($this->getCurrentClass()->readUnsignedShort()); - $this->ExceptionTables[$i]->setHandlerPc($this->getCurrentClass()->readUnsignedShort()); - $this->ExceptionTables[$i]->setCatchType($this->getCurrentClass()->readUnsignedShort()); + $this->ExceptionTables[$i] = new JavaStructureExceptionTable($this); + $this->ExceptionTables[$i]->setStartPc($this->readUnsignedShort()); + $this->ExceptionTables[$i]->setEndPc($this->readUnsignedShort()); + $this->ExceptionTables[$i]->setHandlerPc($this->readUnsignedShort()); + $this->ExceptionTables[$i]->setCatchType($this->readUnsignedShort()); } - $this->AttributesCount = $this->getCurrentClass()->readUnsignedShort(); + $this->AttributesCount = $this->readUnsignedShort(); for ($i = 0; $i < $this->AttributesCount; $i++) { - $this->AttributeInfo[] = new JavaAttributeInfo($this->getCurrentClass()); + $this->AttributeInfo[] = new JavaAttributeInfo($this); } } public function getExceptionTables() diff --git a/src/kernel/attributes/ConstantValueAttribute.php b/src/kernel/attributes/ConstantValueAttribute.php index 7dcde2e4..2c56d561 100644 --- a/src/kernel/attributes/ConstantValueAttribute.php +++ b/src/kernel/attributes/ConstantValueAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class ConstantValueAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/DeprecatedAttribute.php b/src/kernel/attributes/DeprecatedAttribute.php index db959c31..26467c41 100644 --- a/src/kernel/attributes/DeprecatedAttribute.php +++ b/src/kernel/attributes/DeprecatedAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class DeprecatedAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/EnclosingMethodAttribute.php b/src/kernel/attributes/EnclosingMethodAttribute.php index 41cf7c9c..24e19530 100644 --- a/src/kernel/attributes/EnclosingMethodAttribute.php +++ b/src/kernel/attributes/EnclosingMethodAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class EnclosingMethodAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/ExceptionsAttribute.php b/src/kernel/attributes/ExceptionsAttribute.php index 7bae357e..96006000 100644 --- a/src/kernel/attributes/ExceptionsAttribute.php +++ b/src/kernel/attributes/ExceptionsAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class ExceptionsAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/InnerClassesAttribute.php b/src/kernel/attributes/InnerClassesAttribute.php index 07124b49..e3efb4c6 100644 --- a/src/kernel/attributes/InnerClassesAttribute.php +++ b/src/kernel/attributes/InnerClassesAttribute.php @@ -2,26 +2,28 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class InnerClassesAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; private $NumberOfClasses = 0; private $Classes = array(); public function execute(): void { - $this->NumberOfClasses = $this->getCurrentClass()->readUnsignedShort(); + $this->NumberOfClasses = $this->readUnsignedShort(); for ($i = 0; $i < $this->NumberOfClasses; $i++) { - $this->getCurrentClass()es[$i] = new JavaStructureClasses($this->getCurrentClass()); - $this->getCurrentClass()es[$i]->setInnerClassInfoIndex($this->getCurrentClass()->readUnsignedShort()); - $this->getCurrentClass()es[$i]->setOuterClassInfoIndex($this->getCurrentClass()->readUnsignedShort()); - $this->getCurrentClass()es[$i]->setInnerNameIndex($this->getCurrentClass()->readUnsignedShort()); - $this->getCurrentClass()es[$i]->setInnerClassAccessFlag($this->getCurrentClass()->readUnsignedShort()); + $thises[$i] = new JavaStructureClasses($this); + $thises[$i]->setInnerClassInfoIndex($this->readUnsignedShort()); + $thises[$i]->setOuterClassInfoIndex($this->readUnsignedShort()); + $thises[$i]->setInnerNameIndex($this->readUnsignedShort()); + $thises[$i]->setInnerClassAccessFlag($this->readUnsignedShort()); } } - public function getClasses () { - return $this->getCurrentClass()es; + public function getClasses() + { + return $thises; } } diff --git a/src/kernel/attributes/LineNumberTableAttribute.php b/src/kernel/attributes/LineNumberTableAttribute.php index 84980b90..5ea8a2aa 100644 --- a/src/kernel/attributes/LineNumberTableAttribute.php +++ b/src/kernel/attributes/LineNumberTableAttribute.php @@ -2,21 +2,22 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class LineNumberTableAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; private $LineNumberTableLength = null; private $LineNumberTables = null; public function execute(): void { - $this->LineNumberTableLength = $this->getCurrentClass()->readUnsignedShort(); + $this->LineNumberTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->LineNumberTableLength; $i++) { $this->LineNumberTables[$i] = new JavaStructureLineNumberTable($Class); - $this->LineNumberTables[$i]->setStartPc($this->getCurrentClass()->readUnsignedShort()); - $this->LineNumberTables[$i]->setLineNumber($this->getCurrentClass()->readUnsignedShort()); + $this->LineNumberTables[$i]->setStartPc($this->readUnsignedShort()); + $this->LineNumberTables[$i]->setLineNumber($this->readUnsignedShort()); } } public function getLineNumberTables() diff --git a/src/kernel/attributes/LocalVariableTableAttribute.php b/src/kernel/attributes/LocalVariableTableAttribute.php index 61d0fb29..45c339b1 100644 --- a/src/kernel/attributes/LocalVariableTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTableAttribute.php @@ -2,17 +2,18 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class LocalVariableTableAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; private $LocalVariableTableLength; private $LocalVariableTables = array(); public function execute(): void { - $this->LocalVariableTableLength = $this->getCurrentClass()->readUnsignedShort(); + $this->LocalVariableTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->LocalVariableTableLength; $i++) { $this->LocalVariableTables[] = new JavaStructureLocalVariableTable($Class); } diff --git a/src/kernel/attributes/LocalVariableTypeTableAttribute.php b/src/kernel/attributes/LocalVariableTypeTableAttribute.php index 5fcb0ef1..53c8451f 100644 --- a/src/kernel/attributes/LocalVariableTypeTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTypeTableAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class LocalVariableTypeTableAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php index 0af1f769..128006e3 100644 --- a/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleAnnotationsAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class RuntimeInvisibleAnnotationsAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php index cffaf580..14aeeb30 100644 --- a/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeInvisibleParameterAnnotationsAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class RuntimeInvisibleParameterAnnotationsAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php index 5f01842d..95de7ac3 100644 --- a/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class RuntimeVisibleAnnotationsAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php index fc7ac398..b21ccfa7 100644 --- a/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php +++ b/src/kernel/attributes/RuntimeVisibleParameterAnnotationsAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class RuntimeVisibleParameterAnnotationsAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/SignatureAttribute.php b/src/kernel/attributes/SignatureAttribute.php index b200ccd2..7a7a5741 100644 --- a/src/kernel/attributes/SignatureAttribute.php +++ b/src/kernel/attributes/SignatureAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class SignatureAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/SourceDebugExtensionAttribute.php b/src/kernel/attributes/SourceDebugExtensionAttribute.php index 94ed3f1d..ae7d5fa7 100644 --- a/src/kernel/attributes/SourceDebugExtensionAttribute.php +++ b/src/kernel/attributes/SourceDebugExtensionAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class SourceDebugExtensionAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/attributes/SourceFileAttribute.php b/src/kernel/attributes/SourceFileAttribute.php index e132a989..a0de01f6 100644 --- a/src/kernel/attributes/SourceFileAttribute.php +++ b/src/kernel/attributes/SourceFileAttribute.php @@ -2,16 +2,17 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class SourceFileAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; private $SourceFileIndex = null; public function execute(): void { - $this->SourceFileIndex = $this->getCurrentClass()->readUnsignedShort(); + $this->SourceFileIndex = $this->readUnsignedShort(); } public function getSourceFileIndex() { diff --git a/src/kernel/attributes/StackMapTableAttribute.php b/src/kernel/attributes/StackMapTableAttribute.php index 56339a0a..c783f1c5 100644 --- a/src/kernel/attributes/StackMapTableAttribute.php +++ b/src/kernel/attributes/StackMapTableAttribute.php @@ -2,17 +2,18 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class StackMapTableAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; private $NumberOfEntries = null; private $StackMapFrames = array(); public function execute(): void { - $this->NumberOfEntries = $this->getCurrentClass()->readUnsignedShort(); + $this->NumberOfEntries = $this->readUnsignedShort(); for ($i = 0; $i < $this->NumberOfEntries; $i++) { $this->StackMapFrames[] = new JavaStructureStackMapFrame($Class); } diff --git a/src/kernel/attributes/SyntheticAttribute.php b/src/kernel/attributes/SyntheticAttribute.php index 9364b482..0986f79c 100644 --- a/src/kernel/attributes/SyntheticAttribute.php +++ b/src/kernel/attributes/SyntheticAttribute.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\Attributes; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class SyntheticAttribute implements AttributeInterface { use \PHPJava\Kernel\Core\BinaryReader; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { diff --git a/src/kernel/core/ConstantPool.php b/src/kernel/core/ConstantPool.php new file mode 100644 index 00000000..04938c30 --- /dev/null +++ b/src/kernel/core/ConstantPool.php @@ -0,0 +1,17 @@ +constantPool = $constantPool; + } + + public function getConstantPool(): \PHPJava\Core\JVM\ConstantPool + { + return $this->constantPool; + } +} diff --git a/src/kernel/opcode/_aaload.php b/src/kernel/opcode/_aaload.php index fd5ef94c..787212f0 100644 --- a/src/kernel/opcode/_aaload.php +++ b/src/kernel/opcode/_aaload.php @@ -2,28 +2,25 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _aaload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * load onto the stack a reference from an array */ public function execute(): void - { + { $index = $this->getStack(); $arrayref = $this->getStack(); if (!isset($arrayref[$index])) { - throw new JavaArrayIndexOutOfBoundsException($this->getMethodName() . ': ' . $index . ' of array index'); - } $this->pushStack($arrayref[$index]); - } - -} +} diff --git a/src/kernel/opcode/_aastore.php b/src/kernel/opcode/_aastore.php index ca1ac9a8..2e34a74a 100644 --- a/src/kernel/opcode/_aastore.php +++ b/src/kernel/opcode/_aastore.php @@ -2,23 +2,22 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _aastore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * store into a reference in an array */ public function execute(): void { - $value = $this->getStack(); + $value = $this->getStack(); $index = $this->getStack(); $arrayref = $this->getStack(); $arrayref[$index] = $value; - } - -} +} diff --git a/src/kernel/opcode/_aconst_null.php b/src/kernel/opcode/_aconst_null.php index 6ee8cda2..e503852a 100644 --- a/src/kernel/opcode/_aconst_null.php +++ b/src/kernel/opcode/_aconst_null.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _aconst_null implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * store into a reference in an array @@ -14,7 +15,5 @@ final class _aconst_null implements OpCodeInterface public function execute(): void { $this->pushStack(null); - } - -} +} diff --git a/src/kernel/opcode/_aload.php b/src/kernel/opcode/_aload.php index 1f6f156e..f3cc2728 100644 --- a/src/kernel/opcode/_aload.php +++ b/src/kernel/opcode/_aload.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _aload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * load a reference onto the stack from a local variable #index @@ -16,7 +17,5 @@ public function execute(): void $index = $this->getByteCodeStream()->readByte(); $this->pushStack($this->getLocalstorage($index)); - } - } diff --git a/src/kernel/opcode/_aload_0.php b/src/kernel/opcode/_aload_0.php index ea153dfa..4a83f8a5 100644 --- a/src/kernel/opcode/_aload_0.php +++ b/src/kernel/opcode/_aload_0.php @@ -2,19 +2,18 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _aload_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * load a reference onto the stack from local variable 0 */ public function execute(): void - { + { $this->pushStack($this->getLocalstorage(0)); - } - -} +} diff --git a/src/kernel/opcode/_aload_1.php b/src/kernel/opcode/_aload_1.php index 7f27daa5..9afd2cda 100644 --- a/src/kernel/opcode/_aload_1.php +++ b/src/kernel/opcode/_aload_1.php @@ -2,20 +2,18 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _aload_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * load a reference onto the stack from local variable 1 */ public function execute(): void - { + { $this->pushStack($this->getLocalstorage(1)); - - } - -} +} diff --git a/src/kernel/opcode/_aload_2.php b/src/kernel/opcode/_aload_2.php index 62a277c3..6bdd267b 100644 --- a/src/kernel/opcode/_aload_2.php +++ b/src/kernel/opcode/_aload_2.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _aload_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * load a reference onto the stack from local variable 2 @@ -14,7 +15,5 @@ final class _aload_2 implements OpCodeInterface public function execute(): void { $this->pushStack($this->getLocalstorage(2)); - } - -} +} diff --git a/src/kernel/opcode/_aload_3.php b/src/kernel/opcode/_aload_3.php index 2f07ada5..957f1e90 100644 --- a/src/kernel/opcode/_aload_3.php +++ b/src/kernel/opcode/_aload_3.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _aload_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * load a reference onto the stack from local variable 3 @@ -14,7 +15,5 @@ final class _aload_3 implements OpCodeInterface public function execute(): void { $this->pushStack($this->getLocalstorage(3)); - } - -} +} diff --git a/src/kernel/opcode/_anewarray.php b/src/kernel/opcode/_anewarray.php index 7dc350e8..8de168cc 100644 --- a/src/kernel/opcode/_anewarray.php +++ b/src/kernel/opcode/_anewarray.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _anewarray implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * create a new array of references of length count and component @@ -14,7 +15,7 @@ final class _anewarray implements OpCodeInterface * in the constant pool */ public function execute(): void - { + { // 配列のサイズを調べる (PHPでは不要なので実行するだけ) $this->getByteCodeStream()->readUnsignedShort(); @@ -23,7 +24,5 @@ public function execute(): void // need reference $ref = new ArrayIterator(array_fill(0, $count, null)); $this->pushStackByReference($ref); - } - -} +} diff --git a/src/kernel/opcode/_areturn.php b/src/kernel/opcode/_areturn.php index e8dfc654..822170bd 100644 --- a/src/kernel/opcode/_areturn.php +++ b/src/kernel/opcode/_areturn.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _areturn implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { return new \java\lang\String((string) $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_arraylength.php b/src/kernel/opcode/_arraylength.php index 00c3a79d..dee42d82 100644 --- a/src/kernel/opcode/_arraylength.php +++ b/src/kernel/opcode/_arraylength.php @@ -2,18 +2,17 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _arraylength implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $arrayref = $this->getStack(); $this->pushStack(sizeof($arrayref)); - } - -} +} diff --git a/src/kernel/opcode/_astore.php b/src/kernel/opcode/_astore.php index 3dc59532..3bbb9aed 100644 --- a/src/kernel/opcode/_astore.php +++ b/src/kernel/opcode/_astore.php @@ -2,17 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _astore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_astore_0.php b/src/kernel/opcode/_astore_0.php index 57697b04..98b43613 100644 --- a/src/kernel/opcode/_astore_0.php +++ b/src/kernel/opcode/_astore_0.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _astore_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(0, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_astore_1.php b/src/kernel/opcode/_astore_1.php index 304f8b37..322f3d47 100644 --- a/src/kernel/opcode/_astore_1.php +++ b/src/kernel/opcode/_astore_1.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _astore_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(1, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_astore_2.php b/src/kernel/opcode/_astore_2.php index 5fee1c79..b2d53599 100644 --- a/src/kernel/opcode/_astore_2.php +++ b/src/kernel/opcode/_astore_2.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _astore_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(2, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_astore_3.php b/src/kernel/opcode/_astore_3.php index 32cfdd1c..2e5fc779 100644 --- a/src/kernel/opcode/_astore_3.php +++ b/src/kernel/opcode/_astore_3.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _astore_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(3, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_athrow.php b/src/kernel/opcode/_athrow.php index d9d59548..a9a21b54 100644 --- a/src/kernel/opcode/_athrow.php +++ b/src/kernel/opcode/_athrow.php @@ -2,35 +2,30 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _athrow implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { - $cpInfo = $this->getCpInfo(); + $cpInfo = $this->getConstantPool()->getEntries(); $objectref = $this->getStack(); $className = str_replace('\\', '/', get_class($objectref)); foreach ($this->getAttributeData()->getExceptionTables() as $exception) { - if ($cpInfo[$cpInfo[$exception->getCatchType()]->getClassIndex()]->getString() === $className && $exception->getStartPc() <= $this->getPointer() && $exception->getEndPc() >= $this->getPointer()) { - $this->getByteCodeStream()->setOffset($exception->getHandlerPc()); return; - } - } throw new Exception('exception table was broken.'); - } - } diff --git a/src/kernel/opcode/_baload.php b/src/kernel/opcode/_baload.php index 44e2f4bf..55f715c5 100644 --- a/src/kernel/opcode/_baload.php +++ b/src/kernel/opcode/_baload.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _baload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_bastore.php b/src/kernel/opcode/_bastore.php index 36075f24..6fa7bfe4 100644 --- a/src/kernel/opcode/_bastore.php +++ b/src/kernel/opcode/_bastore.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _bastore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_bipush.php b/src/kernel/opcode/_bipush.php index 552bba09..9dc97566 100644 --- a/src/kernel/opcode/_bipush.php +++ b/src/kernel/opcode/_bipush.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _bipush implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->pushStack($this->getByteCodeStream()->readByte()); - } - } diff --git a/src/kernel/opcode/_breakpoint.php b/src/kernel/opcode/_breakpoint.php index e9f5fa16..fc66b872 100644 --- a/src/kernel/opcode/_breakpoint.php +++ b/src/kernel/opcode/_breakpoint.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _breakpoint implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_caload.php b/src/kernel/opcode/_caload.php index 6e4b9022..9aab8e9c 100644 --- a/src/kernel/opcode/_caload.php +++ b/src/kernel/opcode/_caload.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _caload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_castore.php b/src/kernel/opcode/_castore.php index 4813b353..5676a1c8 100644 --- a/src/kernel/opcode/_castore.php +++ b/src/kernel/opcode/_castore.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _castore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_checkcast.php b/src/kernel/opcode/_checkcast.php index f157d643..a2eeaf51 100644 --- a/src/kernel/opcode/_checkcast.php +++ b/src/kernel/opcode/_checkcast.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _checkcast implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_d2f.php b/src/kernel/opcode/_d2f.php index f72a58f6..7fff4d7e 100644 --- a/src/kernel/opcode/_d2f.php +++ b/src/kernel/opcode/_d2f.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _d2f implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_d2i.php b/src/kernel/opcode/_d2i.php index ff696086..84c3f147 100644 --- a/src/kernel/opcode/_d2i.php +++ b/src/kernel/opcode/_d2i.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _d2i implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_d2l.php b/src/kernel/opcode/_d2l.php index bf7ebbe1..d87ae479 100644 --- a/src/kernel/opcode/_d2l.php +++ b/src/kernel/opcode/_d2l.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _d2l implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dadd.php b/src/kernel/opcode/_dadd.php index 614700c8..f22e0267 100644 --- a/src/kernel/opcode/_dadd.php +++ b/src/kernel/opcode/_dadd.php @@ -2,19 +2,18 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dadd implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $value1 = $this->getStack(); $value2 = $this->getStack(); $this->pushStack(BinaryTool::add($value1, $value2, 8)); - } - -} +} diff --git a/src/kernel/opcode/_daload.php b/src/kernel/opcode/_daload.php index 16a9e674..73f4e86c 100644 --- a/src/kernel/opcode/_daload.php +++ b/src/kernel/opcode/_daload.php @@ -2,22 +2,21 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _daload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * load a double from an array */ public function execute(): void - { + { $index = $this->getStack(); $arrayref = $this->getStack(); $this->pushStack($arrayref[$index]); - } - -} +} diff --git a/src/kernel/opcode/_dastore.php b/src/kernel/opcode/_dastore.php index 4aaa361b..a698c136 100644 --- a/src/kernel/opcode/_dastore.php +++ b/src/kernel/opcode/_dastore.php @@ -2,23 +2,22 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dastore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * store a double into an array */ public function execute(): void - { - $value = $this->getStack(); + { + $value = $this->getStack(); $index = $this->getStack(); $arrayref = $this->getStack(); $arrayref[$index] = $value; - } - -} +} diff --git a/src/kernel/opcode/_dcmpg.php b/src/kernel/opcode/_dcmpg.php index 4bb534ec..3cd6b5c0 100644 --- a/src/kernel/opcode/_dcmpg.php +++ b/src/kernel/opcode/_dcmpg.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dcmpg implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dcmpl.php b/src/kernel/opcode/_dcmpl.php index 4c50ceb8..ca586936 100644 --- a/src/kernel/opcode/_dcmpl.php +++ b/src/kernel/opcode/_dcmpl.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dcmpl implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dconst_0.php b/src/kernel/opcode/_dconst_0.php index 27d59491..6026e3fe 100644 --- a/src/kernel/opcode/_dconst_0.php +++ b/src/kernel/opcode/_dconst_0.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dconst_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->pushStack(0); - } - -} +} diff --git a/src/kernel/opcode/_dconst_1.php b/src/kernel/opcode/_dconst_1.php index 31690a34..f73dfa73 100644 --- a/src/kernel/opcode/_dconst_1.php +++ b/src/kernel/opcode/_dconst_1.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dconst_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->pushStack(1); - } - -} +} diff --git a/src/kernel/opcode/_ddiv.php b/src/kernel/opcode/_ddiv.php index 501adf20..d736c05d 100644 --- a/src/kernel/opcode/_ddiv.php +++ b/src/kernel/opcode/_ddiv.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ddiv implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dload.php b/src/kernel/opcode/_dload.php index 8e4e2e2f..9682fd5c 100644 --- a/src/kernel/opcode/_dload.php +++ b/src/kernel/opcode/_dload.php @@ -2,20 +2,19 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * load a double value from a local variable #index */ public function execute(): void - { + { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); - } - -} +} diff --git a/src/kernel/opcode/_dload_0.php b/src/kernel/opcode/_dload_0.php index 2d244c3e..752a09f7 100644 --- a/src/kernel/opcode/_dload_0.php +++ b/src/kernel/opcode/_dload_0.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dload_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dload_1.php b/src/kernel/opcode/_dload_1.php index 624028f2..3602b42f 100644 --- a/src/kernel/opcode/_dload_1.php +++ b/src/kernel/opcode/_dload_1.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dload_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dload_2.php b/src/kernel/opcode/_dload_2.php index 6f812f1b..e1626147 100644 --- a/src/kernel/opcode/_dload_2.php +++ b/src/kernel/opcode/_dload_2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dload_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dload_3.php b/src/kernel/opcode/_dload_3.php index 1b0b2a48..605e3bb4 100644 --- a/src/kernel/opcode/_dload_3.php +++ b/src/kernel/opcode/_dload_3.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dload_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dmul.php b/src/kernel/opcode/_dmul.php index c34df253..1554277e 100644 --- a/src/kernel/opcode/_dmul.php +++ b/src/kernel/opcode/_dmul.php @@ -2,21 +2,18 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dmul implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $value1 = $this->getStack(); $value2 = $this->getStack(); $this->pushStack(BinaryTool::multiply($value1, $value2, 8)); - - - } - -} +} diff --git a/src/kernel/opcode/_dneg.php b/src/kernel/opcode/_dneg.php index 0e1298e3..bed1d1c8 100644 --- a/src/kernel/opcode/_dneg.php +++ b/src/kernel/opcode/_dneg.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dneg implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_drem.php b/src/kernel/opcode/_drem.php index 652fa0b8..ead735af 100644 --- a/src/kernel/opcode/_drem.php +++ b/src/kernel/opcode/_drem.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _drem implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dreturn.php b/src/kernel/opcode/_dreturn.php index 46a43de9..1530b488 100644 --- a/src/kernel/opcode/_dreturn.php +++ b/src/kernel/opcode/_dreturn.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dreturn implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { return new JavaTypeDouble($this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_dstore.php b/src/kernel/opcode/_dstore.php index 1a52faaa..7fc7ed66 100644 --- a/src/kernel/opcode/_dstore.php +++ b/src/kernel/opcode/_dstore.php @@ -2,22 +2,21 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dstore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * store a double value into a local variable #index */ public function execute(): void - { + { $index = $this->getByteCodeStream()->readUnsignedByte(); $value = $this->getStack(); $this->setLocalstorage($index, BinaryTool::convertDoubleToIEEE754($value)); - } - -} +} diff --git a/src/kernel/opcode/_dstore_0.php b/src/kernel/opcode/_dstore_0.php index bcbb3f92..c8492f06 100644 --- a/src/kernel/opcode/_dstore_0.php +++ b/src/kernel/opcode/_dstore_0.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dstore_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(0, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_dstore_1.php b/src/kernel/opcode/_dstore_1.php index a4d4d909..51d4c0aa 100644 --- a/src/kernel/opcode/_dstore_1.php +++ b/src/kernel/opcode/_dstore_1.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dstore_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(1, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_dstore_2.php b/src/kernel/opcode/_dstore_2.php index 9f8e3c09..b0e64b58 100644 --- a/src/kernel/opcode/_dstore_2.php +++ b/src/kernel/opcode/_dstore_2.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dstore_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(2, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_dstore_3.php b/src/kernel/opcode/_dstore_3.php index 5769b3a9..819ff930 100644 --- a/src/kernel/opcode/_dstore_3.php +++ b/src/kernel/opcode/_dstore_3.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dstore_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->setLocalstorage(3, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_dsub.php b/src/kernel/opcode/_dsub.php index 3f23db39..ac04594e 100644 --- a/src/kernel/opcode/_dsub.php +++ b/src/kernel/opcode/_dsub.php @@ -2,19 +2,18 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dsub implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $leftValue = $this->getStack(); $rightValue = $this->getStack(); $this->pushStack(BinaryTool::sub($leftValue, $rightValue, 8)); - } - -} +} diff --git a/src/kernel/opcode/_dup.php b/src/kernel/opcode/_dup.php index 07674530..de73ae63 100644 --- a/src/kernel/opcode/_dup.php +++ b/src/kernel/opcode/_dup.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dup implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->dupStack(); - } - -} +} diff --git a/src/kernel/opcode/_dup2.php b/src/kernel/opcode/_dup2.php index 330eff2a..aca5f1d7 100644 --- a/src/kernel/opcode/_dup2.php +++ b/src/kernel/opcode/_dup2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dup2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dup2_x1.php b/src/kernel/opcode/_dup2_x1.php index 1395d45f..092f95bd 100644 --- a/src/kernel/opcode/_dup2_x1.php +++ b/src/kernel/opcode/_dup2_x1.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dup2_x1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dup2_x2.php b/src/kernel/opcode/_dup2_x2.php index 0d07797d..8187fd1f 100644 --- a/src/kernel/opcode/_dup2_x2.php +++ b/src/kernel/opcode/_dup2_x2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dup2_x2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dup_x1.php b/src/kernel/opcode/_dup_x1.php index 96e93269..b08f9cb4 100644 --- a/src/kernel/opcode/_dup_x1.php +++ b/src/kernel/opcode/_dup_x1.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dup_x1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_dup_x2.php b/src/kernel/opcode/_dup_x2.php index 7fa501fc..3f51279f 100644 --- a/src/kernel/opcode/_dup_x2.php +++ b/src/kernel/opcode/_dup_x2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _dup_x2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_f2d.php b/src/kernel/opcode/_f2d.php index 3475625c..cc6522d4 100644 --- a/src/kernel/opcode/_f2d.php +++ b/src/kernel/opcode/_f2d.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _f2d implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_f2i.php b/src/kernel/opcode/_f2i.php index 21427469..70b72c0e 100644 --- a/src/kernel/opcode/_f2i.php +++ b/src/kernel/opcode/_f2i.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _f2i implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_f2l.php b/src/kernel/opcode/_f2l.php index 847a71a7..75c5ed02 100644 --- a/src/kernel/opcode/_f2l.php +++ b/src/kernel/opcode/_f2l.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _f2l implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fadd.php b/src/kernel/opcode/_fadd.php index dc45d8fb..6b699230 100644 --- a/src/kernel/opcode/_fadd.php +++ b/src/kernel/opcode/_fadd.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fadd implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_faload.php b/src/kernel/opcode/_faload.php index eec04aa6..e96d45fb 100644 --- a/src/kernel/opcode/_faload.php +++ b/src/kernel/opcode/_faload.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _faload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fastore.php b/src/kernel/opcode/_fastore.php index d7023f7c..9dcb7819 100644 --- a/src/kernel/opcode/_fastore.php +++ b/src/kernel/opcode/_fastore.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fastore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fcmpg.php b/src/kernel/opcode/_fcmpg.php index 0d675a2d..dcac7862 100644 --- a/src/kernel/opcode/_fcmpg.php +++ b/src/kernel/opcode/_fcmpg.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fcmpg implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fcmpl.php b/src/kernel/opcode/_fcmpl.php index 716b96c5..2ff510a3 100644 --- a/src/kernel/opcode/_fcmpl.php +++ b/src/kernel/opcode/_fcmpl.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fcmpl implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fconst_0.php b/src/kernel/opcode/_fconst_0.php index f2d36be0..09d5f2cd 100644 --- a/src/kernel/opcode/_fconst_0.php +++ b/src/kernel/opcode/_fconst_0.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fconst_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fconst_1.php b/src/kernel/opcode/_fconst_1.php index 93c24e7e..bcc0abce 100644 --- a/src/kernel/opcode/_fconst_1.php +++ b/src/kernel/opcode/_fconst_1.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fconst_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fconst_2.php b/src/kernel/opcode/_fconst_2.php index 01d22be0..29540a3e 100644 --- a/src/kernel/opcode/_fconst_2.php +++ b/src/kernel/opcode/_fconst_2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fconst_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fdiv.php b/src/kernel/opcode/_fdiv.php index e1c47ca2..a4f29dd6 100644 --- a/src/kernel/opcode/_fdiv.php +++ b/src/kernel/opcode/_fdiv.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fdiv implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fload.php b/src/kernel/opcode/_fload.php index f34c472c..02aacbc5 100644 --- a/src/kernel/opcode/_fload.php +++ b/src/kernel/opcode/_fload.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fload_0.php b/src/kernel/opcode/_fload_0.php index 7db0a6e4..4d82c2b0 100644 --- a/src/kernel/opcode/_fload_0.php +++ b/src/kernel/opcode/_fload_0.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fload_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fload_1.php b/src/kernel/opcode/_fload_1.php index 392cd657..ff130ac6 100644 --- a/src/kernel/opcode/_fload_1.php +++ b/src/kernel/opcode/_fload_1.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fload_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fload_2.php b/src/kernel/opcode/_fload_2.php index 72e29a07..33d2947d 100644 --- a/src/kernel/opcode/_fload_2.php +++ b/src/kernel/opcode/_fload_2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fload_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fload_3.php b/src/kernel/opcode/_fload_3.php index 61a81cd3..bc6a2018 100644 --- a/src/kernel/opcode/_fload_3.php +++ b/src/kernel/opcode/_fload_3.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fload_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fmul.php b/src/kernel/opcode/_fmul.php index 50634889..f1c6ff8d 100644 --- a/src/kernel/opcode/_fmul.php +++ b/src/kernel/opcode/_fmul.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fmul implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fneg.php b/src/kernel/opcode/_fneg.php index 3bc50100..f91ee2ee 100644 --- a/src/kernel/opcode/_fneg.php +++ b/src/kernel/opcode/_fneg.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fneg implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_frem.php b/src/kernel/opcode/_frem.php index 9883e693..53c9087f 100644 --- a/src/kernel/opcode/_frem.php +++ b/src/kernel/opcode/_frem.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _frem implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_freturn.php b/src/kernel/opcode/_freturn.php index 7c88754b..5047c78e 100644 --- a/src/kernel/opcode/_freturn.php +++ b/src/kernel/opcode/_freturn.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _freturn implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { return new JavaTypeFloat($this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_fstore.php b/src/kernel/opcode/_fstore.php index 05bd5bd3..91c06eb3 100644 --- a/src/kernel/opcode/_fstore.php +++ b/src/kernel/opcode/_fstore.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fstore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fstore_0.php b/src/kernel/opcode/_fstore_0.php index b1de70f7..e9b152d2 100644 --- a/src/kernel/opcode/_fstore_0.php +++ b/src/kernel/opcode/_fstore_0.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fstore_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fstore_1.php b/src/kernel/opcode/_fstore_1.php index 0279a5c6..5d7388d1 100644 --- a/src/kernel/opcode/_fstore_1.php +++ b/src/kernel/opcode/_fstore_1.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fstore_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fstore_2.php b/src/kernel/opcode/_fstore_2.php index f7b9c784..fd39496e 100644 --- a/src/kernel/opcode/_fstore_2.php +++ b/src/kernel/opcode/_fstore_2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fstore_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fstore_3.php b/src/kernel/opcode/_fstore_3.php index 6a3f3313..14b86834 100644 --- a/src/kernel/opcode/_fstore_3.php +++ b/src/kernel/opcode/_fstore_3.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fstore_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_fsub.php b/src/kernel/opcode/_fsub.php index 1a0a0752..e7b165b3 100644 --- a/src/kernel/opcode/_fsub.php +++ b/src/kernel/opcode/_fsub.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _fsub implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_getfield.php b/src/kernel/opcode/_getfield.php index 19fdf38a..656dc76c 100644 --- a/src/kernel/opcode/_getfield.php +++ b/src/kernel/opcode/_getfield.php @@ -2,15 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _getfield implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { - $cpInfo = $this->getCpInfo(); + $cpInfo = $this->getConstantPool()->getEntries(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -19,15 +20,9 @@ public function execute(): void $return = $get->getInstance($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()); if ($return !== null) { - $this->pushStack($return); - } else { - throw new Exception('Cannot get ' . $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() . ''); - } - } - } diff --git a/src/kernel/opcode/_getstatic.php b/src/kernel/opcode/_getstatic.php index 91a83e3a..8c189988 100644 --- a/src/kernel/opcode/_getstatic.php +++ b/src/kernel/opcode/_getstatic.php @@ -2,15 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _getstatic implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { - $cpInfo = $this->getCpInfo(); + $cpInfo = $this->getConstantPool()->getEntries(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -19,32 +20,24 @@ public function execute(): void $signature = JavaClass::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); foreach ($this->getInvoker()->getClass()->getFields() as $field) { - if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { // push stack $this->pushStack($this->getInvoker()->getClass()->getStatic($cpInfo[$field->getNameIndex()]->getString())); return; - } - } if (isset($signature[0]['className'])) { - $this->getInvoker()->loadPlatform($class); $this->getInvoker()->loadPlatform($signature[0]['className']); $className = str_replace('/', '\\', $signature[0]['className']); $this->pushStack(new $className()); return; - } throw new Exception('Has not class or field'); - - } - -} +} diff --git a/src/kernel/opcode/_goto.php b/src/kernel/opcode/_goto.php index 19080187..e160e529 100644 --- a/src/kernel/opcode/_goto.php +++ b/src/kernel/opcode/_goto.php @@ -2,18 +2,17 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _goto implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $offset = $this->getByteCodeStream()->readShort(); $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - -} +} diff --git a/src/kernel/opcode/_goto_w.php b/src/kernel/opcode/_goto_w.php index 5fb51d58..610eafd6 100644 --- a/src/kernel/opcode/_goto_w.php +++ b/src/kernel/opcode/_goto_w.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _goto_w implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_i2b.php b/src/kernel/opcode/_i2b.php index 741b8652..02ac47b7 100644 --- a/src/kernel/opcode/_i2b.php +++ b/src/kernel/opcode/_i2b.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _i2b implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_i2c.php b/src/kernel/opcode/_i2c.php index 71cc1a27..9d1f0990 100644 --- a/src/kernel/opcode/_i2c.php +++ b/src/kernel/opcode/_i2c.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _i2c implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_i2d.php b/src/kernel/opcode/_i2d.php index 60245928..da1120af 100644 --- a/src/kernel/opcode/_i2d.php +++ b/src/kernel/opcode/_i2d.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _i2d implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_i2f.php b/src/kernel/opcode/_i2f.php index 78f9b45e..eccab598 100644 --- a/src/kernel/opcode/_i2f.php +++ b/src/kernel/opcode/_i2f.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _i2f implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_i2l.php b/src/kernel/opcode/_i2l.php index fd3958c6..499ca83e 100644 --- a/src/kernel/opcode/_i2l.php +++ b/src/kernel/opcode/_i2l.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _i2l implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_i2s.php b/src/kernel/opcode/_i2s.php index 2706fbbb..3f54e471 100644 --- a/src/kernel/opcode/_i2s.php +++ b/src/kernel/opcode/_i2s.php @@ -2,18 +2,17 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _i2s implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $value = $this->getStack(); $this->pushStack(base_convert(substr(sprintf('%032s', base_convert($value, 10, 2)), 16), 2, 10)); - } - } diff --git a/src/kernel/opcode/_iadd.php b/src/kernel/opcode/_iadd.php index 1e160ac4..0018eca1 100644 --- a/src/kernel/opcode/_iadd.php +++ b/src/kernel/opcode/_iadd.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iadd implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $rightValue = $this->getStack(); $this->pushStack(BinaryTool::add($leftValue, $rightValue, 4)); - } - } diff --git a/src/kernel/opcode/_iaload.php b/src/kernel/opcode/_iaload.php index ca48b13f..d50f65ad 100644 --- a/src/kernel/opcode/_iaload.php +++ b/src/kernel/opcode/_iaload.php @@ -2,19 +2,18 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iaload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $index = $this->getStack(); $arrayref = $this->getStack(); $this->pushStack($arrayref[$index]); - } - -} +} diff --git a/src/kernel/opcode/_iand.php b/src/kernel/opcode/_iand.php index 6edbae9b..70788d85 100644 --- a/src/kernel/opcode/_iand.php +++ b/src/kernel/opcode/_iand.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iand implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::andBits($value1, $value2, 4)); - } - } diff --git a/src/kernel/opcode/_iastore.php b/src/kernel/opcode/_iastore.php index 67498dfa..aef74e96 100644 --- a/src/kernel/opcode/_iastore.php +++ b/src/kernel/opcode/_iastore.php @@ -2,20 +2,19 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iastore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $data = $this->getStack(); $arrayref = $this->getStack(); $value = $this->getStack(); $value[$arrayref] = $data; - } - -} +} diff --git a/src/kernel/opcode/_iconst_0.php b/src/kernel/opcode/_iconst_0.php index 8eff491b..8c057957 100644 --- a/src/kernel/opcode/_iconst_0.php +++ b/src/kernel/opcode/_iconst_0.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iconst_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->pushStack(0); - } - -} +} diff --git a/src/kernel/opcode/_iconst_1.php b/src/kernel/opcode/_iconst_1.php index 0198ff30..f0881a52 100644 --- a/src/kernel/opcode/_iconst_1.php +++ b/src/kernel/opcode/_iconst_1.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iconst_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->pushStack(1); - } - -} +} diff --git a/src/kernel/opcode/_iconst_2.php b/src/kernel/opcode/_iconst_2.php index 88d4196d..b00ceb80 100644 --- a/src/kernel/opcode/_iconst_2.php +++ b/src/kernel/opcode/_iconst_2.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iconst_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->pushStack(2); - } - -} +} diff --git a/src/kernel/opcode/_iconst_3.php b/src/kernel/opcode/_iconst_3.php index 0c21b355..07a52a1d 100644 --- a/src/kernel/opcode/_iconst_3.php +++ b/src/kernel/opcode/_iconst_3.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iconst_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->pushStack(3); - } - -} +} diff --git a/src/kernel/opcode/_iconst_4.php b/src/kernel/opcode/_iconst_4.php index a94c8372..9802a3ce 100644 --- a/src/kernel/opcode/_iconst_4.php +++ b/src/kernel/opcode/_iconst_4.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iconst_4 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->pushStack(4); - } - -} +} diff --git a/src/kernel/opcode/_iconst_5.php b/src/kernel/opcode/_iconst_5.php index 57f9e18c..d5fe2e98 100644 --- a/src/kernel/opcode/_iconst_5.php +++ b/src/kernel/opcode/_iconst_5.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iconst_5 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->pushStack(5); - } - -} +} diff --git a/src/kernel/opcode/_iconst_m1.php b/src/kernel/opcode/_iconst_m1.php index bffed3c4..1519a7cd 100644 --- a/src/kernel/opcode/_iconst_m1.php +++ b/src/kernel/opcode/_iconst_m1.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iconst_m1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->pushStack(-1); - } - -} +} diff --git a/src/kernel/opcode/_idiv.php b/src/kernel/opcode/_idiv.php index 2cea3818..1a1e0a23 100644 --- a/src/kernel/opcode/_idiv.php +++ b/src/kernel/opcode/_idiv.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _idiv implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_if_acmpeq.php b/src/kernel/opcode/_if_acmpeq.php index fbaa811c..199f9d6b 100644 --- a/src/kernel/opcode/_if_acmpeq.php +++ b/src/kernel/opcode/_if_acmpeq.php @@ -2,25 +2,22 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _if_acmpeq implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand === $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/opcode/_if_acmpne.php b/src/kernel/opcode/_if_acmpne.php index 02822b7c..c1986628 100644 --- a/src/kernel/opcode/_if_acmpne.php +++ b/src/kernel/opcode/_if_acmpne.php @@ -2,25 +2,22 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _if_acmpne implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand !== $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/opcode/_if_icmpeq.php b/src/kernel/opcode/_if_icmpeq.php index 8871ef6d..ef9e518f 100644 --- a/src/kernel/opcode/_if_icmpeq.php +++ b/src/kernel/opcode/_if_icmpeq.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _if_icmpeq implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_if_icmpge.php b/src/kernel/opcode/_if_icmpge.php index 1bc568f6..fe1970bd 100644 --- a/src/kernel/opcode/_if_icmpge.php +++ b/src/kernel/opcode/_if_icmpge.php @@ -2,26 +2,22 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _if_icmpge implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { - + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand <= $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/opcode/_if_icmpgt.php b/src/kernel/opcode/_if_icmpgt.php index efb1dde2..c8951b82 100644 --- a/src/kernel/opcode/_if_icmpgt.php +++ b/src/kernel/opcode/_if_icmpgt.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _if_icmpgt implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -16,12 +17,7 @@ public function execute(): void $rightOperand = $this->getStack(); if ($leftOperand < $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - - } - -} +} diff --git a/src/kernel/opcode/_if_icmple.php b/src/kernel/opcode/_if_icmple.php index 334c9e93..6ba6f4d6 100644 --- a/src/kernel/opcode/_if_icmple.php +++ b/src/kernel/opcode/_if_icmple.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _if_icmple implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_if_icmplt.php b/src/kernel/opcode/_if_icmplt.php index b85e216d..c4807357 100644 --- a/src/kernel/opcode/_if_icmplt.php +++ b/src/kernel/opcode/_if_icmplt.php @@ -2,24 +2,22 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _if_icmplt implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($rightOperand < $leftOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } } - -} +} diff --git a/src/kernel/opcode/_if_icmpne.php b/src/kernel/opcode/_if_icmpne.php index 804de06f..e372525c 100644 --- a/src/kernel/opcode/_if_icmpne.php +++ b/src/kernel/opcode/_if_icmpne.php @@ -2,25 +2,22 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _if_icmpne implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand != $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/opcode/_ifeq.php b/src/kernel/opcode/_ifeq.php index 709d3b8c..05a32cf7 100644 --- a/src/kernel/opcode/_ifeq.php +++ b/src/kernel/opcode/_ifeq.php @@ -2,25 +2,21 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ifeq implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $offset = $this->getByteCodeStream()->readShort(); $operand = $this->getStack(); if ($operand == 0) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - - } - -} +} diff --git a/src/kernel/opcode/_ifge.php b/src/kernel/opcode/_ifge.php index 39be59c4..d5124a90 100644 --- a/src/kernel/opcode/_ifge.php +++ b/src/kernel/opcode/_ifge.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ifge implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_ifgt.php b/src/kernel/opcode/_ifgt.php index d862d63d..4f428fde 100644 --- a/src/kernel/opcode/_ifgt.php +++ b/src/kernel/opcode/_ifgt.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ifgt implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_ifle.php b/src/kernel/opcode/_ifle.php index c845fc67..77891c7a 100644 --- a/src/kernel/opcode/_ifle.php +++ b/src/kernel/opcode/_ifle.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ifle implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_iflt.php b/src/kernel/opcode/_iflt.php index cafce081..e0e11362 100644 --- a/src/kernel/opcode/_iflt.php +++ b/src/kernel/opcode/_iflt.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iflt implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_ifne.php b/src/kernel/opcode/_ifne.php index 02e69ce5..662d3048 100644 --- a/src/kernel/opcode/_ifne.php +++ b/src/kernel/opcode/_ifne.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ifne implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -15,11 +16,7 @@ public function execute(): void $operand = $this->getStack(); if ($operand != 0) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); - } - } - -} +} diff --git a/src/kernel/opcode/_ifnonnull.php b/src/kernel/opcode/_ifnonnull.php index 3a237f0f..bde4caa3 100644 --- a/src/kernel/opcode/_ifnonnull.php +++ b/src/kernel/opcode/_ifnonnull.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ifnonnull implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_ifnull.php b/src/kernel/opcode/_ifnull.php index eebbe5cd..5c432979 100644 --- a/src/kernel/opcode/_ifnull.php +++ b/src/kernel/opcode/_ifnull.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ifnull implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_iinc.php b/src/kernel/opcode/_iinc.php index e4b0649f..e501eb21 100644 --- a/src/kernel/opcode/_iinc.php +++ b/src/kernel/opcode/_iinc.php @@ -2,19 +2,18 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iinc implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $index = $this->getByteCodeStream()->readUnsignedByte(); $const = $this->getByteCodeStream()->readByte(); $this->setLocalstorage($index, $this->getLocalstorage($index) + $const); - } - -} +} diff --git a/src/kernel/opcode/_iload.php b/src/kernel/opcode/_iload.php index 5ad54e51..a01c8173 100644 --- a/src/kernel/opcode/_iload.php +++ b/src/kernel/opcode/_iload.php @@ -2,18 +2,17 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); - } - -} +} diff --git a/src/kernel/opcode/_iload_0.php b/src/kernel/opcode/_iload_0.php index ff27e259..4fb81991 100644 --- a/src/kernel/opcode/_iload_0.php +++ b/src/kernel/opcode/_iload_0.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iload_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->pushStack($this->getLocalstorage(0)); - } - -} +} diff --git a/src/kernel/opcode/_iload_1.php b/src/kernel/opcode/_iload_1.php index 9cdf5694..7f90784f 100644 --- a/src/kernel/opcode/_iload_1.php +++ b/src/kernel/opcode/_iload_1.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iload_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->pushStack($this->getLocalstorage(1)); - } - -} +} diff --git a/src/kernel/opcode/_iload_2.php b/src/kernel/opcode/_iload_2.php index ee5a3520..cfcde179 100644 --- a/src/kernel/opcode/_iload_2.php +++ b/src/kernel/opcode/_iload_2.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iload_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->pushStack($this->getLocalstorage(2)); - } - -} +} diff --git a/src/kernel/opcode/_iload_3.php b/src/kernel/opcode/_iload_3.php index 96521b54..78d0ac32 100644 --- a/src/kernel/opcode/_iload_3.php +++ b/src/kernel/opcode/_iload_3.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iload_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->pushStack($this->getLocalstorage(3)); - } - -} +} diff --git a/src/kernel/opcode/_impdep1.php b/src/kernel/opcode/_impdep1.php index e9ce3ceb..7c8975b1 100644 --- a/src/kernel/opcode/_impdep1.php +++ b/src/kernel/opcode/_impdep1.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _impdep1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_impdep2.php b/src/kernel/opcode/_impdep2.php index 374d071e..b841aef5 100644 --- a/src/kernel/opcode/_impdep2.php +++ b/src/kernel/opcode/_impdep2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _impdep2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_imul.php b/src/kernel/opcode/_imul.php index 36c80979..ade32582 100644 --- a/src/kernel/opcode/_imul.php +++ b/src/kernel/opcode/_imul.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _imul implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::multiply($value1, $value2, 4)); - } - } diff --git a/src/kernel/opcode/_ineg.php b/src/kernel/opcode/_ineg.php index cd324fd4..3c438841 100644 --- a/src/kernel/opcode/_ineg.php +++ b/src/kernel/opcode/_ineg.php @@ -2,18 +2,17 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ineg implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $value = $this->getStack(); $this->pushStack(BinaryTool::negate($value, 4)); - } - } diff --git a/src/kernel/opcode/_instanceof.php b/src/kernel/opcode/_instanceof.php index f6a08c7e..c88984c8 100644 --- a/src/kernel/opcode/_instanceof.php +++ b/src/kernel/opcode/_instanceof.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _instanceof implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_invokedynamic.php b/src/kernel/opcode/_invokedynamic.php index a4ebfdb2..9da9a1f0 100644 --- a/src/kernel/opcode/_invokedynamic.php +++ b/src/kernel/opcode/_invokedynamic.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _invokedynamic implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_invokeinterface.php b/src/kernel/opcode/_invokeinterface.php index ae3ee35d..1e303ccc 100644 --- a/src/kernel/opcode/_invokeinterface.php +++ b/src/kernel/opcode/_invokeinterface.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _invokeinterface implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_invokespecial.php b/src/kernel/opcode/_invokespecial.php index 149fda1f..f6975307 100644 --- a/src/kernel/opcode/_invokespecial.php +++ b/src/kernel/opcode/_invokespecial.php @@ -2,15 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _invokespecial implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { - $cpInfo = $this->getCpInfo(); + { + $cpInfo = $this->getConstantPool()->getEntries(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -28,12 +29,7 @@ public function execute(): void $arguments = array(); for ($i = 0; $i < $signature['argumentsCount']; $i++) { - $arguments[] = $this->getStack(); - } - - } - -} +} diff --git a/src/kernel/opcode/_invokestatic.php b/src/kernel/opcode/_invokestatic.php index 40b5c027..77b78fb0 100644 --- a/src/kernel/opcode/_invokestatic.php +++ b/src/kernel/opcode/_invokestatic.php @@ -2,15 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _invokestatic implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { - $cpInfo = $this->getCpInfo(); + { + $cpInfo = $this->getConstantPool()->getEntries(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -21,9 +22,7 @@ public function execute(): void $arguments = array(); for ($i = 0; $i < $signature['argumentsCount']; $i++) { - $arguments[] = $this->getStack(); - } krsort($arguments); @@ -35,11 +34,7 @@ public function execute(): void ), $arguments); if ($signature[0]['type'] !== 'void') { - $this->pushStack($return); - } - } - -} +} diff --git a/src/kernel/opcode/_invokevirtual.php b/src/kernel/opcode/_invokevirtual.php index 7aec86a7..4cd164d4 100644 --- a/src/kernel/opcode/_invokevirtual.php +++ b/src/kernel/opcode/_invokevirtual.php @@ -2,15 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _invokevirtual implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { - $cpInfo = $this->getCpInfo(); + $cpInfo = $this->getConstantPool()->getEntries(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -23,23 +24,18 @@ public function execute(): void $arguments = array(); for ($i = 0; $i < $signature['argumentsCount']; $i++) { - $arguments[] = $this->getStack(); - } $invokerClass = $this->getStack(); if ($invokerClass instanceof \JavaClass) { - $result = call_user_func_array(array( $invokerClass->getMethodInvoker(), $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() ), $arguments); - - } else { // load platform @@ -52,16 +48,10 @@ public function execute(): void $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() ), $arguments); - } if ($signature[0]['type'] !== 'void') { - $this->pushStack($result); - } - - } - } diff --git a/src/kernel/opcode/_ior.php b/src/kernel/opcode/_ior.php index 686af018..3257ecd5 100644 --- a/src/kernel/opcode/_ior.php +++ b/src/kernel/opcode/_ior.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ior implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::orBits($value1, $value2, 4)); - } - } diff --git a/src/kernel/opcode/_irem.php b/src/kernel/opcode/_irem.php index 6e9b2474..d4e44cf0 100644 --- a/src/kernel/opcode/_irem.php +++ b/src/kernel/opcode/_irem.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _irem implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_ireturn.php b/src/kernel/opcode/_ireturn.php index 9d60e701..454194ad 100644 --- a/src/kernel/opcode/_ireturn.php +++ b/src/kernel/opcode/_ireturn.php @@ -2,19 +2,18 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ireturn implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /*** * return an integer from a method */ public function execute(): void - { + { return new JavaTypeInt($this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_ishl.php b/src/kernel/opcode/_ishl.php index 801277c8..24c7cd2c 100644 --- a/src/kernel/opcode/_ishl.php +++ b/src/kernel/opcode/_ishl.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ishl implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::shiftLeft($value1, $value2, 4)); - } - } diff --git a/src/kernel/opcode/_ishr.php b/src/kernel/opcode/_ishr.php index 593a9c6e..a34943c4 100644 --- a/src/kernel/opcode/_ishr.php +++ b/src/kernel/opcode/_ishr.php @@ -2,20 +2,18 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ishr implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { - $value1 = $this->getStack(); $value2 = $this->getStack(); $this->pushStack(BinaryTool::shiftRight($value1, $value2, 4)); - } - } diff --git a/src/kernel/opcode/_istore.php b/src/kernel/opcode/_istore.php index d3cf2a99..87c89a90 100644 --- a/src/kernel/opcode/_istore.php +++ b/src/kernel/opcode/_istore.php @@ -2,17 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _istore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_istore_0.php b/src/kernel/opcode/_istore_0.php index 546493ef..82d8dd85 100644 --- a/src/kernel/opcode/_istore_0.php +++ b/src/kernel/opcode/_istore_0.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _istore_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(0, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_istore_1.php b/src/kernel/opcode/_istore_1.php index 97b0ac8f..bd1d85c7 100644 --- a/src/kernel/opcode/_istore_1.php +++ b/src/kernel/opcode/_istore_1.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _istore_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(1, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_istore_2.php b/src/kernel/opcode/_istore_2.php index dc76082e..1afadff9 100644 --- a/src/kernel/opcode/_istore_2.php +++ b/src/kernel/opcode/_istore_2.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _istore_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(2, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_istore_3.php b/src/kernel/opcode/_istore_3.php index b5b0288d..a9bf1dd4 100644 --- a/src/kernel/opcode/_istore_3.php +++ b/src/kernel/opcode/_istore_3.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _istore_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $this->setLocalstorage(3, $this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_isub.php b/src/kernel/opcode/_isub.php index 4924b41f..9dc7cd55 100644 --- a/src/kernel/opcode/_isub.php +++ b/src/kernel/opcode/_isub.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _isub implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $rightValue = $this->getStack(); $this->pushStack(BinaryTool::sub($leftValue, $rightValue, 4)); - } - } diff --git a/src/kernel/opcode/_iushr.php b/src/kernel/opcode/_iushr.php index d5a24c5a..833b27a5 100644 --- a/src/kernel/opcode/_iushr.php +++ b/src/kernel/opcode/_iushr.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _iushr implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::unsignedShiftRight($value1, $value2, 4)); - } - } diff --git a/src/kernel/opcode/_ixor.php b/src/kernel/opcode/_ixor.php index 09e1dd96..b42417a1 100644 --- a/src/kernel/opcode/_ixor.php +++ b/src/kernel/opcode/_ixor.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ixor implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::xorBits($value1, $value2, 4)); - } - } diff --git a/src/kernel/opcode/_jsr.php b/src/kernel/opcode/_jsr.php index 7c8dfabc..bbc2a61f 100644 --- a/src/kernel/opcode/_jsr.php +++ b/src/kernel/opcode/_jsr.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _jsr implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_jsr_w.php b/src/kernel/opcode/_jsr_w.php index 3180623a..f6c7a4d9 100644 --- a/src/kernel/opcode/_jsr_w.php +++ b/src/kernel/opcode/_jsr_w.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _jsr_w implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_l2d.php b/src/kernel/opcode/_l2d.php index 2327427d..e6175e4e 100644 --- a/src/kernel/opcode/_l2d.php +++ b/src/kernel/opcode/_l2d.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _l2d implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_l2f.php b/src/kernel/opcode/_l2f.php index 271f3a9a..57c3f693 100644 --- a/src/kernel/opcode/_l2f.php +++ b/src/kernel/opcode/_l2f.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _l2f implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_l2i.php b/src/kernel/opcode/_l2i.php index 9618e531..da5956db 100644 --- a/src/kernel/opcode/_l2i.php +++ b/src/kernel/opcode/_l2i.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _l2i implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_ladd.php b/src/kernel/opcode/_ladd.php index 3710abf0..00caabdf 100644 --- a/src/kernel/opcode/_ladd.php +++ b/src/kernel/opcode/_ladd.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ladd implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::add($value1, $value2, 8)); - } - } diff --git a/src/kernel/opcode/_laload.php b/src/kernel/opcode/_laload.php index 5d17d69a..c9746483 100644 --- a/src/kernel/opcode/_laload.php +++ b/src/kernel/opcode/_laload.php @@ -2,22 +2,21 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _laload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * load a long from an array */ public function execute(): void - { + { $index = $this->getStack(); $arrayref = $this->getStack(); $this->pushStack($arrayref[$index]); - } - -} +} diff --git a/src/kernel/opcode/_land.php b/src/kernel/opcode/_land.php index 6b5d52a2..8683e952 100644 --- a/src/kernel/opcode/_land.php +++ b/src/kernel/opcode/_land.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _land implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::andBits($value1, $value2, 8)); - } - } diff --git a/src/kernel/opcode/_lastore.php b/src/kernel/opcode/_lastore.php index 1e22fe1b..0303525c 100644 --- a/src/kernel/opcode/_lastore.php +++ b/src/kernel/opcode/_lastore.php @@ -2,23 +2,22 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lastore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; /** * store a long to an array */ public function execute(): void - { - $value = $this->getStack(); + { + $value = $this->getStack(); $index = $this->getStack(); $arrayref = $this->getStack(); $arrayref[$index] = $value; - } - -} +} diff --git a/src/kernel/opcode/_lcmp.php b/src/kernel/opcode/_lcmp.php index f266720f..c8715a54 100644 --- a/src/kernel/opcode/_lcmp.php +++ b/src/kernel/opcode/_lcmp.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lcmp implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lconst_0.php b/src/kernel/opcode/_lconst_0.php index 5fb74e96..1f60c2c4 100644 --- a/src/kernel/opcode/_lconst_0.php +++ b/src/kernel/opcode/_lconst_0.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lconst_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->pushStack(0); - } - } diff --git a/src/kernel/opcode/_lconst_1.php b/src/kernel/opcode/_lconst_1.php index f96b99b4..373bfab8 100644 --- a/src/kernel/opcode/_lconst_1.php +++ b/src/kernel/opcode/_lconst_1.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lconst_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->pushStack(1); - } - } diff --git a/src/kernel/opcode/_ldc.php b/src/kernel/opcode/_ldc.php index 566f84ca..02c01610 100644 --- a/src/kernel/opcode/_ldc.php +++ b/src/kernel/opcode/_ldc.php @@ -2,22 +2,22 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ldc implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { - $cpInfo = $this->getCpInfo(); + $cpInfo = $this->getConstantPool()->getEntries(); $data = $cpInfo[$this->getByteCodeStream()->readUnsignedByte()]; $value = null; if ($data instanceof \JavaStructureString) { - $value = $cpInfo[$data->getStringIndex()]; if ($value instanceof \JavaStructureUtf8) { @@ -26,21 +26,13 @@ public function execute(): void $this->getInvoker()->loadPlatform('java.lang.String'); $value = new \java\lang\String($value); - } - - } else if (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { - + } elseif (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { $value = $data->getBytes(); - } else { - $value = $cpInfo[$cpInfo[$this->getByteCodeStream()->readUnsignedByte()]->getStringIndex()]; - } $this->pushStack($value); - } - } diff --git a/src/kernel/opcode/_ldc2_w.php b/src/kernel/opcode/_ldc2_w.php index 61f3bd5b..06e338b3 100644 --- a/src/kernel/opcode/_ldc2_w.php +++ b/src/kernel/opcode/_ldc2_w.php @@ -2,20 +2,19 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ldc2_w implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { - $cpInfo = $this->getCpInfo(); + { + $cpInfo = $this->getConstantPool()->getEntries(); $data = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; - $this->pushStack($data->getBytes()); - + $this->pushStack($data->getBytes()); } - -} +} diff --git a/src/kernel/opcode/_ldc_w.php b/src/kernel/opcode/_ldc_w.php index a5ed460d..1fe24f60 100644 --- a/src/kernel/opcode/_ldc_w.php +++ b/src/kernel/opcode/_ldc_w.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ldc_w implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_ldiv.php b/src/kernel/opcode/_ldiv.php index 859e6451..1e4f7fe4 100644 --- a/src/kernel/opcode/_ldiv.php +++ b/src/kernel/opcode/_ldiv.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ldiv implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lload.php b/src/kernel/opcode/_lload.php index 98f703aa..e1947ffe 100644 --- a/src/kernel/opcode/_lload.php +++ b/src/kernel/opcode/_lload.php @@ -2,18 +2,17 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); - } - } diff --git a/src/kernel/opcode/_lload_0.php b/src/kernel/opcode/_lload_0.php index 40e1663a..32383dc8 100644 --- a/src/kernel/opcode/_lload_0.php +++ b/src/kernel/opcode/_lload_0.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lload_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lload_1.php b/src/kernel/opcode/_lload_1.php index c380ba4f..48bbd93f 100644 --- a/src/kernel/opcode/_lload_1.php +++ b/src/kernel/opcode/_lload_1.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lload_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lload_2.php b/src/kernel/opcode/_lload_2.php index 6f422de2..9f27307c 100644 --- a/src/kernel/opcode/_lload_2.php +++ b/src/kernel/opcode/_lload_2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lload_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lload_3.php b/src/kernel/opcode/_lload_3.php index 3e63f54d..beb0ef86 100644 --- a/src/kernel/opcode/_lload_3.php +++ b/src/kernel/opcode/_lload_3.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lload_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lmul.php b/src/kernel/opcode/_lmul.php index 1ae6504e..d0e104ba 100644 --- a/src/kernel/opcode/_lmul.php +++ b/src/kernel/opcode/_lmul.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lmul implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::multiply($value1, $value2, 8)); - } - } diff --git a/src/kernel/opcode/_lneg.php b/src/kernel/opcode/_lneg.php index 505d6a12..684a2ddf 100644 --- a/src/kernel/opcode/_lneg.php +++ b/src/kernel/opcode/_lneg.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lneg implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lookupswitch.php b/src/kernel/opcode/_lookupswitch.php index 19b91f61..a1a4da3f 100644 --- a/src/kernel/opcode/_lookupswitch.php +++ b/src/kernel/opcode/_lookupswitch.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lookupswitch implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -21,11 +22,9 @@ public function execute(): void for ($i = 0; $i < $switchSize; $i++) { - $label = $this->getByteCodeStream()->readInt(); $offsets[(string) $label] = $this->getByteCodeStream()->readInt(); - } if (isset($offsets[$key])) { @@ -33,12 +32,9 @@ public function execute(): void // goto PC $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); return; - } // goto default $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); - } - } diff --git a/src/kernel/opcode/_lor.php b/src/kernel/opcode/_lor.php index 34e39ed9..e076bac5 100644 --- a/src/kernel/opcode/_lor.php +++ b/src/kernel/opcode/_lor.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lor implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::orBits($value1, $value2, 8)); - } - } diff --git a/src/kernel/opcode/_lrem.php b/src/kernel/opcode/_lrem.php index e3d5c6d1..e4b083c6 100644 --- a/src/kernel/opcode/_lrem.php +++ b/src/kernel/opcode/_lrem.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lrem implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lreturn.php b/src/kernel/opcode/_lreturn.php index 01e6b719..55bdce7d 100644 --- a/src/kernel/opcode/_lreturn.php +++ b/src/kernel/opcode/_lreturn.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lreturn implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { return new JavaTypeLong($this->getStack()); - } - -} +} diff --git a/src/kernel/opcode/_lshl.php b/src/kernel/opcode/_lshl.php index 1f955e73..399d15b9 100644 --- a/src/kernel/opcode/_lshl.php +++ b/src/kernel/opcode/_lshl.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lshl implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::shiftLeft($value1, $value2, 8)); - } - } diff --git a/src/kernel/opcode/_lshr.php b/src/kernel/opcode/_lshr.php index fa42c739..f76668ef 100644 --- a/src/kernel/opcode/_lshr.php +++ b/src/kernel/opcode/_lshr.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lshr implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::shiftRight($value1, $value2, 8)); - } - } diff --git a/src/kernel/opcode/_lstore.php b/src/kernel/opcode/_lstore.php index 114556d9..8b6e7e6c 100644 --- a/src/kernel/opcode/_lstore.php +++ b/src/kernel/opcode/_lstore.php @@ -2,17 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lstore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $index = $this->getByteCodeStream()->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); - } - } diff --git a/src/kernel/opcode/_lstore_0.php b/src/kernel/opcode/_lstore_0.php index c1b3c5f7..1503ec0b 100644 --- a/src/kernel/opcode/_lstore_0.php +++ b/src/kernel/opcode/_lstore_0.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lstore_0 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lstore_1.php b/src/kernel/opcode/_lstore_1.php index 02ad47a3..74bc850c 100644 --- a/src/kernel/opcode/_lstore_1.php +++ b/src/kernel/opcode/_lstore_1.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lstore_1 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lstore_2.php b/src/kernel/opcode/_lstore_2.php index e67def6b..aaaad461 100644 --- a/src/kernel/opcode/_lstore_2.php +++ b/src/kernel/opcode/_lstore_2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lstore_2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lstore_3.php b/src/kernel/opcode/_lstore_3.php index 72a8479b..27296fba 100644 --- a/src/kernel/opcode/_lstore_3.php +++ b/src/kernel/opcode/_lstore_3.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lstore_3 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_lsub.php b/src/kernel/opcode/_lsub.php index 457bfb2d..cc7b3b6a 100644 --- a/src/kernel/opcode/_lsub.php +++ b/src/kernel/opcode/_lsub.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lsub implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::sub($value1, $value2, 8)); - } - } diff --git a/src/kernel/opcode/_lushr.php b/src/kernel/opcode/_lushr.php index 184811aa..b5ec6167 100644 --- a/src/kernel/opcode/_lushr.php +++ b/src/kernel/opcode/_lushr.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lushr implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -14,7 +15,5 @@ public function execute(): void $value2 = $this->getStack(); $this->pushStack(BinaryTool::unsignedShiftRight($value1, $value2, 8)); - } - } diff --git a/src/kernel/opcode/_lxor.php b/src/kernel/opcode/_lxor.php index b1f8b6de..91239c08 100644 --- a/src/kernel/opcode/_lxor.php +++ b/src/kernel/opcode/_lxor.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _lxor implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_monitorenter.php b/src/kernel/opcode/_monitorenter.php index 22901ffd..4e92f333 100644 --- a/src/kernel/opcode/_monitorenter.php +++ b/src/kernel/opcode/_monitorenter.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _monitorenter implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_monitorexit.php b/src/kernel/opcode/_monitorexit.php index d5862330..21e49f99 100644 --- a/src/kernel/opcode/_monitorexit.php +++ b/src/kernel/opcode/_monitorexit.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _monitorexit implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_multianewarray.php b/src/kernel/opcode/_multianewarray.php index f317b068..c4cefb17 100644 --- a/src/kernel/opcode/_multianewarray.php +++ b/src/kernel/opcode/_multianewarray.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _multianewarray implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_new.php b/src/kernel/opcode/_new.php index 13921d8f..713a61e9 100644 --- a/src/kernel/opcode/_new.php +++ b/src/kernel/opcode/_new.php @@ -2,15 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _new implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { - $cpInfo = $this->getCpInfo(); + $cpInfo = $this->getConstantPool()->getEntries(); $class = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -29,26 +30,19 @@ public function execute(): void ); $this->pushStack($this->getInvoker()->getClass()->getManipulator()->$className); - } else { - if (($this->getInvoker()->getClass()->getManipulator() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) || is_file(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class')) { - $javaClass = null; if ($this->getInvoker()->getClass()->getManipulator() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) { - $javaClass = new JavaClass($className . '.class', $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->getClassBytecode($className)); - } else { - $javaClass = new JavaClass(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class'); - } $outerClasses = explode('$', $className); @@ -56,10 +50,7 @@ public function execute(): void $javaClass->setInstance('this', $javaClass); for ($i = 1, $size = sizeof($outerClasses); $i < $size; $i++) { - $javaClass->setInstance('this$' . ($i - 1), $this->getInvoker()->getClass()->getManipulator()->{implode('$', array_slice($outerClasses, 0, $i))}); - - } if (method_exists($javaClass->getMethodInvoker(), '')) { @@ -74,19 +65,16 @@ public function execute(): void $this->getInvoker()->getClass() ) ); - } if ($this->getInvoker()->getClass()->getManipulator() !== null) { // regist to manipulator $this->getInvoker()->getClass()->getManipulator()->registerClass($javaClass); - } // push to stack $this->pushStack($javaClass); - } else { // load platform @@ -95,11 +83,7 @@ public function execute(): void $invokeClassName = '\\' . str_replace('/', '\\', $className); $this->pushStack(new $invokeClassName()); - } - } - } - } diff --git a/src/kernel/opcode/_newarray.php b/src/kernel/opcode/_newarray.php index f1af31a2..57cbd9e8 100644 --- a/src/kernel/opcode/_newarray.php +++ b/src/kernel/opcode/_newarray.php @@ -2,22 +2,20 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _newarray implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { $atype = $this->getByteCodeStream()->readUnsignedByte(); $count = $this->getStack(); // need reference $ref = new ArrayIterator(array_fill(0, $count, null)); $this->pushStackByReference($ref); - - } - -} +} diff --git a/src/kernel/opcode/_nop.php b/src/kernel/opcode/_nop.php index 1ed323dc..8c3f447f 100644 --- a/src/kernel/opcode/_nop.php +++ b/src/kernel/opcode/_nop.php @@ -2,15 +2,14 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _nop implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { - + { } - } diff --git a/src/kernel/opcode/_pop.php b/src/kernel/opcode/_pop.php index 3e58c1d2..ec8e7e18 100644 --- a/src/kernel/opcode/_pop.php +++ b/src/kernel/opcode/_pop.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _pop implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->popStack(); - } - } diff --git a/src/kernel/opcode/_pop2.php b/src/kernel/opcode/_pop2.php index d0d54e46..963d3f9b 100644 --- a/src/kernel/opcode/_pop2.php +++ b/src/kernel/opcode/_pop2.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _pop2 implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_putfield.php b/src/kernel/opcode/_putfield.php index 5a0abb24..8deef302 100644 --- a/src/kernel/opcode/_putfield.php +++ b/src/kernel/opcode/_putfield.php @@ -2,15 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _putfield implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { - $cpInfo = $this->getCpInfo(); + { + $cpInfo = $this->getConstantPool()->getEntries(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; $class = $cpInfo[$cp->getNameAndTypeIndex()]; @@ -22,5 +23,4 @@ public function execute(): void $objectref->setInstance($name, $value); } - -} +} diff --git a/src/kernel/opcode/_putstatic.php b/src/kernel/opcode/_putstatic.php index 46696a38..92e790a4 100644 --- a/src/kernel/opcode/_putstatic.php +++ b/src/kernel/opcode/_putstatic.php @@ -2,15 +2,16 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _putstatic implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { - $cpInfo = $this->getCpInfo(); + { + $cpInfo = $this->getConstantPool()->getEntries(); $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; @@ -21,7 +22,5 @@ public function execute(): void // set field $this->getInvoker()->getClass()->setStatic($name, $value); - } - -} +} diff --git a/src/kernel/opcode/_ret.php b/src/kernel/opcode/_ret.php index e49759d9..2202cc94 100644 --- a/src/kernel/opcode/_ret.php +++ b/src/kernel/opcode/_ret.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _ret implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_return.php b/src/kernel/opcode/_return.php index 5514fdcf..d90ccd1a 100644 --- a/src/kernel/opcode/_return.php +++ b/src/kernel/opcode/_return.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _return implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { return null; - } - -} +} diff --git a/src/kernel/opcode/_saload.php b/src/kernel/opcode/_saload.php index 82ddc768..7e9472f4 100644 --- a/src/kernel/opcode/_saload.php +++ b/src/kernel/opcode/_saload.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _saload implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_sastore.php b/src/kernel/opcode/_sastore.php index f4e41a49..7d89bd74 100644 --- a/src/kernel/opcode/_sastore.php +++ b/src/kernel/opcode/_sastore.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _sastore implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_sipush.php b/src/kernel/opcode/_sipush.php index 9fc1209d..f7c2858c 100644 --- a/src/kernel/opcode/_sipush.php +++ b/src/kernel/opcode/_sipush.php @@ -2,16 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _sipush implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { $this->pushStack($this->getByteCodeStream()->readShort()); - } - } diff --git a/src/kernel/opcode/_swap.php b/src/kernel/opcode/_swap.php index bdb9ab86..4fa41969 100644 --- a/src/kernel/opcode/_swap.php +++ b/src/kernel/opcode/_swap.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _swap implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/opcode/_tableswitch.php b/src/kernel/opcode/_tableswitch.php index 51e0dd56..c1ffa7b4 100644 --- a/src/kernel/opcode/_tableswitch.php +++ b/src/kernel/opcode/_tableswitch.php @@ -2,11 +2,12 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _tableswitch implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void { @@ -22,9 +23,7 @@ public function execute(): void $highByte = $this->getByteCodeStream()->readInt(); for ($i = $lowByte; $i <= $highByte; $i++) { - $offsets[$i] = $this->getByteCodeStream()->readInt(); - } if (isset($offsets[$key])) { @@ -32,12 +31,9 @@ public function execute(): void // goto PC $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); return; - } // goto default $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); - } - } diff --git a/src/kernel/opcode/_wide.php b/src/kernel/opcode/_wide.php index 71b0f7cb..a6adc188 100644 --- a/src/kernel/opcode/_wide.php +++ b/src/kernel/opcode/_wide.php @@ -2,15 +2,15 @@ namespace PHPJava\Kernel\OpCode; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; final class _wide implements OpCodeInterface { use \PHPJava\Kernel\Core\Accumulator; + use \PHPJava\Kernel\Core\ConstantPool; public function execute(): void - { + { throw new NotImplementedException(__CLASS__); } - -} +} diff --git a/src/kernel/structures/_AppendFrame.php b/src/kernel/structures/_AppendFrame.php index 94b20fae..fd44db2d 100644 --- a/src/kernel/structures/_AppendFrame.php +++ b/src/kernel/structures/_AppendFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _AppendFrame implements StructureInterface { diff --git a/src/kernel/structures/_ChopFrame.php b/src/kernel/structures/_ChopFrame.php index 813f509a..fb891922 100644 --- a/src/kernel/structures/_ChopFrame.php +++ b/src/kernel/structures/_ChopFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _ChopFrame implements StructureInterface { diff --git a/src/kernel/structures/_Class.php b/src/kernel/structures/_Class.php index 5154757d..02a15df6 100644 --- a/src/kernel/structures/_Class.php +++ b/src/kernel/structures/_Class.php @@ -2,18 +2,19 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _Class implements StructureInterface { use \PHPJava\Kernel\Core\BinaryReader; - private $this->getClass()Index = null; + private $ClassIndex = null; public function execute(): void { - $this->ClassIndex = $this->Class->readUnsignedShort(); + $this->ClassIndex = $this->readUnsignedShort(); } - public function getClassIndex () { + public function getClassIndex() + { return $this->ClassIndex; } } diff --git a/src/kernel/structures/_Classes.php b/src/kernel/structures/_Classes.php index 7981576d..bacefac8 100644 --- a/src/kernel/structures/_Classes.php +++ b/src/kernel/structures/_Classes.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _Classes implements StructureInterface { diff --git a/src/kernel/structures/_Double.php b/src/kernel/structures/_Double.php index daf214ab..815981fe 100644 --- a/src/kernel/structures/_Double.php +++ b/src/kernel/structures/_Double.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _Double implements StructureInterface { diff --git a/src/kernel/structures/_DoubleVariableInfo.php b/src/kernel/structures/_DoubleVariableInfo.php index 5473b08a..ee7e2200 100644 --- a/src/kernel/structures/_DoubleVariableInfo.php +++ b/src/kernel/structures/_DoubleVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _DoubleVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_ExceptionTable.php b/src/kernel/structures/_ExceptionTable.php index 3bad5b06..907ecbad 100644 --- a/src/kernel/structures/_ExceptionTable.php +++ b/src/kernel/structures/_ExceptionTable.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _ExceptionTable implements StructureInterface { diff --git a/src/kernel/structures/_FieldInfo.php b/src/kernel/structures/_FieldInfo.php index cc96b4f6..c8587c01 100644 --- a/src/kernel/structures/_FieldInfo.php +++ b/src/kernel/structures/_FieldInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _FieldInfo implements StructureInterface { @@ -15,12 +15,12 @@ class _FieldInfo implements StructureInterface private $Attributes = array(); public function execute(): void { - $this->AccessFlag = $this->Class->readUnsignedShort(); - $this->NameIndex = $this->Class->readUnsignedShort(); - $this->DescriptorIndex = $this->Class->readUnsignedShort(); - $this->AttributeCount = $this->Class->readUnsignedShort(); + $this->AccessFlag = $this->readUnsignedShort(); + $this->NameIndex = $this->readUnsignedShort(); + $this->DescriptorIndex = $this->readUnsignedShort(); + $this->AttributeCount = $this->readUnsignedShort(); for ($i = 0; $i < $this->AttributeCount; $i++) { - $this->Attributes[$i] = new JavaAttributeInfo($this->getClass()); + $this->Attributes[$i] = new \PHPJava\Kernel\Attributes\AttributeInfo($this->getClass()); } } public function getAccessFlag() diff --git a/src/kernel/structures/_FieldRef.php b/src/kernel/structures/_FieldRef.php index 82734c1f..35823de0 100644 --- a/src/kernel/structures/_FieldRef.php +++ b/src/kernel/structures/_FieldRef.php @@ -2,23 +2,25 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _Fieldref implements StructureInterface { use \PHPJava\Kernel\Core\BinaryReader; - private $this->getClass()Index = null; + private $ClassIndex = null; private $NameAndTypeIndex = null; public function execute(): void { - $this->ClassIndex = $this->Class->readUnsignedShort(); - $this->NameAndTypeIndex = $this->Class->readUnsignedShort(); + $this->ClassIndex = $this->readUnsignedShort(); + $this->NameAndTypeIndex = $this->readUnsignedShort(); } - public function getClassIndex () { + public function getClassIndex() + { return $this->ClassIndex; } - public function getNameAndTypeIndex () { + public function getNameAndTypeIndex() + { return $this->NameAndTypeIndex; } } diff --git a/src/kernel/structures/_Float.php b/src/kernel/structures/_Float.php index 6cf4495a..da363cbb 100644 --- a/src/kernel/structures/_Float.php +++ b/src/kernel/structures/_Float.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _Float implements StructureInterface { diff --git a/src/kernel/structures/_FloatVariableInfo.php b/src/kernel/structures/_FloatVariableInfo.php index 41ed66dc..2d05e1fb 100644 --- a/src/kernel/structures/_FloatVariableInfo.php +++ b/src/kernel/structures/_FloatVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _FloatVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_FullFrame.php b/src/kernel/structures/_FullFrame.php index 9eea9078..966fcd7d 100644 --- a/src/kernel/structures/_FullFrame.php +++ b/src/kernel/structures/_FullFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _FullFrame implements StructureInterface { diff --git a/src/kernel/structures/_Integer.php b/src/kernel/structures/_Integer.php index ac293377..0926f3c5 100644 --- a/src/kernel/structures/_Integer.php +++ b/src/kernel/structures/_Integer.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _Integer implements StructureInterface { diff --git a/src/kernel/structures/_IntegerVariableInfo.php b/src/kernel/structures/_IntegerVariableInfo.php index 9b523a17..1f4e4011 100644 --- a/src/kernel/structures/_IntegerVariableInfo.php +++ b/src/kernel/structures/_IntegerVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _IntegerVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_LineNumberTable.php b/src/kernel/structures/_LineNumberTable.php index c25cbb44..4e62bfd9 100644 --- a/src/kernel/structures/_LineNumberTable.php +++ b/src/kernel/structures/_LineNumberTable.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _LineNumberTable implements StructureInterface { diff --git a/src/kernel/structures/_LocalVariableTable.php b/src/kernel/structures/_LocalVariableTable.php index 76a479c4..781d3cc5 100644 --- a/src/kernel/structures/_LocalVariableTable.php +++ b/src/kernel/structures/_LocalVariableTable.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _LocalVariableTable implements StructureInterface { diff --git a/src/kernel/structures/_Long.php b/src/kernel/structures/_Long.php index 4f176eb8..acea125b 100644 --- a/src/kernel/structures/_Long.php +++ b/src/kernel/structures/_Long.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _Long implements StructureInterface { diff --git a/src/kernel/structures/_LongVariableInfo.php b/src/kernel/structures/_LongVariableInfo.php index 3ffeba6d..264ba657 100644 --- a/src/kernel/structures/_LongVariableInfo.php +++ b/src/kernel/structures/_LongVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _LongVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_MethodInfo.php b/src/kernel/structures/_MethodInfo.php index e3e2bfc2..25d8b0e7 100644 --- a/src/kernel/structures/_MethodInfo.php +++ b/src/kernel/structures/_MethodInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _MethodInfo implements StructureInterface { @@ -15,12 +15,12 @@ class _MethodInfo implements StructureInterface private $Attributes = array(); public function execute(): void { - $this->AccessFlag = $this->Class->readUnsignedShort(); - $this->NameIndex = $this->Class->readUnsignedShort(); - $this->DescriptorIndex = $this->Class->readUnsignedShort(); - $this->AttributeCount = $this->Class->readUnsignedShort(); + $this->AccessFlag = $this->readUnsignedShort(); + $this->NameIndex = $this->readUnsignedShort(); + $this->DescriptorIndex = $this->readUnsignedShort(); + $this->AttributeCount = $this->readUnsignedShort(); for ($i = 0; $i < $this->AttributeCount; $i++) { - $this->Attributes[$i] = new JavaAttributeInfo($this->getClass()); + $this->Attributes[$i] = new \PHPJava\Kernel\Attributes\AttributeInfo($this->getClass()); } } public function getAccessFlag() diff --git a/src/kernel/structures/_Methodref.php b/src/kernel/structures/_Methodref.php index 080236c3..1af386de 100644 --- a/src/kernel/structures/_Methodref.php +++ b/src/kernel/structures/_Methodref.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _Methodref implements StructureInterface { @@ -12,13 +12,15 @@ class _Methodref implements StructureInterface private $NameAndTypeIndex = null; public function execute(): void { - $this->ClassIndex = $this->Class->readUnsignedShort(); - $this->NameAndTypeIndex = $this->Class->readUnsignedShort(); + $this->ClassIndex = $this->readUnsignedShort(); + $this->NameAndTypeIndex = $this->readUnsignedShort(); } - public function getClassIndex () { + public function getClassIndex() + { return $this->ClassIndex; } - public function getNameAndTypeIndex () { + public function getNameAndTypeIndex() + { return $this->NameAndTypeIndex; } } diff --git a/src/kernel/structures/_NameAndType.php b/src/kernel/structures/_NameAndType.php index 8516edb1..e790bd1c 100644 --- a/src/kernel/structures/_NameAndType.php +++ b/src/kernel/structures/_NameAndType.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _NameAndType implements StructureInterface { @@ -12,8 +12,8 @@ class _NameAndType implements StructureInterface private $DescriptorIndex = null; public function execute(): void { - $this->NameIndex = $this->Class->readUnsignedShort(); - $this->DescriptorIndex = $this->Class->readUnsignedShort(); + $this->NameIndex = $this->readUnsignedShort(); + $this->DescriptorIndex = $this->readUnsignedShort(); } public function getNameIndex() { diff --git a/src/kernel/structures/_NullVariableInfo.php b/src/kernel/structures/_NullVariableInfo.php index 89318c45..0b3b703c 100644 --- a/src/kernel/structures/_NullVariableInfo.php +++ b/src/kernel/structures/_NullVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _NullVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_ObjectVariableInfo.php b/src/kernel/structures/_ObjectVariableInfo.php index 4b0f6135..77971941 100644 --- a/src/kernel/structures/_ObjectVariableInfo.php +++ b/src/kernel/structures/_ObjectVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _ObjectVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_SameFrame.php b/src/kernel/structures/_SameFrame.php index e8b8bea5..8f8f8eb1 100644 --- a/src/kernel/structures/_SameFrame.php +++ b/src/kernel/structures/_SameFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _SameFrame implements StructureInterface { diff --git a/src/kernel/structures/_SameFrameExtended.php b/src/kernel/structures/_SameFrameExtended.php index 1e17b937..89859576 100644 --- a/src/kernel/structures/_SameFrameExtended.php +++ b/src/kernel/structures/_SameFrameExtended.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _SameFrameExtended implements StructureInterface { diff --git a/src/kernel/structures/_SameLocals1StackItemFrame.php b/src/kernel/structures/_SameLocals1StackItemFrame.php index 394f5ffb..8c3c08e8 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrame.php +++ b/src/kernel/structures/_SameLocals1StackItemFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _SameLocals1StackItemFrame implements StructureInterface { diff --git a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php index 2a97e98b..dd46f7e8 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php +++ b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _SameLocals1StackItemFrameExtended implements StructureInterface { diff --git a/src/kernel/structures/_StackMapFrame.php b/src/kernel/structures/_StackMapFrame.php index 71df30a5..58c72351 100644 --- a/src/kernel/structures/_StackMapFrame.php +++ b/src/kernel/structures/_StackMapFrame.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _StackMapFrame implements StructureInterface { diff --git a/src/kernel/structures/_String.php b/src/kernel/structures/_String.php index cd6ae51c..fb65ed8d 100644 --- a/src/kernel/structures/_String.php +++ b/src/kernel/structures/_String.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _String implements StructureInterface { @@ -11,7 +11,7 @@ class _String implements StructureInterface private $StringIndex = null; public function execute(): void { - $this->StringIndex = $this->Class->readUnsignedShort(); + $this->StringIndex = $this->readUnsignedShort(); } public function getStringIndex() { diff --git a/src/kernel/structures/_TopVariableInfo.php b/src/kernel/structures/_TopVariableInfo.php index c1701ea8..7c1e5bf9 100644 --- a/src/kernel/structures/_TopVariableInfo.php +++ b/src/kernel/structures/_TopVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _TopVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_UninitializedThisVariableInfo.php b/src/kernel/structures/_UninitializedThisVariableInfo.php index 25140ef6..ee49738c 100644 --- a/src/kernel/structures/_UninitializedThisVariableInfo.php +++ b/src/kernel/structures/_UninitializedThisVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _UninitializedThisVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_UninitializedVariableInfo.php b/src/kernel/structures/_UninitializedVariableInfo.php index 16ec6670..e6c23aad 100644 --- a/src/kernel/structures/_UninitializedVariableInfo.php +++ b/src/kernel/structures/_UninitializedVariableInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _UninitializedVariableInfo implements StructureInterface { diff --git a/src/kernel/structures/_Utf8.php b/src/kernel/structures/_Utf8.php index 40866399..de8b1be3 100644 --- a/src/kernel/structures/_Utf8.php +++ b/src/kernel/structures/_Utf8.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _Utf8 implements StructureInterface { @@ -12,9 +12,9 @@ class _Utf8 implements StructureInterface private $String = ''; public function execute(): void { - $this->Length = $this->Class->readUnsignedShort(); + $this->Length = $this->readUnsignedShort(); for ($i = 0; $i < $this->Length; $i++) { - $this->String .= chr($this->Class->readUnsignedByte()); + $this->String .= chr($this->readUnsignedByte()); } } public function getLength() diff --git a/src/kernel/structures/_VerificationTypeInfo.php b/src/kernel/structures/_VerificationTypeInfo.php index e1bdcab1..eb904956 100644 --- a/src/kernel/structures/_VerificationTypeInfo.php +++ b/src/kernel/structures/_VerificationTypeInfo.php @@ -2,7 +2,7 @@ namespace PHPJava\Kernel\Structures; use \PHPJava\Exceptions\NotImplementedException; -use \PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\BinaryTool; class _VerificationTypeInfo implements StructureInterface { diff --git a/tools/Test.class b/tools/Test.class index 7e24ece7e763441059dcbc29ed2114a3263c6a53..8fc30ace51fad3fbc4e2a524e9c2c54b4494d135 100644 GIT binary patch literal 3277 zcma)8eNa@_760Acx9`1u`xfZBk4R8LtI=I)AZg4Jz!Cz62t}c+)vTl~3v6+5VR2au z_>B^cA)gwP)HZDzGd1m4TeV%L)ncZd%w&>g`Z=9u+L?Yh(@g&89~q}JX_Art?%M?v zOw$YZ-t*4=opaAUANTGXSARAIU^TvDpcZ|u>9byOF1#e=h8x@5NTA;!HDDl#K^@yQ zq~v#>6Rx%Ix+o}H(lwoJSJgV30jRI$2&rdCL)w6aJ{`ky-l3yG$Gwt#NXLkrM-2q9 zQ^zie->qYhj=hqO6 zIu#%2tr1Yy#0TQ(S^;MuxJf{1NcO}8@>}8qu?@rhU9r^0Xjg(9Egc(5Hw~l-2{Z+% z(JdL_t;v+l3J1dix@5H^2YMx_ImqpmKx42`PHTf}bL$OTqbbR02sY$6^`mKSpaklJ z^#UHLqdu8T#G(U|xh1$oz_9nSO%_-YSa^=$LKcPlqjBme40J49m1p&a)6wp2>!XAA z5j8x3K#dk#0F}f|*8{?_xOnP27Vz4NsYP8b?ih4b2*knRo`r8Lw>QXw^n;VB%iT zX*bOeZ2fRN(Ia;h)c7o(lf&}@F!6PqF!2q1Q@|w^RGVl3LnA84SS6c;z92XImO#mz z-VMWvL|Zb>lceq&>5dJi<4O9~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;^#LXH=~v*HanW zo=L>wX)86dv1}#Nu>`p@_U}L5fAGcr{oVchkL3FKPXcx0Ov7)jW^6NU`6IXe$&ZqL z0r#k7+X??dB4tMfYD%uBBP-T2nXLVfIvi3gvhjj#`1V@bT4kvd8G7*MDUT&WGwg*l z^(}Li9Z{RR?66osO-d!3X()j)S#Xz`Oj>aU*BL0UU3obRJkx&*?aM4m$67j3481N; zt|(j9`Xpo8Ys}!qoAboEDt?5r&HrqBt~x4mSfRg4yn@cWRfUiLT~xYYI4Abty1ol_ z(mCi;HU@W~`Ld|=DR+u+({WG`ZaPE(DaAvda<>HUmEdPZXy`fgC4D-&6|b@b_czGy z!NWVN`kY=xS^AD4att1DaF-GL<$q3@LwA$YIF?2A!WQZYYx2-dcwEAcf-kR5rN{#+C+|z#AaSgxn zJMcSh3NIp}1yRw4ArVBJk*$ajW9&f^=WxP>#ETo!L#WS{B0flS!DMl`6G8miCf8NOHsmx z${&^3_LA*_%tb`rf8ZT?D(m4SPLs-YHt+_iTt_YL=F(76@f;3O%~#R=?;AMFP~~vf YM4!NI_@AKR=o3)r(@C`+s#V~^KdixwK>z>% diff --git a/tools/copy.php b/tools/copy.php index 749725c1..f8fdf088 100644 --- a/tools/copy.php +++ b/tools/copy.php @@ -5,11 +5,12 @@ $a = str_replace('JavaStatement', '', file_get_contents($file)); $a = str_replace("throw new Exception(__CLASS__ . ' hasnot statement.');\n", 'throw new NotImplementedException(__CLASS__);', $a); $a = str_replace('public function execute () {' . "\n", "public function execute(): void\n {", $a); - $a = str_replace('extends {', "implements OpCodeInterface\n{\n use \\PHPJava\\Kernel\\Core\\Accumulator;", $a); - $a = str_replace('getEntries()', $a); var_dump($class, $a); file_put_contents(__DIR__ . '/../src/kernel/opcode/' . $class, $a); } \ No newline at end of file diff --git a/tools/copy_attr.php b/tools/copy_attr.php index 5ee0126c..de2b904f 100644 --- a/tools/copy_attr.php +++ b/tools/copy_attr.php @@ -8,12 +8,13 @@ $a = str_replace('class Java', 'class ', $a); $a = str_replace('throw new JavaAttributeException(__CLASS__ . \' is not defined.\');', 'throw new NotImplementedException(__CLASS__);', $a); $a = preg_replace("/\s*[\\n]+/", "\n", $a); - $a = str_replace('extends JavaAttribute {', "implements AttributeInterface\n{\n use \\PHPJava\\Kernel\\Core\\BinaryReader;\n", $a); + $a = str_replace('extends JavaAttribute {', "implements AttributeInterface\n{\n use \\PHPJava\\Kernel\\Core\\BinaryReader;\n use \\PHPJava\\Kernel\\Core\\ConstantPool;\n", $a); $a = str_replace('class ', 'final class ', $a); - $a = str_replace('Class', '$this->getCurrentClass()', $a); + $a = str_replace('Class', '$this', $a); $a = str_replace('BinaryTools::', 'BinaryTool::', $a); $a = str_replace('getJavaBinaryStream()->', '', $a); + $a = str_replace('getCpInfo()', 'getConstantPool()->getEntries()', $a); var_dump($class, $a); file_put_contents(__DIR__ . '/../src/kernel/attributes/' . $class, $a . "\n"); } \ No newline at end of file diff --git a/tools/copy_strt.php b/tools/copy_strt.php index 33273689..772b7a56 100644 --- a/tools/copy_strt.php +++ b/tools/copy_strt.php @@ -11,9 +11,14 @@ $a = str_replace('public function __construct (&$this->getClass()) {', "public function execute(): void\n {", $a); $a = str_replace('parent::__construct($this->getClass());', '', $a); $a = preg_replace("/\s*[\\n]+/", "\n", $a); - $a = str_replace('getClass()->read', '$this->read', $a); + $a = str_replace('$this->Class->read', '$this->read', $a); + $a = str_replace('$this->getClass()Index', '$ClassIndex', $a); + + $a = str_replace('JavaAttributeInfo', '\\PHPJava\\Kernel\\Attributes\\AttributeInfo', $a); + $a = str_replace('JavaAttribute', '\\PHPJava\\Kernel\\Attributes\\', $a); var_dump($class, $a); file_put_contents(__DIR__ . '/../src/kernel/structures/' . $class, $a . "\n"); } From ef24b63d4496f6bb5f6e27a8973d6dc15cc2b1eb Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 17:53:38 +0900 Subject: [PATCH 17/96] WIP commit --- src/kernel/attributes/AnnotationDefaultAttribute.php | 2 +- src/kernel/attributes/AttributeInfo.php | 2 +- src/kernel/attributes/BootstrapMethodsAttribute.php | 2 +- src/kernel/attributes/CodeAttribute.php | 2 +- src/kernel/attributes/ConstantValueAttribute.php | 2 +- src/kernel/attributes/DeprecatedAttribute.php | 2 +- src/kernel/attributes/EnclosingMethodAttribute.php | 2 +- src/kernel/attributes/ExceptionsAttribute.php | 2 +- src/kernel/attributes/InnerClassesAttribute.php | 2 +- src/kernel/attributes/LineNumberTableAttribute.php | 2 +- src/kernel/attributes/LocalVariableTableAttribute.php | 2 +- src/kernel/attributes/LocalVariableTypeTableAttribute.php | 2 +- .../attributes/RuntimeInvisibleAnnotationsAttribute.php | 2 +- .../RuntimeInvisibleParameterAnnotationsAttribute.php | 2 +- src/kernel/attributes/RuntimeVisibleAnnotationsAttribute.php | 2 +- .../RuntimeVisibleParameterAnnotationsAttribute.php | 2 +- src/kernel/attributes/SignatureAttribute.php | 2 +- src/kernel/attributes/SourceDebugExtensionAttribute.php | 2 +- src/kernel/attributes/SourceFileAttribute.php | 2 +- src/kernel/attributes/StackMapTableAttribute.php | 2 +- src/kernel/attributes/SyntheticAttribute.php | 2 +- src/kernel/opcode/_aaload.php | 2 +- src/kernel/opcode/_aastore.php | 2 +- src/kernel/opcode/_aconst_null.php | 2 +- src/kernel/opcode/_aload.php | 2 +- src/kernel/opcode/_aload_0.php | 2 +- src/kernel/opcode/_aload_1.php | 2 +- src/kernel/opcode/_aload_2.php | 2 +- src/kernel/opcode/_aload_3.php | 2 +- src/kernel/opcode/_anewarray.php | 2 +- src/kernel/opcode/_areturn.php | 2 +- src/kernel/opcode/_arraylength.php | 2 +- src/kernel/opcode/_astore.php | 2 +- src/kernel/opcode/_astore_0.php | 2 +- src/kernel/opcode/_astore_1.php | 2 +- src/kernel/opcode/_astore_2.php | 2 +- src/kernel/opcode/_astore_3.php | 2 +- src/kernel/opcode/_athrow.php | 2 +- src/kernel/opcode/_baload.php | 2 +- src/kernel/opcode/_bastore.php | 2 +- src/kernel/opcode/_bipush.php | 2 +- src/kernel/opcode/_breakpoint.php | 2 +- src/kernel/opcode/_caload.php | 2 +- src/kernel/opcode/_castore.php | 2 +- src/kernel/opcode/_checkcast.php | 2 +- src/kernel/opcode/_d2f.php | 2 +- src/kernel/opcode/_d2i.php | 2 +- src/kernel/opcode/_d2l.php | 2 +- src/kernel/opcode/_dadd.php | 2 +- src/kernel/opcode/_daload.php | 2 +- src/kernel/opcode/_dastore.php | 2 +- src/kernel/opcode/_dcmpg.php | 2 +- src/kernel/opcode/_dcmpl.php | 2 +- src/kernel/opcode/_dconst_0.php | 2 +- src/kernel/opcode/_dconst_1.php | 2 +- src/kernel/opcode/_ddiv.php | 2 +- src/kernel/opcode/_dload.php | 2 +- src/kernel/opcode/_dload_0.php | 2 +- src/kernel/opcode/_dload_1.php | 2 +- src/kernel/opcode/_dload_2.php | 2 +- src/kernel/opcode/_dload_3.php | 2 +- src/kernel/opcode/_dmul.php | 2 +- src/kernel/opcode/_dneg.php | 2 +- src/kernel/opcode/_drem.php | 2 +- src/kernel/opcode/_dreturn.php | 2 +- src/kernel/opcode/_dstore.php | 2 +- src/kernel/opcode/_dstore_0.php | 2 +- src/kernel/opcode/_dstore_1.php | 2 +- src/kernel/opcode/_dstore_2.php | 2 +- src/kernel/opcode/_dstore_3.php | 2 +- src/kernel/opcode/_dsub.php | 2 +- src/kernel/opcode/_dup.php | 2 +- src/kernel/opcode/_dup2.php | 2 +- src/kernel/opcode/_dup2_x1.php | 2 +- src/kernel/opcode/_dup2_x2.php | 2 +- src/kernel/opcode/_dup_x1.php | 2 +- src/kernel/opcode/_dup_x2.php | 2 +- src/kernel/opcode/_f2d.php | 2 +- src/kernel/opcode/_f2i.php | 2 +- src/kernel/opcode/_f2l.php | 2 +- src/kernel/opcode/_fadd.php | 2 +- src/kernel/opcode/_faload.php | 2 +- src/kernel/opcode/_fastore.php | 2 +- src/kernel/opcode/_fcmpg.php | 2 +- src/kernel/opcode/_fcmpl.php | 2 +- src/kernel/opcode/_fconst_0.php | 2 +- src/kernel/opcode/_fconst_1.php | 2 +- src/kernel/opcode/_fconst_2.php | 2 +- src/kernel/opcode/_fdiv.php | 2 +- src/kernel/opcode/_fload.php | 2 +- src/kernel/opcode/_fload_0.php | 2 +- src/kernel/opcode/_fload_1.php | 2 +- src/kernel/opcode/_fload_2.php | 2 +- src/kernel/opcode/_fload_3.php | 2 +- src/kernel/opcode/_fmul.php | 2 +- src/kernel/opcode/_fneg.php | 2 +- src/kernel/opcode/_frem.php | 2 +- src/kernel/opcode/_freturn.php | 2 +- src/kernel/opcode/_fstore.php | 2 +- src/kernel/opcode/_fstore_0.php | 2 +- src/kernel/opcode/_fstore_1.php | 2 +- src/kernel/opcode/_fstore_2.php | 2 +- src/kernel/opcode/_fstore_3.php | 2 +- src/kernel/opcode/_fsub.php | 2 +- src/kernel/opcode/_getfield.php | 2 +- src/kernel/opcode/_getstatic.php | 2 +- src/kernel/opcode/_goto.php | 2 +- src/kernel/opcode/_goto_w.php | 2 +- src/kernel/opcode/_i2b.php | 2 +- src/kernel/opcode/_i2c.php | 2 +- src/kernel/opcode/_i2d.php | 2 +- src/kernel/opcode/_i2f.php | 2 +- src/kernel/opcode/_i2l.php | 2 +- src/kernel/opcode/_i2s.php | 2 +- src/kernel/opcode/_iadd.php | 2 +- src/kernel/opcode/_iaload.php | 2 +- src/kernel/opcode/_iand.php | 2 +- src/kernel/opcode/_iastore.php | 2 +- src/kernel/opcode/_iconst_0.php | 2 +- src/kernel/opcode/_iconst_1.php | 2 +- src/kernel/opcode/_iconst_2.php | 2 +- src/kernel/opcode/_iconst_3.php | 2 +- src/kernel/opcode/_iconst_4.php | 2 +- src/kernel/opcode/_iconst_5.php | 2 +- src/kernel/opcode/_iconst_m1.php | 2 +- src/kernel/opcode/_idiv.php | 2 +- src/kernel/opcode/_if_acmpeq.php | 2 +- src/kernel/opcode/_if_acmpne.php | 2 +- src/kernel/opcode/_if_icmpeq.php | 2 +- src/kernel/opcode/_if_icmpge.php | 2 +- src/kernel/opcode/_if_icmpgt.php | 2 +- src/kernel/opcode/_if_icmple.php | 2 +- src/kernel/opcode/_if_icmplt.php | 2 +- src/kernel/opcode/_if_icmpne.php | 2 +- src/kernel/opcode/_ifeq.php | 2 +- src/kernel/opcode/_ifge.php | 2 +- src/kernel/opcode/_ifgt.php | 2 +- src/kernel/opcode/_ifle.php | 2 +- src/kernel/opcode/_iflt.php | 2 +- src/kernel/opcode/_ifne.php | 2 +- src/kernel/opcode/_ifnonnull.php | 2 +- src/kernel/opcode/_ifnull.php | 2 +- src/kernel/opcode/_iinc.php | 2 +- src/kernel/opcode/_iload.php | 2 +- src/kernel/opcode/_iload_0.php | 2 +- src/kernel/opcode/_iload_1.php | 2 +- src/kernel/opcode/_iload_2.php | 2 +- src/kernel/opcode/_iload_3.php | 2 +- src/kernel/opcode/_impdep1.php | 2 +- src/kernel/opcode/_impdep2.php | 2 +- src/kernel/opcode/_imul.php | 2 +- src/kernel/opcode/_ineg.php | 2 +- src/kernel/opcode/_instanceof.php | 2 +- src/kernel/opcode/_invokedynamic.php | 2 +- src/kernel/opcode/_invokeinterface.php | 2 +- src/kernel/opcode/_invokespecial.php | 2 +- src/kernel/opcode/_invokestatic.php | 2 +- src/kernel/opcode/_invokevirtual.php | 2 +- src/kernel/opcode/_ior.php | 2 +- src/kernel/opcode/_irem.php | 2 +- src/kernel/opcode/_ireturn.php | 2 +- src/kernel/opcode/_ishl.php | 2 +- src/kernel/opcode/_ishr.php | 2 +- src/kernel/opcode/_istore.php | 2 +- src/kernel/opcode/_istore_0.php | 2 +- src/kernel/opcode/_istore_1.php | 2 +- src/kernel/opcode/_istore_2.php | 2 +- src/kernel/opcode/_istore_3.php | 2 +- src/kernel/opcode/_isub.php | 2 +- src/kernel/opcode/_iushr.php | 2 +- src/kernel/opcode/_ixor.php | 2 +- src/kernel/opcode/_jsr.php | 2 +- src/kernel/opcode/_jsr_w.php | 2 +- src/kernel/opcode/_l2d.php | 2 +- src/kernel/opcode/_l2f.php | 2 +- src/kernel/opcode/_l2i.php | 2 +- src/kernel/opcode/_ladd.php | 2 +- src/kernel/opcode/_laload.php | 2 +- src/kernel/opcode/_land.php | 2 +- src/kernel/opcode/_lastore.php | 2 +- src/kernel/opcode/_lcmp.php | 2 +- src/kernel/opcode/_lconst_0.php | 2 +- src/kernel/opcode/_lconst_1.php | 2 +- src/kernel/opcode/_ldc.php | 2 +- src/kernel/opcode/_ldc2_w.php | 2 +- src/kernel/opcode/_ldc_w.php | 2 +- src/kernel/opcode/_ldiv.php | 2 +- src/kernel/opcode/_lload.php | 2 +- src/kernel/opcode/_lload_0.php | 2 +- src/kernel/opcode/_lload_1.php | 2 +- src/kernel/opcode/_lload_2.php | 2 +- src/kernel/opcode/_lload_3.php | 2 +- src/kernel/opcode/_lmul.php | 2 +- src/kernel/opcode/_lneg.php | 2 +- src/kernel/opcode/_lookupswitch.php | 2 +- src/kernel/opcode/_lor.php | 2 +- src/kernel/opcode/_lrem.php | 2 +- src/kernel/opcode/_lreturn.php | 2 +- src/kernel/opcode/_lshl.php | 2 +- src/kernel/opcode/_lshr.php | 2 +- src/kernel/opcode/_lstore.php | 2 +- src/kernel/opcode/_lstore_0.php | 2 +- src/kernel/opcode/_lstore_1.php | 2 +- src/kernel/opcode/_lstore_2.php | 2 +- src/kernel/opcode/_lstore_3.php | 2 +- src/kernel/opcode/_lsub.php | 2 +- src/kernel/opcode/_lushr.php | 2 +- src/kernel/opcode/_lxor.php | 2 +- src/kernel/opcode/_monitorenter.php | 2 +- src/kernel/opcode/_monitorexit.php | 2 +- src/kernel/opcode/_multianewarray.php | 2 +- src/kernel/opcode/_new.php | 2 +- src/kernel/opcode/_newarray.php | 2 +- src/kernel/opcode/_nop.php | 2 +- src/kernel/opcode/_pop.php | 2 +- src/kernel/opcode/_pop2.php | 2 +- src/kernel/opcode/_putfield.php | 2 +- src/kernel/opcode/_putstatic.php | 2 +- src/kernel/opcode/_ret.php | 2 +- src/kernel/opcode/_return.php | 2 +- src/kernel/opcode/_saload.php | 2 +- src/kernel/opcode/_sastore.php | 2 +- src/kernel/opcode/_sipush.php | 2 +- src/kernel/opcode/_swap.php | 2 +- src/kernel/opcode/_tableswitch.php | 2 +- src/kernel/opcode/_wide.php | 2 +- src/kernel/structures/_AppendFrame.php | 3 ++- src/kernel/structures/_ChopFrame.php | 3 ++- src/kernel/structures/_Class.php | 3 ++- src/kernel/structures/_Classes.php | 3 ++- src/kernel/structures/_Double.php | 3 ++- src/kernel/structures/_DoubleVariableInfo.php | 3 ++- src/kernel/structures/_ExceptionTable.php | 3 ++- src/kernel/structures/_FieldInfo.php | 3 ++- src/kernel/structures/_FieldRef.php | 3 ++- src/kernel/structures/_Float.php | 3 ++- src/kernel/structures/_FloatVariableInfo.php | 3 ++- src/kernel/structures/_FullFrame.php | 3 ++- src/kernel/structures/_Integer.php | 3 ++- src/kernel/structures/_IntegerVariableInfo.php | 3 ++- src/kernel/structures/_LineNumberTable.php | 3 ++- src/kernel/structures/_LocalVariableTable.php | 3 ++- src/kernel/structures/_Long.php | 3 ++- src/kernel/structures/_LongVariableInfo.php | 3 ++- src/kernel/structures/_MethodInfo.php | 3 ++- src/kernel/structures/_Methodref.php | 3 ++- src/kernel/structures/_NameAndType.php | 3 ++- src/kernel/structures/_NullVariableInfo.php | 3 ++- src/kernel/structures/_ObjectVariableInfo.php | 3 ++- src/kernel/structures/_SameFrame.php | 3 ++- src/kernel/structures/_SameFrameExtended.php | 3 ++- src/kernel/structures/_SameLocals1StackItemFrame.php | 3 ++- src/kernel/structures/_SameLocals1StackItemFrameExtended.php | 3 ++- src/kernel/structures/_StackMapFrame.php | 3 ++- src/kernel/structures/_String.php | 3 ++- src/kernel/structures/_TopVariableInfo.php | 3 ++- src/kernel/structures/_UninitializedThisVariableInfo.php | 3 ++- src/kernel/structures/_UninitializedVariableInfo.php | 3 ++- src/kernel/structures/_Utf8.php | 3 ++- src/kernel/structures/_VerificationTypeInfo.php | 3 ++- tools/copy.php | 2 +- tools/copy_attr.php | 2 +- tools/copy_strt.php | 4 ++-- 263 files changed, 298 insertions(+), 264 deletions(-) diff --git a/src/kernel/attributes/AnnotationDefaultAttribute.php b/src/kernel/attributes/AnnotationDefaultAttribute.php index e1f2a357..7730dfc8 100644 --- a/src/kernel/attributes/AnnotationDefaultAttribute.php +++ b/src/kernel/attributes/AnnotationDefaultAttribute.php @@ -1,7 +1,7 @@ Class', '$this', $a); $a = str_replace('BinaryTools::', 'BinaryTool::', $a); $a = str_replace('getJavaBinaryStream()->', '', $a); diff --git a/tools/copy_strt.php b/tools/copy_strt.php index 772b7a56..fd1fc192 100644 --- a/tools/copy_strt.php +++ b/tools/copy_strt.php @@ -7,11 +7,11 @@ $a = str_replace('Varification', 'Verification', $a); $a = str_replace('$Class', '$this->getClass()', $a); $a = str_replace('getJavaBinaryStream()->', '', $a); - $a = str_replace('extends _ {', "implements StructureInterface\n{\n use \\PHPJava\\Kernel\\Core\\BinaryReader;[LB]", $a); + $a = str_replace('extends _ {', "implements StructureInterface\n{\n use \\PHPJava\\Kernel\\Core\\BinaryReader;\n use \\PHPJava\\Kernel\\Core\\ConstantPool;[LB]", $a); $a = str_replace('public function __construct (&$this->getClass()) {', "public function execute(): void\n {", $a); $a = str_replace('parent::__construct($this->getClass());', '', $a); $a = preg_replace("/\s*[\\n]+/", "\n", $a); - $a = str_replace('getClass()->read', '$this->read', $a); $a = str_replace('$this->Class->read', '$this->read', $a); From 6fe3e970523f977492bfb2f6f34b3b642da171f1 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 18:02:53 +0900 Subject: [PATCH 18/96] WIP --- src/kernel/attributes/AttributeInfo.php | 20 +++---- src/kernel/attributes/CodeAttribute.php | 58 +++++++++---------- .../attributes/InnerClassesAttribute.php | 8 +-- .../attributes/LineNumberTableAttribute.php | 16 ++--- .../LocalVariableTableAttribute.php | 10 ++-- src/kernel/attributes/SourceFileAttribute.php | 6 +- .../attributes/StackMapTableAttribute.php | 12 ++-- src/kernel/structures/_AppendFrame.php | 14 ++--- src/kernel/structures/_ChopFrame.php | 8 +-- src/kernel/structures/_Class.php | 6 +- src/kernel/structures/_Classes.php | 32 +++++----- src/kernel/structures/_Double.php | 10 ++-- src/kernel/structures/_DoubleVariableInfo.php | 4 +- src/kernel/structures/_ExceptionTable.php | 32 +++++----- src/kernel/structures/_FieldInfo.php | 30 +++++----- src/kernel/structures/_FieldRef.php | 12 ++-- src/kernel/structures/_Float.php | 6 +- src/kernel/structures/_FloatVariableInfo.php | 4 +- src/kernel/structures/_FullFrame.php | 28 ++++----- src/kernel/structures/_Integer.php | 6 +- .../structures/_IntegerVariableInfo.php | 4 +- src/kernel/structures/_LineNumberTable.php | 16 ++--- src/kernel/structures/_LocalVariableTable.php | 20 +++---- src/kernel/structures/_Long.php | 16 ++--- src/kernel/structures/_LongVariableInfo.php | 4 +- src/kernel/structures/_MethodInfo.php | 30 +++++----- src/kernel/structures/_Methodref.php | 12 ++-- src/kernel/structures/_NameAndType.php | 12 ++-- src/kernel/structures/_NullVariableInfo.php | 4 +- src/kernel/structures/_ObjectVariableInfo.php | 4 +- src/kernel/structures/_SameFrame.php | 4 +- src/kernel/structures/_SameFrameExtended.php | 8 +-- .../structures/_SameLocals1StackItemFrame.php | 8 +-- .../_SameLocals1StackItemFrameExtended.php | 12 ++-- src/kernel/structures/_StackMapFrame.php | 46 +++++++-------- src/kernel/structures/_String.php | 6 +- src/kernel/structures/_TopVariableInfo.php | 4 +- .../_UninitializedThisVariableInfo.php | 4 +- .../structures/_UninitializedVariableInfo.php | 8 +-- src/kernel/structures/_Utf8.php | 14 ++--- .../structures/_VerificationTypeInfo.php | 38 ++++++------ tools/copy_attr.php | 13 +++++ tools/copy_strt.php | 9 +++ 43 files changed, 320 insertions(+), 298 deletions(-) diff --git a/src/kernel/attributes/AttributeInfo.php b/src/kernel/attributes/AttributeInfo.php index bc86575b..be3465d9 100644 --- a/src/kernel/attributes/AttributeInfo.php +++ b/src/kernel/attributes/AttributeInfo.php @@ -9,27 +9,27 @@ final class AttributeInfo implements AttributeInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $AttributeNameIndex = null; - private $AttributeLength = null; - private $AttributeData = null; + private $attributeNameIndex = null; + private $attributeLength = null; + private $attributeData = null; public function execute(): void { - $this->AttributeNameIndex = $this->readUnsignedShort(); - $this->AttributeLength = $this->readUnsignedInt(); + $this->attributeNameIndex = $this->readUnsignedShort(); + $this->attributeLength = $this->readUnsignedInt(); $cpInfo = $this->getConstantPool()->getEntries(); - $classAttributeName = 'Java' . $cpInfo[$this->AttributeNameIndex]->getString() . 'Attribute'; - $this->AttributeData = new $classAttributeName($Class); + $classAttributeName = 'Java' . $cpInfo[$this->attributeNameIndex]->getString() . 'Attribute'; + $this->attributeData = new $classAttributeName($class); } public function getAttributeData() { - return $this->AttributeData; + return $this->attributeData; } public function getAttributeNameIndex() { - return $this->AttributeNameIndex; + return $this->attributeNameIndex; } public function getAttributeLength() { - return $this->AttributeLength; + return $this->attributeLength; } } diff --git a/src/kernel/attributes/CodeAttribute.php b/src/kernel/attributes/CodeAttribute.php index 07de87a5..5fc9c6da 100644 --- a/src/kernel/attributes/CodeAttribute.php +++ b/src/kernel/attributes/CodeAttribute.php @@ -9,53 +9,53 @@ final class CodeAttribute implements AttributeInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $MaxStack = null; - private $MaxLocals = null; - private $CodeLength = null; - private $RawCode = ''; - private $Code = array(); - private $ExceptionTableLength = null; - private $ExceptionTables = array(); - private $AttributeInfo = array(); + private $maxStack = null; + private $maxLocals = null; + private $codeLength = null; + private $rawCode = ''; + private $code = array(); + private $exceptionTableLength = null; + private $exceptionTables = array(); + private $attributeInfo = array(); public function execute(): void { - $this->MaxStack = $this->readUnsignedShort(); - $this->MaxLocals = $this->readUnsignedShort(); - $this->CodeLength = $this->readUnsignedInt(); + $this->maxStack = $this->readUnsignedShort(); + $this->maxLocals = $this->readUnsignedShort(); + $this->codeLength = $this->readUnsignedInt(); // read opcode - $this->Code = array(); - for ($i = 0; $i < $this->CodeLength; $i++) { - $this->Code[$i] = $this->readUnsignedByte(); - $this->RawCode .= chr($this->Code[$i]); + $this->code = array(); + for ($i = 0; $i < $this->codeLength; $i++) { + $this->code[$i] = $this->readUnsignedByte(); + $this->rawCode .= chr($this->code[$i]); } // read exception table - $this->ExceptionTableLength = $this->readUnsignedShort(); - for ($i = 0; $i < $this->ExceptionTableLength; $i++) { - $this->ExceptionTables[$i] = new JavaStructureExceptionTable($this); - $this->ExceptionTables[$i]->setStartPc($this->readUnsignedShort()); - $this->ExceptionTables[$i]->setEndPc($this->readUnsignedShort()); - $this->ExceptionTables[$i]->setHandlerPc($this->readUnsignedShort()); - $this->ExceptionTables[$i]->setCatchType($this->readUnsignedShort()); + $this->exceptionTableLength = $this->readUnsignedShort(); + for ($i = 0; $i < $this->exceptionTableLength; $i++) { + $this->exceptionTables[$i] = new JavaStructureExceptionTable($this); + $this->exceptionTables[$i]->setStartPc($this->readUnsignedShort()); + $this->exceptionTables[$i]->setEndPc($this->readUnsignedShort()); + $this->exceptionTables[$i]->setHandlerPc($this->readUnsignedShort()); + $this->exceptionTables[$i]->setCatchType($this->readUnsignedShort()); } - $this->AttributesCount = $this->readUnsignedShort(); - for ($i = 0; $i < $this->AttributesCount; $i++) { - $this->AttributeInfo[] = new JavaAttributeInfo($this); + $this->attributesCount = $this->readUnsignedShort(); + for ($i = 0; $i < $this->attributesCount; $i++) { + $this->attributeInfo[] = new \PHPJava\Kernel\Attributes\AttributeInfo($this); } } public function getExceptionTables() { - return $this->ExceptionTables; + return $this->exceptionTables; } public function getCode() { - return $this->RawCode; + return $this->rawCode; } public function getOpCodes() { - return $this->Code; + return $this->code; } public function getOpCodeLength() { - return $this->CodeLength; + return $this->codeLength; } } diff --git a/src/kernel/attributes/InnerClassesAttribute.php b/src/kernel/attributes/InnerClassesAttribute.php index 9d104b63..6eb23852 100644 --- a/src/kernel/attributes/InnerClassesAttribute.php +++ b/src/kernel/attributes/InnerClassesAttribute.php @@ -9,12 +9,12 @@ final class InnerClassesAttribute implements AttributeInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $NumberOfClasses = 0; - private $Classes = array(); + private $numberOfClasses = 0; + private $classes = array(); public function execute(): void { - $this->NumberOfClasses = $this->readUnsignedShort(); - for ($i = 0; $i < $this->NumberOfClasses; $i++) { + $this->numberOfClasses = $this->readUnsignedShort(); + for ($i = 0; $i < $this->numberOfClasses; $i++) { $thises[$i] = new JavaStructureClasses($this); $thises[$i]->setInnerClassInfoIndex($this->readUnsignedShort()); $thises[$i]->setOuterClassInfoIndex($this->readUnsignedShort()); diff --git a/src/kernel/attributes/LineNumberTableAttribute.php b/src/kernel/attributes/LineNumberTableAttribute.php index 0f0d85c2..f8e6d6f2 100644 --- a/src/kernel/attributes/LineNumberTableAttribute.php +++ b/src/kernel/attributes/LineNumberTableAttribute.php @@ -9,19 +9,19 @@ final class LineNumberTableAttribute implements AttributeInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $LineNumberTableLength = null; - private $LineNumberTables = null; + private $lineNumberTableLength = null; + private $lineNumberTables = null; public function execute(): void { - $this->LineNumberTableLength = $this->readUnsignedShort(); - for ($i = 0; $i < $this->LineNumberTableLength; $i++) { - $this->LineNumberTables[$i] = new JavaStructureLineNumberTable($Class); - $this->LineNumberTables[$i]->setStartPc($this->readUnsignedShort()); - $this->LineNumberTables[$i]->setLineNumber($this->readUnsignedShort()); + $this->lineNumberTableLength = $this->readUnsignedShort(); + for ($i = 0; $i < $this->lineNumberTableLength; $i++) { + $this->lineNumberTables[$i] = new JavaStructureLineNumberTable($class); + $this->lineNumberTables[$i]->setStartPc($this->readUnsignedShort()); + $this->lineNumberTables[$i]->setLineNumber($this->readUnsignedShort()); } } public function getLineNumberTables() { - return $this->LineNumberTables; + return $this->lineNumberTables; } } diff --git a/src/kernel/attributes/LocalVariableTableAttribute.php b/src/kernel/attributes/LocalVariableTableAttribute.php index 9d5868d1..2198f04c 100644 --- a/src/kernel/attributes/LocalVariableTableAttribute.php +++ b/src/kernel/attributes/LocalVariableTableAttribute.php @@ -9,13 +9,13 @@ final class LocalVariableTableAttribute implements AttributeInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $LocalVariableTableLength; - private $LocalVariableTables = array(); + private $localVariableTableLength; + private $localVariableTables = array(); public function execute(): void { - $this->LocalVariableTableLength = $this->readUnsignedShort(); - for ($i = 0; $i < $this->LocalVariableTableLength; $i++) { - $this->LocalVariableTables[] = new JavaStructureLocalVariableTable($Class); + $this->localVariableTableLength = $this->readUnsignedShort(); + for ($i = 0; $i < $this->localVariableTableLength; $i++) { + $this->localVariableTables[] = new JavaStructureLocalVariableTable($class); } } } diff --git a/src/kernel/attributes/SourceFileAttribute.php b/src/kernel/attributes/SourceFileAttribute.php index 5f898909..9063f550 100644 --- a/src/kernel/attributes/SourceFileAttribute.php +++ b/src/kernel/attributes/SourceFileAttribute.php @@ -9,13 +9,13 @@ final class SourceFileAttribute implements AttributeInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $SourceFileIndex = null; + private $sourceFileIndex = null; public function execute(): void { - $this->SourceFileIndex = $this->readUnsignedShort(); + $this->sourceFileIndex = $this->readUnsignedShort(); } public function getSourceFileIndex() { - return $this->SourceFileIndex; + return $this->sourceFileIndex; } } diff --git a/src/kernel/attributes/StackMapTableAttribute.php b/src/kernel/attributes/StackMapTableAttribute.php index 80cfa43b..e3f85f9b 100644 --- a/src/kernel/attributes/StackMapTableAttribute.php +++ b/src/kernel/attributes/StackMapTableAttribute.php @@ -9,17 +9,17 @@ final class StackMapTableAttribute implements AttributeInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $NumberOfEntries = null; - private $StackMapFrames = array(); + private $numberOfEntries = null; + private $stackMapFrames = array(); public function execute(): void { - $this->NumberOfEntries = $this->readUnsignedShort(); - for ($i = 0; $i < $this->NumberOfEntries; $i++) { - $this->StackMapFrames[] = new JavaStructureStackMapFrame($Class); + $this->numberOfEntries = $this->readUnsignedShort(); + for ($i = 0; $i < $this->numberOfEntries; $i++) { + $this->stackMapFrames[] = new JavaStructureStackMapFrame($class); } } public function getStackMapFrames() { - return $this->StackMapFrames; + return $this->stackMapFrames; } } diff --git a/src/kernel/structures/_AppendFrame.php b/src/kernel/structures/_AppendFrame.php index 040ed969..1dcf9822 100644 --- a/src/kernel/structures/_AppendFrame.php +++ b/src/kernel/structures/_AppendFrame.php @@ -9,15 +9,15 @@ class _AppendFrame implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $FrameType = null; - private $OffsetDelta = null; - private $Locals = array(); + private $frameType = null; + private $offsetDelta = null; + private $locals = array(); public function execute(): void { - $this->FrameType = $this->readUnsignedByte(); - $this->OffsetDelta = $this->readUnsignedShort(); - for ($i = 0, $s = $this->FrameType - 251; $i < $s; $i++) { - $this->Locals[] = new _VerificationTypeInfo($this->getClass()); + $this->frameType = $this->readUnsignedByte(); + $this->offsetDelta = $this->readUnsignedShort(); + for ($i = 0, $s = $this->frameType - 251; $i < $s; $i++) { + $this->locals[] = new _VerificationTypeInfo($this->getClass()); } } } diff --git a/src/kernel/structures/_ChopFrame.php b/src/kernel/structures/_ChopFrame.php index efb90d78..400f5932 100644 --- a/src/kernel/structures/_ChopFrame.php +++ b/src/kernel/structures/_ChopFrame.php @@ -9,11 +9,11 @@ class _ChopFrame implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $FrameType = null; - private $OffsetDelta = null; + private $frameType = null; + private $offsetDelta = null; public function execute(): void { - $this->FrameType = $this->readUnsignedByte(); - $this->OffsetDelta = $this->readUnsignedShort(); + $this->frameType = $this->readUnsignedByte(); + $this->offsetDelta = $this->readUnsignedShort(); } } diff --git a/src/kernel/structures/_Class.php b/src/kernel/structures/_Class.php index 636d4bad..b7e146d6 100644 --- a/src/kernel/structures/_Class.php +++ b/src/kernel/structures/_Class.php @@ -9,13 +9,13 @@ class _Class implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $ClassIndex = null; + private $classIndex = null; public function execute(): void { - $this->ClassIndex = $this->readUnsignedShort(); + $this->classIndex = $this->readUnsignedShort(); } public function getClassIndex() { - return $this->ClassIndex; + return $this->classIndex; } } diff --git a/src/kernel/structures/_Classes.php b/src/kernel/structures/_Classes.php index f0c37a37..e4b1f825 100644 --- a/src/kernel/structures/_Classes.php +++ b/src/kernel/structures/_Classes.php @@ -9,43 +9,43 @@ class _Classes implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $InnerClassInfoIndex = 0; - private $OuterClassInfoIndex = 0; - private $InnerNameIndex = 0; - private $InnerClassAccessFlag = 0; + private $innerClassInfoIndex = 0; + private $outerClassInfoIndex = 0; + private $innerNameIndex = 0; + private $innerClassAccessFlag = 0; public function execute(): void { } - public function setInnerClassInfoIndex($InnerClassInfoIndex) + public function setInnerClassInfoIndex($innerClassInfoIndex) { - $this->InnerClassInfoIndex = $InnerClassInfoIndex; + $this->innerClassInfoIndex = $innerClassInfoIndex; } - public function setOuterClassInfoIndex($OuterClassInfoIndex) + public function setOuterClassInfoIndex($outerClassInfoIndex) { - $this->OuterClassInfoIndex = $OuterClassInfoIndex; + $this->outerClassInfoIndex = $outerClassInfoIndex; } - public function setInnerNameIndex($InnerNameIndex) + public function setInnerNameIndex($innerNameIndex) { - $this->InnerNameIndex = $InnerNameIndex; + $this->innerNameIndex = $innerNameIndex; } - public function setInnerClassAccessFlag($InnerClassAccessFlag) + public function setInnerClassAccessFlag($innerClassAccessFlag) { - $this->InnerClassAccessFlag = $InnerClassAccessFlag; + $this->innerClassAccessFlag = $innerClassAccessFlag; } public function getInnerClassInfoIndex() { - return $this->InnerClassInfoIndex; + return $this->innerClassInfoIndex; } public function getOuterClassInfoIndex() { - return $this->OuterClassInfoIndex; + return $this->outerClassInfoIndex; } public function getInnerNameIndex() { - return $this->InnerNameIndex; + return $this->innerNameIndex; } public function getInnerClassAccessFlag() { - return $this->InnerClassAccessFlag; + return $this->innerClassAccessFlag; } } diff --git a/src/kernel/structures/_Double.php b/src/kernel/structures/_Double.php index 3f858744..e06a17f8 100644 --- a/src/kernel/structures/_Double.php +++ b/src/kernel/structures/_Double.php @@ -9,15 +9,15 @@ class _Double implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $HighBytes = null; - private $LowBytes = null; + private $highBytes = null; + private $lowBytes = null; public function execute(): void { - $this->HighBytes = $this->readUnsignedInt(); - $this->LowBytes = $this->readUnsignedInt(); + $this->highBytes = $this->readUnsignedInt(); + $this->lowBytes = $this->readUnsignedInt(); } public function getBytes() { - return ($this->HighBytes << 32) + $this->LowBytes; + return ($this->highBytes << 32) + $this->lowBytes; } } diff --git a/src/kernel/structures/_DoubleVariableInfo.php b/src/kernel/structures/_DoubleVariableInfo.php index 9219b6a0..6853ed67 100644 --- a/src/kernel/structures/_DoubleVariableInfo.php +++ b/src/kernel/structures/_DoubleVariableInfo.php @@ -9,9 +9,9 @@ class _DoubleVariableInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Tag = null; + private $tag = null; public function execute(): void { - $this->Tag = $this->readUnsignedByte(); + $this->tag = $this->readUnsignedByte(); } } diff --git a/src/kernel/structures/_ExceptionTable.php b/src/kernel/structures/_ExceptionTable.php index b13ac656..0a842f79 100644 --- a/src/kernel/structures/_ExceptionTable.php +++ b/src/kernel/structures/_ExceptionTable.php @@ -9,40 +9,40 @@ class _ExceptionTable implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $StartPc = null; - private $EndPc = null; - private $HandlerPc = null; - private $CatchType = null; - public function setStartPc($StartPc) + private $startPc = null; + private $endPc = null; + private $handlerPc = null; + private $catchType = null; + public function setStartPc($startPc) { - $this->StartPc = $StartPc; + $this->startPc = $startPc; } - public function setEndPc($EndPc) + public function setEndPc($endPc) { - $this->EndPc = $EndPc; + $this->endPc = $endPc; } - public function setHandlerPc($HandlerPc) + public function setHandlerPc($handlerPc) { - $this->HandlerPc = $HandlerPc; + $this->handlerPc = $handlerPc; } - public function setCatchType($CatchType) + public function setCatchType($catchType) { - $this->CatchType = $CatchType; + $this->catchType = $catchType; } public function getStartPc() { - return $this->StartPc; + return $this->startPc; } public function getEndPc() { - return $this->EndPc; + return $this->endPc; } public function getHandlerPc() { - return $this->HandlerPc; + return $this->handlerPc; } public function getCatchType() { - return $this->CatchType; + return $this->catchType; } } diff --git a/src/kernel/structures/_FieldInfo.php b/src/kernel/structures/_FieldInfo.php index 3b482e11..74362dad 100644 --- a/src/kernel/structures/_FieldInfo.php +++ b/src/kernel/structures/_FieldInfo.php @@ -9,35 +9,35 @@ class _FieldInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $AccessFlag = null; - private $NameIndex = null; - private $DescriptorIndex = null; - private $AttributeCount = 0; - private $Attributes = array(); + private $accessFlag = null; + private $nameIndex = null; + private $descriptorIndex = null; + private $attributeCount = 0; + private $attributes = array(); public function execute(): void { - $this->AccessFlag = $this->readUnsignedShort(); - $this->NameIndex = $this->readUnsignedShort(); - $this->DescriptorIndex = $this->readUnsignedShort(); - $this->AttributeCount = $this->readUnsignedShort(); - for ($i = 0; $i < $this->AttributeCount; $i++) { - $this->Attributes[$i] = new \PHPJava\Kernel\Attributes\AttributeInfo($this->getClass()); + $this->accessFlag = $this->readUnsignedShort(); + $this->nameIndex = $this->readUnsignedShort(); + $this->descriptorIndex = $this->readUnsignedShort(); + $this->attributeCount = $this->readUnsignedShort(); + for ($i = 0; $i < $this->attributeCount; $i++) { + $this->attributes[$i] = new \PHPJava\Kernel\Attributes\AttributeInfo($this->getClass()); } } public function getAccessFlag() { - return $this->AccessFlag; + return $this->accessFlag; } public function getNameIndex() { - return $this->NameIndex; + return $this->nameIndex; } public function getDescriptorIndex() { - return $this->DescriptorIndex; + return $this->descriptorIndex; } public function getAttributes() { - return $this->Attributes; + return $this->attributes; } } diff --git a/src/kernel/structures/_FieldRef.php b/src/kernel/structures/_FieldRef.php index 7e62ff0a..bbbc84d9 100644 --- a/src/kernel/structures/_FieldRef.php +++ b/src/kernel/structures/_FieldRef.php @@ -9,19 +9,19 @@ class _Fieldref implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $ClassIndex = null; - private $NameAndTypeIndex = null; + private $classIndex = null; + private $nameAndTypeIndex = null; public function execute(): void { - $this->ClassIndex = $this->readUnsignedShort(); - $this->NameAndTypeIndex = $this->readUnsignedShort(); + $this->classIndex = $this->readUnsignedShort(); + $this->nameAndTypeIndex = $this->readUnsignedShort(); } public function getClassIndex() { - return $this->ClassIndex; + return $this->classIndex; } public function getNameAndTypeIndex() { - return $this->NameAndTypeIndex; + return $this->nameAndTypeIndex; } } diff --git a/src/kernel/structures/_Float.php b/src/kernel/structures/_Float.php index e19fb803..a12364f5 100644 --- a/src/kernel/structures/_Float.php +++ b/src/kernel/structures/_Float.php @@ -9,13 +9,13 @@ class _Float implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Bytes = null; + private $bytes = null; public function execute(): void { - $this->Bytes = $this->readUnsignedInt(); + $this->bytes = $this->readUnsignedInt(); } public function getBytes() { - return $this->Bytes; + return $this->bytes; } } diff --git a/src/kernel/structures/_FloatVariableInfo.php b/src/kernel/structures/_FloatVariableInfo.php index 8be74f62..b39a53b4 100644 --- a/src/kernel/structures/_FloatVariableInfo.php +++ b/src/kernel/structures/_FloatVariableInfo.php @@ -9,9 +9,9 @@ class _FloatVariableInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Tag = null; + private $tag = null; public function execute(): void { - $this->Tag = $this->readUnsignedByte(); + $this->tag = $this->readUnsignedByte(); } } diff --git a/src/kernel/structures/_FullFrame.php b/src/kernel/structures/_FullFrame.php index 87dc83d0..074655d1 100644 --- a/src/kernel/structures/_FullFrame.php +++ b/src/kernel/structures/_FullFrame.php @@ -9,23 +9,23 @@ class _FullFrame implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $FrameType = null; - private $OffsetDelta = null; - private $NumberOfLocals = null; - private $NumberOfStackItems = null; - private $Locals = array(); - private $Stack = array(); + private $frameType = null; + private $offsetDelta = null; + private $numberOfLocals = null; + private $numberOfStackItems = null; + private $locals = array(); + private $stack = array(); public function execute(): void { - $this->FrameType = $this->readUnsignedByte(); - $this->OffsetDelta = $this->readUnsignedShort(); - $this->NumberOfLocals = $this->readUnsignedShort(); - for ($i = 0; $i < $this->NumberOfLocals; $i++) { - $this->Locals[] = new _VerificationTypeInfo($this->getClass()); + $this->frameType = $this->readUnsignedByte(); + $this->offsetDelta = $this->readUnsignedShort(); + $this->numberOfLocals = $this->readUnsignedShort(); + for ($i = 0; $i < $this->numberOfLocals; $i++) { + $this->locals[] = new _VerificationTypeInfo($this->getClass()); } - $this->NumberOfStackItems = $this->readUnsignedShort(); - for ($i = 0; $i < $this->NumberOfStackItems; $i++) { - $this->Stack[] = new _VerificationTypeInfo($this->getClass()); + $this->numberOfStackItems = $this->readUnsignedShort(); + for ($i = 0; $i < $this->numberOfStackItems; $i++) { + $this->stack[] = new _VerificationTypeInfo($this->getClass()); } } } diff --git a/src/kernel/structures/_Integer.php b/src/kernel/structures/_Integer.php index 66d79300..d9ac654b 100644 --- a/src/kernel/structures/_Integer.php +++ b/src/kernel/structures/_Integer.php @@ -9,13 +9,13 @@ class _Integer implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Bytes = null; + private $bytes = null; public function execute(): void { - $this->Bytes = $this->readInt(); + $this->bytes = $this->readInt(); } public function getBytes() { - return $this->Bytes; + return $this->bytes; } } diff --git a/src/kernel/structures/_IntegerVariableInfo.php b/src/kernel/structures/_IntegerVariableInfo.php index 0e7a8fa3..4ffc399a 100644 --- a/src/kernel/structures/_IntegerVariableInfo.php +++ b/src/kernel/structures/_IntegerVariableInfo.php @@ -9,9 +9,9 @@ class _IntegerVariableInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Tag = null; + private $tag = null; public function execute(): void { - $this->Tag = $this->readUnsignedByte(); + $this->tag = $this->readUnsignedByte(); } } diff --git a/src/kernel/structures/_LineNumberTable.php b/src/kernel/structures/_LineNumberTable.php index b259f724..65bdc8b6 100644 --- a/src/kernel/structures/_LineNumberTable.php +++ b/src/kernel/structures/_LineNumberTable.php @@ -9,22 +9,22 @@ class _LineNumberTable implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $StartPc = null; - private $LineNumber = null; - public function setStartPc($StartPc) + private $startPc = null; + private $lineNumber = null; + public function setStartPc($startPc) { - $this->StartPc = $StartPc; + $this->startPc = $startPc; } - public function setLineNumber($LineNumber) + public function setLineNumber($lineNumber) { - $this->LineNumber = $LineNumber; + $this->lineNumber = $lineNumber; } public function getStartPc() { - return $this->StartPc; + return $this->startPc; } public function getLineNumber() { - return $this->LineNumber; + return $this->lineNumber; } } diff --git a/src/kernel/structures/_LocalVariableTable.php b/src/kernel/structures/_LocalVariableTable.php index 2cb2bd9a..25e3cd8c 100644 --- a/src/kernel/structures/_LocalVariableTable.php +++ b/src/kernel/structures/_LocalVariableTable.php @@ -9,17 +9,17 @@ class _LocalVariableTable implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $StartPc = 0; - private $Length = 0; - private $NameIndex = 0; - private $DescriptorIndex = 0; - private $Index = 0; + private $startPc = 0; + private $length = 0; + private $nameIndex = 0; + private $descriptorIndex = 0; + private $index = 0; public function execute(): void { - $this->StartPc = $this->readUnsignedShort(); - $this->Length = $this->readUnsignedShort(); - $this->NameIndex = $this->readUnsignedShort(); - $this->DescriptorIndex = $this->readUnsignedShort(); - $this->Index = $this->readUnsignedShort(); + $this->startPc = $this->readUnsignedShort(); + $this->length = $this->readUnsignedShort(); + $this->nameIndex = $this->readUnsignedShort(); + $this->descriptorIndex = $this->readUnsignedShort(); + $this->index = $this->readUnsignedShort(); } } diff --git a/src/kernel/structures/_Long.php b/src/kernel/structures/_Long.php index 67a03b78..42a727a9 100644 --- a/src/kernel/structures/_Long.php +++ b/src/kernel/structures/_Long.php @@ -9,18 +9,18 @@ class _Long implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - // private $HighBytes = null; - // private $LowBytes = null; - private $Bytes = 0; + // private $highBytes = null; + // private $lowBytes = null; + private $bytes = 0; public function execute(): void { - //$this->HighBytes = $this->readUnsignedInt(); - //$this->LowBytes = $this->readUnsignedInt(); - $this->Bytes = $this->readLong(); + //$this->highBytes = $this->readUnsignedInt(); + //$this->lowBytes = $this->readUnsignedInt(); + $this->bytes = $this->readLong(); } public function getBytes() { - //return ($this->HighBytes << 32) + $this->LowBytes; - return $this->Bytes; + //return ($this->highBytes << 32) + $this->lowBytes; + return $this->bytes; } } diff --git a/src/kernel/structures/_LongVariableInfo.php b/src/kernel/structures/_LongVariableInfo.php index ccf2a154..71b24fb3 100644 --- a/src/kernel/structures/_LongVariableInfo.php +++ b/src/kernel/structures/_LongVariableInfo.php @@ -9,9 +9,9 @@ class _LongVariableInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Tag = null; + private $tag = null; public function execute(): void { - $this->Tag = $this->readUnsignedByte(); + $this->tag = $this->readUnsignedByte(); } } diff --git a/src/kernel/structures/_MethodInfo.php b/src/kernel/structures/_MethodInfo.php index 093a7712..472b06b8 100644 --- a/src/kernel/structures/_MethodInfo.php +++ b/src/kernel/structures/_MethodInfo.php @@ -9,35 +9,35 @@ class _MethodInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $AccessFlag = null; - private $NameIndex = null; - private $DescriptorIndex = null; - private $AttributeCount = 0; - private $Attributes = array(); + private $accessFlag = null; + private $nameIndex = null; + private $descriptorIndex = null; + private $attributeCount = 0; + private $attributes = array(); public function execute(): void { - $this->AccessFlag = $this->readUnsignedShort(); - $this->NameIndex = $this->readUnsignedShort(); - $this->DescriptorIndex = $this->readUnsignedShort(); - $this->AttributeCount = $this->readUnsignedShort(); - for ($i = 0; $i < $this->AttributeCount; $i++) { - $this->Attributes[$i] = new \PHPJava\Kernel\Attributes\AttributeInfo($this->getClass()); + $this->accessFlag = $this->readUnsignedShort(); + $this->nameIndex = $this->readUnsignedShort(); + $this->descriptorIndex = $this->readUnsignedShort(); + $this->attributeCount = $this->readUnsignedShort(); + for ($i = 0; $i < $this->attributeCount; $i++) { + $this->attributes[$i] = new \PHPJava\Kernel\Attributes\AttributeInfo($this->getClass()); } } public function getAccessFlag() { - return $this->AccessFlag; + return $this->accessFlag; } public function getNameIndex() { - return $this->NameIndex; + return $this->nameIndex; } public function getDescriptorIndex() { - return $this->DescriptorIndex; + return $this->descriptorIndex; } public function getAttributes() { - return $this->Attributes; + return $this->attributes; } } diff --git a/src/kernel/structures/_Methodref.php b/src/kernel/structures/_Methodref.php index b2d4b1c2..61d7379c 100644 --- a/src/kernel/structures/_Methodref.php +++ b/src/kernel/structures/_Methodref.php @@ -9,19 +9,19 @@ class _Methodref implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $ClassIndex = null; - private $NameAndTypeIndex = null; + private $classIndex = null; + private $nameAndTypeIndex = null; public function execute(): void { - $this->ClassIndex = $this->readUnsignedShort(); - $this->NameAndTypeIndex = $this->readUnsignedShort(); + $this->classIndex = $this->readUnsignedShort(); + $this->nameAndTypeIndex = $this->readUnsignedShort(); } public function getClassIndex() { - return $this->ClassIndex; + return $this->classIndex; } public function getNameAndTypeIndex() { - return $this->NameAndTypeIndex; + return $this->nameAndTypeIndex; } } diff --git a/src/kernel/structures/_NameAndType.php b/src/kernel/structures/_NameAndType.php index c9e55126..17b885ec 100644 --- a/src/kernel/structures/_NameAndType.php +++ b/src/kernel/structures/_NameAndType.php @@ -9,19 +9,19 @@ class _NameAndType implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $NameIndex = null; - private $DescriptorIndex = null; + private $nameIndex = null; + private $descriptorIndex = null; public function execute(): void { - $this->NameIndex = $this->readUnsignedShort(); - $this->DescriptorIndex = $this->readUnsignedShort(); + $this->nameIndex = $this->readUnsignedShort(); + $this->descriptorIndex = $this->readUnsignedShort(); } public function getNameIndex() { - return $this->NameIndex; + return $this->nameIndex; } public function getDescriptorIndex() { - return $this->DescriptorIndex; + return $this->descriptorIndex; } } diff --git a/src/kernel/structures/_NullVariableInfo.php b/src/kernel/structures/_NullVariableInfo.php index 2b1f5017..f256c551 100644 --- a/src/kernel/structures/_NullVariableInfo.php +++ b/src/kernel/structures/_NullVariableInfo.php @@ -9,9 +9,9 @@ class _NullVariableInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Tag = null; + private $tag = null; public function execute(): void { - $this->Tag = $this->readUnsignedByte(); + $this->tag = $this->readUnsignedByte(); } } diff --git a/src/kernel/structures/_ObjectVariableInfo.php b/src/kernel/structures/_ObjectVariableInfo.php index 84ad7b50..a0f0893c 100644 --- a/src/kernel/structures/_ObjectVariableInfo.php +++ b/src/kernel/structures/_ObjectVariableInfo.php @@ -9,11 +9,11 @@ class _ObjectVariableInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Tag = null; + private $tag = null; private $cpoolIndex = null; public function execute(): void { - $this->Tag = $this->readUnsignedByte(); + $this->tag = $this->readUnsignedByte(); $this->cpoolIndex = $this->readUnsignedShort(); } } diff --git a/src/kernel/structures/_SameFrame.php b/src/kernel/structures/_SameFrame.php index cdee7387..636552a3 100644 --- a/src/kernel/structures/_SameFrame.php +++ b/src/kernel/structures/_SameFrame.php @@ -9,9 +9,9 @@ class _SameFrame implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $FrameType = null; + private $frameType = null; public function execute(): void { - $this->FrameType = $this->readUnsignedByte(); + $this->frameType = $this->readUnsignedByte(); } } diff --git a/src/kernel/structures/_SameFrameExtended.php b/src/kernel/structures/_SameFrameExtended.php index 1e26b2cb..3ff99b2a 100644 --- a/src/kernel/structures/_SameFrameExtended.php +++ b/src/kernel/structures/_SameFrameExtended.php @@ -9,11 +9,11 @@ class _SameFrameExtended implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $FrameType = null; - private $OffsetDelta = null; + private $frameType = null; + private $offsetDelta = null; public function execute(): void { - $this->FrameType = $this->readUnsignedByte(); - $this->OffsetDelta = $this->readUnsignedShort(); + $this->frameType = $this->readUnsignedByte(); + $this->offsetDelta = $this->readUnsignedShort(); } } diff --git a/src/kernel/structures/_SameLocals1StackItemFrame.php b/src/kernel/structures/_SameLocals1StackItemFrame.php index 105070e4..518f2f59 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrame.php +++ b/src/kernel/structures/_SameLocals1StackItemFrame.php @@ -9,11 +9,11 @@ class _SameLocals1StackItemFrame implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $FrameType = null; - private $Stack = array(); + private $frameType = null; + private $stack = array(); public function execute(): void { - $this->FrameType = $this->readUnsignedByte(); - $this->Stack[] = new _VerificationTypeInfo($this->getClass()); + $this->frameType = $this->readUnsignedByte(); + $this->stack[] = new _VerificationTypeInfo($this->getClass()); } } diff --git a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php index 733d8be1..4119b8ab 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php +++ b/src/kernel/structures/_SameLocals1StackItemFrameExtended.php @@ -9,13 +9,13 @@ class _SameLocals1StackItemFrameExtended implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $FrameType = null; - private $OffsetDelta = null; - private $Locals = array(); + private $frameType = null; + private $offsetDelta = null; + private $locals = array(); public function execute(): void { - $this->FrameType = $this->readUnsignedByte(); - $this->OffsetDelta = $this->readUnsignedShort(); - $this->Locals[] = new _VerificationTypeInfo($this->getClass()); + $this->frameType = $this->readUnsignedByte(); + $this->offsetDelta = $this->readUnsignedShort(); + $this->locals[] = new _VerificationTypeInfo($this->getClass()); } } diff --git a/src/kernel/structures/_StackMapFrame.php b/src/kernel/structures/_StackMapFrame.php index 97474c75..667f5343 100644 --- a/src/kernel/structures/_StackMapFrame.php +++ b/src/kernel/structures/_StackMapFrame.php @@ -9,33 +9,33 @@ class _StackMapFrame implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $FrameType = null; - private $SameFrame = null; - private $SameLocals1StackItemFrame = null; - private $SameLocals1StackItemFrameExtended = null; - private $ChopFrame = null; - private $SameFrameExtended = null; - private $AppendFrame = null; - private $FullFrame = null; + private $frameType = null; + private $sameFrame = null; + private $sameLocals1StackItemFrame = null; + private $sameLocals1StackItemFrameExtended = null; + private $chopFrame = null; + private $sameFrameExtended = null; + private $appendFrame = null; + private $fullFrame = null; public function execute(): void { - $this->FrameType = $this->readUnsignedByte(); + $this->frameType = $this->readUnsignedByte(); // back by frametype $this->getClass()->seek(-1); - if ($this->FrameType >= 0 && $this->FrameType <= 63) { - $this->SameFrame = new _SameFrame($this->getClass()); - } elseif ($this->FrameType >= 64 && $this->FrameType <= 127) { - $this->SameLocals1StackItemFrame = new _SameLocals1StackItemFrame($this->getClass()); - } elseif ($this->FrameType == 247) { - $this->SameLocals1StackItemFrameExtended = new _SameLocals1StackItemFrameExtended($this->getClass()); - } elseif ($this->FrameType >= 248 && $this->FrameType <= 250) { - $this->ChopFrame = new _ChopFrame($this->getClass()); - } elseif ($this->FrameType == 251) { - $this->SameFrameExtended = new _SameFrameExtended($this->getClass()); - } elseif ($this->FrameType >= 252 && $this->FrameType <= 254) { - $this->AppendFrame = new _AppendFrame($this->getClass()); - } elseif ($this->FrameType == 255) { - $this->FullFrame = new _FullFrame($this->getClass()); + if ($this->frameType >= 0 && $this->frameType <= 63) { + $this->sameFrame = new _SameFrame($this->getClass()); + } elseif ($this->frameType >= 64 && $this->frameType <= 127) { + $this->sameLocals1StackItemFrame = new _SameLocals1StackItemFrame($this->getClass()); + } elseif ($this->frameType == 247) { + $this->sameLocals1StackItemFrameExtended = new _SameLocals1StackItemFrameExtended($this->getClass()); + } elseif ($this->frameType >= 248 && $this->frameType <= 250) { + $this->chopFrame = new _ChopFrame($this->getClass()); + } elseif ($this->frameType == 251) { + $this->sameFrameExtended = new _SameFrameExtended($this->getClass()); + } elseif ($this->frameType >= 252 && $this->frameType <= 254) { + $this->appendFrame = new _AppendFrame($this->getClass()); + } elseif ($this->frameType == 255) { + $this->fullFrame = new _FullFrame($this->getClass()); } } } diff --git a/src/kernel/structures/_String.php b/src/kernel/structures/_String.php index fe1df7b7..a7c2b962 100644 --- a/src/kernel/structures/_String.php +++ b/src/kernel/structures/_String.php @@ -9,13 +9,13 @@ class _String implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $StringIndex = null; + private $stringIndex = null; public function execute(): void { - $this->StringIndex = $this->readUnsignedShort(); + $this->stringIndex = $this->readUnsignedShort(); } public function getStringIndex() { - return $this->StringIndex; + return $this->stringIndex; } } diff --git a/src/kernel/structures/_TopVariableInfo.php b/src/kernel/structures/_TopVariableInfo.php index cfd6ea5e..add4ab89 100644 --- a/src/kernel/structures/_TopVariableInfo.php +++ b/src/kernel/structures/_TopVariableInfo.php @@ -9,9 +9,9 @@ class _TopVariableInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Tag = null; + private $tag = null; public function execute(): void { - $this->Tag = $this->readUnsignedByte(); + $this->tag = $this->readUnsignedByte(); } } diff --git a/src/kernel/structures/_UninitializedThisVariableInfo.php b/src/kernel/structures/_UninitializedThisVariableInfo.php index f1387e95..57ffa1f2 100644 --- a/src/kernel/structures/_UninitializedThisVariableInfo.php +++ b/src/kernel/structures/_UninitializedThisVariableInfo.php @@ -9,9 +9,9 @@ class _UninitializedThisVariableInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Tag = null; + private $tag = null; public function execute(): void { - $this->Tag = $this->readUnsignedByte(); + $this->tag = $this->readUnsignedByte(); } } diff --git a/src/kernel/structures/_UninitializedVariableInfo.php b/src/kernel/structures/_UninitializedVariableInfo.php index cc6fdfec..24be7baa 100644 --- a/src/kernel/structures/_UninitializedVariableInfo.php +++ b/src/kernel/structures/_UninitializedVariableInfo.php @@ -9,11 +9,11 @@ class _UninitializedVariableInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Tag = null; - private $Offset = null; + private $tag = null; + private $offset = null; public function execute(): void { - $this->Tag = $this->readUnsignedByte(); - $this->Offset = $this->readUnsignedShort(); + $this->tag = $this->readUnsignedByte(); + $this->offset = $this->readUnsignedShort(); } } diff --git a/src/kernel/structures/_Utf8.php b/src/kernel/structures/_Utf8.php index 0759e631..e038789c 100644 --- a/src/kernel/structures/_Utf8.php +++ b/src/kernel/structures/_Utf8.php @@ -9,21 +9,21 @@ class _Utf8 implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; - private $Length = 0; - private $String = ''; + private $length = 0; + private $string = ''; public function execute(): void { - $this->Length = $this->readUnsignedShort(); - for ($i = 0; $i < $this->Length; $i++) { - $this->String .= chr($this->readUnsignedByte()); + $this->length = $this->readUnsignedShort(); + for ($i = 0; $i < $this->length; $i++) { + $this->string .= chr($this->readUnsignedByte()); } } public function getLength() { - return $this->Length; + return $this->length; } public function getString() { - return $this->String; + return $this->string; } } diff --git a/src/kernel/structures/_VerificationTypeInfo.php b/src/kernel/structures/_VerificationTypeInfo.php index 34ee5a2c..c438d5e2 100644 --- a/src/kernel/structures/_VerificationTypeInfo.php +++ b/src/kernel/structures/_VerificationTypeInfo.php @@ -11,27 +11,27 @@ class _VerificationTypeInfo implements StructureInterface public function execute(): void { - $this->Tag = $this->readUnsignedByte(); + $this->tag = $this->readUnsignedByte(); // back by tag $this->getClass()->seek(-1); - if ($this->Tag == 0) { - $this->TopVariableInfo = new _TopVariableInfo($this->getClass()); - } elseif ($this->Tag == 1) { - $this->IntegerVariableInfo = new _IntegerVariableInfo($this->getClass()); - } elseif ($this->Tag == 2) { - $this->FloatVariableInfo = new _FloatVariableInfo($this->getClass()); - } elseif ($this->Tag == 4) { - $this->LongVariableInfo = new _LongVariableInfo($this->getClass()); - } elseif ($this->Tag == 3) { - $this->DoubleVariableInfo = new _DoubleVariableInfo($this->getClass()); - } elseif ($this->Tag == 5) { - $this->NullVariableInfo = new _NullVariableInfo($this->getClass()); - } elseif ($this->Tag == 6) { - $this->UninitializedThisVariableInfo = new _UninitializedThisVariableInfo($this->getClass()); - } elseif ($this->Tag == 7) { - $this->ObjectVariableInfo = new _ObjectVariableInfo($this->getClass()); - } elseif ($this->Tag == 8) { - $this->UninitializedVariableInfo = new _UninitializedVariableInfo($this->getClass()); + if ($this->tag == 0) { + $this->topVariableInfo = new _TopVariableInfo($this->getClass()); + } elseif ($this->tag == 1) { + $this->integerVariableInfo = new _IntegerVariableInfo($this->getClass()); + } elseif ($this->tag == 2) { + $this->floatVariableInfo = new _FloatVariableInfo($this->getClass()); + } elseif ($this->tag == 4) { + $this->longVariableInfo = new _LongVariableInfo($this->getClass()); + } elseif ($this->tag == 3) { + $this->doubleVariableInfo = new _DoubleVariableInfo($this->getClass()); + } elseif ($this->tag == 5) { + $this->nullVariableInfo = new _NullVariableInfo($this->getClass()); + } elseif ($this->tag == 6) { + $this->uninitializedThisVariableInfo = new _UninitializedThisVariableInfo($this->getClass()); + } elseif ($this->tag == 7) { + $this->objectVariableInfo = new _ObjectVariableInfo($this->getClass()); + } elseif ($this->tag == 8) { + $this->uninitializedVariableInfo = new _UninitializedVariableInfo($this->getClass()); } } } diff --git a/tools/copy_attr.php b/tools/copy_attr.php index c219e079..7565851f 100644 --- a/tools/copy_attr.php +++ b/tools/copy_attr.php @@ -15,6 +15,19 @@ $a = str_replace('BinaryTools::', 'BinaryTool::', $a); $a = str_replace('getJavaBinaryStream()->', '', $a); $a = str_replace('getCpInfo()', 'getConstantPool()->getEntries()', $a); + + + $a = str_replace('JavaAttributeInfo', '\\PHPJava\\Kernel\\Attributes\\AttributeInfo', $a); + $a = str_replace('JavaAttribute', '\\PHPJava\\Kernel\\Attributes\\', $a); + + $a = preg_replace_callback('/\$([A-Z])([a-z0-9_]*)/', function ($arg) { + return '$' . strtolower($arg[1]) . $arg[2]; + }, $a); + + $a = preg_replace_callback('/\$this->([A-Z])/', function ($arg) { + return '$this->' . strtolower($arg[1]); + }, $a); + var_dump($class, $a); file_put_contents(__DIR__ . '/../src/kernel/attributes/' . $class, $a . "\n"); } \ No newline at end of file diff --git a/tools/copy_strt.php b/tools/copy_strt.php index fd1fc192..3b32e3de 100644 --- a/tools/copy_strt.php +++ b/tools/copy_strt.php @@ -19,6 +19,15 @@ $a = str_replace('JavaAttributeInfo', '\\PHPJava\\Kernel\\Attributes\\AttributeInfo', $a); $a = str_replace('JavaAttribute', '\\PHPJava\\Kernel\\Attributes\\', $a); + + $a = preg_replace_callback('/\$([A-Z])([a-z0-9_]*)/', function ($arg) { + return '$' . strtolower($arg[1]) . $arg[2]; + }, $a); + + $a = preg_replace_callback('/\$this->([A-Z])/', function ($arg) { + return '$this->' . strtolower($arg[1]); + }, $a); + var_dump($class, $a); file_put_contents(__DIR__ . '/../src/kernel/structures/' . $class, $a . "\n"); } From 001e32f4846946d54f481f86ab43cf204442b23e Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 19:15:44 +0900 Subject: [PATCH 19/96] WIP commit --- src/kernel/attributes/AttributeInfo.php | 9 ++- src/kernel/attributes/CodeAttribute.php | 35 +++++++---- .../attributes/LineNumberTableAttribute.php | 9 ++- .../attributes/StackMapTableAttribute.php | 5 +- src/kernel/core/BinaryReader.php | 28 ++++----- .../AppendFrame.php} | 8 ++- .../_ChopFrame.php => frames/ChopFrame.php} | 4 +- src/kernel/frames/FrameInterface.php | 8 +++ .../_FullFrame.php => frames/FullFrame.php} | 17 ++++-- .../_SameFrame.php => frames/SameFrame.php} | 5 +- .../SameFrameExtended.php} | 5 +- .../SameLocals1StackItemFrame.php} | 11 ++-- .../SameLocals1StackItemFrameExtended.php} | 10 ++-- src/kernel/structures/_ExceptionTable.php | 16 +++++ src/kernel/structures/_LineNumberTable.php | 7 +++ src/kernel/structures/_MethodInfo.php | 9 ++- src/kernel/structures/_StackMapFrame.php | 36 ++++++----- .../_UninitializedThisVariableInfo.php | 17 ------ .../structures/_VerificationTypeInfo.php | 59 +++++++++++++------ .../DoubleVariableInfo.php} | 4 +- .../FloatVariableInfo.php} | 4 +- .../IntegerVariableInfo.php} | 4 +- .../LongVariableInfo.php} | 4 +- .../NullVariableInfo.php} | 4 +- .../ObjectVariableInfo.php} | 4 +- .../TopVariableInfo.php} | 4 +- .../UninitializedThisVariableInfo.php | 17 ++++++ .../UninitializedVariableInfo.php} | 4 +- .../variables/VariableInfoInterface.php | 7 +++ 29 files changed, 230 insertions(+), 124 deletions(-) rename src/kernel/{structures/_AppendFrame.php => frames/AppendFrame.php} (68%) rename src/kernel/{structures/_ChopFrame.php => frames/ChopFrame.php} (82%) create mode 100644 src/kernel/frames/FrameInterface.php rename src/kernel/{structures/_FullFrame.php => frames/FullFrame.php} (62%) rename src/kernel/{structures/_SameFrame.php => frames/SameFrame.php} (78%) rename src/kernel/{structures/_SameFrameExtended.php => frames/SameFrameExtended.php} (81%) rename src/kernel/{structures/_SameLocals1StackItemFrame.php => frames/SameLocals1StackItemFrame.php} (54%) rename src/kernel/{structures/_SameLocals1StackItemFrameExtended.php => frames/SameLocals1StackItemFrameExtended.php} (59%) delete mode 100644 src/kernel/structures/_UninitializedThisVariableInfo.php rename src/kernel/{structures/_IntegerVariableInfo.php => variables/DoubleVariableInfo.php} (76%) rename src/kernel/{structures/_DoubleVariableInfo.php => variables/FloatVariableInfo.php} (76%) rename src/kernel/{structures/_FloatVariableInfo.php => variables/IntegerVariableInfo.php} (76%) rename src/kernel/{structures/_LongVariableInfo.php => variables/LongVariableInfo.php} (76%) rename src/kernel/{structures/_TopVariableInfo.php => variables/NullVariableInfo.php} (76%) rename src/kernel/{structures/_ObjectVariableInfo.php => variables/ObjectVariableInfo.php} (80%) rename src/kernel/{structures/_NullVariableInfo.php => variables/TopVariableInfo.php} (76%) create mode 100644 src/kernel/variables/UninitializedThisVariableInfo.php rename src/kernel/{structures/_UninitializedVariableInfo.php => variables/UninitializedVariableInfo.php} (79%) create mode 100644 src/kernel/variables/VariableInfoInterface.php diff --git a/src/kernel/attributes/AttributeInfo.php b/src/kernel/attributes/AttributeInfo.php index be3465d9..84ae10b3 100644 --- a/src/kernel/attributes/AttributeInfo.php +++ b/src/kernel/attributes/AttributeInfo.php @@ -12,22 +12,27 @@ final class AttributeInfo implements AttributeInterface private $attributeNameIndex = null; private $attributeLength = null; private $attributeData = null; + public function execute(): void { $this->attributeNameIndex = $this->readUnsignedShort(); $this->attributeLength = $this->readUnsignedInt(); $cpInfo = $this->getConstantPool()->getEntries(); - $classAttributeName = 'Java' . $cpInfo[$this->attributeNameIndex]->getString() . 'Attribute'; - $this->attributeData = new $classAttributeName($class); + $classAttributeName = '\\PHPJava\\Kernel\\Attributes\\' . $cpInfo[$this->attributeNameIndex]->getString() . 'Attribute'; + $this->attributeData = new $classAttributeName($this->reader); + $this->attributeData->setConstantPool($this->getConstantPool()); + $this->attributeData->execute(); } public function getAttributeData() { return $this->attributeData; } + public function getAttributeNameIndex() { return $this->attributeNameIndex; } + public function getAttributeLength() { return $this->attributeLength; diff --git a/src/kernel/attributes/CodeAttribute.php b/src/kernel/attributes/CodeAttribute.php index 5fc9c6da..42207587 100644 --- a/src/kernel/attributes/CodeAttribute.php +++ b/src/kernel/attributes/CodeAttribute.php @@ -13,33 +13,44 @@ final class CodeAttribute implements AttributeInterface private $maxLocals = null; private $codeLength = null; private $rawCode = ''; - private $code = array(); + private $code = []; private $exceptionTableLength = null; - private $exceptionTables = array(); - private $attributeInfo = array(); + private $exceptionTables = []; + private $attributeInfo = []; + private $attributeCount = 0; + public function execute(): void { $this->maxStack = $this->readUnsignedShort(); $this->maxLocals = $this->readUnsignedShort(); $this->codeLength = $this->readUnsignedInt(); + // read opcode - $this->code = array(); + $this->code = []; for ($i = 0; $i < $this->codeLength; $i++) { $this->code[$i] = $this->readUnsignedByte(); $this->rawCode .= chr($this->code[$i]); } + // read exception table $this->exceptionTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->exceptionTableLength; $i++) { - $this->exceptionTables[$i] = new JavaStructureExceptionTable($this); - $this->exceptionTables[$i]->setStartPc($this->readUnsignedShort()); - $this->exceptionTables[$i]->setEndPc($this->readUnsignedShort()); - $this->exceptionTables[$i]->setHandlerPc($this->readUnsignedShort()); - $this->exceptionTables[$i]->setCatchType($this->readUnsignedShort()); + $exceptionTable = new \PHPJava\Kernel\Structures\_ExceptionTable($this->reader); + $exceptionTable->setConstantPool($this->getConstantPool()); + $exceptionTable->setStartPc($this->readUnsignedShort()) + ->setEndPc($this->readUnsignedShort()) + ->setHandlerPc($this->readUnsignedShort()) + ->setCatchType($this->readUnsignedShort()) + ->execute(); + $this->exceptionTables[] = $exceptionTable; } - $this->attributesCount = $this->readUnsignedShort(); - for ($i = 0; $i < $this->attributesCount; $i++) { - $this->attributeInfo[] = new \PHPJava\Kernel\Attributes\AttributeInfo($this); + + $this->attributeCount = $this->readUnsignedShort(); + for ($i = 0; $i < $this->attributeCount; $i++) { + $attributeInfo = new \PHPJava\Kernel\Attributes\AttributeInfo($this->reader); + $attributeInfo->setConstantPool($this->getConstantPool()); + $attributeInfo->execute(); + $this->attributeInfo[] = $attributeInfo; } } public function getExceptionTables() diff --git a/src/kernel/attributes/LineNumberTableAttribute.php b/src/kernel/attributes/LineNumberTableAttribute.php index f8e6d6f2..0e554cf6 100644 --- a/src/kernel/attributes/LineNumberTableAttribute.php +++ b/src/kernel/attributes/LineNumberTableAttribute.php @@ -15,9 +15,12 @@ public function execute(): void { $this->lineNumberTableLength = $this->readUnsignedShort(); for ($i = 0; $i < $this->lineNumberTableLength; $i++) { - $this->lineNumberTables[$i] = new JavaStructureLineNumberTable($class); - $this->lineNumberTables[$i]->setStartPc($this->readUnsignedShort()); - $this->lineNumberTables[$i]->setLineNumber($this->readUnsignedShort()); + $lineNumberTable = new \PHPJava\Kernel\Structures\_LineNumberTable($this->reader); + $lineNumberTable->setConstantPool($this->getConstantPool()); + $lineNumberTable->setStartPc($this->readUnsignedShort()) + ->setLineNumber($this->readUnsignedShort()) + ->execute(); + $this->lineNumberTables[] = $lineNumberTable; } } public function getLineNumberTables() diff --git a/src/kernel/attributes/StackMapTableAttribute.php b/src/kernel/attributes/StackMapTableAttribute.php index e3f85f9b..113d721b 100644 --- a/src/kernel/attributes/StackMapTableAttribute.php +++ b/src/kernel/attributes/StackMapTableAttribute.php @@ -15,7 +15,10 @@ public function execute(): void { $this->numberOfEntries = $this->readUnsignedShort(); for ($i = 0; $i < $this->numberOfEntries; $i++) { - $this->stackMapFrames[] = new JavaStructureStackMapFrame($class); + $stackMapFrame = new \PHPJava\Kernel\Structures\_StackMapFrame($this->reader); + $stackMapFrame->setConstantPool($this->getConstantPool()); + $stackMapFrame->execute(); + $this->stackMapFrames[] = $stackMapFrame; } } public function getStackMapFrames() diff --git a/src/kernel/core/BinaryReader.php b/src/kernel/core/BinaryReader.php index c414a698..a6d54458 100644 --- a/src/kernel/core/BinaryReader.php +++ b/src/kernel/core/BinaryReader.php @@ -5,70 +5,70 @@ trait BinaryReader { - private $binaryReader; + private $reader; public function __construct(JavaClassReader $reader) { - $this->binaryReader = $reader->getBinaryReader(); + $this->reader = $reader; } final public function read($bytes = 1) { - return $this->binaryReader->read($bytes); + return $this->reader->getBinaryReader()->read($bytes); } public function readByte() { - return $this->binaryReader->readByte(); + return $this->reader->getBinaryReader()->readByte(); } public function readUnsignedByte() { - return $this->binaryReader->readUnsignedByte(); + return $this->reader->getBinaryReader()->readUnsignedByte(); } public function readUnsignedInt() { - return $this->binaryReader->readUnsignedInt(); + return $this->reader->getBinaryReader()->readUnsignedInt(); } public function readUnsignedShort() { - return $this->binaryReader->readUnsignedShort(); + return $this->reader->getBinaryReader()->readUnsignedShort(); } public function readInt() { - return $this->binaryReader->readInt(); + return $this->reader->getBinaryReader()->readInt(); } public function readShort() { - return $this->binaryReader->readShort(); + return $this->reader->getBinaryReader()->readShort(); } public function readUnsignedLong() { - return $this->binaryReader->readUnsignedLong(); + return $this->reader->getBinaryReader()->readUnsignedLong(); } public function readLong() { - return $this->binaryReader->readLong(); + return $this->reader->getBinaryReader()->readLong(); } public function seek($bytes) { - $this->binaryReader->seek($bytes); + $this->reader->getBinaryReader()->seek($bytes); } public function setOffset($pointer) { - $this->binaryReader->setOffset($pointer); + $this->reader->getBinaryReader()->setOffset($pointer); } public function getOffset() { - return $this->binaryReader->getOffset(); + return $this->reader->getBinaryReader()->getOffset(); } } diff --git a/src/kernel/structures/_AppendFrame.php b/src/kernel/frames/AppendFrame.php similarity index 68% rename from src/kernel/structures/_AppendFrame.php rename to src/kernel/frames/AppendFrame.php index 1dcf9822..0648d45b 100644 --- a/src/kernel/structures/_AppendFrame.php +++ b/src/kernel/frames/AppendFrame.php @@ -1,10 +1,10 @@ frameType = $this->readUnsignedByte(); $this->offsetDelta = $this->readUnsignedShort(); for ($i = 0, $s = $this->frameType - 251; $i < $s; $i++) { - $this->locals[] = new _VerificationTypeInfo($this->getClass()); + $local = new \PHPJava\Kernel\Structures\_VerificationTypeInfo($this->reader); + $local->execute(); + $this->locals[] = $local; } } } diff --git a/src/kernel/structures/_ChopFrame.php b/src/kernel/frames/ChopFrame.php similarity index 82% rename from src/kernel/structures/_ChopFrame.php rename to src/kernel/frames/ChopFrame.php index 400f5932..84eab346 100644 --- a/src/kernel/structures/_ChopFrame.php +++ b/src/kernel/frames/ChopFrame.php @@ -1,10 +1,10 @@ frameType = $this->readUnsignedByte(); $this->offsetDelta = $this->readUnsignedShort(); $this->numberOfLocals = $this->readUnsignedShort(); for ($i = 0; $i < $this->numberOfLocals; $i++) { - $this->locals[] = new _VerificationTypeInfo($this->getClass()); + $local = new \PHPJava\Kernel\Structures\_VerificationTypeInfo($this->reader); + $local->execute(); + $this->locals = $local; } $this->numberOfStackItems = $this->readUnsignedShort(); for ($i = 0; $i < $this->numberOfStackItems; $i++) { - $this->stack[] = new _VerificationTypeInfo($this->getClass()); + $stack = new \PHPJava\Kernel\Structures\_VerificationTypeInfo($this->reader); + $stack->execute(); + $this->stack[] = $stack; } } } diff --git a/src/kernel/structures/_SameFrame.php b/src/kernel/frames/SameFrame.php similarity index 78% rename from src/kernel/structures/_SameFrame.php rename to src/kernel/frames/SameFrame.php index 636552a3..56d6f78a 100644 --- a/src/kernel/structures/_SameFrame.php +++ b/src/kernel/frames/SameFrame.php @@ -1,15 +1,16 @@ frameType = $this->readUnsignedByte(); diff --git a/src/kernel/structures/_SameFrameExtended.php b/src/kernel/frames/SameFrameExtended.php similarity index 81% rename from src/kernel/structures/_SameFrameExtended.php rename to src/kernel/frames/SameFrameExtended.php index 3ff99b2a..ff0c9738 100644 --- a/src/kernel/structures/_SameFrameExtended.php +++ b/src/kernel/frames/SameFrameExtended.php @@ -1,16 +1,17 @@ frameType = $this->readUnsignedByte(); diff --git a/src/kernel/structures/_SameLocals1StackItemFrame.php b/src/kernel/frames/SameLocals1StackItemFrame.php similarity index 54% rename from src/kernel/structures/_SameLocals1StackItemFrame.php rename to src/kernel/frames/SameLocals1StackItemFrame.php index 518f2f59..bfe3997d 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrame.php +++ b/src/kernel/frames/SameLocals1StackItemFrame.php @@ -1,19 +1,22 @@ frameType = $this->readUnsignedByte(); - $this->stack[] = new _VerificationTypeInfo($this->getClass()); + $stack = new \PHPJava\Kernel\Structures\_VerificationTypeInfo($this->reader); + $stack->execute(); + $this->stack[] = $stack; } } diff --git a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php b/src/kernel/frames/SameLocals1StackItemFrameExtended.php similarity index 59% rename from src/kernel/structures/_SameLocals1StackItemFrameExtended.php rename to src/kernel/frames/SameLocals1StackItemFrameExtended.php index 4119b8ab..dcddcc71 100644 --- a/src/kernel/structures/_SameLocals1StackItemFrameExtended.php +++ b/src/kernel/frames/SameLocals1StackItemFrameExtended.php @@ -1,21 +1,23 @@ frameType = $this->readUnsignedByte(); $this->offsetDelta = $this->readUnsignedShort(); - $this->locals[] = new _VerificationTypeInfo($this->getClass()); + $local = new \PHPJava\Kernel\Structures\_VerificationTypeInfo($this->reader); + $local->execute(); + $this->locals[] = $local; } } diff --git a/src/kernel/structures/_ExceptionTable.php b/src/kernel/structures/_ExceptionTable.php index 0a842f79..d2bf2211 100644 --- a/src/kernel/structures/_ExceptionTable.php +++ b/src/kernel/structures/_ExceptionTable.php @@ -13,34 +13,50 @@ class _ExceptionTable implements StructureInterface private $endPc = null; private $handlerPc = null; private $catchType = null; + + public function execute(): void + { + } + public function setStartPc($startPc) { $this->startPc = $startPc; + return $this; } + public function setEndPc($endPc) { $this->endPc = $endPc; + return $this; } + public function setHandlerPc($handlerPc) { $this->handlerPc = $handlerPc; + return $this; } + public function setCatchType($catchType) { $this->catchType = $catchType; + return $this; } + public function getStartPc() { return $this->startPc; } + public function getEndPc() { return $this->endPc; } + public function getHandlerPc() { return $this->handlerPc; } + public function getCatchType() { return $this->catchType; diff --git a/src/kernel/structures/_LineNumberTable.php b/src/kernel/structures/_LineNumberTable.php index 65bdc8b6..1560a54e 100644 --- a/src/kernel/structures/_LineNumberTable.php +++ b/src/kernel/structures/_LineNumberTable.php @@ -11,13 +11,20 @@ class _LineNumberTable implements StructureInterface private $startPc = null; private $lineNumber = null; + + public function execute(): void + { + } + public function setStartPc($startPc) { $this->startPc = $startPc; + return $this; } public function setLineNumber($lineNumber) { $this->lineNumber = $lineNumber; + return $this; } public function getStartPc() { diff --git a/src/kernel/structures/_MethodInfo.php b/src/kernel/structures/_MethodInfo.php index 472b06b8..668ab577 100644 --- a/src/kernel/structures/_MethodInfo.php +++ b/src/kernel/structures/_MethodInfo.php @@ -13,7 +13,8 @@ class _MethodInfo implements StructureInterface private $nameIndex = null; private $descriptorIndex = null; private $attributeCount = 0; - private $attributes = array(); + private $attributes = []; + public function execute(): void { $this->accessFlag = $this->readUnsignedShort(); @@ -21,7 +22,11 @@ public function execute(): void $this->descriptorIndex = $this->readUnsignedShort(); $this->attributeCount = $this->readUnsignedShort(); for ($i = 0; $i < $this->attributeCount; $i++) { - $this->attributes[$i] = new \PHPJava\Kernel\Attributes\AttributeInfo($this->getClass()); + $attribute = new \PHPJava\Kernel\Attributes\AttributeInfo($this->reader); + $attribute->setConstantPool($this->getConstantPool()); + $attribute->execute(); + + $this->attributes[] = $attribute; } } public function getAccessFlag() diff --git a/src/kernel/structures/_StackMapFrame.php b/src/kernel/structures/_StackMapFrame.php index 667f5343..504b6851 100644 --- a/src/kernel/structures/_StackMapFrame.php +++ b/src/kernel/structures/_StackMapFrame.php @@ -10,32 +10,38 @@ class _StackMapFrame implements StructureInterface use \PHPJava\Kernel\Core\ConstantPool; private $frameType = null; - private $sameFrame = null; - private $sameLocals1StackItemFrame = null; - private $sameLocals1StackItemFrameExtended = null; - private $chopFrame = null; - private $sameFrameExtended = null; - private $appendFrame = null; - private $fullFrame = null; + + /** + * @var StructureInterface|null + */ + private $frame = null; + public function execute(): void { $this->frameType = $this->readUnsignedByte(); // back by frametype - $this->getClass()->seek(-1); + $this->reader->getBinaryReader()->seek(-1); + if ($this->frameType >= 0 && $this->frameType <= 63) { - $this->sameFrame = new _SameFrame($this->getClass()); + $this->frame = new \PHPJava\Kernel\Frames\SameFrame($this->reader); } elseif ($this->frameType >= 64 && $this->frameType <= 127) { - $this->sameLocals1StackItemFrame = new _SameLocals1StackItemFrame($this->getClass()); + $this->frame = new \PHPJava\Kernel\Frames\SameLocals1StackItemFrame($this->reader); } elseif ($this->frameType == 247) { - $this->sameLocals1StackItemFrameExtended = new _SameLocals1StackItemFrameExtended($this->getClass()); + $this->frame = new \PHPJava\Kernel\Frames\SameLocals1StackItemFrameExtended($this->reader); } elseif ($this->frameType >= 248 && $this->frameType <= 250) { - $this->chopFrame = new _ChopFrame($this->getClass()); + $this->frame = new \PHPJava\Kernel\Frames\ChopFrame($this->reader); } elseif ($this->frameType == 251) { - $this->sameFrameExtended = new _SameFrameExtended($this->getClass()); + $this->frame = new \PHPJava\Kernel\Frames\SameFrameExtended($this->reader); } elseif ($this->frameType >= 252 && $this->frameType <= 254) { - $this->appendFrame = new _AppendFrame($this->getClass()); + $this->frame = new \PHPJava\Kernel\Frames\AppendFrame($this->reader); } elseif ($this->frameType == 255) { - $this->fullFrame = new _FullFrame($this->getClass()); + $this->frame = new \PHPJava\Kernel\Frames\FullFrame($this->reader); } + $this->frame->execute(); + } + + public function getFrame(): StructureInterface + { + return $this->frame; } } diff --git a/src/kernel/structures/_UninitializedThisVariableInfo.php b/src/kernel/structures/_UninitializedThisVariableInfo.php deleted file mode 100644 index 57ffa1f2..00000000 --- a/src/kernel/structures/_UninitializedThisVariableInfo.php +++ /dev/null @@ -1,17 +0,0 @@ -tag = $this->readUnsignedByte(); - } -} diff --git a/src/kernel/structures/_VerificationTypeInfo.php b/src/kernel/structures/_VerificationTypeInfo.php index c438d5e2..8b402631 100644 --- a/src/kernel/structures/_VerificationTypeInfo.php +++ b/src/kernel/structures/_VerificationTypeInfo.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Structures; use PHPJava\Exceptions\NotImplementedException; +use PHPJava\Kernel\Variables\VariableInfoInterface; use PHPJava\Utilities\BinaryTool; class _VerificationTypeInfo implements StructureInterface @@ -9,29 +10,49 @@ class _VerificationTypeInfo implements StructureInterface use \PHPJava\Kernel\Core\BinaryReader; use \PHPJava\Kernel\Core\ConstantPool; + private $tag = 0; + + /** + * @var VariableInfoInterface|null + */ + private $variableInfo = null; + public function execute(): void { $this->tag = $this->readUnsignedByte(); + // back by tag - $this->getClass()->seek(-1); - if ($this->tag == 0) { - $this->topVariableInfo = new _TopVariableInfo($this->getClass()); - } elseif ($this->tag == 1) { - $this->integerVariableInfo = new _IntegerVariableInfo($this->getClass()); - } elseif ($this->tag == 2) { - $this->floatVariableInfo = new _FloatVariableInfo($this->getClass()); - } elseif ($this->tag == 4) { - $this->longVariableInfo = new _LongVariableInfo($this->getClass()); - } elseif ($this->tag == 3) { - $this->doubleVariableInfo = new _DoubleVariableInfo($this->getClass()); - } elseif ($this->tag == 5) { - $this->nullVariableInfo = new _NullVariableInfo($this->getClass()); - } elseif ($this->tag == 6) { - $this->uninitializedThisVariableInfo = new _UninitializedThisVariableInfo($this->getClass()); - } elseif ($this->tag == 7) { - $this->objectVariableInfo = new _ObjectVariableInfo($this->getClass()); - } elseif ($this->tag == 8) { - $this->uninitializedVariableInfo = new _UninitializedVariableInfo($this->getClass()); + $this->reader->getBinaryReader()->seek(-1); + + switch ($this->tag) { + case 0: + $this->variableInfo = new \PHPJava\Kernel\Variables\TopVariableInfo($this->reader); + break; + case 1: + $this->variableInfo = new \PHPJava\Kernel\Variables\IntegerVariableInfo($this->reader); + break; + case 2: + $this->variableInfo = new \PHPJava\Kernel\Variables\FloatVariableInfo($this->reader); + break; + case 3: + $this->variableInfo = new \PHPJava\Kernel\Variables\LongVariableInfo($this->reader); + break; + case 4: + $this->variableInfo = new \PHPJava\Kernel\Variables\DoubleVariableInfo($this->reader); + break; + case 5: + $this->variableInfo = new \PHPJava\Kernel\Variables\NullVariableInfo($this->reader); + break; + case 6: + $this->variableInfo = new \PHPJava\Kernel\Variables\UninitializedThisVariableInfo($this->reader); + break; + case 7: + $this->variableInfo = new \PHPJava\Kernel\Variables\ObjectVariableInfo($this->reader); + break; + case 8: + $this->variableInfo = new \PHPJava\Kernel\Variables\UninitializedVariableInfo($this->reader); + break; } + $this->variableInfo->execute(); } } diff --git a/src/kernel/structures/_IntegerVariableInfo.php b/src/kernel/variables/DoubleVariableInfo.php similarity index 76% rename from src/kernel/structures/_IntegerVariableInfo.php rename to src/kernel/variables/DoubleVariableInfo.php index 4ffc399a..667578fb 100644 --- a/src/kernel/structures/_IntegerVariableInfo.php +++ b/src/kernel/variables/DoubleVariableInfo.php @@ -1,10 +1,10 @@ tag = $this->readUnsignedByte(); + } +} diff --git a/src/kernel/structures/_UninitializedVariableInfo.php b/src/kernel/variables/UninitializedVariableInfo.php similarity index 79% rename from src/kernel/structures/_UninitializedVariableInfo.php rename to src/kernel/variables/UninitializedVariableInfo.php index 24be7baa..a68c4d77 100644 --- a/src/kernel/structures/_UninitializedVariableInfo.php +++ b/src/kernel/variables/UninitializedVariableInfo.php @@ -1,10 +1,10 @@ Date: Sat, 23 Feb 2019 19:16:54 +0900 Subject: [PATCH 20/96] Change array --- src/kernel/frames/AppendFrame.php | 3 ++- src/kernel/frames/ChopFrame.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kernel/frames/AppendFrame.php b/src/kernel/frames/AppendFrame.php index 0648d45b..aae5a894 100644 --- a/src/kernel/frames/AppendFrame.php +++ b/src/kernel/frames/AppendFrame.php @@ -11,7 +11,8 @@ class AppendFrame implements FrameInterface private $frameType = null; private $offsetDelta = null; - private $locals = array(); + private $locals = []; + public function execute(): void { $this->frameType = $this->readUnsignedByte(); diff --git a/src/kernel/frames/ChopFrame.php b/src/kernel/frames/ChopFrame.php index 84eab346..a5bf51b2 100644 --- a/src/kernel/frames/ChopFrame.php +++ b/src/kernel/frames/ChopFrame.php @@ -11,6 +11,7 @@ class ChopFrame implements FrameInterface private $frameType = null; private $offsetDelta = null; + public function execute(): void { $this->frameType = $this->readUnsignedByte(); From f6c21a0e86fe0446fcd61e5d4c3055de82597047 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 19:20:01 +0900 Subject: [PATCH 21/96] Replace array syntax --- src/kernel/frames/ChopFrame.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/frames/ChopFrame.php b/src/kernel/frames/ChopFrame.php index a5bf51b2..84ee66a9 100644 --- a/src/kernel/frames/ChopFrame.php +++ b/src/kernel/frames/ChopFrame.php @@ -11,7 +11,7 @@ class ChopFrame implements FrameInterface private $frameType = null; private $offsetDelta = null; - + public function execute(): void { $this->frameType = $this->readUnsignedByte(); From c56c147bb17ed7b51aa3c95ac1075be134d875ba Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 19:23:55 +0900 Subject: [PATCH 22/96] WIP commit --- src/core/JavaClass.php | 11 ++++++++++- src/core/jvm/ActiveAttributes.php | 22 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/core/jvm/ActiveAttributes.php diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index 29b61ea3..2fe02e16 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -1,6 +1,7 @@ getBinaryReader()->readUnsignedShort(), $this->constantPool ); - var_dump($this->activeFields); + + // read attributes + $this->activeAttributes = new ActiveAttributes( + $reader, + $reader->getBinaryReader()->readUnsignedShort(), + $this->constantPool + ); + var_dump($this->activeAttributes); } } diff --git a/src/core/jvm/ActiveAttributes.php b/src/core/jvm/ActiveAttributes.php new file mode 100644 index 00000000..ee4d1b31 --- /dev/null +++ b/src/core/jvm/ActiveAttributes.php @@ -0,0 +1,22 @@ +reader = $reader; + for ($i = 0; $i < $entries; $i++) { + // not implemented, read only + $this->entries[$i] = new AttributeInfo($reader); + $this->entries[$i]->setConstantPool($constantPool); + $this->entries[$i]->execute(); + } + } +} From 153e81d6b9d195c6c0984c5725b1861052e3da05 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 20:22:24 +0900 Subject: [PATCH 23/96] WIP commit --- src/core/JavaClass.php | 42 ++- src/core/JavaClassInvoker.php | 50 +++ src/core/jvm/ActiveAttributes.php | 5 + src/core/jvm/ActiveFields.php | 5 + src/core/jvm/ActiveInterface.php | 7 +- src/core/jvm/ActiveMethods.php | 5 + src/core/jvm/invoker/DynamicMethodInvoker.php | 7 + src/core/jvm/invoker/Invokable.php | 18 ++ src/core/jvm/invoker/StaticMethodInvoker.php | 7 + src/utilities/Formatter.php | 80 +++++ tools/Test.class | Bin 3277 -> 3277 bytes tools/TestEmulates.class | Bin 0 -> 190 bytes tools/test.java | 292 ++++++++++++++++++ tools/test.php | 5 +- 14 files changed, 519 insertions(+), 4 deletions(-) create mode 100644 src/core/JavaClassInvoker.php create mode 100644 src/core/jvm/invoker/DynamicMethodInvoker.php create mode 100644 src/core/jvm/invoker/Invokable.php create mode 100644 src/core/jvm/invoker/StaticMethodInvoker.php create mode 100644 src/utilities/Formatter.php create mode 100644 tools/TestEmulates.class create mode 100644 tools/test.java diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index 2fe02e16..a185cbc6 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -11,21 +11,49 @@ class JavaClass { + + use \PHPJava\Kernel\Core\ConstantPool; + private $versions = [ 'minor' => null, 'major' => null, ]; + /** + * @var ConstantPool + */ private $constantPool; + + /** + * @var ActiveInterface + */ private $activeInterfaces; + + /** + * @var ActiveFields + */ private $activeFields; + + /** + * @var ActiveMethods + */ private $activeMethods; + + /** + * @var ActiveAttributes + */ private $activeAttributes; private $accessFlag = 0; private $thisClass = 0; private $superClass = 0; + /** + * JavaClass constructor. + * @param JavaClassReader $reader + * @throws ValidatorException + * @throws \PHPJava\Exceptions\ReadEntryException + */ public function __construct(JavaClassReader $reader) { // Validate Java file @@ -57,7 +85,8 @@ public function __construct(JavaClassReader $reader) // read interfaces $this->activeInterfaces = new ActiveInterface( $reader, - $reader->getBinaryReader()->readUnsignedShort() + $reader->getBinaryReader()->readUnsignedShort(), + $this->constantPool ); // read fields @@ -80,6 +109,15 @@ public function __construct(JavaClassReader $reader) $reader->getBinaryReader()->readUnsignedShort(), $this->constantPool ); - var_dump($this->activeAttributes); + } + + public function getFields(): array + { + return $this->activeFields->getEntries(); + } + + public function getMethods(): array + { + return $this->activeMethods->getEntries(); } } diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php new file mode 100644 index 00000000..07a4f977 --- /dev/null +++ b/src/core/JavaClassInvoker.php @@ -0,0 +1,50 @@ +javaClass = $javaClass; + $cpInfo = $javaClass->getConstantPool()->getEntries(); + + foreach ($javaClass->getMethods() as $methodInfo) { + /** + * @var _MethodInfo $methodInfo + */ + $cpMethodName = $cpInfo[$methodInfo->getNameIndex()]->getString(); + + if ($methodInfo->getAccessFlag() === 0) { + $this->hiddenMethods[] = $methodInfo; + } elseif (($methodInfo->getAccessFlag() & AccessFlag::_Public) !== 0) { + $this->dynamicMethods[] = $methodInfo; + } elseif (($methodInfo->getAccessFlag() & AccessFlag::_Static) !== 0) { + $this->staticMethods[] = $methodInfo; + } + } + } + + public function getDynamicMethods(): Invokable + { + return new JVM\Invoker\DynamicMethodInvoker($this, $this->dynamicMethods); + } + + public function getStaticMethods(): Invokable + { + + return new JVM\Invoker\StaticMethodInvoker($this, $this->dynamicMethods); + } +} diff --git a/src/core/jvm/ActiveAttributes.php b/src/core/jvm/ActiveAttributes.php index ee4d1b31..f6d21747 100644 --- a/src/core/jvm/ActiveAttributes.php +++ b/src/core/jvm/ActiveAttributes.php @@ -19,4 +19,9 @@ public function __construct(JavaClassReader $reader, int $entries, ConstantPool $this->entries[$i]->execute(); } } + + public function getEntries() + { + return $this->entries; + } } diff --git a/src/core/jvm/ActiveFields.php b/src/core/jvm/ActiveFields.php index a9363ef3..c9f736bb 100644 --- a/src/core/jvm/ActiveFields.php +++ b/src/core/jvm/ActiveFields.php @@ -18,4 +18,9 @@ public function __construct(JavaClassReader $reader, int $entries, ConstantPool $this->entries[$i]->execute(); } } + + public function getEntries() + { + return $this->entries; + } } diff --git a/src/core/jvm/ActiveInterface.php b/src/core/jvm/ActiveInterface.php index 2cb18766..99561b4e 100644 --- a/src/core/jvm/ActiveInterface.php +++ b/src/core/jvm/ActiveInterface.php @@ -8,7 +8,7 @@ class ActiveInterface private $entries = []; private $reader; - public function __construct(JavaClassReader $reader, int $entries) + public function __construct(JavaClassReader $reader, int $entries, ConstantPool $constantPool) { $this->reader = $reader; for ($i = 0; $i < $entries; $i++) { @@ -16,4 +16,9 @@ public function __construct(JavaClassReader $reader, int $entries) $this->entries[$i] = $reader->getBinaryReader()->readUnsignedShort(); } } + + public function getEntries() + { + return $this->entries; + } } diff --git a/src/core/jvm/ActiveMethods.php b/src/core/jvm/ActiveMethods.php index 0363ddea..6b8602e3 100644 --- a/src/core/jvm/ActiveMethods.php +++ b/src/core/jvm/ActiveMethods.php @@ -19,4 +19,9 @@ public function __construct(JavaClassReader $reader, int $entries, ConstantPool $this->entries[$i]->execute(); } } + + public function getEntries() + { + return $this->entries; + } } diff --git a/src/core/jvm/invoker/DynamicMethodInvoker.php b/src/core/jvm/invoker/DynamicMethodInvoker.php new file mode 100644 index 00000000..b765799e --- /dev/null +++ b/src/core/jvm/invoker/DynamicMethodInvoker.php @@ -0,0 +1,7 @@ +methods = $methods; + } + + public function __call($methodName, $arguments) + { + + } +} diff --git a/src/core/jvm/invoker/StaticMethodInvoker.php b/src/core/jvm/invoker/StaticMethodInvoker.php new file mode 100644 index 00000000..2c877103 --- /dev/null +++ b/src/core/jvm/invoker/StaticMethodInvoker.php @@ -0,0 +1,7 @@ + $getMappedSignatureType($signature[$i]), + 'deepArray' => $deepArray, + ]; + $deepArray = 0; + break; + case 'L': + // class name + $build = ''; + // read to ; + for ($i++; $i < $size && $signature[$i] !== ';'; $i++) { + $build .= $signature[$i]; + + } + $data[] = [ + 'type' => 'class', + 'deepArray' => $deepArray, + 'className' => $build, + ]; + $deepArray = 0; + + break; + case '[': + // array + $deepArray++; + for ($i++; $signature[$i] === '['; $i++) { + $deepArray++; + } + // loop + continue 2; + case '(': + $build = ''; + // read to ) + for ($i++; $i < $size && $signature[$i] !== ')'; $i++) { + $build .= $signature[$i]; + } + $data['arguments'] = ($build !== '') ? $getMappedSignatureType($build) : []; + $data['argumentsCount'] = sizeof($data['arguments']); + break; + } + $i++; + } + return $data; + } +} diff --git a/tools/Test.class b/tools/Test.class index 8fc30ace51fad3fbc4e2a524e9c2c54b4494d135..2b55d21a61a88eaf89e6748f43009c40511d4326 100644 GIT binary patch delta 428 zcmW-dT`1jg7{@=)kH0^TB|BP^bxJEoO34kD3$5kG1v6Z@n_N&!xthEk=52PG&3|bri7;*#~~WmMw}eSi-%-; z>iETHAIA74!#>lVW2p_fYDQ$-)I`9KXp-tbW! z`_=K2I(^o!0loO56U$evZwxZZ5aUV{0lqWMFhBXh93w2~YK1Y@2(il~2TTcsC6*cS zFe_eu$s^{)$D-u3EDfwmBkR&mNP5_nKDH#tj#z$6h&@?iUp7>?Igld`<(fYxibE5} zvGH+YQuFw03KfbtHFcbsPX3vo>Hz;E#`9c~E;OJ^;D-v>z7~7waofwNl LoJLy<80u~TBou3* delta 428 zcmW-dO-R#m7{@=)Z~Jf67PbbF6@xGw1j*>K*=daEQV^!w!IOyxCwUlwZ@tX2R%^Pl zU-lw+a>#-h#v%}eK_P@PGV|a_@a14A2#R!&Ao>+wc)lMVp67e`maEIvlLgBX?AUbC zI&W3s;)vd|{BlAcb@=6szF=mZZgu#bA%q65=^g8|Gh(=rrvH4!aFp0TmY7yfzqAz3 zI!h|qfsIZRc$33);h~%3^l*w^YUrbuTb$!I0qzjwF7+e{)6YfjahdyEWq=qDXyzf; zNzuk5ZjdIy6O)uNpM&OVh{t4&p7MfcykeL!o->Z-ZITfRyySyfPw|=(Zb^1}=66ZgvJ9Mg}&U%)HDJJ4Oa(4b3n{1{UZ1lvG9rexJ;| zRKL>Pq|~C2#H1Xc2v=}^X;E^jTPBFZS&~{@qL-CemdL}v!obSNz!L%#aLp~vNd(F; zG6;aA^m7vP()In5vQm>v7!(+ofVP4FBM<}i0BJTLOBP6jL|C=9GcaxhOS1z>Hn1Q_ LiUY`FV&DV-$c!So literal 0 HcmV?d00001 diff --git a/tools/test.java b/tools/test.java new file mode 100644 index 00000000..4e99fa0e --- /dev/null +++ b/tools/test.java @@ -0,0 +1,292 @@ +class TestEmulates { + +} + +class Test { + + long z = -22222222222222222L; + static int c = 100; + static String b = "Hello World"; + + /** + * test for "Integer" value + * + * @param value + * @return + */ + public int testInt (int value) { + + System.out.println(this.testPrivateInteger(value)); + return value; + } + + /** + * test for "Short" value + * + * @param value + * @return + */ + public short testShort (short value) { + return value; + } + + /** + * test for "Long" value + * + * @param value + * @return + */ + public long testLong (long value) { + return value; + } + + /** + * test for "Float" value + * + * @param value + * @return + */ + public float testLong (float value) { + return value; + } + + /** + * test for "Double" value + * + * @param value + * @return + */ + public double testLong (double value) { + return value; + } + + /** + * test for "Char" value + * + * @param value + * @return + */ + public char testChar (char value) { + return value; + } + + /** + * test for "Byte" value + * + * @param value + * @return + */ + public byte testByte (byte value) { + return value; + } + + /** + * test for "Boolean" value + * + * @param value + * @return + */ + public boolean testBoolean (boolean value) { + return value; + } + + /** + * test for "String" value + * + * @param value + * @return + */ + public String testString (String value) { + return value; + } + + /** + * main method + * + * @param args + */ + public static void main (String[] args) { + + String x = "String"; + + // new instance + Test _a = new Test(); + + // test call + // _a.javaTest(); + + + int t = 2; + //t *= 1; + //t = ~1; + t <<= 1; + System.out.println(t); + t >>= 1; + System.out.println(t); + t -= 1; + System.out.println(t); + t += 1; + System.out.println(t); + t = 1; + System.out.println(t); + t >>>= 1; + System.out.println(t); + t |= 1; + System.out.println(t); + t &= 1; + System.out.println(t); + t = 345321; + System.out.println((short) t); + + long t1 = 111; + t1 *= 1; + t1 = ~1; + t1 <<= 1; + t1 >>= 1; + t1 -= 1; + t1 += 1; + t1 = 1; + t1 >>>= 1; + t1 |= 1; + t1 &= 1; + + double t2 = 2; + t2 *= 1; + t2 = ~1; + t2 -= 1; + t2 += 1; + t2 = 1; + + /*boolean _b = false; + _b = true && true; + _b = true && false; + _b = true || true; + _b = true || false;*/ + + try { + + for (int i = 0; i < Test.c; i++) { + + StringBuilder b = new StringBuilder(); + + switch (i + 1) { + + case -1: + + b.append("a"); + + break; + case 1: + + b.append("b"); + + break; + case 2: + + b.append("c"); + + break; + + } + + if (!x.equals(i + "")) { + + + System.out.println("Test:" + Test.b + "/" + x + "*****" + i + "/" + b); + + } + + if (i == 10) { + + throw new NullPointerException(); + + } + + } + + } catch (NullPointerException e) { + + System.out.println("ぬるぷっぷー"); + + } + + String[] test = {"4", "5", "6"}; + for (String i : test) { + + System.out.println(i); + + } + + int[] test2 = {1, 2, 3}; + for (int i : test2) { + + System.out.println(i); + + } + + long[] test3 = {1L, 2L, 3L}; + for (long i : test3) { + + System.out.println(i); + + } + + double[] test4 = {3.4, 3.5, 3.6, 81263.12312321, -99}; + for (double i : test4) { + + System.out.println(i); + + } + + } + + public static String test (int n, String m, int l, int i, int v, int k) { + + int j = 1; + + for (; j <= 10; j++) { + + j++; + + } + + return "Java emulate by php " + n + "/" + m + "/" + l + "/" + i + "/" + v + "/" + k + "/" + j; + + } + + private int testPrivateInteger (int value) { + return value + 1 * 2 + 3; + } + + /*public void javaTest () { + + testClass _c = new testClass(); + _c.t(); + + } + + public class testClass { + + public void t () { + + System.out.println("testClass.t method." + Test.this.z); + + testClass2 _c = new testClass2(); + _c.t(); + + + } + + public class testClass2 { + + public void t () { + + System.out.println("testClass2.t method." + Test.this.z); + + } + + } + + }*/ + +} \ No newline at end of file diff --git a/tools/test.php b/tools/test.php index c34e919f..a9068744 100644 --- a/tools/test.php +++ b/tools/test.php @@ -1,8 +1,11 @@ getDynamicMethods()->main([1, 2, 3])); From 69a68c00637df9bda73b2ddc9bee201584d7dd9b Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 20:27:38 +0900 Subject: [PATCH 24/96] WIP commit --- src/core/JavaClassInvoker.php | 10 +++++----- src/core/jvm/invoker/DynamicMethodInvoker.php | 2 +- src/core/jvm/invoker/Invokable.php | 3 ++- src/core/jvm/invoker/InvokerInterface.php | 10 ++++++++++ src/core/jvm/invoker/StaticMethodInvoker.php | 2 +- 5 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 src/core/jvm/invoker/InvokerInterface.php diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 07a4f977..3b23f335 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -2,6 +2,7 @@ namespace PHPJava\Core; use PHPJava\Core\JVM\Invoker\Invokable; +use PHPJava\Core\JVM\Invoker\InvokerInterface; use PHPJava\Kernel\Maps\AccessFlag; use PHPJava\Kernel\Structures\_MethodInfo; @@ -37,14 +38,13 @@ public function __construct(JavaClass $javaClass) } } - public function getDynamicMethods(): Invokable + public function getDynamicMethods(): InvokerInterface { - return new JVM\Invoker\DynamicMethodInvoker($this, $this->dynamicMethods); + return new JVM\Invoker\DynamicMethodInvoker($this->javaClass, $this->dynamicMethods); } - public function getStaticMethods(): Invokable + public function getStaticMethods(): InvokerInterface { - - return new JVM\Invoker\StaticMethodInvoker($this, $this->dynamicMethods); + return new JVM\Invoker\StaticMethodInvoker($this->javaClass, $this->dynamicMethods); } } diff --git a/src/core/jvm/invoker/DynamicMethodInvoker.php b/src/core/jvm/invoker/DynamicMethodInvoker.php index b765799e..f5b4b0b7 100644 --- a/src/core/jvm/invoker/DynamicMethodInvoker.php +++ b/src/core/jvm/invoker/DynamicMethodInvoker.php @@ -1,7 +1,7 @@ methods = $methods; } - public function __call($methodName, $arguments) + public function __call($name, $arguments) { } diff --git a/src/core/jvm/invoker/InvokerInterface.php b/src/core/jvm/invoker/InvokerInterface.php new file mode 100644 index 00000000..42b2436b --- /dev/null +++ b/src/core/jvm/invoker/InvokerInterface.php @@ -0,0 +1,10 @@ + Date: Sat, 23 Feb 2019 21:14:47 +0900 Subject: [PATCH 25/96] WIP commit --- src/core/JavaClassInvoker.php | 8 +-- src/core/jvm/invoker/Invokable.php | 75 ++++++++++++++++++++ src/exceptions/IllegalJavaClassException.php | 6 ++ src/exceptions/UndefinedMethodException.php | 6 ++ src/exceptions/UndefinedOpCodeException.php | 6 ++ src/kernel/attributes/AttributeInfo.php | 1 + src/kernel/core/Accumulator.php | 20 +++++- src/kernel/core/ConstantPool.php | 1 + src/kernel/maps/Map.php | 2 +- 9 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 src/exceptions/IllegalJavaClassException.php create mode 100644 src/exceptions/UndefinedMethodException.php create mode 100644 src/exceptions/UndefinedOpCodeException.php diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 3b23f335..d31a5a0f 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -26,14 +26,14 @@ public function __construct(JavaClass $javaClass) /** * @var _MethodInfo $methodInfo */ - $cpMethodName = $cpInfo[$methodInfo->getNameIndex()]->getString(); + $methodName = $cpInfo[$methodInfo->getNameIndex()]->getString(); if ($methodInfo->getAccessFlag() === 0) { - $this->hiddenMethods[] = $methodInfo; + $this->hiddenMethods[$methodName] = $methodInfo; } elseif (($methodInfo->getAccessFlag() & AccessFlag::_Public) !== 0) { - $this->dynamicMethods[] = $methodInfo; + $this->dynamicMethods[$methodName] = $methodInfo; } elseif (($methodInfo->getAccessFlag() & AccessFlag::_Static) !== 0) { - $this->staticMethods[] = $methodInfo; + $this->staticMethods[$methodName] = $methodInfo; } } } diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 48cbca73..79f98405 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -2,18 +2,93 @@ namespace PHPJava\Core\JVM\Invoker; use PHPJava\Core\JavaClass; +use PHPJava\Core\JVM\Stream\BinaryReader; +use PHPJava\Exceptions\IllegalJavaClassException; +use PHPJava\Exceptions\UndefinedMethodException; +use PHPJava\Exceptions\UndefinedOpCodeException; +use PHPJava\Kernel\Attributes\AttributeInfo; +use PHPJava\Kernel\Attributes\AttributeInterface; +use PHPJava\Kernel\Attributes\CodeAttribute; +use PHPJava\Kernel\Core\Accumulator; +use PHPJava\Kernel\Core\ConstantPool; +use PHPJava\Kernel\Maps\OpCode; +use PHPJava\Kernel\OpCode\OpCodeInterface; +use PHPJava\Kernel\Structures\_MethodInfo; trait Invokable { + private $javaClass; private $methods = []; public function __construct(JavaClass $javaClass, array $methods) { + $this->javaClass = $javaClass; $this->methods = $methods; } public function __call($name, $arguments) { + /** + * @var _MethodInfo|null $method + */ + $method = $this->methods[$name] ?? null; + if ($method === null) { + throw new UndefinedMethodException('Undefined ' . $name . ' method.'); + } + $codeAttribute = $this->getCodeAttribute($method->getAttributes()); + + if ($codeAttribute === null) { + throw new IllegalJavaClassException('Java class does not having code attribution.'); + } + + $handle = fopen('php://memory', 'r+'); + fwrite($handle, $codeAttribute->getCode()); + rewind($handle); + + $reader = new BinaryReader($handle); + + $localStorage = [ + $this->javaClass, + $arguments[0] ?? null, + $arguments[1] ?? null, + $arguments[2] ?? null, + ]; + + $opcodeMap = new OpCode(); + while ($reader->getOffset() < $codeAttribute->getOpCodeLength()) { + $cursor = $reader->readUnsignedByte(); + $opcode = $opcodeMap->getName($cursor); + if ($opcode === null) { + throw new UndefinedOpCodeException('Undefined OpCode ' . sprintf('0x%X', $cursor) . '.'); + } + $pointer = $reader->getOffset() - 1; + + $fullName = '\\PHPJava\\Kernel\\OpCode\\' . $opcode; + + /** + * @var OpCodeInterface|Accumulator|ConstantPool $executor + */ + $executor = new $fullName(); + $executor->setConstantPool($this->javaClass->getConstantPool()); + $executor->setParameters($this->javaClass, $reader, $localStorage, $pointer); + $executor->execute(); + var_dump($executor);exit(); + } + + var_dump($codeAttribute);exit(); + } + + private function getCodeAttribute(array $attributes): ?CodeAttribute + { + foreach ($attributes as $attribute) { + /** + * @var AttributeInfo $attribute + */ + if ($attribute->getAttributeData() instanceof CodeAttribute) { + return $attribute->getAttributeData(); + } + } + return null; } } diff --git a/src/exceptions/IllegalJavaClassException.php b/src/exceptions/IllegalJavaClassException.php new file mode 100644 index 00000000..f79f82ec --- /dev/null +++ b/src/exceptions/IllegalJavaClassException.php @@ -0,0 +1,6 @@ +attributeData->setConstantPool($this->getConstantPool()); $this->attributeData->execute(); } + public function getAttributeData() { return $this->attributeData; diff --git a/src/kernel/core/Accumulator.php b/src/kernel/core/Accumulator.php index 63452ded..4fb9f72b 100644 --- a/src/kernel/core/Accumulator.php +++ b/src/kernel/core/Accumulator.php @@ -1,7 +1,25 @@ javaClass = $javaClass; + $this->reader = $reader; + $this->localStorage = $localStorage; + $this->pointer = $pointer; + return $this; + } } diff --git a/src/kernel/core/ConstantPool.php b/src/kernel/core/ConstantPool.php index 04938c30..6a94ec7f 100644 --- a/src/kernel/core/ConstantPool.php +++ b/src/kernel/core/ConstantPool.php @@ -8,6 +8,7 @@ trait ConstantPool public function setConstantPool(\PHPJava\Core\JVM\ConstantPool $constantPool) { $this->constantPool = $constantPool; + return $this; } public function getConstantPool(): \PHPJava\Core\JVM\ConstantPool diff --git a/src/kernel/maps/Map.php b/src/kernel/maps/Map.php index e68be6c7..d2745db6 100644 --- a/src/kernel/maps/Map.php +++ b/src/kernel/maps/Map.php @@ -3,7 +3,7 @@ class Map { - public function getName(string $value): ?string + public function getName(int $value): ?string { try { if (($key = array_search($value, (new \ReflectionClass($this))->getConstants(), true)) !== false) { From 7433899ae74f4f0d88b8773fb26e35dc620fb873 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 21:20:17 +0900 Subject: [PATCH 26/96] WIP commit --- src/core/JavaClass.php | 1 - src/core/jvm/invoker/Invokable.php | 6 ++++-- src/kernel/core/Accumulator.php | 2 ++ src/kernel/opcode/_aload.php | 2 +- src/kernel/opcode/_anewarray.php | 2 +- src/kernel/opcode/_astore.php | 2 +- src/kernel/opcode/_athrow.php | 2 +- src/kernel/opcode/_bipush.php | 2 +- src/kernel/opcode/_dload.php | 2 +- src/kernel/opcode/_dstore.php | 2 +- src/kernel/opcode/_getfield.php | 2 +- src/kernel/opcode/_getstatic.php | 2 +- src/kernel/opcode/_goto.php | 4 ++-- src/kernel/opcode/_if_acmpeq.php | 4 ++-- src/kernel/opcode/_if_acmpne.php | 4 ++-- src/kernel/opcode/_if_icmpge.php | 4 ++-- src/kernel/opcode/_if_icmpgt.php | 4 ++-- src/kernel/opcode/_if_icmplt.php | 4 ++-- src/kernel/opcode/_if_icmpne.php | 4 ++-- src/kernel/opcode/_ifeq.php | 4 ++-- src/kernel/opcode/_ifne.php | 4 ++-- src/kernel/opcode/_iinc.php | 4 ++-- src/kernel/opcode/_iload.php | 2 +- src/kernel/opcode/_invokespecial.php | 2 +- src/kernel/opcode/_invokestatic.php | 2 +- src/kernel/opcode/_invokevirtual.php | 2 +- src/kernel/opcode/_istore.php | 2 +- src/kernel/opcode/_ldc.php | 4 ++-- src/kernel/opcode/_ldc2_w.php | 2 +- src/kernel/opcode/_lload.php | 2 +- src/kernel/opcode/_lookupswitch.php | 14 +++++++------- src/kernel/opcode/_lstore.php | 2 +- src/kernel/opcode/_new.php | 2 +- src/kernel/opcode/_newarray.php | 2 +- src/kernel/opcode/_putfield.php | 2 +- src/kernel/opcode/_putstatic.php | 2 +- src/kernel/opcode/_sipush.php | 2 +- src/kernel/opcode/_tableswitch.php | 14 +++++++------- src/utilities/Formatter.php | 3 +-- tools/copy.php | 1 + 40 files changed, 66 insertions(+), 63 deletions(-) diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index a185cbc6..86ea127a 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -11,7 +11,6 @@ class JavaClass { - use \PHPJava\Kernel\Core\ConstantPool; private $versions = [ diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 79f98405..cf67bdf7 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -73,10 +73,12 @@ public function __call($name, $arguments) $executor->setConstantPool($this->javaClass->getConstantPool()); $executor->setParameters($this->javaClass, $reader, $localStorage, $pointer); $executor->execute(); - var_dump($executor);exit(); + var_dump($executor); + exit(); } - var_dump($codeAttribute);exit(); + var_dump($codeAttribute); + exit(); } private function getCodeAttribute(array $attributes): ?CodeAttribute diff --git a/src/kernel/core/Accumulator.php b/src/kernel/core/Accumulator.php index 4fb9f72b..107ab159 100644 --- a/src/kernel/core/Accumulator.php +++ b/src/kernel/core/Accumulator.php @@ -5,6 +5,8 @@ trait Accumulator { + use BinaryReader; + private $javaClass; private $reader; private $localStorage; diff --git a/src/kernel/opcode/_aload.php b/src/kernel/opcode/_aload.php index 5082f73f..0f0b44fe 100644 --- a/src/kernel/opcode/_aload.php +++ b/src/kernel/opcode/_aload.php @@ -14,7 +14,7 @@ final class _aload implements OpCodeInterface */ public function execute(): void { - $index = $this->getByteCodeStream()->readByte(); + $index = $this->readByte(); $this->pushStack($this->getLocalstorage($index)); } diff --git a/src/kernel/opcode/_anewarray.php b/src/kernel/opcode/_anewarray.php index 385735f6..b46726f5 100644 --- a/src/kernel/opcode/_anewarray.php +++ b/src/kernel/opcode/_anewarray.php @@ -17,7 +17,7 @@ final class _anewarray implements OpCodeInterface public function execute(): void { // 配列のサイズを調べる (PHPでは不要なので実行するだけ) - $this->getByteCodeStream()->readUnsignedShort(); + $this->readUnsignedShort(); // 空の配列を渡す (nullで埋める) $count = $this->getStack(); diff --git a/src/kernel/opcode/_astore.php b/src/kernel/opcode/_astore.php index 62f52dc6..4ab36548 100644 --- a/src/kernel/opcode/_astore.php +++ b/src/kernel/opcode/_astore.php @@ -11,7 +11,7 @@ final class _astore implements OpCodeInterface public function execute(): void { - $index = $this->getByteCodeStream()->readUnsignedByte(); + $index = $this->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); } } diff --git a/src/kernel/opcode/_athrow.php b/src/kernel/opcode/_athrow.php index a55f993b..54016084 100644 --- a/src/kernel/opcode/_athrow.php +++ b/src/kernel/opcode/_athrow.php @@ -21,7 +21,7 @@ public function execute(): void if ($cpInfo[$cpInfo[$exception->getCatchType()]->getClassIndex()]->getString() === $className && $exception->getStartPc() <= $this->getPointer() && $exception->getEndPc() >= $this->getPointer()) { - $this->getByteCodeStream()->setOffset($exception->getHandlerPc()); + $this->setOffset($exception->getHandlerPc()); return; } } diff --git a/src/kernel/opcode/_bipush.php b/src/kernel/opcode/_bipush.php index 0517322f..00cfe22e 100644 --- a/src/kernel/opcode/_bipush.php +++ b/src/kernel/opcode/_bipush.php @@ -11,6 +11,6 @@ final class _bipush implements OpCodeInterface public function execute(): void { - $this->pushStack($this->getByteCodeStream()->readByte()); + $this->pushStack($this->readByte()); } } diff --git a/src/kernel/opcode/_dload.php b/src/kernel/opcode/_dload.php index 4d38bebb..6238bb2a 100644 --- a/src/kernel/opcode/_dload.php +++ b/src/kernel/opcode/_dload.php @@ -14,7 +14,7 @@ final class _dload implements OpCodeInterface */ public function execute(): void { - $index = $this->getByteCodeStream()->readUnsignedByte(); + $index = $this->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); } } diff --git a/src/kernel/opcode/_dstore.php b/src/kernel/opcode/_dstore.php index 4b148983..84122010 100644 --- a/src/kernel/opcode/_dstore.php +++ b/src/kernel/opcode/_dstore.php @@ -14,7 +14,7 @@ final class _dstore implements OpCodeInterface */ public function execute(): void { - $index = $this->getByteCodeStream()->readUnsignedByte(); + $index = $this->readUnsignedByte(); $value = $this->getStack(); $this->setLocalstorage($index, BinaryTool::convertDoubleToIEEE754($value)); diff --git a/src/kernel/opcode/_getfield.php b/src/kernel/opcode/_getfield.php index 4879d876..9003af30 100644 --- a/src/kernel/opcode/_getfield.php +++ b/src/kernel/opcode/_getfield.php @@ -13,7 +13,7 @@ public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $cp = $cpInfo[$this->readUnsignedShort()]; $get = $this->getStack(); diff --git a/src/kernel/opcode/_getstatic.php b/src/kernel/opcode/_getstatic.php index dc89eda0..0b9f426e 100644 --- a/src/kernel/opcode/_getstatic.php +++ b/src/kernel/opcode/_getstatic.php @@ -13,7 +13,7 @@ public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $cp = $cpInfo[$this->readUnsignedShort()]; $class = $cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString(); diff --git a/src/kernel/opcode/_goto.php b/src/kernel/opcode/_goto.php index 0254c577..ba55e82e 100644 --- a/src/kernel/opcode/_goto.php +++ b/src/kernel/opcode/_goto.php @@ -11,8 +11,8 @@ final class _goto implements OpCodeInterface public function execute(): void { - $offset = $this->getByteCodeStream()->readShort(); + $offset = $this->readShort(); - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getPointer() + $offset); } } diff --git a/src/kernel/opcode/_if_acmpeq.php b/src/kernel/opcode/_if_acmpeq.php index 07c18975..c60de267 100644 --- a/src/kernel/opcode/_if_acmpeq.php +++ b/src/kernel/opcode/_if_acmpeq.php @@ -11,13 +11,13 @@ final class _if_acmpeq implements OpCodeInterface public function execute(): void { - $offset = $this->getByteCodeStream()->readShort(); + $offset = $this->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand === $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getPointer() + $offset); } } } diff --git a/src/kernel/opcode/_if_acmpne.php b/src/kernel/opcode/_if_acmpne.php index edc50976..13a501db 100644 --- a/src/kernel/opcode/_if_acmpne.php +++ b/src/kernel/opcode/_if_acmpne.php @@ -11,13 +11,13 @@ final class _if_acmpne implements OpCodeInterface public function execute(): void { - $offset = $this->getByteCodeStream()->readShort(); + $offset = $this->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand !== $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getPointer() + $offset); } } } diff --git a/src/kernel/opcode/_if_icmpge.php b/src/kernel/opcode/_if_icmpge.php index 60a3360d..5f239b3e 100644 --- a/src/kernel/opcode/_if_icmpge.php +++ b/src/kernel/opcode/_if_icmpge.php @@ -11,13 +11,13 @@ final class _if_icmpge implements OpCodeInterface public function execute(): void { - $offset = $this->getByteCodeStream()->readShort(); + $offset = $this->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand <= $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getPointer() + $offset); } } } diff --git a/src/kernel/opcode/_if_icmpgt.php b/src/kernel/opcode/_if_icmpgt.php index 9f6bdf97..12105f80 100644 --- a/src/kernel/opcode/_if_icmpgt.php +++ b/src/kernel/opcode/_if_icmpgt.php @@ -11,13 +11,13 @@ final class _if_icmpgt implements OpCodeInterface public function execute(): void { - $offset = $this->getByteCodeStream()->readShort(); + $offset = $this->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand < $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getPointer() + $offset); } } } diff --git a/src/kernel/opcode/_if_icmplt.php b/src/kernel/opcode/_if_icmplt.php index 250e23b9..2a8fb245 100644 --- a/src/kernel/opcode/_if_icmplt.php +++ b/src/kernel/opcode/_if_icmplt.php @@ -11,13 +11,13 @@ final class _if_icmplt implements OpCodeInterface public function execute(): void { - $offset = $this->getByteCodeStream()->readShort(); + $offset = $this->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($rightOperand < $leftOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getPointer() + $offset); } } } diff --git a/src/kernel/opcode/_if_icmpne.php b/src/kernel/opcode/_if_icmpne.php index f3f616dd..95d505f5 100644 --- a/src/kernel/opcode/_if_icmpne.php +++ b/src/kernel/opcode/_if_icmpne.php @@ -11,13 +11,13 @@ final class _if_icmpne implements OpCodeInterface public function execute(): void { - $offset = $this->getByteCodeStream()->readShort(); + $offset = $this->readShort(); $leftOperand = $this->getStack(); $rightOperand = $this->getStack(); if ($leftOperand != $rightOperand) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getPointer() + $offset); } } } diff --git a/src/kernel/opcode/_ifeq.php b/src/kernel/opcode/_ifeq.php index 04bf4d41..bbc70ef6 100644 --- a/src/kernel/opcode/_ifeq.php +++ b/src/kernel/opcode/_ifeq.php @@ -11,12 +11,12 @@ final class _ifeq implements OpCodeInterface public function execute(): void { - $offset = $this->getByteCodeStream()->readShort(); + $offset = $this->readShort(); $operand = $this->getStack(); if ($operand == 0) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getPointer() + $offset); } } } diff --git a/src/kernel/opcode/_ifne.php b/src/kernel/opcode/_ifne.php index 612ca01a..75604cb8 100644 --- a/src/kernel/opcode/_ifne.php +++ b/src/kernel/opcode/_ifne.php @@ -11,12 +11,12 @@ final class _ifne implements OpCodeInterface public function execute(): void { - $offset = $this->getByteCodeStream()->readShort(); + $offset = $this->readShort(); $operand = $this->getStack(); if ($operand != 0) { - $this->getByteCodeStream()->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getPointer() + $offset); } } } diff --git a/src/kernel/opcode/_iinc.php b/src/kernel/opcode/_iinc.php index 9b0a0c7d..ed84586c 100644 --- a/src/kernel/opcode/_iinc.php +++ b/src/kernel/opcode/_iinc.php @@ -11,8 +11,8 @@ final class _iinc implements OpCodeInterface public function execute(): void { - $index = $this->getByteCodeStream()->readUnsignedByte(); - $const = $this->getByteCodeStream()->readByte(); + $index = $this->readUnsignedByte(); + $const = $this->readByte(); $this->setLocalstorage($index, $this->getLocalstorage($index) + $const); } diff --git a/src/kernel/opcode/_iload.php b/src/kernel/opcode/_iload.php index 9bebb632..29e0a245 100644 --- a/src/kernel/opcode/_iload.php +++ b/src/kernel/opcode/_iload.php @@ -11,7 +11,7 @@ final class _iload implements OpCodeInterface public function execute(): void { - $index = $this->getByteCodeStream()->readUnsignedByte(); + $index = $this->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); } diff --git a/src/kernel/opcode/_invokespecial.php b/src/kernel/opcode/_invokespecial.php index 0f690d3c..6927c0b9 100644 --- a/src/kernel/opcode/_invokespecial.php +++ b/src/kernel/opcode/_invokespecial.php @@ -14,7 +14,7 @@ public function execute(): void $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $cp = $cpInfo[$this->readUnsignedShort()]; // $invokeClassName = '\\' . str_replace('/', '\\', $cpList[$class->getClassIndex()]->getString()); diff --git a/src/kernel/opcode/_invokestatic.php b/src/kernel/opcode/_invokestatic.php index 823c09f3..26785bf2 100644 --- a/src/kernel/opcode/_invokestatic.php +++ b/src/kernel/opcode/_invokestatic.php @@ -13,7 +13,7 @@ public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $cp = $cpInfo[$this->readUnsignedShort()]; $methodName = $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString(); diff --git a/src/kernel/opcode/_invokevirtual.php b/src/kernel/opcode/_invokevirtual.php index 392b2aab..76dac9ca 100644 --- a/src/kernel/opcode/_invokevirtual.php +++ b/src/kernel/opcode/_invokevirtual.php @@ -13,7 +13,7 @@ public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $cp = $cpInfo[$this->readUnsignedShort()]; $class = $cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString(); diff --git a/src/kernel/opcode/_istore.php b/src/kernel/opcode/_istore.php index b91cd192..63dbfc8e 100644 --- a/src/kernel/opcode/_istore.php +++ b/src/kernel/opcode/_istore.php @@ -11,7 +11,7 @@ final class _istore implements OpCodeInterface public function execute(): void { - $index = $this->getByteCodeStream()->readUnsignedByte(); + $index = $this->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); } } diff --git a/src/kernel/opcode/_ldc.php b/src/kernel/opcode/_ldc.php index 2abc1025..f50d00b8 100644 --- a/src/kernel/opcode/_ldc.php +++ b/src/kernel/opcode/_ldc.php @@ -13,7 +13,7 @@ public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $data = $cpInfo[$this->getByteCodeStream()->readUnsignedByte()]; + $data = $cpInfo[$this->readUnsignedByte()]; $value = null; @@ -30,7 +30,7 @@ public function execute(): void } elseif (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { $value = $data->getBytes(); } else { - $value = $cpInfo[$cpInfo[$this->getByteCodeStream()->readUnsignedByte()]->getStringIndex()]; + $value = $cpInfo[$cpInfo[$this->readUnsignedByte()]->getStringIndex()]; } $this->pushStack($value); diff --git a/src/kernel/opcode/_ldc2_w.php b/src/kernel/opcode/_ldc2_w.php index 79f013fd..928c53db 100644 --- a/src/kernel/opcode/_ldc2_w.php +++ b/src/kernel/opcode/_ldc2_w.php @@ -13,7 +13,7 @@ public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $data = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $data = $cpInfo[$this->readUnsignedShort()]; $this->pushStack($data->getBytes()); } diff --git a/src/kernel/opcode/_lload.php b/src/kernel/opcode/_lload.php index 4a10482b..c3fbcd9a 100644 --- a/src/kernel/opcode/_lload.php +++ b/src/kernel/opcode/_lload.php @@ -11,7 +11,7 @@ final class _lload implements OpCodeInterface public function execute(): void { - $index = $this->getByteCodeStream()->readUnsignedByte(); + $index = $this->readUnsignedByte(); $this->pushStack($this->getLocalstorage($index)); } diff --git a/src/kernel/opcode/_lookupswitch.php b/src/kernel/opcode/_lookupswitch.php index 35ddefad..4c7439b0 100644 --- a/src/kernel/opcode/_lookupswitch.php +++ b/src/kernel/opcode/_lookupswitch.php @@ -13,28 +13,28 @@ public function execute(): void { $key = $this->getStack(); - $paddingData = $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte(); + $paddingData = $this->readByte() + $this->readByte() + $this->readByte(); $offsets = array(); - $offsets['default'] = $this->getByteCodeStream()->readInt(); - $switchSize = $this->getByteCodeStream()->readUnsignedInt(); + $offsets['default'] = $this->readInt(); + $switchSize = $this->readUnsignedInt(); for ($i = 0; $i < $switchSize; $i++) { - $label = $this->getByteCodeStream()->readInt(); + $label = $this->readInt(); - $offsets[(string) $label] = $this->getByteCodeStream()->readInt(); + $offsets[(string) $label] = $this->readInt(); } if (isset($offsets[$key])) { // goto PC - $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); + $this->setOffset($this->getPointer() + $offsets[$key]); return; } // goto default - $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); + $this->setOffset($this->getPointer() + $offsets['default']); } } diff --git a/src/kernel/opcode/_lstore.php b/src/kernel/opcode/_lstore.php index 24330f9b..5e7cb989 100644 --- a/src/kernel/opcode/_lstore.php +++ b/src/kernel/opcode/_lstore.php @@ -11,7 +11,7 @@ final class _lstore implements OpCodeInterface public function execute(): void { - $index = $this->getByteCodeStream()->readUnsignedByte(); + $index = $this->readUnsignedByte(); $this->setLocalstorage($index, $this->getStack()); } } diff --git a/src/kernel/opcode/_new.php b/src/kernel/opcode/_new.php index 5e1394a4..8d6270ee 100644 --- a/src/kernel/opcode/_new.php +++ b/src/kernel/opcode/_new.php @@ -13,7 +13,7 @@ public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $class = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $class = $cpInfo[$this->readUnsignedShort()]; $className = $cpInfo[$class->getClassIndex()]->getString(); diff --git a/src/kernel/opcode/_newarray.php b/src/kernel/opcode/_newarray.php index ef6d7f3f..80fbd235 100644 --- a/src/kernel/opcode/_newarray.php +++ b/src/kernel/opcode/_newarray.php @@ -11,7 +11,7 @@ final class _newarray implements OpCodeInterface public function execute(): void { - $atype = $this->getByteCodeStream()->readUnsignedByte(); + $atype = $this->readUnsignedByte(); $count = $this->getStack(); // need reference diff --git a/src/kernel/opcode/_putfield.php b/src/kernel/opcode/_putfield.php index eb957bb6..7fa4a8dc 100644 --- a/src/kernel/opcode/_putfield.php +++ b/src/kernel/opcode/_putfield.php @@ -13,7 +13,7 @@ public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $cp = $cpInfo[$this->readUnsignedShort()]; $class = $cpInfo[$cp->getNameAndTypeIndex()]; $value = $this->getStack(); diff --git a/src/kernel/opcode/_putstatic.php b/src/kernel/opcode/_putstatic.php index 98937aa5..a4e35e00 100644 --- a/src/kernel/opcode/_putstatic.php +++ b/src/kernel/opcode/_putstatic.php @@ -13,7 +13,7 @@ public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->getByteCodeStream()->readUnsignedShort()]; + $cp = $cpInfo[$this->readUnsignedShort()]; $class = $cpInfo[$cp->getNameAndTypeIndex()]; $name = $cpInfo[$class->getNameIndex()]->getString(); diff --git a/src/kernel/opcode/_sipush.php b/src/kernel/opcode/_sipush.php index 70d3c9fc..981baa40 100644 --- a/src/kernel/opcode/_sipush.php +++ b/src/kernel/opcode/_sipush.php @@ -11,6 +11,6 @@ final class _sipush implements OpCodeInterface public function execute(): void { - $this->pushStack($this->getByteCodeStream()->readShort()); + $this->pushStack($this->readShort()); } } diff --git a/src/kernel/opcode/_tableswitch.php b/src/kernel/opcode/_tableswitch.php index b6e1c840..b8c783b6 100644 --- a/src/kernel/opcode/_tableswitch.php +++ b/src/kernel/opcode/_tableswitch.php @@ -13,27 +13,27 @@ public function execute(): void { $key = $this->getStack(); - $paddingData = $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte() + $this->getByteCodeStream()->readByte(); + $paddingData = $this->readByte() + $this->readByte() + $this->readByte(); $offsets = array(); - $offsets['default'] = $this->getByteCodeStream()->readInt(); + $offsets['default'] = $this->readInt(); - $lowByte = $this->getByteCodeStream()->readInt(); - $highByte = $this->getByteCodeStream()->readInt(); + $lowByte = $this->readInt(); + $highByte = $this->readInt(); for ($i = $lowByte; $i <= $highByte; $i++) { - $offsets[$i] = $this->getByteCodeStream()->readInt(); + $offsets[$i] = $this->readInt(); } if (isset($offsets[$key])) { // goto PC - $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets[$key]); + $this->setOffset($this->getPointer() + $offsets[$key]); return; } // goto default - $this->getByteCodeStream()->setOffset($this->getPointer() + $offsets['default']); + $this->setOffset($this->getPointer() + $offsets['default']); } } diff --git a/src/utilities/Formatter.php b/src/utilities/Formatter.php index 638d43c4..e3d7fa39 100644 --- a/src/utilities/Formatter.php +++ b/src/utilities/Formatter.php @@ -22,7 +22,7 @@ public static function parseSignature($signature, $i = 0) $data = []; $deepArray = 0; - for ($size = strlen($signature); $i < $size; ) { + for ($size = strlen($signature); $i < $size;) { switch ($signature[$i]) { case 'B': case 'C': @@ -45,7 +45,6 @@ public static function parseSignature($signature, $i = 0) // read to ; for ($i++; $i < $size && $signature[$i] !== ';'; $i++) { $build .= $signature[$i]; - } $data[] = [ 'type' => 'class', diff --git a/tools/copy.php b/tools/copy.php index ae7b44c3..8fbbd574 100644 --- a/tools/copy.php +++ b/tools/copy.php @@ -11,6 +11,7 @@ $a = str_replace('class _', 'final class _', $a); $a = str_replace('getJavaBinaryStream', 'getStream', $a); $a = str_replace('getCpInfo()', 'getConstantPool()->getEntries()', $a); + $a = str_replace('$this->getByteCodeStream()', '$this', $a); var_dump($class, $a); file_put_contents(__DIR__ . '/../src/kernel/opcode/' . $class, $a); } \ No newline at end of file From 05cb6b6c94f52639c849df4680e6701c2169a5ce Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 21:28:40 +0900 Subject: [PATCH 27/96] WIP commit --- src/kernel/core/Accumulator.php | 66 ++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/src/kernel/core/Accumulator.php b/src/kernel/core/Accumulator.php index 107ab159..aa9e80b8 100644 --- a/src/kernel/core/Accumulator.php +++ b/src/kernel/core/Accumulator.php @@ -5,9 +5,11 @@ trait Accumulator { - use BinaryReader; - private $javaClass; + + /** + * @var \PHPJava\Core\JVM\Stream\BinaryReader + */ private $reader; private $localStorage; private $pointer; @@ -24,4 +26,64 @@ public function setParameters( $this->pointer = $pointer; return $this; } + + final public function read($bytes = 1) + { + return $this->reader->read($bytes); + } + + public function readByte() + { + return $this->reader->readByte(); + } + + public function readUnsignedByte() + { + return $this->reader->readUnsignedByte(); + } + + public function readUnsignedInt() + { + return $this->reader->readUnsignedInt(); + } + + public function readUnsignedShort() + { + return $this->reader->readUnsignedShort(); + } + + public function readInt() + { + return $this->reader->readInt(); + } + + public function readShort() + { + return $this->reader->readShort(); + } + + public function readUnsignedLong() + { + return $this->reader->readUnsignedLong(); + } + + public function readLong() + { + return $this->reader->readLong(); + } + + public function seek($bytes) + { + $this->reader->seek($bytes); + } + + public function setOffset($pointer) + { + $this->reader->setOffset($pointer); + } + + public function getOffset() + { + return $this->reader->getOffset(); + } } From 72743f8fd7de64e1dd248c0c0a93d18e20a95f72 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sat, 23 Feb 2019 23:44:20 +0900 Subject: [PATCH 28/96] WIP commit --- src/bridge/java/io/PrintStream.php | 26 ++++++++ src/bridge/java/lang/_String.php | 44 +++++++++++++ src/core/JavaClass.php | 14 +++++ src/core/JavaClassInvoker.php | 38 +++++++++++- src/core/jvm/field/DynamicFieldGetter.php | 7 +++ src/core/jvm/field/FieldGettable.php | 21 +++++++ src/core/jvm/field/GetFieldInterface.php | 10 +++ src/core/jvm/field/StaticFieldGetter.php | 9 +++ src/core/jvm/invoker/Invokable.php | 24 +++++--- src/core/jvm/invoker/InvokerInterface.php | 4 +- src/emulator/java/io/.gitkeep | 0 src/emulator/java/lang/.gitkeep | 0 src/kernel/core/Accumulator.php | 75 ++++++++++++++++++++++- src/kernel/opcode/_aload.php | 2 +- src/kernel/opcode/_aload_0.php | 2 +- src/kernel/opcode/_aload_1.php | 2 +- src/kernel/opcode/_aload_2.php | 2 +- src/kernel/opcode/_aload_3.php | 2 +- src/kernel/opcode/_astore.php | 2 +- src/kernel/opcode/_astore_0.php | 2 +- src/kernel/opcode/_astore_1.php | 2 +- src/kernel/opcode/_astore_2.php | 2 +- src/kernel/opcode/_astore_3.php | 2 +- src/kernel/opcode/_dload.php | 2 +- src/kernel/opcode/_dstore.php | 2 +- src/kernel/opcode/_dstore_0.php | 2 +- src/kernel/opcode/_dstore_1.php | 2 +- src/kernel/opcode/_dstore_2.php | 2 +- src/kernel/opcode/_dstore_3.php | 2 +- src/kernel/opcode/_getstatic.php | 16 +++-- src/kernel/opcode/_iinc.php | 2 +- src/kernel/opcode/_iload.php | 2 +- src/kernel/opcode/_iload_0.php | 2 +- src/kernel/opcode/_iload_1.php | 2 +- src/kernel/opcode/_iload_2.php | 2 +- src/kernel/opcode/_iload_3.php | 2 +- src/kernel/opcode/_invokespecial.php | 5 +- src/kernel/opcode/_invokevirtual.php | 16 ++--- src/kernel/opcode/_istore.php | 2 +- src/kernel/opcode/_istore_0.php | 2 +- src/kernel/opcode/_istore_1.php | 2 +- src/kernel/opcode/_istore_2.php | 2 +- src/kernel/opcode/_istore_3.php | 2 +- src/kernel/opcode/_ldc.php | 18 +++--- src/kernel/opcode/_lload.php | 2 +- src/kernel/opcode/_lstore.php | 2 +- src/kernel/opcode/_new.php | 73 +--------------------- src/utilities/BinaryTool.php | 20 ++++++ src/utilities/Formatter.php | 2 +- 49 files changed, 334 insertions(+), 146 deletions(-) create mode 100644 src/bridge/java/io/PrintStream.php create mode 100644 src/bridge/java/lang/_String.php create mode 100644 src/core/jvm/field/DynamicFieldGetter.php create mode 100644 src/core/jvm/field/FieldGettable.php create mode 100644 src/core/jvm/field/GetFieldInterface.php create mode 100644 src/core/jvm/field/StaticFieldGetter.php delete mode 100644 src/emulator/java/io/.gitkeep delete mode 100644 src/emulator/java/lang/.gitkeep diff --git a/src/bridge/java/io/PrintStream.php b/src/bridge/java/io/PrintStream.php new file mode 100644 index 00000000..40e3aa4b --- /dev/null +++ b/src/bridge/java/io/PrintStream.php @@ -0,0 +1,26 @@ +getString() . "\n"; + } elseif ( + is_string($arg) || + is_int($arg) || + $arg instanceof Type || + $arg instanceof \PHPJava\Bridge\java\lang\_String + ) { + echo $arg . "\n"; + } elseif ($arg === null) { + echo "\n"; + } + } + +} diff --git a/src/bridge/java/lang/_String.php b/src/bridge/java/lang/_String.php new file mode 100644 index 00000000..3ab73ca5 --- /dev/null +++ b/src/bridge/java/lang/_String.php @@ -0,0 +1,44 @@ +object = $object; + } + + public function equals($object) + { + + if (!($this->object instanceof _Utf8)) { + return false; + } + + if ($object instanceof _String) { + return $this->toString() === $object->toString(); + } + + return $this->toString() === $object; + } + + public function toString() + { + + return $this->object->getString(); + + } + + public function __toString() + { + if (!($this->object instanceof _Utf8)) { + return (string) $this->object; + } + return $this->object->getString(); + } + +} diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index 86ea127a..631ab9b9 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -8,6 +8,7 @@ use PHPJava\Core\JVM\ConstantPool; use PHPJava\Core\JVM\Validations\MagicByte; use PHPJava\Exceptions\ValidatorException; +use PHPJava\Kernel\Structures\_Utf8; class JavaClass { @@ -47,6 +48,11 @@ class JavaClass private $thisClass = 0; private $superClass = 0; + /** + * @var _Utf8|null + */ + private $className = null; + /** * JavaClass constructor. * @param JavaClassReader $reader @@ -78,6 +84,9 @@ public function __construct(JavaClassReader $reader) // read this class $this->thisClass = $reader->getBinaryReader()->readUnsignedShort(); + $constantPoolEntries = $this->constantPool->getEntries(); + $this->className = $constantPoolEntries[$constantPoolEntries[$this->thisClass]->getClassIndex()]; + // read super class $this->superClass = $reader->getBinaryReader()->readUnsignedShort(); @@ -110,6 +119,11 @@ public function __construct(JavaClassReader $reader) ); } + public function getClassName(): string + { + return $this->className->getString(); + } + public function getFields(): array { return $this->activeFields->getEntries(); diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index d31a5a0f..c4e8a6dd 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -1,9 +1,11 @@ javaClass = $javaClass; @@ -36,15 +42,43 @@ public function __construct(JavaClass $javaClass) $this->staticMethods[$methodName] = $methodInfo; } } + + foreach ($javaClass->getFields() as $fieldInfo) { + /** + * @var _FieldInfo $fieldInfo + */ + $fieldName = $cpInfo[$fieldInfo->getNameIndex()]->getString(); + + if ($fieldInfo->getAccessFlag() === 0) { + $this->dynamicFields[$fieldName] = $fieldInfo; + } elseif (($fieldInfo->getAccessFlag() & AccessFlag::_Static) !== 0) { + $this->staticFields[$fieldName] = $fieldInfo; + } + } + } + + public function getJavaClass(): JavaClass + { + return $this->javaClass; } public function getDynamicMethods(): InvokerInterface { - return new JVM\Invoker\DynamicMethodInvoker($this->javaClass, $this->dynamicMethods); + return new JVM\Invoker\DynamicMethodInvoker($this, $this->dynamicMethods); } public function getStaticMethods(): InvokerInterface { - return new JVM\Invoker\StaticMethodInvoker($this->javaClass, $this->dynamicMethods); + return new JVM\Invoker\StaticMethodInvoker($this, $this->dynamicMethods); + } + + public function getDynamicFields(): GetFieldInterface + { + return new JVM\Field\DynamicFieldGetter($this, $this->dynamicFields); + } + + public function getStaticFields(): GetFieldInterface + { + return new JVM\Field\StaticFieldGetter($this, $this->staticFields); } } diff --git a/src/core/jvm/field/DynamicFieldGetter.php b/src/core/jvm/field/DynamicFieldGetter.php new file mode 100644 index 00000000..5b1f6414 --- /dev/null +++ b/src/core/jvm/field/DynamicFieldGetter.php @@ -0,0 +1,7 @@ +javaClassInvoker = $javaClassInvoker; + $this->fields = $fields; + } + + public function __get($name) + { + return $this->fields[$name]; + } +} diff --git a/src/core/jvm/field/GetFieldInterface.php b/src/core/jvm/field/GetFieldInterface.php new file mode 100644 index 00000000..de41b870 --- /dev/null +++ b/src/core/jvm/field/GetFieldInterface.php @@ -0,0 +1,10 @@ +javaClass = $javaClass; + $this->javaClassInvoker = $javaClassInvoker; $this->methods = $methods; } @@ -49,12 +50,13 @@ public function __call($name, $arguments) $reader = new BinaryReader($handle); $localStorage = [ - $this->javaClass, + $this->javaClassInvoker->getJavaClass(), $arguments[0] ?? null, $arguments[1] ?? null, $arguments[2] ?? null, ]; + $stacks = []; $opcodeMap = new OpCode(); while ($reader->getOffset() < $codeAttribute->getOpCodeLength()) { $cursor = $reader->readUnsignedByte(); @@ -66,15 +68,19 @@ public function __call($name, $arguments) $fullName = '\\PHPJava\\Kernel\\OpCode\\' . $opcode; + echo $opcode . "\n"; + /** * @var OpCodeInterface|Accumulator|ConstantPool $executor */ $executor = new $fullName(); - $executor->setConstantPool($this->javaClass->getConstantPool()); - $executor->setParameters($this->javaClass, $reader, $localStorage, $pointer); - $executor->execute(); - var_dump($executor); - exit(); + $executor->setConstantPool($this->javaClassInvoker->getJavaClass()->getConstantPool()); + $executor->setParameters($this->javaClassInvoker, $reader, $localStorage, $stacks, $pointer); + $returnValue = $executor->execute(); + + if ($returnValue !== null) { + return $returnValue; + } } var_dump($codeAttribute); diff --git a/src/core/jvm/invoker/InvokerInterface.php b/src/core/jvm/invoker/InvokerInterface.php index 42b2436b..a6115f29 100644 --- a/src/core/jvm/invoker/InvokerInterface.php +++ b/src/core/jvm/invoker/InvokerInterface.php @@ -1,10 +1,10 @@ javaClass = $javaClass; + $this->javaClassInvoker = $javaClassInvoker; + $this->javaClass = $javaClassInvoker->getJavaClass(); $this->reader = $reader; $this->localStorage = $localStorage; + $this->stacks = &$stacks; $this->pointer = $pointer; return $this; } @@ -86,4 +100,59 @@ public function getOffset() { return $this->reader->getOffset(); } + + + public function pushStack($value) + { + $this->stacks[] = $value; + } + + public function pushStackByReference(&$value) + { + $this->stacks[] = &$value; + } + + public function dupStack() + { + $stack = $this->stacks[sizeof($this->stacks) - 1] ?? null; + if ($stack === null) { + throw new \Exception('Stack overflow'); + } + $this->pushStack($stack); + } + + public function getStack() + { + return array_pop($this->stacks); + } + + public function popStack() + { + array_pop($this->stacks); + } + + public function getStacks() + { + return $this->stacks; + } + + public function setLocalStorage($index, $value) + { + $this->localStorage[(int) $index] = $value; + } + + + public function getLocalStorage($index) + { + if (!isset($this->localStorage[(int) $index])) { + $this->localStorage[(int) $index] = null; + } + return $this->localStorage[(int) $index]; + } + + public function getLocalStorages() + { + return $this->localStorage; + } + } diff --git a/src/kernel/opcode/_aload.php b/src/kernel/opcode/_aload.php index 0f0b44fe..8aa1392b 100644 --- a/src/kernel/opcode/_aload.php +++ b/src/kernel/opcode/_aload.php @@ -16,6 +16,6 @@ public function execute(): void { $index = $this->readByte(); - $this->pushStack($this->getLocalstorage($index)); + $this->pushStack($this->getLocalStorage($index)); } } diff --git a/src/kernel/opcode/_aload_0.php b/src/kernel/opcode/_aload_0.php index 125d820b..726af51e 100644 --- a/src/kernel/opcode/_aload_0.php +++ b/src/kernel/opcode/_aload_0.php @@ -14,6 +14,6 @@ final class _aload_0 implements OpCodeInterface */ public function execute(): void { - $this->pushStack($this->getLocalstorage(0)); + $this->pushStack($this->getLocalStorage(0)); } } diff --git a/src/kernel/opcode/_aload_1.php b/src/kernel/opcode/_aload_1.php index 26832e6a..03a46ffe 100644 --- a/src/kernel/opcode/_aload_1.php +++ b/src/kernel/opcode/_aload_1.php @@ -14,6 +14,6 @@ final class _aload_1 implements OpCodeInterface */ public function execute(): void { - $this->pushStack($this->getLocalstorage(1)); + $this->pushStack($this->getLocalStorage(1)); } } diff --git a/src/kernel/opcode/_aload_2.php b/src/kernel/opcode/_aload_2.php index a8598535..bede56e4 100644 --- a/src/kernel/opcode/_aload_2.php +++ b/src/kernel/opcode/_aload_2.php @@ -14,6 +14,6 @@ final class _aload_2 implements OpCodeInterface */ public function execute(): void { - $this->pushStack($this->getLocalstorage(2)); + $this->pushStack($this->getLocalStorage(2)); } } diff --git a/src/kernel/opcode/_aload_3.php b/src/kernel/opcode/_aload_3.php index 34ae4999..e307736d 100644 --- a/src/kernel/opcode/_aload_3.php +++ b/src/kernel/opcode/_aload_3.php @@ -14,6 +14,6 @@ final class _aload_3 implements OpCodeInterface */ public function execute(): void { - $this->pushStack($this->getLocalstorage(3)); + $this->pushStack($this->getLocalStorage(3)); } } diff --git a/src/kernel/opcode/_astore.php b/src/kernel/opcode/_astore.php index 4ab36548..ed5aa712 100644 --- a/src/kernel/opcode/_astore.php +++ b/src/kernel/opcode/_astore.php @@ -12,6 +12,6 @@ final class _astore implements OpCodeInterface public function execute(): void { $index = $this->readUnsignedByte(); - $this->setLocalstorage($index, $this->getStack()); + $this->setLocalStorage($index, $this->getStack()); } } diff --git a/src/kernel/opcode/_astore_0.php b/src/kernel/opcode/_astore_0.php index 06edd795..df03d254 100644 --- a/src/kernel/opcode/_astore_0.php +++ b/src/kernel/opcode/_astore_0.php @@ -11,6 +11,6 @@ final class _astore_0 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(0, $this->getStack()); + $this->setLocalStorage(0, $this->getStack()); } } diff --git a/src/kernel/opcode/_astore_1.php b/src/kernel/opcode/_astore_1.php index 71ef6780..16610357 100644 --- a/src/kernel/opcode/_astore_1.php +++ b/src/kernel/opcode/_astore_1.php @@ -11,6 +11,6 @@ final class _astore_1 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(1, $this->getStack()); + $this->setLocalStorage(1, $this->getStack()); } } diff --git a/src/kernel/opcode/_astore_2.php b/src/kernel/opcode/_astore_2.php index 9263f220..c6feebbb 100644 --- a/src/kernel/opcode/_astore_2.php +++ b/src/kernel/opcode/_astore_2.php @@ -11,6 +11,6 @@ final class _astore_2 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(2, $this->getStack()); + $this->setLocalStorage(2, $this->getStack()); } } diff --git a/src/kernel/opcode/_astore_3.php b/src/kernel/opcode/_astore_3.php index 0e0eed6e..8a00ea31 100644 --- a/src/kernel/opcode/_astore_3.php +++ b/src/kernel/opcode/_astore_3.php @@ -11,6 +11,6 @@ final class _astore_3 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(3, $this->getStack()); + $this->setLocalStorage(3, $this->getStack()); } } diff --git a/src/kernel/opcode/_dload.php b/src/kernel/opcode/_dload.php index 6238bb2a..478227b6 100644 --- a/src/kernel/opcode/_dload.php +++ b/src/kernel/opcode/_dload.php @@ -15,6 +15,6 @@ final class _dload implements OpCodeInterface public function execute(): void { $index = $this->readUnsignedByte(); - $this->pushStack($this->getLocalstorage($index)); + $this->pushStack($this->getLocalStorage($index)); } } diff --git a/src/kernel/opcode/_dstore.php b/src/kernel/opcode/_dstore.php index 84122010..baa777ef 100644 --- a/src/kernel/opcode/_dstore.php +++ b/src/kernel/opcode/_dstore.php @@ -17,6 +17,6 @@ public function execute(): void $index = $this->readUnsignedByte(); $value = $this->getStack(); - $this->setLocalstorage($index, BinaryTool::convertDoubleToIEEE754($value)); + $this->setLocalStorage($index, BinaryTool::convertDoubleToIEEE754($value)); } } diff --git a/src/kernel/opcode/_dstore_0.php b/src/kernel/opcode/_dstore_0.php index e51fcaed..91377b79 100644 --- a/src/kernel/opcode/_dstore_0.php +++ b/src/kernel/opcode/_dstore_0.php @@ -11,6 +11,6 @@ final class _dstore_0 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(0, $this->getStack()); + $this->setLocalStorage(0, $this->getStack()); } } diff --git a/src/kernel/opcode/_dstore_1.php b/src/kernel/opcode/_dstore_1.php index 12028ce4..a1182a59 100644 --- a/src/kernel/opcode/_dstore_1.php +++ b/src/kernel/opcode/_dstore_1.php @@ -11,6 +11,6 @@ final class _dstore_1 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(1, $this->getStack()); + $this->setLocalStorage(1, $this->getStack()); } } diff --git a/src/kernel/opcode/_dstore_2.php b/src/kernel/opcode/_dstore_2.php index 049963ad..14308fd3 100644 --- a/src/kernel/opcode/_dstore_2.php +++ b/src/kernel/opcode/_dstore_2.php @@ -11,6 +11,6 @@ final class _dstore_2 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(2, $this->getStack()); + $this->setLocalStorage(2, $this->getStack()); } } diff --git a/src/kernel/opcode/_dstore_3.php b/src/kernel/opcode/_dstore_3.php index 4ddf6702..c5869242 100644 --- a/src/kernel/opcode/_dstore_3.php +++ b/src/kernel/opcode/_dstore_3.php @@ -11,6 +11,6 @@ final class _dstore_3 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(3, $this->getStack()); + $this->setLocalStorage(3, $this->getStack()); } } diff --git a/src/kernel/opcode/_getstatic.php b/src/kernel/opcode/_getstatic.php index 0b9f426e..3768656e 100644 --- a/src/kernel/opcode/_getstatic.php +++ b/src/kernel/opcode/_getstatic.php @@ -3,6 +3,7 @@ use PHPJava\Exceptions\NotImplementedException; use PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\Formatter; final class _getstatic implements OpCodeInterface { @@ -17,27 +18,24 @@ public function execute(): void $class = $cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString(); - $signature = JavaClass::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); + $signature = Formatter::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); - foreach ($this->getInvoker()->getClass()->getFields() as $field) { + foreach ($this->javaClass->getFields() as $field) { if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { // push stack - $this->pushStack($this->getInvoker()->getClass()->getStatic($cpInfo[$field->getNameIndex()]->getString())); - + $fieldName = $cpInfo[$field->getNameIndex()]->getString(); + $this->pushStack($this->javaClassInvoker->getStaticFields()->$fieldName); return; } } if (isset($signature[0]['className'])) { - $this->getInvoker()->loadPlatform($class); - $this->getInvoker()->loadPlatform($signature[0]['className']); - $className = str_replace('/', '\\', $signature[0]['className']); - + $className = '\\PHPJava\\Bridge\\' . str_replace('/', '\\', $signature[0]['className']); $this->pushStack(new $className()); return; } - throw new Exception('Has not class or field'); + throw new \Exception('にゃ〜ん'); } } diff --git a/src/kernel/opcode/_iinc.php b/src/kernel/opcode/_iinc.php index ed84586c..40f368fa 100644 --- a/src/kernel/opcode/_iinc.php +++ b/src/kernel/opcode/_iinc.php @@ -14,6 +14,6 @@ public function execute(): void $index = $this->readUnsignedByte(); $const = $this->readByte(); - $this->setLocalstorage($index, $this->getLocalstorage($index) + $const); + $this->setLocalStorage($index, $this->getLocalStorage($index) + $const); } } diff --git a/src/kernel/opcode/_iload.php b/src/kernel/opcode/_iload.php index 29e0a245..373bd254 100644 --- a/src/kernel/opcode/_iload.php +++ b/src/kernel/opcode/_iload.php @@ -13,6 +13,6 @@ public function execute(): void { $index = $this->readUnsignedByte(); - $this->pushStack($this->getLocalstorage($index)); + $this->pushStack($this->getLocalStorage($index)); } } diff --git a/src/kernel/opcode/_iload_0.php b/src/kernel/opcode/_iload_0.php index 2b327879..ee52f913 100644 --- a/src/kernel/opcode/_iload_0.php +++ b/src/kernel/opcode/_iload_0.php @@ -11,6 +11,6 @@ final class _iload_0 implements OpCodeInterface public function execute(): void { - $this->pushStack($this->getLocalstorage(0)); + $this->pushStack($this->getLocalStorage(0)); } } diff --git a/src/kernel/opcode/_iload_1.php b/src/kernel/opcode/_iload_1.php index 36ec9693..0005fcac 100644 --- a/src/kernel/opcode/_iload_1.php +++ b/src/kernel/opcode/_iload_1.php @@ -11,6 +11,6 @@ final class _iload_1 implements OpCodeInterface public function execute(): void { - $this->pushStack($this->getLocalstorage(1)); + $this->pushStack($this->getLocalStorage(1)); } } diff --git a/src/kernel/opcode/_iload_2.php b/src/kernel/opcode/_iload_2.php index 7a1bb2ce..ad787d5e 100644 --- a/src/kernel/opcode/_iload_2.php +++ b/src/kernel/opcode/_iload_2.php @@ -11,6 +11,6 @@ final class _iload_2 implements OpCodeInterface public function execute(): void { - $this->pushStack($this->getLocalstorage(2)); + $this->pushStack($this->getLocalStorage(2)); } } diff --git a/src/kernel/opcode/_iload_3.php b/src/kernel/opcode/_iload_3.php index 7ba74118..f3409ac5 100644 --- a/src/kernel/opcode/_iload_3.php +++ b/src/kernel/opcode/_iload_3.php @@ -11,6 +11,6 @@ final class _iload_3 implements OpCodeInterface public function execute(): void { - $this->pushStack($this->getLocalstorage(3)); + $this->pushStack($this->getLocalStorage(3)); } } diff --git a/src/kernel/opcode/_invokespecial.php b/src/kernel/opcode/_invokespecial.php index 6927c0b9..f8a7fbe1 100644 --- a/src/kernel/opcode/_invokespecial.php +++ b/src/kernel/opcode/_invokespecial.php @@ -3,6 +3,7 @@ use PHPJava\Exceptions\NotImplementedException; use PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\Formatter; final class _invokespecial implements OpCodeInterface { @@ -22,11 +23,11 @@ public function execute(): void $nameAndTypeIndex = $cpInfo[$cp->getNameAndTypeIndex()]; // signature - $signature = JavaClass::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); + $signature = Formatter::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); $invokeClassName = $this->getStack(); - $arguments = array(); + $arguments = []; for ($i = 0; $i < $signature['argumentsCount']; $i++) { $arguments[] = $this->getStack(); diff --git a/src/kernel/opcode/_invokevirtual.php b/src/kernel/opcode/_invokevirtual.php index 76dac9ca..5e54f029 100644 --- a/src/kernel/opcode/_invokevirtual.php +++ b/src/kernel/opcode/_invokevirtual.php @@ -3,6 +3,7 @@ use PHPJava\Exceptions\NotImplementedException; use PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\Formatter; final class _invokevirtual implements OpCodeInterface { @@ -12,23 +13,21 @@ final class _invokevirtual implements OpCodeInterface public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->readUnsignedShort()]; - $class = $cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString(); - $nameAndTypeIndex = $cpInfo[$cp->getNameAndTypeIndex()]; // signature - $signature = JavaClass::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); - $arguments = array(); + $signature = Formatter::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); + $arguments = []; for ($i = 0; $i < $signature['argumentsCount']; $i++) { $arguments[] = $this->getStack(); } $invokerClass = $this->getStack(); - + var_dump($invokerClass); + if ($invokerClass instanceof \JavaClass) { $result = call_user_func_array(array( @@ -37,10 +36,7 @@ public function execute(): void ), $arguments); } else { - - // load platform - $this->getInvoker()->loadPlatform($class); - $invokerClassName = '\\' . str_replace('/', '\\', $class); + $invokerClassName = '\\PHPJava\\Bridge\\' . str_replace('/', '\\', $class); $result = call_user_func_array(array( diff --git a/src/kernel/opcode/_istore.php b/src/kernel/opcode/_istore.php index 63dbfc8e..95531aa9 100644 --- a/src/kernel/opcode/_istore.php +++ b/src/kernel/opcode/_istore.php @@ -12,6 +12,6 @@ final class _istore implements OpCodeInterface public function execute(): void { $index = $this->readUnsignedByte(); - $this->setLocalstorage($index, $this->getStack()); + $this->setLocalStorage($index, $this->getStack()); } } diff --git a/src/kernel/opcode/_istore_0.php b/src/kernel/opcode/_istore_0.php index 5678ec69..66e9e3be 100644 --- a/src/kernel/opcode/_istore_0.php +++ b/src/kernel/opcode/_istore_0.php @@ -11,6 +11,6 @@ final class _istore_0 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(0, $this->getStack()); + $this->setLocalStorage(0, $this->getStack()); } } diff --git a/src/kernel/opcode/_istore_1.php b/src/kernel/opcode/_istore_1.php index b62032b1..b10bbebb 100644 --- a/src/kernel/opcode/_istore_1.php +++ b/src/kernel/opcode/_istore_1.php @@ -11,6 +11,6 @@ final class _istore_1 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(1, $this->getStack()); + $this->setLocalStorage(1, $this->getStack()); } } diff --git a/src/kernel/opcode/_istore_2.php b/src/kernel/opcode/_istore_2.php index e159d703..9f59b505 100644 --- a/src/kernel/opcode/_istore_2.php +++ b/src/kernel/opcode/_istore_2.php @@ -11,6 +11,6 @@ final class _istore_2 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(2, $this->getStack()); + $this->setLocalStorage(2, $this->getStack()); } } diff --git a/src/kernel/opcode/_istore_3.php b/src/kernel/opcode/_istore_3.php index f4530000..1cca667a 100644 --- a/src/kernel/opcode/_istore_3.php +++ b/src/kernel/opcode/_istore_3.php @@ -11,6 +11,6 @@ final class _istore_3 implements OpCodeInterface public function execute(): void { - $this->setLocalstorage(3, $this->getStack()); + $this->setLocalStorage(3, $this->getStack()); } } diff --git a/src/kernel/opcode/_ldc.php b/src/kernel/opcode/_ldc.php index f50d00b8..234297aa 100644 --- a/src/kernel/opcode/_ldc.php +++ b/src/kernel/opcode/_ldc.php @@ -2,6 +2,10 @@ namespace PHPJava\Kernel\OpCode; use PHPJava\Exceptions\NotImplementedException; +use PHPJava\Kernel\Structures\_Float; +use PHPJava\Kernel\Structures\_Integer; +use PHPJava\Kernel\Structures\_String; +use PHPJava\Kernel\Structures\_Utf8; use PHPJava\Utilities\BinaryTool; final class _ldc implements OpCodeInterface @@ -17,20 +21,16 @@ public function execute(): void $value = null; - if ($data instanceof \JavaStructureString) { + if ($data instanceof _String) { $value = $cpInfo[$data->getStringIndex()]; - if ($value instanceof \JavaStructureUtf8) { - - // convert java string - $this->getInvoker()->loadPlatform('java.lang.String'); - - $value = new \java\lang\String($value); + if ($value instanceof _Utf8) { + $value = new \PHPJava\Bridge\java\lang\_String($value); } - } elseif (($data instanceof \JavaStructureInteger) || ($data instanceof \JavaStructureFloat)) { + } elseif (($data instanceof _Integer) || ($data instanceof _Float)) { $value = $data->getBytes(); } else { - $value = $cpInfo[$cpInfo[$this->readUnsignedByte()]->getStringIndex()]; + $value = $cpInfo[$data->getStringIndex()]; } $this->pushStack($value); diff --git a/src/kernel/opcode/_lload.php b/src/kernel/opcode/_lload.php index c3fbcd9a..ec6a2b36 100644 --- a/src/kernel/opcode/_lload.php +++ b/src/kernel/opcode/_lload.php @@ -13,6 +13,6 @@ public function execute(): void { $index = $this->readUnsignedByte(); - $this->pushStack($this->getLocalstorage($index)); + $this->pushStack($this->getLocalStorage($index)); } } diff --git a/src/kernel/opcode/_lstore.php b/src/kernel/opcode/_lstore.php index 5e7cb989..a1b49e48 100644 --- a/src/kernel/opcode/_lstore.php +++ b/src/kernel/opcode/_lstore.php @@ -12,6 +12,6 @@ final class _lstore implements OpCodeInterface public function execute(): void { $index = $this->readUnsignedByte(); - $this->setLocalstorage($index, $this->getStack()); + $this->setLocalStorage($index, $this->getStack()); } } diff --git a/src/kernel/opcode/_new.php b/src/kernel/opcode/_new.php index 8d6270ee..25f7da49 100644 --- a/src/kernel/opcode/_new.php +++ b/src/kernel/opcode/_new.php @@ -12,78 +12,11 @@ final class _new implements OpCodeInterface public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $class = $cpInfo[$this->readUnsignedShort()]; - $className = $cpInfo[$class->getClassIndex()]->getString(); - - if (isset($this->getInvoker()->getClass()->getManipulator()->$className) && - $this->getInvoker()->getClass()->getManipulator()->$className !== null) { - - // call constructor - call_user_func_array( - array( - $this->getInvoker()->getClass()->getManipulator()->$className->getMethodInvoker(), - '' - ), - array() - ); - - $this->pushStack($this->getInvoker()->getClass()->getManipulator()->$className); - } else { - if (($this->getInvoker()->getClass()->getManipulator() !== null && - $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && - $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) || - is_file(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class')) { - $javaClass = null; - - if ($this->getInvoker()->getClass()->getManipulator() !== null && - $this->getInvoker()->getClass()->getManipulator()->$className->getArchive() !== null && - $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->hasClass($className)) { - $javaClass = new JavaClass($className . '.class', $this->getInvoker()->getClass()->getManipulator()->$className->getArchive()->getClassBytecode($className)); - } else { - $javaClass = new JavaClass(dirname($this->getInvoker()->getClass()->getClassFile()) . '/' . $className . '.class'); - } - - $outerClasses = explode('$', $className); - - $javaClass->setInstance('this', $javaClass); - - for ($i = 1, $size = sizeof($outerClasses); $i < $size; $i++) { - $javaClass->setInstance('this$' . ($i - 1), $this->getInvoker()->getClass()->getManipulator()->{implode('$', array_slice($outerClasses, 0, $i))}); - } - - if (method_exists($javaClass->getMethodInvoker(), '')) { - - // call constructor - call_user_func_array( - array( - $javaClass->getMethodInvoker(), - '' - ), - array( - $this->getInvoker()->getClass() - ) - ); - } - - if ($this->getInvoker()->getClass()->getManipulator() !== null) { - - // regist to manipulator - $this->getInvoker()->getClass()->getManipulator()->registerClass($javaClass); - } - - // push to stack - $this->pushStack($javaClass); - } else { - - // load platform - $this->getInvoker()->loadPlatform($className); - - $invokeClassName = '\\' . str_replace('/', '\\', $className); - - $this->pushStack(new $invokeClassName()); - } + if ($className === $this->javaClass->getClassName()) { + // will be called + $this->pushStack($this->javaClass); } } } diff --git a/src/utilities/BinaryTool.php b/src/utilities/BinaryTool.php index 7813c642..75eecc34 100644 --- a/src/utilities/BinaryTool.php +++ b/src/utilities/BinaryTool.php @@ -53,6 +53,7 @@ final public static function addOneBit($bits) final public static function toSigned($value, $bytes) { + $value = (int) $value; $convert = base_convert((string) $value, 10, 2); $bitSize = strlen($convert); @@ -65,6 +66,7 @@ final public static function toSigned($value, $bytes) final public static function negate($value, $bytes) { + $value = (int) $value; $value = base_convert((string) $value, 10, 2); if (sprintf('%0' . $bytes . 's', $value) === str_repeat('0', $bytes)) { @@ -86,6 +88,8 @@ final public static function negate($value, $bytes) final public static function multiply($value1, $value2, $bytes) { + $value1 = (int) $value1; + $value2 = (int) $value2; if (function_exists('gmp_mul')) { $a = gmp_init($value1); $b = gmp_init($value2); @@ -100,6 +104,8 @@ final public static function multiply($value1, $value2, $bytes) final public static function add($value1, $value2, $bytes) { + $value1 = (int) $value1; + $value2 = (int) $value2; if (function_exists('gmp_add')) { $a = gmp_init($value1); $b = gmp_init($value2); @@ -114,6 +120,8 @@ final public static function add($value1, $value2, $bytes) final public static function sub($value1, $value2, $bytes) { + $value1 = (int) $value1; + $value2 = (int) $value2; if (function_exists('gmp_sub')) { $a = gmp_init($value1); $b = gmp_init($value2); @@ -128,6 +136,8 @@ final public static function sub($value1, $value2, $bytes) final public static function div($value1, $value2, $bytes) { + $value1 = (int) $value1; + $value2 = (int) $value2; if (function_exists('gmp_div')) { $a = gmp_init($value1); $b = gmp_init($value2); @@ -142,6 +152,8 @@ final public static function div($value1, $value2, $bytes) final public static function shiftLeft($value1, $value2, $bytes) { + $value1 = (int) $value1; + $value2 = (int) $value2; $bits = base_convert($value1, 10, 2); $bits = sprintf('%0' . ($bytes * 8) . 's', $bits . str_repeat('0', $value2)); @@ -151,6 +163,8 @@ final public static function shiftLeft($value1, $value2, $bytes) final public static function unsignedShiftRight($value1, $value2, $bytes) { + $value1 = (int) $value1; + $value2 = (int) $value2; $bits = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); $bits = sprintf('%0' . ($bytes * 8) . 's', substr($bits, 0, strlen($bits) - $value1)); @@ -169,6 +183,8 @@ final public static function shiftRight($value1, $value2, $bytes) final public static function orBits($value1, $value2, $bytes) { + $value1 = (int) $value1; + $value2 = (int) $value2; $value1 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value1, 10, 2)); $value2 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); @@ -186,6 +202,8 @@ final public static function orBits($value1, $value2, $bytes) final public static function xorBits($value1, $value2, $bytes) { + $value1 = (int) $value1; + $value2 = (int) $value2; $value1 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value1, 10, 2)); $value2 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); @@ -204,6 +222,8 @@ final public static function xorBits($value1, $value2, $bytes) final public static function andBits($value1, $value2, $bytes) { + $value1 = (int) $value1; + $value2 = (int) $value2; $value1 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value1, 10, 2)); $value2 = sprintf('%0' . ($bytes * 8) . 's', base_convert($value2, 10, 2)); diff --git a/src/utilities/Formatter.php b/src/utilities/Formatter.php index e3d7fa39..89968d66 100644 --- a/src/utilities/Formatter.php +++ b/src/utilities/Formatter.php @@ -69,7 +69,7 @@ public static function parseSignature($signature, $i = 0) $build .= $signature[$i]; } $data['arguments'] = ($build !== '') ? $getMappedSignatureType($build) : []; - $data['argumentsCount'] = sizeof($data['arguments']); + $data['argumentsCount'] = ($data['argumentsCount'] ?? 0) + 1; break; } $i++; From e7f9ff5c9f1cd5627d18d68379f783a4cd7528be Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 00:22:20 +0900 Subject: [PATCH 29/96] WIP commit --- src/bridge/java/lang/StringBuilder.php | 30 ++++++++++++++++++++++++++ src/bridge/java/lang/_String.php | 2 +- src/core/jvm/ActiveFields.php | 1 + src/kernel/core/Accumulator.php | 5 +++++ src/kernel/opcode/_invokevirtual.php | 25 ++++++++++----------- src/kernel/opcode/_new.php | 4 ++++ src/kernel/structures/_FieldInfo.php | 9 ++++++-- 7 files changed, 59 insertions(+), 17 deletions(-) create mode 100644 src/bridge/java/lang/StringBuilder.php diff --git a/src/bridge/java/lang/StringBuilder.php b/src/bridge/java/lang/StringBuilder.php new file mode 100644 index 00000000..0c54039e --- /dev/null +++ b/src/bridge/java/lang/StringBuilder.php @@ -0,0 +1,30 @@ +sequence .= $arg->toString(); + } else { + $this->sequence .= $arg; + } + return $this; + + } + + public function toString($arg = null) + { + return $this->sequence; + } + + public function __toString() + { + return $this->sequence; + + } + +} \ No newline at end of file diff --git a/src/bridge/java/lang/_String.php b/src/bridge/java/lang/_String.php index 3ab73ca5..582b63d0 100644 --- a/src/bridge/java/lang/_String.php +++ b/src/bridge/java/lang/_String.php @@ -7,7 +7,7 @@ class _String { private $object = null; - public function __construct($object) + public function __construct($object = null) { $this->object = $object; } diff --git a/src/core/jvm/ActiveFields.php b/src/core/jvm/ActiveFields.php index c9f736bb..c83dd665 100644 --- a/src/core/jvm/ActiveFields.php +++ b/src/core/jvm/ActiveFields.php @@ -15,6 +15,7 @@ public function __construct(JavaClassReader $reader, int $entries, ConstantPool for ($i = 0; $i < $entries; $i++) { // not implemented, read only $this->entries[$i] = new _FieldInfo($reader); + $this->entries[$i]->setConstantPool($constantPool); $this->entries[$i]->execute(); } } diff --git a/src/kernel/core/Accumulator.php b/src/kernel/core/Accumulator.php index 3b657711..17d03356 100644 --- a/src/kernel/core/Accumulator.php +++ b/src/kernel/core/Accumulator.php @@ -155,4 +155,9 @@ public function getLocalStorages() return $this->localStorage; } + public function getPointer() + { + return $this->pointer; + } + } diff --git a/src/kernel/opcode/_invokevirtual.php b/src/kernel/opcode/_invokevirtual.php index 5e54f029..f88493bb 100644 --- a/src/kernel/opcode/_invokevirtual.php +++ b/src/kernel/opcode/_invokevirtual.php @@ -26,25 +26,22 @@ public function execute(): void } $invokerClass = $this->getStack(); - var_dump($invokerClass); - if ($invokerClass instanceof \JavaClass) { - $result = call_user_func_array(array( + $javaObjectName = str_replace('/', '\\', $class); - $invokerClass->getMethodInvoker(), - $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() + if ($javaObjectName === 'java\\lang\\String') { + // For PHP + $javaObjectName = 'java\\lang\\_String'; + } - ), $arguments); - } else { - $invokerClassName = '\\PHPJava\\Bridge\\' . str_replace('/', '\\', $class); + $invokerClassName = '\\PHPJava\\Bridge\\' . $javaObjectName; + var_dump($invokerClassName); - $result = call_user_func_array(array( - - $invokerClass, - $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() + $result = call_user_func_array([ + NEW $invokerClassName, + $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() - ), $arguments); - } + ], $arguments); if ($signature[0]['type'] !== 'void') { $this->pushStack($result); diff --git a/src/kernel/opcode/_new.php b/src/kernel/opcode/_new.php index 25f7da49..45d9bfdd 100644 --- a/src/kernel/opcode/_new.php +++ b/src/kernel/opcode/_new.php @@ -17,6 +17,10 @@ public function execute(): void if ($className === $this->javaClass->getClassName()) { // will be called $this->pushStack($this->javaClass); + return; } + + $invokeClassName = '\\PHPJava\\Bridge\\' . str_replace('/', '\\', $className); + $this->pushStack(new $invokeClassName()); } } diff --git a/src/kernel/structures/_FieldInfo.php b/src/kernel/structures/_FieldInfo.php index 74362dad..0293e57e 100644 --- a/src/kernel/structures/_FieldInfo.php +++ b/src/kernel/structures/_FieldInfo.php @@ -13,7 +13,8 @@ class _FieldInfo implements StructureInterface private $nameIndex = null; private $descriptorIndex = null; private $attributeCount = 0; - private $attributes = array(); + private $attributes = []; + public function execute(): void { $this->accessFlag = $this->readUnsignedShort(); @@ -21,21 +22,25 @@ public function execute(): void $this->descriptorIndex = $this->readUnsignedShort(); $this->attributeCount = $this->readUnsignedShort(); for ($i = 0; $i < $this->attributeCount; $i++) { - $this->attributes[$i] = new \PHPJava\Kernel\Attributes\AttributeInfo($this->getClass()); + $this->attributes[$i] = new \PHPJava\Kernel\Attributes\AttributeInfo($this->reader); } } + public function getAccessFlag() { return $this->accessFlag; } + public function getNameIndex() { return $this->nameIndex; } + public function getDescriptorIndex() { return $this->descriptorIndex; } + public function getAttributes() { return $this->attributes; From 1660b96101651efaa2a56aa16230b31b5fdcce9f Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 00:57:37 +0900 Subject: [PATCH 30/96] WIP commit --- src/bridge/java/lang/StringBuilder.php | 3 +++ src/core/JavaClassInvoker.php | 15 +++++++++------ src/core/jvm/field/DynamicField.php | 19 +++++++++++++++++++ src/core/jvm/field/DynamicFieldGetter.php | 7 ------- src/core/jvm/field/FieldGettable.php | 9 --------- ...tFieldInterface.php => FieldInterface.php} | 2 +- src/core/jvm/field/FieldSettable.php | 12 ++++++++++++ src/core/jvm/field/StaticField.php | 18 ++++++++++++++++++ src/core/jvm/field/StaticFieldGetter.php | 9 --------- src/core/jvm/invoker/Invokable.php | 3 +-- src/exceptions/FormatterException.php | 6 ++++++ src/kernel/attributes/CodeAttribute.php | 2 +- src/kernel/opcode/_invokevirtual.php | 3 +-- src/kernel/opcode/_putstatic.php | 9 +++------ src/kernel/opcode/_return.php | 1 - src/utilities/Formatter.php | 6 ++++-- tools/test.php | 2 +- 17 files changed, 79 insertions(+), 47 deletions(-) create mode 100644 src/core/jvm/field/DynamicField.php delete mode 100644 src/core/jvm/field/DynamicFieldGetter.php rename src/core/jvm/field/{GetFieldInterface.php => FieldInterface.php} (87%) create mode 100644 src/core/jvm/field/FieldSettable.php create mode 100644 src/core/jvm/field/StaticField.php delete mode 100644 src/core/jvm/field/StaticFieldGetter.php create mode 100644 src/exceptions/FormatterException.php diff --git a/src/bridge/java/lang/StringBuilder.php b/src/bridge/java/lang/StringBuilder.php index 0c54039e..6a0e9b96 100644 --- a/src/bridge/java/lang/StringBuilder.php +++ b/src/bridge/java/lang/StringBuilder.php @@ -10,6 +10,9 @@ public function append($arg) if ($arg instanceof _String) { $this->sequence .= $arg->toString(); } else { + if (is_array($arg)) { + $arg = implode($arg); + } $this->sequence .= $arg; } return $this; diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index c4e8a6dd..4c5b772f 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -1,7 +1,7 @@ staticFields[$fieldName] = $fieldInfo; } } + + // call + $this->getStaticMethods()->{''}(); } public function getJavaClass(): JavaClass @@ -69,16 +72,16 @@ public function getDynamicMethods(): InvokerInterface public function getStaticMethods(): InvokerInterface { - return new JVM\Invoker\StaticMethodInvoker($this, $this->dynamicMethods); + return new JVM\Invoker\StaticMethodInvoker($this, $this->staticMethods); } - public function getDynamicFields(): GetFieldInterface + public function getDynamicFields(): FieldInterface { - return new JVM\Field\DynamicFieldGetter($this, $this->dynamicFields); + return new JVM\Field\DynamicField($this, $this->dynamicFields); } - public function getStaticFields(): GetFieldInterface + public function getStaticFields(): JVM\Field\StaticField { - return new JVM\Field\StaticFieldGetter($this, $this->staticFields); + return new JVM\Field\StaticField(); } } diff --git a/src/core/jvm/field/DynamicField.php b/src/core/jvm/field/DynamicField.php new file mode 100644 index 00000000..38d266f9 --- /dev/null +++ b/src/core/jvm/field/DynamicField.php @@ -0,0 +1,19 @@ +javaClassInvoker = $javaClassInvoker; + $this->fields = $fields; + } +} diff --git a/src/core/jvm/field/DynamicFieldGetter.php b/src/core/jvm/field/DynamicFieldGetter.php deleted file mode 100644 index 5b1f6414..00000000 --- a/src/core/jvm/field/DynamicFieldGetter.php +++ /dev/null @@ -1,7 +0,0 @@ -javaClassInvoker = $javaClassInvoker; - $this->fields = $fields; - } - public function __get($name) { return $this->fields[$name]; diff --git a/src/core/jvm/field/GetFieldInterface.php b/src/core/jvm/field/FieldInterface.php similarity index 87% rename from src/core/jvm/field/GetFieldInterface.php rename to src/core/jvm/field/FieldInterface.php index de41b870..e906d98e 100644 --- a/src/core/jvm/field/GetFieldInterface.php +++ b/src/core/jvm/field/FieldInterface.php @@ -3,7 +3,7 @@ use PHPJava\Core\JavaClassInvoker; -interface GetFieldInterface +interface FieldInterface { public function __construct(JavaClassInvoker $javaClassInvoker, array $fields); public function __get($name); diff --git a/src/core/jvm/field/FieldSettable.php b/src/core/jvm/field/FieldSettable.php new file mode 100644 index 00000000..c47efee6 --- /dev/null +++ b/src/core/jvm/field/FieldSettable.php @@ -0,0 +1,12 @@ +fields[$name] = $value; + } +} diff --git a/src/core/jvm/field/StaticField.php b/src/core/jvm/field/StaticField.php new file mode 100644 index 00000000..a91340eb --- /dev/null +++ b/src/core/jvm/field/StaticField.php @@ -0,0 +1,18 @@ +codeLength; + return (int) $this->codeLength; } } diff --git a/src/kernel/opcode/_invokevirtual.php b/src/kernel/opcode/_invokevirtual.php index f88493bb..cff665b3 100644 --- a/src/kernel/opcode/_invokevirtual.php +++ b/src/kernel/opcode/_invokevirtual.php @@ -35,10 +35,9 @@ public function execute(): void } $invokerClassName = '\\PHPJava\\Bridge\\' . $javaObjectName; - var_dump($invokerClassName); $result = call_user_func_array([ - NEW $invokerClassName, + new $invokerClassName, $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() ], $arguments); diff --git a/src/kernel/opcode/_putstatic.php b/src/kernel/opcode/_putstatic.php index a4e35e00..a4e4d1cf 100644 --- a/src/kernel/opcode/_putstatic.php +++ b/src/kernel/opcode/_putstatic.php @@ -16,11 +16,8 @@ public function execute(): void $cp = $cpInfo[$this->readUnsignedShort()]; $class = $cpInfo[$cp->getNameAndTypeIndex()]; - $name = $cpInfo[$class->getNameIndex()]->getString(); - - $value = $this->getStack(); - - // set field - $this->getInvoker()->getClass()->setStatic($name, $value); + $fieldName = $cpInfo[$class->getNameIndex()]->getString(); + + ($this->javaClassInvoker->getStaticFields())->$fieldName = $this->getStack(); } } diff --git a/src/kernel/opcode/_return.php b/src/kernel/opcode/_return.php index a063c0da..dce5bd32 100644 --- a/src/kernel/opcode/_return.php +++ b/src/kernel/opcode/_return.php @@ -11,6 +11,5 @@ final class _return implements OpCodeInterface public function execute(): void { - return null; } } diff --git a/src/utilities/Formatter.php b/src/utilities/Formatter.php index 89968d66..322e0778 100644 --- a/src/utilities/Formatter.php +++ b/src/utilities/Formatter.php @@ -1,6 +1,8 @@ getDynamicMethods()->main([1, 2, 3])); +var_dump($invoker->getDynamicMethods()->main([999, 222, 3333])); From f222e99f8075c4ff331961604f13a3c84d56f032 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 02:16:49 +0900 Subject: [PATCH 31/96] WIP commit --- .../lang/ArrayIndexOutOfBoundsException.php | 9 +++++++ src/core/JavaClassInvoker.php | 4 +-- src/core/jvm/invoker/Invokable.php | 9 ++----- src/kernel/opcode/_aaload.php | 4 +-- src/kernel/opcode/_aload.php | 1 - src/kernel/opcode/_iadd.php | 2 +- src/kernel/opcode/_invokespecial.php | 19 +++++++++----- src/kernel/opcode/_tableswitch.php | 1 + tools/Test.class | Bin 3277 -> 3112 bytes tools/test.java | 24 ++++++++---------- tools/test.php | 2 +- 11 files changed, 41 insertions(+), 34 deletions(-) create mode 100644 src/bridge/java/lang/ArrayIndexOutOfBoundsException.php diff --git a/src/bridge/java/lang/ArrayIndexOutOfBoundsException.php b/src/bridge/java/lang/ArrayIndexOutOfBoundsException.php new file mode 100644 index 00000000..53fc0e16 --- /dev/null +++ b/src/bridge/java/lang/ArrayIndexOutOfBoundsException.php @@ -0,0 +1,9 @@ +getNameIndex()]->getString(); - if ($methodInfo->getAccessFlag() === 0) { - $this->hiddenMethods[$methodName] = $methodInfo; - } elseif (($methodInfo->getAccessFlag() & AccessFlag::_Public) !== 0) { + if ($methodInfo->getAccessFlag() === 0 || ($methodInfo->getAccessFlag() & AccessFlag::_Public) !== 0) { $this->dynamicMethods[$methodName] = $methodInfo; } elseif (($methodInfo->getAccessFlag() & AccessFlag::_Static) !== 0) { $this->staticMethods[$methodName] = $methodInfo; diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index d6434d0d..57c4937e 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -49,12 +49,7 @@ public function __call($name, $arguments) $reader = new BinaryReader($handle); - $localStorage = [ - $this->javaClassInvoker->getJavaClass(), - $arguments[0] ?? null, - $arguments[1] ?? null, - $arguments[2] ?? null, - ]; + $localStorage = array_slice($arguments, 0, 4); $stacks = []; $opcodeMap = new OpCode(); @@ -68,7 +63,7 @@ public function __call($name, $arguments) $fullName = '\\PHPJava\\Kernel\\OpCode\\' . $opcode; - echo $opcode . "\n"; + echo 'Mnemonic: ' . $opcode . "\n"; /** * @var OpCodeInterface|Accumulator|ConstantPool $executor diff --git a/src/kernel/opcode/_aaload.php b/src/kernel/opcode/_aaload.php index 49ae7a5d..d6f912ee 100644 --- a/src/kernel/opcode/_aaload.php +++ b/src/kernel/opcode/_aaload.php @@ -16,9 +16,9 @@ public function execute(): void { $index = $this->getStack(); $arrayref = $this->getStack(); - + if (!isset($arrayref[$index])) { - throw new JavaArrayIndexOutOfBoundsException($this->getMethodName() . ': ' . $index . ' of array index'); + throw new \PHPJava\Bridge\java\lang\ArrayIndexOutOfBoundsException('Array Index ' . $index . ' out of bounds.'); } $this->pushStack($arrayref[$index]); diff --git a/src/kernel/opcode/_aload.php b/src/kernel/opcode/_aload.php index 8aa1392b..d8174d11 100644 --- a/src/kernel/opcode/_aload.php +++ b/src/kernel/opcode/_aload.php @@ -15,7 +15,6 @@ final class _aload implements OpCodeInterface public function execute(): void { $index = $this->readByte(); - $this->pushStack($this->getLocalStorage($index)); } } diff --git a/src/kernel/opcode/_iadd.php b/src/kernel/opcode/_iadd.php index a95db7bc..f629f042 100644 --- a/src/kernel/opcode/_iadd.php +++ b/src/kernel/opcode/_iadd.php @@ -13,7 +13,7 @@ public function execute(): void { $leftValue = $this->getStack(); $rightValue = $this->getStack(); - + $this->pushStack(BinaryTool::add($leftValue, $rightValue, 4)); } } diff --git a/src/kernel/opcode/_invokespecial.php b/src/kernel/opcode/_invokespecial.php index f8a7fbe1..40a35c70 100644 --- a/src/kernel/opcode/_invokespecial.php +++ b/src/kernel/opcode/_invokespecial.php @@ -13,24 +13,31 @@ final class _invokespecial implements OpCodeInterface public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - - - $cp = $cpInfo[$this->readUnsignedShort()]; - // $invokeClassName = '\\' . str_replace('/', '\\', $cpList[$class->getClassIndex()]->getString()); + $cp = $cpInfo[$this->readUnsignedShort()]; - $nameAndTypeIndex = $cpInfo[$cp->getNameAndTypeIndex()]; // signature $signature = Formatter::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); - $invokeClassName = $this->getStack(); + $invokerClassName = $this->getStack(); $arguments = []; for ($i = 0; $i < $signature['argumentsCount']; $i++) { $arguments[] = $this->getStack(); } + + $methodName = $cpInfo[$nameAndTypeIndex->getNameIndex()]->getString(); + +// $result = call_user_func_array( +// [$this->javaClassInvoker->getDynamicMethods(), $methodName], +// $arguments +// ); +// +// if ($signature[0]['type'] !== 'void') { +// $this->pushStack($result); +// } } } diff --git a/src/kernel/opcode/_tableswitch.php b/src/kernel/opcode/_tableswitch.php index b8c783b6..c6b8e171 100644 --- a/src/kernel/opcode/_tableswitch.php +++ b/src/kernel/opcode/_tableswitch.php @@ -33,6 +33,7 @@ public function execute(): void return; } + // goto default $this->setOffset($this->getPointer() + $offsets['default']); } diff --git a/tools/Test.class b/tools/Test.class index 2b55d21a61a88eaf89e6748f43009c40511d4326..e30f0a48d66f14180a875b44adfc3a8ca1e7b581 100644 GIT binary patch delta 1579 zcmai!Yiv|S6vzK_AA4tSZwqdBYqz^?w^n6q6AfM6#TEstR0SU`t!=4Vs(=+##8Thr zDk@l?#rwr*LIQlis1>&xmjs_*Oz@c)jWIQT5DdYX=m%p^Xk7nu_fb=0nCzW%=FD%- zo|!Xqz6ifooBH(cLmvRR5HHzCVA#xOD#dhfbj%Mw*7`AmTWo5#+E|D65*sYsrpCj& zQY~p^8&%xx7BcS~$h{5=w55?hsh+`_#!&QVM6 zvv9w}0}>BPJY+H^)wGhLtABe~Vw=Px79JH4*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g{HYImG>Z6u$k4AB8_MhKvfApF7$PkPm8A z32G$8mFI~ueI@jT0xoZ699bzr^dvnMX$E-Mldr&zFB{}KM zjiWJZ6nQl5olRYdP_CxVUM5TdR~&P!wfTNNL)!=aC<-XbYd-4ZY$&mK2<{3BU-1^k zk#D}kLoDB%;G5g{hiXLjVQx6$@L^s!qWG{N9C7+k7LKSsl!q(yfL>t)jAJ3U9P;=* ze)oRb&G38XmZy=wth6{P`#iM8k0W$%$5}tyNp(UJ`No2j#j9O=W5YOu1DL=;O20#l zW0dLmfTd%MW#9-=getDynamicMethods()->main([999, 222, 3333])); +$invoker->getDynamicMethods()->main([999, 222, 3333]); From 42fe161b41f2900415713b30980c728bc89865f8 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 15:03:01 +0900 Subject: [PATCH 32/96] WIP commit --- src/bridge/java/lang/_String.php | 3 +- src/core/JavaClassInvoker.php | 4 +- src/core/jvm/invoker/Invokable.php | 43 ++- src/core/jvm/parameters/Invoker.php | 7 + src/core/jvm/stream/BinaryReader.php | 6 +- src/exceptions/RuntimeException.php | 6 + src/kernel/core/Accumulator.php | 5 +- src/kernel/opcode/_getstatic.php | 18 +- src/kernel/opcode/_invokespecial.php | 1 + src/kernel/opcode/_invokevirtual.php | 2 - src/kernel/opcode/_tableswitch.php | 11 +- tools/Test.class | Bin 3112 -> 1046 bytes tools/copy.php | 17 - tools/copy_attr.php | 33 -- tools/copy_strt.php | 33 -- tools/test.java | 490 +++++++++++++++------------ 16 files changed, 335 insertions(+), 344 deletions(-) create mode 100644 src/core/jvm/parameters/Invoker.php create mode 100644 src/exceptions/RuntimeException.php delete mode 100644 tools/copy.php delete mode 100644 tools/copy_attr.php delete mode 100644 tools/copy_strt.php diff --git a/src/bridge/java/lang/_String.php b/src/bridge/java/lang/_String.php index 582b63d0..12884cd4 100644 --- a/src/bridge/java/lang/_String.php +++ b/src/bridge/java/lang/_String.php @@ -28,8 +28,7 @@ public function equals($object) public function toString() { - - return $this->object->getString(); + return $this->__toString(); } diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 69cd63e8..a3e7e144 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -55,7 +55,9 @@ public function __construct(JavaClass $javaClass) } // call - $this->getStaticMethods()->{''}(); + if (isset($this->staticMethods[''])) { + $this->getStaticMethods()->{''}(); + } } public function getJavaClass(): JavaClass diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 57c4937e..fd5c4a84 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -5,6 +5,7 @@ use PHPJava\Core\JavaClassInvoker; use PHPJava\Core\JVM\Stream\BinaryReader; use PHPJava\Exceptions\IllegalJavaClassException; +use PHPJava\Exceptions\RuntimeException; use PHPJava\Exceptions\UndefinedMethodException; use PHPJava\Exceptions\UndefinedOpCodeException; use PHPJava\Kernel\Attributes\AttributeInfo; @@ -29,6 +30,17 @@ public function __construct(JavaClassInvoker $javaClassInvoker, array $methods) public function __call($name, $arguments) { + $getCodeAttribute = function ($attributes) { + foreach ($attributes as $attribute) { + /** + * @var AttributeInfo $attribute + */ + if ($attribute->getAttributeData() instanceof CodeAttribute) { + return $attribute->getAttributeData(); + } + } + return null; + }; /** * @var _MethodInfo|null $method */ @@ -37,7 +49,7 @@ public function __call($name, $arguments) throw new UndefinedMethodException('Undefined ' . $name . ' method.'); } - $codeAttribute = $this->getCodeAttribute($method->getAttributes()); + $codeAttribute = $getCodeAttribute($method->getAttributes()); if ($codeAttribute === null) { throw new IllegalJavaClassException('Java class does not having code attribution.'); @@ -47,13 +59,25 @@ public function __call($name, $arguments) fwrite($handle, $codeAttribute->getCode()); rewind($handle); + // debug code attribution with HEX + // var_dump(implode(' ', str_split(bin2hex($codeAttribute->getCode()), 2))); + $reader = new BinaryReader($handle); - $localStorage = array_slice($arguments, 0, 4); + $localStorage = [ + $arguments[0] ?? null, + $arguments[1] ?? null, + $arguments[2] ?? null, + $arguments[3] ?? null, + ]; $stacks = []; $opcodeMap = new OpCode(); + $executedCounter = 0; while ($reader->getOffset() < $codeAttribute->getOpCodeLength()) { + if (++$executedCounter > \PHPJava\Core\JVM\Parameter\Invoker::MAX_STACK_EXCEEDED) { + throw new RuntimeException('Max stack exceeded. PHPJava has been stopped by safety guard. Maybe Java class has illegal program counter, stacks, or OpCode.'); + } $cursor = $reader->readUnsignedByte(); $opcode = $opcodeMap->getName($cursor); if ($opcode === null) { @@ -61,6 +85,8 @@ public function __call($name, $arguments) } $pointer = $reader->getOffset() - 1; + var_dump($cursor, $pointer); + $fullName = '\\PHPJava\\Kernel\\OpCode\\' . $opcode; echo 'Mnemonic: ' . $opcode . "\n"; @@ -80,17 +106,4 @@ public function __call($name, $arguments) return null; } - - private function getCodeAttribute(array $attributes): ?CodeAttribute - { - foreach ($attributes as $attribute) { - /** - * @var AttributeInfo $attribute - */ - if ($attribute->getAttributeData() instanceof CodeAttribute) { - return $attribute->getAttributeData(); - } - } - return null; - } } diff --git a/src/core/jvm/parameters/Invoker.php b/src/core/jvm/parameters/Invoker.php new file mode 100644 index 00000000..6fb92f2b --- /dev/null +++ b/src/core/jvm/parameters/Invoker.php @@ -0,0 +1,7 @@ +read(4))); + return current(unpack('l', $this->read(4))); } public function readShort() { - $short = (int) sprintf('%u', hexdec(bin2hex($this->read(2)))); + $short = $this->readUnsignedShort(); return (($short & 0x8000) > 0) ? ($short - 0xFFFF - 1) : $short ; } diff --git a/src/exceptions/RuntimeException.php b/src/exceptions/RuntimeException.php new file mode 100644 index 00000000..e6577b8d --- /dev/null +++ b/src/exceptions/RuntimeException.php @@ -0,0 +1,6 @@ +javaClassInvoker = $javaClassInvoker; $this->javaClass = $javaClassInvoker->getJavaClass(); $this->reader = $reader; - $this->localStorage = $localStorage; + $this->localStorage = &$localStorage; $this->stacks = &$stacks; $this->pointer = $pointer; return $this; @@ -144,9 +144,6 @@ public function setLocalStorage($index, $value) public function getLocalStorage($index) { - if (!isset($this->localStorage[(int) $index])) { - $this->localStorage[(int) $index] = null; - } return $this->localStorage[(int) $index]; } diff --git a/src/kernel/opcode/_getstatic.php b/src/kernel/opcode/_getstatic.php index 3768656e..f51b022c 100644 --- a/src/kernel/opcode/_getstatic.php +++ b/src/kernel/opcode/_getstatic.php @@ -20,6 +20,18 @@ public function execute(): void $signature = Formatter::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); + if (isset($signature[0]['className'])) { + $javaObjectName = str_replace('/', '\\', $signature[0]['className']); + + if ($javaObjectName === 'java\\lang\\String') { + // For PHP + $javaObjectName = 'java\\lang\\_String'; + } + $className = '\\PHPJava\\Bridge\\' . $javaObjectName; + $this->pushStack(new $className()); + return; + } + foreach ($this->javaClass->getFields() as $field) { if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { @@ -29,12 +41,6 @@ public function execute(): void return; } } - - if (isset($signature[0]['className'])) { - $className = '\\PHPJava\\Bridge\\' . str_replace('/', '\\', $signature[0]['className']); - $this->pushStack(new $className()); - return; - } throw new \Exception('にゃ〜ん'); } diff --git a/src/kernel/opcode/_invokespecial.php b/src/kernel/opcode/_invokespecial.php index 40a35c70..8cf96320 100644 --- a/src/kernel/opcode/_invokespecial.php +++ b/src/kernel/opcode/_invokespecial.php @@ -30,6 +30,7 @@ public function execute(): void } $methodName = $cpInfo[$nameAndTypeIndex->getNameIndex()]->getString(); + var_dump($methodName); // $result = call_user_func_array( // [$this->javaClassInvoker->getDynamicMethods(), $methodName], diff --git a/src/kernel/opcode/_invokevirtual.php b/src/kernel/opcode/_invokevirtual.php index cff665b3..fd2b1352 100644 --- a/src/kernel/opcode/_invokevirtual.php +++ b/src/kernel/opcode/_invokevirtual.php @@ -35,11 +35,9 @@ public function execute(): void } $invokerClassName = '\\PHPJava\\Bridge\\' . $javaObjectName; - $result = call_user_func_array([ new $invokerClassName, $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() - ], $arguments); if ($signature[0]['type'] !== 'void') { diff --git a/src/kernel/opcode/_tableswitch.php b/src/kernel/opcode/_tableswitch.php index c6b8e171..c698e511 100644 --- a/src/kernel/opcode/_tableswitch.php +++ b/src/kernel/opcode/_tableswitch.php @@ -13,19 +13,22 @@ public function execute(): void { $key = $this->getStack(); - $paddingData = $this->readByte() + $this->readByte() + $this->readByte(); - - $offsets = array(); + // padding data + $this->read(3); + $offsets = []; $offsets['default'] = $this->readInt(); - $lowByte = $this->readInt(); $highByte = $this->readInt(); + var_dump($lowByte, $highByte, $offsets);exit(); + for ($i = $lowByte; $i <= $highByte; $i++) { $offsets[$i] = $this->readInt(); } + var_dump($offsets, $lowByte, $highByte); + if (isset($offsets[$key])) { // goto PC diff --git a/tools/Test.class b/tools/Test.class index e30f0a48d66f14180a875b44adfc3a8ca1e7b581..62648a004c8f7474440143d82cf65718ac2bd2e4 100644 GIT binary patch delta 639 zcmYL_U279T6o#MKO|qNK#>TWs+NQCa*4UWTrncIGqE{-_8x1wjaV z-e=CtS>D;V!>{eD`v;%D0q0n77$6^K zjDpPxhjBccqRoWGq=QA?=A`zLE~jj!w3jVTTU3Imssw-4Oi(fwgJ;Ibg%rmvsxH%< zQN%j_PR9={W?X8_DqPw1dQuhfj{m&lzv}oe6uH2UsB7;c-l!rk5#_ zXeiP`1#u-Ft?Z$81r&o)W4$JEhR6u(tKTug?nd;T?BIU4+dUB1ADj}+i7ttjM9ZQ( zA28Bpo5&kli$^@IF&eguN0`+Z3%iLv>NrLiXMv>f4rO+kK=AF-o_bilSsP)RZ$3I{Z63| xnaCkY`rh@7Bu=zRzCTQwB`W_gkEsecYMi9_pqdPmSQ!80U_b(l$be}u`X7j=ZchLJ literal 3112 zcmai0Yj7LY75=WY+Fh+yjw@@86+dvA5~R4qkbsQsG*H{PI5@F`QU@h%uxxJ~C9>ow za)|SGVjdv{!m|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=NKV1)S+=_prn~^zz(rNr1nuZM; z?$;0#iksKk=eSM7M#IoP!~LJ4X8|p=SnA z3v(gBCJmbk7+xC>AYQm$o@W*{dfBT)RZA^3PQx5m1^>@Xe^jjc+gR5;FIBTOFDt#O zsNrGBPg%;0getEntries()', $a); - $a = str_replace('$this->getByteCodeStream()', '$this', $a); - var_dump($class, $a); - file_put_contents(__DIR__ . '/../src/kernel/opcode/' . $class, $a); -} \ No newline at end of file diff --git a/tools/copy_attr.php b/tools/copy_attr.php deleted file mode 100644 index 7565851f..00000000 --- a/tools/copy_attr.php +++ /dev/null @@ -1,33 +0,0 @@ -Class', '$this', $a); - $a = str_replace('BinaryTools::', 'BinaryTool::', $a); - $a = str_replace('getJavaBinaryStream()->', '', $a); - $a = str_replace('getCpInfo()', 'getConstantPool()->getEntries()', $a); - - - $a = str_replace('JavaAttributeInfo', '\\PHPJava\\Kernel\\Attributes\\AttributeInfo', $a); - $a = str_replace('JavaAttribute', '\\PHPJava\\Kernel\\Attributes\\', $a); - - $a = preg_replace_callback('/\$([A-Z])([a-z0-9_]*)/', function ($arg) { - return '$' . strtolower($arg[1]) . $arg[2]; - }, $a); - - $a = preg_replace_callback('/\$this->([A-Z])/', function ($arg) { - return '$this->' . strtolower($arg[1]); - }, $a); - - var_dump($class, $a); - file_put_contents(__DIR__ . '/../src/kernel/attributes/' . $class, $a . "\n"); -} \ No newline at end of file diff --git a/tools/copy_strt.php b/tools/copy_strt.php deleted file mode 100644 index 3b32e3de..00000000 --- a/tools/copy_strt.php +++ /dev/null @@ -1,33 +0,0 @@ -getClass()', $a); - $a = str_replace('getJavaBinaryStream()->', '', $a); - $a = str_replace('extends _ {', "implements StructureInterface\n{\n use \\PHPJava\\Kernel\\Core\\BinaryReader;\n use \\PHPJava\\Kernel\\Core\\ConstantPool;[LB]", $a); - $a = str_replace('public function __construct (&$this->getClass()) {', "public function execute(): void\n {", $a); - $a = str_replace('parent::__construct($this->getClass());', '', $a); - $a = preg_replace("/\s*[\\n]+/", "\n", $a); - $a = str_replace('getClass()->read', '$this->read', $a); - $a = str_replace('$this->Class->read', '$this->read', $a); - $a = str_replace('$this->getClass()Index', '$ClassIndex', $a); - - $a = str_replace('JavaAttributeInfo', '\\PHPJava\\Kernel\\Attributes\\AttributeInfo', $a); - $a = str_replace('JavaAttribute', '\\PHPJava\\Kernel\\Attributes\\', $a); - - $a = preg_replace_callback('/\$([A-Z])([a-z0-9_]*)/', function ($arg) { - return '$' . strtolower($arg[1]) . $arg[2]; - }, $a); - - $a = preg_replace_callback('/\$this->([A-Z])/', function ($arg) { - return '$this->' . strtolower($arg[1]); - }, $a); - - var_dump($class, $a); - file_put_contents(__DIR__ . '/../src/kernel/structures/' . $class, $a . "\n"); -} diff --git a/tools/test.java b/tools/test.java index 38994b54..00a7a0b3 100644 --- a/tools/test.java +++ b/tools/test.java @@ -3,102 +3,102 @@ class TestEmulates { } class Test { - - long z = -22222222222222222L; - static int c = 5; - static String b = "Hello World"; - - /** - * test for "Integer" value - * - * @param value - * @return - */ - public int testInt (int value) { - - System.out.println(this.testPrivateInteger(value)); - return value; - } - - /** - * test for "Short" value - * - * @param value - * @return - */ - public short testShort (short value) { - return value; - } - - /** - * test for "Long" value - * - * @param value - * @return - */ - public long testLong (long value) { - return value; - } - - /** - * test for "Float" value - * - * @param value - * @return - */ - public float testLong (float value) { - return value; - } - - /** - * test for "Double" value - * - * @param value - * @return - */ - public double testLong (double value) { - return value; - } - - /** - * test for "Char" value - * - * @param value - * @return - */ - public char testChar (char value) { - return value; - } - - /** - * test for "Byte" value - * - * @param value - * @return - */ - public byte testByte (byte value) { - return value; - } - - /** - * test for "Boolean" value - * - * @param value - * @return - */ - public boolean testBoolean (boolean value) { - return value; - } - - /** - * test for "String" value - * - * @param value - * @return - */ - public String testString (String value) { - return value; - } +// +// long z = -22222222222222222L; +// static int c = 5; +// static String b = "Hello World"; +// +// /** +// * test for "Integer" value +// * +// * @param value +// * @return +// */ +// public int testInt (int value) { +// +// System.out.println(this.testPrivateInteger(value)); +// return value; +// } +// +// /** +// * test for "Short" value +// * +// * @param value +// * @return +// */ +// public short testShort (short value) { +// return value; +// } +// +// /** +// * test for "Long" value +// * +// * @param value +// * @return +// */ +// public long testLong (long value) { +// return value; +// } +// +// /** +// * test for "Float" value +// * +// * @param value +// * @return +// */ +// public float testLong (float value) { +// return value; +// } +// +// /** +// * test for "Double" value +// * +// * @param value +// * @return +// */ +// public double testLong (double value) { +// return value; +// } +// +// /** +// * test for "Char" value +// * +// * @param value +// * @return +// */ +// public char testChar (char value) { +// return value; +// } +// +// /** +// * test for "Byte" value +// * +// * @param value +// * @return +// */ +// public byte testByte (byte value) { +// return value; +// } +// +// /** +// * test for "Boolean" value +// * +// * @param value +// * @return +// */ +// public boolean testBoolean (boolean value) { +// return value; +// } +// +// /** +// * test for "String" value +// * +// * @param value +// * @return +// */ +// public String testString (String value) { +// return value; +// } /** * main method @@ -106,135 +106,175 @@ public String testString (String value) { * @param args */ public static void main (String[] args) { - - String x = "String"; - - // new instance - Test _a = new Test(); - - // test call - // _a.javaTest(); - - - int t = 2; - //t *= 1; - //t = ~1; - t <<= 1; - System.out.println(t); - t >>= 1; - System.out.println(t); - t -= 1; - System.out.println(t); - t += 1; - System.out.println(t); - t = 1; - System.out.println(t); - t >>>= 1; - System.out.println(t); - t |= 1; - System.out.println(t); - t &= 1; - System.out.println(t); - t = 345321; - System.out.println((short) t); - - long t1 = 111; - t1 *= 1; - t1 = ~1; - t1 <<= 1; - t1 >>= 1; - t1 -= 1; - t1 += 1; - t1 = 1; - t1 >>>= 1; - t1 |= 1; - t1 &= 1; - - double t2 = 2; - t2 *= 1; - t2 = ~1; - t2 -= 1; - t2 += 1; - t2 = 1; - - - System.out.println(args[0]); - System.out.println(args[1]); - System.out.println(args[2]); - - /*boolean _b = false; - _b = true && true; - _b = true && false; - _b = true || true; - _b = true || false;*/ - - try { - - for (int i = 0; i < Test.c; i++) { - - StringBuilder b = new StringBuilder(); - - switch (i + 1) { - - case -1: - - b.append("a"); - - break; - case 1: - - b.append("b"); - - break; - case 2: - - b.append("c"); - - break; - - } - - if (!x.equals(i + "")) { - - - System.out.println("Test:" + Test.b + "/" + x + "*****" + i + "/" + b); - - } - - if (i == 10) { - - throw new NullPointerException(); - - } - - } - - } catch (NullPointerException e) { - - System.out.println("ぬるぷっぷー"); - - } - - String[] test = {"4", "5", "6"}; - for (String i : test) { - - System.out.println(i); +// +// String x = "String"; +// +// // new instance +// Test _a = new Test(); +// +// // test call +// // _a.javaTest(); +// +// +// int t = 2; +// //t *= 1; +// //t = ~1; +// t <<= 1; +// System.out.println(t); +// System.out.println(args[0]); +// t >>= 1; +// System.out.println(t); +// t -= 1; +// System.out.println(t); +// t += 1; +// System.out.println(t); +// t = 1; +// System.out.println(t); +// t >>>= 1; +// System.out.println(t); +// t |= 1; +// System.out.println(t); +// t &= 1; +// System.out.println(t); +// t = 345321; +// System.out.println((short) t); +// +// long t1 = 111; +// t1 *= 1; +// t1 = ~1; +// t1 <<= 1; +// t1 >>= 1; +// t1 -= 1; +// t1 += 1; +// t1 = 1; +// t1 >>>= 1; +// t1 |= 1; +// t1 &= 1; +// +// double t2 = 2; +// t2 *= 1; +// t2 = ~1; +// t2 -= 1; +// t2 += 1; +// t2 = 1; +// +// +// System.out.println(args[0]); +// System.out.println(args[1]); +// System.out.println(args[2]); +// +// /*boolean _b = false; +// _b = true && true; +// _b = true && false; +// _b = true || true; +// _b = true || false;*/ +// System.out.println("文字列テスト"); + + switch (2) { + + case -2: + + System.out.println("ねこ"); + + break; + case -1: + + System.out.println("ねこ"); + + break; + case 0: + + System.out.println("こねこね"); + + break; + case 1: + + System.out.println("こねこね"); + + break; + case 2: + + System.out.println("うさぎ"); + + break; + case 3: + + System.out.println("うさぎ"); + + break; } - int[] test2 = {1, 2, 3}; - for (int i : test2) { - - System.out.println(i); - - } - - long[] test3 = {1L, 2L, 3L}; - for (long i : test3) { - - System.out.println(i); - - } +// +// try { +// +// for (int i = 0; i < Test.c; i++) { +// +// StringBuilder b = new StringBuilder(); +// +// System.out.println("かるびぃ" + args[2]); +// +// switch (i + 1) { +// +// case -1: +// +// b.append("a"); +// +// break; +// case 1: +// +// b.append("b"); +// +// break; +// case 2: +// +// b.append("c"); +// +// break; +// +// } +// +// if (!x.equals(i + "")) { +// +// +// System.out.println("Test:" + Test.b + "/" + x + "*****" + i + "/" + b); +// +// } +// +// if (i == 10) { +// +// throw new NullPointerException(); +// +// } +// +// } +// +// } catch (NullPointerException e) { +// +// System.out.println("ぬるぷっぷー"); +// +// } +// +// String[] test = {"4", "5", "6"}; +// for (String i : test) { +// +// System.out.println(i); +// +// } +// +// int[] test2 = {1, 2, 3}; +// for (int i : test2) { +// +// System.out.println(i); +// +// } +// +// long[] test3 = {1L, 2L, 3L}; +// for (long i : test3) { +// +// System.out.println(i); +// +// } } @@ -252,9 +292,9 @@ public static String test (int n, String m, int l, int i, int v, int k) { } - private int testPrivateInteger (int value) { - return value + 1 * 2 + 3; - } +// private int testPrivateInteger (int value) { +// return value + 1 * 2 + 3; +// } /*public void javaTest () { From 00475219d9ccee1174d85ea79ee4c6add4afc44f Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 15:05:32 +0900 Subject: [PATCH 33/96] Add type into anonymous function --- src/core/jvm/invoker/Invokable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index fd5c4a84..f213f124 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -30,7 +30,7 @@ public function __construct(JavaClassInvoker $javaClassInvoker, array $methods) public function __call($name, $arguments) { - $getCodeAttribute = function ($attributes) { + $getCodeAttribute = function ($attributes): ?CodeAttribute { foreach ($attributes as $attribute) { /** * @var AttributeInfo $attribute From 1e6064ea4ba301540394871204cdf59b60b26396 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 15:07:26 +0900 Subject: [PATCH 34/96] Fix missing parameter --- src/core/jvm/invoker/Invokable.php | 2 +- src/core/jvm/parameters/Invoker.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index f213f124..f7284c31 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -75,7 +75,7 @@ public function __call($name, $arguments) $opcodeMap = new OpCode(); $executedCounter = 0; while ($reader->getOffset() < $codeAttribute->getOpCodeLength()) { - if (++$executedCounter > \PHPJava\Core\JVM\Parameter\Invoker::MAX_STACK_EXCEEDED) { + if (++$executedCounter > \PHPJava\Core\JVM\Parameters\Invoker::MAX_STACK_EXCEEDED) { throw new RuntimeException('Max stack exceeded. PHPJava has been stopped by safety guard. Maybe Java class has illegal program counter, stacks, or OpCode.'); } $cursor = $reader->readUnsignedByte(); diff --git a/src/core/jvm/parameters/Invoker.php b/src/core/jvm/parameters/Invoker.php index 6fb92f2b..cd1d4da7 100644 --- a/src/core/jvm/parameters/Invoker.php +++ b/src/core/jvm/parameters/Invoker.php @@ -1,5 +1,5 @@ Date: Sun, 24 Feb 2019 17:56:55 +0900 Subject: [PATCH 35/96] WIP commit --- src/core/JavaClassInvoker.php | 113 +++++++++++++++++- src/core/jvm/invoker/Invokable.php | 28 ++--- src/core/jvm/invoker/InvokerInterface.php | 2 +- src/core/jvm/stream/BinaryReader.php | 3 +- src/kernel/attributes/CodeAttribute.php | 2 +- src/kernel/mnemonics/OperationInterface.php | 7 ++ src/kernel/{opcode => mnemonics}/_aaload.php | 4 +- src/kernel/{opcode => mnemonics}/_aastore.php | 4 +- .../{opcode => mnemonics}/_aconst_null.php | 4 +- src/kernel/{opcode => mnemonics}/_aload.php | 4 +- src/kernel/{opcode => mnemonics}/_aload_0.php | 4 +- src/kernel/{opcode => mnemonics}/_aload_1.php | 4 +- src/kernel/{opcode => mnemonics}/_aload_2.php | 4 +- src/kernel/{opcode => mnemonics}/_aload_3.php | 4 +- .../{opcode => mnemonics}/_anewarray.php | 4 +- src/kernel/{opcode => mnemonics}/_areturn.php | 4 +- .../{opcode => mnemonics}/_arraylength.php | 4 +- src/kernel/{opcode => mnemonics}/_astore.php | 4 +- .../{opcode => mnemonics}/_astore_0.php | 4 +- .../{opcode => mnemonics}/_astore_1.php | 4 +- .../{opcode => mnemonics}/_astore_2.php | 4 +- .../{opcode => mnemonics}/_astore_3.php | 4 +- src/kernel/{opcode => mnemonics}/_athrow.php | 4 +- src/kernel/{opcode => mnemonics}/_baload.php | 4 +- src/kernel/{opcode => mnemonics}/_bastore.php | 4 +- src/kernel/{opcode => mnemonics}/_bipush.php | 4 +- .../{opcode => mnemonics}/_breakpoint.php | 4 +- src/kernel/{opcode => mnemonics}/_caload.php | 4 +- src/kernel/{opcode => mnemonics}/_castore.php | 4 +- .../{opcode => mnemonics}/_checkcast.php | 4 +- src/kernel/{opcode => mnemonics}/_d2f.php | 4 +- src/kernel/{opcode => mnemonics}/_d2i.php | 4 +- src/kernel/{opcode => mnemonics}/_d2l.php | 4 +- src/kernel/{opcode => mnemonics}/_dadd.php | 4 +- src/kernel/{opcode => mnemonics}/_daload.php | 4 +- src/kernel/{opcode => mnemonics}/_dastore.php | 4 +- src/kernel/{opcode => mnemonics}/_dcmpg.php | 4 +- src/kernel/{opcode => mnemonics}/_dcmpl.php | 4 +- .../{opcode => mnemonics}/_dconst_0.php | 4 +- .../{opcode => mnemonics}/_dconst_1.php | 4 +- src/kernel/{opcode => mnemonics}/_ddiv.php | 4 +- src/kernel/{opcode => mnemonics}/_dload.php | 4 +- src/kernel/{opcode => mnemonics}/_dload_0.php | 4 +- src/kernel/{opcode => mnemonics}/_dload_1.php | 4 +- src/kernel/{opcode => mnemonics}/_dload_2.php | 4 +- src/kernel/{opcode => mnemonics}/_dload_3.php | 4 +- src/kernel/{opcode => mnemonics}/_dmul.php | 4 +- src/kernel/{opcode => mnemonics}/_dneg.php | 4 +- src/kernel/{opcode => mnemonics}/_drem.php | 4 +- src/kernel/{opcode => mnemonics}/_dreturn.php | 4 +- src/kernel/{opcode => mnemonics}/_dstore.php | 4 +- .../{opcode => mnemonics}/_dstore_0.php | 4 +- .../{opcode => mnemonics}/_dstore_1.php | 4 +- .../{opcode => mnemonics}/_dstore_2.php | 4 +- .../{opcode => mnemonics}/_dstore_3.php | 4 +- src/kernel/{opcode => mnemonics}/_dsub.php | 4 +- src/kernel/{opcode => mnemonics}/_dup.php | 4 +- src/kernel/{opcode => mnemonics}/_dup2.php | 4 +- src/kernel/{opcode => mnemonics}/_dup2_x1.php | 4 +- src/kernel/{opcode => mnemonics}/_dup2_x2.php | 4 +- src/kernel/{opcode => mnemonics}/_dup_x1.php | 4 +- src/kernel/{opcode => mnemonics}/_dup_x2.php | 4 +- src/kernel/{opcode => mnemonics}/_f2d.php | 4 +- src/kernel/{opcode => mnemonics}/_f2i.php | 4 +- src/kernel/{opcode => mnemonics}/_f2l.php | 4 +- src/kernel/{opcode => mnemonics}/_fadd.php | 4 +- src/kernel/{opcode => mnemonics}/_faload.php | 4 +- src/kernel/{opcode => mnemonics}/_fastore.php | 4 +- src/kernel/{opcode => mnemonics}/_fcmpg.php | 4 +- src/kernel/{opcode => mnemonics}/_fcmpl.php | 4 +- .../{opcode => mnemonics}/_fconst_0.php | 4 +- .../{opcode => mnemonics}/_fconst_1.php | 4 +- .../{opcode => mnemonics}/_fconst_2.php | 4 +- src/kernel/{opcode => mnemonics}/_fdiv.php | 4 +- src/kernel/{opcode => mnemonics}/_fload.php | 4 +- src/kernel/{opcode => mnemonics}/_fload_0.php | 4 +- src/kernel/{opcode => mnemonics}/_fload_1.php | 4 +- src/kernel/{opcode => mnemonics}/_fload_2.php | 4 +- src/kernel/{opcode => mnemonics}/_fload_3.php | 4 +- src/kernel/{opcode => mnemonics}/_fmul.php | 4 +- src/kernel/{opcode => mnemonics}/_fneg.php | 4 +- src/kernel/{opcode => mnemonics}/_frem.php | 4 +- src/kernel/{opcode => mnemonics}/_freturn.php | 4 +- src/kernel/{opcode => mnemonics}/_fstore.php | 4 +- .../{opcode => mnemonics}/_fstore_0.php | 4 +- .../{opcode => mnemonics}/_fstore_1.php | 4 +- .../{opcode => mnemonics}/_fstore_2.php | 4 +- .../{opcode => mnemonics}/_fstore_3.php | 4 +- src/kernel/{opcode => mnemonics}/_fsub.php | 4 +- .../{opcode => mnemonics}/_getfield.php | 4 +- .../{opcode => mnemonics}/_getstatic.php | 8 +- src/kernel/{opcode => mnemonics}/_goto.php | 4 +- src/kernel/{opcode => mnemonics}/_goto_w.php | 4 +- src/kernel/{opcode => mnemonics}/_i2b.php | 4 +- src/kernel/{opcode => mnemonics}/_i2c.php | 4 +- src/kernel/{opcode => mnemonics}/_i2d.php | 4 +- src/kernel/{opcode => mnemonics}/_i2f.php | 4 +- src/kernel/{opcode => mnemonics}/_i2l.php | 4 +- src/kernel/{opcode => mnemonics}/_i2s.php | 4 +- src/kernel/{opcode => mnemonics}/_iadd.php | 4 +- src/kernel/{opcode => mnemonics}/_iaload.php | 4 +- src/kernel/{opcode => mnemonics}/_iand.php | 4 +- src/kernel/{opcode => mnemonics}/_iastore.php | 4 +- .../{opcode => mnemonics}/_iconst_0.php | 4 +- .../{opcode => mnemonics}/_iconst_1.php | 4 +- .../{opcode => mnemonics}/_iconst_2.php | 4 +- .../{opcode => mnemonics}/_iconst_3.php | 4 +- .../{opcode => mnemonics}/_iconst_4.php | 4 +- .../{opcode => mnemonics}/_iconst_5.php | 4 +- .../{opcode => mnemonics}/_iconst_m1.php | 4 +- src/kernel/{opcode => mnemonics}/_idiv.php | 4 +- .../{opcode => mnemonics}/_if_acmpeq.php | 4 +- .../{opcode => mnemonics}/_if_acmpne.php | 4 +- .../{opcode => mnemonics}/_if_icmpeq.php | 4 +- .../{opcode => mnemonics}/_if_icmpge.php | 4 +- .../{opcode => mnemonics}/_if_icmpgt.php | 4 +- .../{opcode => mnemonics}/_if_icmple.php | 4 +- .../{opcode => mnemonics}/_if_icmplt.php | 4 +- .../{opcode => mnemonics}/_if_icmpne.php | 4 +- src/kernel/{opcode => mnemonics}/_ifeq.php | 4 +- src/kernel/{opcode => mnemonics}/_ifge.php | 4 +- src/kernel/{opcode => mnemonics}/_ifgt.php | 4 +- src/kernel/{opcode => mnemonics}/_ifle.php | 4 +- src/kernel/{opcode => mnemonics}/_iflt.php | 4 +- src/kernel/{opcode => mnemonics}/_ifne.php | 4 +- .../{opcode => mnemonics}/_ifnonnull.php | 4 +- src/kernel/{opcode => mnemonics}/_ifnull.php | 4 +- src/kernel/{opcode => mnemonics}/_iinc.php | 4 +- src/kernel/{opcode => mnemonics}/_iload.php | 4 +- src/kernel/{opcode => mnemonics}/_iload_0.php | 4 +- src/kernel/{opcode => mnemonics}/_iload_1.php | 4 +- src/kernel/{opcode => mnemonics}/_iload_2.php | 4 +- src/kernel/{opcode => mnemonics}/_iload_3.php | 4 +- src/kernel/{opcode => mnemonics}/_impdep1.php | 4 +- src/kernel/{opcode => mnemonics}/_impdep2.php | 4 +- src/kernel/{opcode => mnemonics}/_imul.php | 4 +- src/kernel/{opcode => mnemonics}/_ineg.php | 4 +- .../{opcode => mnemonics}/_instanceof.php | 4 +- .../{opcode => mnemonics}/_invokedynamic.php | 4 +- .../_invokeinterface.php | 4 +- .../{opcode => mnemonics}/_invokespecial.php | 6 +- .../{opcode => mnemonics}/_invokestatic.php | 4 +- .../{opcode => mnemonics}/_invokevirtual.php | 6 +- src/kernel/{opcode => mnemonics}/_ior.php | 4 +- src/kernel/{opcode => mnemonics}/_irem.php | 4 +- src/kernel/{opcode => mnemonics}/_ireturn.php | 4 +- src/kernel/{opcode => mnemonics}/_ishl.php | 4 +- src/kernel/{opcode => mnemonics}/_ishr.php | 4 +- src/kernel/{opcode => mnemonics}/_istore.php | 4 +- .../{opcode => mnemonics}/_istore_0.php | 4 +- .../{opcode => mnemonics}/_istore_1.php | 4 +- .../{opcode => mnemonics}/_istore_2.php | 4 +- .../{opcode => mnemonics}/_istore_3.php | 4 +- src/kernel/{opcode => mnemonics}/_isub.php | 4 +- src/kernel/{opcode => mnemonics}/_iushr.php | 4 +- src/kernel/{opcode => mnemonics}/_ixor.php | 4 +- src/kernel/{opcode => mnemonics}/_jsr.php | 4 +- src/kernel/{opcode => mnemonics}/_jsr_w.php | 4 +- src/kernel/{opcode => mnemonics}/_l2d.php | 4 +- src/kernel/{opcode => mnemonics}/_l2f.php | 4 +- src/kernel/{opcode => mnemonics}/_l2i.php | 4 +- src/kernel/{opcode => mnemonics}/_ladd.php | 4 +- src/kernel/{opcode => mnemonics}/_laload.php | 4 +- src/kernel/{opcode => mnemonics}/_land.php | 4 +- src/kernel/{opcode => mnemonics}/_lastore.php | 4 +- src/kernel/{opcode => mnemonics}/_lcmp.php | 4 +- .../{opcode => mnemonics}/_lconst_0.php | 4 +- .../{opcode => mnemonics}/_lconst_1.php | 4 +- src/kernel/{opcode => mnemonics}/_ldc.php | 4 +- src/kernel/{opcode => mnemonics}/_ldc2_w.php | 4 +- src/kernel/{opcode => mnemonics}/_ldc_w.php | 4 +- src/kernel/{opcode => mnemonics}/_ldiv.php | 4 +- src/kernel/{opcode => mnemonics}/_lload.php | 4 +- src/kernel/{opcode => mnemonics}/_lload_0.php | 4 +- src/kernel/{opcode => mnemonics}/_lload_1.php | 4 +- src/kernel/{opcode => mnemonics}/_lload_2.php | 4 +- src/kernel/{opcode => mnemonics}/_lload_3.php | 4 +- src/kernel/{opcode => mnemonics}/_lmul.php | 4 +- src/kernel/{opcode => mnemonics}/_lneg.php | 4 +- .../{opcode => mnemonics}/_lookupswitch.php | 4 +- src/kernel/{opcode => mnemonics}/_lor.php | 4 +- src/kernel/{opcode => mnemonics}/_lrem.php | 4 +- src/kernel/{opcode => mnemonics}/_lreturn.php | 4 +- src/kernel/{opcode => mnemonics}/_lshl.php | 4 +- src/kernel/{opcode => mnemonics}/_lshr.php | 4 +- src/kernel/{opcode => mnemonics}/_lstore.php | 4 +- .../{opcode => mnemonics}/_lstore_0.php | 4 +- .../{opcode => mnemonics}/_lstore_1.php | 4 +- .../{opcode => mnemonics}/_lstore_2.php | 4 +- .../{opcode => mnemonics}/_lstore_3.php | 4 +- src/kernel/{opcode => mnemonics}/_lsub.php | 4 +- src/kernel/{opcode => mnemonics}/_lushr.php | 4 +- src/kernel/{opcode => mnemonics}/_lxor.php | 4 +- .../{opcode => mnemonics}/_monitorenter.php | 4 +- .../{opcode => mnemonics}/_monitorexit.php | 4 +- .../{opcode => mnemonics}/_multianewarray.php | 4 +- src/kernel/{opcode => mnemonics}/_new.php | 4 +- .../{opcode => mnemonics}/_newarray.php | 4 +- src/kernel/{opcode => mnemonics}/_nop.php | 4 +- src/kernel/{opcode => mnemonics}/_pop.php | 4 +- src/kernel/{opcode => mnemonics}/_pop2.php | 4 +- .../{opcode => mnemonics}/_putfield.php | 4 +- .../{opcode => mnemonics}/_putstatic.php | 4 +- src/kernel/{opcode => mnemonics}/_ret.php | 4 +- src/kernel/{opcode => mnemonics}/_return.php | 4 +- src/kernel/{opcode => mnemonics}/_saload.php | 4 +- src/kernel/{opcode => mnemonics}/_sastore.php | 4 +- src/kernel/{opcode => mnemonics}/_sipush.php | 4 +- src/kernel/{opcode => mnemonics}/_swap.php | 4 +- .../{opcode => mnemonics}/_tableswitch.php | 11 +- src/kernel/{opcode => mnemonics}/_wide.php | 4 +- src/kernel/opcode/OpCodeInterface.php | 8 -- src/utilities/Formatter.php | 8 +- tools/test.php | 1 + 214 files changed, 556 insertions(+), 451 deletions(-) create mode 100644 src/kernel/mnemonics/OperationInterface.php rename src/kernel/{opcode => mnemonics}/_aaload.php (87%) rename src/kernel/{opcode => mnemonics}/_aastore.php (83%) rename src/kernel/{opcode => mnemonics}/_aconst_null.php (77%) rename src/kernel/{opcode => mnemonics}/_aload.php (82%) rename src/kernel/{opcode => mnemonics}/_aload_0.php (80%) rename src/kernel/{opcode => mnemonics}/_aload_1.php (80%) rename src/kernel/{opcode => mnemonics}/_aload_2.php (80%) rename src/kernel/{opcode => mnemonics}/_aload_3.php (80%) rename src/kernel/{opcode => mnemonics}/_anewarray.php (89%) rename src/kernel/{opcode => mnemonics}/_areturn.php (77%) rename src/kernel/{opcode => mnemonics}/_arraylength.php (77%) rename src/kernel/{opcode => mnemonics}/_astore.php (79%) rename src/kernel/{opcode => mnemonics}/_astore_0.php (76%) rename src/kernel/{opcode => mnemonics}/_astore_1.php (76%) rename src/kernel/{opcode => mnemonics}/_astore_2.php (76%) rename src/kernel/{opcode => mnemonics}/_astore_3.php (76%) rename src/kernel/{opcode => mnemonics}/_athrow.php (91%) rename src/kernel/{opcode => mnemonics}/_baload.php (76%) rename src/kernel/{opcode => mnemonics}/_bastore.php (76%) rename src/kernel/{opcode => mnemonics}/_bipush.php (76%) rename src/kernel/{opcode => mnemonics}/_breakpoint.php (75%) rename src/kernel/{opcode => mnemonics}/_caload.php (76%) rename src/kernel/{opcode => mnemonics}/_castore.php (76%) rename src/kernel/{opcode => mnemonics}/_checkcast.php (76%) rename src/kernel/{opcode => mnemonics}/_d2f.php (77%) rename src/kernel/{opcode => mnemonics}/_d2i.php (77%) rename src/kernel/{opcode => mnemonics}/_d2l.php (77%) rename src/kernel/{opcode => mnemonics}/_dadd.php (81%) rename src/kernel/{opcode => mnemonics}/_daload.php (82%) rename src/kernel/{opcode => mnemonics}/_dastore.php (83%) rename src/kernel/{opcode => mnemonics}/_dcmpg.php (76%) rename src/kernel/{opcode => mnemonics}/_dcmpl.php (76%) rename src/kernel/{opcode => mnemonics}/_dconst_0.php (74%) rename src/kernel/{opcode => mnemonics}/_dconst_1.php (74%) rename src/kernel/{opcode => mnemonics}/_ddiv.php (77%) rename src/kernel/{opcode => mnemonics}/_dload.php (82%) rename src/kernel/{opcode => mnemonics}/_dload_0.php (76%) rename src/kernel/{opcode => mnemonics}/_dload_1.php (76%) rename src/kernel/{opcode => mnemonics}/_dload_2.php (76%) rename src/kernel/{opcode => mnemonics}/_dload_3.php (76%) rename src/kernel/{opcode => mnemonics}/_dmul.php (81%) rename src/kernel/{opcode => mnemonics}/_dneg.php (77%) rename src/kernel/{opcode => mnemonics}/_drem.php (77%) rename src/kernel/{opcode => mnemonics}/_dreturn.php (76%) rename src/kernel/{opcode => mnemonics}/_dstore.php (84%) rename src/kernel/{opcode => mnemonics}/_dstore_0.php (76%) rename src/kernel/{opcode => mnemonics}/_dstore_1.php (76%) rename src/kernel/{opcode => mnemonics}/_dstore_2.php (76%) rename src/kernel/{opcode => mnemonics}/_dstore_3.php (76%) rename src/kernel/{opcode => mnemonics}/_dsub.php (81%) rename src/kernel/{opcode => mnemonics}/_dup.php (75%) rename src/kernel/{opcode => mnemonics}/_dup2.php (77%) rename src/kernel/{opcode => mnemonics}/_dup2_x1.php (76%) rename src/kernel/{opcode => mnemonics}/_dup2_x2.php (76%) rename src/kernel/{opcode => mnemonics}/_dup_x1.php (76%) rename src/kernel/{opcode => mnemonics}/_dup_x2.php (76%) rename src/kernel/{opcode => mnemonics}/_f2d.php (77%) rename src/kernel/{opcode => mnemonics}/_f2i.php (77%) rename src/kernel/{opcode => mnemonics}/_f2l.php (77%) rename src/kernel/{opcode => mnemonics}/_fadd.php (77%) rename src/kernel/{opcode => mnemonics}/_faload.php (76%) rename src/kernel/{opcode => mnemonics}/_fastore.php (76%) rename src/kernel/{opcode => mnemonics}/_fcmpg.php (76%) rename src/kernel/{opcode => mnemonics}/_fcmpl.php (76%) rename src/kernel/{opcode => mnemonics}/_fconst_0.php (76%) rename src/kernel/{opcode => mnemonics}/_fconst_1.php (76%) rename src/kernel/{opcode => mnemonics}/_fconst_2.php (76%) rename src/kernel/{opcode => mnemonics}/_fdiv.php (77%) rename src/kernel/{opcode => mnemonics}/_fload.php (76%) rename src/kernel/{opcode => mnemonics}/_fload_0.php (76%) rename src/kernel/{opcode => mnemonics}/_fload_1.php (76%) rename src/kernel/{opcode => mnemonics}/_fload_2.php (76%) rename src/kernel/{opcode => mnemonics}/_fload_3.php (76%) rename src/kernel/{opcode => mnemonics}/_fmul.php (77%) rename src/kernel/{opcode => mnemonics}/_fneg.php (77%) rename src/kernel/{opcode => mnemonics}/_frem.php (77%) rename src/kernel/{opcode => mnemonics}/_freturn.php (76%) rename src/kernel/{opcode => mnemonics}/_fstore.php (76%) rename src/kernel/{opcode => mnemonics}/_fstore_0.php (76%) rename src/kernel/{opcode => mnemonics}/_fstore_1.php (76%) rename src/kernel/{opcode => mnemonics}/_fstore_2.php (76%) rename src/kernel/{opcode => mnemonics}/_fstore_3.php (76%) rename src/kernel/{opcode => mnemonics}/_fsub.php (77%) rename src/kernel/{opcode => mnemonics}/_getfield.php (89%) rename src/kernel/{opcode => mnemonics}/_getstatic.php (90%) rename src/kernel/{opcode => mnemonics}/_goto.php (79%) rename src/kernel/{opcode => mnemonics}/_goto_w.php (76%) rename src/kernel/{opcode => mnemonics}/_i2b.php (77%) rename src/kernel/{opcode => mnemonics}/_i2c.php (77%) rename src/kernel/{opcode => mnemonics}/_i2d.php (77%) rename src/kernel/{opcode => mnemonics}/_i2f.php (77%) rename src/kernel/{opcode => mnemonics}/_i2l.php (77%) rename src/kernel/{opcode => mnemonics}/_i2s.php (81%) rename src/kernel/{opcode => mnemonics}/_iadd.php (81%) rename src/kernel/{opcode => mnemonics}/_iaload.php (80%) rename src/kernel/{opcode => mnemonics}/_iand.php (81%) rename src/kernel/{opcode => mnemonics}/_iastore.php (81%) rename src/kernel/{opcode => mnemonics}/_iconst_0.php (74%) rename src/kernel/{opcode => mnemonics}/_iconst_1.php (74%) rename src/kernel/{opcode => mnemonics}/_iconst_2.php (74%) rename src/kernel/{opcode => mnemonics}/_iconst_3.php (74%) rename src/kernel/{opcode => mnemonics}/_iconst_4.php (74%) rename src/kernel/{opcode => mnemonics}/_iconst_5.php (74%) rename src/kernel/{opcode => mnemonics}/_iconst_m1.php (74%) rename src/kernel/{opcode => mnemonics}/_idiv.php (77%) rename src/kernel/{opcode => mnemonics}/_if_acmpeq.php (84%) rename src/kernel/{opcode => mnemonics}/_if_acmpne.php (84%) rename src/kernel/{opcode => mnemonics}/_if_icmpeq.php (76%) rename src/kernel/{opcode => mnemonics}/_if_icmpge.php (84%) rename src/kernel/{opcode => mnemonics}/_if_icmpgt.php (84%) rename src/kernel/{opcode => mnemonics}/_if_icmple.php (76%) rename src/kernel/{opcode => mnemonics}/_if_icmplt.php (84%) rename src/kernel/{opcode => mnemonics}/_if_icmpne.php (84%) rename src/kernel/{opcode => mnemonics}/_ifeq.php (82%) rename src/kernel/{opcode => mnemonics}/_ifge.php (77%) rename src/kernel/{opcode => mnemonics}/_ifgt.php (77%) rename src/kernel/{opcode => mnemonics}/_ifle.php (77%) rename src/kernel/{opcode => mnemonics}/_iflt.php (77%) rename src/kernel/{opcode => mnemonics}/_ifne.php (82%) rename src/kernel/{opcode => mnemonics}/_ifnonnull.php (76%) rename src/kernel/{opcode => mnemonics}/_ifnull.php (76%) rename src/kernel/{opcode => mnemonics}/_iinc.php (82%) rename src/kernel/{opcode => mnemonics}/_iload.php (79%) rename src/kernel/{opcode => mnemonics}/_iload_0.php (76%) rename src/kernel/{opcode => mnemonics}/_iload_1.php (76%) rename src/kernel/{opcode => mnemonics}/_iload_2.php (76%) rename src/kernel/{opcode => mnemonics}/_iload_3.php (76%) rename src/kernel/{opcode => mnemonics}/_impdep1.php (76%) rename src/kernel/{opcode => mnemonics}/_impdep2.php (76%) rename src/kernel/{opcode => mnemonics}/_imul.php (81%) rename src/kernel/{opcode => mnemonics}/_ineg.php (79%) rename src/kernel/{opcode => mnemonics}/_instanceof.php (75%) rename src/kernel/{opcode => mnemonics}/_invokedynamic.php (75%) rename src/kernel/{opcode => mnemonics}/_invokeinterface.php (74%) rename src/kernel/{opcode => mnemonics}/_invokespecial.php (87%) rename src/kernel/{opcode => mnemonics}/_invokestatic.php (92%) rename src/kernel/{opcode => mnemonics}/_invokevirtual.php (89%) rename src/kernel/{opcode => mnemonics}/_ior.php (81%) rename src/kernel/{opcode => mnemonics}/_irem.php (77%) rename src/kernel/{opcode => mnemonics}/_ireturn.php (79%) rename src/kernel/{opcode => mnemonics}/_ishl.php (81%) rename src/kernel/{opcode => mnemonics}/_ishr.php (81%) rename src/kernel/{opcode => mnemonics}/_istore.php (79%) rename src/kernel/{opcode => mnemonics}/_istore_0.php (76%) rename src/kernel/{opcode => mnemonics}/_istore_1.php (76%) rename src/kernel/{opcode => mnemonics}/_istore_2.php (76%) rename src/kernel/{opcode => mnemonics}/_istore_3.php (76%) rename src/kernel/{opcode => mnemonics}/_isub.php (81%) rename src/kernel/{opcode => mnemonics}/_iushr.php (81%) rename src/kernel/{opcode => mnemonics}/_ixor.php (81%) rename src/kernel/{opcode => mnemonics}/_jsr.php (77%) rename src/kernel/{opcode => mnemonics}/_jsr_w.php (76%) rename src/kernel/{opcode => mnemonics}/_l2d.php (77%) rename src/kernel/{opcode => mnemonics}/_l2f.php (77%) rename src/kernel/{opcode => mnemonics}/_l2i.php (77%) rename src/kernel/{opcode => mnemonics}/_ladd.php (81%) rename src/kernel/{opcode => mnemonics}/_laload.php (82%) rename src/kernel/{opcode => mnemonics}/_land.php (81%) rename src/kernel/{opcode => mnemonics}/_lastore.php (83%) rename src/kernel/{opcode => mnemonics}/_lcmp.php (77%) rename src/kernel/{opcode => mnemonics}/_lconst_0.php (74%) rename src/kernel/{opcode => mnemonics}/_lconst_1.php (74%) rename src/kernel/{opcode => mnemonics}/_ldc.php (92%) rename src/kernel/{opcode => mnemonics}/_ldc2_w.php (81%) rename src/kernel/{opcode => mnemonics}/_ldc_w.php (76%) rename src/kernel/{opcode => mnemonics}/_ldiv.php (77%) rename src/kernel/{opcode => mnemonics}/_lload.php (79%) rename src/kernel/{opcode => mnemonics}/_lload_0.php (76%) rename src/kernel/{opcode => mnemonics}/_lload_1.php (76%) rename src/kernel/{opcode => mnemonics}/_lload_2.php (76%) rename src/kernel/{opcode => mnemonics}/_lload_3.php (76%) rename src/kernel/{opcode => mnemonics}/_lmul.php (81%) rename src/kernel/{opcode => mnemonics}/_lneg.php (77%) rename src/kernel/{opcode => mnemonics}/_lookupswitch.php (90%) rename src/kernel/{opcode => mnemonics}/_lor.php (81%) rename src/kernel/{opcode => mnemonics}/_lrem.php (77%) rename src/kernel/{opcode => mnemonics}/_lreturn.php (76%) rename src/kernel/{opcode => mnemonics}/_lshl.php (81%) rename src/kernel/{opcode => mnemonics}/_lshr.php (81%) rename src/kernel/{opcode => mnemonics}/_lstore.php (79%) rename src/kernel/{opcode => mnemonics}/_lstore_0.php (76%) rename src/kernel/{opcode => mnemonics}/_lstore_1.php (76%) rename src/kernel/{opcode => mnemonics}/_lstore_2.php (76%) rename src/kernel/{opcode => mnemonics}/_lstore_3.php (76%) rename src/kernel/{opcode => mnemonics}/_lsub.php (81%) rename src/kernel/{opcode => mnemonics}/_lushr.php (81%) rename src/kernel/{opcode => mnemonics}/_lxor.php (77%) rename src/kernel/{opcode => mnemonics}/_monitorenter.php (75%) rename src/kernel/{opcode => mnemonics}/_monitorexit.php (75%) rename src/kernel/{opcode => mnemonics}/_multianewarray.php (75%) rename src/kernel/{opcode => mnemonics}/_new.php (89%) rename src/kernel/{opcode => mnemonics}/_newarray.php (83%) rename src/kernel/{opcode => mnemonics}/_nop.php (73%) rename src/kernel/{opcode => mnemonics}/_pop.php (75%) rename src/kernel/{opcode => mnemonics}/_pop2.php (77%) rename src/kernel/{opcode => mnemonics}/_putfield.php (87%) rename src/kernel/{opcode => mnemonics}/_putstatic.php (86%) rename src/kernel/{opcode => mnemonics}/_ret.php (77%) rename src/kernel/{opcode => mnemonics}/_return.php (72%) rename src/kernel/{opcode => mnemonics}/_saload.php (76%) rename src/kernel/{opcode => mnemonics}/_sastore.php (76%) rename src/kernel/{opcode => mnemonics}/_sipush.php (76%) rename src/kernel/{opcode => mnemonics}/_swap.php (77%) rename src/kernel/{opcode => mnemonics}/_tableswitch.php (78%) rename src/kernel/{opcode => mnemonics}/_wide.php (77%) delete mode 100644 src/kernel/opcode/OpCodeInterface.php diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index a3e7e144..e7f5809c 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -5,8 +5,10 @@ use PHPJava\Core\JVM\Invoker\Invokable; use PHPJava\Core\JVM\Invoker\InvokerInterface; use PHPJava\Kernel\Maps\AccessFlag; +use PHPJava\Kernel\Maps\OpCode; use PHPJava\Kernel\Structures\_FieldInfo; use PHPJava\Kernel\Structures\_MethodInfo; +use PHPJava\Utilities\Formatter; class JavaClassInvoker { @@ -23,6 +25,8 @@ class JavaClassInvoker private $dynamicFields = []; private $staticFields = []; + private $debugTraces = []; + public function __construct(JavaClass $javaClass) { $this->javaClass = $javaClass; @@ -67,21 +71,124 @@ public function getJavaClass(): JavaClass public function getDynamicMethods(): InvokerInterface { - return new JVM\Invoker\DynamicMethodInvoker($this, $this->dynamicMethods); + return new JVM\Invoker\DynamicMethodInvoker( + $this, + $this->dynamicMethods, + $this->debugTraces + ); } public function getStaticMethods(): InvokerInterface { - return new JVM\Invoker\StaticMethodInvoker($this, $this->staticMethods); + return new JVM\Invoker\StaticMethodInvoker( + $this, + $this->staticMethods, + $this->debugTraces + ); } public function getDynamicFields(): FieldInterface { - return new JVM\Field\DynamicField($this, $this->dynamicFields); + return new JVM\Field\DynamicField( + $this, + $this->dynamicFields + ); } public function getStaticFields(): JVM\Field\StaticField { return new JVM\Field\StaticField(); } + + public function debug(): void + { + $cpInfo = $this->getJavaClass()->getConstantPool()->getEntries(); + + $methodAccessFlags = $this->debugTraces['method']->getAccessFlag(); + $accessFlags = []; + $accessFlag = new AccessFlag(); + foreach ($accessFlag->getValues() as $value) { + if (($methodAccessFlags & $value) !== 0) { + $accessFlags[] = strtolower(str_replace('_', '', $accessFlag->getName($value))); + } + } + + $methodName = $cpInfo[$this->debugTraces['method']->getNameIndex()]->getString(); + $descriptor = Formatter::parseSignature($cpInfo[$this->debugTraces['method']->getDescriptorIndex()]->getString()); + $formattedArguments = implode( + ', ', + array_map( + function ($argument) { + $arrayBrackets = str_repeat('[]', $argument['deep_array']); + if ($argument['type'] === 'class') { + return $argument['class_name'] . $arrayBrackets; + } + return $argument['type'] . $arrayBrackets; + }, + $descriptor['arguments'] + ) + ); + + + $type = $descriptor[0]['type']; + if ($type === 'class') { + $type = $descriptor[0]['class_name']; + } + + $methodAccessibility = implode(' ', $accessFlags); + + printf("[method]\n"); + printf(ltrim("$methodAccessibility $type $methodName($formattedArguments)\n", ' ')); + printf("\n"); + printf("[code]\n"); + printf( + "%s\n", + implode( + "\n", + array_map( + function ($code) { + return '<0x' . implode('> <0x', $code) . '>'; + }, + array_chunk(str_split(bin2hex($this->debugTraces['raw_code']), 2), 20) + ) + ) + ); + printf("\n"); + printf("[executed]\n"); + + printf( + "% 8s | %-6.6s | %-20.20s | %-10.10s | %-15.15s\n", + "PC", + "OPCODE", + "MNEMONIC", + "OPERANDS", + "LOCAL STORAGE" + ); + + $line = sprintf( + "%8s+%8s+%22s+%12s+%17s\n", + "---------", + "--------", + "----------------------", + "------------", + "-----------------" + ); + + printf($line); + + // [$mnemonic, $localStorage, $stacks, $pointer] + foreach ($this->debugTraces['executed'] as [$opcode, $mnemonic, $localStorage, $stacks, $pointer]) { + printf( + "% 8s | 0x%02X | %-20.20s | %-10.10s | %-15.15s\n", + (int) $pointer, + $opcode, + // Remove prefix + ltrim($mnemonic, '_'), + count($stacks), + count($localStorage) + ); + } + + printf($line); + } } diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index f7284c31..9cd2bff2 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -14,18 +14,20 @@ use PHPJava\Kernel\Core\Accumulator; use PHPJava\Kernel\Core\ConstantPool; use PHPJava\Kernel\Maps\OpCode; -use PHPJava\Kernel\OpCode\OpCodeInterface; +use PHPJava\Kernel\Mnemonics\OperationInterface; use PHPJava\Kernel\Structures\_MethodInfo; trait Invokable { private $javaClassInvoker; private $methods = []; + private $debugTraces; - public function __construct(JavaClassInvoker $javaClassInvoker, array $methods) + public function __construct(JavaClassInvoker $javaClassInvoker, array $methods, array &$debugTraces) { $this->javaClassInvoker = $javaClassInvoker; $this->methods = $methods; + $this->debugTraces = &$debugTraces; } public function __call($name, $arguments) @@ -60,10 +62,11 @@ public function __call($name, $arguments) rewind($handle); // debug code attribution with HEX - // var_dump(implode(' ', str_split(bin2hex($codeAttribute->getCode()), 2))); + $this->debugTraces['raw_code'] = $codeAttribute->getCode(); + $this->debugTraces['method'] = $method; + $this->debugTraces['executed'] = []; $reader = new BinaryReader($handle); - $localStorage = [ $arguments[0] ?? null, $arguments[1] ?? null, @@ -72,27 +75,24 @@ public function __call($name, $arguments) ]; $stacks = []; - $opcodeMap = new OpCode(); + $mnemonicMap = new OpCode(); $executedCounter = 0; while ($reader->getOffset() < $codeAttribute->getOpCodeLength()) { if (++$executedCounter > \PHPJava\Core\JVM\Parameters\Invoker::MAX_STACK_EXCEEDED) { throw new RuntimeException('Max stack exceeded. PHPJava has been stopped by safety guard. Maybe Java class has illegal program counter, stacks, or OpCode.'); } - $cursor = $reader->readUnsignedByte(); - $opcode = $opcodeMap->getName($cursor); - if ($opcode === null) { + $opcode = $reader->readUnsignedByte(); + $mnemonic = $mnemonicMap->getName($opcode); + if ($mnemonic === null) { throw new UndefinedOpCodeException('Undefined OpCode ' . sprintf('0x%X', $cursor) . '.'); } $pointer = $reader->getOffset() - 1; - var_dump($cursor, $pointer); - - $fullName = '\\PHPJava\\Kernel\\OpCode\\' . $opcode; - - echo 'Mnemonic: ' . $opcode . "\n"; + $fullName = '\\PHPJava\\Kernel\\Mnemonics\\' . $mnemonic; + $this->debugTraces['executed'][] = [$opcode, $mnemonic, $localStorage, $stacks, $pointer]; /** - * @var OpCodeInterface|Accumulator|ConstantPool $executor + * @var OperationInterface\|Accumulator|ConstantPool $executor */ $executor = new $fullName(); $executor->setConstantPool($this->javaClassInvoker->getJavaClass()->getConstantPool()); diff --git a/src/core/jvm/invoker/InvokerInterface.php b/src/core/jvm/invoker/InvokerInterface.php index a6115f29..10808853 100644 --- a/src/core/jvm/invoker/InvokerInterface.php +++ b/src/core/jvm/invoker/InvokerInterface.php @@ -5,6 +5,6 @@ interface InvokerInterface { - public function __construct(JavaClassInvoker $javaClassInvoker, array $methods); + public function __construct(JavaClassInvoker $javaClassInvoker, array $methods, array &$debugTraces); public function __call($name, $arguments); } diff --git a/src/core/jvm/stream/BinaryReader.php b/src/core/jvm/stream/BinaryReader.php index 123a7ee1..512b7a41 100644 --- a/src/core/jvm/stream/BinaryReader.php +++ b/src/core/jvm/stream/BinaryReader.php @@ -41,7 +41,8 @@ public function readUnsignedShort() public function readInt() { - return current(unpack('l', $this->read(4))); + $bytes = array_values(unpack('c4', $this->read(4))); + return ($bytes[0] << 24) | ($bytes[1] << 16) | ($bytes[2] << 8) | $bytes[3]; } public function readShort() diff --git a/src/kernel/attributes/CodeAttribute.php b/src/kernel/attributes/CodeAttribute.php index 37353d1b..5f7b0542 100644 --- a/src/kernel/attributes/CodeAttribute.php +++ b/src/kernel/attributes/CodeAttribute.php @@ -25,7 +25,7 @@ public function execute(): void $this->maxLocals = $this->readUnsignedShort(); $this->codeLength = $this->readUnsignedInt(); - // read opcode + // read mnemonics $this->code = []; for ($i = 0; $i < $this->codeLength; $i++) { $this->code[$i] = $this->readUnsignedByte(); diff --git a/src/kernel/mnemonics/OperationInterface.php b/src/kernel/mnemonics/OperationInterface.php new file mode 100644 index 00000000..d378cb09 --- /dev/null +++ b/src/kernel/mnemonics/OperationInterface.php @@ -0,0 +1,7 @@ +getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); - if (isset($signature[0]['className'])) { - $javaObjectName = str_replace('/', '\\', $signature[0]['className']); + if (isset($signature[0]['class_name'])) { + $javaObjectName = str_replace('/', '\\', $signature[0]['class_name']); if ($javaObjectName === 'java\\lang\\String') { // For PHP diff --git a/src/kernel/opcode/_goto.php b/src/kernel/mnemonics/_goto.php similarity index 79% rename from src/kernel/opcode/_goto.php rename to src/kernel/mnemonics/_goto.php index ba55e82e..2ab39af1 100644 --- a/src/kernel/opcode/_goto.php +++ b/src/kernel/mnemonics/_goto.php @@ -1,10 +1,10 @@ getStack(); } diff --git a/src/kernel/opcode/_invokestatic.php b/src/kernel/mnemonics/_invokestatic.php similarity index 92% rename from src/kernel/opcode/_invokestatic.php rename to src/kernel/mnemonics/_invokestatic.php index 26785bf2..ca52927b 100644 --- a/src/kernel/opcode/_invokestatic.php +++ b/src/kernel/mnemonics/_invokestatic.php @@ -1,10 +1,10 @@ getDescriptorIndex()]->getString()); $arguments = []; - for ($i = 0; $i < $signature['argumentsCount']; $i++) { + for ($i = 0; $i < $signature['arguments_count']; $i++) { $arguments[] = $this->getStack(); } diff --git a/src/kernel/opcode/_ior.php b/src/kernel/mnemonics/_ior.php similarity index 81% rename from src/kernel/opcode/_ior.php rename to src/kernel/mnemonics/_ior.php index d23adc15..c6a53306 100644 --- a/src/kernel/opcode/_ior.php +++ b/src/kernel/mnemonics/_ior.php @@ -1,10 +1,10 @@ getStack(); // padding data - $this->read(3); + $this->read(4 - ($this->getOffset()) % 4); $offsets = []; $offsets['default'] = $this->readInt(); $lowByte = $this->readInt(); $highByte = $this->readInt(); - - var_dump($lowByte, $highByte, $offsets);exit(); + $count = $highByte - $lowByte + 1; for ($i = $lowByte; $i <= $highByte; $i++) { $offsets[$i] = $this->readInt(); } - var_dump($offsets, $lowByte, $highByte); - if (isset($offsets[$key])) { // goto PC diff --git a/src/kernel/opcode/_wide.php b/src/kernel/mnemonics/_wide.php similarity index 77% rename from src/kernel/opcode/_wide.php rename to src/kernel/mnemonics/_wide.php index a3ab8f75..2a81920f 100644 --- a/src/kernel/opcode/_wide.php +++ b/src/kernel/mnemonics/_wide.php @@ -1,10 +1,10 @@ $getMappedSignatureType($signature[$i]), - 'deepArray' => $deepArray, + 'deep_array' => $deepArray, ]; $deepArray = 0; break; @@ -50,8 +50,8 @@ public static function parseSignature($signature, $i = 0) } $data[] = [ 'type' => 'class', - 'deepArray' => $deepArray, - 'className' => $build, + 'deep_array' => $deepArray, + 'class_name' => $build, ]; $deepArray = 0; @@ -71,7 +71,7 @@ public static function parseSignature($signature, $i = 0) $build .= $signature[$i]; } $data['arguments'] = ($build !== '') ? static::parseSignature($build) : []; - $data['argumentsCount'] = ($data['argumentsCount'] ?? 0) + 1; + $data['arguments_count'] = ($data['arguments_count'] ?? 0) + 1; break; } $i++; diff --git a/tools/test.php b/tools/test.php index 3c274564..f7f87ed0 100644 --- a/tools/test.php +++ b/tools/test.php @@ -9,3 +9,4 @@ ); $invoker = new JavaClassInvoker($javaClass); $invoker->getDynamicMethods()->main([999, 222, 3333]); +$invoker->debug(); From f416bd51b05d5e1c66d75adcef1e18c53bfa1ee5 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 18:00:27 +0900 Subject: [PATCH 36/96] Fix missing param --- src/core/JavaClassInvoker.php | 6 +++--- tools/test.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index e7f5809c..24472fd1 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -38,10 +38,10 @@ public function __construct(JavaClass $javaClass) */ $methodName = $cpInfo[$methodInfo->getNameIndex()]->getString(); - if ($methodInfo->getAccessFlag() === 0 || ($methodInfo->getAccessFlag() & AccessFlag::_Public) !== 0) { - $this->dynamicMethods[$methodName] = $methodInfo; - } elseif (($methodInfo->getAccessFlag() & AccessFlag::_Static) !== 0) { + if (($methodInfo->getAccessFlag() & AccessFlag::_Static) !== 0) { $this->staticMethods[$methodName] = $methodInfo; + } elseif ($methodInfo->getAccessFlag() === 0 || ($methodInfo->getAccessFlag() & AccessFlag::_Public) !== 0) { + $this->dynamicMethods[$methodName] = $methodInfo; } } diff --git a/tools/test.php b/tools/test.php index f7f87ed0..ae65de31 100644 --- a/tools/test.php +++ b/tools/test.php @@ -8,5 +8,5 @@ new \PHPJava\Core\JavaClassReader(__DIR__ . '/Test.class') ); $invoker = new JavaClassInvoker($javaClass); -$invoker->getDynamicMethods()->main([999, 222, 3333]); +$invoker->getStaticMethods()->main([999, 222, 3333]); $invoker->debug(); From 224b12831c5a6ebd1bc334453ecf68fd687109fa Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 18:05:17 +0900 Subject: [PATCH 37/96] Remove commentout --- src/core/JavaClassInvoker.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 24472fd1..f097c435 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -176,7 +176,6 @@ function ($code) { printf($line); - // [$mnemonic, $localStorage, $stacks, $pointer] foreach ($this->debugTraces['executed'] as [$opcode, $mnemonic, $localStorage, $stacks, $pointer]) { printf( "% 8s | 0x%02X | %-20.20s | %-10.10s | %-15.15s\n", From a4f1ca35473e68e84047ae7896eda71e4f81fc43 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 18:07:20 +0900 Subject: [PATCH 38/96] Fix missing namespace --- src/core/jvm/invoker/Invokable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 9cd2bff2..5c083a44 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -92,7 +92,7 @@ public function __call($name, $arguments) $this->debugTraces['executed'][] = [$opcode, $mnemonic, $localStorage, $stacks, $pointer]; /** - * @var OperationInterface\|Accumulator|ConstantPool $executor + * @var OperationInterface|Accumulator|ConstantPool $executor */ $executor = new $fullName(); $executor->setConstantPool($this->javaClassInvoker->getJavaClass()->getConstantPool()); From 32d51c23a1e12857147e3f171c9438da54b9ac7e Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 18:45:35 +0900 Subject: [PATCH 39/96] Update --- src/bridge/java/io/PrintStream.php | 8 +- src/bridge/java/lang/StringBuilder.php | 5 +- src/kernel/mnemonics/_aaload.php | 1 - src/kernel/mnemonics/_anewarray.php | 2 +- src/kernel/mnemonics/_invokespecial.php | 2 +- src/kernel/mnemonics/_invokevirtual.php | 12 +- src/kernel/mnemonics/_newarray.php | 2 +- src/utilities/Formatter.php | 2 +- tools/Test.class | Bin 1046 -> 3448 bytes tools/test.java | 465 ++++++++++++------------ 10 files changed, 253 insertions(+), 246 deletions(-) diff --git a/src/bridge/java/io/PrintStream.php b/src/bridge/java/io/PrintStream.php index 40e3aa4b..2ba5dd99 100644 --- a/src/bridge/java/io/PrintStream.php +++ b/src/bridge/java/io/PrintStream.php @@ -6,7 +6,7 @@ class PrintStream { - + private $sequence = ''; public function println($arg) { if ($arg instanceof _Utf8) { @@ -23,4 +23,10 @@ public function println($arg) } } + public function append($string) + { + $this->sequence .= $string; + return $this; + } + } diff --git a/src/bridge/java/lang/StringBuilder.php b/src/bridge/java/lang/StringBuilder.php index 6a0e9b96..bb7747b9 100644 --- a/src/bridge/java/lang/StringBuilder.php +++ b/src/bridge/java/lang/StringBuilder.php @@ -5,6 +5,7 @@ class StringBuilder { private $sequence = ''; + public function append($arg) { if ($arg instanceof _String) { @@ -16,10 +17,9 @@ public function append($arg) $this->sequence .= $arg; } return $this; - } - public function toString($arg = null) + public function toString() { return $this->sequence; } @@ -27,7 +27,6 @@ public function toString($arg = null) public function __toString() { return $this->sequence; - } } \ No newline at end of file diff --git a/src/kernel/mnemonics/_aaload.php b/src/kernel/mnemonics/_aaload.php index 86ab514f..38ece128 100644 --- a/src/kernel/mnemonics/_aaload.php +++ b/src/kernel/mnemonics/_aaload.php @@ -20,7 +20,6 @@ public function execute(): void if (!isset($arrayref[$index])) { throw new \PHPJava\Bridge\java\lang\ArrayIndexOutOfBoundsException('Array Index ' . $index . ' out of bounds.'); } - $this->pushStack($arrayref[$index]); } } diff --git a/src/kernel/mnemonics/_anewarray.php b/src/kernel/mnemonics/_anewarray.php index 091b9e75..f437c5ad 100644 --- a/src/kernel/mnemonics/_anewarray.php +++ b/src/kernel/mnemonics/_anewarray.php @@ -22,7 +22,7 @@ public function execute(): void // 空の配列を渡す (nullで埋める) $count = $this->getStack(); // need reference - $ref = new ArrayIterator(array_fill(0, $count, null)); + $ref = new \ArrayIterator(array_fill(0, $count, null)); $this->pushStackByReference($ref); } } diff --git a/src/kernel/mnemonics/_invokespecial.php b/src/kernel/mnemonics/_invokespecial.php index 4f75b18f..6020144d 100644 --- a/src/kernel/mnemonics/_invokespecial.php +++ b/src/kernel/mnemonics/_invokespecial.php @@ -30,7 +30,7 @@ public function execute(): void } $methodName = $cpInfo[$nameAndTypeIndex->getNameIndex()]->getString(); - var_dump($methodName); +// var_dump($methodName); // $result = call_user_func_array( // [$this->javaClassInvoker->getDynamicMethods(), $methodName], diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index 3a537e42..73464304 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -24,7 +24,6 @@ public function execute(): void for ($i = 0; $i < $signature['arguments_count']; $i++) { $arguments[] = $this->getStack(); } - $invokerClass = $this->getStack(); $javaObjectName = str_replace('/', '\\', $class); @@ -35,10 +34,13 @@ public function execute(): void } $invokerClassName = '\\PHPJava\\Bridge\\' . $javaObjectName; - $result = call_user_func_array([ - new $invokerClassName, - $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() - ], $arguments); + $result = call_user_func_array( + [ + $invokerClass, + $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() + ], + $arguments + ); if ($signature[0]['type'] !== 'void') { $this->pushStack($result); diff --git a/src/kernel/mnemonics/_newarray.php b/src/kernel/mnemonics/_newarray.php index 0134b994..9cff6a53 100644 --- a/src/kernel/mnemonics/_newarray.php +++ b/src/kernel/mnemonics/_newarray.php @@ -15,7 +15,7 @@ public function execute(): void $count = $this->getStack(); // need reference - $ref = new ArrayIterator(array_fill(0, $count, null)); + $ref = new \ArrayIterator(array_fill(0, $count, null)); $this->pushStackByReference($ref); } } diff --git a/src/utilities/Formatter.php b/src/utilities/Formatter.php index 0ba5dc90..2db8bbf0 100644 --- a/src/utilities/Formatter.php +++ b/src/utilities/Formatter.php @@ -71,7 +71,7 @@ public static function parseSignature($signature, $i = 0) $build .= $signature[$i]; } $data['arguments'] = ($build !== '') ? static::parseSignature($build) : []; - $data['arguments_count'] = ($data['arguments_count'] ?? 0) + 1; + $data['arguments_count'] = count($data['arguments']); break; } $i++; diff --git a/tools/Test.class b/tools/Test.class index 62648a004c8f7474440143d82cf65718ac2bd2e4..0298b4172d28d1038b324890235ed7281c382a10 100644 GIT binary patch literal 3448 zcma)84Qx}_75?t?^Lx+F&j~egN*YL0+EF|FWTVs}KV>YTj8F(^&BC0tYn;Rj2FFf~ z!~dU23KZIPg#o4OwyJDJo1hzEOV+`%Rh71C)wI8Asy3~fWWiQxnlw$-rjC()_t{P$ zfo)g5=N_MX&bjBF^WA&j&#wPq48Rh+Y+@<8o#PigVmLHAq{G zrwtr5a7f2t0kM;PHG4OEGkceScg?2A)<|_clIX1trBks)Z@qxl5KF|;%LE+$K%0Qt zl4%3(!dMSi|%VJZ zEXe|Svzc>t?4#MtnQUe>J9t@O#-vptc(H`uA7l^8ZGBmwWHpmk8SNX0GtZS>J1YA( z_E!=@tD^CEvT{Q*74Nyp(Ymfp(QX!V<}CmrpmY$`N(WJUHFHAnH40Hx0_A&9FYv!WBdH06)Cmr6x%>Qt&zzp$)@z>7 z%lo_c^(lIbZN1eKdU=2Me|w5v12rDOnhCwz#V2>L7A^l%uaz3>AgN65?f2VGjYsj= zRK5A%nG#ds+#WThNb^UP6q7Gy(?@%-$NL*zNNFgZuvJ<0B$WcL#Zj9^YE;t}?y>)7Y`RZcl-6pqwBpURS_x*^Y_CnbYqjE9Z6a{V zsB#CAkvo=*_b!gkZ!v9bz5EWi&QXHj&;9_rgnTpmdiE!!K{*Z1qGpm^Alccr^qxt! zRI*GQb=?Kl5j1?pFe+ZfFY@WHb8+r=rSKVQryW^?{669O68jbG@;CUU^IF56C^@l0_K2G8iPT@_y&_Bg#{G3|9#>;pQU%?;nRb=rsd_b$e;0!***Kr-+ z5IW9@V!SSvVpuH4cSRFM#Upq_wBWL6!(ct>o*yW#+TD~{ql z@fv<7-p2dlm-wUj4YK0*xFX)ipT$-DRT21`Qi~6j<@krP3hyc{LNHVRRzet8I)p>% z7pihZXv#5;FA7unrf@5736Js)$6tv%l&iwaC!)k*a4ZtD@EKE{>In1Czwp>cDEbJ_Mjh?0aa6**(Z=T61YdxEqI?{);hr|zp`&9$ zp%T`u6du>{cwUG1Pcalkf(}F+O#Ib53x4_vZ3o$y?h79!hybL(GOlRKOIK@Nk?d?z5AoL%GI@Vyg1f zG9O|E|H*4XD|dEkos&_U7-QU{;&IevBEY5Sam@H}GfsF+8n3#XbgAhfRnvdetX{Ml`l&VA$Z*(YDrA}& zMKWq{MQ!ae8&YRZ5z4NY$yE4J`$^P(9<`t8Z&peFvU4*brNdwS<%0p5&hUXW0$JS`lWNO#W;uLgUqr;QV2y>s4T9; z6SW=Gwt!+#X0jLJGel0<9Q}e7r*{*tWe0b<-R_>adEumJUUXh`S+pX$@fIs#i!9*Na4lr*p8K-|RQdlaPN{#8zbjHAY%|P))>5T&#ccU_c6t$_3k^@E@U$Y>= 1; -// System.out.println(t); -// t -= 1; -// System.out.println(t); -// t += 1; -// System.out.println(t); -// t = 1; -// System.out.println(t); -// t >>>= 1; -// System.out.println(t); -// t |= 1; -// System.out.println(t); -// t &= 1; -// System.out.println(t); -// t = 345321; -// System.out.println((short) t); -// -// long t1 = 111; -// t1 *= 1; -// t1 = ~1; -// t1 <<= 1; -// t1 >>= 1; -// t1 -= 1; -// t1 += 1; -// t1 = 1; -// t1 >>>= 1; -// t1 |= 1; -// t1 &= 1; -// -// double t2 = 2; -// t2 *= 1; -// t2 = ~1; -// t2 -= 1; -// t2 += 1; -// t2 = 1; -// -// -// System.out.println(args[0]); -// System.out.println(args[1]); -// System.out.println(args[2]); -// -// /*boolean _b = false; -// _b = true && true; -// _b = true && false; -// _b = true || true; -// _b = true || false;*/ -// System.out.println("文字列テスト"); + + System.out.println("かるびぃ" + args[2]); + String x = "String"; + + // new instance + Test _a = new Test(); + + // test call + // _a.javaTest(); + + + int t = 2; + //t *= 1; + //t = ~1; + t <<= 1; + System.out.println(t); + System.out.println(args[0]); + t >>= 1; + System.out.println(t); + t -= 1; + System.out.println(t); + t += 1; + System.out.println(t); + t = 1; + System.out.println(t); + t >>>= 1; + System.out.println(t); + t |= 1; + System.out.println(t); + t &= 1; + System.out.println(t); + t = 345321; + System.out.println((short) t); + + long t1 = 111; + t1 *= 1; + t1 = ~1; + t1 <<= 1; + t1 >>= 1; + t1 -= 1; + t1 += 1; + t1 = 1; + t1 >>>= 1; + t1 |= 1; + t1 &= 1; + + double t2 = 2; + t2 *= 1; + t2 = ~1; + t2 -= 1; + t2 += 1; + t2 = 1; + + + System.out.println(args[0]); + System.out.println(args[1]); + System.out.println(args[2]); + + /*boolean _b = false; + _b = true && true; + _b = true && false; + _b = true || true; + _b = true || false;*/ + System.out.println("文字列テスト"); switch (2) { @@ -205,76 +206,76 @@ public static void main (String[] args) { } -// -// try { -// -// for (int i = 0; i < Test.c; i++) { -// -// StringBuilder b = new StringBuilder(); -// -// System.out.println("かるびぃ" + args[2]); -// -// switch (i + 1) { -// -// case -1: -// -// b.append("a"); -// -// break; -// case 1: -// -// b.append("b"); -// -// break; -// case 2: -// -// b.append("c"); -// -// break; -// -// } -// -// if (!x.equals(i + "")) { -// -// -// System.out.println("Test:" + Test.b + "/" + x + "*****" + i + "/" + b); -// -// } -// -// if (i == 10) { -// -// throw new NullPointerException(); -// -// } -// -// } -// -// } catch (NullPointerException e) { -// -// System.out.println("ぬるぷっぷー"); -// -// } -// -// String[] test = {"4", "5", "6"}; -// for (String i : test) { -// -// System.out.println(i); -// -// } -// -// int[] test2 = {1, 2, 3}; -// for (int i : test2) { -// -// System.out.println(i); -// -// } -// -// long[] test3 = {1L, 2L, 3L}; -// for (long i : test3) { -// -// System.out.println(i); -// -// } + + try { + + for (int i = 0; i < Test.c; i++) { + + StringBuilder b = new StringBuilder(); + + System.out.println("かるびぃ" + args[2]); + + switch (i + 1) { + + case -1: + + b.append("a"); + + break; + case 1: + + b.append("b"); + + break; + case 2: + + b.append("c"); + + break; + + } + + if (!x.equals(i + "")) { + + + System.out.println("Test:" + Test.b + "/" + x + "*****" + i + "/" + b); + + } + + if (i == 10) { + + throw new NullPointerException(); + + } + + } + + } catch (NullPointerException e) { + + System.out.println("ぬるぷっぷー"); + + } + + String[] test = {"4", "5", "6"}; + for (String i : test) { + + System.out.println(i); + + } + + int[] test2 = {1, 2, 3}; + for (int i : test2) { + + System.out.println(i); + + } + + long[] test3 = {1L, 2L, 3L}; + for (long i : test3) { + + System.out.println(i); + + } } @@ -292,9 +293,9 @@ public static String test (int n, String m, int l, int i, int v, int k) { } -// private int testPrivateInteger (int value) { -// return value + 1 * 2 + 3; -// } + private int testPrivateInteger (int value) { + return value + 1 * 2 + 3; + } /*public void javaTest () { From 024c4442f575fbb8e4ce0953683365d9c72bec3a Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 19:02:02 +0900 Subject: [PATCH 40/96] Update debug information --- src/core/JavaClassInvoker.php | 42 +++++++++++++++++++++--------- src/core/jvm/invoker/Invokable.php | 2 ++ 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index f097c435..f458ccab 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -115,17 +115,21 @@ public function debug(): void $methodName = $cpInfo[$this->debugTraces['method']->getNameIndex()]->getString(); $descriptor = Formatter::parseSignature($cpInfo[$this->debugTraces['method']->getDescriptorIndex()]->getString()); - $formattedArguments = implode( - ', ', - array_map( - function ($argument) { - $arrayBrackets = str_repeat('[]', $argument['deep_array']); - if ($argument['type'] === 'class') { - return $argument['class_name'] . $arrayBrackets; - } - return $argument['type'] . $arrayBrackets; - }, - $descriptor['arguments'] + $formattedArguments = str_replace( + '/', + '.', + implode( + ', ', + array_map( + function ($argument) { + $arrayBrackets = str_repeat('[]', $argument['deep_array']); + if ($argument['type'] === 'class') { + return $argument['class_name'] . $arrayBrackets; + } + return $argument['type'] . $arrayBrackets; + }, + $descriptor['arguments'] + ) ) ); @@ -141,13 +145,25 @@ function ($argument) { printf(ltrim("$methodAccessibility $type $methodName($formattedArguments)\n", ' ')); printf("\n"); printf("[code]\n"); + + $codeCounter = 0; printf( "%s\n", implode( "\n", array_map( - function ($code) { - return '<0x' . implode('> <0x', $code) . '>'; + function ($codes) use (&$codeCounter) { + return implode( + ' ', + array_map( + function ($code) use (&$codeCounter) { + $isMnemonic = in_array($codeCounter, $this->debugTraces['mnemonic_indexes']); + $codeCounter++; + return ($isMnemonic ? "\e[1m\e[35m" : "") . "<0x{$code}>" . ($isMnemonic ? "\e[m" : ""); + }, + $codes + ) + ); }, array_chunk(str_split(bin2hex($this->debugTraces['raw_code']), 2), 20) ) diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 5c083a44..04b877d4 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -64,6 +64,7 @@ public function __call($name, $arguments) // debug code attribution with HEX $this->debugTraces['raw_code'] = $codeAttribute->getCode(); $this->debugTraces['method'] = $method; + $this->debugTraces['mnemonic_indexes'] = []; $this->debugTraces['executed'] = []; $reader = new BinaryReader($handle); @@ -90,6 +91,7 @@ public function __call($name, $arguments) $fullName = '\\PHPJava\\Kernel\\Mnemonics\\' . $mnemonic; $this->debugTraces['executed'][] = [$opcode, $mnemonic, $localStorage, $stacks, $pointer]; + $this->debugTraces['mnemonic_indexes'][] = $pointer; /** * @var OperationInterface|Accumulator|ConstantPool $executor From e4a12f33a7e9d759792625b37b9a30428060dce5 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 19:12:50 +0900 Subject: [PATCH 41/96] Change namespace Bridge to Imitation --- src/{bridge => imitation}/java/io/PrintStream.php | 4 ++-- .../java/lang/ArrayIndexOutOfBoundsException.php | 2 +- src/{bridge => imitation}/java/lang/StringBuilder.php | 2 +- src/{bridge => imitation}/java/lang/_String.php | 2 +- src/kernel/mnemonics/_aaload.php | 2 +- src/kernel/mnemonics/_getstatic.php | 2 +- src/kernel/mnemonics/_invokevirtual.php | 2 +- src/kernel/mnemonics/_ldc.php | 2 +- src/kernel/mnemonics/_new.php | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) rename src/{bridge => imitation}/java/io/PrintStream.php (85%) rename src/{bridge => imitation}/java/lang/ArrayIndexOutOfBoundsException.php (73%) rename src/{bridge => imitation}/java/lang/StringBuilder.php (93%) rename src/{bridge => imitation}/java/lang/_String.php (95%) diff --git a/src/bridge/java/io/PrintStream.php b/src/imitation/java/io/PrintStream.php similarity index 85% rename from src/bridge/java/io/PrintStream.php rename to src/imitation/java/io/PrintStream.php index 2ba5dd99..0d4a48b9 100644 --- a/src/bridge/java/io/PrintStream.php +++ b/src/imitation/java/io/PrintStream.php @@ -1,5 +1,5 @@ getStack(); if (!isset($arrayref[$index])) { - throw new \PHPJava\Bridge\java\lang\ArrayIndexOutOfBoundsException('Array Index ' . $index . ' out of bounds.'); + throw new \PHPJava\Imitation\java\lang\ArrayIndexOutOfBoundsException('Array Index ' . $index . ' out of bounds.'); } $this->pushStack($arrayref[$index]); } diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/mnemonics/_getstatic.php index ffa816c9..c154c52d 100644 --- a/src/kernel/mnemonics/_getstatic.php +++ b/src/kernel/mnemonics/_getstatic.php @@ -27,7 +27,7 @@ public function execute(): void // For PHP $javaObjectName = 'java\\lang\\_String'; } - $className = '\\PHPJava\\Bridge\\' . $javaObjectName; + $className = '\\PHPJava\\Imitation\\' . $javaObjectName; $this->pushStack(new $className()); return; } diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index 73464304..8118789e 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -33,7 +33,7 @@ public function execute(): void $javaObjectName = 'java\\lang\\_String'; } - $invokerClassName = '\\PHPJava\\Bridge\\' . $javaObjectName; + $invokerClassName = '\\PHPJava\\Imitation\\' . $javaObjectName; $result = call_user_func_array( [ $invokerClass, diff --git a/src/kernel/mnemonics/_ldc.php b/src/kernel/mnemonics/_ldc.php index c8c0334a..8a98f3cb 100644 --- a/src/kernel/mnemonics/_ldc.php +++ b/src/kernel/mnemonics/_ldc.php @@ -25,7 +25,7 @@ public function execute(): void $value = $cpInfo[$data->getStringIndex()]; if ($value instanceof _Utf8) { - $value = new \PHPJava\Bridge\java\lang\_String($value); + $value = new \PHPJava\Imitation\java\lang\_String($value); } } elseif (($data instanceof _Integer) || ($data instanceof _Float)) { $value = $data->getBytes(); diff --git a/src/kernel/mnemonics/_new.php b/src/kernel/mnemonics/_new.php index eb1bf579..21482fb2 100644 --- a/src/kernel/mnemonics/_new.php +++ b/src/kernel/mnemonics/_new.php @@ -20,7 +20,7 @@ public function execute(): void return; } - $invokeClassName = '\\PHPJava\\Bridge\\' . str_replace('/', '\\', $className); + $invokeClassName = '\\PHPJava\\Imitation\\' . str_replace('/', '\\', $className); $this->pushStack(new $invokeClassName()); } } From 066f212df3f10fd2b08ea175b4ea9aa21ce9a86a Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 19:35:31 +0900 Subject: [PATCH 42/96] WIP commit --- src/imitation/java/lang/_Object.php | 54 ++++++++++++++++++++++++ src/imitation/java/lang/_String.php | 12 ++---- src/kernel/mnemonics/_getstatic.php | 9 +--- src/kernel/mnemonics/_invokevirtual.php | 11 +---- src/kernel/mnemonics/_new.php | 3 +- src/utilities/ClassResolver.php | 20 +++++++++ tools/Test.class | Bin 3448 -> 3473 bytes tools/test.java | 2 +- 8 files changed, 85 insertions(+), 26 deletions(-) create mode 100644 src/imitation/java/lang/_Object.php create mode 100644 src/utilities/ClassResolver.php diff --git a/src/imitation/java/lang/_Object.php b/src/imitation/java/lang/_Object.php new file mode 100644 index 00000000..5cd6133b --- /dev/null +++ b/src/imitation/java/lang/_Object.php @@ -0,0 +1,54 @@ +toString(); + } + + public function wait(int $timeout = null, int $nanos = null): void + { + // not implemented. + } +} diff --git a/src/imitation/java/lang/_String.php b/src/imitation/java/lang/_String.php index f799cfa3..c5138132 100644 --- a/src/imitation/java/lang/_String.php +++ b/src/imitation/java/lang/_String.php @@ -3,7 +3,7 @@ use PHPJava\Kernel\Structures\_Utf8; -class _String +class _String extends _Object { private $object = null; @@ -12,27 +12,23 @@ public function __construct($object = null) $this->object = $object; } - public function equals($object) + public function equals($object): bool { - if (!($this->object instanceof _Utf8)) { return false; } - if ($object instanceof _String) { return $this->toString() === $object->toString(); } - return $this->toString() === $object; } - public function toString() + public function toString(): string { return $this->__toString(); - } - public function __toString() + public function __toString(): string { if (!($this->object instanceof _Utf8)) { return (string) $this->object; diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/mnemonics/_getstatic.php index c154c52d..15faeae5 100644 --- a/src/kernel/mnemonics/_getstatic.php +++ b/src/kernel/mnemonics/_getstatic.php @@ -3,6 +3,7 @@ use PHPJava\Exceptions\NotImplementedException; use PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\ClassResolver; use PHPJava\Utilities\Formatter; final class _getstatic implements OperationInterface @@ -21,13 +22,7 @@ public function execute(): void $signature = Formatter::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); if (isset($signature[0]['class_name'])) { - $javaObjectName = str_replace('/', '\\', $signature[0]['class_name']); - - if ($javaObjectName === 'java\\lang\\String') { - // For PHP - $javaObjectName = 'java\\lang\\_String'; - } - $className = '\\PHPJava\\Imitation\\' . $javaObjectName; + $className = ClassResolver::resolve($signature[0]['class_name']); $this->pushStack(new $className()); return; } diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index 8118789e..46fa7be3 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -3,6 +3,7 @@ use PHPJava\Exceptions\NotImplementedException; use PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\ClassResolver; use PHPJava\Utilities\Formatter; final class _invokevirtual implements OperationInterface @@ -25,15 +26,7 @@ public function execute(): void $arguments[] = $this->getStack(); } $invokerClass = $this->getStack(); - - $javaObjectName = str_replace('/', '\\', $class); - - if ($javaObjectName === 'java\\lang\\String') { - // For PHP - $javaObjectName = 'java\\lang\\_String'; - } - - $invokerClassName = '\\PHPJava\\Imitation\\' . $javaObjectName; + $invokerClassName = ClassResolver::resolve($class); $result = call_user_func_array( [ $invokerClass, diff --git a/src/kernel/mnemonics/_new.php b/src/kernel/mnemonics/_new.php index 21482fb2..3401b644 100644 --- a/src/kernel/mnemonics/_new.php +++ b/src/kernel/mnemonics/_new.php @@ -3,6 +3,7 @@ use PHPJava\Exceptions\NotImplementedException; use PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\ClassResolver; final class _new implements OperationInterface { @@ -20,7 +21,7 @@ public function execute(): void return; } - $invokeClassName = '\\PHPJava\\Imitation\\' . str_replace('/', '\\', $className); + $invokeClassName = ClassResolver::resolve($className); $this->pushStack(new $invokeClassName()); } } diff --git a/src/utilities/ClassResolver.php b/src/utilities/ClassResolver.php new file mode 100644 index 00000000..0790b049 --- /dev/null +++ b/src/utilities/ClassResolver.php @@ -0,0 +1,20 @@ + '_String', + 'Object' => '_Object', + ]; + + public static function resolve($javaPath): string + { + $namespaces = explode('.', str_replace('/', '.', $javaPath)); + $buildClassPath = []; + foreach ($namespaces as $namespace) { + $buildClassPath[] = static::MAPS[$namespace] ?? $namespace; + } + return '\\PHPJava\\Imitation\\' . implode('\\', $buildClassPath); + } +} diff --git a/tools/Test.class b/tools/Test.class index 0298b4172d28d1038b324890235ed7281c382a10..910bf2432b24e3e606f9fc9efb189e9642a06879 100644 GIT binary patch literal 3473 zcmai0eQ;D)760A0Z{K_S_AP`>HV{5SYAM|flqjW}CZuUiAQH+)>>_lbrEHRISlH}_ zWrKXfk`!oZX@vqUwAukXI106ZCW9b;%{U$VhvV4Mj*d=s2d(4S8K+~_ip1Z2`w>WD z`*!cW=biIA=bn4cx%a-G-TdA)0Q2yw2?L$Zp$i^yF*G&h!URNJcoJPEsr4pe*q~#h z1jXe`w~mAfH#!X@<=7*;xPeVNQc|PS0q26hIB8lwN#{`Rxv4#5GXU*}dBVVE18D=j z2DZpqzieQufkp!j(&RP++fCG9hk>0^y34?B1AC-sua1m~+0uo5I{FOs8+gjV{=%e6 zfpAEN4;VOT;AsJ|ooz8&2U{y!yMTAehRBvkO+1q5stKi2u|(H=0j(jHh@~3^9R9#c z0kt{V85J16B$kLS>+NojrdCAS}1X|>bp%GUsN5Zi(MGv{&1k7yt0$C>bZlH2>9Lon;~B=6iDk|ia~+3tJWC^T zYJpk)*3m{<`HVTUS1ProVp}5VC}S4wigL+DLq|LxYcrJWO?5;PUnj(T=o*qj*sYj|og17Ur_s)EkR;%9*Wf z=1_Lup={<-Hq&R}I8HF{ISd!L!d{^FPsa~jKY!x-!4uiO{n>q&vwa5%%4W`IGe>O; zM{_iLx}44I&t{HgGlwlS-~pBweLs$u1YqH1oD^_MtMwKd@gSu&WK_#XqD~1^4!gRn zHy&?G#u%j3!mS$#oHEz=`Gal4FLWx*NgWWn(=|Coj28>_adsYQBv zq6xZw&scy_m6^{xJ)6qS`Uzq!x~Vr3-^`WWYByI~^X1OFZN38k6Aa3IzY{xJs}ks4D&2% zhsoKJthBjz43p)OoNja71=0~Te8xpooyO0vzz%=Ci?TdDDiuCMU1xjNAU{?(zuXIz zYz=Gyws{pU?;XtCs-c?BP%#)aZ%dB^ke-VE6-T=E< zl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QX!V<}CmrpmY$`N(WJUHFHAnH40Hx0_A&9FYv!WBdH06)Cmr6x%>Qt&zzp$)@z>7 z%lo_c^(lIbZN1eKdU=2Me|w5v12rDOnhCwz#V2>L7A^l%uaz3>AgN65?f2VGjYsj= zRK5A%nG#ds+#WThNb^UP6q7Gy(?@%-$NL*zNNFgZuvJ<0B$WcL#Zj9^YE;t}?y>)7Y`RZcl-6pqwBpURS_x*^Y_CnbYqjE9Z6a{V zsB#CAkvo=*_b!gkZ!v9bz5EWi&QXHj&;9_rgnTpmdiE!!K{*Z1qGpm^Alccr^qxt! zRI*GQb=?Kl5j1?pFe+ZfFY@WHb8+r=rSKVQryW^?{669O68jbG@;CUU^IF56C^@l0_K2G8iPT@_y&_Bg#{G3|9#>;pQU%?;nRb=rsd_b$e;0!***Kr-+ z5IW9@V!SSvVpuH4cSRFM#Upq_wBWL6!(ct>o*yW#+TD~{ql z@fv<7-p2dlm-wUj4YK0*xFX)ipT$-DRT21`Qi~6j<@krP3hyc{LNHVRRzet8I)p>% z7pihZXv#5;FA7unrf@5736Js)$6tv%l&iwaC!)k*a4ZtD@EKE{>In1Czwp>cDEbJ_Mjh?0aa6**(Z=T61YdxEqI?{);hr|zp`&9$ zp%T`u6du>{cwUG1Pcalkf(}F+O#Ib53x4_vZ3o$y?h79!hybL(GOlRKOIK@Nk?d?z5AoL%GI@Vyg1f zG9O|E|H*4XD|dEkos& Date: Sun, 24 Feb 2019 19:47:21 +0900 Subject: [PATCH 43/96] Add imitations --- src/.gitkeep | 0 .../lang/ArrayIndexOutOfBoundsException.php | 2 +- src/imitation/java/lang/Exception.php | 7 +++ .../java/lang/IndexOutOfBoundsException.php | 7 +++ src/imitation/java/lang/RuntimeException.php | 7 +++ src/imitation/java/lang/Throwable.php | 7 +++ src/imitation/java/lang/_Object.php | 49 +---------------- src/imitation/phpjava/extended/_Object.php | 54 +++++++++++++++++++ 8 files changed, 84 insertions(+), 49 deletions(-) delete mode 100644 src/.gitkeep create mode 100644 src/imitation/java/lang/Exception.php create mode 100644 src/imitation/java/lang/IndexOutOfBoundsException.php create mode 100644 src/imitation/java/lang/RuntimeException.php create mode 100644 src/imitation/java/lang/Throwable.php create mode 100644 src/imitation/phpjava/extended/_Object.php diff --git a/src/.gitkeep b/src/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/imitation/java/lang/ArrayIndexOutOfBoundsException.php b/src/imitation/java/lang/ArrayIndexOutOfBoundsException.php index 162fcefb..75e0caec 100644 --- a/src/imitation/java/lang/ArrayIndexOutOfBoundsException.php +++ b/src/imitation/java/lang/ArrayIndexOutOfBoundsException.php @@ -3,7 +3,7 @@ use PHPJava\Kernel\Structures\_Utf8; -class ArrayIndexOutOfBoundsException extends \Exception +class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException { } diff --git a/src/imitation/java/lang/Exception.php b/src/imitation/java/lang/Exception.php new file mode 100644 index 00000000..e7ecd478 --- /dev/null +++ b/src/imitation/java/lang/Exception.php @@ -0,0 +1,7 @@ +toString(); - } - - public function wait(int $timeout = null, int $nanos = null): void - { - // not implemented. - } + use \PHPJava\Imitation\PHPJava\Extended\_Object; } diff --git a/src/imitation/phpjava/extended/_Object.php b/src/imitation/phpjava/extended/_Object.php new file mode 100644 index 00000000..f4f3d6df --- /dev/null +++ b/src/imitation/phpjava/extended/_Object.php @@ -0,0 +1,54 @@ +toString(); + } + + public function wait(int $timeout = null, int $nanos = null): void + { + // not implemented. + } +} From da8a02ea0d8c46802e2c51282138ba8df63a6e1d Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 20:54:26 +0900 Subject: [PATCH 44/96] WIP commit --- src/core/JavaClass.php | 5 + src/core/JavaClassInvoker.php | 180 +++++++++--------- src/core/jvm/invoker/Invokable.php | 14 +- src/core/jvm/parameters/Invoker.php | 2 +- .../java/lang/ClassNotFoundException.php | 7 + src/imitation/java/lang/Integer.php | 13 ++ src/imitation/java/lang/Number.php | 7 + .../lang/ReflectiveOperationException.php | 7 + src/imitation/java/lang/Throwable.php | 5 + src/kernel/core/Accumulator.php | 3 + src/kernel/mnemonics/OperationInterface.php | 1 - src/kernel/mnemonics/_aaload.php | 2 +- src/kernel/mnemonics/_areturn.php | 4 +- src/kernel/mnemonics/_invokestatic.php | 31 +-- src/kernel/mnemonics/_invokevirtual.php | 7 +- src/kernel/mnemonics/_tableswitch.php | 7 +- tools/Test.class | Bin 3473 -> 3646 bytes tools/test.java | 5 +- tools/test.php | 7 +- 19 files changed, 186 insertions(+), 121 deletions(-) create mode 100644 src/imitation/java/lang/ClassNotFoundException.php create mode 100644 src/imitation/java/lang/Integer.php create mode 100644 src/imitation/java/lang/Number.php create mode 100644 src/imitation/java/lang/ReflectiveOperationException.php diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index 631ab9b9..d9125fc2 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -133,4 +133,9 @@ public function getMethods(): array { return $this->activeMethods->getEntries(); } + + public function getInvoker(): JavaClassInvoker + { + return new JavaClassInvoker($this); + } } diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index f458ccab..647050ae 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -27,6 +27,8 @@ class JavaClassInvoker private $debugTraces = []; + private static $singleton = []; + public function __construct(JavaClass $javaClass) { $this->javaClass = $javaClass; @@ -104,106 +106,108 @@ public function debug(): void { $cpInfo = $this->getJavaClass()->getConstantPool()->getEntries(); - $methodAccessFlags = $this->debugTraces['method']->getAccessFlag(); - $accessFlags = []; - $accessFlag = new AccessFlag(); - foreach ($accessFlag->getValues() as $value) { - if (($methodAccessFlags & $value) !== 0) { - $accessFlags[] = strtolower(str_replace('_', '', $accessFlag->getName($value))); + foreach ($this->debugTraces as $debugTraces) { + $methodAccessFlags = $debugTraces['method']->getAccessFlag(); + $accessFlags = []; + $accessFlag = new AccessFlag(); + foreach ($accessFlag->getValues() as $value) { + if (($methodAccessFlags & $value) !== 0) { + $accessFlags[] = strtolower(str_replace('_', '', $accessFlag->getName($value))); + } } - } - $methodName = $cpInfo[$this->debugTraces['method']->getNameIndex()]->getString(); - $descriptor = Formatter::parseSignature($cpInfo[$this->debugTraces['method']->getDescriptorIndex()]->getString()); - $formattedArguments = str_replace( - '/', - '.', + $methodName = $cpInfo[$debugTraces['method']->getNameIndex()]->getString(); + $descriptor = Formatter::parseSignature($cpInfo[$debugTraces['method']->getDescriptorIndex()]->getString()); + $formattedArguments = str_replace( + '/', + '.', implode( - ', ', - array_map( - function ($argument) { - $arrayBrackets = str_repeat('[]', $argument['deep_array']); - if ($argument['type'] === 'class') { - return $argument['class_name'] . $arrayBrackets; - } - return $argument['type'] . $arrayBrackets; - }, - $descriptor['arguments'] + ', ', + array_map( + function ($argument) { + $arrayBrackets = str_repeat('[]', $argument['deep_array']); + if ($argument['type'] === 'class') { + return $argument['class_name'] . $arrayBrackets; + } + return $argument['type'] . $arrayBrackets; + }, + $descriptor['arguments'] + ) ) - ) - ); + ); - $type = $descriptor[0]['type']; - if ($type === 'class') { - $type = $descriptor[0]['class_name']; - } + $type = $descriptor[0]['type']; + if ($type === 'class') { + $type = $descriptor[0]['class_name']; + } - $methodAccessibility = implode(' ', $accessFlags); - - printf("[method]\n"); - printf(ltrim("$methodAccessibility $type $methodName($formattedArguments)\n", ' ')); - printf("\n"); - printf("[code]\n"); - - $codeCounter = 0; - printf( - "%s\n", - implode( - "\n", - array_map( - function ($codes) use (&$codeCounter) { - return implode( - ' ', - array_map( - function ($code) use (&$codeCounter) { - $isMnemonic = in_array($codeCounter, $this->debugTraces['mnemonic_indexes']); - $codeCounter++; - return ($isMnemonic ? "\e[1m\e[35m" : "") . "<0x{$code}>" . ($isMnemonic ? "\e[m" : ""); - }, - $codes - ) - ); - }, - array_chunk(str_split(bin2hex($this->debugTraces['raw_code']), 2), 20) - ) - ) - ); - printf("\n"); - printf("[executed]\n"); - - printf( - "% 8s | %-6.6s | %-20.20s | %-10.10s | %-15.15s\n", - "PC", - "OPCODE", - "MNEMONIC", - "OPERANDS", - "LOCAL STORAGE" - ); + $methodAccessibility = implode(' ', $accessFlags); - $line = sprintf( - "%8s+%8s+%22s+%12s+%17s\n", - "---------", - "--------", - "----------------------", - "------------", - "-----------------" - ); + printf("[method]\n"); + printf(ltrim("$methodAccessibility $type $methodName($formattedArguments)\n", ' ')); + printf("\n"); + printf("[code]\n"); - printf($line); + $codeCounter = 0; + printf( + "%s\n", + implode( + "\n", + array_map( + function ($codes) use (&$codeCounter, &$debugTraces) { + return implode( + ' ', + array_map( + function ($code) use (&$codeCounter, &$debugTraces) { + $isMnemonic = in_array($codeCounter, $debugTraces['mnemonic_indexes']); + $codeCounter++; + return ($isMnemonic ? "\e[1m\e[35m" : "") . "<0x{$code}>" . ($isMnemonic ? "\e[m" : ""); + }, + $codes + ) + ); + }, + array_chunk(str_split(bin2hex($debugTraces['raw_code']), 2), 20) + ) + ) + ); + printf("\n"); + printf("[executed]\n"); - foreach ($this->debugTraces['executed'] as [$opcode, $mnemonic, $localStorage, $stacks, $pointer]) { printf( - "% 8s | 0x%02X | %-20.20s | %-10.10s | %-15.15s\n", - (int) $pointer, - $opcode, - // Remove prefix - ltrim($mnemonic, '_'), - count($stacks), - count($localStorage) + "% 8s | %-6.6s | %-20.20s | %-10.10s | %-15.15s\n", + "PC", + "OPCODE", + "MNEMONIC", + "OPERANDS", + "LOCAL STORAGE" ); - } - printf($line); + $line = sprintf( + "%8s+%8s+%22s+%12s+%17s\n", + "---------", + "--------", + "----------------------", + "------------", + "-----------------" + ); + + printf($line); + + foreach ($debugTraces['executed'] as [$opcode, $mnemonic, $localStorage, $stacks, $pointer]) { + printf( + "% 8s | 0x%02X | %-20.20s | %-10.10s | %-15.15s\n", + (int) $pointer, + $opcode, + // Remove prefix + ltrim($mnemonic, '_'), + count($stacks), + count($localStorage) + ); + } + + printf($line); + } } } diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 04b877d4..6e082cab 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -62,10 +62,10 @@ public function __call($name, $arguments) rewind($handle); // debug code attribution with HEX - $this->debugTraces['raw_code'] = $codeAttribute->getCode(); - $this->debugTraces['method'] = $method; - $this->debugTraces['mnemonic_indexes'] = []; - $this->debugTraces['executed'] = []; + $debugTraces['raw_code'] = $codeAttribute->getCode(); + $debugTraces['method'] = $method; + $debugTraces['mnemonic_indexes'] = []; + $debugTraces['executed'] = []; $reader = new BinaryReader($handle); $localStorage = [ @@ -90,8 +90,8 @@ public function __call($name, $arguments) $pointer = $reader->getOffset() - 1; $fullName = '\\PHPJava\\Kernel\\Mnemonics\\' . $mnemonic; - $this->debugTraces['executed'][] = [$opcode, $mnemonic, $localStorage, $stacks, $pointer]; - $this->debugTraces['mnemonic_indexes'][] = $pointer; + $debugTraces['executed'][] = [$opcode, $mnemonic, $localStorage, $stacks, $pointer]; + $debugTraces['mnemonic_indexes'][] = $pointer; /** * @var OperationInterface|Accumulator|ConstantPool $executor @@ -102,10 +102,12 @@ public function __call($name, $arguments) $returnValue = $executor->execute(); if ($returnValue !== null) { + $this->debugTraces[] = $debugTraces; return $returnValue; } } + $this->debugTraces[] = $debugTraces; return null; } } diff --git a/src/core/jvm/parameters/Invoker.php b/src/core/jvm/parameters/Invoker.php index cd1d4da7..93b4a18c 100644 --- a/src/core/jvm/parameters/Invoker.php +++ b/src/core/jvm/parameters/Invoker.php @@ -3,5 +3,5 @@ final class Invoker { - const MAX_STACK_EXCEEDED = 1000; + const MAX_STACK_EXCEEDED = PHP_INT_MAX - 1; } diff --git a/src/imitation/java/lang/ClassNotFoundException.php b/src/imitation/java/lang/ClassNotFoundException.php new file mode 100644 index 00000000..e07cce9d --- /dev/null +++ b/src/imitation/java/lang/ClassNotFoundException.php @@ -0,0 +1,7 @@ +getMessage(); + } } diff --git a/src/kernel/core/Accumulator.php b/src/kernel/core/Accumulator.php index 321e73b0..286a7e58 100644 --- a/src/kernel/core/Accumulator.php +++ b/src/kernel/core/Accumulator.php @@ -144,6 +144,9 @@ public function setLocalStorage($index, $value) public function getLocalStorage($index) { + if (!isset($this->localStorage[(int) $index])) { + $this->localStorage[(int) $index] = null; + } return $this->localStorage[(int) $index]; } diff --git a/src/kernel/mnemonics/OperationInterface.php b/src/kernel/mnemonics/OperationInterface.php index d378cb09..fa7b03c1 100644 --- a/src/kernel/mnemonics/OperationInterface.php +++ b/src/kernel/mnemonics/OperationInterface.php @@ -3,5 +3,4 @@ interface OperationInterface { - public function execute(): void; } diff --git a/src/kernel/mnemonics/_aaload.php b/src/kernel/mnemonics/_aaload.php index e0cf4edb..363b0cbb 100644 --- a/src/kernel/mnemonics/_aaload.php +++ b/src/kernel/mnemonics/_aaload.php @@ -18,7 +18,7 @@ public function execute(): void $arrayref = $this->getStack(); if (!isset($arrayref[$index])) { - throw new \PHPJava\Imitation\java\lang\ArrayIndexOutOfBoundsException('Array Index ' . $index . ' out of bounds.'); + throw new \PHPJava\Imitation\java\lang\ArrayIndexOutOfBoundsException('Array index ' . $index . ' out of bounds. (Program Counter: ' . $this->getPointer() . ')'); } $this->pushStack($arrayref[$index]); } diff --git a/src/kernel/mnemonics/_areturn.php b/src/kernel/mnemonics/_areturn.php index 26be74a1..13a2a140 100644 --- a/src/kernel/mnemonics/_areturn.php +++ b/src/kernel/mnemonics/_areturn.php @@ -9,8 +9,8 @@ final class _areturn implements OperationInterface use \PHPJava\Kernel\Core\Accumulator; use \PHPJava\Kernel\Core\ConstantPool; - public function execute(): void + public function execute() { - return new \java\lang\String((string) $this->getStack()); + return new \PHPJava\Imitation\java\lang\_String((string) $this->getStack()); } } diff --git a/src/kernel/mnemonics/_invokestatic.php b/src/kernel/mnemonics/_invokestatic.php index ca52927b..80be605b 100644 --- a/src/kernel/mnemonics/_invokestatic.php +++ b/src/kernel/mnemonics/_invokestatic.php @@ -3,6 +3,8 @@ use PHPJava\Exceptions\NotImplementedException; use PHPJava\Utilities\BinaryTool; +use PHPJava\Utilities\ClassResolver; +use PHPJava\Utilities\Formatter; final class _invokestatic implements OperationInterface { @@ -12,26 +14,29 @@ final class _invokestatic implements OperationInterface public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->readUnsignedShort()]; - $methodName = $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString(); - - $signature = JavaClass::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); - - $arguments = array(); - - for ($i = 0; $i < $signature['argumentsCount']; $i++) { + $signature = Formatter::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); + $arguments = []; + $className = ClassResolver::resolve($cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString()); + for ($i = 0; $i < $signature['arguments_count']; $i++) { $arguments[] = $this->getStack(); } krsort($arguments); - + + if (!class_exists($className)) { + throw new \PHPJava\Imitation\java\lang\ClassNotFoundException($className . ' class does not exist.'); + } + // call invoker - $return = call_user_func_array(array( - $this->getInvoker(), - $methodName - ), $arguments); + $return = forward_static_call_array( + [ + $className, + $methodName + ], + $arguments + ); if ($signature[0]['type'] !== 'void') { $this->pushStack($return); diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index 46fa7be3..c46987db 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -1,6 +1,8 @@ getStack(); $invokerClassName = ClassResolver::resolve($class); + $result = call_user_func_array( [ - $invokerClass, + $invokerClass instanceof JavaClass + ? $invokerClass->getInvoker()->getDynamicMethods() + : $invokerClass, $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() ], $arguments diff --git a/src/kernel/mnemonics/_tableswitch.php b/src/kernel/mnemonics/_tableswitch.php index 4bcde897..a9557bdb 100644 --- a/src/kernel/mnemonics/_tableswitch.php +++ b/src/kernel/mnemonics/_tableswitch.php @@ -14,14 +14,15 @@ public function execute(): void $key = $this->getStack(); // padding data - $this->read(4 - ($this->getOffset()) % 4); + $paddingData = 4 - (($this->getOffset()) % 4); + if ($paddingData != 4) { + $this->read($paddingData); + } $offsets = []; $offsets['default'] = $this->readInt(); $lowByte = $this->readInt(); $highByte = $this->readInt(); - $count = $highByte - $lowByte + 1; - for ($i = $lowByte; $i <= $highByte; $i++) { $offsets[$i] = $this->readInt(); } diff --git a/tools/Test.class b/tools/Test.class index 910bf2432b24e3e606f9fc9efb189e9642a06879..54bdcd51df1d09ab9b19f6feee407a389aa54251 100644 GIT binary patch literal 3646 zcmai0eQ;FO760A0Z}+`@`vPH;4MaW+3b-4P0OF$s_ zgpa@`kq=QS@+F9ZP)+MdEieX36g##vwVh7;N5^)U{^4}C*l{}3&eTqaL5B2q-+ly= zRCo5?d+s^EbMCq4o^#**?d>a90nEiu4CrXK51cO$7XlL!PK-gsiH+D~kct{;L92$C z1jXg#ISmN|E;Q?ClVehLaUJa%HcO3W13$nP9UXGARmV0P>`T6|b1C_Y*#|Pe+m1yR z191EzOX%3HV~37T9Xq8LyL6;bZQvpF=y+aAck9@rW3LqL)9`|US<3gt|BI3||hF%t{%h=!vkj^R}kji}LZ+{6jICQvwdgsbW|h8vP5PU3Yb zd_!RDpfGd3)$NgJqg>fcr}n42_NP-9)2VI~r*N7(%U~F%)$~=vnC_=>aaxcx zd+s)!+MP}vNv95&ScFHJo80y({73*M-oo1gcIi-+iE1!KLb-@5chg%XkE3 z;gH32s0fr@YHfiYDn88R7=5RceXp}R{LFU z=J;P@P~J6bP{w;x=WT0aWBst_<%&nGk%`1{6dTJ60!vAGiDb&bEWZR%UJT`ZsOLEs z_zrsm3VSP~Hj$;&oN%JLeURKWNOtB(_gITMMB~L6SE-h$Mx;_L z#yyf$JFI@2#SUA2s8Tg7<_>F`vihA;W5PVgILGKs^Bl#PWRXo)-!RWHdY&WixFl4$ z14+oBNWxtvH~J1E-N=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Va||6Y48sLd;lU2<62ODq*dx%D zy}*M)JWgva6}{9@)L#3FqtwxieJ2Mwy<#ubS7b3cenB1)hKF`~agX6-?huT$vs_&| zJ;`Sa8dn`o7}P(7Q6X!oE8TzJn!v;KQ9l|_D=Ya_?#fT=e3Yv|u`cdFI@d8M;u_{O zI24!h{sUZghU^gUN%j%5zb9pgE5#LCGsNXXs(r)k=T8g3(%<7pa8w0@!F$}*NoR8oC{+Q(2GD&EhB9iz=7DN{?H{IKpi0fnImN~rrO3Iwx{v~C) zcYwXnnrjR!F4KJ&WZ$&9`STm2>Gtyph%{;CS_S)qrpi~!QOcv5!yly%Ihc#Ss7D?a zVK5f+8Z9C7ChKb{OTtfb875&lDzE~TScw`m(sLCWu$mrCB-T*77VG%hg!R~t4cLW^ zH~{}<9L5$LVKX?6tq8C)oW(YLM&vxN@&)X~*F?YLrT-p#@gw%(2KM77-okCXjXxQp z4TnU>I}(G#l8mF0fnzcTtx}8+r39yBGEVc$oRwKPC)M~==HYW`z!$Ov=f&^G1!=-X z*@|yvFD^*{m*o$onz;3v6-8*&G?w0Qig72!9n7{6;1aZxK5;d%Y7%|KAA z5r?)+oZ237X$QH#E0%UzqO@-$TD!vi2Z`72h}RJ(K1T}obV+3EwTj+wJ8$m<5`u z>bs+OmB5=B*6_xKg+ynERHS!^E=sIy)h0p}h$OZINE#fH4ofl-%{@W7h0e`@)<#1t zQU2Gc9PO*o$we&OaQl;qxZ|7b_-<;ZQ?Fsh EKLznz5C8xG diff --git a/tools/test.java b/tools/test.java index 7408d20d..1d75a51b 100644 --- a/tools/test.java +++ b/tools/test.java @@ -112,7 +112,8 @@ public static void main (String[] args) { // new instance Test _a = new Test(); - + System.out.println(_a.testMe(Integer.parseInt(args[1]), "Text", 1, 2, 3, Integer.parseInt(args[2]))); + System.out.println("なんでや〜〜〜〜〜〜〜〜"); // test call // _a.javaTest(); @@ -279,7 +280,7 @@ public static void main (String[] args) { } - public static String test (int n, String m, int l, int i, int v, int k) { + public String testMe (int n, String m, int l, int i, int v, int k) { int j = 1; diff --git a/tools/test.php b/tools/test.php index ae65de31..7506d6f9 100644 --- a/tools/test.php +++ b/tools/test.php @@ -1,12 +1,13 @@ getStaticMethods()->main([999, 222, 3333]); -$invoker->debug(); +$javaClass->getInvoker()->getStaticMethods()->main([111, 222, 333]); + +$javaClass->getInvoker()->debug(); From 496722c22504192b88c3b99a354173176d6eec3c Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 22:21:27 +0900 Subject: [PATCH 45/96] WIP commit --- src/core/JavaClass.php | 121 ++++++++++++++++++++++ src/core/JavaClassInvoker.php | 121 +--------------------- src/core/jvm/invoker/Invokable.php | 8 +- src/core/jvm/invoker/InvokerInterface.php | 2 +- tools/test.php | 2 +- 5 files changed, 130 insertions(+), 124 deletions(-) diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index d9125fc2..9adb3bda 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -8,7 +8,9 @@ use PHPJava\Core\JVM\ConstantPool; use PHPJava\Core\JVM\Validations\MagicByte; use PHPJava\Exceptions\ValidatorException; +use PHPJava\Kernel\Maps\AccessFlag; use PHPJava\Kernel\Structures\_Utf8; +use PHPJava\Utilities\Formatter; class JavaClass { @@ -53,6 +55,8 @@ class JavaClass */ private $className = null; + private $debugTraces = []; + /** * JavaClass constructor. * @param JavaClassReader $reader @@ -138,4 +142,121 @@ public function getInvoker(): JavaClassInvoker { return new JavaClassInvoker($this); } + + public function appendDebug($log) + { + $this->debugTraces[] = $log; + return $this; + } + + public function debug(): void + { + $cpInfo = $this->getConstantPool()->getEntries(); + foreach ($this->debugTraces as $debugTraces) { + $methodAccessFlags = $debugTraces['method']->getAccessFlag(); + $accessFlags = []; + $accessFlag = new AccessFlag(); + foreach ($accessFlag->getValues() as $value) { + if (($methodAccessFlags & $value) !== 0) { + $accessFlags[] = strtolower(str_replace('_', '', $accessFlag->getName($value))); + } + } + + $methodName = $cpInfo[$debugTraces['method']->getNameIndex()]->getString(); + $descriptor = Formatter::parseSignature($cpInfo[$debugTraces['method']->getDescriptorIndex()]->getString()); + $formattedArguments = str_replace( + '/', + '.', + implode( + ', ', + array_map( + function ($argument) { + $arrayBrackets = str_repeat('[]', $argument['deep_array']); + if ($argument['type'] === 'class') { + return $argument['class_name'] . $arrayBrackets; + } + return $argument['type'] . $arrayBrackets; + }, + $descriptor['arguments'] + ) + ) + ); + + + $type = $descriptor[0]['type']; + if ($type === 'class') { + $type = $descriptor[0]['class_name']; + } + + $type = str_replace('/', '.', $type); + + $methodAccessibility = implode(' ', $accessFlags); + + printf("[method]\n"); + printf(ltrim("$methodAccessibility $type $methodName($formattedArguments)\n", ' ')); + printf("\n"); + printf("[code]\n"); + + $codeCounter = 0; + printf( + "%s\n", + implode( + "\n", + array_map( + function ($codes) use (&$codeCounter, &$debugTraces) { + return implode( + ' ', + array_map( + function ($code) use (&$codeCounter, &$debugTraces) { + $isMnemonic = in_array($codeCounter, $debugTraces['mnemonic_indexes']); + $codeCounter++; + return ($isMnemonic ? "\e[1m\e[35m" : "") . "<0x{$code}>" . ($isMnemonic ? "\e[m" : ""); + }, + $codes + ) + ); + }, + array_chunk(str_split(bin2hex($debugTraces['raw_code']), 2), 20) + ) + ) + ); + printf("\n"); + printf("[executed]\n"); + + printf( + "% 8s | %-6.6s | %-20.20s | %-10.10s | %-15.15s\n", + "PC", + "OPCODE", + "MNEMONIC", + "OPERANDS", + "LOCAL STORAGE" + ); + + $line = sprintf( + "%8s+%8s+%22s+%12s+%17s\n", + "---------", + "--------", + "----------------------", + "------------", + "-----------------" + ); + + printf($line); + + foreach ($debugTraces['executed'] as [$opcode, $mnemonic, $localStorage, $stacks, $pointer]) { + printf( + "% 8s | 0x%02X | %-20.20s | %-10.10s | %-15.15s\n", + (int) $pointer, + $opcode, + // Remove prefix + ltrim($mnemonic, '_'), + count($stacks), + count($localStorage) + ); + } + + printf($line); + printf("\n"); + } + } } diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 647050ae..8fe43137 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -25,9 +25,7 @@ class JavaClassInvoker private $dynamicFields = []; private $staticFields = []; - private $debugTraces = []; - - private static $singleton = []; + private $debugTraces ; public function __construct(JavaClass $javaClass) { @@ -75,8 +73,7 @@ public function getDynamicMethods(): InvokerInterface { return new JVM\Invoker\DynamicMethodInvoker( $this, - $this->dynamicMethods, - $this->debugTraces + $this->dynamicMethods ); } @@ -84,16 +81,14 @@ public function getStaticMethods(): InvokerInterface { return new JVM\Invoker\StaticMethodInvoker( $this, - $this->staticMethods, - $this->debugTraces + $this->staticMethods ); } public function getDynamicFields(): FieldInterface { return new JVM\Field\DynamicField( - $this, - $this->dynamicFields + $this ); } @@ -102,112 +97,4 @@ public function getStaticFields(): JVM\Field\StaticField return new JVM\Field\StaticField(); } - public function debug(): void - { - $cpInfo = $this->getJavaClass()->getConstantPool()->getEntries(); - - foreach ($this->debugTraces as $debugTraces) { - $methodAccessFlags = $debugTraces['method']->getAccessFlag(); - $accessFlags = []; - $accessFlag = new AccessFlag(); - foreach ($accessFlag->getValues() as $value) { - if (($methodAccessFlags & $value) !== 0) { - $accessFlags[] = strtolower(str_replace('_', '', $accessFlag->getName($value))); - } - } - - $methodName = $cpInfo[$debugTraces['method']->getNameIndex()]->getString(); - $descriptor = Formatter::parseSignature($cpInfo[$debugTraces['method']->getDescriptorIndex()]->getString()); - $formattedArguments = str_replace( - '/', - '.', - implode( - ', ', - array_map( - function ($argument) { - $arrayBrackets = str_repeat('[]', $argument['deep_array']); - if ($argument['type'] === 'class') { - return $argument['class_name'] . $arrayBrackets; - } - return $argument['type'] . $arrayBrackets; - }, - $descriptor['arguments'] - ) - ) - ); - - - $type = $descriptor[0]['type']; - if ($type === 'class') { - $type = $descriptor[0]['class_name']; - } - - $methodAccessibility = implode(' ', $accessFlags); - - printf("[method]\n"); - printf(ltrim("$methodAccessibility $type $methodName($formattedArguments)\n", ' ')); - printf("\n"); - printf("[code]\n"); - - $codeCounter = 0; - printf( - "%s\n", - implode( - "\n", - array_map( - function ($codes) use (&$codeCounter, &$debugTraces) { - return implode( - ' ', - array_map( - function ($code) use (&$codeCounter, &$debugTraces) { - $isMnemonic = in_array($codeCounter, $debugTraces['mnemonic_indexes']); - $codeCounter++; - return ($isMnemonic ? "\e[1m\e[35m" : "") . "<0x{$code}>" . ($isMnemonic ? "\e[m" : ""); - }, - $codes - ) - ); - }, - array_chunk(str_split(bin2hex($debugTraces['raw_code']), 2), 20) - ) - ) - ); - printf("\n"); - printf("[executed]\n"); - - printf( - "% 8s | %-6.6s | %-20.20s | %-10.10s | %-15.15s\n", - "PC", - "OPCODE", - "MNEMONIC", - "OPERANDS", - "LOCAL STORAGE" - ); - - $line = sprintf( - "%8s+%8s+%22s+%12s+%17s\n", - "---------", - "--------", - "----------------------", - "------------", - "-----------------" - ); - - printf($line); - - foreach ($debugTraces['executed'] as [$opcode, $mnemonic, $localStorage, $stacks, $pointer]) { - printf( - "% 8s | 0x%02X | %-20.20s | %-10.10s | %-15.15s\n", - (int) $pointer, - $opcode, - // Remove prefix - ltrim($mnemonic, '_'), - count($stacks), - count($localStorage) - ); - } - - printf($line); - } - } } diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 6e082cab..ad0cd6be 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -21,13 +21,11 @@ trait Invokable { private $javaClassInvoker; private $methods = []; - private $debugTraces; - public function __construct(JavaClassInvoker $javaClassInvoker, array $methods, array &$debugTraces) + public function __construct(JavaClassInvoker $javaClassInvoker, array $methods) { $this->javaClassInvoker = $javaClassInvoker; $this->methods = $methods; - $this->debugTraces = &$debugTraces; } public function __call($name, $arguments) @@ -102,12 +100,12 @@ public function __call($name, $arguments) $returnValue = $executor->execute(); if ($returnValue !== null) { - $this->debugTraces[] = $debugTraces; + $this->javaClassInvoker->getJavaClass()->appendDebug($debugTraces); return $returnValue; } } - $this->debugTraces[] = $debugTraces; + $this->javaClassInvoker->getJavaClass()->appendDebug($debugTraces); return null; } } diff --git a/src/core/jvm/invoker/InvokerInterface.php b/src/core/jvm/invoker/InvokerInterface.php index 10808853..a6115f29 100644 --- a/src/core/jvm/invoker/InvokerInterface.php +++ b/src/core/jvm/invoker/InvokerInterface.php @@ -5,6 +5,6 @@ interface InvokerInterface { - public function __construct(JavaClassInvoker $javaClassInvoker, array $methods, array &$debugTraces); + public function __construct(JavaClassInvoker $javaClassInvoker, array $methods); public function __call($name, $arguments); } diff --git a/tools/test.php b/tools/test.php index 7506d6f9..e00e5850 100644 --- a/tools/test.php +++ b/tools/test.php @@ -10,4 +10,4 @@ ); $javaClass->getInvoker()->getStaticMethods()->main([111, 222, 333]); -$javaClass->getInvoker()->debug(); +$javaClass->debug(); From 5f672423769700172731bac17d27470202a4651d Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 23:27:21 +0900 Subject: [PATCH 46/96] WIP commit --- src/core/jvm/invoker/Invokable.php | 11 +++++------ tools/Test.class | Bin 3646 -> 3605 bytes tools/test.php | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index ad0cd6be..c5e37274 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -66,12 +66,11 @@ public function __call($name, $arguments) $debugTraces['executed'] = []; $reader = new BinaryReader($handle); - $localStorage = [ - $arguments[0] ?? null, - $arguments[1] ?? null, - $arguments[2] ?? null, - $arguments[3] ?? null, - ]; + $localStorage = $arguments; + array_unshift( + $localStorage, + $this->javaClassInvoker->getJavaClass() + ); $stacks = []; $mnemonicMap = new OpCode(); diff --git a/tools/Test.class b/tools/Test.class index 54bdcd51df1d09ab9b19f6feee407a389aa54251..1628a232741cda255bb109998b0d66384efdb257 100644 GIT binary patch delta 46 zcmdldGgW4TEiX?l0}}%W0|P@Kiy8amNZvp}Mh15vmkTJ&z$nYW%&0o~3U3ww!1)Jn delta 87 zcmbO#vrlG&Ew9Wp1||j$1_p*i7BhBHb^)%%3_LCDj6k&f|L4h`yn$Lw4DLW_F$Pu! l21Z#1W=44iE=ENLULY;ZsLBuplw)UL`U8~UpS+qk3jn;A4mgetInvoker()->getStaticMethods()->main([111, 222, 333]); +// var_dump($javaClass->getInvoker()->getDynamicMethods()->testMe(1111, 'いかりのねこ', 3333, 4444, 5555, 7777)); +$javaClass->getInvoker()->getStaticMethods()->main([99999, 55555, 333333]); $javaClass->debug(); From c2a22d5721fa6b2be440552c08eb8727cdeea942 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Sun, 24 Feb 2019 23:32:08 +0900 Subject: [PATCH 47/96] WIP commit --- src/core/jvm/invoker/DynamicMethodInvoker.php | 5 +++++ src/core/jvm/invoker/Invokable.php | 11 +++++++---- src/core/jvm/invoker/InvokerInterface.php | 1 + src/core/jvm/invoker/StaticMethodInvoker.php | 5 +++++ src/kernel/mnemonics/_invokevirtual.php | 1 + 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/core/jvm/invoker/DynamicMethodInvoker.php b/src/core/jvm/invoker/DynamicMethodInvoker.php index f5b4b0b7..b381d551 100644 --- a/src/core/jvm/invoker/DynamicMethodInvoker.php +++ b/src/core/jvm/invoker/DynamicMethodInvoker.php @@ -4,4 +4,9 @@ class DynamicMethodInvoker implements InvokerInterface { use Invokable; + + public function isDynamic(): bool + { + return true; + } } diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index c5e37274..139edb77 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -67,10 +67,13 @@ public function __call($name, $arguments) $reader = new BinaryReader($handle); $localStorage = $arguments; - array_unshift( - $localStorage, - $this->javaClassInvoker->getJavaClass() - ); + + if ($this->isDynamic()) { + array_unshift( + $localStorage, + $this->javaClassInvoker->getJavaClass() + ); + } $stacks = []; $mnemonicMap = new OpCode(); diff --git a/src/core/jvm/invoker/InvokerInterface.php b/src/core/jvm/invoker/InvokerInterface.php index a6115f29..d17d514b 100644 --- a/src/core/jvm/invoker/InvokerInterface.php +++ b/src/core/jvm/invoker/InvokerInterface.php @@ -7,4 +7,5 @@ interface InvokerInterface { public function __construct(JavaClassInvoker $javaClassInvoker, array $methods); public function __call($name, $arguments); + public function isDynamic(): bool; } diff --git a/src/core/jvm/invoker/StaticMethodInvoker.php b/src/core/jvm/invoker/StaticMethodInvoker.php index 4ea8209c..4d990a40 100644 --- a/src/core/jvm/invoker/StaticMethodInvoker.php +++ b/src/core/jvm/invoker/StaticMethodInvoker.php @@ -4,4 +4,9 @@ class StaticMethodInvoker implements InvokerInterface { use Invokable; + + public function isDynamic(): bool + { + return false; + } } diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index c46987db..696e94c5 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -27,6 +27,7 @@ public function execute(): void for ($i = 0; $i < $signature['arguments_count']; $i++) { $arguments[] = $this->getStack(); } + krsort($arguments); $invokerClass = $this->getStack(); $invokerClassName = ClassResolver::resolve($class); From 518ce9060eb09136b48c2c7469f2a5de203276ac Mon Sep 17 00:00:00 2001 From: memory-agape Date: Mon, 25 Feb 2019 00:31:11 +0900 Subject: [PATCH 48/96] WIP commit --- src/core/JavaClassInvoker.php | 4 +- src/core/jvm/invoker/Invokable.php | 20 +++++++++- src/core/jvm/invoker/InvokerInterface.php | 2 +- src/core/jvm/parameters/Invoker.php | 2 +- .../java/lang/NoSuchMethodException.php | 7 ++++ src/imitation/java/lang/StringBuilder.php | 6 +-- src/imitation/phpjava/extended/_Object.php | 11 ++++++ src/kernel/mnemonics/_invokespecial.php | 37 +++++++++++-------- src/kernel/mnemonics/_invokevirtual.php | 21 ++++++----- tools/test.php | 5 ++- 10 files changed, 80 insertions(+), 35 deletions(-) create mode 100644 src/imitation/java/lang/NoSuchMethodException.php diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 8fe43137..ac7066f0 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -25,7 +25,7 @@ class JavaClassInvoker private $dynamicFields = []; private $staticFields = []; - private $debugTraces ; + private $debugTraces; public function __construct(JavaClass $javaClass) { @@ -60,7 +60,7 @@ public function __construct(JavaClass $javaClass) // call if (isset($this->staticMethods[''])) { - $this->getStaticMethods()->{''}(); + $this->getStaticMethods()->call(''); } } diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 139edb77..8b9c6d43 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -28,7 +28,16 @@ public function __construct(JavaClassInvoker $javaClassInvoker, array $methods) $this->methods = $methods; } - public function __call($name, $arguments) + /** + * @param string $name + * @param mixed ...$arguments + * @return null + * @throws IllegalJavaClassException + * @throws RuntimeException + * @throws UndefinedMethodException + * @throws UndefinedOpCodeException + */ + public function call(string $name, ...$arguments) { $getCodeAttribute = function ($attributes): ?CodeAttribute { foreach ($attributes as $attribute) { @@ -84,6 +93,7 @@ public function __call($name, $arguments) } $opcode = $reader->readUnsignedByte(); $mnemonic = $mnemonicMap->getName($opcode); + if ($mnemonic === null) { throw new UndefinedOpCodeException('Undefined OpCode ' . sprintf('0x%X', $cursor) . '.'); } @@ -98,7 +108,13 @@ public function __call($name, $arguments) */ $executor = new $fullName(); $executor->setConstantPool($this->javaClassInvoker->getJavaClass()->getConstantPool()); - $executor->setParameters($this->javaClassInvoker, $reader, $localStorage, $stacks, $pointer); + $executor->setParameters( + $this->javaClassInvoker, + $reader, + $localStorage, + $stacks, + $pointer + ); $returnValue = $executor->execute(); if ($returnValue !== null) { diff --git a/src/core/jvm/invoker/InvokerInterface.php b/src/core/jvm/invoker/InvokerInterface.php index d17d514b..30320939 100644 --- a/src/core/jvm/invoker/InvokerInterface.php +++ b/src/core/jvm/invoker/InvokerInterface.php @@ -6,6 +6,6 @@ interface InvokerInterface { public function __construct(JavaClassInvoker $javaClassInvoker, array $methods); - public function __call($name, $arguments); + public function call(string $name, ...$arguments); public function isDynamic(): bool; } diff --git a/src/core/jvm/parameters/Invoker.php b/src/core/jvm/parameters/Invoker.php index 93b4a18c..6bb3dec1 100644 --- a/src/core/jvm/parameters/Invoker.php +++ b/src/core/jvm/parameters/Invoker.php @@ -3,5 +3,5 @@ final class Invoker { - const MAX_STACK_EXCEEDED = PHP_INT_MAX - 1; + const MAX_STACK_EXCEEDED = 9999; } diff --git a/src/imitation/java/lang/NoSuchMethodException.php b/src/imitation/java/lang/NoSuchMethodException.php new file mode 100644 index 00000000..ca696741 --- /dev/null +++ b/src/imitation/java/lang/NoSuchMethodException.php @@ -0,0 +1,7 @@ +sequence; } - public function __toString() + public function __toString(): string { return $this->sequence; } diff --git a/src/imitation/phpjava/extended/_Object.php b/src/imitation/phpjava/extended/_Object.php index f4f3d6df..58dedabf 100644 --- a/src/imitation/phpjava/extended/_Object.php +++ b/src/imitation/phpjava/extended/_Object.php @@ -1,8 +1,19 @@ ') { + return; + } + throw new NoSuchMethodException($name . ' does not exist on ' . get_class($this)); + } + public function clone(): _Object { return clone $this; diff --git a/src/kernel/mnemonics/_invokespecial.php b/src/kernel/mnemonics/_invokespecial.php index 6020144d..38661333 100644 --- a/src/kernel/mnemonics/_invokespecial.php +++ b/src/kernel/mnemonics/_invokespecial.php @@ -1,6 +1,7 @@ getConstantPool()->getEntries(); - $cp = $cpInfo[$this->readUnsignedShort()]; - $nameAndTypeIndex = $cpInfo[$cp->getNameAndTypeIndex()]; - - // signature $signature = Formatter::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); - - $invokerClassName = $this->getStack(); + $invokerClass = $this->getStack(); $arguments = []; @@ -29,16 +25,25 @@ public function execute(): void $arguments[] = $this->getStack(); } + krsort($arguments); + $methodName = $cpInfo[$nameAndTypeIndex->getNameIndex()]->getString(); -// var_dump($methodName); - -// $result = call_user_func_array( -// [$this->javaClassInvoker->getDynamicMethods(), $methodName], -// $arguments -// ); -// -// if ($signature[0]['type'] !== 'void') { -// $this->pushStack($result); -// } + + if ($invokerClass instanceof JavaClass) { +// $result = $invokerClass->getInvoker()->getDynamicMethods() +// ->call($methodName, ...$arguments); + } else { + $result = call_user_func_array( + [ + $invokerClass, + $methodName + ], + $arguments + ); + } + + if ($signature[0]['type'] !== 'void') { + $this->pushStack($result); + } } } diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index 696e94c5..4c2f58ff 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -30,16 +30,19 @@ public function execute(): void krsort($arguments); $invokerClass = $this->getStack(); $invokerClassName = ClassResolver::resolve($class); + $methodName = $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString(); - $result = call_user_func_array( - [ - $invokerClass instanceof JavaClass - ? $invokerClass->getInvoker()->getDynamicMethods() - : $invokerClass, - $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() - ], - $arguments - ); + if ($invokerClass instanceof JavaClass) { + $result = $invokerClass->getInvoker()->getDynamicMethods()->call($methodName, ...$arguments); + } else { + $result = call_user_func_array( + [ + $invokerClass, + $methodName + ], + $arguments + ); + } if ($signature[0]['type'] !== 'void') { $this->pushStack($result); diff --git a/tools/test.php b/tools/test.php index f38185fd..187ff245 100644 --- a/tools/test.php +++ b/tools/test.php @@ -9,6 +9,9 @@ new \PHPJava\Core\JavaClassReader(__DIR__ . '/Test.class') ); // var_dump($javaClass->getInvoker()->getDynamicMethods()->testMe(1111, 'いかりのねこ', 3333, 4444, 5555, 7777)); -$javaClass->getInvoker()->getStaticMethods()->main([99999, 55555, 333333]); +$javaClass->getInvoker()->getStaticMethods()->call( + 'main', + [99999, 55555, 333333] +); $javaClass->debug(); From f8c6719660981918518fdd94b28d693e64fb2a1e Mon Sep 17 00:00:00 2001 From: memory-agape Date: Mon, 25 Feb 2019 00:42:48 +0900 Subject: [PATCH 49/96] WIP commit --- src/core/jvm/field/StaticField.php | 17 +++++++++++++++-- src/core/jvm/invoker/Invokable.php | 4 ++-- .../java/lang/NoSuchFieldException.php | 7 +++++++ src/kernel/mnemonics/_getstatic.php | 2 +- src/kernel/mnemonics/_putstatic.php | 2 +- tools/test.php | 3 +++ 6 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 src/imitation/java/lang/NoSuchFieldException.php diff --git a/src/core/jvm/field/StaticField.php b/src/core/jvm/field/StaticField.php index a91340eb..fe6fa126 100644 --- a/src/core/jvm/field/StaticField.php +++ b/src/core/jvm/field/StaticField.php @@ -2,16 +2,29 @@ namespace PHPJava\Core\JVM\Field; use PHPJava\Core\JavaClassInvoker; +use PHPJava\Imitation\java\lang\_String; +use PHPJava\Imitation\java\lang\NoSuchFieldException; class StaticField { private static $fields = []; - public function __get($name) + /** + * @param $name + * @return mixed + * @throws NoSuchFieldException + */ + public function get($name) { + if (!isset(static::$fields[$name])) { + throw new NoSuchFieldException('Get to undefined static field ' . $name); + } + if (static::$fields[$name] instanceof _String) { + return (string) static::$fields[$name]; + } return static::$fields[$name]; } - public function __set($name, $value) + public function set($name, $value) { static::$fields[$name] = $value; } diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 8b9c6d43..2a1a84b8 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -55,7 +55,7 @@ public function call(string $name, ...$arguments) */ $method = $this->methods[$name] ?? null; if ($method === null) { - throw new UndefinedMethodException('Undefined ' . $name . ' method.'); + throw new UndefinedMethodException('Call to undefined ' . $name . ' method.'); } $codeAttribute = $getCodeAttribute($method->getAttributes()); @@ -95,7 +95,7 @@ public function call(string $name, ...$arguments) $mnemonic = $mnemonicMap->getName($opcode); if ($mnemonic === null) { - throw new UndefinedOpCodeException('Undefined OpCode ' . sprintf('0x%X', $cursor) . '.'); + throw new UndefinedOpCodeException('Call to undefined OpCode ' . sprintf('0x%X', $cursor) . '.'); } $pointer = $reader->getOffset() - 1; diff --git a/src/imitation/java/lang/NoSuchFieldException.php b/src/imitation/java/lang/NoSuchFieldException.php new file mode 100644 index 00000000..75d45e84 --- /dev/null +++ b/src/imitation/java/lang/NoSuchFieldException.php @@ -0,0 +1,7 @@ +getNameIndex()]->getString(); - $this->pushStack($this->javaClassInvoker->getStaticFields()->$fieldName); + $this->pushStack($this->javaClassInvoker->getStaticFields()->get($fieldName)); return; } } diff --git a/src/kernel/mnemonics/_putstatic.php b/src/kernel/mnemonics/_putstatic.php index 1b35325c..01063eda 100644 --- a/src/kernel/mnemonics/_putstatic.php +++ b/src/kernel/mnemonics/_putstatic.php @@ -18,6 +18,6 @@ public function execute(): void $class = $cpInfo[$cp->getNameAndTypeIndex()]; $fieldName = $cpInfo[$class->getNameIndex()]->getString(); - ($this->javaClassInvoker->getStaticFields())->$fieldName = $this->getStack(); + $this->javaClassInvoker->getStaticFields()->set($fieldName, $this->getStack()); } } diff --git a/tools/test.php b/tools/test.php index 187ff245..0cbf8aef 100644 --- a/tools/test.php +++ b/tools/test.php @@ -14,4 +14,7 @@ [99999, 55555, 333333] ); +var_dump($javaClass->getInvoker()->getStaticFields()->get('c')); +var_dump($javaClass->getInvoker()->getStaticFields()->get('b')); + $javaClass->debug(); From 5d404e163a1f972ace578df5e651da39b9f745e9 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Mon, 25 Feb 2019 01:24:59 +0900 Subject: [PATCH 50/96] WIP --- src/core/JavaClassInvoker.php | 11 +++++---- src/core/jvm/field/StaticField.php | 7 ++++++ src/core/jvm/invoker/Invokable.php | 36 +++++++++++++++++++++++++++-- tools/Test.class | Bin 3605 -> 3751 bytes tools/test.java | 4 ++++ 5 files changed, 52 insertions(+), 6 deletions(-) diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index ac7066f0..235e7bbf 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -39,9 +39,9 @@ public function __construct(JavaClass $javaClass) $methodName = $cpInfo[$methodInfo->getNameIndex()]->getString(); if (($methodInfo->getAccessFlag() & AccessFlag::_Static) !== 0) { - $this->staticMethods[$methodName] = $methodInfo; + $this->staticMethods[$methodName][] = $methodInfo; } elseif ($methodInfo->getAccessFlag() === 0 || ($methodInfo->getAccessFlag() & AccessFlag::_Public) !== 0) { - $this->dynamicMethods[$methodName] = $methodInfo; + $this->dynamicMethods[$methodName][] = $methodInfo; } } @@ -88,13 +88,16 @@ public function getStaticMethods(): InvokerInterface public function getDynamicFields(): FieldInterface { return new JVM\Field\DynamicField( - $this + $this, + [] ); } public function getStaticFields(): JVM\Field\StaticField { - return new JVM\Field\StaticField(); + return new JVM\Field\StaticField( + $this + ); } } diff --git a/src/core/jvm/field/StaticField.php b/src/core/jvm/field/StaticField.php index fe6fa126..89b80f1e 100644 --- a/src/core/jvm/field/StaticField.php +++ b/src/core/jvm/field/StaticField.php @@ -9,6 +9,13 @@ class StaticField { private static $fields = []; + private $javaClassInvoker; + + public function __construct(JavaClassInvoker $javaClassInvoker) + { + $this->javaClassInvoker = $javaClassInvoker; + } + /** * @param $name * @return mixed diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 2a1a84b8..5e27a103 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -16,6 +16,7 @@ use PHPJava\Kernel\Maps\OpCode; use PHPJava\Kernel\Mnemonics\OperationInterface; use PHPJava\Kernel\Structures\_MethodInfo; +use PHPJava\Utilities\Formatter; trait Invokable { @@ -50,14 +51,45 @@ public function call(string $name, ...$arguments) } return null; }; + /** * @var _MethodInfo|null $method */ - $method = $this->methods[$name] ?? null; - if ($method === null) { + $methods = $this->methods[$name] ?? null; + if ($methods === null) { throw new UndefinedMethodException('Call to undefined ' . $name . ' method.'); } + $constantPool = $this->javaClassInvoker + ->getJavaClass() + ->getConstantPool() + ->getEntries(); + + $method = $methods[0]; + + // TODO: Refactor find to valid method. + // will implement to be compatible to multiple variable arguments size. + // And will be applied NoSuchMethodException when cannot find method. + if ($name === 'main') { + // Find same method + foreach ($methods as $method) { + $signature = Formatter::parseSignature($constantPool[$method->getDescriptorIndex()]->getString()); + + // compare passed arguments + foreach ($signature['arguments'] as $signatureArgument) { + foreach ($arguments as $argument) { + var_dump(gettype($argument), $signatureArgument); + if ($argument === $signatureArgument) { + + } + } + } + var_dump(); + } + + exit(); + } + $codeAttribute = $getCodeAttribute($method->getAttributes()); if ($codeAttribute === null) { diff --git a/tools/Test.class b/tools/Test.class index 1628a232741cda255bb109998b0d66384efdb257..abe14f890db1a420e1b87a4deb1c2e0388146e5b 100644 GIT binary patch delta 1380 zcmaizYjaaY7{`Bml9Sz@p3*|89qom5R9cHtMaS`mN{hBBB0`aZMeRu&+lDmM5|H90 zD0shO1VzOQs8zrVWUMnf;|K7CU%*e`Yu`B7F+O{mR;TK)lila+KEHjQ|L#6H+Bn^m z|LM=~e*|vetcM}(md;hF^L>qz6)a^}1sTRY`O13iW2lm^C_Q&)BUnt(Gn)N6}qqi8Wo?BXbW&MwcjB))VxG-u_r~{%>!sJkfGl-@rZA zEBs|*?LMdBtc(iF#>7Iij2pRE#yQR*V!0JxF5=okZqou+j(7Q2^IX0ha7_r_w*Zy{ zwthVimbu%6*vys%?*9bZhJn`fJz#Zj|t)I2PcKiG1CB^PizHG>r;;&}hu z6MpYh@({n%P@<8_e|ZBHQp)w!&=F2 zy7XHiQMEbmgr#ta6cnn7h+2WCTBs6RtFFWzRpZQxqdL5eR5|WVQh&C38qeeYK;@3_ z@RzNfVM%*r^$cw@RL|g@6aQSLg*B_%X;7;~kNk7XQJNWW!m^AtxP!65MWv}$i}aDX g@|RF6!-R6lrpOh`ZZC56q69)mMWkX>Xos=C0HFEDSpWb4 delta 1163 zcmZuvSx*!}5dL~*XS;V8hze+sLlO_jVuC?qgopwn2!fmng2yh0Ecdk{0=nKeDvYS$ zfj63H6gI}h2Y-M+#KcG63=-Gs;abs7y1S~rudeQzh#iUXef|CU3xF+nqeH->1tvq; zR9Q@y1Iy9qKogpEl3H}MqK%_nk~*Z)$A+~RI)NG_^rs;~7L zc!)<5d_1fsC5+<U`3cM!0p%lXlcY1`(y2qCQ-ckhEPIeAz05v)T+|{OPCpPq_I&KM&`EoE zxTP7q?l~w*gua1)m=rl1E`RQm6cg9p(K4+lC=&FRN|oI`G4?AmF4>L zLzlm>VH2eY0 CU8xNK diff --git a/tools/test.java b/tools/test.java index 1d75a51b..13ff1bb9 100644 --- a/tools/test.java +++ b/tools/test.java @@ -294,6 +294,10 @@ public String testMe (int n, String m, int l, int i, int v, int k) { } + public static void main (int[] args) { + System.out.println("Called int type main " + args[0]); + } + private int testPrivateInteger (int value) { return value + 1 * 2 + 3; } From 471bb06231cec6790e0b5180678e03f7915dea14 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Mon, 25 Feb 2019 16:03:05 +0900 Subject: [PATCH 51/96] WIP commit --- src/core/jvm/invoker/Invokable.php | 48 ++++++++-------- src/exceptions/TypeException.php | 6 ++ src/utilities/Formatter.php | 39 +++++++------ src/utilities/TypeResolver.php | 92 ++++++++++++++++++++++++++++++ 4 files changed, 146 insertions(+), 39 deletions(-) create mode 100644 src/exceptions/TypeException.php create mode 100644 src/utilities/TypeResolver.php diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 5e27a103..1437efe6 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -8,6 +8,7 @@ use PHPJava\Exceptions\RuntimeException; use PHPJava\Exceptions\UndefinedMethodException; use PHPJava\Exceptions\UndefinedOpCodeException; +use PHPJava\Imitation\java\lang\NoSuchMethodException; use PHPJava\Kernel\Attributes\AttributeInfo; use PHPJava\Kernel\Attributes\AttributeInterface; use PHPJava\Kernel\Attributes\CodeAttribute; @@ -17,6 +18,7 @@ use PHPJava\Kernel\Mnemonics\OperationInterface; use PHPJava\Kernel\Structures\_MethodInfo; use PHPJava\Utilities\Formatter; +use PHPJava\Utilities\TypeResolver; trait Invokable { @@ -55,8 +57,8 @@ public function call(string $name, ...$arguments) /** * @var _MethodInfo|null $method */ - $methods = $this->methods[$name] ?? null; - if ($methods === null) { + $methodReferences = $this->methods[$name] ?? null; + if ($methodReferences === null) { throw new UndefinedMethodException('Call to undefined ' . $name . ' method.'); } @@ -65,29 +67,29 @@ public function call(string $name, ...$arguments) ->getConstantPool() ->getEntries(); - $method = $methods[0]; - - // TODO: Refactor find to valid method. - // will implement to be compatible to multiple variable arguments size. - // And will be applied NoSuchMethodException when cannot find method. - if ($name === 'main') { - // Find same method - foreach ($methods as $method) { - $signature = Formatter::parseSignature($constantPool[$method->getDescriptorIndex()]->getString()); - - // compare passed arguments - foreach ($signature['arguments'] as $signatureArgument) { - foreach ($arguments as $argument) { - var_dump(gettype($argument), $signatureArgument); - if ($argument === $signatureArgument) { - - } - } - } - var_dump(); + // Find same method + $convertedPassedArguments = Formatter::buildArgumentsSignature( + array_map( + function ($argument) { + return TypeResolver::convertPHPtoJava($argument); + }, + $arguments + ) + ); + + $method = null; + foreach ($methodReferences as $methodReference) { + $methodSignature = Formatter::buildArgumentsSignature( + Formatter::parseSignature($constantPool[$methodReference->getDescriptorIndex()]->getString())['arguments'] + ); + if ($methodSignature === $convertedPassedArguments) { + $method = $methodReference; + break; } + } - exit(); + if ($method === null) { + throw new NoSuchMethodException('Call to undefined method ' . $name . '.'); } $codeAttribute = $getCodeAttribute($method->getAttributes()); diff --git a/src/exceptions/TypeException.php b/src/exceptions/TypeException.php new file mode 100644 index 00000000..2d6745e6 --- /dev/null +++ b/src/exceptions/TypeException.php @@ -0,0 +1,6 @@ + $getMappedSignatureType($signature[$i]), + 'type' => TypeResolver::getMappedSignatureType($signature[$i]), 'deep_array' => $deepArray, ]; $deepArray = 0; @@ -78,4 +70,19 @@ public static function parseSignature($signature, $i = 0) } return $data; } + + public static function buildArgumentsSignature($signatures): string + { + $string = ''; + foreach ($signatures as $signature) { + $build = str_repeat('[', $signature['deep_array']); + if ($signature['type'] === 'class') { + $build .= 'L' . $signature['class_name']; + } else { + $build .= TypeResolver::resolveType($signature['type']); + } + $string .= $build . ';'; + } + return $string; + } } diff --git a/src/utilities/TypeResolver.php b/src/utilities/TypeResolver.php new file mode 100644 index 00000000..2e8ee0a1 --- /dev/null +++ b/src/utilities/TypeResolver.php @@ -0,0 +1,92 @@ + 'I', + 'string' => 'Ljava.lang.String', + ]; + + const SIGNATURE_MAP = [ + 'B' => 'byte', + 'C' => 'char', + 'D' => 'double', + 'F' => 'float', + 'I' => 'int', + 'J' => 'long', + 'S' => 'short', + 'V' => 'void', + 'Z' => 'boolean', + 'L' => 'class', + ]; + + /** + * @param $signature + * @return string + * @throws TypeException + */ + public static function getMappedSignatureType($signature): string + { + if (isset(static::SIGNATURE_MAP[$signature])) { + return static::SIGNATURE_MAP[$signature]; + } + throw new TypeException('Passed undefined signature ' . $signature); + } + + public static function resolveType($type): string + { + $flipped = array_flip(static::SIGNATURE_MAP); + if (isset($flipped[$type])) { + return $flipped[$type]; + } + return 'L' . $type; + } + + public static function convertPHPtoJava($arguments, $defaultJavaArgumentType = 'java.lang.String'): array + { + $phpType = gettype($arguments); + $deepArray = 0; + if ($phpType === 'array') { + $deepArray++; + $getNestedValues = []; + foreach ($arguments as $argument) { + $getNestedValues[] = static::convertPHPtoJava($argument); + } + if (empty($getNestedValues)) { + $flipped = array_flip(static::PHP_TYPE_MAP); + $resolveType = static::SIGNATURE_MAP[static::resolveType($defaultJavaArgumentType)]; + if ($resolveType === 'class') { + return [ + 'type' => $resolveType, + 'class_name' => $defaultJavaArgumentType, + 'deep_array' => $deepArray, + ]; + } + return [ + 'type' => $resolveType, + 'deep_array' => $deepArray, + ]; + } + $firstParameter = $getNestedValues[0]; + + // TODO: Validate parameters + $firstParameter['deep_array'] += $deepArray; + return $firstParameter; + } + $resolveType = static::SIGNATURE_MAP[static::PHP_TYPE_MAP[$phpType]] ?? null; + if ($resolveType === 'class') { + return [ + 'type' => $resolveType, + 'class_name' => $defaultJavaArgumentType, + 'deep_array' => $deepArray, + ]; + } + return [ + 'type' => $resolveType, + 'deep_array' => $deepArray, + ]; + } +} From 9548287606a61045269343dfc4d7535d843469ae Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 00:08:07 +0900 Subject: [PATCH 52/96] Implement dynamically field --- src/core/JavaClass.php | 9 +++- src/core/JavaClassInvoker.php | 58 +++++++++++++++++++------- src/core/jvm/field/FieldGettable.php | 2 +- src/core/jvm/field/FieldInterface.php | 3 +- src/core/jvm/field/FieldSettable.php | 2 +- src/core/jvm/field/StaticField.php | 18 ++++---- src/imitation/java/io/PrintStream.php | 9 ++-- src/kernel/mnemonics/_getfield.php | 4 +- src/kernel/mnemonics/_getstatic.php | 27 ++++++------ tools/Test.class | Bin 3751 -> 3777 bytes tools/test.java | 2 + tools/test.php | 11 +++-- 12 files changed, 96 insertions(+), 49 deletions(-) diff --git a/src/core/JavaClass.php b/src/core/JavaClass.php index 9adb3bda..1205c751 100644 --- a/src/core/JavaClass.php +++ b/src/core/JavaClass.php @@ -57,6 +57,11 @@ class JavaClass private $debugTraces = []; + /** + * @var JavaClassInvoker + */ + private $invoker; + /** * JavaClass constructor. * @param JavaClassReader $reader @@ -121,6 +126,8 @@ public function __construct(JavaClassReader $reader) $reader->getBinaryReader()->readUnsignedShort(), $this->constantPool ); + + $this->invoker = new JavaClassInvoker($this); } public function getClassName(): string @@ -140,7 +147,7 @@ public function getMethods(): array public function getInvoker(): JavaClassInvoker { - return new JavaClassInvoker($this); + return $this->invoker; } public function appendDebug($log) diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 235e7bbf..e809816a 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -27,6 +27,26 @@ class JavaClassInvoker private $debugTraces; + /** + * @var JVM\Invoker\DynamicMethodInvoker + */ + private $dynamicMethodAccessor; + + /** + * @var JVM\Invoker\StaticMethodInvoker + */ + private $staticMethodAccessor; + + /** + * @var JVM\Field\DynamicField + */ + private $dynamicFieldAccessor; + + /** + * @var JVM\Field\StaticField + */ + private $staticFieldAccessor; + public function __construct(JavaClass $javaClass) { $this->javaClass = $javaClass; @@ -58,6 +78,25 @@ public function __construct(JavaClass $javaClass) } } + $this->dynamicMethodAccessor = new JVM\Invoker\DynamicMethodInvoker( + $this, + $this->dynamicMethods + ); + + $this->staticMethodAccessor = new JVM\Invoker\StaticMethodInvoker( + $this, + $this->staticMethods + ); + + $this->dynamicFieldAccessor = new JVM\Field\DynamicField( + $this, + [] + ); + + $this->staticFieldAccessor = new JVM\Field\StaticField( + $this + ); + // call if (isset($this->staticMethods[''])) { $this->getStaticMethods()->call(''); @@ -71,33 +110,22 @@ public function getJavaClass(): JavaClass public function getDynamicMethods(): InvokerInterface { - return new JVM\Invoker\DynamicMethodInvoker( - $this, - $this->dynamicMethods - ); + return $this->dynamicMethodAccessor; } public function getStaticMethods(): InvokerInterface { - return new JVM\Invoker\StaticMethodInvoker( - $this, - $this->staticMethods - ); + return $this->staticMethodAccessor; } public function getDynamicFields(): FieldInterface { - return new JVM\Field\DynamicField( - $this, - [] - ); + return $this->dynamicFieldAccessor; } public function getStaticFields(): JVM\Field\StaticField { - return new JVM\Field\StaticField( - $this - ); + return $this->staticFieldAccessor; } } diff --git a/src/core/jvm/field/FieldGettable.php b/src/core/jvm/field/FieldGettable.php index b2f48b88..07101d4f 100644 --- a/src/core/jvm/field/FieldGettable.php +++ b/src/core/jvm/field/FieldGettable.php @@ -5,7 +5,7 @@ trait FieldGettable { - public function __get($name) + public function get(string $name) { return $this->fields[$name]; } diff --git a/src/core/jvm/field/FieldInterface.php b/src/core/jvm/field/FieldInterface.php index e906d98e..3b32d760 100644 --- a/src/core/jvm/field/FieldInterface.php +++ b/src/core/jvm/field/FieldInterface.php @@ -6,5 +6,6 @@ interface FieldInterface { public function __construct(JavaClassInvoker $javaClassInvoker, array $fields); - public function __get($name); + public function get(string $name); + public function set(string $name, $value); } diff --git a/src/core/jvm/field/FieldSettable.php b/src/core/jvm/field/FieldSettable.php index c47efee6..0eee6bcd 100644 --- a/src/core/jvm/field/FieldSettable.php +++ b/src/core/jvm/field/FieldSettable.php @@ -5,7 +5,7 @@ trait FieldSettable { - public function __set($name, $value) + public function set(string $name, $value) { $this->fields[$name] = $value; } diff --git a/src/core/jvm/field/StaticField.php b/src/core/jvm/field/StaticField.php index 89b80f1e..0ecdf1d8 100644 --- a/src/core/jvm/field/StaticField.php +++ b/src/core/jvm/field/StaticField.php @@ -7,7 +7,7 @@ class StaticField { - private static $fields = []; + public $fields = []; private $javaClassInvoker; @@ -21,18 +21,20 @@ public function __construct(JavaClassInvoker $javaClassInvoker) * @return mixed * @throws NoSuchFieldException */ - public function get($name) + public function get(string $name) { - if (!isset(static::$fields[$name])) { + if (!isset($this->fields[$name])) { throw new NoSuchFieldException('Get to undefined static field ' . $name); } - if (static::$fields[$name] instanceof _String) { - return (string) static::$fields[$name]; + if ($this->fields[$name] instanceof _String) { + return (string) $this->fields[$name]; } - return static::$fields[$name]; + return $this->fields[$name]; } - public function set($name, $value) + + public function set(string $name, $value) { - static::$fields[$name] = $value; + $this->fields[$name] = $value; + return $this; } } diff --git a/src/imitation/java/io/PrintStream.php b/src/imitation/java/io/PrintStream.php index 0d4a48b9..02183326 100644 --- a/src/imitation/java/io/PrintStream.php +++ b/src/imitation/java/io/PrintStream.php @@ -11,16 +11,19 @@ public function println($arg) { if ($arg instanceof _Utf8) { echo $arg->getString() . "\n"; - } elseif ( + return; + } + if ( is_string($arg) || is_int($arg) || $arg instanceof Type || $arg instanceof \PHPJava\Imitation\java\lang\_String ) { echo $arg . "\n"; - } elseif ($arg === null) { - echo "\n"; + return; } + + echo "\n"; } public function append($string) diff --git a/src/kernel/mnemonics/_getfield.php b/src/kernel/mnemonics/_getfield.php index 150b08ff..67dde1d7 100644 --- a/src/kernel/mnemonics/_getfield.php +++ b/src/kernel/mnemonics/_getfield.php @@ -21,8 +21,8 @@ public function execute(): void if ($return !== null) { $this->pushStack($return); - } else { - throw new Exception('Cannot get ' . $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() . ''); + return; } + throw new Exception('Cannot get to undefined field ' . $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString() . ''); } } diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/mnemonics/_getstatic.php index 5242bdb1..866e5da3 100644 --- a/src/kernel/mnemonics/_getstatic.php +++ b/src/kernel/mnemonics/_getstatic.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use PHPJava\Exceptions\NotImplementedException; +use PHPJava\Kernel\Structures\_Fieldref; use PHPJava\Utilities\BinaryTool; use PHPJava\Utilities\ClassResolver; use PHPJava\Utilities\Formatter; @@ -16,27 +17,25 @@ public function execute(): void $cpInfo = $this->getConstantPool()->getEntries(); $cp = $cpInfo[$this->readUnsignedShort()]; - $class = $cpInfo[$cpInfo[$cp->getClassIndex()]->getClassIndex()]->getString(); - $signature = Formatter::parseSignature($cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getDescriptorIndex()]->getString()); + if ($cp instanceof _Fieldref) { + foreach ($this->javaClass->getFields() as $field) { + if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { + + // push stack + $fieldName = $cpInfo[$field->getNameIndex()]->getString(); + $this->pushStack($this->javaClassInvoker->getStaticFields()->get($fieldName)); + return; + } + } + } + if (isset($signature[0]['class_name'])) { $className = ClassResolver::resolve($signature[0]['class_name']); $this->pushStack(new $className()); return; } - - foreach ($this->javaClass->getFields() as $field) { - if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { - - // push stack - $fieldName = $cpInfo[$field->getNameIndex()]->getString(); - $this->pushStack($this->javaClassInvoker->getStaticFields()->get($fieldName)); - return; - } - } - - throw new \Exception('にゃ〜ん'); } } diff --git a/tools/Test.class b/tools/Test.class index abe14f890db1a420e1b87a4deb1c2e0388146e5b..3e869d02bb16c2f3e6d9991c6074541d9ccf7df6 100644 GIT binary patch delta 79 zcmZ23dr)=*3m<0?0}BHq0|SHJWL`dL{Y?z4n;2BKF|dOfI@=hyHUi}s89acb5Ktup cqZWfSqc(#IqYi^EqwZu|K5a&W$(ek107O#_IsgCw delta 53 zcmX>oyIghy3m>Ni0}BHq0|SH1WL`dL(TzYBBZCK!XA1 F0|48Z2hjik diff --git a/tools/test.java b/tools/test.java index 13ff1bb9..2a491b62 100644 --- a/tools/test.java +++ b/tools/test.java @@ -296,6 +296,8 @@ public String testMe (int n, String m, int l, int i, int v, int k) { public static void main (int[] args) { System.out.println("Called int type main " + args[0]); + System.out.println(c); + System.out.println(Test.b); } private int testPrivateInteger (int value) { diff --git a/tools/test.php b/tools/test.php index 0cbf8aef..3fb8c8c5 100644 --- a/tools/test.php +++ b/tools/test.php @@ -8,13 +8,18 @@ $javaClass = new \PHPJava\Core\JavaClass( new \PHPJava\Core\JavaClassReader(__DIR__ . '/Test.class') ); + +$javaClass->getInvoker()->getStaticFields() + ->set('c', 100) + ->set('b', 'New String'); + // var_dump($javaClass->getInvoker()->getDynamicMethods()->testMe(1111, 'いかりのねこ', 3333, 4444, 5555, 7777)); $javaClass->getInvoker()->getStaticMethods()->call( 'main', [99999, 55555, 333333] ); - -var_dump($javaClass->getInvoker()->getStaticFields()->get('c')); -var_dump($javaClass->getInvoker()->getStaticFields()->get('b')); +// +//var_dump($javaClass->getInvoker()->getStaticFields()->get('c')); +//var_dump($javaClass->getInvoker()->getStaticFields()->get('b')); $javaClass->debug(); From 40d4cf6d48a836d34db7f6c7db711d1bd7add3a6 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 00:11:26 +0900 Subject: [PATCH 53/96] Update lookupswitch --- src/kernel/mnemonics/_lookupswitch.php | 10 ++++--- tools/Test.class | Bin 3777 -> 3963 bytes tools/test.java | 37 +++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/kernel/mnemonics/_lookupswitch.php b/src/kernel/mnemonics/_lookupswitch.php index 51312229..b4e652c1 100644 --- a/src/kernel/mnemonics/_lookupswitch.php +++ b/src/kernel/mnemonics/_lookupswitch.php @@ -13,17 +13,19 @@ public function execute(): void { $key = $this->getStack(); - $paddingData = $this->readByte() + $this->readByte() + $this->readByte(); - - $offsets = array(); + // padding data + $paddingData = 4 - (($this->getOffset()) % 4); + if ($paddingData != 4) { + $this->read($paddingData); + } + $offsets = []; $offsets['default'] = $this->readInt(); $switchSize = $this->readUnsignedInt(); for ($i = 0; $i < $switchSize; $i++) { $label = $this->readInt(); - $offsets[(string) $label] = $this->readInt(); } diff --git a/tools/Test.class b/tools/Test.class index 3e869d02bb16c2f3e6d9991c6074541d9ccf7df6..18f891acdbd973b448ec597cdf8593cf2efb5a8e 100644 GIT binary patch delta 185 zcmWm6%?bfw6vpxA@iC&AH#fiykWf-gCYlDTL5X}UCzfKz(j~lQYiqJ`3$Dh-9n9i& zocf<%XLH`Ar2I;&fHpE9fY^G<2F{XYOcINMG3G0FrL=SuKH?N`vf>7+W{W!=|jL~TY8At$DTe83~=HY7lycTf;*>paE7(~$s^|$ O{*%)SRpDG;RqqGT!XVB7 delta 58 zcmew@cTjc%Gana25CaPXBLf42-sBEGLrF#k4 Date: Tue, 26 Feb 2019 00:43:32 +0900 Subject: [PATCH 54/96] Add tests --- .gitignore | 3 ++ composer.json | 3 ++ tests/AccessStaticFieldTest.php | 39 +++++++++++++++++++ tests/Base.php | 24 ++++++++++++ tests/caches/.gitkeep | 0 tests/fixtures/.gitkeep | 0 .../fixtures/java/AccessStaticFieldTest.java | 5 +++ 7 files changed, 74 insertions(+) create mode 100644 tests/AccessStaticFieldTest.php create mode 100644 tests/Base.php create mode 100644 tests/caches/.gitkeep create mode 100644 tests/fixtures/.gitkeep create mode 100644 tests/fixtures/java/AccessStaticFieldTest.java diff --git a/.gitignore b/.gitignore index 9e3cd75a..da836b39 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ old vendor composer.lock .php_cs.cache +.phpunit.result.cache +tests/caches/ +!tests/caches/.gitkeep diff --git a/composer.json b/composer.json index b40837fb..b4484d06 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,9 @@ "PHPJava\\": "src/" } }, + "autoload-dev": { + "psr-4": { "PHPJava\\Tests\\": "tests/" } + }, "require-dev": { "phpunit/phpunit": "^8.0" } diff --git a/tests/AccessStaticFieldTest.php b/tests/AccessStaticFieldTest.php new file mode 100644 index 00000000..52cc85c6 --- /dev/null +++ b/tests/AccessStaticFieldTest.php @@ -0,0 +1,39 @@ +javaClass = new \PHPJava\Core\JavaClass( + new \PHPJava\Core\JavaClassReader($this->getClassName('AccessStaticFieldTest')) + ); + } + + public function testGetPuttedField() + { + $this->assertEquals(5, $this->javaClass->getInvoker()->getStaticFields()->get('number')); + $this->assertEquals('Hello World', $this->javaClass->getInvoker()->getStaticFields()->get('string')); + } + + public function testOverwriteField() + { + $this->javaClass->getInvoker()->getStaticFields()->set('number', 1000); + $this->javaClass->getInvoker()->getStaticFields()->set('string', 'New String!'); + $this->assertEquals(1000, $this->javaClass->getInvoker()->getStaticFields()->get('number')); + $this->assertEquals('New String!', $this->javaClass->getInvoker()->getStaticFields()->get('string')); + } +} diff --git a/tests/Base.php b/tests/Base.php new file mode 100644 index 00000000..d3b2d875 --- /dev/null +++ b/tests/Base.php @@ -0,0 +1,24 @@ +fixtures as $fixture) { + exec('javac -encoding UTF8 ' . __DIR__ . '/fixtures/java/' . str_replace(['../', './'], '', $fixture) . '.java -d ' . __DIR__ . '/caches'); + } + } + + protected function getClassName($fixtureName) + { + return __DIR__ . '/caches/' . $fixtureName . '.class'; + } +} diff --git a/tests/caches/.gitkeep b/tests/caches/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/tests/fixtures/.gitkeep b/tests/fixtures/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/tests/fixtures/java/AccessStaticFieldTest.java b/tests/fixtures/java/AccessStaticFieldTest.java new file mode 100644 index 00000000..3784ac17 --- /dev/null +++ b/tests/fixtures/java/AccessStaticFieldTest.java @@ -0,0 +1,5 @@ +class AccessStaticFieldTest +{ + public static int number = 5; + public static String string = "Hello World"; +} From 5b1fc8c459dfcd09f04915be98f16938a9514902 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 00:44:52 +0900 Subject: [PATCH 55/96] align --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b4484d06..5ad5404e 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,9 @@ } }, "autoload-dev": { - "psr-4": { "PHPJava\\Tests\\": "tests/" } + "psr-4": { + "PHPJava\\Tests\\": "tests/" + } }, "require-dev": { "phpunit/phpunit": "^8.0" From 9695fd151de1b771d748f4b76dc1464a183448cb Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 01:12:11 +0900 Subject: [PATCH 56/96] WIP commit --- src/core/jvm/invoker/Invokable.php | 4 +- src/imitation/java/io/PrintStream.php | 18 +++++++ tests/AccessStaticMethodTest.php | 51 +++++++++++++++++++ .../fixtures/java/AccessStaticMethodTest.java | 19 +++++++ 4 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 tests/AccessStaticMethodTest.php create mode 100644 tests/fixtures/java/AccessStaticMethodTest.java diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 1437efe6..09ce0256 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -36,9 +36,11 @@ public function __construct(JavaClassInvoker $javaClassInvoker, array $methods) * @param mixed ...$arguments * @return null * @throws IllegalJavaClassException + * @throws NoSuchMethodException * @throws RuntimeException * @throws UndefinedMethodException * @throws UndefinedOpCodeException + * @throws \PHPJava\Exceptions\TypeException */ public function call(string $name, ...$arguments) { @@ -59,7 +61,7 @@ public function call(string $name, ...$arguments) */ $methodReferences = $this->methods[$name] ?? null; if ($methodReferences === null) { - throw new UndefinedMethodException('Call to undefined ' . $name . ' method.'); + throw new UndefinedMethodException('Call to undefined method ' . $name . '.'); } $constantPool = $this->javaClassInvoker diff --git a/src/imitation/java/io/PrintStream.php b/src/imitation/java/io/PrintStream.php index 02183326..fcf79311 100644 --- a/src/imitation/java/io/PrintStream.php +++ b/src/imitation/java/io/PrintStream.php @@ -26,6 +26,24 @@ public function println($arg) echo "\n"; } + public function print($arg) + { + if ($arg instanceof _Utf8) { + echo $arg->getString(); + return; + } + if ( + is_string($arg) || + is_int($arg) || + $arg instanceof Type || + $arg instanceof \PHPJava\Imitation\java\lang\_String + ) { + echo $arg; + return; + } + + } + public function append($string) { $this->sequence .= $string; diff --git a/tests/AccessStaticMethodTest.php b/tests/AccessStaticMethodTest.php new file mode 100644 index 00000000..43c9685a --- /dev/null +++ b/tests/AccessStaticMethodTest.php @@ -0,0 +1,51 @@ +javaClass = new \PHPJava\Core\JavaClass( + new \PHPJava\Core\JavaClassReader($this->getClassName('AccessStaticMethodTest')) + ); + } + + public function testCallMainHavingStringArguments() + { + ob_start(); + // call main + $this->javaClass->getInvoker()->getStaticMethods()->call( + 'main', + ["Hello", "World"] + ); + $result = ob_get_clean(); + + $this->assertEquals(246811356, $result); + } + + public function testCallMainHavingIntegerArguments() + { + ob_start(); + // call main + $this->javaClass->getInvoker()->getStaticMethods()->call( + 'main', + [1234, 5678] + ); + $result = ob_get_clean(); + + $this->assertEquals(246811356, $result); + } +} diff --git a/tests/fixtures/java/AccessStaticMethodTest.java b/tests/fixtures/java/AccessStaticMethodTest.java new file mode 100644 index 00000000..68de6427 --- /dev/null +++ b/tests/fixtures/java/AccessStaticMethodTest.java @@ -0,0 +1,19 @@ +class AccessStaticMethodTest +{ + public static void main(String[] args) + { + System.out.print(args[0]); + System.out.print(args[1]); + } + + public static void main(int[] args) + { + System.out.print(args[0] * 2); + System.out.print(args[1] * 2); + } + + public static String returnTest() + { + return "Return Test."; + } +} From c9874e84f556697522ce5a05c2d6bf607f9b2da2 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 09:44:24 +0900 Subject: [PATCH 57/96] Update tests --- src/core/jvm/invoker/Invokable.php | 1 + src/utilities/Formatter.php | 2 +- src/utilities/TypeResolver.php | 4 ++-- tests/AccessStaticMethodTest.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/jvm/invoker/Invokable.php b/src/core/jvm/invoker/Invokable.php index 09ce0256..4c8b96ed 100644 --- a/src/core/jvm/invoker/Invokable.php +++ b/src/core/jvm/invoker/Invokable.php @@ -84,6 +84,7 @@ function ($argument) { $methodSignature = Formatter::buildArgumentsSignature( Formatter::parseSignature($constantPool[$methodReference->getDescriptorIndex()]->getString())['arguments'] ); + if ($methodSignature === $convertedPassedArguments) { $method = $methodReference; break; diff --git a/src/utilities/Formatter.php b/src/utilities/Formatter.php index ffb48598..2eae14f9 100644 --- a/src/utilities/Formatter.php +++ b/src/utilities/Formatter.php @@ -77,7 +77,7 @@ public static function buildArgumentsSignature($signatures): string foreach ($signatures as $signature) { $build = str_repeat('[', $signature['deep_array']); if ($signature['type'] === 'class') { - $build .= 'L' . $signature['class_name']; + $build .= 'L' . str_replace('/', '.', $signature['class_name']); } else { $build .= TypeResolver::resolveType($signature['type']); } diff --git a/src/utilities/TypeResolver.php b/src/utilities/TypeResolver.php index 2e8ee0a1..0957d2dd 100644 --- a/src/utilities/TypeResolver.php +++ b/src/utilities/TypeResolver.php @@ -76,11 +76,11 @@ public static function convertPHPtoJava($arguments, $defaultJavaArgumentType = ' $firstParameter['deep_array'] += $deepArray; return $firstParameter; } - $resolveType = static::SIGNATURE_MAP[static::PHP_TYPE_MAP[$phpType]] ?? null; + $resolveType = static::SIGNATURE_MAP[static::PHP_TYPE_MAP[$phpType][0]] ?? null; if ($resolveType === 'class') { return [ 'type' => $resolveType, - 'class_name' => $defaultJavaArgumentType, + 'class_name' => substr(static::PHP_TYPE_MAP[$phpType], 1), 'deep_array' => $deepArray, ]; } diff --git a/tests/AccessStaticMethodTest.php b/tests/AccessStaticMethodTest.php index 43c9685a..6ab87ee7 100644 --- a/tests/AccessStaticMethodTest.php +++ b/tests/AccessStaticMethodTest.php @@ -33,7 +33,7 @@ public function testCallMainHavingStringArguments() ); $result = ob_get_clean(); - $this->assertEquals(246811356, $result); + $this->assertEquals("HelloWorld", $result); } public function testCallMainHavingIntegerArguments() From e66d3d66af319acdad7be275510881ed81427a67 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 14:05:15 +0900 Subject: [PATCH 58/96] Remove unnecessary file --- tests/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/.gitkeep diff --git a/tests/.gitkeep b/tests/.gitkeep deleted file mode 100644 index e69de29b..00000000 From 57a2979bb4c16a22e9b4b4a01a653bbc23e72d81 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 14:17:57 +0900 Subject: [PATCH 59/96] Add test --- tests/OutputDebugTraceTest.php | 43 +++++++++++++++++++ tests/fixtures/.gitkeep | 0 tests/fixtures/java/OutputDebugTraceTest.java | 9 ++++ tests/templates/DebugTraceTest.txt | 28 ++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 tests/OutputDebugTraceTest.php delete mode 100644 tests/fixtures/.gitkeep create mode 100644 tests/fixtures/java/OutputDebugTraceTest.java create mode 100644 tests/templates/DebugTraceTest.txt diff --git a/tests/OutputDebugTraceTest.php b/tests/OutputDebugTraceTest.php new file mode 100644 index 00000000..cc2c602f --- /dev/null +++ b/tests/OutputDebugTraceTest.php @@ -0,0 +1,43 @@ +javaClass = new \PHPJava\Core\JavaClass( + new \PHPJava\Core\JavaClassReader($this->getClassName('OutputDebugTraceTest')) + ); + } + + public function testCallMain() + { + ob_start(); + $this->javaClass->getInvoker()->getStaticMethods()->call( + 'main', + ["Hello", " ", "World"] + ); + ob_end_clean(); + + ob_start(); + $this->javaClass->debug(); + $result = ob_get_clean(); + $this->assertEquals( + file_get_contents(__DIR__ . '/templates/DebugTraceTest.txt'), + $result + ); + } +} diff --git a/tests/fixtures/.gitkeep b/tests/fixtures/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/fixtures/java/OutputDebugTraceTest.java b/tests/fixtures/java/OutputDebugTraceTest.java new file mode 100644 index 00000000..717d184c --- /dev/null +++ b/tests/fixtures/java/OutputDebugTraceTest.java @@ -0,0 +1,9 @@ +class OutputDebugTraceTest +{ + public static void main(String[] args) + { + System.out.print(args[0]); + System.out.print(args[1]); + System.out.print(args[2]); + } +} diff --git a/tests/templates/DebugTraceTest.txt b/tests/templates/DebugTraceTest.txt new file mode 100644 index 00000000..c9956f1a --- /dev/null +++ b/tests/templates/DebugTraceTest.txt @@ -0,0 +1,28 @@ +[method] +public static void main(java.lang.String[]) + +[code] +<0xb2> <0x00> <0x02> <0x2a> <0x03> <0x32> <0xb6> <0x00> <0x03> <0xb2> <0x00> <0x02> <0x2a> <0x04> <0x32> <0xb6> <0x00> <0x03> <0xb2> <0x00> +<0x02> <0x2a> <0x05> <0x32> <0xb6> <0x00> <0x03> <0xb1> + +[executed] + PC | OPCODE | MNEMONIC | OPERANDS | LOCAL STORAGE +---------+--------+----------------------+------------+----------------- + 0 | 0xB2 | getstatic | 0 | 1 + 3 | 0x2A | aload_0 | 1 | 1 + 4 | 0x03 | iconst_0 | 2 | 1 + 5 | 0x32 | aaload | 3 | 1 + 6 | 0xB6 | invokevirtual | 2 | 1 + 9 | 0xB2 | getstatic | 0 | 1 + 12 | 0x2A | aload_0 | 1 | 1 + 13 | 0x04 | iconst_1 | 2 | 1 + 14 | 0x32 | aaload | 3 | 1 + 15 | 0xB6 | invokevirtual | 2 | 1 + 18 | 0xB2 | getstatic | 0 | 1 + 21 | 0x2A | aload_0 | 1 | 1 + 22 | 0x05 | iconst_2 | 2 | 1 + 23 | 0x32 | aaload | 3 | 1 + 24 | 0xB6 | invokevirtual | 2 | 1 + 27 | 0xB1 | return | 0 | 1 +---------+--------+----------------------+------------+----------------- + From a04602fa3d0815378a7a935c23b213abb84988e8 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 15:14:42 +0900 Subject: [PATCH 60/96] Add tests --- src/kernel/mnemonics/_ireturn.php | 5 +- src/kernel/types/Short.php | 7 --- src/kernel/types/_Boolean.php | 7 +++ src/kernel/types/{Byte.php => _Byte.php} | 0 src/kernel/types/{Char.php => _Char.php} | 2 +- src/kernel/types/{Boolean.php => _Double.php} | 2 +- src/kernel/types/{Double.php => _Float.php} | 2 +- src/kernel/types/{Int.php => _Int.php} | 2 +- src/kernel/types/{Long.php => _Long.php} | 2 +- src/kernel/types/{Float.php => _Short.php} | 2 +- tests/LoopTest.php | 55 +++++++++++++++++++ tests/fixtures/java/LoopTest.java | 22 ++++++++ 12 files changed, 93 insertions(+), 15 deletions(-) delete mode 100644 src/kernel/types/Short.php create mode 100644 src/kernel/types/_Boolean.php rename src/kernel/types/{Byte.php => _Byte.php} (100%) rename src/kernel/types/{Char.php => _Char.php} (63%) rename src/kernel/types/{Boolean.php => _Double.php} (61%) rename src/kernel/types/{Double.php => _Float.php} (62%) rename src/kernel/types/{Int.php => _Int.php} (64%) rename src/kernel/types/{Long.php => _Long.php} (63%) rename src/kernel/types/{Float.php => _Short.php} (62%) create mode 100644 tests/LoopTest.php create mode 100644 tests/fixtures/java/LoopTest.java diff --git a/src/kernel/mnemonics/_ireturn.php b/src/kernel/mnemonics/_ireturn.php index 8c5ad03a..d6313edc 100644 --- a/src/kernel/mnemonics/_ireturn.php +++ b/src/kernel/mnemonics/_ireturn.php @@ -2,6 +2,7 @@ namespace PHPJava\Kernel\Mnemonics; use PHPJava\Exceptions\NotImplementedException; +use PHPJava\Kernel\Types\_Int; use PHPJava\Utilities\BinaryTool; final class _ireturn implements OperationInterface @@ -12,8 +13,8 @@ final class _ireturn implements OperationInterface /*** * return an integer from a method */ - public function execute(): void + public function execute() { - return new JavaTypeInt($this->getStack()); + return new _Int($this->getStack()); } } diff --git a/src/kernel/types/Short.php b/src/kernel/types/Short.php deleted file mode 100644 index ac301cf5..00000000 --- a/src/kernel/types/Short.php +++ /dev/null @@ -1,7 +0,0 @@ -javaClass = new \PHPJava\Core\JavaClass( + new \PHPJava\Core\JavaClassReader($this->getClassName('LoopTest')) + ); + } + + public function testCallCalculateByFor() + { + $calculatedValue = $this->javaClass->getInvoker()->getStaticMethods()->call('calculateByFor', 10); + $this->assertEquals( + "45", + (string) $calculatedValue + ); + + $calculatedValue = $this->javaClass->getInvoker()->getStaticMethods()->call('calculateByFor', 20); + $this->assertEquals( + "190", + (string) $calculatedValue + ); + } + + public function testCallCalculateByWhile() + { + $calculatedValue = $this->javaClass->getInvoker()->getStaticMethods()->call('calculateByWhile', 10); + $this->assertEquals( + "45", + (string) $calculatedValue + ); + + $calculatedValue = $this->javaClass->getInvoker()->getStaticMethods()->call('calculateByWhile', 20); + $this->assertEquals( + "190", + (string) $calculatedValue + ); + } +} diff --git a/tests/fixtures/java/LoopTest.java b/tests/fixtures/java/LoopTest.java new file mode 100644 index 00000000..647bbcc0 --- /dev/null +++ b/tests/fixtures/java/LoopTest.java @@ -0,0 +1,22 @@ +class LoopTest +{ + public static int calculateByFor(int length) + { + int sum = 0; + for (int i = 0; i < length; i++) { + sum += i; + } + return sum; + } + + public static int calculateByWhile(int length) + { + int sum = 0; + int i = 0; + while (i < length) { + sum += i; + i++; + } + return sum; + } +} From e0a82776548b63db8e45e29cc2a7cc3ba1ca9fa9 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 15:15:33 +0900 Subject: [PATCH 61/96] Replace name getPointer to getProgramCounter --- src/kernel/core/Accumulator.php | 2 +- src/kernel/mnemonics/_aaload.php | 2 +- src/kernel/mnemonics/_athrow.php | 4 ++-- src/kernel/mnemonics/_goto.php | 2 +- src/kernel/mnemonics/_if_acmpeq.php | 2 +- src/kernel/mnemonics/_if_acmpne.php | 2 +- src/kernel/mnemonics/_if_icmpge.php | 2 +- src/kernel/mnemonics/_if_icmpgt.php | 2 +- src/kernel/mnemonics/_if_icmplt.php | 2 +- src/kernel/mnemonics/_if_icmpne.php | 2 +- src/kernel/mnemonics/_ifeq.php | 2 +- src/kernel/mnemonics/_ifne.php | 2 +- src/kernel/mnemonics/_lookupswitch.php | 4 ++-- src/kernel/mnemonics/_tableswitch.php | 4 ++-- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/kernel/core/Accumulator.php b/src/kernel/core/Accumulator.php index 286a7e58..99389fda 100644 --- a/src/kernel/core/Accumulator.php +++ b/src/kernel/core/Accumulator.php @@ -155,7 +155,7 @@ public function getLocalStorages() return $this->localStorage; } - public function getPointer() + public function getProgramCounter() { return $this->pointer; } diff --git a/src/kernel/mnemonics/_aaload.php b/src/kernel/mnemonics/_aaload.php index 363b0cbb..f6b2e6cd 100644 --- a/src/kernel/mnemonics/_aaload.php +++ b/src/kernel/mnemonics/_aaload.php @@ -18,7 +18,7 @@ public function execute(): void $arrayref = $this->getStack(); if (!isset($arrayref[$index])) { - throw new \PHPJava\Imitation\java\lang\ArrayIndexOutOfBoundsException('Array index ' . $index . ' out of bounds. (Program Counter: ' . $this->getPointer() . ')'); + throw new \PHPJava\Imitation\java\lang\ArrayIndexOutOfBoundsException('Array index ' . $index . ' out of bounds. (Program Counter: ' . $this->getProgramCounter() . ')'); } $this->pushStack($arrayref[$index]); } diff --git a/src/kernel/mnemonics/_athrow.php b/src/kernel/mnemonics/_athrow.php index eed3be9a..d24fa681 100644 --- a/src/kernel/mnemonics/_athrow.php +++ b/src/kernel/mnemonics/_athrow.php @@ -19,8 +19,8 @@ public function execute(): void foreach ($this->getAttributeData()->getExceptionTables() as $exception) { if ($cpInfo[$cpInfo[$exception->getCatchType()]->getClassIndex()]->getString() === $className && - $exception->getStartPc() <= $this->getPointer() && - $exception->getEndPc() >= $this->getPointer()) { + $exception->getStartPc() <= $this->getProgramCounter() && + $exception->getEndPc() >= $this->getProgramCounter()) { $this->setOffset($exception->getHandlerPc()); return; } diff --git a/src/kernel/mnemonics/_goto.php b/src/kernel/mnemonics/_goto.php index 2ab39af1..75c42e65 100644 --- a/src/kernel/mnemonics/_goto.php +++ b/src/kernel/mnemonics/_goto.php @@ -13,6 +13,6 @@ public function execute(): void { $offset = $this->readShort(); - $this->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getProgramCounter() + $offset); } } diff --git a/src/kernel/mnemonics/_if_acmpeq.php b/src/kernel/mnemonics/_if_acmpeq.php index 8d54a2a4..276c5526 100644 --- a/src/kernel/mnemonics/_if_acmpeq.php +++ b/src/kernel/mnemonics/_if_acmpeq.php @@ -17,7 +17,7 @@ public function execute(): void $rightOperand = $this->getStack(); if ($leftOperand === $rightOperand) { - $this->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getProgramCounter() + $offset); } } } diff --git a/src/kernel/mnemonics/_if_acmpne.php b/src/kernel/mnemonics/_if_acmpne.php index f448ed4c..75d2361b 100644 --- a/src/kernel/mnemonics/_if_acmpne.php +++ b/src/kernel/mnemonics/_if_acmpne.php @@ -17,7 +17,7 @@ public function execute(): void $rightOperand = $this->getStack(); if ($leftOperand !== $rightOperand) { - $this->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getProgramCounter() + $offset); } } } diff --git a/src/kernel/mnemonics/_if_icmpge.php b/src/kernel/mnemonics/_if_icmpge.php index 005d3605..f29d4a9c 100644 --- a/src/kernel/mnemonics/_if_icmpge.php +++ b/src/kernel/mnemonics/_if_icmpge.php @@ -17,7 +17,7 @@ public function execute(): void $rightOperand = $this->getStack(); if ($leftOperand <= $rightOperand) { - $this->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getProgramCounter() + $offset); } } } diff --git a/src/kernel/mnemonics/_if_icmpgt.php b/src/kernel/mnemonics/_if_icmpgt.php index 81ff7488..7ce1f603 100644 --- a/src/kernel/mnemonics/_if_icmpgt.php +++ b/src/kernel/mnemonics/_if_icmpgt.php @@ -17,7 +17,7 @@ public function execute(): void $rightOperand = $this->getStack(); if ($leftOperand < $rightOperand) { - $this->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getProgramCounter() + $offset); } } } diff --git a/src/kernel/mnemonics/_if_icmplt.php b/src/kernel/mnemonics/_if_icmplt.php index f5670eac..2b762c6f 100644 --- a/src/kernel/mnemonics/_if_icmplt.php +++ b/src/kernel/mnemonics/_if_icmplt.php @@ -17,7 +17,7 @@ public function execute(): void $rightOperand = $this->getStack(); if ($rightOperand < $leftOperand) { - $this->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getProgramCounter() + $offset); } } } diff --git a/src/kernel/mnemonics/_if_icmpne.php b/src/kernel/mnemonics/_if_icmpne.php index 35def7d7..1d5ef93a 100644 --- a/src/kernel/mnemonics/_if_icmpne.php +++ b/src/kernel/mnemonics/_if_icmpne.php @@ -17,7 +17,7 @@ public function execute(): void $rightOperand = $this->getStack(); if ($leftOperand != $rightOperand) { - $this->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getProgramCounter() + $offset); } } } diff --git a/src/kernel/mnemonics/_ifeq.php b/src/kernel/mnemonics/_ifeq.php index 64a1c3fd..c3258e7a 100644 --- a/src/kernel/mnemonics/_ifeq.php +++ b/src/kernel/mnemonics/_ifeq.php @@ -16,7 +16,7 @@ public function execute(): void $operand = $this->getStack(); if ($operand == 0) { - $this->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getProgramCounter() + $offset); } } } diff --git a/src/kernel/mnemonics/_ifne.php b/src/kernel/mnemonics/_ifne.php index 65937ddc..37a7c9dd 100644 --- a/src/kernel/mnemonics/_ifne.php +++ b/src/kernel/mnemonics/_ifne.php @@ -16,7 +16,7 @@ public function execute(): void $operand = $this->getStack(); if ($operand != 0) { - $this->setOffset($this->getPointer() + $offset); + $this->setOffset($this->getProgramCounter() + $offset); } } } diff --git a/src/kernel/mnemonics/_lookupswitch.php b/src/kernel/mnemonics/_lookupswitch.php index b4e652c1..2278b30a 100644 --- a/src/kernel/mnemonics/_lookupswitch.php +++ b/src/kernel/mnemonics/_lookupswitch.php @@ -32,11 +32,11 @@ public function execute(): void if (isset($offsets[$key])) { // goto PC - $this->setOffset($this->getPointer() + $offsets[$key]); + $this->setOffset($this->getProgramCounter() + $offsets[$key]); return; } // goto default - $this->setOffset($this->getPointer() + $offsets['default']); + $this->setOffset($this->getProgramCounter() + $offsets['default']); } } diff --git a/src/kernel/mnemonics/_tableswitch.php b/src/kernel/mnemonics/_tableswitch.php index a9557bdb..288e3458 100644 --- a/src/kernel/mnemonics/_tableswitch.php +++ b/src/kernel/mnemonics/_tableswitch.php @@ -30,12 +30,12 @@ public function execute(): void if (isset($offsets[$key])) { // goto PC - $this->setOffset($this->getPointer() + $offsets[$key]); + $this->setOffset($this->getProgramCounter() + $offsets[$key]); return; } // goto default - $this->setOffset($this->getPointer() + $offsets['default']); + $this->setOffset($this->getProgramCounter() + $offsets['default']); } } From 1ac8d22d35d04d62489fdb54497ec80884aaf88c Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 15:20:12 +0900 Subject: [PATCH 62/96] Test simplify --- tests/AccessStaticFieldTest.php | 22 ++++--------------- tests/AccessStaticMethodTest.php | 36 +++++++++++++------------------- tests/Base.php | 6 ++++++ tests/LoopTest.php | 34 ++++++++++++++---------------- tests/OutputDebugTraceTest.php | 26 +++++++---------------- 5 files changed, 48 insertions(+), 76 deletions(-) diff --git a/tests/AccessStaticFieldTest.php b/tests/AccessStaticFieldTest.php index 52cc85c6..85bdf969 100644 --- a/tests/AccessStaticFieldTest.php +++ b/tests/AccessStaticFieldTest.php @@ -9,31 +9,17 @@ class AccessStaticFieldTest extends Base 'AccessStaticFieldTest', ]; - /** - * @var \PHPJava\Core\JavaClass - */ - private $javaClass; - - public function setUp(): void - { - parent::setUp(); - - $this->javaClass = new \PHPJava\Core\JavaClass( - new \PHPJava\Core\JavaClassReader($this->getClassName('AccessStaticFieldTest')) - ); - } - public function testGetPuttedField() { - $this->assertEquals(5, $this->javaClass->getInvoker()->getStaticFields()->get('number')); - $this->assertEquals('Hello World', $this->javaClass->getInvoker()->getStaticFields()->get('string')); + $this->assertEquals(5, $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('number')); + $this->assertEquals('Hello World', $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('string')); } public function testOverwriteField() { $this->javaClass->getInvoker()->getStaticFields()->set('number', 1000); $this->javaClass->getInvoker()->getStaticFields()->set('string', 'New String!'); - $this->assertEquals(1000, $this->javaClass->getInvoker()->getStaticFields()->get('number')); - $this->assertEquals('New String!', $this->javaClass->getInvoker()->getStaticFields()->get('string')); + $this->assertEquals(1000, $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('number')); + $this->assertEquals('New String!', $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('string')); } } diff --git a/tests/AccessStaticMethodTest.php b/tests/AccessStaticMethodTest.php index 6ab87ee7..afd36ba4 100644 --- a/tests/AccessStaticMethodTest.php +++ b/tests/AccessStaticMethodTest.php @@ -9,28 +9,17 @@ class AccessStaticMethodTest extends Base 'AccessStaticMethodTest', ]; - /** - * @var \PHPJava\Core\JavaClass - */ - private $javaClass; - - public function setUp(): void - { - parent::setUp(); - - $this->javaClass = new \PHPJava\Core\JavaClass( - new \PHPJava\Core\JavaClassReader($this->getClassName('AccessStaticMethodTest')) - ); - } - public function testCallMainHavingStringArguments() { ob_start(); // call main - $this->javaClass->getInvoker()->getStaticMethods()->call( - 'main', - ["Hello", "World"] - ); + $this->initiatedJavaClasses['AccessStaticMethodTest'] + ->getInvoker() + ->getStaticMethods() + ->call( + 'main', + ["Hello", "World"] + ); $result = ob_get_clean(); $this->assertEquals("HelloWorld", $result); @@ -40,10 +29,13 @@ public function testCallMainHavingIntegerArguments() { ob_start(); // call main - $this->javaClass->getInvoker()->getStaticMethods()->call( - 'main', - [1234, 5678] - ); + $this->initiatedJavaClasses['AccessStaticMethodTest'] + ->getInvoker() + ->getStaticMethods() + ->call( + 'main', + [1234, 5678] + ); $result = ob_get_clean(); $this->assertEquals(246811356, $result); diff --git a/tests/Base.php b/tests/Base.php index d3b2d875..a2cd136e 100644 --- a/tests/Base.php +++ b/tests/Base.php @@ -6,6 +6,7 @@ class Base extends TestCase { protected $fixtures = []; + protected $initiatedJavaClasses = []; public function setUp(): void { @@ -14,6 +15,11 @@ public function setUp(): void foreach ($this->fixtures as $fixture) { exec('javac -encoding UTF8 ' . __DIR__ . '/fixtures/java/' . str_replace(['../', './'], '', $fixture) . '.java -d ' . __DIR__ . '/caches'); + $this->initiatedJavaClasses[$fixture] = new \PHPJava\Core\JavaClass( + new \PHPJava\Core\JavaClassReader( + $this->getClassName($fixture) + ) + ); } } diff --git a/tests/LoopTest.php b/tests/LoopTest.php index 7dd7b246..86658f31 100644 --- a/tests/LoopTest.php +++ b/tests/LoopTest.php @@ -9,29 +9,21 @@ class LoopTest extends Base 'LoopTest', ]; - /** - * @var \PHPJava\Core\JavaClass - */ - private $javaClass; - - public function setUp(): void - { - parent::setUp(); - - $this->javaClass = new \PHPJava\Core\JavaClass( - new \PHPJava\Core\JavaClassReader($this->getClassName('LoopTest')) - ); - } - public function testCallCalculateByFor() { - $calculatedValue = $this->javaClass->getInvoker()->getStaticMethods()->call('calculateByFor', 10); + $calculatedValue = $this->initiatedJavaClasses['LoopTest'] + ->getInvoker() + ->getStaticMethods() + ->call('calculateByFor', 10); $this->assertEquals( "45", (string) $calculatedValue ); - $calculatedValue = $this->javaClass->getInvoker()->getStaticMethods()->call('calculateByFor', 20); + $calculatedValue = $this->initiatedJavaClasses['LoopTest'] + ->getInvoker() + ->getStaticMethods() + ->call('calculateByFor', 20); $this->assertEquals( "190", (string) $calculatedValue @@ -40,13 +32,19 @@ public function testCallCalculateByFor() public function testCallCalculateByWhile() { - $calculatedValue = $this->javaClass->getInvoker()->getStaticMethods()->call('calculateByWhile', 10); + $calculatedValue = $this->initiatedJavaClasses['LoopTest'] + ->getInvoker() + ->getStaticMethods() + ->call('calculateByWhile', 10); $this->assertEquals( "45", (string) $calculatedValue ); - $calculatedValue = $this->javaClass->getInvoker()->getStaticMethods()->call('calculateByWhile', 20); + $calculatedValue = $this->initiatedJavaClasses['LoopTest'] + ->getInvoker() + ->getStaticMethods() + ->call('calculateByWhile', 20); $this->assertEquals( "190", (string) $calculatedValue diff --git a/tests/OutputDebugTraceTest.php b/tests/OutputDebugTraceTest.php index cc2c602f..4b9c9efe 100644 --- a/tests/OutputDebugTraceTest.php +++ b/tests/OutputDebugTraceTest.php @@ -9,27 +9,17 @@ class OutputDebugTraceTest extends Base 'OutputDebugTraceTest', ]; - /** - * @var \PHPJava\Core\JavaClass - */ - private $javaClass; - - public function setUp(): void - { - parent::setUp(); - - $this->javaClass = new \PHPJava\Core\JavaClass( - new \PHPJava\Core\JavaClassReader($this->getClassName('OutputDebugTraceTest')) - ); - } - public function testCallMain() { ob_start(); - $this->javaClass->getInvoker()->getStaticMethods()->call( - 'main', - ["Hello", " ", "World"] - ); + + $calculatedValue = $this->initiatedJavaClasses['OutputDebugTraceTest'] + ->getInvoker() + ->getStaticMethods() + ->call( + 'main', + ["Hello", " ", "World"] + ); ob_end_clean(); ob_start(); From 335304b98307271bcfd4b50c79e6921e030589b5 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 15:38:57 +0900 Subject: [PATCH 63/96] Add switch tests --- src/kernel/mnemonics/_lookupswitch.php | 3 +- tests/OutputDebugTraceTest.php | 2 +- tests/SwitchTest.php | 120 +++++++++++++++++++++++++ tests/fixtures/java/SwitchTest.java | 32 +++++++ 4 files changed, 154 insertions(+), 3 deletions(-) create mode 100644 tests/SwitchTest.php create mode 100644 tests/fixtures/java/SwitchTest.java diff --git a/src/kernel/mnemonics/_lookupswitch.php b/src/kernel/mnemonics/_lookupswitch.php index 2278b30a..0834193a 100644 --- a/src/kernel/mnemonics/_lookupswitch.php +++ b/src/kernel/mnemonics/_lookupswitch.php @@ -23,9 +23,8 @@ public function execute(): void $offsets['default'] = $this->readInt(); $switchSize = $this->readUnsignedInt(); - for ($i = 0; $i < $switchSize; $i++) { - $label = $this->readInt(); + $label = $this->readUnsignedInt(); $offsets[(string) $label] = $this->readInt(); } diff --git a/tests/OutputDebugTraceTest.php b/tests/OutputDebugTraceTest.php index 4b9c9efe..ff860378 100644 --- a/tests/OutputDebugTraceTest.php +++ b/tests/OutputDebugTraceTest.php @@ -23,7 +23,7 @@ public function testCallMain() ob_end_clean(); ob_start(); - $this->javaClass->debug(); + $this->initiatedJavaClasses['OutputDebugTraceTest']->debug(); $result = ob_get_clean(); $this->assertEquals( file_get_contents(__DIR__ . '/templates/DebugTraceTest.txt'), diff --git a/tests/SwitchTest.php b/tests/SwitchTest.php new file mode 100644 index 00000000..990b58ef --- /dev/null +++ b/tests/SwitchTest.php @@ -0,0 +1,120 @@ +initiatedJavaClasses['SwitchTest'] + ->getInvoker() + ->getStaticMethods() + ->call( + 'tableswitch', + -1 + ); + $result = ob_get_clean(); + + $this->assertEquals( + 'Cat', + $result + ); + } + + public function testTableswitch_Pattern2() + { + ob_start(); + $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] + ->getInvoker() + ->getStaticMethods() + ->call( + 'tableswitch', + 0 + ); + $result = ob_get_clean(); + + $this->assertEquals( + 'Dog', + $result + ); + } + + public function testTableswitch_Pattern3() + { + ob_start(); + $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] + ->getInvoker() + ->getStaticMethods() + ->call( + 'tableswitch', + 1 + ); + $result = ob_get_clean(); + + $this->assertEquals( + 'Hamster', + $result + ); + } + + + public function testCallLookupswitch_Pattern1() + { + ob_start(); + $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] + ->getInvoker() + ->getStaticMethods() + ->call( + 'lookupswitch', + 1234 + ); + $result = ob_get_clean(); + + $this->assertEquals( + 'Lion', + $result + ); + } + + public function testCallLookupswitch_Pattern2() + { + ob_start(); + $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] + ->getInvoker() + ->getStaticMethods() + ->call( + 'lookupswitch', + 5678 + ); + $result = ob_get_clean(); + + $this->assertEquals( + 'Panda', + $result + ); + } + + public function testCallLookupswitch_Pattern3() + { + ob_start(); + $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] + ->getInvoker() + ->getStaticMethods() + ->call( + 'lookupswitch', + 9999 + ); + $result = ob_get_clean(); + + $this->assertEquals( + 'Elephant', + $result + ); + } +} \ No newline at end of file diff --git a/tests/fixtures/java/SwitchTest.java b/tests/fixtures/java/SwitchTest.java new file mode 100644 index 00000000..b15e7ee9 --- /dev/null +++ b/tests/fixtures/java/SwitchTest.java @@ -0,0 +1,32 @@ +class SwitchTest +{ + public static void tableswitch(int jump) + { + switch (jump) { + case -1: + System.out.print("Cat"); + break; + case 0: + System.out.print("Dog"); + break; + case 1: + System.out.print("Hamster"); + break; + } + } + + public static void lookupswitch(int jump) + { + switch (jump) { + case 1234: + System.out.print("Lion"); + break; + case 5678: + System.out.print("Panda"); + break; + case 9999: + System.out.print("Elephant"); + break; + } + } +} From 23500f838f907d305a01156ff5a9e2eb33c722f3 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 23:11:25 +0900 Subject: [PATCH 64/96] Supported invokespecial --- src/core/JavaClassInvoker.php | 13 ++++++++++++ src/imitation/phpjava/extended/_Object.php | 7 ++++--- src/kernel/mnemonics/_invokespecial.php | 23 +++++++++++++++------ src/utilities/Formatter.php | 2 +- src/utilities/MethodNameResolver.php | 23 +++++++++++++++++++++ src/utilities/TypeResolver.php | 4 ++-- tools/Test.class | Bin 3963 -> 3967 bytes tools/test.java | 4 ++++ 8 files changed, 64 insertions(+), 12 deletions(-) create mode 100644 src/utilities/MethodNameResolver.php diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index e809816a..3e146a98 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -47,6 +47,8 @@ class JavaClassInvoker */ private $staticFieldAccessor; + private $specialInvoked = []; + public function __construct(JavaClass $javaClass) { $this->javaClass = $javaClass; @@ -128,4 +130,15 @@ public function getStaticFields(): JVM\Field\StaticField return $this->staticFieldAccessor; } + public function isInvoked(string $name, string $signature): bool + { + return in_array($signature, $this->specialInvoked[$name] ?? [], true); + } + + public function addToSpecialInvokedList(string $name, string $signature): self + { + $this->specialInvoked[$name][] = $signature; + return $this; + } + } diff --git a/src/imitation/phpjava/extended/_Object.php b/src/imitation/phpjava/extended/_Object.php index 58dedabf..ddce9bda 100644 --- a/src/imitation/phpjava/extended/_Object.php +++ b/src/imitation/phpjava/extended/_Object.php @@ -6,11 +6,12 @@ trait _Object { + public function __construct(...$parameters) + { + } + public function __call($name, $arguments) { - if ($name === '') { - return; - } throw new NoSuchMethodException($name . ' does not exist on ' . get_class($this)); } diff --git a/src/kernel/mnemonics/_invokespecial.php b/src/kernel/mnemonics/_invokespecial.php index 38661333..f9c7365b 100644 --- a/src/kernel/mnemonics/_invokespecial.php +++ b/src/kernel/mnemonics/_invokespecial.php @@ -5,6 +5,7 @@ use PHPJava\Exceptions\NotImplementedException; use PHPJava\Utilities\BinaryTool; use PHPJava\Utilities\Formatter; +use PHPJava\Utilities\MethodNameResolver; final class _invokespecial implements OperationInterface { @@ -16,33 +17,43 @@ public function execute(): void $cpInfo = $this->getConstantPool()->getEntries(); $cp = $cpInfo[$this->readUnsignedShort()]; $nameAndTypeIndex = $cpInfo[$cp->getNameAndTypeIndex()]; - $signature = Formatter::parseSignature($cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString()); + $signature = $cpInfo[$nameAndTypeIndex->getDescriptorIndex()]->getString(); + $parsedSignature = Formatter::parseSignature($signature); $invokerClass = $this->getStack(); $arguments = []; - for ($i = 0; $i < $signature['arguments_count']; $i++) { + for ($i = 0; $i < $parsedSignature['arguments_count']; $i++) { $arguments[] = $this->getStack(); } krsort($arguments); $methodName = $cpInfo[$nameAndTypeIndex->getNameIndex()]->getString(); + if ($this->javaClassInvoker->isInvoked($methodName, $signature)) { + return; + } if ($invokerClass instanceof JavaClass) { -// $result = $invokerClass->getInvoker()->getDynamicMethods() -// ->call($methodName, ...$arguments); + $result = $invokerClass->getInvoker()->getDynamicMethods() + ->call( + $methodName, + ...$arguments + ); } else { $result = call_user_func_array( [ $invokerClass, - $methodName + MethodNameResolver::resolve($methodName), ], $arguments ); } - if ($signature[0]['type'] !== 'void') { + $this->javaClassInvoker + ->addToSpecialInvokedList($methodName, $signature); + + if ($parsedSignature[0]['type'] !== 'void') { $this->pushStack($result); } } diff --git a/src/utilities/Formatter.php b/src/utilities/Formatter.php index 2eae14f9..f995ea6f 100644 --- a/src/utilities/Formatter.php +++ b/src/utilities/Formatter.php @@ -79,7 +79,7 @@ public static function buildArgumentsSignature($signatures): string if ($signature['type'] === 'class') { $build .= 'L' . str_replace('/', '.', $signature['class_name']); } else { - $build .= TypeResolver::resolveType($signature['type']); + $build .= TypeResolver::resolve($signature['type']); } $string .= $build . ';'; } diff --git a/src/utilities/MethodNameResolver.php b/src/utilities/MethodNameResolver.php new file mode 100644 index 00000000..c4629156 --- /dev/null +++ b/src/utilities/MethodNameResolver.php @@ -0,0 +1,23 @@ + '', + ]; + + + public static function resolve(string $name): string + { + $flipped = array_flip(static::PHP_METHOD_MAP); + if (isset($flipped[$name])) { + return $flipped[$name]; + } + return $name; + } + +} diff --git a/src/utilities/TypeResolver.php b/src/utilities/TypeResolver.php index 0957d2dd..b02a265c 100644 --- a/src/utilities/TypeResolver.php +++ b/src/utilities/TypeResolver.php @@ -36,7 +36,7 @@ public static function getMappedSignatureType($signature): string throw new TypeException('Passed undefined signature ' . $signature); } - public static function resolveType($type): string + public static function resolve($type): string { $flipped = array_flip(static::SIGNATURE_MAP); if (isset($flipped[$type])) { @@ -57,7 +57,7 @@ public static function convertPHPtoJava($arguments, $defaultJavaArgumentType = ' } if (empty($getNestedValues)) { $flipped = array_flip(static::PHP_TYPE_MAP); - $resolveType = static::SIGNATURE_MAP[static::resolveType($defaultJavaArgumentType)]; + $resolveType = static::SIGNATURE_MAP[static::resolve($defaultJavaArgumentType)]; if ($resolveType === 'class') { return [ 'type' => $resolveType, diff --git a/tools/Test.class b/tools/Test.class index 18f891acdbd973b448ec597cdf8593cf2efb5a8e..c97087f8297dd41f67b8d09f51bb74966bb44261 100644 GIT binary patch delta 599 zcmW-eTS$~q6otQaew{y^Y^H*-AQg+SNJ1l|G({>?gosQ9EA6Q;2%Hj1k~Fg{vzz^9 zH%qgN6$qIRU5uiH5TX)-V36=3q%i8msL;R;v0<&n+Izt{dru`!CqBsX#fdyNAo77! zufUfOn1y4tpD0|5abDQBB0Aoxd0vk%MGL+67E`_77BjpgH^t4h>CF^*y}o1>dR5jb zwoVD9|D6i&g`1+v{x9wxr+zO%_OXm=mb0G>4%lD~WgKD~huJ{`yEsA>jdtQF2RUXt zO;#PZb%HZAbB>c-q=l=TqMOs)v2HJC>9d{3v@*bX25Do63%sM94|Y1jB}Tc-SUp$x zW}`po;3wCZqg151&mvj2VZo#?QE!#di~8!ld)d>}Jx0 z`D<#3m^%4PgN$iZlxfin)1?^mRDScy@{j^1qM(`395bb$BZZuh;+-_jcUD=>QG(qh z_OJ2N_O(8j?Jngm6^gPqjqM+v8Kc?BI9f!k787TAu9kY^aU-VQqKf3Rpw;}a{d9Gs?UAdG&Ms(4FL5nnARMwbTmRXVg zW}Br&X%JF21foQsK?c!{SPWiBP(cU=6(I@LXE*1ZcR4Sd_ix5*#?!U_WY|avq7(>w zoBZj4M2yuw5^%jbf1WQ$fCb)Tf3`BbF^geu)?%Kw)XjDath0hjuiu~P&RyBU*8jTP z>MFL)X;ph8ZnpNsrrZNg!$HzG#4--Ef+MUVV(oQo=NLOU!7fg+kEoqC*vTo5(`Y-V zIYSfYEMDd;S7_$Ct!{Ik`?S!*1^Q^EpNkA|i6Of+Vz)+V;~iHS!y`^RlU(C-1076R z`!qNB$xVK9OVBAFcNE~R(&$o%ZY}1XmheDf9x9g}<f)_>8P_vDXo$GpGocwK&2IQ;96p%Jvsrjn%ic$;z0q!n_-~a#s diff --git a/tools/test.java b/tools/test.java index 202b4619..8197ac07 100644 --- a/tools/test.java +++ b/tools/test.java @@ -8,6 +8,10 @@ class Test { static int c = 5; static String b = "Hello World"; + public Test() { + + } + /** * test for "Integer" value * From ccb1326836072538f9be53c979dac3ca9b2e9295 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 23:24:22 +0900 Subject: [PATCH 65/96] WIP commit --- src/core/JavaClassInvoker.php | 20 ++++++++++++++++++++ src/core/jvm/field/FieldGettable.php | 13 +++++++++++++ src/core/jvm/field/FieldSettable.php | 1 + src/core/jvm/field/StaticField.php | 27 +++------------------------ src/imitation/java/lang/Throwable.php | 5 +++++ tools/test.php | 8 ++++++++ 6 files changed, 50 insertions(+), 24 deletions(-) diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 3e146a98..8c6989ef 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -105,6 +105,26 @@ public function __construct(JavaClass $javaClass) } } + public function construct(): self + { + if (isset($this->staticMethods[''])) { + $this->getStaticMethods()->call(''); + } + + // reset dynamic fields + $this->dynamicFieldAccessor = new JVM\Field\DynamicField( + $this, + [] + ); + + $this->dynamicMethodAccessor = new JVM\Invoker\DynamicMethodInvoker( + $this, + $this->dynamicMethods + ); + + return $this; + } + public function getJavaClass(): JavaClass { return $this->javaClass; diff --git a/src/core/jvm/field/FieldGettable.php b/src/core/jvm/field/FieldGettable.php index 07101d4f..8716a42d 100644 --- a/src/core/jvm/field/FieldGettable.php +++ b/src/core/jvm/field/FieldGettable.php @@ -2,11 +2,24 @@ namespace PHPJava\Core\JVM\Field; use PHPJava\Core\JavaClassInvoker; +use PHPJava\Imitation\java\lang\_String; +use PHPJava\Imitation\java\lang\NoSuchFieldException; trait FieldGettable { + /** + * @param $name + * @return mixed + * @throws NoSuchFieldException + */ public function get(string $name) { + if (!isset($this->fields[$name])) { + throw new NoSuchFieldException('Get to undefined field ' . $name); + } + if ($this->fields[$name] instanceof _String) { + return (string) $this->fields[$name]; + } return $this->fields[$name]; } } diff --git a/src/core/jvm/field/FieldSettable.php b/src/core/jvm/field/FieldSettable.php index 0eee6bcd..7b1300c6 100644 --- a/src/core/jvm/field/FieldSettable.php +++ b/src/core/jvm/field/FieldSettable.php @@ -8,5 +8,6 @@ trait FieldSettable public function set(string $name, $value) { $this->fields[$name] = $value; + return $this; } } diff --git a/src/core/jvm/field/StaticField.php b/src/core/jvm/field/StaticField.php index 0ecdf1d8..a1d12159 100644 --- a/src/core/jvm/field/StaticField.php +++ b/src/core/jvm/field/StaticField.php @@ -3,38 +3,17 @@ use PHPJava\Core\JavaClassInvoker; use PHPJava\Imitation\java\lang\_String; -use PHPJava\Imitation\java\lang\NoSuchFieldException; class StaticField { - public $fields = []; + use FieldGettable; + use FieldSettable; private $javaClassInvoker; + public $fields = []; public function __construct(JavaClassInvoker $javaClassInvoker) { $this->javaClassInvoker = $javaClassInvoker; } - - /** - * @param $name - * @return mixed - * @throws NoSuchFieldException - */ - public function get(string $name) - { - if (!isset($this->fields[$name])) { - throw new NoSuchFieldException('Get to undefined static field ' . $name); - } - if ($this->fields[$name] instanceof _String) { - return (string) $this->fields[$name]; - } - return $this->fields[$name]; - } - - public function set(string $name, $value) - { - $this->fields[$name] = $value; - return $this; - } } diff --git a/src/imitation/java/lang/Throwable.php b/src/imitation/java/lang/Throwable.php index 126dc9d5..06858171 100644 --- a/src/imitation/java/lang/Throwable.php +++ b/src/imitation/java/lang/Throwable.php @@ -5,6 +5,11 @@ class Throwable extends \Exception { use \PHPJava\Imitation\PHPJava\Extended\_Object; + public function __construct($message = "", $code = 0, Throwable $previous = null) + { + parent::__construct($message, $code, $previous); + } + public function __toString(): string { return $this->getMessage(); diff --git a/tools/test.php b/tools/test.php index 3fb8c8c5..c30fc73a 100644 --- a/tools/test.php +++ b/tools/test.php @@ -9,6 +9,14 @@ new \PHPJava\Core\JavaClassReader(__DIR__ . '/Test.class') ); + +var_dump( + $javaClass->getInvoker() + ->construct() + ->getDynamicFields() + ->get('z') +); + $javaClass->getInvoker()->getStaticFields() ->set('c', 100) ->set('b', 'New String'); From 7fcc288d8d1fddbe276180ecf0b2e75831c8cf94 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 23:44:11 +0900 Subject: [PATCH 66/96] Support construction --- src/core/JavaClassInvoker.php | 9 ++++++--- src/core/jvm/field/DynamicField.php | 2 +- src/core/jvm/field/FieldGettable.php | 1 + src/kernel/mnemonics/_invokespecial.php | 6 +++--- src/kernel/mnemonics/_putfield.php | 8 +++----- tools/test.php | 8 -------- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 8c6989ef..944265c0 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -107,9 +107,6 @@ public function __construct(JavaClass $javaClass) public function construct(): self { - if (isset($this->staticMethods[''])) { - $this->getStaticMethods()->call(''); - } // reset dynamic fields $this->dynamicFieldAccessor = new JVM\Field\DynamicField( @@ -122,6 +119,12 @@ public function construct(): self $this->dynamicMethods ); + if (isset($this->dynamicMethods[''])) { + $this->getDynamicMethods()->call( + '' + ); + } + return $this; } diff --git a/src/core/jvm/field/DynamicField.php b/src/core/jvm/field/DynamicField.php index 38d266f9..9abedf5c 100644 --- a/src/core/jvm/field/DynamicField.php +++ b/src/core/jvm/field/DynamicField.php @@ -9,7 +9,7 @@ class DynamicField implements FieldInterface use FieldSettable; private $javaClassInvoker; - private $fields = []; + public $fields = []; public function __construct(JavaClassInvoker $javaClassInvoker, array $fields) { diff --git a/src/core/jvm/field/FieldGettable.php b/src/core/jvm/field/FieldGettable.php index 8716a42d..d76bc848 100644 --- a/src/core/jvm/field/FieldGettable.php +++ b/src/core/jvm/field/FieldGettable.php @@ -15,6 +15,7 @@ trait FieldGettable public function get(string $name) { if (!isset($this->fields[$name])) { + debug_print_backtrace(); throw new NoSuchFieldException('Get to undefined field ' . $name); } if ($this->fields[$name] instanceof _String) { diff --git a/src/kernel/mnemonics/_invokespecial.php b/src/kernel/mnemonics/_invokespecial.php index f9c7365b..a0ad9508 100644 --- a/src/kernel/mnemonics/_invokespecial.php +++ b/src/kernel/mnemonics/_invokespecial.php @@ -34,6 +34,9 @@ public function execute(): void return; } + $this->javaClassInvoker + ->addToSpecialInvokedList($methodName, $signature); + if ($invokerClass instanceof JavaClass) { $result = $invokerClass->getInvoker()->getDynamicMethods() ->call( @@ -50,9 +53,6 @@ public function execute(): void ); } - $this->javaClassInvoker - ->addToSpecialInvokedList($methodName, $signature); - if ($parsedSignature[0]['type'] !== 'void') { $this->pushStack($result); } diff --git a/src/kernel/mnemonics/_putfield.php b/src/kernel/mnemonics/_putfield.php index c5a69063..0b67fb88 100644 --- a/src/kernel/mnemonics/_putfield.php +++ b/src/kernel/mnemonics/_putfield.php @@ -12,15 +12,13 @@ final class _putfield implements OperationInterface public function execute(): void { $cpInfo = $this->getConstantPool()->getEntries(); - $cp = $cpInfo[$this->readUnsignedShort()]; $class = $cpInfo[$cp->getNameAndTypeIndex()]; - + $value = $this->getStack(); $name = $cpInfo[$class->getNameIndex()]->getString(); - $objectref = $this->getStack(); - - $objectref->setInstance($name, $value); + + $objectref->getInvoker()->getDynamicFields()->set($name, $value); } } diff --git a/tools/test.php b/tools/test.php index c30fc73a..3fb8c8c5 100644 --- a/tools/test.php +++ b/tools/test.php @@ -9,14 +9,6 @@ new \PHPJava\Core\JavaClassReader(__DIR__ . '/Test.class') ); - -var_dump( - $javaClass->getInvoker() - ->construct() - ->getDynamicFields() - ->get('z') -); - $javaClass->getInvoker()->getStaticFields() ->set('c', 100) ->set('b', 'New String'); From c536240dceab8888d994e0cbb7bc8bb0f298e3a8 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Tue, 26 Feb 2019 23:54:27 +0900 Subject: [PATCH 67/96] Add construction tests --- tests/AccessStaticFieldTest.php | 4 +-- tests/ConstructTest.php | 40 ++++++++++++++++++++++++++ tests/fixtures/java/ConstructTest.java | 4 +++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 tests/ConstructTest.php create mode 100644 tests/fixtures/java/ConstructTest.java diff --git a/tests/AccessStaticFieldTest.php b/tests/AccessStaticFieldTest.php index 85bdf969..1d487cf4 100644 --- a/tests/AccessStaticFieldTest.php +++ b/tests/AccessStaticFieldTest.php @@ -17,8 +17,8 @@ public function testGetPuttedField() public function testOverwriteField() { - $this->javaClass->getInvoker()->getStaticFields()->set('number', 1000); - $this->javaClass->getInvoker()->getStaticFields()->set('string', 'New String!'); + $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->set('number', 1000); + $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->set('string', 'New String!'); $this->assertEquals(1000, $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('number')); $this->assertEquals('New String!', $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('string')); } diff --git a/tests/ConstructTest.php b/tests/ConstructTest.php new file mode 100644 index 00000000..784d7845 --- /dev/null +++ b/tests/ConstructTest.php @@ -0,0 +1,40 @@ +initiatedJavaClasses['ConstructTest'] + ->getInvoker() + ->construct() + ->getDynamicFields() + ->get('text'); + + $this->assertEquals('Default Text', $text); + + $text = $this->initiatedJavaClasses['ConstructTest'] + ->getInvoker() + ->getDynamicFields() + ->set('text', 'New Text') + ->get('text'); + + $this->assertEquals('New Text', $text); + + // Re-construction will be changed to default text + + $text = $this->initiatedJavaClasses['ConstructTest'] + ->getInvoker() + ->construct() + ->getDynamicFields() + ->get('text'); + + $this->assertEquals('Default Text', $text); + } +} diff --git a/tests/fixtures/java/ConstructTest.java b/tests/fixtures/java/ConstructTest.java new file mode 100644 index 00000000..4c01f6e1 --- /dev/null +++ b/tests/fixtures/java/ConstructTest.java @@ -0,0 +1,4 @@ +class ConstructTest +{ + public String text = "Default Text"; +} From a088370b91f46437123d79698f522fb7280a069f Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 00:00:30 +0900 Subject: [PATCH 68/96] Remove used tools --- src/core/jvm/field/DynamicField.php | 2 +- src/core/jvm/field/StaticField.php | 2 +- tools/Test.class | Bin 3967 -> 0 bytes tools/TestEmulates.class | Bin 190 -> 0 bytes tools/test.java | 379 ---------------------------- tools/test.php | 25 -- 6 files changed, 2 insertions(+), 406 deletions(-) delete mode 100644 tools/Test.class delete mode 100644 tools/TestEmulates.class delete mode 100644 tools/test.java delete mode 100644 tools/test.php diff --git a/src/core/jvm/field/DynamicField.php b/src/core/jvm/field/DynamicField.php index 9abedf5c..38d266f9 100644 --- a/src/core/jvm/field/DynamicField.php +++ b/src/core/jvm/field/DynamicField.php @@ -9,7 +9,7 @@ class DynamicField implements FieldInterface use FieldSettable; private $javaClassInvoker; - public $fields = []; + private $fields = []; public function __construct(JavaClassInvoker $javaClassInvoker, array $fields) { diff --git a/src/core/jvm/field/StaticField.php b/src/core/jvm/field/StaticField.php index a1d12159..95bad9d7 100644 --- a/src/core/jvm/field/StaticField.php +++ b/src/core/jvm/field/StaticField.php @@ -10,7 +10,7 @@ class StaticField use FieldSettable; private $javaClassInvoker; - public $fields = []; + private $fields = []; public function __construct(JavaClassInvoker $javaClassInvoker) { diff --git a/tools/Test.class b/tools/Test.class deleted file mode 100644 index c97087f8297dd41f67b8d09f51bb74966bb44261..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3967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LwpXo6@E-7eu%$Yt}X*`T=t=CKmx*Bap zLn9-hw4u?Si?RkOSnkSqUGbSVUzR7!V@hF{C#$5C_S*B94;8&xQurK%=u@^S2_Cp2 zYn^zGNd|0Ua>XzM9hiyD@Zos|K^G}6Vl}qoStR&C*}+$64>@|V1uv7blh7{y?Z!Ur z!5er5N3a*~;#J<@ui*n?&*F8QBjsc4$0fXp&u|b|aR|S`Vf>!l*YFlT$J@BhH_+cH z`7a#Bzj;gFl#d`B7k0jPTsR?e_>#%Pdtw6K7Z2h?QONhhY`zl8aZXg@f@sA>5ydB> z1DC~CToK#wGqDq&i9Ps**pI8?Abur|;@9FBekb~Hjmi5*aS4ACf57MBOC%X<*A*N7 zqPXxkWfcCYOTj|0zWt(s)385%GLRIz(T{$kC%BRAm{G8)ek*!=4 zIm!*;R&I$Ln-F=nJTcZbOXS`#}06_4h?HGJfmT)P?>**{IuIp#BJ1T zc$Sk}SauVmZo*!zVV!e;*PC&-j0LX|^wF0XKY$5v4WkA$1TqW-Fh^o&($JLVVU^`m zFkO=mGc@F78c=5}z7>VY1Apv@$*_qjFvK)uaU3JOme({Ww@Jvh?t@@zkHX~TEN{Y8=G}-SJI&p~%KsBF$os zlf>eex=5^wW60M<%GPRmk%?KT6m$9X_2EfThNYqc%S07ciFtTN)F3Dppj9kFRMeqE z)MKmg*r8(nen_9*B+g{@bd0yJbF3SBnOLs~(a4i+$vlIm fTRvn6>K8E8U3CG)Lyw@;OGc-ko#bk@wjcU01|(Ri diff --git a/tools/TestEmulates.class b/tools/TestEmulates.class deleted file mode 100644 index 9eaac64e9085b332141e300a9c629cfbc400f4f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 190 zcmX^0Z`VEs1_l!bUM>b^1}=66ZgvJ9Mg}&U%)HDJJ4Oa(4b3n{1{UZ1lvG9rexJ;| zRKL>Pq|~C2#H1Xc2v=}^X;E^jTPBFZS&~{@qL-CemdL}v!obSNz!L%#aLp~vNd(F; zG6;aA^m7vP()In5vQm>v7!(+ofVP4FBM<}i0BJTLOBP6jL|C=9GcaxhOS1z>Hn1Q_ LiUY`FV&DV-$c!So diff --git a/tools/test.java b/tools/test.java deleted file mode 100644 index 8197ac07..00000000 --- a/tools/test.java +++ /dev/null @@ -1,379 +0,0 @@ -class TestEmulates { - -} - -class Test { - - long z = -22222222222222222L; - static int c = 5; - static String b = "Hello World"; - - public Test() { - - } - - /** - * test for "Integer" value - * - * @param value - * @return - */ - public int testInt (int value) { - - System.out.println(this.testPrivateInteger(value)); - return value; - } - - /** - * test for "Short" value - * - * @param value - * @return - */ - public short testShort (short value) { - return value; - } - - /** - * test for "Long" value - * - * @param value - * @return - */ - public long testLong (long value) { - return value; - } - - /** - * test for "Float" value - * - * @param value - * @return - */ - public float testLong (float value) { - return value; - } - - /** - * test for "Double" value - * - * @param value - * @return - */ - public double testLong (double value) { - return value; - } - - /** - * test for "Char" value - * - * @param value - * @return - */ - public char testChar (char value) { - return value; - } - - /** - * test for "Byte" value - * - * @param value - * @return - */ - public byte testByte (byte value) { - return value; - } - - /** - * test for "Boolean" value - * - * @param value - * @return - */ - public boolean testBoolean (boolean value) { - return value; - } - - /** - * test for "String" value - * - * @param value - * @return - */ - public String testString (String value) { - return value; - } - - /** - * main method - * - * @param args - */ - public static void main (String[] args) { - System.out.println((new java.lang.Object()).toString()); - System.out.println("かるびぃ" + args[2]); - String x = "String"; - - // new instance - Test _a = new Test(); - System.out.println(_a.testMe(Integer.parseInt(args[1]), "Text", 1, 2, 3, Integer.parseInt(args[2]))); - System.out.println("なんでや〜〜〜〜〜〜〜〜"); - // test call - // _a.javaTest(); - - - int t = 2; - //t *= 1; - //t = ~1; - t <<= 1; - System.out.println(t); - System.out.println(args[0]); - t >>= 1; - System.out.println(t); - t -= 1; - System.out.println(t); - t += 1; - System.out.println(t); - t = 1; - System.out.println(t); - t >>>= 1; - System.out.println(t); - t |= 1; - System.out.println(t); - t &= 1; - System.out.println(t); - t = 345321; - System.out.println((short) t); - - long t1 = 111; - t1 *= 1; - t1 = ~1; - t1 <<= 1; - t1 >>= 1; - t1 -= 1; - t1 += 1; - t1 = 1; - t1 >>>= 1; - t1 |= 1; - t1 &= 1; - - double t2 = 2; - t2 *= 1; - t2 = ~1; - t2 -= 1; - t2 += 1; - t2 = 1; - - - System.out.println(args[0]); - System.out.println(args[1]); - System.out.println(args[2]); - - /*boolean _b = false; - _b = true && true; - _b = true && false; - _b = true || true; - _b = true || false;*/ - System.out.println("文字列テスト"); - - switch (2) { - - case -2: - - System.out.println("ねこ"); - - break; - case -1: - - System.out.println("ねこ"); - - break; - case 0: - - System.out.println("こねこね"); - - break; - case 1: - - System.out.println("こねこね"); - - break; - case 2: - - System.out.println("うさぎ"); - - break; - case 3: - - System.out.println("うさぎ"); - - break; - - } - - - try { - - for (int i = 0; i < Test.c; i++) { - - StringBuilder b = new StringBuilder(); - - System.out.println("かるびぃ" + args[2]); - - switch (i + 1) { - - case -1: - - b.append("a"); - - break; - case 1: - - b.append("b"); - - break; - case 2: - - b.append("c"); - - break; - - } - - if (!x.equals(i + "")) { - - - System.out.println("Test:" + Test.b + "/" + x + "*****" + i + "/" + b); - - } - - if (i == 10) { - - throw new NullPointerException(); - - } - - } - - } catch (NullPointerException e) { - - System.out.println("ぬるぷっぷー"); - - } - - String[] test = {"4", "5", "6"}; - for (String i : test) { - - System.out.println(i); - - } - - int[] test2 = {1, 2, 3}; - for (int i : test2) { - - System.out.println(i); - - } - - long[] test3 = {1L, 2L, 3L}; - for (long i : test3) { - - System.out.println(i); - - } - - } - - public String testMe (int n, String m, int l, int i, int v, int k) { - - int j = 1; - - for (; j <= 10; j++) { - - j++; - - } - - return "Java emulate by php " + n + "/" + m + "/" + l + "/" + i + "/" + v + "/" + k + "/" + j; - - } - - public static void main (int[] args) { - - - switch (3) { - - case -20: - - System.out.println("ねこ"); - - break; - case -1111: - - System.out.println("ねこ"); - - break; - case 999: - - System.out.println("こねこね"); - - break; - case 3333: - - System.out.println("こねこね"); - - break; - case 929292: - - System.out.println("うさぎ"); - - break; - case 3: - - System.out.println("うさぎ"); - - break; - - } - - System.out.println("Called int type main " + args[0]); - System.out.println(c); - System.out.println(Test.b); - } - - private int testPrivateInteger (int value) { - return value + 1 * 2 + 3; - } - - /*public void javaTest () { - - testClass _c = new testClass(); - _c.t(); - - } - - public class testClass { - - public void t () { - - System.out.println("testClass.t method." + Test.this.z); - - testClass2 _c = new testClass2(); - _c.t(); - - - } - - public class testClass2 { - - public void t () { - - System.out.println("testClass2.t method." + Test.this.z); - - } - - } - - }*/ - -} \ No newline at end of file diff --git a/tools/test.php b/tools/test.php deleted file mode 100644 index 3fb8c8c5..00000000 --- a/tools/test.php +++ /dev/null @@ -1,25 +0,0 @@ -getInvoker()->getStaticFields() - ->set('c', 100) - ->set('b', 'New String'); - -// var_dump($javaClass->getInvoker()->getDynamicMethods()->testMe(1111, 'いかりのねこ', 3333, 4444, 5555, 7777)); -$javaClass->getInvoker()->getStaticMethods()->call( - 'main', - [99999, 55555, 333333] -); -// -//var_dump($javaClass->getInvoker()->getStaticFields()->get('c')); -//var_dump($javaClass->getInvoker()->getStaticFields()->get('b')); - -$javaClass->debug(); From fe860de7eafb4979f2674af188d13f5b21a2e763 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 00:12:18 +0900 Subject: [PATCH 69/96] Test readme --- README.md | 2 +- docs/img/phpjava.png | Bin 0 -> 175174 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 docs/img/phpjava.png diff --git a/README.md b/README.md index 21b91995..4b6e1433 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # PHPJava +

-TBD diff --git a/docs/img/phpjava.png b/docs/img/phpjava.png new file mode 100644 index 0000000000000000000000000000000000000000..a8341afc480238284a110511a181346ddc9c2a56 GIT binary patch literal 175174 zcmeFacU%-p(=XmLyDS+56a++2F^ePtK>-yL2N4Ao6LJU(B2l8@QB3D}%vsEsFo1xl zfMURi2}u$ps~|aNmff9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{VrcYa2@pOsn&AcW}9bWRUy(WBzIk6Nbu6{b-jPD?w^Rklf(D-?cfgfpW z;i?=we~IU4J-&nP-`|?~4i!&lVNub+cqfHa@{jZq^BoNT{f$yf4DsvgNG(5TB4Ni9 zDqqEIH%0Ifji4b!q$HJzN4m7o|2mn1i@&fd%P(O;IlU3DN$WO!SZBx6+0j0Q zJYAl=&&Ef))?62f6KHlAD#+hDdp`a7ChuCzsuuVF>bH zTOne(@*^EMBD2zMh4nOc{zVrls8df+*tu}4krxrIj@0nPjDNd`KwNu^{N(hdLNDCI zfqc*9MxL6q!USu~9(;yi3ag5qeutqryp9j0~ltH&jc}m5#u3-9HT2jfCzFOOk Ur}g(ps;g|O Date: Wed, 27 Feb 2019 00:14:04 +0900 Subject: [PATCH 70/96] Fix logo --- README.md | 2 +- docs/img/phpjava.jpg | Bin 0 -> 54760 bytes docs/img/phpjava.png | Bin 175174 -> 0 bytes 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 docs/img/phpjava.jpg delete mode 100644 docs/img/phpjava.png diff --git a/README.md b/README.md index 4b6e1433..3b211375 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # PHPJava -

+

diff --git a/docs/img/phpjava.jpg b/docs/img/phpjava.jpg new file mode 100644 index 0000000000000000000000000000000000000000..333eee5fa65eadcd1ea55db25b340a14ed3f5c5a GIT binary patch literal 54760 zcmeFacU)83@;JH?1sh^R6bmRQO79>DQ4tUkL0afJ5CT#|M_QuC!VyKJD=4UdbRu19 zR75&RR}fK3LKR792_bnaK|OlE=iYPf`@Y|Me>^vzy|Y)JHEU+pteLeJjJJ$WJmne} z9ql1VR~Hh2AZRVb$+i_@2XAcP4`Snk*0A0o$d+yQ_jf0@!(a2P0(qn%@PvfG?a3y? zdfyJ-V?!LF)nChIgWtE%dfFuj65jmn_k*q>Ew-|ApfSoOW`?ZGS6L8rklz|6`o<1J$f+Q{k&LR}YH z#rO(*{uw{GK>4eK{-;o;u6k(+1dwrxDyw(Z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Ef))?62f6KHlAD#+hDdp`a7ChuCzsuuVF>bH zTOne(@*^EMBD2zMh4nOc{zVrls8df+*tu}4krxrIj@0nPjDNd`KwNu^{N(hdLNDCI zfqc*9MxL6q!USu~9(;yi3ag5qeutqryp9j0~ltH&jc}m5#u3-9HT2jfCzFOOk Ur}g(ps;g|O Date: Wed, 27 Feb 2019 00:15:53 +0900 Subject: [PATCH 71/96] Change logo size --- docs/img/phpjava.jpg | Bin 54760 -> 34858 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/img/phpjava.jpg b/docs/img/phpjava.jpg index 333eee5fa65eadcd1ea55db25b340a14ed3f5c5a..739b387f6f0b506061d700822ed9b2295b100759 100644 GIT binary patch literal 34858 zcmeFZc|4Tw_c(k@C6%;^R$8@7Se>jsK0mc9 zcGeK2tqqAl5VQv3;@Avvf)EGzK^!}vRZC$AvgFwLBW%xc_*gp7IJACgBuG_lXa#Em z+OQOZto~q^V|7C}q4jIltl?g>o|}99rgdxAZQ|oyzn+&*V9OT1En5UOtzWvny_O?? ze{%4wTgS73XXAzq8@F!Quwg6vv0>|Sl}-Om1FVW9b3_voB7FW5vo~- zIX4cT4!>xn_Bz2sj=vevkDkuG`KHBlfU17zVdAa4h_|hSGfDXsZ9}sL)?T+CB^SJF zAD)xfFtqW$6PZ$2*+HJ)1g%&Bpk28H6W8ihvP&TBmE61%K;XJ>%POgBp zB7MNJ&+U4csy-jeU1mynH5&k~gR-xi0T2oNR%!@24|M+z5dJ*`hyDVA)dj8RT^|zr{OatdMfI+KK&?e@6H|D{8uW7$7fq@t7faBcgyd@C z!#+>sb8p7(xl^0aNmh`o^rT77f(Gqr85;i+qj5sz$eT+E=(Ed zl-tHF--|olkxMO;!_17ZAWdQ`3sTGd;A<|}sc3zW+iM_D&0}I}rn74v*QBYP_zfr> zR^vASA3Ej~<2?&r7@A!!nsnvJwB1Zrs2s^pJF)?b71VxHsH8YN(BIh8-o=Cl7S6ku zMP!#R2!6Jlf)nBg1Yu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EA&&iO(m$FL@1wSp zS6{L@pSsRN=UyhX1rA&NyIX$A_}VscY=E5)kX(Mvh1i!SOdN8uebQp2w}3LGjJeXYb{ yhTJI}q}F2*k;)5z{63F}cvH$llq=)!#Ia0X+sIJxO1u&n4nHzhf4PFMo&N( Date: Wed, 27 Feb 2019 00:18:25 +0900 Subject: [PATCH 72/96] Update --- docs/img/phpjava.jpg | Bin 34858 -> 34856 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/img/phpjava.jpg b/docs/img/phpjava.jpg index 739b387f6f0b506061d700822ed9b2295b100759..d6c240cd8d2db9bf438dd89ba0eb5e9354cc60da 100644 GIT binary patch delta 306 zcmZ2Afoa7ArU@HaEUXMoHf}vD!kD+YS#&vzK7)mmr!NZ=0|)>~FwX$YV`PNzbiq6} z21X#wyg6DbUm9%4By2r%CO#A0A#gvjcG zd29@fK$>-Pq*T5%*qF&@Of?~lpQeGzMkWU4DJI5Ax@N{k$+{-SmMOYP=1D2KX-S5O zNoFZ2#%89IbIr6ll1-D0EzC?3H!m>T!lYuEl44+-l4P!HU}SEpYhsp~q?>4-n5b)H zVPcwUVqlbPYGO3G&RmAo5ajU5^UWPM-?CI=R3XAPQ&fGEZ&`{>o@4Dnl$Dz~Y!rL| DH)2m3 From 16c285dade8867b5bb0d57be1c66cbea94575212 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 00:18:58 +0900 Subject: [PATCH 73/96] Change height --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3b211375..63f296c0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # PHPJava -

+

From d7a0d5e9aa2b3bb65db23f5620517e6077f26bc7 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 01:04:14 +0900 Subject: [PATCH 74/96] Update readme and add dependency to composer.json --- README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++- composer.json | 3 ++- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 63f296c0..059cdb43 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,59 @@ -# PHPJava +# PHPJava - JVM Emulator by PHP +[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dwyl/esta/issues) +![Compatibility](https://img.shields.io/badge/Compatibility-7.2%20and%20greater-green.svg) +[![Build Status](https://travis-ci.org/memory-agape/php-java.png?branch=master)](https://travis-ci.org/memory-agape/php-java) +[![Total Downloads](https://poser.pugx.org/memory-agape/php-java/downloads)](https://packagist.org/packages/memory-agape/php-java) +[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

+# What is The PHPJava? +The PHPJava is experimental library which emulate JVM (a.k.a. Java Virtual Machine) by PHP. +The PHPJava proceed to read binary from pre-compiled Java file(s). + + +## Requirements +- PHP >= 7.2 +- Composer +- ext-zip + +## Not currently supported +Sorry, I do not have enough time (T_T) + +- Inner classes +- Outer classes +- Event +- Java Archive +- double/float calculation. + +## Get started + +``` +$ composer require memory-agape/php-java +``` + +### Get/Set a static fields +TBD + +### Call a static method +TBD + +### Get/Set a dynamic fields +TBD + +### Call a dynamic method +TBD + +### Output PHPJava operations +TBD + +## PHP problems +TBD + +## Run unit tests + +``` +./vendor/bin/phpunit tests +``` + +## Reference +- [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) diff --git a/composer.json b/composer.json index 5ad5404e..918b1bc4 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,8 @@ } ], "require": { - "php": ">=7.2" + "php": ">=7.2", + "ext-zip": "*" }, "autoload": { "psr-4": { From 562c2c1bd875afc6001d9da3cde838d8269f9279 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 01:11:48 +0900 Subject: [PATCH 75/96] Update readme --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 059cdb43..dcd7c435 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ # What is The PHPJava? The PHPJava is experimental library which emulate JVM (a.k.a. Java Virtual Machine) by PHP. The PHPJava proceed to read binary from pre-compiled Java file(s). - +This project reference to [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) documentation when We makes. ## Requirements - PHP >= 7.2 @@ -20,10 +20,15 @@ The PHPJava proceed to read binary from pre-compiled Java file(s). Sorry, I do not have enough time (T_T) - Inner classes +- Annotations +- Extends other class +- Implements - Outer classes - Event - Java Archive - double/float calculation. +- Many built-in libraries (ex. java.lang.xxx, java.io.xxx and so on) + ## Get started From c05659470ed4fe2671d98ae100e7867ab2127fa8 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 01:16:26 +0900 Subject: [PATCH 76/96] Update readme --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dcd7c435..badf30cd 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,12 @@

# What is The PHPJava? -The PHPJava is experimental library which emulate JVM (a.k.a. Java Virtual Machine) by PHP. -The PHPJava proceed to read binary from pre-compiled Java file(s). +The PHPJava is experimental library which emulate JVM (a.k.a. Java Virtual Machine) by PHP 🐘 +The PHPJava proceed to read binary from pre-compiled Java file(s) ☕ This project reference to [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) documentation when We makes. +We welcoming to contributions this project 💪 + ## Requirements - PHP >= 7.2 - Composer @@ -62,3 +64,6 @@ TBD ## Reference - [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) + +## License +MIT \ No newline at end of file From 0320031750850e4517a1be7615a5b0d2df133c52 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 01:17:03 +0900 Subject: [PATCH 77/96] Add breakline --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index badf30cd..e5e4b88c 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ # What is The PHPJava? The PHPJava is experimental library which emulate JVM (a.k.a. Java Virtual Machine) by PHP 🐘 The PHPJava proceed to read binary from pre-compiled Java file(s) ☕ + This project reference to [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) documentation when We makes. We welcoming to contributions this project 💪 @@ -30,7 +31,7 @@ Sorry, I do not have enough time (T_T) - Java Archive - double/float calculation. - Many built-in libraries (ex. java.lang.xxx, java.io.xxx and so on) - +- etc... ## Get started From 0c2d85c11c6a7d6f1386fe6f6b2b11b840b039da Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 01:17:38 +0900 Subject: [PATCH 78/96] text alignment in readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index e5e4b88c..cb094637 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ # What is The PHPJava? The PHPJava is experimental library which emulate JVM (a.k.a. Java Virtual Machine) by PHP 🐘 The PHPJava proceed to read binary from pre-compiled Java file(s) ☕ - This project reference to [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) documentation when We makes. We welcoming to contributions this project 💪 From 6e685fc86ddc69a75278114b1b847e57f76a9f1b Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 01:38:53 +0900 Subject: [PATCH 79/96] WIP commit --- README.md | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 82 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cb094637..f3432ffc 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

-# What is The PHPJava? +# What is the PHPJava? The PHPJava is experimental library which emulate JVM (a.k.a. Java Virtual Machine) by PHP 🐘 The PHPJava proceed to read binary from pre-compiled Java file(s) ☕ This project reference to [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) documentation when We makes. @@ -32,17 +32,94 @@ Sorry, I do not have enough time (T_T) - Many built-in libraries (ex. java.lang.xxx, java.io.xxx and so on) - etc... -## Get started - +## Quick start +- 1) Install the PHPJava into your project. ``` $ composer require memory-agape/php-java ``` +- 2) Write Java +```java +class HelloWorld +{ + public static void main(String[] args) + { + System.out.println(args[0] + " " + args[1]); + } +} +``` + +- 3) Compile Java +``` +$ javac -UTF8 /path/to/HelloWorld.java +``` + +- 4) Call to main method as following. + +```php +getInvoker() + ->getStatic() + ->getMethods() + ->call( + 'main', + ["Hello", 'World'] + ); +``` + +- 5) Get a result +``` +$ php /path/to/HelloWorld.php +Hello World +``` + ### Get/Set a static fields -TBD + +- ex) Set or Get a static fields as follows. + +```php +getInvoker() + ->getStatic() + ->getFields(); + +// Set +$staticAccessor->set('fieldName', 'value'); + +// Get +echo $staticAccessor->get('fieldName'); +``` ### Call a static method -TBD + +- ex) Call to static method as follows. + +```php +getInvoker() + ->getStatic() + ->getMethods() + ->call( + 'methodName', + $firstArgument, + $secondArgument, + $thirdArgument, + ... + ); +``` + ### Get/Set a dynamic fields TBD From e9e780e12bd24cb8fd6c064e2f336db671ef2de8 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 01:39:37 +0900 Subject: [PATCH 80/96] Fix grammar --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f3432ffc..972426f2 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ $staticAccessor->set('fieldName', 'value'); echo $staticAccessor->get('fieldName'); ``` -### Call a static method +### Call to a static method - ex) Call to static method as follows. @@ -124,7 +124,7 @@ use PHPJava\Core\JavaClassReader; ### Get/Set a dynamic fields TBD -### Call a dynamic method +### Call to a dynamic method TBD ### Output PHPJava operations From 0aa1a66743ef28ca76d5ee695503c540a35fb98b Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 01:47:52 +0900 Subject: [PATCH 81/96] Update readme --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 972426f2..1454f264 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,22 @@ use PHPJava\Core\JavaClassReader; $thirdArgument, ... ); + +// Or if called method have return value then you can store to variable. +$result = (new JavaClass(new JavaClassReader('/path/to/HelloWorld.class'))) + ->getInvoker() + ->getStatic() + ->getMethods() + ->call( + 'methodWithSomethingReturn', + $firstArgument, + $secondArgument, + $thirdArgument, + ... + ); + +// The $result you want is output. +echo $result; ``` From 5a294b51cdc5762c4c60aba370a866c5681d5725 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 02:10:09 +0900 Subject: [PATCH 82/96] Update readme --- README.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 88 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1454f264..08e1684a 100644 --- a/README.md +++ b/README.md @@ -86,16 +86,16 @@ Hello World use PHPJava\Core\JavaClass; use PHPJava\Core\JavaClassReader; -$staticAccessor = (new JavaClass(new JavaClassReader('/path/to/HelloWorld.class'))) +$staticFieldAccessor = (new JavaClass(new JavaClassReader('/path/to/HelloWorld.class'))) ->getInvoker() ->getStatic() ->getFields(); // Set -$staticAccessor->set('fieldName', 'value'); +$staticFieldAccessor->set('fieldName', 'value'); // Get -echo $staticAccessor->get('fieldName'); +echo $staticFieldAccessor->get('fieldName'); ``` ### Call to a static method @@ -138,13 +138,95 @@ echo $result; ### Get/Set a dynamic fields -TBD +If you want to get/set dynamic fields, you need call to `construct` method on Java by PHPJava. + +- ex) Call dynamic field as following. + +```php +getInvoker()->construct(); + +$dynamicFieldAccessor = $javaClass + ->getInvoker() + ->getDynamic() + ->getFields(); + +// Set +$dynamicFieldAccessor->set('fieldName', 'value'); + +// Get +echo $dynamicFieldAccessor->get('fieldName'); +``` ### Call to a dynamic method -TBD +If you want to get/set dynamic method (same as field), you need call to `construct` method on Java by PHPJava. + +- ex) Call dynamic method as following. + +```php +getInvoker() + ->construct() + ->getDynamic() + ->getMethods(); + +$dynamicMethodAccessor + ->call( + 'methodName', + $firstArgument, + $secondArgument, + $thirdArgument, + ... + ); + +// Or if called method have return value then you can store to variable. +$dynamicMethodAccessor + ->call( + 'methodWithSomethingReturn', + $firstArgument, + $secondArgument, + $thirdArgument, + ... + ); + +// The $result you want is output. +echo $result; +``` ### Output PHPJava operations -TBD + +- Output debug trace as following if you want to show operated log. + +```php +getInvoker() + ->getStatic() + ->getMethods() + ->call( + 'main', + ["Hello", 'World'] + ); + +// Show debug traces. +$javaClass->debug(); +``` + + ## PHP problems TBD From dfcc14933957cfe091d7611a83a941b65b5b70a4 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 12:17:04 +0900 Subject: [PATCH 83/96] Update readme --- README.md | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08e1684a..011e7073 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,46 @@ $javaClass $javaClass->debug(); ``` - +- Get a debug trace is below. + +``` +[method] +public static void main(java.lang.String[]) + +[code] +<0xb2> <0x00> <0x02> <0x2a> <0x03> <0x32> <0xb6> <0x00> <0x03> <0xb2> <0x00> <0x02> <0x2a> <0x04> <0x32> <0xb6> <0x00> <0x03> <0xb2> <0x00> +<0x02> <0x2a> <0x05> <0x32> <0xb6> <0x00> <0x03> <0xb1> + +[executed] + PC | OPCODE | MNEMONIC | OPERANDS | LOCAL STORAGE +---------+--------+----------------------+------------+----------------- + 0 | 0xB2 | getstatic | 0 | 1 + 3 | 0x2A | aload_0 | 1 | 1 + 4 | 0x03 | iconst_0 | 2 | 1 + 5 | 0x32 | aaload | 3 | 1 + 6 | 0xB6 | invokevirtual | 2 | 1 + 9 | 0xB2 | getstatic | 0 | 1 + 12 | 0x2A | aload_0 | 1 | 1 + 13 | 0x04 | iconst_1 | 2 | 1 + 14 | 0x32 | aaload | 3 | 1 + 15 | 0xB6 | invokevirtual | 2 | 1 + 18 | 0xB2 | getstatic | 0 | 1 + 21 | 0x2A | aload_0 | 1 | 1 + 22 | 0x05 | iconst_2 | 2 | 1 + 23 | 0x32 | aaload | 3 | 1 + 24 | 0xB6 | invokevirtual | 2 | 1 + 27 | 0xB1 | return | 0 | 1 +---------+--------+----------------------+------------+----------------- +``` + +- **[method]** is showing called method. +- **[code]** is showing JVM's real programs. +- **[executed]** is showing executed programs. + - **PC** is showing Program Counter + - **OPCODE** is showing Operation Codes. + - **MNEMONIC** is naming Operation Codes. + - **OPERANDS** is showing stacked items on memory. + - **LOCAL STORAGE** is showing stacked items on a method. ## PHP problems TBD From 01ce8b1644f5ae3d34ebf02d95fa49040dd9ce81 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 12:18:59 +0900 Subject: [PATCH 84/96] Fix grammar --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 011e7073..8d793642 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ $javaClass $javaClass->debug(); ``` -- Get a debug trace is below. +- Outputted debug trace is below. ``` [method] From b1e2979256ef30e95c6dd52f2f212df67c1f0f67 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 12:42:44 +0900 Subject: [PATCH 85/96] Update readme --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8d793642..06e78b7b 100644 --- a/README.md +++ b/README.md @@ -261,14 +261,20 @@ public static void main(java.lang.String[]) - **[method]** is showing called method. - **[code]** is showing JVM's real programs. - **[executed]** is showing executed programs. - - **PC** is showing Program Counter + - **PC** is showing Program Counter. - **OPCODE** is showing Operation Codes. - **MNEMONIC** is naming Operation Codes. - **OPERANDS** is showing stacked items on memory. - **LOCAL STORAGE** is showing stacked items on a method. ## PHP problems -TBD +- PHP is cannot calculate big numbers because of PHP is different to the Java. + But PHPJava use `bcmath` functions and `gmp` functions to a certain extent to cover to calculate. + PHPJava return valued is mixed why therefore We recommend to cast to `string` on PHPJava. + +- PHPとJavaは型が異なる問題を抱えており、PHPJavaでは完全にカバーすることはできません。 +下記はPHP, PHPJavaとJavaの型の比較表です。 + ## Run unit tests From 2366d4330a245964b2c87e73abee4c10c5ba6951 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 12:43:34 +0900 Subject: [PATCH 86/96] Fix grammar --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06e78b7b..41dcd38c 100644 --- a/README.md +++ b/README.md @@ -268,7 +268,7 @@ public static void main(java.lang.String[]) - **LOCAL STORAGE** is showing stacked items on a method. ## PHP problems -- PHP is cannot calculate big numbers because of PHP is different to the Java. +- PHP is cannot calculating big numbers because of PHP is different to the Java. But PHPJava use `bcmath` functions and `gmp` functions to a certain extent to cover to calculate. PHPJava return valued is mixed why therefore We recommend to cast to `string` on PHPJava. From e56d1514f7b1e7cabed7e9fe6eadbba44326effb Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 12:52:58 +0900 Subject: [PATCH 87/96] Update readme --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 41dcd38c..6948dc68 100644 --- a/README.md +++ b/README.md @@ -275,13 +275,30 @@ public static void main(java.lang.String[]) - PHPとJavaは型が異なる問題を抱えており、PHPJavaでは完全にカバーすることはできません。 下記はPHP, PHPJavaとJavaの型の比較表です。 +- PHPJava cannot cover to Java's types completely because of PHP is different to the Java. + Java and PHPJava comparison table is below. + +|Java |PHPJava | +|:-------------:|:-------------:| +|null |null | +|boolean |\PHPJava\Kernel\Types\_Boolean (including `__toString`) | +|char |\PHPJava\Kernel\Types\_Char (including `__toString`), string | +|byte |\PHPJava\Kernel\Types\_Byte (including `__toString`), string | +|short |\PHPJava\Kernel\Types\_Short (including `__toString`), string, int | +|int |\PHPJava\Kernel\Types\_Int (including `__toString`), string, int | +|long |\PHPJava\Kernel\Types\_Long (including `__toString`), string, int | +|float |\PHPJava\Kernel\Types\_Float (including `__toString`), string, float | +|double |\PHPJava\Kernel\Types\_Char (including `__toString`), string, float | ## Run unit tests +- PHPUnit test is below. ``` ./vendor/bin/phpunit tests ``` +- PHPCS is below. + ## Reference - [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) From 0be66c176dc3a2361c57bc2c8952920d09ab6b62 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 12:53:42 +0900 Subject: [PATCH 88/96] Remove japanese which is before translation --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 6948dc68..845bf2a8 100644 --- a/README.md +++ b/README.md @@ -272,9 +272,6 @@ public static void main(java.lang.String[]) But PHPJava use `bcmath` functions and `gmp` functions to a certain extent to cover to calculate. PHPJava return valued is mixed why therefore We recommend to cast to `string` on PHPJava. -- PHPとJavaは型が異なる問題を抱えており、PHPJavaでは完全にカバーすることはできません。 -下記はPHP, PHPJavaとJavaの型の比較表です。 - - PHPJava cannot cover to Java's types completely because of PHP is different to the Java. Java and PHPJava comparison table is below. From 8385a6b7eaa81cee9862b70c5eb75d567025a50f Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 12:54:24 +0900 Subject: [PATCH 89/96] Add --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 845bf2a8..fbb6f1f9 100644 --- a/README.md +++ b/README.md @@ -268,12 +268,12 @@ public static void main(java.lang.String[]) - **LOCAL STORAGE** is showing stacked items on a method. ## PHP problems -- PHP is cannot calculating big numbers because of PHP is different to the Java. - But PHPJava use `bcmath` functions and `gmp` functions to a certain extent to cover to calculate. - PHPJava return valued is mixed why therefore We recommend to cast to `string` on PHPJava. +- The PHP is cannot calculating big numbers because of PHP is different to the Java. + But the PHPJava use `bcmath` functions and `gmp` functions to a certain extent to cover to calculate. + The PHPJava return valued is mixed why therefore We recommend to cast to `string` on the PHPJava. -- PHPJava cannot cover to Java's types completely because of PHP is different to the Java. - Java and PHPJava comparison table is below. +- The PHPJava cannot cover to Java's types completely because of PHP is different to the Java. + The Java and the PHPJava comparison table is below. |Java |PHPJava | |:-------------:|:-------------:| From e8b629ad722e784ce5d25e524eff9658e5d259b0 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 12:55:32 +0900 Subject: [PATCH 90/96] Missing escape --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index fbb6f1f9..8337185f 100644 --- a/README.md +++ b/README.md @@ -278,14 +278,14 @@ public static void main(java.lang.String[]) |Java |PHPJava | |:-------------:|:-------------:| |null |null | -|boolean |\PHPJava\Kernel\Types\_Boolean (including `__toString`) | -|char |\PHPJava\Kernel\Types\_Char (including `__toString`), string | -|byte |\PHPJava\Kernel\Types\_Byte (including `__toString`), string | -|short |\PHPJava\Kernel\Types\_Short (including `__toString`), string, int | -|int |\PHPJava\Kernel\Types\_Int (including `__toString`), string, int | -|long |\PHPJava\Kernel\Types\_Long (including `__toString`), string, int | -|float |\PHPJava\Kernel\Types\_Float (including `__toString`), string, float | -|double |\PHPJava\Kernel\Types\_Char (including `__toString`), string, float | +|boolean |\PHPJava\Kernel\Types\\_Boolean (including `__toString`) | +|char |\PHPJava\Kernel\Types\\_Char (including `__toString`), string | +|byte |\PHPJava\Kernel\Types\\_Byte (including `__toString`), string | +|short |\PHPJava\Kernel\Types\\_Short (including `__toString`), string, int | +|int |\PHPJava\Kernel\Types\\_Int (including `__toString`), string, int | +|long |\PHPJava\Kernel\Types\\_Long (including `__toString`), string, int | +|float |\PHPJava\Kernel\Types\\_Float (including `__toString`), string, float | +|double |\PHPJava\Kernel\Types\\_Char (including `__toString`), string, float | ## Run unit tests From 34cf92f10665dc684b8233a575fd0fd68bab865d Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 13:05:50 +0900 Subject: [PATCH 91/96] WIP commit --- .gitignore | 1 + composer.json | 4 +++- src/core/JavaClassInvoker.php | 1 - src/imitation/java/io/PrintStream.php | 2 -- src/imitation/java/lang/ArrayIndexOutOfBoundsException.php | 1 - src/imitation/java/lang/ClassNotFoundException.php | 1 - src/imitation/java/lang/Exception.php | 1 - src/imitation/java/lang/IndexOutOfBoundsException.php | 1 - src/imitation/java/lang/NoSuchFieldException.php | 1 - src/imitation/java/lang/NoSuchMethodException.php | 1 - src/imitation/java/lang/Number.php | 1 - src/imitation/java/lang/ReflectiveOperationException.php | 1 - src/imitation/java/lang/RuntimeException.php | 1 - src/imitation/java/lang/StringBuilder.php | 3 +-- src/imitation/java/lang/_String.php | 1 - src/imitation/phpjava/extended/_Object.php | 1 - src/kernel/core/Accumulator.php | 1 - src/utilities/ClassResolver.php | 2 +- src/utilities/MethodNameResolver.php | 2 -- 19 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index da836b39..f9fd134e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ composer.lock .phpunit.result.cache tests/caches/ !tests/caches/.gitkeep +.php_cs.cache diff --git a/composer.json b/composer.json index 918b1bc4..6876a2d2 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,8 @@ } }, "require-dev": { - "phpunit/phpunit": "^8.0" + "phpunit/phpunit": "^8.0", + "squizlabs/php_codesniffer": "^3.4", + "friendsofphp/php-cs-fixer": "^2.14" } } diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index 944265c0..d6f94d22 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -163,5 +163,4 @@ public function addToSpecialInvokedList(string $name, string $signature): self $this->specialInvoked[$name][] = $signature; return $this; } - } diff --git a/src/imitation/java/io/PrintStream.php b/src/imitation/java/io/PrintStream.php index fcf79311..fd418127 100644 --- a/src/imitation/java/io/PrintStream.php +++ b/src/imitation/java/io/PrintStream.php @@ -41,7 +41,6 @@ public function print($arg) echo $arg; return; } - } public function append($string) @@ -49,5 +48,4 @@ public function append($string) $this->sequence .= $string; return $this; } - } diff --git a/src/imitation/java/lang/ArrayIndexOutOfBoundsException.php b/src/imitation/java/lang/ArrayIndexOutOfBoundsException.php index 75e0caec..3612c5cb 100644 --- a/src/imitation/java/lang/ArrayIndexOutOfBoundsException.php +++ b/src/imitation/java/lang/ArrayIndexOutOfBoundsException.php @@ -5,5 +5,4 @@ class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException { - } diff --git a/src/imitation/java/lang/ClassNotFoundException.php b/src/imitation/java/lang/ClassNotFoundException.php index e07cce9d..11a12538 100644 --- a/src/imitation/java/lang/ClassNotFoundException.php +++ b/src/imitation/java/lang/ClassNotFoundException.php @@ -3,5 +3,4 @@ class ClassNotFoundException extends ReflectiveOperationException { - } diff --git a/src/imitation/java/lang/Exception.php b/src/imitation/java/lang/Exception.php index e7ecd478..b4411471 100644 --- a/src/imitation/java/lang/Exception.php +++ b/src/imitation/java/lang/Exception.php @@ -3,5 +3,4 @@ class Exception extends Throwable { - } diff --git a/src/imitation/java/lang/IndexOutOfBoundsException.php b/src/imitation/java/lang/IndexOutOfBoundsException.php index 8ae40f64..a9ddf6ab 100644 --- a/src/imitation/java/lang/IndexOutOfBoundsException.php +++ b/src/imitation/java/lang/IndexOutOfBoundsException.php @@ -3,5 +3,4 @@ class IndexOutOfBoundsException extends RuntimeException { - } diff --git a/src/imitation/java/lang/NoSuchFieldException.php b/src/imitation/java/lang/NoSuchFieldException.php index 75d45e84..17ddefca 100644 --- a/src/imitation/java/lang/NoSuchFieldException.php +++ b/src/imitation/java/lang/NoSuchFieldException.php @@ -3,5 +3,4 @@ class NoSuchFieldException extends ReflectiveOperationException { - } diff --git a/src/imitation/java/lang/NoSuchMethodException.php b/src/imitation/java/lang/NoSuchMethodException.php index ca696741..8f80d00d 100644 --- a/src/imitation/java/lang/NoSuchMethodException.php +++ b/src/imitation/java/lang/NoSuchMethodException.php @@ -3,5 +3,4 @@ class NoSuchMethodException extends ReflectiveOperationException { - } diff --git a/src/imitation/java/lang/Number.php b/src/imitation/java/lang/Number.php index 8deb2032..814f3010 100644 --- a/src/imitation/java/lang/Number.php +++ b/src/imitation/java/lang/Number.php @@ -3,5 +3,4 @@ class Number extends _Object { - } diff --git a/src/imitation/java/lang/ReflectiveOperationException.php b/src/imitation/java/lang/ReflectiveOperationException.php index 2245104c..d2d6b093 100644 --- a/src/imitation/java/lang/ReflectiveOperationException.php +++ b/src/imitation/java/lang/ReflectiveOperationException.php @@ -3,5 +3,4 @@ class ReflectiveOperationException extends Exception { - } diff --git a/src/imitation/java/lang/RuntimeException.php b/src/imitation/java/lang/RuntimeException.php index aa7a7f88..0927e8fd 100644 --- a/src/imitation/java/lang/RuntimeException.php +++ b/src/imitation/java/lang/RuntimeException.php @@ -3,5 +3,4 @@ class RuntimeException extends Exception { - } diff --git a/src/imitation/java/lang/StringBuilder.php b/src/imitation/java/lang/StringBuilder.php index 19a224ee..12fe17c6 100644 --- a/src/imitation/java/lang/StringBuilder.php +++ b/src/imitation/java/lang/StringBuilder.php @@ -28,5 +28,4 @@ public function __toString(): string { return $this->sequence; } - -} \ No newline at end of file +} diff --git a/src/imitation/java/lang/_String.php b/src/imitation/java/lang/_String.php index c5138132..c828fcba 100644 --- a/src/imitation/java/lang/_String.php +++ b/src/imitation/java/lang/_String.php @@ -35,5 +35,4 @@ public function __toString(): string } return $this->object->getString(); } - } diff --git a/src/imitation/phpjava/extended/_Object.php b/src/imitation/phpjava/extended/_Object.php index ddce9bda..80a794f3 100644 --- a/src/imitation/phpjava/extended/_Object.php +++ b/src/imitation/phpjava/extended/_Object.php @@ -5,7 +5,6 @@ trait _Object { - public function __construct(...$parameters) { } diff --git a/src/kernel/core/Accumulator.php b/src/kernel/core/Accumulator.php index 99389fda..55f90b1e 100644 --- a/src/kernel/core/Accumulator.php +++ b/src/kernel/core/Accumulator.php @@ -159,5 +159,4 @@ public function getProgramCounter() { return $this->pointer; } - } diff --git a/src/utilities/ClassResolver.php b/src/utilities/ClassResolver.php index 0790b049..adffe946 100644 --- a/src/utilities/ClassResolver.php +++ b/src/utilities/ClassResolver.php @@ -15,6 +15,6 @@ public static function resolve($javaPath): string foreach ($namespaces as $namespace) { $buildClassPath[] = static::MAPS[$namespace] ?? $namespace; } - return '\\PHPJava\\Imitation\\' . implode('\\', $buildClassPath); + return '\\PHPJava\\Imitation\\' . implode('\\', $buildClassPath); } } diff --git a/src/utilities/MethodNameResolver.php b/src/utilities/MethodNameResolver.php index c4629156..ec5301c0 100644 --- a/src/utilities/MethodNameResolver.php +++ b/src/utilities/MethodNameResolver.php @@ -3,7 +3,6 @@ use PHPJava\Exceptions\TypeException; - class MethodNameResolver { const PHP_METHOD_MAP = [ @@ -19,5 +18,4 @@ public static function resolve(string $name): string } return $name; } - } From a90a5cc5841813670655f3112522c7930a7d8e20 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 14:35:40 +0900 Subject: [PATCH 92/96] Add PHPCS and Fix for rules --- .gitignore | 1 - README.md | 6 +++++- phpcs.xml | 27 ++++++++++++++++++++++++++ src/imitation/java/io/PrintStream.php | 6 ++---- src/kernel/mnemonics/_getstatic.php | 1 - src/kernel/mnemonics/_lookupswitch.php | 1 - src/kernel/mnemonics/_tableswitch.php | 2 -- src/utilities/BinaryTool.php | 2 -- 8 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 phpcs.xml diff --git a/.gitignore b/.gitignore index f9fd134e..da836b39 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ composer.lock .phpunit.result.cache tests/caches/ !tests/caches/.gitkeep -.php_cs.cache diff --git a/README.md b/README.md index 8337185f..68583f94 100644 --- a/README.md +++ b/README.md @@ -294,7 +294,11 @@ public static void main(java.lang.String[]) ./vendor/bin/phpunit tests ``` -- PHPCS is below. +- PHP Coding standards testing is below. + +``` +./vendor/bin/phpcs --standard=phpcs.xml src +``` ## Reference - [Java Virtual Machine Specification](https://docs.oracle.com/javase/specs/jvms/se11/html/index.html) diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 00000000..1a2bdcec --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,27 @@ + + The PHPJava Coding Standards + + ./tests + + + + + + + ./src/kernel/types + ./src/kernel/mnemonics + ./src/kernel/structures + ./src/imitation/java/lang/_Object.php + ./src/imitation/java/lang/_String.php + ./src/imitation/phpjava/extended/_Object + + + + ./src/kernel/maps + + + + + + + diff --git a/src/imitation/java/io/PrintStream.php b/src/imitation/java/io/PrintStream.php index fd418127..ce5b77ff 100644 --- a/src/imitation/java/io/PrintStream.php +++ b/src/imitation/java/io/PrintStream.php @@ -13,8 +13,7 @@ public function println($arg) echo $arg->getString() . "\n"; return; } - if ( - is_string($arg) || + if (is_string($arg) || is_int($arg) || $arg instanceof Type || $arg instanceof \PHPJava\Imitation\java\lang\_String @@ -32,8 +31,7 @@ public function print($arg) echo $arg->getString(); return; } - if ( - is_string($arg) || + if (is_string($arg) || is_int($arg) || $arg instanceof Type || $arg instanceof \PHPJava\Imitation\java\lang\_String diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/mnemonics/_getstatic.php index 866e5da3..e510c8f8 100644 --- a/src/kernel/mnemonics/_getstatic.php +++ b/src/kernel/mnemonics/_getstatic.php @@ -23,7 +23,6 @@ public function execute(): void if ($cp instanceof _Fieldref) { foreach ($this->javaClass->getFields() as $field) { if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { - // push stack $fieldName = $cpInfo[$field->getNameIndex()]->getString(); $this->pushStack($this->javaClassInvoker->getStaticFields()->get($fieldName)); diff --git a/src/kernel/mnemonics/_lookupswitch.php b/src/kernel/mnemonics/_lookupswitch.php index 0834193a..4c2fa1a4 100644 --- a/src/kernel/mnemonics/_lookupswitch.php +++ b/src/kernel/mnemonics/_lookupswitch.php @@ -29,7 +29,6 @@ public function execute(): void } if (isset($offsets[$key])) { - // goto PC $this->setOffset($this->getProgramCounter() + $offsets[$key]); return; diff --git a/src/kernel/mnemonics/_tableswitch.php b/src/kernel/mnemonics/_tableswitch.php index 288e3458..e98cee48 100644 --- a/src/kernel/mnemonics/_tableswitch.php +++ b/src/kernel/mnemonics/_tableswitch.php @@ -28,13 +28,11 @@ public function execute(): void } if (isset($offsets[$key])) { - // goto PC $this->setOffset($this->getProgramCounter() + $offsets[$key]); return; } - // goto default $this->setOffset($this->getProgramCounter() + $offsets['default']); } diff --git a/src/utilities/BinaryTool.php b/src/utilities/BinaryTool.php index 75eecc34..54d1221e 100644 --- a/src/utilities/BinaryTool.php +++ b/src/utilities/BinaryTool.php @@ -33,7 +33,6 @@ final public static function addOneBit($bits) $bitSize = strlen($bits); for ($index = $bitSize - 1; $index >= 0 && $bits[$index] === '1'; $index--) { - // nop } @@ -70,7 +69,6 @@ final public static function negate($value, $bytes) $value = base_convert((string) $value, 10, 2); if (sprintf('%0' . $bytes . 's', $value) === str_repeat('0', $bytes)) { - // zero number was overflow return '0'; } From 859b16e916fd8ff344ecc9fc644b72608da56c45 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 14:37:31 +0900 Subject: [PATCH 93/96] Update readme --- README.md | 10 ++++++++-- composer.json | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 68583f94..ed372ee7 100644 --- a/README.md +++ b/README.md @@ -291,13 +291,19 @@ public static void main(java.lang.String[]) - PHPUnit test is below. ``` -./vendor/bin/phpunit tests +$ ./vendor/bin/phpunit tests ``` - PHP Coding standards testing is below. ``` -./vendor/bin/phpcs --standard=phpcs.xml src +$ ./vendor/bin/phpcs --standard=phpcs.xml src +``` + +- All testing is below. + +``` +$ composer run tests ``` ## Reference diff --git a/composer.json b/composer.json index 6876a2d2..764e50a0 100644 --- a/composer.json +++ b/composer.json @@ -26,5 +26,8 @@ "phpunit/phpunit": "^8.0", "squizlabs/php_codesniffer": "^3.4", "friendsofphp/php-cs-fixer": "^2.14" + }, + "scripts": { + "tests": "phpunit tests && phpcs --standard=phpcs.xml src" } } From 9a92e24c33091f6f73207199e4c0fb62f37b5f53 Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 15:11:53 +0900 Subject: [PATCH 94/96] Change chain method --- src/core/JavaClassInvoker.php | 90 +++++++++++-------------- src/core/jvm/AccessorInterface.php | 11 +++ src/core/jvm/DynamicAccessor.php | 37 ++++++++++ src/core/jvm/StaticAccessor.php | 37 ++++++++++ src/core/jvm/field/StaticField.php | 5 +- src/kernel/mnemonics/_getstatic.php | 2 +- src/kernel/mnemonics/_invokespecial.php | 2 +- src/kernel/mnemonics/_invokevirtual.php | 2 +- src/kernel/mnemonics/_putfield.php | 2 +- src/kernel/mnemonics/_putstatic.php | 2 +- tests/AccessStaticFieldTest.php | 12 ++-- tests/AccessStaticMethodTest.php | 6 +- tests/ConstructTest.php | 9 ++- tests/LoopTest.php | 12 ++-- tests/OutputDebugTraceTest.php | 3 +- tests/SwitchTest.php | 18 +++-- 16 files changed, 171 insertions(+), 79 deletions(-) create mode 100644 src/core/jvm/AccessorInterface.php create mode 100644 src/core/jvm/DynamicAccessor.php create mode 100644 src/core/jvm/StaticAccessor.php diff --git a/src/core/JavaClassInvoker.php b/src/core/JavaClassInvoker.php index d6f94d22..a6b58fed 100644 --- a/src/core/JavaClassInvoker.php +++ b/src/core/JavaClassInvoker.php @@ -1,9 +1,11 @@ javaClass = $javaClass; @@ -80,84 +76,78 @@ public function __construct(JavaClass $javaClass) } } - $this->dynamicMethodAccessor = new JVM\Invoker\DynamicMethodInvoker( + $this->dynamicAccessor = new DynamicAccessor( $this, $this->dynamicMethods ); - $this->staticMethodAccessor = new JVM\Invoker\StaticMethodInvoker( + $this->staticAccessor = new StaticAccessor( $this, $this->staticMethods ); - $this->dynamicFieldAccessor = new JVM\Field\DynamicField( - $this, - [] - ); - - $this->staticFieldAccessor = new JVM\Field\StaticField( - $this - ); - // call if (isset($this->staticMethods[''])) { - $this->getStaticMethods()->call(''); + $this->getStatic()->getMethods()->call(''); } } + /** + * @return JavaClassInvoker + */ public function construct(): self { - - // reset dynamic fields - $this->dynamicFieldAccessor = new JVM\Field\DynamicField( - $this, - [] - ); - - $this->dynamicMethodAccessor = new JVM\Invoker\DynamicMethodInvoker( + $this->dynamicAccessor = new DynamicAccessor( $this, $this->dynamicMethods ); if (isset($this->dynamicMethods[''])) { - $this->getDynamicMethods()->call( - '' - ); + $this->getDynamic()->getMethods()->call(''); } return $this; } + /** + * @return JavaClass + */ public function getJavaClass(): JavaClass { return $this->javaClass; } - public function getDynamicMethods(): InvokerInterface - { - return $this->dynamicMethodAccessor; - } - - public function getStaticMethods(): InvokerInterface - { - return $this->staticMethodAccessor; - } - - public function getDynamicFields(): FieldInterface + /** + * @return DynamicAccessor + */ + public function getDynamic(): DynamicAccessor { - return $this->dynamicFieldAccessor; + return $this->dynamicAccessor; } - public function getStaticFields(): JVM\Field\StaticField + /** + * @return StaticAccessor + */ + public function getStatic(): StaticAccessor { - return $this->staticFieldAccessor; + return $this->staticAccessor; } + /** + * @param string $name + * @param string $signature + * @return bool + */ public function isInvoked(string $name, string $signature): bool { return in_array($signature, $this->specialInvoked[$name] ?? [], true); } + /** + * @param string $name + * @param string $signature + * @return JavaClassInvoker + */ public function addToSpecialInvokedList(string $name, string $signature): self { $this->specialInvoked[$name][] = $signature; diff --git a/src/core/jvm/AccessorInterface.php b/src/core/jvm/AccessorInterface.php new file mode 100644 index 00000000..8f37fbb7 --- /dev/null +++ b/src/core/jvm/AccessorInterface.php @@ -0,0 +1,11 @@ +methodAccessor = new DynamicMethodInvoker($invoker, $methods); + $this->fieldAccessor = new DynamicField($invoker, []); + } + + public function getFields(): FieldInterface + { + return $this->fieldAccessor; + } + + public function getMethods(): InvokerInterface + { + return $this->methodAccessor; + } +} diff --git a/src/core/jvm/StaticAccessor.php b/src/core/jvm/StaticAccessor.php new file mode 100644 index 00000000..cd1d17b0 --- /dev/null +++ b/src/core/jvm/StaticAccessor.php @@ -0,0 +1,37 @@ +methodAccessor = new StaticMethodInvoker($invoker, $methods); + $this->fieldAccessor = new StaticField($invoker, []); + } + + public function getFields(): FieldInterface + { + return $this->fieldAccessor; + } + + public function getMethods(): InvokerInterface + { + return $this->methodAccessor; + } +} diff --git a/src/core/jvm/field/StaticField.php b/src/core/jvm/field/StaticField.php index 95bad9d7..191d66e3 100644 --- a/src/core/jvm/field/StaticField.php +++ b/src/core/jvm/field/StaticField.php @@ -4,7 +4,7 @@ use PHPJava\Core\JavaClassInvoker; use PHPJava\Imitation\java\lang\_String; -class StaticField +class StaticField implements FieldInterface { use FieldGettable; use FieldSettable; @@ -12,8 +12,9 @@ class StaticField private $javaClassInvoker; private $fields = []; - public function __construct(JavaClassInvoker $javaClassInvoker) + public function __construct(JavaClassInvoker $javaClassInvoker, array $fields) { $this->javaClassInvoker = $javaClassInvoker; + $this->fields = $fields; } } diff --git a/src/kernel/mnemonics/_getstatic.php b/src/kernel/mnemonics/_getstatic.php index e510c8f8..5a2484c6 100644 --- a/src/kernel/mnemonics/_getstatic.php +++ b/src/kernel/mnemonics/_getstatic.php @@ -25,7 +25,7 @@ public function execute(): void if ($cpInfo[$field->getNameIndex()]->getString() === $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString()) { // push stack $fieldName = $cpInfo[$field->getNameIndex()]->getString(); - $this->pushStack($this->javaClassInvoker->getStaticFields()->get($fieldName)); + $this->pushStack($this->javaClassInvoker->getStatic()->getFields()->get($fieldName)); return; } } diff --git a/src/kernel/mnemonics/_invokespecial.php b/src/kernel/mnemonics/_invokespecial.php index a0ad9508..5e5c5ad9 100644 --- a/src/kernel/mnemonics/_invokespecial.php +++ b/src/kernel/mnemonics/_invokespecial.php @@ -38,7 +38,7 @@ public function execute(): void ->addToSpecialInvokedList($methodName, $signature); if ($invokerClass instanceof JavaClass) { - $result = $invokerClass->getInvoker()->getDynamicMethods() + $result = $invokerClass->getInvoker()->getDynamic()->getMethods() ->call( $methodName, ...$arguments diff --git a/src/kernel/mnemonics/_invokevirtual.php b/src/kernel/mnemonics/_invokevirtual.php index 4c2f58ff..a911df31 100644 --- a/src/kernel/mnemonics/_invokevirtual.php +++ b/src/kernel/mnemonics/_invokevirtual.php @@ -33,7 +33,7 @@ public function execute(): void $methodName = $cpInfo[$cpInfo[$cp->getNameAndTypeIndex()]->getNameIndex()]->getString(); if ($invokerClass instanceof JavaClass) { - $result = $invokerClass->getInvoker()->getDynamicMethods()->call($methodName, ...$arguments); + $result = $invokerClass->getInvoker()->getDynamic()->getMethods()->call($methodName, ...$arguments); } else { $result = call_user_func_array( [ diff --git a/src/kernel/mnemonics/_putfield.php b/src/kernel/mnemonics/_putfield.php index 0b67fb88..7aa00be6 100644 --- a/src/kernel/mnemonics/_putfield.php +++ b/src/kernel/mnemonics/_putfield.php @@ -19,6 +19,6 @@ public function execute(): void $name = $cpInfo[$class->getNameIndex()]->getString(); $objectref = $this->getStack(); - $objectref->getInvoker()->getDynamicFields()->set($name, $value); + $objectref->getInvoker()->getDynamic()->getFields()->set($name, $value); } } diff --git a/src/kernel/mnemonics/_putstatic.php b/src/kernel/mnemonics/_putstatic.php index 01063eda..cffa45c6 100644 --- a/src/kernel/mnemonics/_putstatic.php +++ b/src/kernel/mnemonics/_putstatic.php @@ -18,6 +18,6 @@ public function execute(): void $class = $cpInfo[$cp->getNameAndTypeIndex()]; $fieldName = $cpInfo[$class->getNameIndex()]->getString(); - $this->javaClassInvoker->getStaticFields()->set($fieldName, $this->getStack()); + $this->javaClassInvoker->getStatic()->getFields()->set($fieldName, $this->getStack()); } } diff --git a/tests/AccessStaticFieldTest.php b/tests/AccessStaticFieldTest.php index 1d487cf4..b26c7508 100644 --- a/tests/AccessStaticFieldTest.php +++ b/tests/AccessStaticFieldTest.php @@ -11,15 +11,15 @@ class AccessStaticFieldTest extends Base public function testGetPuttedField() { - $this->assertEquals(5, $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('number')); - $this->assertEquals('Hello World', $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('string')); + $this->assertEquals(5, $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStatic()->getFields()->get('number')); + $this->assertEquals('Hello World', $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStatic()->getFields()->get('string')); } public function testOverwriteField() { - $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->set('number', 1000); - $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->set('string', 'New String!'); - $this->assertEquals(1000, $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('number')); - $this->assertEquals('New String!', $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStaticFields()->get('string')); + $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStatic()->getFields()->set('number', 1000); + $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStatic()->getFields()->set('string', 'New String!'); + $this->assertEquals(1000, $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStatic()->getFields()->get('number')); + $this->assertEquals('New String!', $this->initiatedJavaClasses['AccessStaticFieldTest']->getInvoker()->getStatic()->getFields()->get('string')); } } diff --git a/tests/AccessStaticMethodTest.php b/tests/AccessStaticMethodTest.php index afd36ba4..0fd51ee7 100644 --- a/tests/AccessStaticMethodTest.php +++ b/tests/AccessStaticMethodTest.php @@ -15,7 +15,8 @@ public function testCallMainHavingStringArguments() // call main $this->initiatedJavaClasses['AccessStaticMethodTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call( 'main', ["Hello", "World"] @@ -31,7 +32,8 @@ public function testCallMainHavingIntegerArguments() // call main $this->initiatedJavaClasses['AccessStaticMethodTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call( 'main', [1234, 5678] diff --git a/tests/ConstructTest.php b/tests/ConstructTest.php index 784d7845..2e0250ca 100644 --- a/tests/ConstructTest.php +++ b/tests/ConstructTest.php @@ -14,14 +14,16 @@ public function testDynamicField() $text = $this->initiatedJavaClasses['ConstructTest'] ->getInvoker() ->construct() - ->getDynamicFields() + ->getDynamic() + ->getFields() ->get('text'); $this->assertEquals('Default Text', $text); $text = $this->initiatedJavaClasses['ConstructTest'] ->getInvoker() - ->getDynamicFields() + ->getDynamic() + ->getFields() ->set('text', 'New Text') ->get('text'); @@ -32,7 +34,8 @@ public function testDynamicField() $text = $this->initiatedJavaClasses['ConstructTest'] ->getInvoker() ->construct() - ->getDynamicFields() + ->getDynamic() + ->getFields() ->get('text'); $this->assertEquals('Default Text', $text); diff --git a/tests/LoopTest.php b/tests/LoopTest.php index 86658f31..0a040d0c 100644 --- a/tests/LoopTest.php +++ b/tests/LoopTest.php @@ -13,7 +13,8 @@ public function testCallCalculateByFor() { $calculatedValue = $this->initiatedJavaClasses['LoopTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call('calculateByFor', 10); $this->assertEquals( "45", @@ -22,7 +23,8 @@ public function testCallCalculateByFor() $calculatedValue = $this->initiatedJavaClasses['LoopTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call('calculateByFor', 20); $this->assertEquals( "190", @@ -34,7 +36,8 @@ public function testCallCalculateByWhile() { $calculatedValue = $this->initiatedJavaClasses['LoopTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call('calculateByWhile', 10); $this->assertEquals( "45", @@ -43,7 +46,8 @@ public function testCallCalculateByWhile() $calculatedValue = $this->initiatedJavaClasses['LoopTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call('calculateByWhile', 20); $this->assertEquals( "190", diff --git a/tests/OutputDebugTraceTest.php b/tests/OutputDebugTraceTest.php index ff860378..02ebf1c1 100644 --- a/tests/OutputDebugTraceTest.php +++ b/tests/OutputDebugTraceTest.php @@ -15,7 +15,8 @@ public function testCallMain() $calculatedValue = $this->initiatedJavaClasses['OutputDebugTraceTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call( 'main', ["Hello", " ", "World"] diff --git a/tests/SwitchTest.php b/tests/SwitchTest.php index 990b58ef..f4775a1d 100644 --- a/tests/SwitchTest.php +++ b/tests/SwitchTest.php @@ -14,7 +14,8 @@ public function testCallTableswitch_Pattern1() ob_start(); $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call( 'tableswitch', -1 @@ -32,7 +33,8 @@ public function testTableswitch_Pattern2() ob_start(); $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call( 'tableswitch', 0 @@ -50,7 +52,8 @@ public function testTableswitch_Pattern3() ob_start(); $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call( 'tableswitch', 1 @@ -69,7 +72,8 @@ public function testCallLookupswitch_Pattern1() ob_start(); $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call( 'lookupswitch', 1234 @@ -87,7 +91,8 @@ public function testCallLookupswitch_Pattern2() ob_start(); $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call( 'lookupswitch', 5678 @@ -105,7 +110,8 @@ public function testCallLookupswitch_Pattern3() ob_start(); $calculatedValue = $this->initiatedJavaClasses['SwitchTest'] ->getInvoker() - ->getStaticMethods() + ->getStatic() + ->getMethods() ->call( 'lookupswitch', 9999 From 5731b68d36df0d8917bfb34462c5ad82b080256f Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 15:29:45 +0900 Subject: [PATCH 95/96] Add tests --- tests/AccessDynamicFieldTest.php | 39 ++++++++++++ tests/AccessDynamicMethodTest.php | 60 +++++++++++++++++++ tests/AccessStaticMethodTest.php | 12 ++++ .../fixtures/java/AccessDynamicFieldTest.java | 5 ++ .../java/AccessDynamicMethodTest.java | 19 ++++++ 5 files changed, 135 insertions(+) create mode 100644 tests/AccessDynamicFieldTest.php create mode 100644 tests/AccessDynamicMethodTest.php create mode 100644 tests/fixtures/java/AccessDynamicFieldTest.java create mode 100644 tests/fixtures/java/AccessDynamicMethodTest.java diff --git a/tests/AccessDynamicFieldTest.php b/tests/AccessDynamicFieldTest.php new file mode 100644 index 00000000..90f4232e --- /dev/null +++ b/tests/AccessDynamicFieldTest.php @@ -0,0 +1,39 @@ +initiatedJavaClasses['AccessDynamicFieldTest']->getInvoker()->construct(); + $this->assertEquals(5, $constructed->getDynamic()->getFields()->get('number')); + $this->assertEquals('Hello World', $constructed->getDynamic()->getFields()->get('string')); + } + + public function testOverwriteField() + { + $constructed = $this->initiatedJavaClasses['AccessDynamicFieldTest']->getInvoker()->construct(); + $constructed->getStatic()->getFields()->set('number', 1000); + $constructed->getStatic()->getFields()->set('string', 'New String!'); + $this->assertEquals(1000, $constructed->getStatic()->getFields()->get('number')); + $this->assertEquals('New String!', $constructed->getStatic()->getFields()->get('string')); + } + + public function testAffectedNewConstructingTest() + { + $constructed = $this->initiatedJavaClasses['AccessDynamicFieldTest']->getInvoker()->construct(); + $constructed->getStatic()->getFields()->set('number', 1000); + $constructed->getStatic()->getFields()->set('string', 'New String!'); + + // affected assertion + $constructed = $this->initiatedJavaClasses['AccessDynamicFieldTest']->getInvoker()->construct(); + $this->assertEquals(5, $constructed->getDynamic()->getFields()->get('number')); + $this->assertEquals('Hello World', $constructed->getDynamic()->getFields()->get('string')); + } +} diff --git a/tests/AccessDynamicMethodTest.php b/tests/AccessDynamicMethodTest.php new file mode 100644 index 00000000..705b0b60 --- /dev/null +++ b/tests/AccessDynamicMethodTest.php @@ -0,0 +1,60 @@ +initiatedJavaClasses['AccessDynamicMethodTest'] + ->getInvoker() + ->construct() + ->getDynamic() + ->getMethods() + ->call( + 'main', + ["Hello", "World"] + ); + $result = ob_get_clean(); + + $this->assertEquals("HelloWorld", $result); + } + + public function testCallMainHavingIntegerArguments() + { + ob_start(); + // call main + $this->initiatedJavaClasses['AccessDynamicMethodTest'] + ->getInvoker() + ->construct() + ->getDynamic() + ->getMethods() + ->call( + 'main', + [1234, 5678] + ); + $result = ob_get_clean(); + + $this->assertEquals(246811356, $result); + } + + public function testCallReturnTest() + { + // call main + $result = $this->initiatedJavaClasses['AccessDynamicMethodTest'] + ->getInvoker() + ->construct() + ->getDynamic() + ->getMethods() + ->call('returnTest'); + + $this->assertEquals('Return Test.', $result); + } +} diff --git a/tests/AccessStaticMethodTest.php b/tests/AccessStaticMethodTest.php index 0fd51ee7..0bd94895 100644 --- a/tests/AccessStaticMethodTest.php +++ b/tests/AccessStaticMethodTest.php @@ -42,4 +42,16 @@ public function testCallMainHavingIntegerArguments() $this->assertEquals(246811356, $result); } + + public function testCallReturnTest() + { + // call main + $result = $this->initiatedJavaClasses['AccessStaticMethodTest'] + ->getInvoker() + ->getStatic() + ->getMethods() + ->call('returnTest'); + + $this->assertEquals('Return Test.', $result); + } } diff --git a/tests/fixtures/java/AccessDynamicFieldTest.java b/tests/fixtures/java/AccessDynamicFieldTest.java new file mode 100644 index 00000000..3cb262a5 --- /dev/null +++ b/tests/fixtures/java/AccessDynamicFieldTest.java @@ -0,0 +1,5 @@ +class AccessDynamicFieldTest +{ + public int number = 5; + public String string = "Hello World"; +} diff --git a/tests/fixtures/java/AccessDynamicMethodTest.java b/tests/fixtures/java/AccessDynamicMethodTest.java new file mode 100644 index 00000000..269ca9ef --- /dev/null +++ b/tests/fixtures/java/AccessDynamicMethodTest.java @@ -0,0 +1,19 @@ +class AccessDynamicMethodTest +{ + public void main(String[] args) + { + System.out.print(args[0]); + System.out.print(args[1]); + } + + public void main(int[] args) + { + System.out.print(args[0] * 2); + System.out.print(args[1] * 2); + } + + public String returnTest() + { + return "Return Test."; + } +} From f0833fecdc56f7a428a93971d61db785025ef0cf Mon Sep 17 00:00:00 2001 From: memory-agape Date: Wed, 27 Feb 2019 15:34:48 +0900 Subject: [PATCH 96/96] Add version to composer.json --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 764e50a0..8ef609a3 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,7 @@ "description": "JVM emulator by PHP", "type": "library", "license": "MIT", + "version": "0.0.2-dev", "authors": [ { "name": "memory"