Changeset 94e0864d for src/CodeGen
- Timestamp:
- Jun 24, 2015, 4:12:31 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 1869adf
- Parents:
- 94b4364 (diff), de62360d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/CodeGen
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r94b4364 r94e0864d 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon Jun 15 12:47:16201513 // Update Count : 14 212 // Last Modified On : Wed Jun 24 16:11:41 2015 13 // Update Count : 143 14 14 // 15 15 … … 77 77 if ( functionDecl->get_isInline() ) { 78 78 output << "inline "; 79 } // if 80 if ( functionDecl->get_isNoreturn() ) { 81 output << "_Noreturn "; 79 82 } // if 80 83 output << genType( functionDecl->get_functionType(), mangleName( functionDecl ) ); … … 303 306 case OT_PREFIX: 304 307 case OT_PREFIXASSIGN: 308 case OT_LABELADDRESS: 305 309 assert( untypedExpr->get_args().size() == 1 ); 306 310 output << "("; … … 326 330 output << ")"; 327 331 break; 328 332 329 333 case OT_CONSTANT: 330 334 // there are no intrinsic definitions of 0 or 1 as functions … … 642 646 break; 643 647 case DeclarationNode::Inline: 644 // handled as special via isInline flag (FIX)648 output << "inline "; 645 649 break; 646 650 case DeclarationNode::Fortran: 647 // not handled648 651 output << "fortran "; 649 652 break; 650 653 case DeclarationNode::Noreturn: 651 // not handled652 654 output << "_Noreturn "; 653 655 break; 654 656 case DeclarationNode::Threadlocal: 655 // not handled656 657 output << "_Thread_local "; 657 658 break; -
src/CodeGen/OperatorTable.cc
r94b4364 r94e0864d 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon May 18 23:42:07201513 // Update Count : 212 // Last Modified On : Tue Jun 23 17:41:14 2015 13 // Update Count : 5 14 14 // 15 15 … … 20 20 namespace { 21 21 const OperatorInfo tableValues[] = { 22 { "?[?]", "", "_operator_index", OT_INDEX},23 { "?()", "", "_operator_call", OT_CALL},24 { "?++", "++", "_operator_postincr", OT_POSTFIXASSIGN },25 { "?--", "--", "_operator_postdecr", OT_POSTFIXASSIGN },26 { "*?", "*", "_operator_deref", OT_PREFIX},27 { "+?", "+", "_operator_unaryplus", OT_PREFIX},28 { "-?", "-", "_operator_unaryminus", OT_PREFIX},29 { "~?", "~", "_operator_bitnot", OT_PREFIX},30 { "!?", "!", "_operator_lognot", OT_PREFIX},31 { "++?", "++", "_operator_preincr", OT_PREFIXASSIGN },32 { "--?", "--", "_operator_predecr", OT_PREFIXASSIGN },33 { "?*?", "*", "_operator_multiply", OT_INFIX},34 { "?/?", "/", "_operator_divide", OT_INFIX},35 { "?%?", "%", "_operator_modulus", OT_INFIX},36 { "?+?", "+", "_operator_add", OT_INFIX},37 { "?-?", "-", "_operator_subtract", OT_INFIX},38 { "?<<?", "<<", "_operator_shiftleft", OT_INFIX},39 { "?>>?", ">>", "_operator_shiftright", OT_INFIX},40 { "?<?", "<", "_operator_less", OT_INFIX},41 { "?>?", ">", "_operator_greater", OT_INFIX},42 { "?<=?", "<=", "_operator_lessequal", OT_INFIX},43 { "?>=?", ">=", "_operator_greaterequal", OT_INFIX},44 { "?==?", "==", "_operator_equal", OT_INFIX},45 { "?!=?", "!=", "_operator_notequal", OT_INFIX},46 { "?&?", "&", "_operator_bitand", OT_INFIX},47 { "?^?", "^", "_operator_bitxor", OT_INFIX},48 { "?|?", "|", "_operator_bitor", OT_INFIX},49 { "?=?", "=", "_operator_assign", OT_INFIXASSIGN },50 { "?*=?", "*=", "_operator_multassign", OT_INFIXASSIGN },51 { "?/=?", "/=", "_operator_divassign", OT_INFIXASSIGN },52 { "?%=?", "%=", "_operator_modassign", OT_INFIXASSIGN },53 { "?+=?", "+=", "_operator_addassign", OT_INFIXASSIGN },54 { "?-=?", "-=", "_operator_subassign", OT_INFIXASSIGN },22 { "?[?]", "", "_operator_index", OT_INDEX }, 23 { "?()", "", "_operator_call", OT_CALL }, 24 { "?++", "++", "_operator_postincr", OT_POSTFIXASSIGN }, 25 { "?--", "--", "_operator_postdecr", OT_POSTFIXASSIGN }, 26 { "*?", "*", "_operator_deref", OT_PREFIX }, 27 { "+?", "+", "_operator_unaryplus", OT_PREFIX }, 28 { "-?", "-", "_operator_unaryminus", OT_PREFIX }, 29 { "~?", "~", "_operator_bitnot", OT_PREFIX }, 30 { "!?", "!", "_operator_lognot", OT_PREFIX }, 31 { "++?", "++", "_operator_preincr", OT_PREFIXASSIGN }, 32 { "--?", "--", "_operator_predecr", OT_PREFIXASSIGN }, 33 { "?*?", "*", "_operator_multiply", OT_INFIX }, 34 { "?/?", "/", "_operator_divide", OT_INFIX }, 35 { "?%?", "%", "_operator_modulus", OT_INFIX }, 36 { "?+?", "+", "_operator_add", OT_INFIX }, 37 { "?-?", "-", "_operator_subtract", OT_INFIX }, 38 { "?<<?", "<<", "_operator_shiftleft", OT_INFIX }, 39 { "?>>?", ">>", "_operator_shiftright", OT_INFIX }, 40 { "?<?", "<", "_operator_less", OT_INFIX }, 41 { "?>?", ">", "_operator_greater", OT_INFIX }, 42 { "?<=?", "<=", "_operator_lessequal", OT_INFIX }, 43 { "?>=?", ">=", "_operator_greaterequal", OT_INFIX }, 44 { "?==?", "==", "_operator_equal", OT_INFIX }, 45 { "?!=?", "!=", "_operator_notequal", OT_INFIX }, 46 { "?&?", "&", "_operator_bitand", OT_INFIX }, 47 { "?^?", "^", "_operator_bitxor", OT_INFIX }, 48 { "?|?", "|", "_operator_bitor", OT_INFIX }, 49 { "?=?", "=", "_operator_assign", OT_INFIXASSIGN }, 50 { "?*=?", "*=", "_operator_multassign", OT_INFIXASSIGN }, 51 { "?/=?", "/=", "_operator_divassign", OT_INFIXASSIGN }, 52 { "?%=?", "%=", "_operator_modassign", OT_INFIXASSIGN }, 53 { "?+=?", "+=", "_operator_addassign", OT_INFIXASSIGN }, 54 { "?-=?", "-=", "_operator_subassign", OT_INFIXASSIGN }, 55 55 { "?<<=?", "<<=", "_operator_shiftleftassign", OT_INFIXASSIGN }, 56 56 { "?>>=?", ">>=", "_operator_shiftrightassign", OT_INFIXASSIGN }, 57 { "?&=?", "&=", "_operator_bitandassign", OT_INFIXASSIGN }, 58 { "?^=?", "^=", "_operator_bitxorassign", OT_INFIXASSIGN }, 59 { "?|=?", "|=", "_operator_bitorassign", OT_INFIXASSIGN }, 60 { "0", "0", "_constant_zero", OT_CONSTANT }, 61 { "1", "1", "_constant_one", OT_CONSTANT } 57 { "?&=?", "&=", "_operator_bitandassign", OT_INFIXASSIGN }, 58 { "?^=?", "^=", "_operator_bitxorassign", OT_INFIXASSIGN }, 59 { "?|=?", "|=", "_operator_bitorassign", OT_INFIXASSIGN }, 60 { "&&", "&&", "&&", OT_LABELADDRESS }, 61 { "0", "0", "_constant_zero", OT_CONSTANT }, 62 { "1", "1", "_constant_one", OT_CONSTANT } 62 63 }; 63 64 -
src/CodeGen/OperatorTable.h
r94b4364 r94e0864d 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon May 18 23:43:07 201513 // Update Count : 212 // Last Modified On : Tue Jun 23 16:09:27 2015 13 // Update Count : 3 14 14 // 15 15 … … 29 29 OT_POSTFIXASSIGN, 30 30 OT_INFIXASSIGN, 31 OT_LABELADDRESS, 31 32 OT_CONSTANT 32 33 };
Note: See TracChangeset
for help on using the changeset viewer.