src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/DebugInfoBuilder.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
41 import org.graalvm.compiler.nodes.FrameState; |
41 import org.graalvm.compiler.nodes.FrameState; |
42 import org.graalvm.compiler.nodes.ValueNode; |
42 import org.graalvm.compiler.nodes.ValueNode; |
43 import org.graalvm.compiler.nodes.spi.NodeValueMap; |
43 import org.graalvm.compiler.nodes.spi.NodeValueMap; |
44 import org.graalvm.compiler.nodes.util.GraphUtil; |
44 import org.graalvm.compiler.nodes.util.GraphUtil; |
45 import org.graalvm.compiler.nodes.virtual.EscapeObjectState; |
45 import org.graalvm.compiler.nodes.virtual.EscapeObjectState; |
|
46 import org.graalvm.compiler.nodes.virtual.VirtualBoxingNode; |
46 import org.graalvm.compiler.nodes.virtual.VirtualObjectNode; |
47 import org.graalvm.compiler.nodes.virtual.VirtualObjectNode; |
|
48 import org.graalvm.compiler.serviceprovider.GraalServices; |
47 import org.graalvm.compiler.virtual.nodes.MaterializedObjectState; |
49 import org.graalvm.compiler.virtual.nodes.MaterializedObjectState; |
48 import org.graalvm.compiler.virtual.nodes.VirtualObjectState; |
50 import org.graalvm.compiler.virtual.nodes.VirtualObjectState; |
49 |
51 |
50 import jdk.vm.ci.code.BytecodeFrame; |
52 import jdk.vm.ci.code.BytecodeFrame; |
51 import jdk.vm.ci.code.VirtualObject; |
53 import jdk.vm.ci.code.VirtualObject; |
315 return toJavaValue(((MaterializedObjectState) state).materializedValue()); |
317 return toJavaValue(((MaterializedObjectState) state).materializedValue()); |
316 } else { |
318 } else { |
317 assert obj.entryCount() == 0 || state instanceof VirtualObjectState; |
319 assert obj.entryCount() == 0 || state instanceof VirtualObjectState; |
318 VirtualObject vobject = virtualObjects.get(obj); |
320 VirtualObject vobject = virtualObjects.get(obj); |
319 if (vobject == null) { |
321 if (vobject == null) { |
320 vobject = VirtualObject.get(obj.type(), virtualObjects.size()); |
322 boolean isAutoBox = obj instanceof VirtualBoxingNode; |
|
323 vobject = GraalServices.createVirtualObject(obj.type(), virtualObjects.size(), isAutoBox); |
321 virtualObjects.put(obj, vobject); |
324 virtualObjects.put(obj, vobject); |
322 pendingVirtualObjects.add(obj); |
325 pendingVirtualObjects.add(obj); |
323 } |
326 } |
324 STATE_VIRTUAL_OBJECTS.increment(debug); |
327 STATE_VIRTUAL_OBJECTS.increment(debug); |
325 return vobject; |
328 return vobject; |