Guest User

Untitled

a guest
Oct 28th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.91 KB | None | 0 0
  1. Error:(490, 1) Kotlin: [Internal Error] org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: wrong code generated
  2. java.lang.NullPointerException null
  3. bytecode:
  4. @Lorg/jetbrains/annotations/NotNull;() // invisible, parameter 0
  5. L0
  6. LINENUMBER 492 L0
  7. L1
  8. LINENUMBER 493 L1
  9. L2
  10. INVOKESTATIC kotlin/jvm/internal/$PseudoInsn.FAKE_ALWAYS_FALSE_IFEQ ()I
  11. IFEQ L3
  12. L4
  13. LINENUMBER 494 L4
  14. NEW java/math/BigDecimal
  15. DUP
  16. LDC "1000000"
  17. INVOKESPECIAL java/math/BigDecimal.<init> (Ljava/lang/String;)V
  18. ASTORE 3
  19. L5
  20. LINENUMBER 495 L5
  21. LDC 2
  22. INVOKESTATIC java/math/BigDecimal.valueOf (J)Ljava/math/BigDecimal;
  23. ALOAD 3
  24. ICONST_0
  25. ICONST_2
  26. ACONST_NULL
  27. INVOKESTATIC com/deanveloper/mathkt/BigFunctionsKt.pow$default (Ljava/math/BigDecimal;Ljava/math/BigDecimal;IILjava/lang/Object;)Ljava/math/BigDecimal;
  28. ASTORE 4
  29. L6
  30. LINENUMBER 496 L6
  31. ALOAD 3
  32. ASTORE 6
  33. GETSTATIC java/math/BigDecimal.ONE : Ljava/math/BigDecimal;
  34. DUP
  35. LDC "BigDecimal.ONE"
  36. INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkExpressionValueIsNotNull (Ljava/lang/Object;Ljava/lang/String;)V
  37. ASTORE 7
  38. NOP
  39. L7
  40. ALOAD 6
  41. ALOAD 7
  42. INVOKEVIRTUAL java/math/BigDecimal.add (Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
  43. DUP
  44. LDC "this.add(other)"
  45. INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkExpressionValueIsNotNull (Ljava/lang/Object;Ljava/lang/String;)V
  46. GOTO L8
  47. L8
  48. L9
  49. LINENUMBER 496 L9
  50. ASTORE 5
  51. L10
  52. LINENUMBER 497 L10
  53. LDC 2
  54. INVOKESTATIC java/math/BigDecimal.valueOf (J)Ljava/math/BigDecimal;
  55. ALOAD 5
  56. ICONST_0
  57. ICONST_2
  58. ACONST_NULL
  59. INVOKESTATIC com/deanveloper/mathkt/BigFunctionsKt.pow$default (Ljava/math/BigDecimal;Ljava/math/BigDecimal;IILjava/lang/Object;)Ljava/math/BigDecimal;
  60. ASTORE 6
  61. L11
  62. LINENUMBER 498 L11
  63. ALOAD 4
  64. ASTORE 7
  65. ALOAD 0
  66. ALOAD 4
  67. ILOAD 1
  68. INVOKEVIRTUAL java/math/BigDecimal.divide (Ljava/math/BigDecimal;I)Ljava/math/BigDecimal;
  69. DUP
  70. LDC "this.divide(power, scale)"
  71. INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkExpressionValueIsNotNull (Ljava/lang/Object;Ljava/lang/String;)V
  72. ASTORE 8
  73. NOP
  74. L12
  75. ALOAD 7
  76. ALOAD 8
  77. INVOKEVIRTUAL java/math/BigDecimal.multiply (Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
  78. DUP
  79. LDC "this.multiply(other)"
  80. INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkExpressionValueIsNotNull (Ljava/lang/Object;Ljava/lang/String;)V
  81. GOTO L13
  82. L13
  83. ASTORE 2
  84. L3
  85. LINENUMBER 499 L3
  86. ALOAD 2
  87. ALOAD 6
  88. ASTORE 7
  89. ALOAD 0
  90. ALOAD 6
  91. ILOAD 1
  92. INVOKEVIRTUAL java/math/BigDecimal.divide (Ljava/math/BigDecimal;I)Ljava/math/BigDecimal;
  93. DUP
  94. LDC "this.divide(powerp1, scale)"
  95. INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkExpressionValueIsNotNull (Ljava/lang/Object;Ljava/lang/String;)V
  96. ASTORE 8
  97. INVOKESTATIC kotlin/jvm/internal/InlineMarker.beforeInlineCall ()V
  98. NOP
  99. L14
  100. ALOAD 7
  101. ALOAD 8
  102. INVOKEVIRTUAL java/math/BigDecimal.multiply (Ljava/math/BigDecimal;)Ljava/math/BigDecimal;
  103. DUP
  104. LDC "this.multiply(other)"
  105. INVOKESTATIC kotlin/jvm/internal/Intrinsics.checkExpressionValueIsNotNull (Ljava/lang/Object;Ljava/lang/String;)V
  106. GOTO L15
  107. L15
  108. INVOKESTATIC kotlin/jvm/internal/InlineMarker.afterInlineCall ()V
  109. L16
  110. LINENUMBER 499 L16
  111. INVOKEVIRTUAL java/math/BigDecimal.compareTo (Ljava/math/BigDecimal;)I
  112. IFEQ L2
  113. L17
  114. LINENUMBER 501 L17
  115. ALOAD 2
  116. ARETURN
  117. L18
  118. LOCALVARIABLE powerp1 Ljava/math/BigDecimal; L11 L17 6
  119. LOCALVARIABLE np1 Ljava/math/BigDecimal; L10 L17 5
  120. LOCALVARIABLE power Ljava/math/BigDecimal; L6 L17 4
  121. LOCALVARIABLE n Ljava/math/BigDecimal; L5 L17 3
  122. LOCALVARIABLE toReturn Ljava/math/BigDecimal; L1 L18 2
  123. LOCALVARIABLE $receiver Ljava/math/BigDecimal; L0 L18 0
  124. LOCALVARIABLE scale I L0 L18 1
  125. MAXSTACK = 5
  126. MAXLOCALS = 11
  127. Cause: java.lang.NullPointerException
  128. File being compiled and position: (490,1) in C:/Users/Deen/Documents/GitHub/MathKt/src/main/kotlin/com/deanveloper/mathkt/BigFunctions.kt
  129. PsiElement: private fun BigDecimal.asinIterate(scale: Int = defaultScale): BigDecimal {
  130. // 2^n * sin(x/2^n) as n->Infinity
  131. var toReturn: BigDecimal
  132. do {
  133. val n = BigDecimal("1000000")
  134. val power = BigDecimal.valueOf(2).pow(n)
  135. val np1 = n + BigDecimal.ONE
  136. val powerp1 = BigDecimal.valueOf(2).pow(np1)
  137. toReturn = power.times(this.divide(power, scale))
  138. } while (toReturn.compareTo(powerp1.times(this.divide(powerp1, scale))) === 0)
  139. return toReturn
  140. }
  141. The root cause was thrown at: StackTransformationUtils.kt:114
  142. at org.jetbrains.kotlin.codegen.FunctionCodegen.endVisit(FunctionCodegen.java:526)
  143. at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethod(FunctionCodegen.java:225)
  144. at org.jetbrains.kotlin.codegen.FunctionCodegen.generateMethod(FunctionCodegen.java:145)
  145. at org.jetbrains.kotlin.codegen.FunctionCodegen.gen(FunctionCodegen.java:120)
  146. at org.jetbrains.kotlin.codegen.MemberCodegen.genFunctionOrProperty(MemberCodegen.java:181)
  147. at org.jetbrains.kotlin.codegen.PackagePartCodegen.generateBody(PackagePartCodegen.java:94)
  148. at org.jetbrains.kotlin.codegen.MemberCodegen.generate(MemberCodegen.java:118)
  149. at org.jetbrains.kotlin.codegen.PackageCodegen.generateFile(PackageCodegen.java:117)
  150. at org.jetbrains.kotlin.codegen.PackageCodegen.generate(PackageCodegen.java:61)
  151. at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.generatePackage(KotlinCodegenFacade.java:99)
  152. at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:77)
  153. at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:44)
  154. at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:452)
  155. at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:150)
  156. at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:183)
  157. at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
  158. at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:199)
  159. at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:154)
  160. at org.jetbrains.kotlin.cli.common.CLICompiler.execAndOutputXml(CLICompiler.java:73)
  161. at org.jetbrains.kotlin.daemon.CompileServiceImpl$remoteIncrementalCompile$1.invoke(CompileServiceImpl.kt:247)
  162. at org.jetbrains.kotlin.daemon.CompileServiceImpl$remoteIncrementalCompile$1.invoke(CompileServiceImpl.kt:70)
  163. at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1$1.invoke(CompileServiceImpl.kt:421)
  164. at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1$1.invoke(CompileServiceImpl.kt:70)
  165. at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
  166. at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:454)
  167. at org.jetbrains.kotlin.daemon.CompileServiceImpl.access$checkedCompile(CompileServiceImpl.kt:70)
  168. at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1.invoke(CompileServiceImpl.kt:420)
  169. at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1.invoke(CompileServiceImpl.kt:70)
  170. at org.jetbrains.kotlin.daemon.CompileServiceImpl.ifAlive(CompileServiceImpl.kt:565)
  171. at org.jetbrains.kotlin.daemon.CompileServiceImpl.ifAlive$default(CompileServiceImpl.kt:504)
  172. at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:411)
  173. at org.jetbrains.kotlin.daemon.CompileServiceImpl.remoteIncrementalCompile(CompileServiceImpl.kt:244)
  174. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  175. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  176. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  177. at java.lang.reflect.Method.invoke(Method.java:498)
  178. at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
  179. at sun.rmi.transport.Transport$1.run(Transport.java:200)
  180. at sun.rmi.transport.Transport$1.run(Transport.java:197)
  181. at java.security.AccessController.doPrivileged(Native Method)
  182. at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
  183. at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
  184. at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
  185. at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
  186. at java.security.AccessController.doPrivileged(Native Method)
  187. at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
  188. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  189. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  190. at java.lang.Thread.run(Thread.java:745)
  191. Caused by: java.lang.NullPointerException
  192. at org.jetbrains.kotlin.codegen.optimization.fixStack.StackTransformationUtilsKt.generateStoreInstructions(StackTransformationUtils.kt:114)
  193. at org.jetbrains.kotlin.codegen.optimization.fixStack.StackTransformationUtilsKt.saveStack(StackTransformationUtils.kt:71)
  194. at org.jetbrains.kotlin.codegen.optimization.fixStack.FixStackMethodTransformer$transformBeforeInlineCallMarker$1.invoke(FixStackMethodTransformer.kt:187)
  195. at org.jetbrains.kotlin.codegen.optimization.fixStack.FixStackMethodTransformer$transformBeforeInlineCallMarker$1.invoke(FixStackMethodTransformer.kt:27)
  196. at org.jetbrains.kotlin.codegen.optimization.fixStack.FixStackMethodTransformer.transform(FixStackMethodTransformer.kt:53)
  197. at org.jetbrains.kotlin.codegen.optimization.MandatoryMethodTransformer.transform(MandatoryMethodTransforker.kt:29)
  198. at org.jetbrains.kotlin.codegen.optimization.OptimizationMethodVisitor.visitEnd(OptimizationMethodVisitor.java:81)
  199. at org.jetbrains.kotlin.codegen.FunctionCodegen.endVisit(FunctionCodegen.java:519)
  200. ... 48 more
Advertisement
Add Comment
Please, Sign In to add comment