comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/CurrentJavaThreadNode.java @ 14975:478165bd7508

fix null stamp in CurrentJavaThreadNode
author Lukas Stadler <lukas.stadler@oracle.com>
date Fri, 04 Apr 2014 16:59:01 +0200
parents d5a1206e1923
children 96bb07a5d667
comparison
equal deleted inserted replaced
14974:6270e260c23b 14975:478165bd7508
23 package com.oracle.graal.hotspot.nodes; 23 package com.oracle.graal.hotspot.nodes;
24 24
25 import static com.oracle.graal.hotspot.HotSpotGraalRuntime.*; 25 import static com.oracle.graal.hotspot.HotSpotGraalRuntime.*;
26 26
27 import com.oracle.graal.api.code.*; 27 import com.oracle.graal.api.code.*;
28 import com.oracle.graal.api.meta.*;
28 import com.oracle.graal.graph.*; 29 import com.oracle.graal.graph.*;
29 import com.oracle.graal.hotspot.*; 30 import com.oracle.graal.hotspot.*;
30 import com.oracle.graal.nodes.calc.*; 31 import com.oracle.graal.nodes.calc.*;
31 import com.oracle.graal.nodes.spi.*; 32 import com.oracle.graal.nodes.spi.*;
33 import com.oracle.graal.nodes.type.*;
32 import com.oracle.graal.word.*; 34 import com.oracle.graal.word.*;
33 35
34 /** 36 /**
35 * Gets the address of the C++ JavaThread object for the current thread. 37 * Gets the address of the C++ JavaThread object for the current thread.
36 */ 38 */
37 public final class CurrentJavaThreadNode extends FloatingNode implements LIRLowerable { 39 public final class CurrentJavaThreadNode extends FloatingNode implements LIRLowerable {
38 40
39 private CurrentJavaThreadNode() { 41 private CurrentJavaThreadNode(Kind kind) {
40 super(null); 42 super(StampFactory.forKind(kind));
41 } 43 }
42 44
43 @Override 45 @Override
44 public void generate(NodeLIRBuilderTool gen) { 46 public void generate(NodeLIRBuilderTool gen) {
45 Register rawThread = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).getProviders().getRegisters().getThreadRegister(); 47 Register rawThread = ((HotSpotLIRGenerator) gen.getLIRGeneratorTool()).getProviders().getRegisters().getThreadRegister();
53 throw new GraalInternalError(e); 55 throw new GraalInternalError(e);
54 } 56 }
55 } 57 }
56 58
57 @NodeIntrinsic(setStampFromReturnType = true) 59 @NodeIntrinsic(setStampFromReturnType = true)
58 public static Word get() { 60 public static Word get(@SuppressWarnings("unused") @ConstantNodeParameter Kind kind) {
59 return Word.unsigned(unsafeReadWord(Thread.currentThread(), eetopOffset())); 61 return Word.unsigned(unsafeReadWord(Thread.currentThread(), eetopOffset()));
60 } 62 }
61 } 63 }