| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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': 'SmiShiftSize', 'value': 'kSmiShiftSize' }, | 79 { 'name': 'SmiShiftSize', 'value': 'kSmiShiftSize' }, |
| 80 { 'name': 'PointerSizeLog2', 'value': 'kPointerSizeLog2' }, | 80 { 'name': 'PointerSizeLog2', 'value': 'kPointerSizeLog2' }, |
| 81 | 81 |
| 82 { 'name': 'prop_idx_transitions', | |
| 83 'value': 'DescriptorArray::kTransitionsIndex' }, | |
| 84 { 'name': 'prop_idx_first', | 82 { 'name': 'prop_idx_first', |
| 85 'value': 'DescriptorArray::kFirstIndex' }, | 83 'value': 'DescriptorArray::kFirstIndex' }, |
| 86 { 'name': 'prop_type_field', | 84 { 'name': 'prop_type_field', |
| 87 'value': 'FIELD' }, | 85 'value': 'FIELD' }, |
| 88 { 'name': 'prop_type_first_phantom', | 86 { 'name': 'prop_type_first_phantom', |
| 89 'value': 'MAP_TRANSITION' }, | 87 'value': 'TRANSITION' }, |
| 90 { 'name': 'prop_type_mask', | 88 { 'name': 'prop_type_mask', |
| 91 'value': 'PropertyDetails::TypeField::kMask' }, | 89 'value': 'PropertyDetails::TypeField::kMask' }, |
| 92 | 90 |
| 93 { 'name': 'off_fp_context', | 91 { 'name': 'off_fp_context', |
| 94 'value': 'StandardFrameConstants::kContextOffset' }, | 92 'value': 'StandardFrameConstants::kContextOffset' }, |
| 95 { 'name': 'off_fp_marker', | 93 { 'name': 'off_fp_marker', |
| 96 'value': 'StandardFrameConstants::kMarkerOffset' }, | 94 'value': 'StandardFrameConstants::kMarkerOffset' }, |
| 97 { 'name': 'off_fp_function', | 95 { 'name': 'off_fp_function', |
| 98 'value': 'JavaScriptFrameConstants::kFunctionOffset' }, | 96 'value': 'JavaScriptFrameConstants::kFunctionOffset' }, |
| 99 { 'name': 'off_fp_args', | 97 { 'name': 'off_fp_args', |
| 100 'value': 'JavaScriptFrameConstants::kLastParameterOffset' }, | 98 'value': 'JavaScriptFrameConstants::kLastParameterOffset' }, |
| 101 ]; | 99 ]; |
| 102 | 100 |
| 103 # | 101 # |
| 104 # The following useful fields are missing accessors, so we define fake ones. | 102 # The following useful fields are missing accessors, so we define fake ones. |
| 105 # | 103 # |
| 106 extras_accessors = [ | 104 extras_accessors = [ |
| 107 'HeapObject, map, Map, kMapOffset', | 105 'HeapObject, map, Map, kMapOffset', |
| 108 'JSObject, elements, Object, kElementsOffset', | 106 'JSObject, elements, Object, kElementsOffset', |
| 109 'FixedArray, data, uintptr_t, kHeaderSize', | 107 'FixedArray, data, uintptr_t, kHeaderSize', |
| 110 'Map, instance_attributes, int, kInstanceAttributesOffset', | 108 'Map, instance_attributes, int, kInstanceAttributesOffset', |
| 111 'Map, instance_descriptors, int, kInstanceDescriptorsOrBitField3Offset', | |
| 112 'Map, inobject_properties, int, kInObjectPropertiesOffset', | 109 'Map, inobject_properties, int, kInObjectPropertiesOffset', |
| 113 'Map, instance_size, int, kInstanceSizeOffset', | 110 'Map, instance_size, int, kInstanceSizeOffset', |
| 114 'HeapNumber, value, double, kValueOffset', | 111 'HeapNumber, value, double, kValueOffset', |
| 115 'ConsString, first, String, kFirstOffset', | 112 'ConsString, first, String, kFirstOffset', |
| 116 'ConsString, second, String, kSecondOffset', | 113 'ConsString, second, String, kSecondOffset', |
| 117 'ExternalString, resource, Object, kResourceOffset', | 114 'ExternalString, resource, Object, kResourceOffset', |
| 118 'SeqOneByteString, chars, char, kHeaderSize', | 115 'SeqOneByteString, chars, char, kHeaderSize', |
| 119 'SharedFunctionInfo, code, Code, kCodeOffset', | 116 'SharedFunctionInfo, code, Code, kCodeOffset', |
| 120 'Code, instruction_start, uintptr_t, kHeaderSize', | 117 'Code, instruction_start, uintptr_t, kHeaderSize', |
| 121 'Code, instruction_size, int, kInstructionSizeOffset', | 118 'Code, instruction_size, int, kInstructionSizeOffset', |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 470 |
| 474 out.write(footer); | 471 out.write(footer); |
| 475 | 472 |
| 476 if (len(sys.argv) < 4): | 473 if (len(sys.argv) < 4): |
| 477 print('usage: %s output.cc objects.h objects-inl.h' % sys.argv[0]); | 474 print('usage: %s output.cc objects.h objects-inl.h' % sys.argv[0]); |
| 478 sys.exit(2); | 475 sys.exit(2); |
| 479 | 476 |
| 480 load_objects(); | 477 load_objects(); |
| 481 load_fields(); | 478 load_fields(); |
| 482 emit_config(); | 479 emit_config(); |
| OLD | NEW |