Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/ir/Invoke.java @ 2538:e1ba5a93e997
Clean up on Value class and LIRGenerator/LIRItem-related things.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Apr 2011 20:13:54 +0200 |
parents | 16b9a8b5ad39 |
children | 3fc322165071 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/ir/Invoke.java Wed Apr 27 19:53:46 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/ir/Invoke.java Wed Apr 27 20:13:54 2011 +0200 @@ -22,16 +22,17 @@ */ package com.sun.c1x.ir; +import java.lang.reflect.*; + import com.sun.c1x.debug.*; import com.sun.c1x.util.*; import com.sun.c1x.value.*; +import com.sun.cri.bytecode.*; import com.sun.cri.ci.*; import com.sun.cri.ri.*; /** * The {@code Invoke} instruction represents all kinds of method calls. - * - * @author Ben L. Titzer */ public final class Invoke extends StateSplit { @@ -50,16 +51,13 @@ * @param target the target method being called * @param stateBefore the state before executing the invocation */ - public Invoke(int opcode, CiKind result, Value[] args, boolean isStatic, RiMethod target, RiType returnType, FrameState stateBefore) { + public Invoke(int opcode, CiKind result, Value[] args, RiMethod target, RiType returnType, FrameState stateBefore) { super(result, stateBefore); this.opcode = opcode; this.arguments = args; this.target = target; this.returnType = returnType; - if (isStatic) { - setFlag(Flag.IsStatic); - eliminateNullCheck(); - } else if (args[0].isNonNull() || args[0].kind.isWord()) { + if (isStatic() || args[0].isNonNull() || args[0].kind.isWord()) { eliminateNullCheck(); } } @@ -77,7 +75,7 @@ * @return {@code true} if the invocation is a static invocation */ public boolean isStatic() { - return checkFlag(Flag.IsStatic); + return opcode == Bytecodes.INVOKESTATIC; } @Override