Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: tools/gen-postmortem-metadata.py

Issue 10827379: gen-postmortem-metadata.py: fix code generator (Closed)
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Makefile ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 { 'name': 'FailureTag', 'value': 'kFailureTag' }, 72 { 'name': 'FailureTag', 'value': 'kFailureTag' },
73 { 'name': 'FailureTagMask', 'value': 'kFailureTagMask' }, 73 { 'name': 'FailureTagMask', 'value': 'kFailureTagMask' },
74 { 'name': 'HeapObjectTag', 'value': 'kHeapObjectTag' }, 74 { 'name': 'HeapObjectTag', 'value': 'kHeapObjectTag' },
75 { 'name': 'HeapObjectTagMask', 'value': 'kHeapObjectTagMask' }, 75 { 'name': 'HeapObjectTagMask', 'value': 'kHeapObjectTagMask' },
76 { 'name': 'SmiTag', 'value': 'kSmiTag' }, 76 { 'name': 'SmiTag', 'value': 'kSmiTag' },
77 { 'name': 'SmiTagMask', 'value': 'kSmiTagMask' }, 77 { 'name': 'SmiTagMask', 'value': 'kSmiTagMask' },
78 { 'name': 'SmiValueShift', 'value': 'kSmiTagSize' }, 78 { 'name': 'SmiValueShift', 'value': 'kSmiTagSize' },
79 { 'name': 'PointerSizeLog2', 'value': 'kPointerSizeLog2' }, 79 { 'name': 'PointerSizeLog2', 'value': 'kPointerSizeLog2' },
80 80
81 { 'name': 'prop_idx_transitions', 81 { 'name': 'prop_idx_elements_transitions',
82 'value': 'DescriptorArray::kTransitionsIndex' }, 82 'value': 'TransitionArray::kElementsTransitionIndex' },
83 { 'name': 'prop_idx_prototype_transitions',
84 'value': 'TransitionArray::kPrototypeTransitionsIndex' },
83 { 'name': 'prop_idx_first', 85 { 'name': 'prop_idx_first',
84 'value': 'DescriptorArray::kFirstIndex' }, 86 'value': 'TransitionArray::kFirstIndex' },
Toon Verwaest 2012/08/21 13:29:46 All these changes change the semantics of the fiel
87
85 { 'name': 'prop_type_field', 88 { 'name': 'prop_type_field',
86 'value': 'FIELD' }, 89 'value': 'FIELD' },
87 { 'name': 'prop_type_first_phantom', 90 { 'name': 'prop_type_first_phantom',
88 'value': 'MAP_TRANSITION' }, 91 'value': 'Code::MAP_TRANSITION' },
89 { 'name': 'prop_type_mask', 92 { 'name': 'prop_type_mask',
90 'value': 'PropertyDetails::TypeField::kMask' }, 93 'value': 'PropertyDetails::TypeField::kMask' },
91 94
92 { 'name': 'off_fp_context', 95 { 'name': 'off_fp_context',
93 'value': 'StandardFrameConstants::kContextOffset' }, 96 'value': 'StandardFrameConstants::kContextOffset' },
94 { 'name': 'off_fp_marker', 97 { 'name': 'off_fp_marker',
95 'value': 'StandardFrameConstants::kMarkerOffset' }, 98 'value': 'StandardFrameConstants::kMarkerOffset' },
96 { 'name': 'off_fp_function', 99 { 'name': 'off_fp_function',
97 'value': 'JavaScriptFrameConstants::kFunctionOffset' }, 100 'value': 'JavaScriptFrameConstants::kFunctionOffset' },
98 { 'name': 'off_fp_args', 101 { 'name': 'off_fp_args',
99 'value': 'JavaScriptFrameConstants::kLastParameterOffset' }, 102 'value': 'JavaScriptFrameConstants::kLastParameterOffset' },
100 ]; 103 ];
101 104
102 # 105 #
103 # The following useful fields are missing accessors, so we define fake ones. 106 # The following useful fields are missing accessors, so we define fake ones.
104 # 107 #
105 extras_accessors = [ 108 extras_accessors = [
106 'HeapObject, map, Map, kMapOffset', 109 'HeapObject, map, Map, kMapOffset',
107 'JSObject, elements, Object, kElementsOffset', 110 'JSObject, elements, Object, kElementsOffset',
108 'FixedArray, data, uintptr_t, kHeaderSize', 111 'FixedArray, data, uintptr_t, kHeaderSize',
109 'Map, instance_attributes, int, kInstanceAttributesOffset', 112 'Map, instance_attributes, int, kInstanceAttributesOffset',
110 'Map, instance_descriptors, int, kInstanceDescriptorsOrBitField3Offset', 113 'Map, instance_descriptors, uintptr_t, kTransitionsOrBackPointerOffset',
Toon Verwaest 2012/08/21 13:29:46 This field does not contain the instance_descripto
111 'Map, inobject_properties, int, kInObjectPropertiesOffset', 114 'Map, inobject_properties, int, kInObjectPropertiesOffset',
112 'Map, instance_size, int, kInstanceSizeOffset', 115 'Map, instance_size, int, kInstanceSizeOffset',
113 'HeapNumber, value, double, kValueOffset', 116 'HeapNumber, value, double, kValueOffset',
114 'ConsString, first, String, kFirstOffset', 117 'ConsString, first, String, kFirstOffset',
115 'ConsString, second, String, kSecondOffset', 118 'ConsString, second, String, kSecondOffset',
116 'ExternalString, resource, Object, kResourceOffset', 119 'ExternalString, resource, Object, kResourceOffset',
117 'SeqAsciiString, chars, char, kHeaderSize', 120 'SeqAsciiString, chars, char, kHeaderSize',
118 'SharedFunctionInfo, code, Code, kCodeOffset', 121 'SharedFunctionInfo, code, Code, kCodeOffset',
119 'Code, instruction_start, uintptr_t, kHeaderSize', 122 'Code, instruction_start, uintptr_t, kHeaderSize',
120 'Code, instruction_size, int, kInstructionSizeOffset', 123 'Code, instruction_size, int, kInstructionSizeOffset',
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 475
473 out.write(footer); 476 out.write(footer);
474 477
475 if (len(sys.argv) < 4): 478 if (len(sys.argv) < 4):
476 print('usage: %s output.cc objects.h objects-inl.h' % sys.argv[0]); 479 print('usage: %s output.cc objects.h objects-inl.h' % sys.argv[0]);
477 sys.exit(2); 480 sys.exit(2);
478 481
479 load_objects(); 482 load_objects();
480 load_fields(); 483 load_fields();
481 emit_config(); 484 emit_config();
OLDNEW
« no previous file with comments | « Makefile ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698