Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 87 lines (73 sloc) 3.468 kb
cc15299 @davepacheco build: add support for DTrace and postmortem
davepacheco authored
1 /*
2 * This header defines short names for V8 constants for use by the ustack
3 * helper.
4 */
5
6 #ifndef V8_ABBR_H
7 #define V8_ABBR_H
8
9 /* Frame pointer offsets */
10 #define V8_OFF_FP_FUNC ((uint32_t)V8DBG_OFF_FP_FUNCTION)
11 #define V8_OFF_FP_CONTEXT ((uint32_t)V8DBG_OFF_FP_CONTEXT)
12 #define V8_OFF_FP_MARKER ((uint32_t)V8DBG_OFF_FP_MARKER)
13
14 /* Stack frame types */
15 #define V8_FT_ENTRY V8DBG_FRAMETYPE_ENTRYFRAME
16 #define V8_FT_ENTRYCONSTRUCT V8DBG_FRAMETYPE_ENTRYCONSTRUCTFRAME
17 #define V8_FT_EXIT V8DBG_FRAMETYPE_EXITFRAME
18 #define V8_FT_JAVASCRIPT V8DBG_FRAMETYPE_JAVASCRIPTFRAME
19 #define V8_FT_OPTIMIZED V8DBG_FRAMETYPE_OPTIMIZEDFRAME
20 #define V8_FT_INTERNAL V8DBG_FRAMETYPE_INTERNALFRAME
21 #define V8_FT_CONSTRUCT V8DBG_FRAMETYPE_CONSTRUCTFRAME
22 #define V8_FT_ADAPTOR V8DBG_FRAMETYPE_ARGUMENTSADAPTORFRAME
23
24 /* Identification masks and tags */
25 #define V8_SmiTagMask V8DBG_SMITAGMASK
26 #define V8_SmiTag V8DBG_SMITAG
27 #define V8_SmiValueShift V8_SmiTagMask
28
29 #define V8_HeapObjectTagMask V8DBG_HEAPOBJECTTAGMASK
30 #define V8_HeapObjectTag V8DBG_HEAPOBJECTTAG
31
32 #define V8_IsNotStringMask V8DBG_ISNOTSTRINGMASK
33 #define V8_StringTag V8DBG_STRINGTAG
34
35 #define V8_StringEncodingMask V8DBG_STRINGENCODINGMASK
36 #define V8_AsciiStringTag V8DBG_ASCIISTRINGTAG
37
38 #define V8_StringRepresentationMask V8DBG_STRINGREPRESENTATIONMASK
39 #define V8_SeqStringTag V8DBG_SEQSTRINGTAG
40 #define V8_ConsStringTag V8DBG_CONSSTRINGTAG
41 #define V8_ExternalStringTag V8DBG_EXTERNALSTRINGTAG
42
43 /* Instance types */
44 #define V8_IT_FIXEDARRAY V8DBG_TYPE_FIXEDARRAY__FIXED_ARRAY_TYPE
45 #define V8_IT_CODE V8DBG_TYPE_CODE__CODE_TYPE
46
47 /* Node-specific offsets */
48 #define NODE_OFF_EXTSTR_DATA 0x4
49
50 /* Heap class->field offsets */
51 #define V8_OFF_HEAP(off) ((off) - 1)
52
53 #define V8_OFF_FUNC_SHARED \
54 V8_OFF_HEAP(V8DBG_CLASS_JSFUNCTION__SHARED__SHAREDFUNCTIONINFO)
55 #define V8_OFF_SHARED_NAME \
56 V8_OFF_HEAP(V8DBG_CLASS_SHAREDFUNCTIONINFO__NAME__OBJECT)
57 #define V8_OFF_SHARED_INFERRED \
58 V8_OFF_HEAP(V8DBG_CLASS_SHAREDFUNCTIONINFO__INFERRED_NAME__STRING)
59 #define V8_OFF_SHARED_SCRIPT \
60 V8_OFF_HEAP(V8DBG_CLASS_SHAREDFUNCTIONINFO__SCRIPT__OBJECT)
61 #define V8_OFF_SHARED_FUNTOK \
62 V8_OFF_HEAP(V8DBG_CLASS_SHAREDFUNCTIONINFO__FUNCTION_TOKEN_POSITION__SMI)
63 #define V8_OFF_SCRIPT_NAME \
64 V8_OFF_HEAP(V8DBG_CLASS_SCRIPT__NAME__OBJECT)
65 #define V8_OFF_SCRIPT_LENDS \
66 V8_OFF_HEAP(V8DBG_CLASS_SCRIPT__LINE_ENDS__OBJECT)
67 #define V8_OFF_STR_LENGTH \
68 V8_OFF_HEAP(V8DBG_CLASS_STRING__LENGTH__SMI)
69 #define V8_OFF_STR_CHARS \
70 V8_OFF_HEAP(V8DBG_CLASS_SEQASCIISTRING__CHARS__CHAR)
71 #define V8_OFF_CONSSTR_CAR \
72 V8_OFF_HEAP(V8DBG_CLASS_CONSSTRING__FIRST__STRING)
73 #define V8_OFF_CONSSTR_CDR \
74 V8_OFF_HEAP(V8DBG_CLASS_CONSSTRING__SECOND__STRING)
75 #define V8_OFF_EXTSTR_RSRC \
76 V8_OFF_HEAP(V8DBG_CLASS_EXTERNALSTRING__RESOURCE__OBJECT)
77 #define V8_OFF_FA_SIZE \
78 V8_OFF_HEAP(V8DBG_CLASS_FIXEDARRAYBASE__LENGTH__SMI)
79 #define V8_OFF_FA_DATA \
80 V8_OFF_HEAP(V8DBG_CLASS_FIXEDARRAY__DATA__UINTPTR_T)
81 #define V8_OFF_HEAPOBJ_MAP \
82 V8_OFF_HEAP(V8DBG_CLASS_HEAPOBJECT__MAP__MAP)
83 #define V8_OFF_MAP_ATTRS \
84 V8_OFF_HEAP(V8DBG_CLASS_MAP__INSTANCE_ATTRIBUTES__INT)
85
86 #endif /* V8_ABBR_H */
Something went wrong with that request. Please try again.