Merge remote-tracking branch 'redux/master' into sh4-pool
[tamarin-stm.git] / utils / autoexp.dat
blob1c2cc1df95d8d7a4684d08a47aabdaaf5d5896f2
1 ; **** BEGIN LICENSE BLOCK; ****
2 ; Version: MPL 1.1/GPL 2.0/LGPL 2.1
3 ;
4 ; The contents of this file are subject to the Mozilla Public License Version
5 ; 1.1 (the "License"); you may not use this file except in compliance with
6 ; the License. You may obtain a copy of the License at
7 ; http://www.mozilla.org/MPL/
8 ;
9 ; Software distributed under the License is distributed on an "AS IS" basis,
10 ; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 ; for the specific language governing rights and limitations under the
12 ; License.
14 ; The Original Code is [Open Source Virtual Machine.].
16 ; The Initial Developer of the Original Code is
17 ; Adobe System Incorporated.
18 ; Portions created by the Initial Developer are Copyright (C) 2009
19 ; the Initial Developer. All Rights Reserved.
21 ; Contributor(s):
22 ; Adobe AS3 Team
24 ; Alternatively, the contents of this file may be used under the terms of
25 ; either the GNU General Public License Version 2 or later (the "GPL"), or
26 ; the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 ; in which case the provisions of the GPL or the LGPL are applicable instead
28 ; of those above. If you wish to allow use of your version of this file only
29 ; under the terms of either the GPL or the LGPL, and not to allow others to
30 ; use your version of this file under the terms of the MPL, indicate your
31 ; decision by deleting the provisions above and replace them with the notice
32 ; and other provisions required by the GPL or the LGPL. If you do not delete
33 ; the provisions above, a recipient may use your version of this file under
34 ; the terms of any one of the MPL, the GPL or the LGPL.
36 ; ***** END LICENSE BLOCK *****
38 ; This autoexp.dat file is an insert for the VC++ autoexp.dat located at
39 ; {yourVCdir}\Common7\Packages\Debugger.
40 ; It defines a set of visualizers for avmplus, especially Strings and Atoms.
41 ; For Atoms, there is a dummy structure definition AtomP in AtomConstants.cpp
42 ; that allows you to cast an Atom to an AtomP. In the Watches window, you can
43 ; visualize an atom with this statement:
44 ; *(avmplus::AtomP*) &myAtom
45 ; Insert the code below right after the [Visualizer] tag.
47 ; Please feel free to add your own visualizer, or to let me know which additional
48 ; visualizer you would like to have. Email me at daumling@adobe.com.
50 ; avmplus
52 MMgc::RCObject|avmplus::AvmPlusScriptableObject|avmplus::ScriptObject {
53 preview(
54 #if (&$e == 0) ( "NULL" )
55 #else
56 ( #(
57 [((int) &$e),x],
58 " ref=",
59 [((int)($e.composite & 0xFF)-1),d]
60 ) )
64 avmplus::AtomP {
65 preview(
66 #switch ($e.value & 7)
67 #case 0 ( #( "untagged ", [$e.value,x] ) )
68 #case 1 ( #( "Object ", (avmplus::ScriptObject*) ($e.value & ~7) ) )
69 #case 2 ( #( "String ", (avmplus::String*) ($e.value & ~7) ) )
70 #case 3 ( #( "Namespace ", (avmplus::Namespace*) ($e.value & ~7) ) )
71 #case 4 ( #( "undefined" ) )
72 #case 5 ( #( "bool ", ($e.value & 8) != 0 ) )
73 #case 6 ( #( "int ", [$e.value >> 3,d] ) )
74 #case 7 ( #( "double ", *((double*) ($e.value & ~7)) ) )
78 avmplus::String {
79 preview(
80 #if( &$e == 0) ( "NULL" )
81 #else ( #(
83 ; print [n] "text" if non 0-terminated
84 ; print "text" if 0-terminated
85 #switch ($e.m_bitsAndFlags & 0x03)
86 #case 0x01
88 #if ($e.m_buffer.p8[$e.m_length] != 0 )
89 ( #(
90 "[",
91 [$e.m_length,d],
92 "] ",
93 [$e.m_buffer.p8,s]
94 ) )
95 #else
96 ( #(
97 [$e.m_buffer.p8,s]
98 ) )
100 #case 0x02
102 #if ($e.m_buffer.p16[$e.m_length] != 0 )
103 ( #(
104 "[",
105 [$e.m_length,d],
106 "] ",
107 [$e.m_buffer.p16,su]
109 #else
110 ( #(
111 [$e.m_buffer.p16,su]
114 #default ( "[INVALID STRING WIDTH]" )
118 stringview(
120 #switch ($e.m_bitsAndFlags & 0x03)
121 #case 0x01 ( [$e.m_buffer.p8,sb] )
122 #case 0x02 ( [$e.m_buffer.p16,sub] )
125 children( #(
126 [raw] : [$e,!],
127 [test] : ["A",s],
128 refcount : [((int)($e.composite & 0xFF)-1),d],
129 interned : ($e.m_bitsAndFlags & 0x00000010) != 0,
130 width : [($e.m_bitsAndFlags & 0x03) << 3,d],
131 length : [$e.m_length,d],
132 charsLeft : [($e.m_bitsAndFlags >> 9) & 0x7FFFFF,d],
133 #if (($e.m_bitsAndFlags & 0x0000000C) == 8)
135 #( master: $e.m_master )
137 #else
139 #( numeric value: [$e.m_index,d] )
142 #switch ($e.m_bitsAndFlags & 0x03)
143 #case 0x01 ( #( text: [$e.m_buffer.p8,s] ) )
144 #case 0x02 ( #( text: [$e.m_buffer.p16,su] ) )
145 #default ( #( invalid text: ) )
147 #switch ($e.m_bitsAndFlags & 0x0000000C)
148 #case 0x00000000 ( #( type is DYNAMIC: 1==1 ) )
149 #case 0x00000004 ( #( type is STATIC: 1==1 ) )
150 #case 0x00000008 ( #( type is DEPENDENT: 1==1 ) )
151 #case 0x0000000C ( #( type: 3 ) )
155 avmplus::Traits {
156 preview(
157 #if( &$e == 0) ( "NULL" )
158 #else
159 ( #(
160 "Traits",
161 $e._name
164 children( #(
165 [raw] : [$e,!]
169 avmplus::MethodInfo {
170 preview(
171 #if( &$e == 0) ( "NULL" )
172 #else ( #(
173 "MethodInfo",
174 #if ($e._declaringScopeOrTraits & 1)
175 ( ((avmplus::Traits*)($e._declaringScopeOrTraits & ~1))->_name )
176 #else
177 ( ((avmplus::ScopeTypeChain*)($e._declaringScopeOrTraits))->_traits->_name )
180 children( #(
181 [raw] : [$e,!],
182 #if ($e._declaringScopeOrTraits & 1)
183 ( #(
184 declaringTraits: (avmplus::Traits*)($e._declaringScopeOrTraits & ~1)
186 #else
187 ( #(
188 declaringScope: (avmplus::ScopeTypeChain*)($e._declaringScopeOrTraits)
189 ) ),
190 #if ($e._activationScopeOrTraits & 1)
191 ( #(
192 activationTraits: (avmplus::Traits*)($e._activationScopeOrTraits & ~1)
194 #else
195 ( #(
196 activationScope: (avmplus::ScopeTypeChain*)($e._activationScopeOrTraits)
201 avmplus::ScopeTypeChain {
202 preview(
203 #if( &$e == 0) ( "NULL" )
204 #else (
206 "ScopeTypeChain[",
207 [$e.fullsize,d],
208 "],",
209 $e._traits
213 children( #(
214 [raw] : [$e,!],
215 scopes : #array ( expr: $e._scopes[$i], size: $e.fullsize )
219 avmplus::List<*>{
220 preview(
221 #if( &$e == 0) ( "NULL" )
222 #else (
224 "List[", [$e.len,d], "]"
228 children
230 #array
232 expr : $e.data[$i],
233 size : $e.len
238 avmplus::Namespace {
239 preview(
240 #if( &$e == 0) ( "NULL" )
241 #else (
244 #switch ($e.m_uri & 7)
245 #case 0 ( "public" )
246 #case 1 ( "protected" )
247 #case 2 ( "internal" )
248 #case 3 ( "private" )
249 #case 4 ( "explicit" )
250 #case 5 ( "staticprotected" )
251 #case 6 ( "unknown 6" )
252 #case 7 ( "unknown 7" )
254 " Namespace ",
255 ; not null or undefined
256 #if ($e.m_prefix > 0x07)
257 ( #(
258 #( (avmplus::String*) ($e.m_prefix & ~7) ),
259 ";",
260 #( (avmplus::String*) ($e.m_uri & ~7) )
262 #else
264 #( (avmplus::String*) ($e.m_uri & ~7) )