Changeset 64 in dev for BasicCompiler64/Compile_Statement.cpp
- Timestamp:
- Mar 8, 2007, 2:49:34 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler64/Compile_Statement.cpp
r56 r64 99 99 ///////////////////// 100 100 101 if(i2==DEF_ OBJECT){101 if(i2==DEF_STRUCT){ 102 102 //mov r14,rax 103 103 op_mov_RR(REG_R14,REG_RAX); … … 888 888 //add rax,offset(Gosubステートメントの最終ポイント) 889 889 int schedule=obp,schedule2; 890 op_add 64_value(REG_RAX,0);890 op_add_RV(REG_RAX,0); 891 891 schedule2=obp-sizeof(long); 892 892 … … 951 951 else temp=pCompilingSubInfo->name; 952 952 953 /* 954 TODO: 消す 953 955 if( pCompilingSubInfo->isReturnRef ){ 954 956 //参照型 … … 956 958 } 957 959 else{ 958 //値型 960 //値型*/ 959 961 char temporary[VN_SIZE]; 960 962 sprintf(temporary,"%s=%s",temp,Parameter); 961 963 OpcodeCalc(temporary); 962 }964 //} 963 965 } 964 966 … … 968 970 } 969 971 970 void Opcode_Input(c har *Parameter){972 void Opcode_Input(const char *Parameter){ 971 973 extern int cp; 972 974 int i2,i3,i4,i5,type; 973 975 BOOL bFile; 974 976 char temporary[VN_SIZE],temp2[VN_SIZE],buffer[VN_SIZE]; 975 976 KillStringSpaces(Parameter);977 977 978 978 if(Parameter[0]=='#'){ … … 1084 1084 Opcode_CallProc(buffer,psi,0,"",0); 1085 1085 } 1086 void Opcode_PrintUsing(c har *Parameter,char *buffer,BOOL bFile){1086 void Opcode_PrintUsing(const char *Parameter,char *buffer,BOOL bFile){ 1087 1087 extern int cp; 1088 1088 int i2,i3,i4,i5; … … 1090 1090 BOOL bReturnLine; 1091 1091 1092 i2=lstrlen(Parameter); 1093 if(Parameter[i2-1]==';'){ 1092 char parms[8192]; 1093 lstrcpy( parms, Parameter ); 1094 1095 i2=lstrlen(parms); 1096 if(parms[i2-1]==';'){ 1094 1097 bReturnLine=0; 1095 Parameter[i2-1]=0;1098 parms[i2-1]=0; 1096 1099 } 1097 1100 else bReturnLine=1; … … 1099 1102 i3=lstrlen(buffer); 1100 1103 for(i2=0;;i2++,i3++){ 1101 if( Parameter[i2]==';'){1104 if(parms[i2]==';'){ 1102 1105 buffer[i3]=0; 1103 1106 break; 1104 1107 } 1105 buffer[i3]= Parameter[i2];1106 if( Parameter[i2]=='\0') break;1107 } 1108 if( Parameter[i2]==';') i2++;1108 buffer[i3]=parms[i2]; 1109 if(parms[i2]=='\0') break; 1110 } 1111 if(parms[i2]==';') i2++; 1109 1112 1110 1113 if(bReturnLine) lstrcat(buffer,"+Ex\"\\r\\n\""); … … 1114 1117 while(1){ 1115 1118 for(i3=0;;i2++,i3++){ 1116 if( Parameter[i2]=='\"'){1117 temporary[i3]= Parameter[i2];1119 if(parms[i2]=='\"'){ 1120 temporary[i3]=parms[i2]; 1118 1121 for(i2++,i3++;;i2++,i3++){ 1119 temporary[i3]= Parameter[i2];1120 if( Parameter[i2]=='\"') break;1122 temporary[i3]=parms[i2]; 1123 if(parms[i2]=='\"') break; 1121 1124 } 1122 1125 continue; 1123 1126 } 1124 if( Parameter[i2]=='('){1125 i5=GetStringInPare(temporary+i3, Parameter+i2);1127 if(parms[i2]=='('){ 1128 i5=GetStringInPare(temporary+i3,parms+i2); 1126 1129 i2+=i5-1; 1127 1130 i3+=i5-1; 1128 1131 continue; 1129 1132 } 1130 if( Parameter[i2]=='['){1131 i5=GetStringInBracket(temporary+i3, Parameter+i2);1133 if(parms[i2]=='['){ 1134 i5=GetStringInBracket(temporary+i3,parms+i2); 1132 1135 i2+=i5-1; 1133 1136 i3+=i5-1; 1134 1137 continue; 1135 1138 } 1136 if( Parameter[i2]==','){1139 if(parms[i2]==','){ 1137 1140 temporary[i3]=0; 1138 1141 i2++; 1139 1142 break; 1140 1143 } 1141 temporary[i3]= Parameter[i2];1142 if( Parameter[i2]=='\0') break;1144 temporary[i3]=parms[i2]; 1145 if(parms[i2]=='\0') break; 1143 1146 } 1144 1147 if(temporary[0]=='\0'){ … … 1169 1172 1170 1173 i4++; 1171 if( Parameter[i2]=='\0') break;1174 if(parms[i2]=='\0') break; 1172 1175 } 1173 1176 sprintf(temp2,"_System_UsingDataType[%d]=-1",i4); … … 1183 1186 Opcode_CallProc(buffer,psi,0,"",0); 1184 1187 } 1185 void Opcode_Print(c har *Parameter,BOOL bWrite){1188 void Opcode_Print(const char *Parameter,BOOL bWrite){ 1186 1189 int i2,i3,i4,sw; 1187 1190 char temporary[VN_SIZE],buffer[VN_SIZE]; 1188 1191 BOOL bFile; 1189 1190 KillStringSpaces(Parameter);1191 1192 1192 1193 if(Parameter[0]=='#'){
Note:
See TracChangeset
for help on using the changeset viewer.