OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # | 3 # |
4 # Copyright 2012 the V8 project authors. All rights reserved. | 4 # Copyright 2012 the V8 project authors. All rights reserved. |
5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
7 # met: | 7 # met: |
8 # | 8 # |
9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 { 'name': 'TwoByteStringTag', 'value': 'kTwoByteStringTag' }, | 63 { 'name': 'TwoByteStringTag', 'value': 'kTwoByteStringTag' }, |
64 { 'name': 'OneByteStringTag', 'value': 'kOneByteStringTag' }, | 64 { 'name': 'OneByteStringTag', 'value': 'kOneByteStringTag' }, |
65 | 65 |
66 { 'name': 'StringRepresentationMask', | 66 { 'name': 'StringRepresentationMask', |
67 'value': 'kStringRepresentationMask' }, | 67 'value': 'kStringRepresentationMask' }, |
68 { 'name': 'SeqStringTag', 'value': 'kSeqStringTag' }, | 68 { 'name': 'SeqStringTag', 'value': 'kSeqStringTag' }, |
69 { 'name': 'ConsStringTag', 'value': 'kConsStringTag' }, | 69 { 'name': 'ConsStringTag', 'value': 'kConsStringTag' }, |
70 { 'name': 'ExternalStringTag', 'value': 'kExternalStringTag' }, | 70 { 'name': 'ExternalStringTag', 'value': 'kExternalStringTag' }, |
71 { 'name': 'SlicedStringTag', 'value': 'kSlicedStringTag' }, | 71 { 'name': 'SlicedStringTag', 'value': 'kSlicedStringTag' }, |
72 | 72 |
73 { 'name': 'FailureTag', 'value': 'kFailureTag' }, | |
74 { 'name': 'FailureTagMask', 'value': 'kFailureTagMask' }, | |
75 { 'name': 'HeapObjectTag', 'value': 'kHeapObjectTag' }, | 73 { 'name': 'HeapObjectTag', 'value': 'kHeapObjectTag' }, |
76 { 'name': 'HeapObjectTagMask', 'value': 'kHeapObjectTagMask' }, | 74 { 'name': 'HeapObjectTagMask', 'value': 'kHeapObjectTagMask' }, |
77 { 'name': 'SmiTag', 'value': 'kSmiTag' }, | 75 { 'name': 'SmiTag', 'value': 'kSmiTag' }, |
78 { 'name': 'SmiTagMask', 'value': 'kSmiTagMask' }, | 76 { 'name': 'SmiTagMask', 'value': 'kSmiTagMask' }, |
79 { 'name': 'SmiValueShift', 'value': 'kSmiTagSize' }, | 77 { 'name': 'SmiValueShift', 'value': 'kSmiTagSize' }, |
80 { 'name': 'SmiShiftSize', 'value': 'kSmiShiftSize' }, | 78 { 'name': 'SmiShiftSize', 'value': 'kSmiShiftSize' }, |
81 { 'name': 'PointerSizeLog2', 'value': 'kPointerSizeLog2' }, | 79 { 'name': 'PointerSizeLog2', 'value': 'kPointerSizeLog2' }, |
82 | 80 |
83 { 'name': 'OddballFalse', 'value': 'Oddball::kFalse' }, | 81 { 'name': 'OddballFalse', 'value': 'Oddball::kFalse' }, |
84 { 'name': 'OddballTrue', 'value': 'Oddball::kTrue' }, | 82 { 'name': 'OddballTrue', 'value': 'Oddball::kTrue' }, |
85 { 'name': 'OddballTheHole', 'value': 'Oddball::kTheHole' }, | 83 { 'name': 'OddballTheHole', 'value': 'Oddball::kTheHole' }, |
86 { 'name': 'OddballNull', 'value': 'Oddball::kNull' }, | 84 { 'name': 'OddballNull', 'value': 'Oddball::kNull' }, |
87 { 'name': 'OddballArgumentMarker', 'value': 'Oddball::kArgumentMarker' }, | 85 { 'name': 'OddballArgumentMarker', 'value': 'Oddball::kArgumentMarker' }, |
88 { 'name': 'OddballUndefined', 'value': 'Oddball::kUndefined' }, | 86 { 'name': 'OddballUndefined', 'value': 'Oddball::kUndefined' }, |
89 { 'name': 'OddballUninitialized', 'value': 'Oddball::kUninitialized' }, | 87 { 'name': 'OddballUninitialized', 'value': 'Oddball::kUninitialized' }, |
90 { 'name': 'OddballOther', 'value': 'Oddball::kOther' }, | 88 { 'name': 'OddballOther', 'value': 'Oddball::kOther' }, |
91 { 'name': 'OddballException', 'value': 'Oddball::kException' }, | 89 { 'name': 'OddballException', 'value': 'Oddball::kException' }, |
92 | 90 |
93 { 'name': 'prop_idx_first', | 91 { 'name': 'prop_idx_first', |
94 'value': 'DescriptorArray::kFirstIndex' }, | 92 'value': 'DescriptorArray::kFirstIndex' }, |
95 { 'name': 'prop_type_field', | 93 { 'name': 'prop_type_field', |
96 'value': 'FIELD' }, | 94 'value': 'FIELD' }, |
97 { 'name': 'prop_type_first_phantom', | |
98 'value': 'TRANSITION' }, | |
99 { 'name': 'prop_type_mask', | 95 { 'name': 'prop_type_mask', |
100 'value': 'PropertyDetails::TypeField::kMask' }, | 96 'value': 'PropertyDetails::TypeField::kMask' }, |
101 { 'name': 'prop_index_mask', | 97 { 'name': 'prop_index_mask', |
102 'value': 'PropertyDetails::FieldIndexField::kMask' }, | 98 'value': 'PropertyDetails::FieldIndexField::kMask' }, |
103 { 'name': 'prop_index_shift', | 99 { 'name': 'prop_index_shift', |
104 'value': 'PropertyDetails::FieldIndexField::kShift' }, | 100 'value': 'PropertyDetails::FieldIndexField::kShift' }, |
105 | 101 |
106 { 'name': 'prop_desc_key', | 102 { 'name': 'prop_desc_key', |
107 'value': 'DescriptorArray::kDescriptorKey' }, | 103 'value': 'DescriptorArray::kDescriptorKey' }, |
108 { 'name': 'prop_desc_details', | 104 { 'name': 'prop_desc_details', |
109 'value': 'DescriptorArray::kDescriptorDetails' }, | 105 'value': 'DescriptorArray::kDescriptorDetails' }, |
110 { 'name': 'prop_desc_value', | 106 { 'name': 'prop_desc_value', |
111 'value': 'DescriptorArray::kDescriptorValue' }, | 107 'value': 'DescriptorArray::kDescriptorValue' }, |
112 { 'name': 'prop_desc_size', | 108 { 'name': 'prop_desc_size', |
113 'value': 'DescriptorArray::kDescriptorSize' }, | 109 'value': 'DescriptorArray::kDescriptorSize' }, |
114 | 110 |
115 { 'name': 'elements_fast_holey_elements', | 111 { 'name': 'elements_fast_holey_elements', |
116 'value': 'FAST_HOLEY_ELEMENTS' }, | 112 'value': 'FAST_HOLEY_ELEMENTS' }, |
117 { 'name': 'elements_fast_elements', | 113 { 'name': 'elements_fast_elements', |
118 'value': 'FAST_ELEMENTS' }, | 114 'value': 'FAST_ELEMENTS' }, |
119 { 'name': 'elements_dictionary_elements', | 115 { 'name': 'elements_dictionary_elements', |
120 'value': 'DICTIONARY_ELEMENTS' }, | 116 'value': 'DICTIONARY_ELEMENTS' }, |
121 | 117 |
122 { 'name': 'bit_field2_elements_kind_mask', | 118 { 'name': 'bit_field2_elements_kind_mask', |
123 'value': 'Map::kElementsKindMask' }, | 119 'value': 'Map::ElementsKindBits::kMask' }, |
124 { 'name': 'bit_field2_elements_kind_shift', | 120 { 'name': 'bit_field2_elements_kind_shift', |
125 'value': 'Map::kElementsKindShift' }, | 121 'value': 'Map::ElementsKindBits::kShift' }, |
126 { 'name': 'bit_field3_dictionary_map_shift', | 122 { 'name': 'bit_field3_dictionary_map_shift', |
127 'value': 'Map::DictionaryMap::kShift' }, | 123 'value': 'Map::DictionaryMap::kShift' }, |
128 | 124 |
129 { 'name': 'off_fp_context', | 125 { 'name': 'off_fp_context', |
130 'value': 'StandardFrameConstants::kContextOffset' }, | 126 'value': 'StandardFrameConstants::kContextOffset' }, |
131 { 'name': 'off_fp_constant_pool', | 127 { 'name': 'off_fp_constant_pool', |
132 'value': 'StandardFrameConstants::kConstantPoolOffset' }, | 128 'value': 'StandardFrameConstants::kConstantPoolOffset' }, |
133 { 'name': 'off_fp_marker', | 129 { 'name': 'off_fp_marker', |
134 'value': 'StandardFrameConstants::kMarkerOffset' }, | 130 'value': 'StandardFrameConstants::kMarkerOffset' }, |
135 { 'name': 'off_fp_function', | 131 { 'name': 'off_fp_function', |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 types = {}; # set of all type names | 185 types = {}; # set of all type names |
190 typeclasses = {}; # maps type names to corresponding class names | 186 typeclasses = {}; # maps type names to corresponding class names |
191 klasses = {}; # known classes, including parents | 187 klasses = {}; # known classes, including parents |
192 fields = []; # field declarations | 188 fields = []; # field declarations |
193 | 189 |
194 header = ''' | 190 header = ''' |
195 /* | 191 /* |
196 * This file is generated by %s. Do not edit directly. | 192 * This file is generated by %s. Do not edit directly. |
197 */ | 193 */ |
198 | 194 |
199 #include "v8.h" | 195 #include "src/v8.h" |
200 #include "frames.h" | 196 #include "src/frames.h" |
201 #include "frames-inl.h" /* for architecture-specific frame constants */ | 197 #include "src/frames-inl.h" /* for architecture-specific frame constants */ |
202 | 198 |
203 using namespace v8::internal; | 199 using namespace v8::internal; |
204 | 200 |
205 extern "C" { | 201 extern "C" { |
206 | 202 |
207 /* stack frame constants */ | 203 /* stack frame constants */ |
208 #define FRAME_CONST(value, klass) \ | 204 #define FRAME_CONST(value, klass) \ |
209 int v8dbg_frametype_##klass = StackFrame::value; | 205 int v8dbg_frametype_##klass = StackFrame::value; |
210 | 206 |
211 STACK_FRAME_TYPE_LIST(FRAME_CONST) | 207 STACK_FRAME_TYPE_LIST(FRAME_CONST) |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 523 |
528 out.write(footer); | 524 out.write(footer); |
529 | 525 |
530 if (len(sys.argv) < 4): | 526 if (len(sys.argv) < 4): |
531 print('usage: %s output.cc objects.h objects-inl.h' % sys.argv[0]); | 527 print('usage: %s output.cc objects.h objects-inl.h' % sys.argv[0]); |
532 sys.exit(2); | 528 sys.exit(2); |
533 | 529 |
534 load_objects(); | 530 load_objects(); |
535 load_fields(); | 531 load_fields(); |
536 emit_config(); | 532 emit_config(); |
OLD | NEW |