* [gcjx] Patch: FYI: documentation updates
@ 2005-10-09 18:17 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2005-10-09 18:17 UTC (permalink / raw)
To: Java Patch List
I'm checking this in on the gcjx branch.
This adds documentation comments in a number of places in the model.
They are not extremely detailed, and not every class has a comment
yet, but at least this is an improvement. I have particularly tried
to document places where a ref_* object can validly have a null value.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* model/forenhanced.hh (class model_for_enhanced): Added
documentation.
* model/for.hh (class model_for_base): Added documentation.
(class model_for): Likewise.
* model/identifier.hh (class model_identifier): Updated
documentation.
* model/instanceof.hh (class model_instanceof): Added
documentation.
* model/loop.hh (class model_loop): Added documentation.
* model/label.hh (class model_label): Added documentation.
* model/javadoc.hh (class model_javadoc): Added documentation.
* model/newarray.hh (class model_new_array): Added documentation.
* model/null.hh (class model_null_type): Added documentation.
(class model_null_literal): Likewise.
* model/return.hh (class model_return): Added documentation.
* model/switch.hh (class model_switch_block): Added
documentation.
(class model_switch): Likewise.
* watch.hh (class watch): Added documentation.
* model/throw.hh (class model_throw): Added documentation.
* model/throwsclause.hh (class model_throws_clause): Added
documentation.
* model/try.hh (class model_try): Added documentation.
* model/unary.hh (class model_unary): Added documentation.
(class model_prefix_simple): Likewise.
(model_logical_not): Likewise.
(class model_prefix_side_effect): Likewise.
(class model_postfix): Likewise.
* model/varref.hh (class model_simple_variable_ref): Added
documentation.
* model/varstmt.hh (class model_variable_stmt): Added
documentation.
* model/void.hh (class model_void_type): Added documentation.
* model/blockscope.hh (class model_block_scope): Added
documentation.
* model/bytecode.hh (class model_bytecode_block): Added
documentation.
* model/declstmt.hh (class model_class_decl_stmt): Added
documentation.
* model/cond.hh (class model_conditional): Added documentation.
* model/binary.hh (class model_binary_base): Added documentation.
* model/assert.hh (model_assert::result): Added documentation.
* model/if.hh (model_if::false_branch): Added documentation.
Index: watch.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/Attic/watch.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 watch.hh
--- watch.hh 13 Jan 2005 03:18:33 -0000 1.1.2.1
+++ watch.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// A wrapper that ensures that a variable is set before use.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,9 @@
#ifndef GCJX_WATCH_HH
#define GCJX_WATCH_HH
+/// This class is used to catch a certain type of programming error.
+/// This template wraps a value and verifies that the value is never
+/// used before it is set.
template<typename T>
class watch
{
Index: model/assert.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/assert.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 assert.hh
--- model/assert.hh 13 Jan 2005 03:18:35 -0000 1.1.2.1
+++ model/assert.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent an assert statement.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -29,7 +29,8 @@
// The expression to evaluate.
ref_expression expression;
- // The expression to print, if any.
+ // The expression to print, if any. This is null if there is no
+ // message clause in the assert statement.
ref_expression result;
public:
Index: model/binary.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/binary.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 binary.hh
--- model/binary.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/binary.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent a binary operator.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,7 @@
#ifndef GCJX_MODEL_BINARY_HH
#define GCJX_MODEL_BINARY_HH
+/// This is the base class for binary expressions.
class model_binary_base : public model_expression
{
protected:
Index: model/blockscope.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/blockscope.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 blockscope.hh
--- model/blockscope.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/blockscope.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent a block scope.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,14 @@
#ifndef GCJX_MODEL_BLOCKSCOPE_HH
#define GCJX_MODEL_BLOCKSCOPE_HH
+/// This represents a variable binding contour. An instance is
+/// created during resolution and will be attached to the resolution
+/// scope. Other statements during resolution can add variables to
+/// the bindings or look up names. A model_block_scope object is
+/// transient and is destroyed when its corresponding block has
+/// finished resolving.
+/// FIXME: This is not properly part of the model, it should have a
+/// different name.
class model_block_scope : public IScope
{
// The scope we're attached to.
Index: model/bytecode.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/bytecode.hh,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 bytecode.hh
--- model/bytecode.hh 4 Apr 2005 00:01:14 -0000 1.1.2.4
+++ model/bytecode.hh 9 Oct 2005 18:16:18 -0000
@@ -29,7 +29,11 @@
/// to .o, put the bytecode for a method here. If we aren't
/// compiling, just leave this empty, it is convenient to have this so
/// that error checking in model_method doesn't have to have special
-/// cases.
+/// cases. Note that a model_bytecode_block is not attached to a
+/// method when generating bytecode -- only when reading it. However,
+/// if the "verify after generating bytecode" flag is enabled, a dummy
+/// model_bytecode_block will be constructed. However, this dummy
+/// object is transient and will be deleted again after verification.
/// FIXME: model_block has some state we don't need, we should have a
/// new base class.
class model_bytecode_block : public model_block
Index: model/cond.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/cond.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 cond.hh
--- model/cond.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/cond.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent the conditional operator.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,7 @@
#ifndef GCJX_MODEL_COND_HH
#define GCJX_MODEL_COND_HH
+/// This represents a conditional expression.
class model_conditional : public model_expression
{
// The condition.
Index: model/declstmt.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/declstmt.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 declstmt.hh
--- model/declstmt.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/declstmt.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Class or interface declaration statement.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_DECLSTMT_HH
#define GCJX_MODEL_DECLSTMT_HH
+/// This represents a class declaration statement, that is, the
+/// declaration of a class local to a method.
class model_class_decl_stmt : public model_stmt
{
// The class being declared.
Index: model/for.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/for.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 for.hh
--- model/for.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/for.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent the for statement.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_FOR_HH
#define GCJX_MODEL_FOR_HH
+/// This is the base class for both kinds of 'for' loop. It is not
+/// instantiated directly, only subclassed.
class model_for_base : public model_loop
{
protected:
@@ -42,16 +44,18 @@
}
};
+/// This is an "old-style" for loop.
class model_for : public model_for_base
{
- // Initialization. This might be NULL.
+ // Initialization. This is null if there is no initializer
+ // statement.
ref_stmt initializer;
- // Condition. This might be NULL, which should be taken to mean
- // 'true'.
+ // Condition. This is null if there is no condition expression;
+ // this should be taken to mean 'true'.
ref_expression cond_expr;
- // Update. This might be NULL.
+ // Update. This is null if there is no update statement.
ref_stmt update;
public:
Index: model/forenhanced.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/forenhanced.hh,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 forenhanced.hh
--- model/forenhanced.hh 12 Sep 2005 01:38:23 -0000 1.1.2.2
+++ model/forenhanced.hh 9 Oct 2005 18:16:18 -0000
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_FORENHANCED_HH
#define GCJX_MODEL_FORENHANCED_HH
+/// This is the "enhanced" for loop, which iterates over Iterable
+/// objects.
class model_for_enhanced : public model_for_base
{
// Expression that yields an Iterable.
Index: model/identifier.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/identifier.hh,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 identifier.hh
--- model/identifier.hh 7 Oct 2005 02:01:43 -0000 1.1.2.2
+++ model/identifier.hh 9 Oct 2005 18:16:18 -0000
@@ -22,7 +22,8 @@
#ifndef GCJX_MODEL_IDENTIFIER_HH
#define GCJX_MODEL_IDENTIFIER_HH
-// This is just a small wrapper around a string.
+/// This is just a small wrapper around a string. These are only used
+/// by the lexer and parser.
class model_identifier : public model_element
{
// The identifier.
Index: model/if.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/if.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 if.hh
--- model/if.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/if.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent the if statement.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -34,7 +34,8 @@
// The true branch.
ref_stmt true_branch;
- // The false branch.
+ // The false branch. This will be null if there is no 'else'
+ // clause.
ref_stmt false_branch;
public:
Index: model/instanceof.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/instanceof.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 instanceof.hh
--- model/instanceof.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/instanceof.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent the instanceof operator.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_INSTANCEOF_HH
#define GCJX_MODEL_INSTANCEOF_HH
+/// This represents the 'instanceof' expression. It holds an
+/// expression and a type against which to compare.
class model_instanceof : public model_expression
{
// The expression.
Index: model/javadoc.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/javadoc.hh,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 javadoc.hh
--- model/javadoc.hh 7 Oct 2005 02:01:43 -0000 1.1.2.2
+++ model/javadoc.hh 9 Oct 2005 18:16:18 -0000
@@ -22,6 +22,11 @@
#ifndef GCJX_MODEL_JAVADOC_HH
#define GCJX_MODEL_JAVADOC_HH
+/// Represents a javadoc comment. The only state this holds is
+/// whether or not '@deprecated' was seen. Note that javadoc comment
+/// objects do not live past parsing -- they are created by the lexer
+/// but the parser simply marks their referent as deprecated, when
+/// appropriate.
class model_javadoc : public model_element
{
bool deprecated;
Index: model/label.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/label.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 label.hh
--- model/label.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/label.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent a label.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_LABEL_HH
#define GCJX_MODEL_LABEL_HH
+/// Represents a label statement. This holds the name of the label
+/// and a contained statement.
class model_label : public model_stmt, public Ilabel
{
// The name of the label.
Index: model/loop.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/loop.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 loop.hh
--- model/loop.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/loop.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent a loop of some kind.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_LOOP_HH
#define GCJX_MODEL_LOOP_HH
+/// This is the base class for the looping statements -- for, do, and
+/// while. It is never instantiated, only subclassed.
class model_loop : public model_stmt, public Ilabel
{
protected:
Index: model/newarray.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/newarray.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 newarray.hh
--- model/newarray.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/newarray.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent new of an array.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_NEWARRAY_HH
#define GCJX_MODEL_NEWARRAY_HH
+/// This represents a 'new' expression which creates an array. Any
+/// dimension of array is handled here, as are initialized arrays.
class model_new_array : public model_expression
{
// The element type.
@@ -30,7 +32,8 @@
// Expressions for array sizes.
std::list<ref_expression> sizes;
- // The initializer, if any.
+ // The initializer, if any. This will be null if there is no
+ // initializer.
ref_expression initializer;
bool compute_constant_p ()
Index: model/null.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/null.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 null.hh
--- model/null.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/null.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// The null literal and type.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_NULL_HH
#define GCJX_MODEL_NULL_HH
+/// This represents the null type. Note that there is only one
+/// instance of this class, given by the global 'null_type'.
class model_null_type : public model_type
{
public:
@@ -61,6 +63,7 @@
extern model_null_type *null_type;
+/// This represents a 'null' literal.
class model_null_literal : public model_expression
{
bool compute_constant_p ()
Index: model/return.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/return.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 return.hh
--- model/return.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/return.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent the return statement.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_RETURN_HH
#define GCJX_MODEL_RETURN_HH
+/// This represents the 'return' statement. It holds the return
+/// expression, if there is one.
class model_return : public model_stmt
{
// The expression to return, or NULL if no expression.
Index: model/switch.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/switch.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 switch.hh
--- model/switch.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/switch.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent a switch statement.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -24,6 +24,9 @@
#include <algorithm>
+/// This represents a single "switch block" -- a group of 'case'
+/// statements which share the same code. It holds the switch labels
+/// and a list of corresponding statements.
class model_switch_block : public model_element
{
// The switch labels for this block.
@@ -80,6 +83,9 @@
typedef owner<model_switch_block> ref_switch_block;
+/// This represents a 'switch' statement. It holds the switch
+/// expression, a list of switch blocks making up the body of the
+/// statement, and a pointer to the 'default' block, if any.
class model_switch : public model_stmt, public Ilabel
{
// The switch expression;
Index: model/throw.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/throw.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 throw.hh
--- model/throw.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/throw.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent the throw statement.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_THROW_HH
#define GCJX_MODEL_THROW_HH
+/// This represents a 'throw' statement. It holds the expression to
+/// be thrown.
class model_throw : public model_stmt
{
// The expression to throw.
Index: model/throwsclause.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/throwsclause.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 throwsclause.hh
--- model/throwsclause.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/throwsclause.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent a method's 'throws' clause.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_THROWSCLAUSE_HH
#define GCJX_MODEL_THROWSCLAUSE_HH
+/// This represents the 'throws' clause of a method declaration. It
+/// holds a list of types that are declared as being thrown.
class model_throws_clause
{
// The types.
Index: model/try.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/try.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 try.hh
--- model/try.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/try.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent the try statement.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,15 +22,18 @@
#ifndef GCJX_MODEL_TRY_HH
#define GCJX_MODEL_TRY_HH
+/// This represents a try/finally statement. It holds the try block,
+/// a possibly-empty list of catch clauses, and an optional finally
+/// block.
class model_try : public model_stmt, public ICatcher, public IScope
{
// The block to attempt.
ref_block block;
- // Each catch clause.
+ // Each catch clause. This list can be empty.
std::list<ref_catch> catchers;
- // finally block.
+ // finally block. This is null if there is no 'finally' clause.
ref_block finally;
// Flag determining where a thrown exception should be recorded.
Index: model/unary.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/unary.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 unary.hh
--- model/unary.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/unary.hh 9 Oct 2005 18:16:18 -0000
@@ -1,6 +1,6 @@
// Represent a unary operator.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,8 @@
#ifndef GCJX_MODEL_UNARY_HH
#define GCJX_MODEL_UNARY_HH
+/// This is the base class for all unary expressions. It is never
+/// directly instantiated, only subclassed.
class model_unary : public model_expression
{
protected:
@@ -59,6 +61,8 @@
\f
+/// This template is used for a number of different "simple" prefix
+/// operators, such as unary "+".
template<unary_function OP, predicate P, char NAME>
class model_prefix_simple : public model_unary
{
@@ -103,6 +107,7 @@
\f
+/// This represents the prefix "!" operator.
class model_logical_not
: public model_prefix_simple<&model_primitive_base::lnot,
&model_type::boolean_p,
@@ -124,6 +129,8 @@
\f
+/// This template handles the side-effecting prefix operators, "++"
+/// and "--".
template<char NAME>
class model_prefix_side_effect : public model_unary
{
@@ -151,6 +158,8 @@
\f
+/// This template handles the side-effecting postfix operators, "++"
+/// and "--".
template<char NAME>
class model_postfix : public model_unary
{
Index: model/varref.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/varref.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 varref.hh
--- model/varref.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/varref.hh 9 Oct 2005 18:16:19 -0000
@@ -1,6 +1,6 @@
// Variable and field references.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,8 +22,9 @@
#ifndef GCJX_MODEL_VARREF_HH
#define GCJX_MODEL_VARREF_HH
-// These aren't constructed by the parser, but are constructed by
-// forwarding member references as needed.
+/// This represents a reference to a local variable, either a read or
+/// an assignment. Note that these aren't constructed by the parser,
+/// but are constructed by forwarding member references as needed.
class model_simple_variable_ref : public model_expression
{
// The simple name.
Index: model/varstmt.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/varstmt.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 varstmt.hh
--- model/varstmt.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/varstmt.hh 9 Oct 2005 18:16:19 -0000
@@ -1,6 +1,6 @@
// Variable declaration statements.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,6 +22,9 @@
#ifndef GCJX_MODEL_VARSTMT_HH
#define GCJX_MODEL_VARSTMT_HH
+/// This represents a variable declaration statement as it would
+/// appear in a method body. It holds a list of individual variable
+/// declarations.
class model_variable_stmt : public model_stmt
{
protected:
Index: model/void.hh
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/model/Attic/void.hh,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 void.hh
--- model/void.hh 13 Jan 2005 03:18:36 -0000 1.1.2.1
+++ model/void.hh 9 Oct 2005 18:16:19 -0000
@@ -1,6 +1,6 @@
// The void type.
-// Copyright (C) 2004 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
//
// This file is part of GCC.
//
@@ -22,8 +22,10 @@
#ifndef GCJX_MODEL_VOID_HH
#define GCJX_MODEL_VOID_HH
-// Note that we don't override erasure(). It does make sense to ask
-// for the erasure of the void type.
+/// This represents the 'void' type. There is only a single instance
+/// of the void type in a program -- primitive_void_type is one of the
+/// few globals in gcjx. Note that we don't override erasure(). It
+/// does make sense to ask for the erasure of the void type.
class model_void_type : public model_type
{
public:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-09 18:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-09 18:17 [gcjx] Patch: FYI: documentation updates Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).