Changeset 3106 for driver/extracted/switchRemoval.ml
 Timestamp:
 Apr 6, 2013, 7:35:25 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

driver/extracted/switchRemoval.ml
r3059 r3106 174 174 lab }; Types.snd = u1 } 175 175  Csyntax.LScase (sz, tag, st, other_cases) > 176 let { Types.fst = eta21 08; Types.snd = u1 } =176 let { Types.fst = eta2130; Types.snd = u1 } = 177 177 produce_cond e other_cases u exit 178 178 in 179 let { Types.fst = sub_statements; Types.snd = sub_label } = eta21 08in179 let { Types.fst = sub_statements; Types.snd = sub_label } = eta2130 in 180 180 let st' = convert_break_to_goto st exit in 181 181 let { Types.fst = lab; Types.snd = u2 } = … … 199 199 Identifiers.fresh PreIdentifiers.SymbolTag uv 200 200 in 201 let { Types.fst = eta21 09; Types.snd = uv2 } =201 let { Types.fst = eta2131; Types.snd = uv2 } = 202 202 produce_cond e switch_cases uv1 exit_label 203 203 in 204 let { Types.fst = result; Types.snd = useless_label } = eta21 09in204 let { Types.fst = result; Types.snd = useless_label } = eta2131 in 205 205 { Types.fst = (Csyntax.Ssequence (result, (Csyntax.Slabel (exit_label, 206 206 Csyntax.Sskip)))); Types.snd = uv2 } … … 219 219 { Types.fst = { Types.fst = st; Types.snd = List.Nil }; Types.snd = u } 220 220  Csyntax.Ssequence (s1, s2) > 221 let { Types.fst = eta21 23; Types.snd = u' } = switch_removal s1 u in222 let { Types.fst = s1'; Types.snd = acc1 } = eta21 23in223 let { Types.fst = eta21 22; Types.snd = u'' } = switch_removal s2 u' in224 let { Types.fst = s2'; Types.snd = acc2 } = eta21 22in221 let { Types.fst = eta2145; Types.snd = u' } = switch_removal s1 u in 222 let { Types.fst = s1'; Types.snd = acc1 } = eta2145 in 223 let { Types.fst = eta2144; Types.snd = u'' } = switch_removal s2 u' in 224 let { Types.fst = s2'; Types.snd = acc2 } = eta2144 in 225 225 { Types.fst = { Types.fst = (Csyntax.Ssequence (s1', s2')); Types.snd = 226 226 (List.append acc1 acc2) }; Types.snd = u'' } 227 227  Csyntax.Sifthenelse (e, s1, s2) > 228 let { Types.fst = eta21 25; Types.snd = u' } = switch_removal s1 u in229 let { Types.fst = s1'; Types.snd = acc1 } = eta21 25in230 let { Types.fst = eta21 24; Types.snd = u'' } = switch_removal s2 u' in231 let { Types.fst = s2'; Types.snd = acc2 } = eta21 24in228 let { Types.fst = eta2147; Types.snd = u' } = switch_removal s1 u in 229 let { Types.fst = s1'; Types.snd = acc1 } = eta2147 in 230 let { Types.fst = eta2146; Types.snd = u'' } = switch_removal s2 u' in 231 let { Types.fst = s2'; Types.snd = acc2 } = eta2146 in 232 232 { Types.fst = { Types.fst = (Csyntax.Sifthenelse (e, s1', s2')); 233 233 Types.snd = (List.append acc1 acc2) }; Types.snd = u'' } 234 234  Csyntax.Swhile (e, body) > 235 let { Types.fst = eta21 26; Types.snd = u' } = switch_removal body u in236 let { Types.fst = body'; Types.snd = acc } = eta21 26in235 let { Types.fst = eta2148; Types.snd = u' } = switch_removal body u in 236 let { Types.fst = body'; Types.snd = acc } = eta2148 in 237 237 { Types.fst = { Types.fst = (Csyntax.Swhile (e, body')); Types.snd = 238 238 acc }; Types.snd = u' } 239 239  Csyntax.Sdowhile (e, body) > 240 let { Types.fst = eta21 27; Types.snd = u' } = switch_removal body u in241 let { Types.fst = body'; Types.snd = acc } = eta21 27in240 let { Types.fst = eta2149; Types.snd = u' } = switch_removal body u in 241 let { Types.fst = body'; Types.snd = acc } = eta2149 in 242 242 { Types.fst = { Types.fst = (Csyntax.Sdowhile (e, body')); Types.snd = 243 243 acc }; Types.snd = u' } 244 244  Csyntax.Sfor (s1, e, s2, s3) > 245 let { Types.fst = eta21 30; Types.snd = u' } = switch_removal s1 u in246 let { Types.fst = s1'; Types.snd = acc1 } = eta21 30in247 let { Types.fst = eta21 29; Types.snd = u'' } = switch_removal s2 u' in248 let { Types.fst = s2'; Types.snd = acc2 } = eta21 29in249 let { Types.fst = eta21 28; Types.snd = u''' } = switch_removal s3 u'' in250 let { Types.fst = s3'; Types.snd = acc3 } = eta21 28in245 let { Types.fst = eta2152; Types.snd = u' } = switch_removal s1 u in 246 let { Types.fst = s1'; Types.snd = acc1 } = eta2152 in 247 let { Types.fst = eta2151; Types.snd = u'' } = switch_removal s2 u' in 248 let { Types.fst = s2'; Types.snd = acc2 } = eta2151 in 249 let { Types.fst = eta2150; Types.snd = u''' } = switch_removal s3 u'' in 250 let { Types.fst = s3'; Types.snd = acc3 } = eta2150 in 251 251 { Types.fst = { Types.fst = (Csyntax.Sfor (s1', e, s2', s3')); 252 252 Types.snd = (List.append acc1 (List.append acc2 acc3)) }; Types.snd = … … 259 259 { Types.fst = { Types.fst = st; Types.snd = List.Nil }; Types.snd = u } 260 260  Csyntax.Sswitch (e, branches) > 261 let { Types.fst = eta21 31; Types.snd = u' } =261 let { Types.fst = eta2153; Types.snd = u' } = 262 262 switch_removal_branches branches u 263 263 in 264 let { Types.fst = sf_branches; Types.snd = acc } = eta21 31in264 let { Types.fst = sf_branches; Types.snd = acc } = eta2153 in 265 265 let { Types.fst = switch_tmp; Types.snd = u'' } = 266 266 Identifiers.fresh PreIdentifiers.SymbolTag u' … … 276 276 (Csyntax.typeof e) }, acc)) }; Types.snd = u''' } 277 277  Csyntax.Slabel (label, body) > 278 let { Types.fst = eta21 32; Types.snd = u' } = switch_removal body u in279 let { Types.fst = body'; Types.snd = acc } = eta21 32in278 let { Types.fst = eta2154; Types.snd = u' } = switch_removal body u in 279 let { Types.fst = body'; Types.snd = acc } = eta2154 in 280 280 { Types.fst = { Types.fst = (Csyntax.Slabel (label, body')); Types.snd = 281 281 acc }; Types.snd = u' } … … 283 283 { Types.fst = { Types.fst = st; Types.snd = List.Nil }; Types.snd = u } 284 284  Csyntax.Scost (cost, body) > 285 let { Types.fst = eta21 33; Types.snd = u' } = switch_removal body u in286 let { Types.fst = body'; Types.snd = acc } = eta21 33in285 let { Types.fst = eta2155; Types.snd = u' } = switch_removal body u in 286 let { Types.fst = body'; Types.snd = acc } = eta2155 in 287 287 { Types.fst = { Types.fst = (Csyntax.Scost (cost, body')); Types.snd = 288 288 acc }; Types.snd = u' } … … 294 294 match l with 295 295  Csyntax.LSdefault st > 296 let { Types.fst = eta21 34; Types.snd = u' } = switch_removal st u in297 let { Types.fst = st'; Types.snd = acc1 } = eta21 34in296 let { Types.fst = eta2156; Types.snd = u' } = switch_removal st u in 297 let { Types.fst = st'; Types.snd = acc1 } = eta2156 in 298 298 { Types.fst = { Types.fst = (Csyntax.LSdefault st'); Types.snd = acc1 }; 299 299 Types.snd = u' } 300 300  Csyntax.LScase (sz, int, st, tl) > 301 let { Types.fst = eta21 36; Types.snd = u' } =301 let { Types.fst = eta2158; Types.snd = u' } = 302 302 switch_removal_branches tl u 303 303 in 304 let { Types.fst = tl_result; Types.snd = acc1 } = eta21 36in305 let { Types.fst = eta21 35; Types.snd = u'' } = switch_removal st u' in306 let { Types.fst = st'; Types.snd = acc2 } = eta21 35in304 let { Types.fst = tl_result; Types.snd = acc1 } = eta2158 in 305 let { Types.fst = eta2157; Types.snd = u'' } = switch_removal st u' in 306 let { Types.fst = st'; Types.snd = acc2 } = eta2157 in 307 307 { Types.fst = { Types.fst = (Csyntax.LScase (sz, int, st', tl_result)); 308 308 Types.snd = (List.append acc1 acc2) }; Types.snd = u'' } … … 312 312 Identifiers.universe) Types.prod > 'a1 **) 313 313 let ret_st x = 314 let { Types.fst = eta21 37; Types.snd = u } = x in eta2137.Types.fst314 let { Types.fst = eta2159; Types.snd = u } = x in eta2159.Types.fst 315 315 316 316 (** val ret_vars : … … 319 319 List.list **) 320 320 let ret_vars x = 321 let { Types.fst = eta21 38; Types.snd = u } = x in eta2138.Types.snd321 let { Types.fst = eta2160; Types.snd = u } = x in eta2160.Types.snd 322 322 323 323 (** val ret_u : … … 325 325 Identifiers.universe) Types.prod > Identifiers.universe **) 326 326 let ret_u x = 327 let { Types.fst = eta21 39; Types.snd = u } = x in328 let { Types.fst = s; Types.snd = vars } = eta21 39in u327 let { Types.fst = eta2161; Types.snd = u } = x in 328 let { Types.fst = s; Types.snd = vars } = eta2161 in u 329 329 330 330 (** val least_identifier : PreIdentifiers.identifier **) … … 406 406 let function_switch_removal f = 407 407 let u = Fresh.universe_of_max (max_id_of_function f) in 408 let { Types.fst = eta21 40; Types.snd = u' } =408 let { Types.fst = eta2162; Types.snd = u' } = 409 409 switch_removal f.Csyntax.fn_body u 410 410 in 411 let { Types.fst = st; Types.snd = vars } = eta21 40in411 let { Types.fst = st; Types.snd = vars } = eta2162 in 412 412 let result = { Csyntax.fn_return = f.Csyntax.fn_return; Csyntax.fn_params = 413 413 f.Csyntax.fn_params; Csyntax.fn_vars =
Note: See TracChangeset
for help on using the changeset viewer.