From bahram.yarahmadi at gmail.com Thu Feb 4 10:23:51 2016 From: bahram.yarahmadi at gmail.com (Bahram Yarahmadi) Date: Thu, 4 Feb 2016 02:23:51 -0800 Subject: Successfull building of JDK8u Message-ID: Dear all, Finally I have Succeeded to build jdk8u,I made these changes aggressively so I'm worry about unexpected runtime behaviors although I've test some hello world programs an the results were correct.I decided to share the changes that I've done with you Could you review my changes tell me if some changes that I've done might have unexpected errors in the future ? In ciTypeFlow.cpp I've added two macros (#ifdef Compiler2) :lines 38,41 2652,2662 In sharkCompiler.cpp I've changed Arena arena(mtCompiler); line 170 to Arena arena(mtCompiler); line 171 In sharkCompiler.cpp I've commented lines 318 until 323 //tty->print In sharkRuntime.cpp I've commented lines 191 until 196 //again tty->print Finaly I've test compile and test some programs with binaries which are located in linux-x86_64-normal-zeroshark-release/images/j2sdk-image and everything was fine , As I said I before I want to hack Shark JIT in order to just convert Java 8 bytecode to LLVM IR,Do you have any suggestion for me which could help me out,Does anybody know which class or method are more responsible for generating LLVM IR ? Right now I just want to debug the whole Shark JIT codebase by dumping the variables and objects .Does anybody know a better solution ? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From bahram.yarahmadi at gmail.com Sun Feb 7 09:44:09 2016 From: bahram.yarahmadi at gmail.com (Bahram Yarahmadi) Date: Sun, 7 Feb 2016 13:14:09 +0330 Subject: Problem with Lamdas Message-ID: Hello guys, Finally I've succeeded to generate LLVM IR from Shark JIT. My problem is with Java 8 Lambdas,When I want to run a lamda or generate LLVM IR from lambdas ,I get this Error : Exception in thread "main" java.lang.InternalError: BMH.reinvoke=Lambda(a0:L/SpeciesData,a1:L)=>{ t2:L=MethodHandleImpl.array(); t3:L=Species_L.argL0(a0:L); t4:L=MethodHandle.invokeBasic(t3:L,a1:L,t2:L);t4:L} at java.lang.invoke.MethodHandleStatics.newInternalError(MethodHandleStatics.java:127) at java.lang.invoke.LambdaForm.compileToBytecode(LambdaForm.java:660) at java.lang.invoke.LambdaForm.prepare(LambdaForm.java:635) at java.lang.invoke.MethodHandle.(MethodHandle.java:461) at java.lang.invoke.BoundMethodHandle.(BoundMethodHandle.java:58) at java.lang.invoke.BoundMethodHandle$Species_L.(BoundMethodHandle.java:211) at java.lang.invoke.BoundMethodHandle$Species_L.copyWith(BoundMethodHandle.java:228) at java.lang.invoke.MethodHandle.asCollector(MethodHandle.java:1002) at java.lang.invoke.MethodHandleImpl$AsVarargsCollector.(MethodHandleImpl.java:460) at java.lang.invoke.MethodHandleImpl$AsVarargsCollector.(MethodHandleImpl.java:454) at java.lang.invoke.MethodHandleImpl.makeVarargsCollector(MethodHandleImpl.java:445) at java.lang.invoke.MethodHandle.setVarargs(MethodHandle.java:1325) at java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:1666) at java.lang.invoke.MethodHandles$Lookup.getDirectMethod(MethodHandles.java:1601) at java.lang.invoke.MethodHandles$Lookup.findStatic(MethodHandles.java:778) at java.lang.invoke.MethodHandleImpl$Lazy.(MethodHandleImpl.java:627) at java.lang.invoke.MethodHandleImpl.varargsArray(MethodHandleImpl.java:1506) at java.lang.invoke.MethodHandleImpl.varargsArray(MethodHandleImpl.java:1623) at java.lang.invoke.MethodHandle.asCollector(MethodHandle.java:999) at java.lang.invoke.MethodHandleImpl$AsVarargsCollector.(MethodHandleImpl.java:460) at java.lang.invoke.MethodHandleImpl$AsVarargsCollector.(MethodHandleImpl.java:454) at java.lang.invoke.MethodHandleImpl.makeVarargsCollector(MethodHandleImpl.java:445) at java.lang.invoke.MethodHandle.setVarargs(MethodHandle.java:1325) at java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:1666) at java.lang.invoke.MethodHandles$Lookup.getDirectMethod(MethodHandles.java:1601) at java.lang.invoke.MethodHandles$Lookup.findStatic(MethodHandles.java:778) at java.lang.invoke.CallSite.(CallSite.java:226) at java.lang.invoke.MethodHandleNatives.linkCallSiteImpl(MethodHandleNatives.java:307) at java.lang.invoke.MethodHandleNatives.linkCallSite(MethodHandleNatives.java:297) at JavaStreamAPITest.main(JavaStreamAPITest.java:12) Caused by: java.lang.InternalError: java.lang.UnsatisfiedLinkError at java.lang.invoke.MethodHandleStatics.newInternalError(MethodHandleStatics.java:130) at java.lang.invoke.InvokerBytecodeGenerator.emitNewArray(InvokerBytecodeGenerator.java:891) at java.lang.invoke.InvokerBytecodeGenerator.generateCustomizedCodeBytes(InvokerBytecodeGenerator.java:688) at java.lang.invoke.InvokerBytecodeGenerator.generateCustomizedCode(InvokerBytecodeGenerator.java:618) at java.lang.invoke.LambdaForm.compileToBytecode(LambdaForm.java:654) ... 28 more Caused by: java.lang.UnsatisfiedLinkError at java.lang.invoke.MethodHandle.invokeBasic(Native Method) at java.lang.invoke.InvokerBytecodeGenerator.emitNewArray(InvokerBytecodeGenerator.java:889) ... 31 more Does anyone here have solution for these weird Errors ? -------------- next part -------------- An HTML attachment was scrubbed... URL: