src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/MonitorCounterNode.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 52910 583fd71c47d6
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 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.
    23 
    23 
    24 
    24 
    25 package org.graalvm.compiler.hotspot.nodes;
    25 package org.graalvm.compiler.hotspot.nodes;
    26 
    26 
    27 import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
    27 import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
    28 
       
    29 import java.util.BitSet;
       
    30 
    28 
    31 import org.graalvm.compiler.core.common.type.StampFactory;
    29 import org.graalvm.compiler.core.common.type.StampFactory;
    32 import org.graalvm.compiler.graph.Node;
    30 import org.graalvm.compiler.graph.Node;
    33 import org.graalvm.compiler.graph.NodeClass;
    31 import org.graalvm.compiler.graph.NodeClass;
    34 import org.graalvm.compiler.lir.VirtualStackSlot;
    32 import org.graalvm.compiler.lir.VirtualStackSlot;
    54     }
    52     }
    55 
    53 
    56     @Override
    54     @Override
    57     public void generate(NodeLIRBuilderTool gen) {
    55     public void generate(NodeLIRBuilderTool gen) {
    58         assert graph().getNodes().filter(MonitorCounterNode.class).count() == 1 : "monitor counters not canonicalized to single instance";
    56         assert graph().getNodes().filter(MonitorCounterNode.class).count() == 1 : "monitor counters not canonicalized to single instance";
    59         VirtualStackSlot counter = gen.getLIRGeneratorTool().getResult().getFrameMapBuilder().allocateStackSlots(1, new BitSet(0), null);
    57         VirtualStackSlot counter = gen.getLIRGeneratorTool().getResult().getFrameMapBuilder().allocateStackSlots(1);
    60         Value result = gen.getLIRGeneratorTool().emitAddress(counter);
    58         Value result = gen.getLIRGeneratorTool().emitAddress(counter);
    61         gen.setResult(this, result);
    59         gen.setResult(this, result);
    62     }
    60     }
    63 
    61 
    64     @NodeIntrinsic
    62     @NodeIntrinsic