-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for KT-1305 : Add some methods for String #10
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jstrachan
added a commit
that referenced
this pull request
Mar 5, 2012
Fix for KT-1305 : Add some methods for String
Alefas
pushed a commit
that referenced
this pull request
Jun 27, 2022
add missing is InvalidLightClassDataHolder check ^KT-48773
Alefas
pushed a commit
that referenced
this pull request
Jun 28, 2022
add missing is InvalidLightClassDataHolder check ^KT-48773
ilgonmic
added a commit
that referenced
this pull request
Aug 10, 2022
ilgonmic
added a commit
that referenced
this pull request
Aug 31, 2022
ilgonmic
added a commit
that referenced
this pull request
Sep 12, 2022
ilgonmic
added a commit
that referenced
this pull request
Sep 15, 2022
ilgonmic
added a commit
that referenced
this pull request
Sep 15, 2022
ilgonmic
added a commit
that referenced
this pull request
Sep 21, 2022
ilgonmic
added a commit
that referenced
this pull request
Oct 11, 2022
ilgonmic
added a commit
that referenced
this pull request
Oct 12, 2022
jpventura
pushed a commit
to jpventura/kotlin
that referenced
this pull request
Jan 28, 2023
nikitabobko
added a commit
that referenced
this pull request
Dec 3, 2024
exception: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't transform method node: main ()V: L0 LINENUMBER 16 L0 ICONST_1 ANEWARRAY java/lang/String ASTORE 1 ALOAD 1 ICONST_0 LDC "foo" AASTORE ALOAD 1 INVOKEVIRTUAL Foo$Companion.of ([Ljava/lang/String;)LFoo; ASTORE 0 L1 LINENUMBER 18 L1 RETURN L2 LOCALVARIABLE foo LFoo; L1 L2 0 MAXSTACK = 3 MAXLOCALS = 2 File is unknown The root cause org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException was thrown at: org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyzeMainLoop(FastAnalyzer.kt:82) at org.jetbrains.kotlin.codegen.TransformationMethodVisitor.visitEnd(TransformationMethodVisitor.kt:89) at org.jetbrains.org.objectweb.asm.MethodVisitor.visitEnd(MethodVisitor.java:783) at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:772) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethod(ClassCodegen.kt:453) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generate(ClassCodegen.kt:168) at org.jetbrains.kotlin.backend.jvm.FileCodegen.lower(JvmPhases.kt:40) at org.jetbrains.kotlin.backend.common.phaser.PhaseFactoriesKt.createFilePhase$lambda$4(PhaseFactories.kt:88) at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$createSimpleNamedCompilerPhase$1.phaseBody(PhaseBuilders.kt:68) at org.jetbrains.kotlin.config.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:215) at org.jetbrains.kotlin.config.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:111) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:52) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:42) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:28) at org.jetbrains.kotlin.config.phaser.SameTypeNamedCompilerPhase.phaseBody(CompilerPhase.kt:160) at org.jetbrains.kotlin.config.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:111) at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:28) at org.jetbrains.kotlin.config.phaser.SameTypeNamedCompilerPhase.phaseBody(CompilerPhase.kt:160) at org.jetbrains.kotlin.config.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:111) at org.jetbrains.kotlin.config.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:62) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.invokeCodegen(JvmIrCodegenFactory.kt:375) at org.jetbrains.kotlin.codegen.CodegenFactory.generateModule(CodegenFactory.kt:42) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModuleInFrontendIRMode(JvmIrCodegenFactory.kt:437) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineKt.generateCodeFromIr(jvmCompilerPipeline.kt:188) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineKt.runBackend(jvmCompilerPipeline.kt:80) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineLightTreeKt.compileModule(jvmCompilerPipelineLightTree.kt:264) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineLightTreeKt.compileSingleModuleUsingFrontendIrAndLightTree(jvmCompilerPipelineLightTree.kt:231) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineLightTreeKt.compileModulesUsingFrontendIrAndLightTree(jvmCompilerPipelineLightTree.kt:86) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:143) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:40) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:102) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.kt:316) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.kt:294) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.kt:258) at org.jetbrains.kotlin.cli.common.CLICompiler$Companion.doMainNoExit(CLICompiler.kt:395) at org.jetbrains.kotlin.cli.common.CLICompiler$Companion.doMainNoExit$default(CLICompiler.kt:388) at org.jetbrains.kotlin.cli.common.CLICompiler$Companion.doMain(CLICompiler.kt:382) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:251) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.jetbrains.kotlin.preloading.Preloader.run(Preloader.java:87) at org.jetbrains.kotlin.preloading.Preloader.main(Preloader.java:44) Caused by: org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction #10 INVOKEVIRTUAL Foo$Companion.of ([Ljava/lang/String;)LFoo;: Cannot pop operand off an empty stack. current: { locals: [ #0: org.jetbrains.org.objectweb.asm.tree.analysis.SourceValue@0 #1: org.jetbrains.org.objectweb.asm.tree.analysis.SourceValue@4eba373c ] stack: size=0 [] } at org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyzeMainLoop(FastAnalyzer.kt:82) at org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyze(FastAnalyzer.kt:53) at org.jetbrains.kotlin.codegen.optimization.boxing.PopBackwardPropagationTransformer$Transformer.transform(PopBackwardPropagationTransformer.kt:58) at org.jetbrains.kotlin.codegen.optimization.boxing.PopBackwardPropagationTransformer.transform(PopBackwardPropagationTransformer.kt:41) at org.jetbrains.kotlin.codegen.optimization.transformer.CompositeMethodTransformer.transform(CompositeMethodTransformer.kt:25) at org.jetbrains.kotlin.codegen.optimization.OptimizationMethodVisitor.performTransformations(OptimizationMethodVisitor.kt:74) at org.jetbrains.kotlin.codegen.TransformationMethodVisitor.visitEnd(TransformationMethodVisitor.kt:67) ... 43 more Caused by: java.lang.IndexOutOfBoundsException: Cannot pop operand off an empty stack. at org.jetbrains.org.objectweb.asm.tree.analysis.Frame.pop(Frame.java:228) at org.jetbrains.org.objectweb.asm.tree.analysis.Frame.executeInvokeInsn(Frame.java:643) at org.jetbrains.org.objectweb.asm.tree.analysis.Frame.execute(Frame.java:573) at org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyzeInstruction(FastAnalyzer.kt:111) at org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyzeMainLoop(FastAnalyzer.kt:74) ... 49 more
nikitabobko
added a commit
that referenced
this pull request
Dec 13, 2024
exception: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: Couldn't transform method node: main ()V: L0 LINENUMBER 16 L0 ICONST_1 ANEWARRAY java/lang/String ASTORE 1 ALOAD 1 ICONST_0 LDC "foo" AASTORE ALOAD 1 INVOKEVIRTUAL Foo$Companion.of ([Ljava/lang/String;)LFoo; ASTORE 0 L1 LINENUMBER 18 L1 RETURN L2 LOCALVARIABLE foo LFoo; L1 L2 0 MAXSTACK = 3 MAXLOCALS = 2 File is unknown The root cause org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException was thrown at: org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyzeMainLoop(FastAnalyzer.kt:82) at org.jetbrains.kotlin.codegen.TransformationMethodVisitor.visitEnd(TransformationMethodVisitor.kt:89) at org.jetbrains.org.objectweb.asm.MethodVisitor.visitEnd(MethodVisitor.java:783) at org.jetbrains.org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:772) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generateMethod(ClassCodegen.kt:453) at org.jetbrains.kotlin.backend.jvm.codegen.ClassCodegen.generate(ClassCodegen.kt:168) at org.jetbrains.kotlin.backend.jvm.FileCodegen.lower(JvmPhases.kt:40) at org.jetbrains.kotlin.backend.common.phaser.PhaseFactoriesKt.createFilePhase$lambda$4(PhaseFactories.kt:88) at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$createSimpleNamedCompilerPhase$1.phaseBody(PhaseBuilders.kt:68) at org.jetbrains.kotlin.config.phaser.SimpleNamedCompilerPhase.phaseBody(CompilerPhase.kt:215) at org.jetbrains.kotlin.config.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:111) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invokeSequential(performByIrFile.kt:52) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:42) at org.jetbrains.kotlin.backend.common.phaser.PerformByIrFilePhase.invoke(performByIrFile.kt:28) at org.jetbrains.kotlin.config.phaser.SameTypeNamedCompilerPhase.phaseBody(CompilerPhase.kt:160) at org.jetbrains.kotlin.config.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:111) at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:28) at org.jetbrains.kotlin.config.phaser.SameTypeNamedCompilerPhase.phaseBody(CompilerPhase.kt:160) at org.jetbrains.kotlin.config.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:111) at org.jetbrains.kotlin.config.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:62) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.invokeCodegen(JvmIrCodegenFactory.kt:375) at org.jetbrains.kotlin.codegen.CodegenFactory.generateModule(CodegenFactory.kt:42) at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModuleInFrontendIRMode(JvmIrCodegenFactory.kt:437) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineKt.generateCodeFromIr(jvmCompilerPipeline.kt:188) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineKt.runBackend(jvmCompilerPipeline.kt:80) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineLightTreeKt.compileModule(jvmCompilerPipelineLightTree.kt:264) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineLightTreeKt.compileSingleModuleUsingFrontendIrAndLightTree(jvmCompilerPipelineLightTree.kt:231) at org.jetbrains.kotlin.cli.jvm.compiler.pipeline.JvmCompilerPipelineLightTreeKt.compileModulesUsingFrontendIrAndLightTree(jvmCompilerPipelineLightTree.kt:86) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:143) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:40) at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:102) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.kt:316) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.kt:294) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.kt:258) at org.jetbrains.kotlin.cli.common.CLICompiler$Companion.doMainNoExit(CLICompiler.kt:395) at org.jetbrains.kotlin.cli.common.CLICompiler$Companion.doMainNoExit$default(CLICompiler.kt:388) at org.jetbrains.kotlin.cli.common.CLICompiler$Companion.doMain(CLICompiler.kt:382) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:251) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.jetbrains.kotlin.preloading.Preloader.run(Preloader.java:87) at org.jetbrains.kotlin.preloading.Preloader.main(Preloader.java:44) Caused by: org.jetbrains.org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction #10 INVOKEVIRTUAL Foo$Companion.of ([Ljava/lang/String;)LFoo;: Cannot pop operand off an empty stack. current: { locals: [ #0: org.jetbrains.org.objectweb.asm.tree.analysis.SourceValue@0 #1: org.jetbrains.org.objectweb.asm.tree.analysis.SourceValue@4eba373c ] stack: size=0 [] } at org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyzeMainLoop(FastAnalyzer.kt:82) at org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyze(FastAnalyzer.kt:53) at org.jetbrains.kotlin.codegen.optimization.boxing.PopBackwardPropagationTransformer$Transformer.transform(PopBackwardPropagationTransformer.kt:58) at org.jetbrains.kotlin.codegen.optimization.boxing.PopBackwardPropagationTransformer.transform(PopBackwardPropagationTransformer.kt:41) at org.jetbrains.kotlin.codegen.optimization.transformer.CompositeMethodTransformer.transform(CompositeMethodTransformer.kt:25) at org.jetbrains.kotlin.codegen.optimization.OptimizationMethodVisitor.performTransformations(OptimizationMethodVisitor.kt:74) at org.jetbrains.kotlin.codegen.TransformationMethodVisitor.visitEnd(TransformationMethodVisitor.kt:67) ... 43 more Caused by: java.lang.IndexOutOfBoundsException: Cannot pop operand off an empty stack. at org.jetbrains.org.objectweb.asm.tree.analysis.Frame.pop(Frame.java:228) at org.jetbrains.org.objectweb.asm.tree.analysis.Frame.executeInvokeInsn(Frame.java:643) at org.jetbrains.org.objectweb.asm.tree.analysis.Frame.execute(Frame.java:573) at org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyzeInstruction(FastAnalyzer.kt:111) at org.jetbrains.kotlin.codegen.optimization.common.FastAnalyzer.analyzeMainLoop(FastAnalyzer.kt:74) ... 49 more
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding java.lang.String methods to Kotlin String class.