π
This file contains hidden or 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
import java.lang.foreign.*; | |
import java.lang.invoke.*; | |
import java.util.Arrays; | |
import static java.lang.foreign.ValueLayout.*; | |
public class Test { | |
@FunctionalInterface | |
public interface Callback { | |
int invoke(MemorySegment a, MemorySegment b); |
This file contains hidden or 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
package org.glavo.jmh; | |
import com.google.common.jimfs.Jimfs; | |
import org.openjdk.jmh.annotations.*; | |
import java.io.BufferedOutputStream; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.nio.charset.Charset; |
This file contains hidden or 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
import com.google.common.jimfs.Jimfs; | |
import org.openjdk.jmh.annotations.*; | |
import java.io.BufferedOutputStream; | |
import java.io.BufferedWriter; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.nio.file.FileSystem; | |
import java.nio.file.Files; | |
import java.nio.file.Path; |
This file contains hidden or 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
import jdk.incubator.foreign.*; | |
import java.lang.invoke.*; | |
// Original code (C++): https://stackoverflow.com/a/40937610/7659948 | |
public class PanamaJIT { | |
public static final int MEM_COMMIT = 0x00001000; | |
public static final int PAGE_READWRITE = 0x04; | |
public static final int PAGE_EXECUTE_READ = 0x20; |
This file contains hidden or 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
// Log timings per task. | |
class TimingsListener : TaskExecutionListener, BuildListener { | |
private var startTime: Long = 0L | |
private val timings = mutableListOf<Pair<Long, String>>() | |
@Override | |
override fun beforeExecute(task: Task) { | |
startTime = System.nanoTime() | |
} |
This file contains hidden or 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
; ModuleID = 'test2.cpp' | |
source_filename = "test2.cpp" | |
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-pc-linux-gnu" | |
@_ZL3cnt = internal unnamed_addr global i32 0, align 4 | |
@.str = private unnamed_addr constant [16 x i8] c"%d\0ATime: %ldms\0A\00", align 1 | |
; Function Attrs: nofree nounwind uwtable | |
define dso_local void @_Z3Dfsiiii(i32 %0, i32 %1, i32 %2, i32 %3) local_unnamed_addr #0 { |
This file contains hidden or 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
[17:15:40] [org.jackhuang.hmcl.Launcher.main/INFO] *** HMCL 3.3.172 *** | |
[17:15:40] [org.jackhuang.hmcl.Launcher.main/INFO] Operating System: Windows 10 10.0 | |
[17:15:40] [org.jackhuang.hmcl.Launcher.main/INFO] Java Version: 1.8.0_252, BellSoft | |
[17:15:40] [org.jackhuang.hmcl.Launcher.main/INFO] Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), BellSoft | |
[17:15:40] [org.jackhuang.hmcl.Launcher.main/INFO] Java Home: D:\Downloads\HMCL\jre-x64 | |
[17:15:40] [org.jackhuang.hmcl.Launcher.main/INFO] Current Directory: D:\Downloads\HMCL | |
[17:15:40] [org.jackhuang.hmcl.Launcher.main/INFO] HMCL Directory: C:\Users\Glavo\AppData\Roaming\.hmcl | |
[17:15:40] [org.jackhuang.hmcl.Launcher.main/INFO] Memory: 14553MB | |
[17:15:40] [org.jackhuang.hmcl.Launcher.lambda$main$2/INFO] Metaspace: 8MB | |
[17:15:40] [org.jackhuang.hmcl.Main.fixLetsEncrypt/INFO] Added Lets Encrypt root certificates as additional trust |
This file contains hidden or 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
scala> type T = (Int, Char, String) | |
// defined alias type T = (Int, Char, String) | |
scala> val get: (t: T, i: Int) => Tuple.Elem[T, i.type] = (t, i) => t(i) | |
1 |val get: (t: T, i: Int) => Tuple.Elem[T, i.type] = (t, i) => t(i) | |
| ^^^^ | |
|found: Int(i) match { | |
| case Int(0) => Int | |
| case [n1 <: Int] => typelevel.S[n1] => scala.Tuple.Elem[(Char, String), n1] | |
|} |
This file contains hidden or 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
openjdk-jdk9-jdk9/ | |
βββ common | |
β βββ autoconf | |
β β βββ build-aux | |
β βββ bin | |
β βββ conf | |
β βββ doc | |
β βββ nb_native | |
β β βββ nbproject | |
β βββ src |
This file contains hidden or 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
class C { | |
def fun23(f: (Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int, Int) => Int) = {} | |
} | |
object C { | |
def main(args: Array[String]): Unit = { | |
classOf[C].getMethod("fun23", classOf[FunctionXXL]).getGenericParameterTypes | |
} | |
} |
NewerOlder