Changeset 161900 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Jan 13, 2014, 12:10:22 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r161882 r161900 1 2014-01-13 Brian Burg <[email protected]> 2 3 Web Inspector: protocol generator should support integer-typed declarations 4 https://bugs.webkit.org/show_bug.cgi?id=126828 5 6 Reviewed by Joseph Pecoraro. 7 8 Add new binding classes for parameter/ad-hoc and normal integer type declarations. 9 10 * inspector/scripts/CodeGeneratorInspector.py: 11 (TypeBindings.create_type_declaration_): 12 (TypeBindings.create_type_declaration_.PlainInteger): 13 (TypeBindings.create_type_declaration_.PlainInteger.resolve_inner): 14 (TypeBindings.create_type_declaration_.PlainInteger.request_user_runtime_cast): 15 (TypeBindings.create_type_declaration_.PlainInteger.request_internal_runtime_cast): 16 (TypeBindings.create_type_declaration_.PlainInteger.get_code_generator): 17 (TypeBindings.create_type_declaration_.PlainInteger.get_validator_call_text): 18 (TypeBindings.create_type_declaration_.PlainInteger.reduce_to_raw_type): 19 (TypeBindings.create_type_declaration_.PlainInteger.get_type_model): 20 (TypeBindings.create_type_declaration_.PlainInteger.get_setter_value_expression_pattern): 21 (TypeBindings.create_type_declaration_.PlainInteger.get_array_item_c_type_text): 22 (TypeBindings.create_type_declaration_.TypedefInteger): 23 (TypeBindings.create_type_declaration_.TypedefInteger.resolve_inner): 24 (TypeBindings.create_type_declaration_.TypedefInteger.request_user_runtime_cast): 25 (TypeBindings.create_type_declaration_.TypedefInteger.request_internal_runtime_cast): 26 (TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator): 27 (TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator): 28 (TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator.generate_type_builder): 29 (TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator.generate_type_builder.int): 30 (TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator.register_use): 31 (TypeBindings.create_type_declaration_.TypedefInteger.get_code_generator.CodeGenerator.get_generate_pass_id): 32 (TypeBindings.create_type_declaration_.TypedefInteger.get_validator_call_text): 33 (TypeBindings.create_type_declaration_.TypedefInteger.reduce_to_raw_type): 34 (TypeBindings.create_type_declaration_.TypedefInteger.get_type_model): 35 (TypeBindings.create_type_declaration_.TypedefInteger.get_setter_value_expression_pattern): 36 (TypeBindings.create_type_declaration_.TypedefInteger.get_array_item_c_type_text): 37 1 38 2014-01-13 Zalan Bujtas <[email protected]> 2 39 -
trunk/Source/JavaScriptCore/inspector/scripts/CodeGeneratorInspector.py
r161563 r161900 1113 1113 return TypedefString 1114 1114 1115 elif json_typable["type"] == "integer": 1116 if helper.is_ad_hoc: 1117 1118 class PlainInteger: 1119 @classmethod 1120 def resolve_inner(cls, resolve_context): 1121 pass 1122 1123 @staticmethod 1124 def request_user_runtime_cast(request): 1125 raise Exception("Unsupported") 1126 1127 @staticmethod 1128 def request_internal_runtime_cast(): 1129 pass 1130 1131 @staticmethod 1132 def get_code_generator(): 1133 return None 1134 1135 @classmethod 1136 def get_validator_call_text(cls): 1137 return RawTypes.Int.get_raw_validator_call_text() 1138 1139 @staticmethod 1140 def reduce_to_raw_type(): 1141 return RawTypes.Int 1142 1143 @staticmethod 1144 def get_type_model(): 1145 return TypeModel.Int 1146 1147 @staticmethod 1148 def get_setter_value_expression_pattern(): 1149 return None 1150 1151 @classmethod 1152 def get_array_item_c_type_text(cls): 1153 return cls.reduce_to_raw_type().get_array_item_raw_c_type_text() 1154 1155 return PlainInteger 1156 1157 else: 1158 1159 class TypedefInteger: 1160 @classmethod 1161 def resolve_inner(cls, resolve_context): 1162 pass 1163 1164 @staticmethod 1165 def request_user_runtime_cast(request): 1166 raise Exception("Unsupported") 1167 1168 @staticmethod 1169 def request_internal_runtime_cast(): 1170 RawTypes.Int.request_raw_internal_runtime_cast() 1171 1172 @staticmethod 1173 def get_code_generator(): 1174 class CodeGenerator: 1175 @staticmethod 1176 def generate_type_builder(writer, generate_context): 1177 helper.write_doc(writer) 1178 fixed_type_name.output_comment(writer) 1179 writer.newline("typedef int ") 1180 writer.append(fixed_type_name.class_name) 1181 writer.append(";\n\n") 1182 1183 @staticmethod 1184 def register_use(forward_listener): 1185 pass 1186 1187 @staticmethod 1188 def get_generate_pass_id(): 1189 return TypeBuilderPass.TYPEDEF 1190 1191 return CodeGenerator 1192 1193 @classmethod 1194 def get_validator_call_text(cls): 1195 return RawTypes.Int.get_raw_validator_call_text() 1196 1197 @staticmethod 1198 def reduce_to_raw_type(): 1199 return RawTypes.Int 1200 1201 @staticmethod 1202 def get_type_model(): 1203 return TypeModel.Int 1204 1205 @staticmethod 1206 def get_setter_value_expression_pattern(): 1207 return None 1208 1209 @classmethod 1210 def get_array_item_c_type_text(cls): 1211 return helper.full_name_prefix_for_use + fixed_type_name.class_name 1212 1213 return TypedefInteger 1214 1115 1215 elif json_typable["type"] == "object": 1116 1216 if "properties" in json_typable:
Note:
See TracChangeset
for help on using the changeset viewer.