src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaMethodInfo.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File hotspot Cdiff src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaMethodInfo.java

src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaMethodInfo.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 22,34 **** */ package jdk.tools.jaotc; import org.graalvm.compiler.code.CompilationResult; import jdk.vm.ci.hotspot.HotSpotCompiledCode; ! public interface JavaMethodInfo { /** * @return unique symbol name for this method. */ String getSymbolName(); --- 22,36 ---- */ package jdk.tools.jaotc; import org.graalvm.compiler.code.CompilationResult; + import jdk.vm.ci.hotspot.HotSpotCompiledCode; + import jdk.vm.ci.meta.ResolvedJavaMethod; ! interface JavaMethodInfo { /** * @return unique symbol name for this method. */ String getSymbolName();
*** 40,45 **** --- 42,59 ---- */ String getNameAndSignature(); HotSpotCompiledCode compiledCode(CompilationResult result); + /** + * Name a java method with class and signature to make it unique. + * + * @param method to generate unique identifier for + * @return Unique name for this method including class and signature + **/ + static String uniqueMethodName(ResolvedJavaMethod method) { + String className = method.getDeclaringClass().toClassName(); + String name = className + "." + method.getName() + method.getSignature().toMethodDescriptor(); + return name; + } + }
src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/JavaMethodInfo.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File