# HG changeset patch # User twisti # Date 1400015595 25200 # Node ID 4e9176d70690d088f84f2375339476002ea08868 # Parent 4612497da67fbcae0b00ac259e1f46ffb80bf69a add documentation to HotSpotVM* annotatations diff -r 4612497da67f -r 4e9176d70690 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConstant.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConstant.java Mon May 12 17:44:23 2014 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConstant.java Tue May 13 14:13:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,18 @@ import java.lang.annotation.*; +/** + * Refers to a C++ constant in the VM. + */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface HotSpotVMConstant { + /** + * Returns the name of the constant. + * + * @return name of constant + */ String name(); /** diff -r 4612497da67f -r 4e9176d70690 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMField.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMField.java Mon May 12 17:44:23 2014 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMField.java Tue May 13 14:13:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,21 +24,53 @@ import java.lang.annotation.*; +/** + * Refers to a C++ field in the VM. + */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface HotSpotVMField { + /** + * Types of information this annotation can return. + */ enum Type { + /** + * Returns the offset of this field within the type. Only valid for instance fields. + */ OFFSET, + + /** + * Returns the absolute address of this field. Only valid for static fields. + */ ADDRESS, + + /** + * Returns the value of this field. Only valid for static fields. + */ VALUE; } - String name(); + /** + * Specifies what type of information to return. + * + * @see Type + */ + Type get(); + /** + * Returns the type name containing this field. + * + * @return name of containing type + */ String type(); - Type get(); + /** + * Returns the name of this field. + * + * @return name of field + */ + String name(); /** * List of architectures where this constant is required. Names are derived from diff -r 4612497da67f -r 4e9176d70690 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMFlag.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMFlag.java Mon May 12 17:44:23 2014 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMFlag.java Tue May 13 14:13:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,18 @@ import java.lang.annotation.*; +/** + * Refers to a C++ flag in the VM. + */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface HotSpotVMFlag { + /** + * Returns the name of this flag. + * + * @return name of flag. + */ String name(); /** diff -r 4612497da67f -r 4e9176d70690 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMType.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMType.java Mon May 12 17:44:23 2014 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMType.java Tue May 13 14:13:15 2014 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,15 +24,34 @@ import java.lang.annotation.*; +/** + * Refers to a C++ type in the VM. + */ @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface HotSpotVMType { + /** + * Types of information this annotation can return. + */ enum Type { + /** + * Returns the size of the type (C++ {@code sizeof()}). + */ SIZE; } - String name(); + /** + * Specifies what type of information to return. + * + * @see Type + */ + Type get(); - Type get(); + /** + * Returns the name of the type. + * + * @return name of type + */ + String name(); }