GCC Wikia
Advertisement

このページを編集する際は,編集に関する方針に従ってください.[]

概要[]

引数[]

  • enum tree_code code
  • tree type
  • tree op0
  • MEM_STAT_DECL
    • , const char * _loc_name __attribute__ ((__unused__)), int _loc_line __attribute__ ((__unused__)), const char * _loc_function __attribute__ ((__unused__))

実装[]

 10450 /* Fold a unary tree expression with code CODE of type TYPE with an
 10451    operand OP0.  Return a folded expression if successful.  Otherwise,
 10452    return a tree expression with code CODE of type TYPE with an
 10453    operand OP0.  */
10454 
10455 tree
10456 fold_build1_stat (enum tree_code code, tree type, tree op0 MEM_STAT_DECL)
10457 {
10458   tree tem;

~

10459 #ifdef ENABLE_FOLD_CHECKING
10460   unsigned char checksum_before[16], checksum_after[16];
10461   struct md5_ctx ctx;
10462   htab_t ht;
10463 
10464   ht = htab_create (32, htab_hash_pointer, htab_eq_pointer, NULL);
10465   md5_init_ctx (&ctx);
10466   fold_checksum_tree (op0, &ctx, ht);
10467   md5_finish_ctx (&ctx, checksum_before);
10468   htab_empty (ht);
10469 #endif
10470   

~

10471   tem = fold_unary (code, type, op0);
10472   if (!tem)
10473     tem = build1_stat (code, type, op0 PASS_MEM_STAT);
10474   

~

10475 #ifdef ENABLE_FOLD_CHECKING
10476   md5_init_ctx (&ctx);
10477   fold_checksum_tree (op0, &ctx, ht);
10478   md5_finish_ctx (&ctx, checksum_after);
10479   htab_delete (ht);
10480 
10481   if (memcmp (checksum_before, checksum_after, 16))
10482     fold_check_failed (op0, tem);
10483 #endif

~

10484   return tem;
10485 }



リンク元

Advertisement