Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotResolvedObjectTypeTest.java @ 22604:b00cc0475f31
Update jvmci import: Refactoring: Rename Kind to JavaKind.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 08 Sep 2015 19:57:39 +0200 |
parents | f5a43c861150 |
children | ed489bbcccbb |
comparison
equal
deleted
inserted
replaced
22603:6d339ba0edc5 | 22604:b00cc0475f31 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2013, 2015, 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. |
43 @Test | 43 @Test |
44 public void testKlassLayoutHelper() { | 44 public void testKlassLayoutHelper() { |
45 JavaConstant klass = HotSpotResolvedObjectTypeImpl.fromObjectClass(this.getClass()).klass(); | 45 JavaConstant klass = HotSpotResolvedObjectTypeImpl.fromObjectClass(this.getClass()).klass(); |
46 MemoryAccessProvider memoryAccess = getProviders().getConstantReflection().getMemoryAccessProvider(); | 46 MemoryAccessProvider memoryAccess = getProviders().getConstantReflection().getMemoryAccessProvider(); |
47 HotSpotVMConfig config = runtime().getConfig(); | 47 HotSpotVMConfig config = runtime().getConfig(); |
48 Constant c = StampFactory.forKind(Kind.Int).readConstant(memoryAccess, klass, config.klassLayoutHelperOffset); | 48 Constant c = StampFactory.forKind(JavaKind.Int).readConstant(memoryAccess, klass, config.klassLayoutHelperOffset); |
49 assertTrue(c.toString(), c.getClass() == PrimitiveConstant.class); | 49 assertTrue(c.toString(), c.getClass() == PrimitiveConstant.class); |
50 PrimitiveConstant pc = (PrimitiveConstant) c; | 50 PrimitiveConstant pc = (PrimitiveConstant) c; |
51 assertTrue(pc.toString(), pc.getKind() == Kind.Int); | 51 assertTrue(pc.toString(), pc.getJavaKind() == JavaKind.Int); |
52 } | 52 } |
53 } | 53 } |