src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/InfopointProcessor.java
Index Unified diffs Context diffs Sdiffs Frames Patch New Old Previous File Next File
*** old/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/InfopointProcessor.java	Tue Aug 22 11:46:51 2017
--- new/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/InfopointProcessor.java	Tue Aug 22 11:46:51 2017

*** 1,7 **** --- 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.
*** 26,45 **** --- 26,43 ---- import jdk.tools.jaotc.binformat.BinaryContainer; import jdk.tools.jaotc.binformat.Relocation; import org.graalvm.compiler.hotspot.HotSpotForeignCallLinkage; import jdk.vm.ci.code.BytecodePosition; import jdk.vm.ci.code.DebugInfo; import jdk.vm.ci.code.VirtualObject; import jdk.vm.ci.code.site.Call; import jdk.vm.ci.code.site.Infopoint; import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod; import jdk.vm.ci.hotspot.HotSpotResolvedJavaType; import jdk.vm.ci.hotspot.HotSpotResolvedObjectType; import jdk.vm.ci.meta.InvokeTarget; ! final class InfopointProcessor { private final DataBuilder dataBuilder; private final BinaryContainer binaryContainer;
*** 68,97 **** --- 66,100 ---- case BYTECODE_POSITION: break; default: throw new InternalError("Unknown info point reason: " + info.reason); } ! if (info.debugInfo == null) return; ! if (info.debugInfo == null) { + return; + } BytecodePosition bcp = info.debugInfo.getBytecodePosition(); ! if (bcp == null) return; ! if (bcp == null) { + return; + } recordScopeKlasses(methodInfo, bcp, info.debugInfo.getVirtualObjectMapping()); } private void recordScopeKlasses(CompiledMethodInfo methodInfo, BytecodePosition bcp, VirtualObject[] vos) { BytecodePosition caller = bcp.getCaller(); if (caller != null) { recordScopeKlasses(methodInfo, caller, vos); } ! HotSpotResolvedJavaMethod m = (HotSpotResolvedJavaMethod) bcp.getMethod(); HotSpotResolvedObjectType klass = m.getDeclaringClass(); methodInfo.addDependentKlassData(binaryContainer, klass); ! if (vos == null) return; ! if (vos == null) { + return; + } for (VirtualObject vo : vos) { ! HotSpotResolvedObjectType vk = (HotSpotResolvedObjectType) vo.getType(); methodInfo.addDependentKlassData(binaryContainer, vk); } }
*** 114,129 **** --- 117,132 ---- } /** * Get information about the call site. Name of the callee and relocation call type. */ ! private static CallSiteRelocationInfo getCallSiteRelocationInfo(Call call) { InvokeTarget callTarget = call.target; if (callTarget instanceof HotSpotResolvedJavaMethod) { return new JavaCallSiteRelocationInfo(call, (HotSpotResolvedJavaMethod) callTarget); } else if (callTarget instanceof HotSpotForeignCallLinkage) { - return new ForeignCallSiteRelocationInfo(call, (HotSpotForeignCallLinkage) callTarget, dataBuilder); } else { throw new InternalError("Unhandled call type found in infopoint: " + callTarget); } }
*** 134,147 **** --- 137,146 ---- switch (callSiteRelocation.type) { case STUB_CALL_DIRECT: return new StubDirectCallSiteRelocationSymbol(callSiteRelocation, binaryContainer); case FOREIGN_CALL_INDIRECT_GOT: return new ForeignGotCallSiteRelocationSymbol(mi, call, callSiteRelocation, dataBuilder); case FOREIGN_CALL_DIRECT: case FOREIGN_CALL_DIRECT_FAR: case FOREIGN_CALL_INDIRECT: return new ForeignCallSiteRelocationSymbol(callSiteRelocation, binaryContainer); default: return new JavaCallSiteRelocationSymbol(mi, call, callSiteRelocation, binaryContainer); } }

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