hotspot/src/share/vm/prims/jvmtiLib.xsl
author sspitsyn
Wed, 21 Sep 2016 01:33:21 -0700
changeset 41287 203e59c224b0
parent 36508 5f9eee6b383b
permissions -rw-r--r--
8147943: jvmti.h generated with GPL header Summary: Generate the jvmti.h with the GPL+CP header Reviewed-by: dcubed, alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
<!--
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 13728
diff changeset
     4
 Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    21
 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    22
 or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1
diff changeset
    23
 questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
  
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
-->
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
                version="1.0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
  <xsl:template name="microversion">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
    <xsl:value-of select="//specification/@microversion"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
  <xsl:template name="showbasicversion">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
    <xsl:value-of select="//specification/@majorversion"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
    <xsl:text>.</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
    <xsl:value-of select="//specification/@minorversion"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  <xsl:template name="showversion">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
    <xsl:call-template name="showbasicversion"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
    <xsl:text>.</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
    <xsl:call-template name="microversion"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
41287
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    46
  <xsl:variable name="GPL_header">
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    47
    <!-- The Copyright comment from jvmti.xml -->
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    48
    <xsl:value-of select="/comment()[position()=1]"/>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    49
  </xsl:variable>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    50
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    51
  <xsl:variable name="GPL_CP_header_body">
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    52
    <xsl:text> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    53
    <xsl:text> *&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    54
    <xsl:text> * This code is free software; you can redistribute it and/or modify it&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    55
    <xsl:text> * under the terms of the GNU General Public License version 2 only, as&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    56
    <xsl:text> * published by the Free Software Foundation.  Oracle designates this&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    57
    <xsl:text> * particular file as subject to the "Classpath" exception as provided&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    58
    <xsl:text> * by Oracle in the LICENSE file that accompanied this code.&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    59
    <xsl:text> *&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    60
    <xsl:text> * This code is distributed in the hope that it will be useful, but WITHOUT&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    61
    <xsl:text> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    62
    <xsl:text> * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    63
    <xsl:text> * version 2 for more details (a copy is included in the LICENSE file that&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    64
    <xsl:text> * accompanied this code).&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    65
    <xsl:text> *&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    66
    <xsl:text> * You should have received a copy of the GNU General Public License version&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    67
    <xsl:text> * 2 along with this work; if not, write to the Free Software Foundation,&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    68
    <xsl:text> * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    69
    <xsl:text> *&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    70
    <xsl:text> * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    71
    <xsl:text> * or visit www.oracle.com if you need additional information or have any&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    72
    <xsl:text> * questions.&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    73
  </xsl:variable>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    74
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  <xsl:template name="copyrightComment">
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 13728
diff changeset
    76
    <xsl:text>/*</xsl:text>
41287
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    77
    <!-- The Copyright comment from jvmti.xml -->
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    78
    <xsl:value-of select="$GPL_header"/>
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 13728
diff changeset
    79
    <xsl:text> */&#xA;&#xA;</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
41287
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    82
  <xsl:template name="GPL_CP_copyrightComment">
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    83
    <xsl:text>/*&#xA; *</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    84
    <!-- The Copyright year from jvmti.xml -->
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    85
    <xsl:value-of select="substring-after(substring-before($GPL_header, ' DO NOT ALTER'), '&#xA;')"/>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    86
    <!-- The GPL+CP Copyright header body -->
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    87
    <xsl:value-of select="$GPL_CP_header_body"/>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    88
    <xsl:text> */&#xA;&#xA;</xsl:text>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    89
  </xsl:template>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    90
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    91
  <xsl:template name="include_GPL_CP_Header">
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    92
    <xsl:call-template name="GPL_CP_copyrightComment"/>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    93
    <xsl:text> /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */&#xA;</xsl:text>    
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    94
  </xsl:template>
203e59c224b0 8147943: jvmti.h generated with GPL header
sspitsyn
parents: 36508
diff changeset
    95
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
  <xsl:template name="includeHeader">
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
    <xsl:call-template name="copyrightComment"/>
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 13728
diff changeset
    98
    <xsl:text> /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */&#xA;</xsl:text>    
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  <xsl:template name="sourceHeader">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
    <xsl:call-template name="copyrightComment"/>
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents: 13728
diff changeset
   103
    <xsl:text> // AUTOMATICALLY GENERATED FILE - DO NOT EDIT&#xA;</xsl:text>    
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
<xsl:template match="parameters" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  <xsl:param name="comma">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
    <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
            </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
  </xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  <xsl:if test="count(param) != 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
    <xsl:value-of select="$comma"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  <xsl:apply-templates select="." mode="signaturenoleadcomma">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
    <xsl:with-param name="comma" select="$comma"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
<xsl:template match="parameters" mode="signaturenoleadcomma">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  <xsl:param name="comma">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
    <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
            </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  </xsl:param>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  <xsl:variable name="length" select="count(param)"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  <xsl:for-each select="param">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
    <xsl:variable name="separator">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
        <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
          <xsl:when test="position()=$length">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
            <xsl:text></xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
          </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
          <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
            <xsl:value-of select="$comma"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
          </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
        </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
    </xsl:variable>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
    <xsl:apply-templates select="." mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
      <xsl:with-param name="comma" select="$separator"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
<!-- remove jclass parameters that are jclass/jmethodID pairs.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
     since the jclass was removed in JVMTI.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
-->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
<xsl:template match="param" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
  <xsl:param name="comma"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
  <xsl:variable name="id" select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
  <xsl:for-each select="child::*[position()=1]">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
    <xsl:if test="count(@method)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
      <xsl:apply-templates select="." mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
      <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
      <xsl:value-of select="$id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
      <xsl:value-of select="$comma"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
<xsl:template match="field" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
  <xsl:text>    </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
  <xsl:apply-templates select="child::*[position()=1]" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
<xsl:template match="nullok" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  If
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
    <xsl:value-of select="../../@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
  is
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  <code>NULL</code>, <xsl:apply-templates/>.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
<xsl:template match="vmbuf|allocfieldbuf|struct" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  <xsl:message terminate="yes">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
    vmbuf|allocfieldbuf|struct as type of function parameter
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  </xsl:message>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
<xsl:template match="ptrtype" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  <p/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  <xsl:apply-templates select="nullok" mode="funcdescription"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
<xsl:template match="inptr" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
  <p/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
  <xsl:variable name="child" select="child::*[position()=1]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
  <xsl:text>Agent passes in a pointer</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  <xsl:if test="name($child)!='void'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
    <xsl:text> to </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
    <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
      <xsl:apply-templates select="$child" mode="signature"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
    </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
  <xsl:text>. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
  <xsl:apply-templates select="nullok" mode="funcdescription"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
<xsl:template match="inbuf" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  <p/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  <xsl:variable name="child" select="child::*[position()=1]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  <xsl:text>Agent passes in </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
    <xsl:when test="name($child)='void'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
      <xsl:text> a pointer</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
      <xsl:text> an array of </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
      <xsl:if test="count(@incount)=1 and @incount!=''">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
        <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
          <xsl:value-of select="@incount"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
        </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
        <xsl:text> elements of </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
      </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
      <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
        <xsl:apply-templates select="$child" mode="signature"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
      </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
  <xsl:text>. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  <xsl:apply-templates select="nullok" mode="funcdescription"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
<xsl:template match="outptr" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
  <p/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
  <xsl:text>Agent passes a pointer to a </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
    <xsl:apply-templates select="child::*[position()=1]" mode="signature"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
  <xsl:text>. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
  <xsl:text>On return, the </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
    <xsl:apply-templates select="child::*[position()=1]" mode="signature"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
  <xsl:text> has been set. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
  <xsl:apply-templates select="nullok" mode="funcdescription"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
  <xsl:apply-templates select="child::*[position()=1]" mode="returndescription"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
<xsl:template match="allocbuf" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
  <p/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
  <xsl:text>Agent passes a pointer to a </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
    <xsl:apply-templates select="child::*[position()=1]" mode="signature"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
    <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
  <xsl:text>. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
  <xsl:text>On return, the </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
    <xsl:apply-templates select="child::*[position()=1]" mode="signature"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
    <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
  <xsl:text> points to a newly allocated array</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
    <xsl:when test="count(@outcount)=1 and @outcount!=''">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
      <xsl:text> of size </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
      <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
        <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
        <xsl:value-of select="@outcount"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
      </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
      <xsl:if test="count(@incount)=1 and @incount!=''">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
        <xsl:text> of size </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
        <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
          <xsl:value-of select="@incount"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
        </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
      </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
  <xsl:text>.  The array should be freed with </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
  <a href="#Deallocate"><code>Deallocate</code></a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
  <xsl:text>. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
  <xsl:apply-templates select="nullok" mode="funcdescription"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
  <xsl:apply-templates select="child::*[position()=1]" mode="returndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
    <xsl:with-param name="plural" select="'plural'"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
<xsl:template match="allocallocbuf" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
  <p/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
  <xsl:text>Agent passes a pointer to a </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
    <xsl:apply-templates select="child::*[position()=1]" mode="signature"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
    <xsl:text>**</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
  <xsl:text>. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
  <xsl:text>On return, the </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
    <xsl:apply-templates select="child::*[position()=1]" mode="signature"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
    <xsl:text>**</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
  <xsl:text> points to a newly allocated array</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
    <xsl:when test="count(@outcount)=1 and @outcount!=''">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
      <xsl:text> of size </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
      <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
        <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
        <xsl:value-of select="@outcount"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
      </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
      <xsl:if test="count(@incount)=1 and @incount!=''">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
        <xsl:text> of size </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
        <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
          <xsl:value-of select="@incount"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
        </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
      </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
  <xsl:text>, each element of which is also newly allocated.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
  The array should be freed with </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
  <a href="#Deallocate"><code>Deallocate</code></a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
  <xsl:text>. 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
  Each of the elements should be freed with </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
  <a href="#Deallocate"><code>Deallocate</code></a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
  <xsl:text>. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
  <xsl:apply-templates select="nullok" mode="funcdescription"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
  <xsl:apply-templates select="child::*[position()=1]" mode="returndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
    <xsl:with-param name="plural" select="'plural'"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
<xsl:template match="outbuf" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
  <p/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
  <xsl:text>Agent passes an array </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
  <xsl:if test="count(@incount)=1 and @incount!=''">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
    <xsl:text>large enough to hold </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
    <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
      <xsl:value-of select="@incount"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
    </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
    <xsl:text> elements </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
  <xsl:text>of </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
    <xsl:apply-templates select="child::*[position()=1]" mode="signature"/> 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
  <xsl:text>. The incoming values of the elements of the array are ignored. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
  <xsl:text>On return, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
  <xsl:if test="count(@outcount)=1 and @outcount!=''">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
    <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
      <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
      <xsl:value-of select="@outcount"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
    </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
    <xsl:text> of </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
  <xsl:text>the elements are set. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
  <xsl:apply-templates select="nullok" mode="funcdescription"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
  <xsl:apply-templates select="child::*[position()=1]" mode="returndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
    <xsl:with-param name="plural" select="'plural'"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
489c9b5090e2 Initial load
duke
parents:
diff changeset
   360
<xsl:template match="agentbuf" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
  <p/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
  <xsl:apply-templates select="nullok" mode="funcdescription"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
  <xsl:apply-templates select="child::*[position()=1]" mode="returndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
    <xsl:with-param name="plural" select="'plural'"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
<xsl:template match="jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs|struct" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
<xsl:template match="jthread" mode="funcdescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
  <xsl:if test="count(@null)!=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
    If
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
    <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
      <xsl:value-of select="../@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
    </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
    is
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
    <code>NULL</code>, the current thread is used.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
<xsl:template match="jmethodID|jfieldID|jframeID|jrawMonitorID|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs" mode="returndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
<xsl:template match="struct" mode="returndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
  <xsl:param name="plural"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
  <xsl:variable name="structname" select="."/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
  <xsl:for-each select="//typedef[@id=$structname]|//uniontypedef[@id=$structname]">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
    <xsl:for-each select="field">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
      <xsl:apply-templates select="child::*[position()=1]" mode="fieldreturndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
        <xsl:with-param name="plural" select="$plural"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
      </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
    </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
<xsl:template match="jclass|jthread|jobject|jvalue|jthreadGroup" mode="returndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
  <xsl:param name="plural"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
  <xsl:text>The object</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
  <xsl:if test="$plural='plural'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
    <xsl:text>s</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
  <xsl:text> returned by </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
    <xsl:value-of select="../../@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
  <xsl:choose>    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
    <xsl:when test="$plural='plural'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
      <xsl:text> are JNI local references and must be </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
      <xsl:text> is a JNI local reference and must be </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
  <a href="#refs">managed</a>.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
<xsl:template match="outptr|inptr|inbuf|agentbuf|allocbuf|allocallocbuf" mode="fieldreturndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
  <xsl:variable name="field" select="ancestor::field"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
  <xsl:message terminate="yes">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
    outptr, allocallocbuf, outbuf, vmbuf, allocbuf, inptr, inbuf or agentbuf as type of returned field:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   422
    <xsl:value-of select="$field/@id"/> of <xsl:value-of select="$field/../@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
  </xsl:message>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   425
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
<xsl:template match="outbuf" mode="fieldreturndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
  <!-- hand document this special case.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
  -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
<xsl:template match="struct" mode="fieldreturndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
  <xsl:param name="plural"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   433
  <xsl:variable name="structname" select="."/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   434
  <xsl:for-each select="//typedef[@id=$structname]|//uniontypedef[@id=$structname]">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
    <xsl:for-each select="field">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   436
      <xsl:apply-templates select="child::*[position()=1]" mode="fieldreturndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
        <xsl:with-param name="plural" select="$plural"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
      </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
    </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   440
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   442
489c9b5090e2 Initial load
duke
parents:
diff changeset
   443
<xsl:template match="allocfieldbuf" mode="fieldreturndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
  <xsl:param name="plural"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   445
  <xsl:variable name="field" select="ancestor::field"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
  <xsl:text>The pointer</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   447
  <xsl:if test="$plural='plural'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   448
    <xsl:text>s</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   449
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   450
  <xsl:text> returned in the field </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   451
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
    <xsl:value-of select="$field/@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
  <xsl:text> of </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   455
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   456
    <xsl:value-of select="$field/../@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   457
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   458
  <xsl:choose>    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   459
    <xsl:when test="$plural='plural'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   460
      <xsl:text> are newly allocated arrays. The arrays</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   461
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   462
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   463
      <xsl:text> is a newly allocated array. The array</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   464
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   465
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
  <xsl:text> should be freed with </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   467
  <a href="#Deallocate"><code>Deallocate</code></a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   468
  <xsl:text>. </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
  <xsl:apply-templates select="child::*[position()=1]" mode="fieldreturndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   471
    <xsl:with-param name="plural" select="'plural'"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   474
489c9b5090e2 Initial load
duke
parents:
diff changeset
   475
<xsl:template match="ptrtype|vmbuf|jmethodID|jfieldID|jframeID|jrawMonitorID|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void" mode="fieldreturndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   476
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   477
489c9b5090e2 Initial load
duke
parents:
diff changeset
   478
<xsl:template match="jclass|jthread|jobject|jvalue|jthreadGroup" mode="fieldreturndescription">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   479
  <xsl:param name="plural"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
  <xsl:variable name="field" select="ancestor::field"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   481
  <xsl:text>The object</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   482
  <xsl:if test="$plural='plural'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   483
    <xsl:text>s</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   484
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   485
  <xsl:text> returned in the field </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   486
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   487
    <xsl:value-of select="$field/@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   488
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   489
  <xsl:text> of </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   490
  <code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   491
    <xsl:value-of select="$field/../@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
  </code>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
  <xsl:choose>    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   494
    <xsl:when test="$plural='plural'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   495
      <xsl:text> are JNI local references and must be </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   496
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   497
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   498
      <xsl:text> is a JNI local reference and must be </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   499
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   500
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   501
  <a href="#refs">managed</a>.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   502
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   503
489c9b5090e2 Initial load
duke
parents:
diff changeset
   504
<xsl:template match="nullok" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   505
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   506
489c9b5090e2 Initial load
duke
parents:
diff changeset
   507
<xsl:template match="jmethodID|jfieldID|jrawMonitorID|jclass|jthread|jobject|jvalue|jthreadGroup|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|size_t|void" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   508
  <xsl:value-of select="name()"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   509
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
489c9b5090e2 Initial load
duke
parents:
diff changeset
   511
<xsl:template match="jframeID" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   512
  <xsl:text>jint</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   513
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   514
489c9b5090e2 Initial load
duke
parents:
diff changeset
   515
<xsl:template match="uchar" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   516
  <xsl:text>unsigned char</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   517
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   518
489c9b5090e2 Initial load
duke
parents:
diff changeset
   519
<xsl:template match="enum|struct" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
  <xsl:value-of select="."/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   521
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   522
489c9b5090e2 Initial load
duke
parents:
diff changeset
   523
<xsl:template match="varargs" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   524
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   525
489c9b5090e2 Initial load
duke
parents:
diff changeset
   526
<xsl:template match="outptr|outbuf|allocfieldbuf" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   527
  <xsl:apply-templates select="child::*[position()=1]" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   528
  <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   529
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   530
489c9b5090e2 Initial load
duke
parents:
diff changeset
   531
<xsl:template match="ptrtype" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   532
  <xsl:apply-templates select="child::*[position()=1]" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   534
489c9b5090e2 Initial load
duke
parents:
diff changeset
   535
<xsl:template match="inptr|inbuf|vmbuf" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   536
  <xsl:text>const </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
  <xsl:apply-templates select="child::*[position()=1]" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   538
  <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   539
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   540
489c9b5090e2 Initial load
duke
parents:
diff changeset
   541
<xsl:template match="allocbuf|agentbuf" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   542
  <xsl:apply-templates select="child::*[position()=1]" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
  <xsl:text>**</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   544
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   545
489c9b5090e2 Initial load
duke
parents:
diff changeset
   546
<xsl:template match="allocallocbuf" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   547
  <xsl:apply-templates select="child::*[position()=1]" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   548
  <xsl:text>***</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   549
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   550
489c9b5090e2 Initial load
duke
parents:
diff changeset
   551
<xsl:template match="nullok" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   552
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   553
489c9b5090e2 Initial load
duke
parents:
diff changeset
   554
<xsl:template match="jmethodID|jfieldID|jrawMonitorID|jclass|jthread|jobject|jvalue|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|jthreadGroup" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   555
  <a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   556
    <xsl:attribute name="href">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   557
      <xsl:text>#</xsl:text><xsl:value-of select="name()"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   558
    </xsl:attribute>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   559
    <xsl:value-of select="name()"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   560
  </a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   561
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   562
489c9b5090e2 Initial load
duke
parents:
diff changeset
   563
<xsl:template match="jframeID" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   564
  <a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   565
    <xsl:attribute name="href">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   566
      <xsl:text>#jint</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   567
    </xsl:attribute>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   568
    <xsl:text>jint</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   569
  </a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   570
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   571
489c9b5090e2 Initial load
duke
parents:
diff changeset
   572
<xsl:template match="enum|struct" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   573
  <a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   574
    <xsl:attribute name="href">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   575
      <xsl:text>#</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   576
      <xsl:value-of select="."/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   577
    </xsl:attribute>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   578
    <xsl:value-of select="."/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   579
  </a>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   580
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   581
489c9b5090e2 Initial load
duke
parents:
diff changeset
   582
<xsl:template match="char|size_t|void" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   583
    <xsl:value-of select="name()"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   584
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   585
489c9b5090e2 Initial load
duke
parents:
diff changeset
   586
<xsl:template match="uchar" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   587
    <xsl:text>unsigned char</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   588
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   589
489c9b5090e2 Initial load
duke
parents:
diff changeset
   590
<xsl:template match="varargs" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   591
  <xsl:text>...</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   592
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   593
489c9b5090e2 Initial load
duke
parents:
diff changeset
   594
<xsl:template match="ptrtype" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   595
  <xsl:apply-templates mode="link"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   596
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   597
489c9b5090e2 Initial load
duke
parents:
diff changeset
   598
<xsl:template match="outptr|outbuf|allocfieldbuf" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   599
  <xsl:apply-templates mode="link"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   600
  <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   601
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   602
489c9b5090e2 Initial load
duke
parents:
diff changeset
   603
<xsl:template match="inptr|inbuf|vmbuf" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   604
  <xsl:text>const </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   605
  <xsl:apply-templates mode="link"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   606
  <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   607
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   608
489c9b5090e2 Initial load
duke
parents:
diff changeset
   609
<xsl:template match="allocbuf|agentbuf" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   610
  <xsl:apply-templates mode="link"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   611
  <xsl:text>**</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   612
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   613
489c9b5090e2 Initial load
duke
parents:
diff changeset
   614
<xsl:template match="allocallocbuf" mode="link">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   615
  <xsl:apply-templates mode="link"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   616
  <xsl:text>***</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   617
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   618
489c9b5090e2 Initial load
duke
parents:
diff changeset
   619
<xsl:template match="jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jobject|jvalue|jthreadGroup|jthread|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|size_t|void" mode="btsig">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   620
  <xsl:value-of select="name()"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   621
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   622
489c9b5090e2 Initial load
duke
parents:
diff changeset
   623
<xsl:template match="uchar" mode="btsig">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   624
  <xsl:text>unsigned char</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   625
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   626
489c9b5090e2 Initial load
duke
parents:
diff changeset
   627
<xsl:template match="enum|struct" mode="btsig">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   628
  <xsl:value-of select="."/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   629
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   630
489c9b5090e2 Initial load
duke
parents:
diff changeset
   631
<xsl:template match="outbuf" mode="btsig">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   632
  <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   633
  <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   634
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   635
489c9b5090e2 Initial load
duke
parents:
diff changeset
   636
<xsl:template name="gentypedef">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   637
  <xsl:param name="tdef"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   638
  <xsl:text>typedef struct {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   639
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   640
<xsl:apply-templates select="$tdef/field" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   641
  <xsl:text>} </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   642
  <xsl:value-of select="$tdef/@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   643
  <xsl:text>;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   644
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   645
489c9b5090e2 Initial load
duke
parents:
diff changeset
   646
<xsl:template name="genuniontypedef">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   647
  <xsl:param name="tdef"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   648
  <xsl:text>typedef union {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   649
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   650
<xsl:apply-templates select="$tdef/field" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   651
  <xsl:text>} </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   652
  <xsl:value-of select="$tdef/@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   653
  <xsl:text>;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   654
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   655
489c9b5090e2 Initial load
duke
parents:
diff changeset
   656
489c9b5090e2 Initial load
duke
parents:
diff changeset
   657
<xsl:template match="capabilitiestypedef" mode="genstruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   658
  <xsl:variable name="caps" select="count(capabilityfield)"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   659
  <xsl:text>typedef struct {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   660
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   661
  <xsl:apply-templates select="capabilityfield" mode="signature"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   662
  <xsl:variable name="rem" select="$caps mod 16"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   663
  <xsl:if test="$rem != 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   664
    <xsl:text>    unsigned int : </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   665
    <xsl:value-of select="16 - $rem"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   666
    <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   667
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   668
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   669
  <xsl:if test="$caps &lt;= 32">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   670
    <xsl:text>    unsigned int : 16;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   671
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   672
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   673
  <xsl:if test="$caps &lt;= 48">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   674
    <xsl:text>    unsigned int : 16;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   675
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   676
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   677
  <xsl:if test="$caps &lt;= 64">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   678
    <xsl:text>    unsigned int : 16;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   679
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   680
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   681
  <xsl:if test="$caps &lt;= 80">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   682
    <xsl:text>    unsigned int : 16;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   683
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   684
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   685
  <xsl:if test="$caps &lt;= 96">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   686
    <xsl:text>    unsigned int : 16;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   687
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   688
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   689
  <xsl:if test="$caps &lt;= 112">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   690
    <xsl:text>    unsigned int : 16;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   691
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   692
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   693
  <xsl:text>} </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   694
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   695
  <xsl:text>;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   696
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   697
489c9b5090e2 Initial load
duke
parents:
diff changeset
   698
<xsl:template match="capabilityfield" mode="signature">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   699
  <xsl:text>    unsigned int </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   700
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   701
  <xsl:text> : 1;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   702
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   703
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   704
489c9b5090e2 Initial load
duke
parents:
diff changeset
   705
<xsl:template match="constants" mode="enum">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   706
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   707
typedef </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   708
  <xsl:apply-templates select="." mode="enumcore"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   709
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   710
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   711
  <xsl:text>;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   712
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   713
489c9b5090e2 Initial load
duke
parents:
diff changeset
   714
<xsl:template match="constants" mode="constants">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   715
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   716
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   717
  <xsl:apply-templates select="." mode="enumcore"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   718
  <xsl:text>;</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   719
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   720
489c9b5090e2 Initial load
duke
parents:
diff changeset
   721
<xsl:template match="constants" mode="enumcore">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   722
  <xsl:text>enum {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   723
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   724
  <xsl:for-each select="constant">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   725
    <xsl:if test="position() &gt; 1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   726
      <xsl:text>,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   727
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   728
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   729
    <xsl:apply-templates select="." mode="enum"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   730
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   731
  <xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   732
}</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   733
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   734
489c9b5090e2 Initial load
duke
parents:
diff changeset
   735
<xsl:template match="event" mode="enum">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   736
  <xsl:text>    </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   737
  <xsl:value-of select="@const"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   738
  <xsl:text> = </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   739
  <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   740
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   741
489c9b5090e2 Initial load
duke
parents:
diff changeset
   742
<xsl:template match="constant|errorid" mode="enum">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   743
  <xsl:text>    </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   744
  <xsl:value-of select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   745
  <xsl:text> = </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   746
  <xsl:value-of select="@num"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   747
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   748
489c9b5090e2 Initial load
duke
parents:
diff changeset
   749
489c9b5090e2 Initial load
duke
parents:
diff changeset
   750
  <xsl:template name="eventStruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   751
    <xsl:param name="events"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   752
    <xsl:param name="index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   753
    <xsl:param name="started"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   754
    <xsl:param name="comment"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   755
    <xsl:variable name="thisEvent" select="$events[@num=$index]"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   756
    <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   757
      <xsl:when test="count($thisEvent)=1">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   758
        <xsl:if test="$comment='Yes'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   759
          <xsl:text>                              /* </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   760
          <xsl:number value="$index" format="  1"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   761
          <xsl:text> : </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   762
          <xsl:value-of select="$thisEvent/@label"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   763
          <xsl:text> */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   764
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   765
        </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   766
        <xsl:text>    jvmtiEvent</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   767
        <xsl:value-of select="$thisEvent/@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   768
        <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   769
        <xsl:value-of select="$thisEvent/@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   770
        <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   771
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   772
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   773
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   774
      <xsl:if test="$started">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   775
        <xsl:if test="$comment='Yes'">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   776
          <xsl:text>                              /* </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   777
          <xsl:number value="$index" format="  1"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   778
          <xsl:text> */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   779
</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   780
        </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   781
        <xsl:text>    jvmtiEventReserved reserved</xsl:text>        
489c9b5090e2 Initial load
duke
parents:
diff changeset
   782
        <xsl:value-of select="$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   783
        <xsl:text>;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   784
</xsl:text>     
489c9b5090e2 Initial load
duke
parents:
diff changeset
   785
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   786
  </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   787
</xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   788
    <xsl:if test="count($events[@num &gt; $index]) &gt; 0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   789
      <xsl:call-template name="eventStruct">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   790
        <xsl:with-param name="events" select="$events"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   791
        <xsl:with-param name="index" select="1+$index"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   792
        <xsl:with-param name="started" select="$started or count($thisEvent)=1"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   793
        <xsl:with-param name="comment" select="$comment"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   794
      </xsl:call-template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   795
    </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   796
  </xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   797
489c9b5090e2 Initial load
duke
parents:
diff changeset
   798
489c9b5090e2 Initial load
duke
parents:
diff changeset
   799
<!-- ======== HotSpotType ======== -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   800
489c9b5090e2 Initial load
duke
parents:
diff changeset
   801
<xsl:template match="parameters" mode="HotSpotSig">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   802
  <xsl:variable name="length" select="count(param)"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   803
  <xsl:for-each select="param">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   804
    <xsl:variable name="separator">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   805
        <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   806
          <xsl:when test="position()=$length">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   807
            <xsl:text></xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   808
          </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   809
          <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   810
            <xsl:text>, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   811
          </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   812
        </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   813
    </xsl:variable>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   814
    <xsl:apply-templates select="." mode="HotSpotSig">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   815
      <xsl:with-param name="comma" select="$separator"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   816
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   817
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   818
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   819
489c9b5090e2 Initial load
duke
parents:
diff changeset
   820
<xsl:template match="param" mode="HotSpotSig">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   821
  <xsl:param name="comma"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   822
  <xsl:variable name="result">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   823
    <xsl:apply-templates select="child::*[position()=1]" mode="HotSpotType"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   824
  </xsl:variable>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   825
  <xsl:if test="string-length($result)!=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   826
    <xsl:value-of select="$result"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   827
    <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   828
    <xsl:apply-templates select="child::*[position()=1]" mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   829
      <xsl:with-param name="name" select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   830
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   831
    <xsl:value-of select="$comma"/>    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   832
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   833
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   834
489c9b5090e2 Initial load
duke
parents:
diff changeset
   835
<xsl:template match="jthread" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   836
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   837
    <xsl:when test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   838
      <xsl:text>JavaThread*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   839
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   840
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   841
      <xsl:value-of select="name()"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   842
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   843
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   844
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   845
489c9b5090e2 Initial load
duke
parents:
diff changeset
   846
<xsl:template match="jrawMonitorID" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   847
  <xsl:text>JvmtiRawMonitor *</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   848
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   849
489c9b5090e2 Initial load
duke
parents:
diff changeset
   850
<xsl:template match="jframeID" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   851
  <xsl:text>jint</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   852
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   853
489c9b5090e2 Initial load
duke
parents:
diff changeset
   854
<xsl:template match="jmethodID" mode="HotSpotType">
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5547
diff changeset
   855
  <xsl:text>Method*</xsl:text>
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   856
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   857
489c9b5090e2 Initial load
duke
parents:
diff changeset
   858
<xsl:template match="jfieldID" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   859
  <xsl:text>fieldDescriptor*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   860
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   861
489c9b5090e2 Initial load
duke
parents:
diff changeset
   862
<xsl:template match="jclass" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   863
  <!--
489c9b5090e2 Initial load
duke
parents:
diff changeset
   864
    classes passed as part of a class/method or class/field pair are used
489c9b5090e2 Initial load
duke
parents:
diff changeset
   865
    by the wrapper to get the internal type but are not needed by nor 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   866
    passed to the implementation layer.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   867
  -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   868
  <xsl:if test="count(@method|@field)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   869
    <xsl:text>oop</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   870
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   871
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   872
489c9b5090e2 Initial load
duke
parents:
diff changeset
   873
<xsl:template match="nullok" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   874
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   875
489c9b5090e2 Initial load
duke
parents:
diff changeset
   876
<xsl:template match="jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|struct" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   877
  <xsl:apply-templates select="." mode="btsig"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   878
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   879
489c9b5090e2 Initial load
duke
parents:
diff changeset
   880
<xsl:template match="varargs" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   881
  <xsl:text> </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   882
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   883
489c9b5090e2 Initial load
duke
parents:
diff changeset
   884
<xsl:template match="outptr|outbuf|allocfieldbuf" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   885
  <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   886
  <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   887
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   888
489c9b5090e2 Initial load
duke
parents:
diff changeset
   889
<xsl:template match="ptrtype" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   890
  <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   891
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   892
489c9b5090e2 Initial load
duke
parents:
diff changeset
   893
<xsl:template match="inptr|inbuf|vmbuf" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   894
  <xsl:text>const </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   895
  <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   896
  <xsl:text>*</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   897
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   898
489c9b5090e2 Initial load
duke
parents:
diff changeset
   899
<xsl:template match="allocbuf|agentbuf" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   900
  <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   901
  <xsl:text>**</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   902
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   903
489c9b5090e2 Initial load
duke
parents:
diff changeset
   904
<xsl:template match="allocallocbuf" mode="HotSpotType">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   905
  <xsl:apply-templates select="child::*[position()=1]" mode="btsig"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   906
  <xsl:text>***</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   907
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   908
489c9b5090e2 Initial load
duke
parents:
diff changeset
   909
<!-- ========  HotSpotName ======== -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   910
489c9b5090e2 Initial load
duke
parents:
diff changeset
   911
<xsl:template match="jthread" mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   912
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   913
  <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   914
    <xsl:when test="count(@impl)=0 or not(contains(@impl,'noconvert'))">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   915
      <xsl:text>java_thread</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   916
    </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   917
    <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   918
      <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   919
    </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   920
  </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   921
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   922
489c9b5090e2 Initial load
duke
parents:
diff changeset
   923
<xsl:template match="jrawMonitorID" mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   924
  <xsl:text>rmonitor</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   925
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   926
489c9b5090e2 Initial load
duke
parents:
diff changeset
   927
<xsl:template match="jframeID" mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   928
  <xsl:text>depth</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   929
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   930
489c9b5090e2 Initial load
duke
parents:
diff changeset
   931
<xsl:template match="jmethodID" mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   932
  <xsl:text>method_oop</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   933
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   934
489c9b5090e2 Initial load
duke
parents:
diff changeset
   935
<xsl:template match="jfieldID" mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   936
  <xsl:text>fdesc_ptr</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   937
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   938
489c9b5090e2 Initial load
duke
parents:
diff changeset
   939
<xsl:template match="jclass" mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   940
  <!--
489c9b5090e2 Initial load
duke
parents:
diff changeset
   941
    classes passed as part of a class/method or class/field pair are used
489c9b5090e2 Initial load
duke
parents:
diff changeset
   942
    by the wrapper to get the internal type but are not needed by nor 
489c9b5090e2 Initial load
duke
parents:
diff changeset
   943
    passed to the implementation layer.  This value is checked for empty.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   944
  -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   945
  <xsl:if test="count(@method|@field)=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   946
    <xsl:text>k_mirror</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   947
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   948
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   949
489c9b5090e2 Initial load
duke
parents:
diff changeset
   950
<xsl:template match="nullok" mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   951
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   952
489c9b5090e2 Initial load
duke
parents:
diff changeset
   953
<xsl:template match="jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs|struct|outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   954
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   955
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   956
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   957
489c9b5090e2 Initial load
duke
parents:
diff changeset
   958
<!-- ======== HotSpotValue ======== -->
489c9b5090e2 Initial load
duke
parents:
diff changeset
   959
489c9b5090e2 Initial load
duke
parents:
diff changeset
   960
489c9b5090e2 Initial load
duke
parents:
diff changeset
   961
<xsl:template match="parameters" mode="HotSpotValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   962
  <xsl:variable name="length" select="count(param)"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   963
  <xsl:for-each select="param">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   964
    <xsl:variable name="separator">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   965
        <xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   966
          <xsl:when test="position()=$length">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   967
            <xsl:text></xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   968
          </xsl:when>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   969
          <xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   970
            <xsl:text>, </xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   971
          </xsl:otherwise>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   972
        </xsl:choose>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   973
    </xsl:variable>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   974
    <xsl:apply-templates select="." mode="HotSpotValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   975
      <xsl:with-param name="comma" select="$separator"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   976
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   977
  </xsl:for-each>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   978
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   979
489c9b5090e2 Initial load
duke
parents:
diff changeset
   980
<xsl:template match="param" mode="HotSpotValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   981
  <xsl:param name="comma"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   982
  <xsl:variable name="result">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   983
    <xsl:apply-templates select="child::*[position()=1]" mode="HotSpotValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   984
      <xsl:with-param name="name" select="@id"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   985
    </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   986
  </xsl:variable>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   987
  <xsl:if test="string-length($result)!=0">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   988
    <xsl:value-of select="$result"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   989
    <xsl:value-of select="$comma"/>    
489c9b5090e2 Initial load
duke
parents:
diff changeset
   990
  </xsl:if>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   991
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   992
489c9b5090e2 Initial load
duke
parents:
diff changeset
   993
<xsl:template match="jframeID|jmethodID|jrawMonitorID|jthread|jclass|nullok" mode="HotSpotValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   994
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   995
  <xsl:apply-templates select="." mode="HotSpotName">
489c9b5090e2 Initial load
duke
parents:
diff changeset
   996
    <xsl:with-param name="name" select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   997
  </xsl:apply-templates>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   998
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
   999
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1000
<xsl:template match="jfieldID" mode="HotSpotValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1001
  <xsl:text>&amp;fdesc</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1002
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1003
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1004
<xsl:template match="jobject|jvalue|jthreadGroup|enum|jint|jchar|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|struct|outptr|outbuf|allocfieldbuf|ptrtype|inptr|inbuf|vmbuf|allocbuf|agentbuf|allocallocbuf" mode="HotSpotValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1005
  <xsl:param name="name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1006
  <xsl:value-of select="$name"/>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1007
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1008
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1009
<xsl:template match="varargs" mode="HotSpotValue">
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1010
  <xsl:text>NULL</xsl:text>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1011
</xsl:template>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1012
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1013
</xsl:stylesheet>
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1014