Index: trunk/ab5.0/abdev/compiler_x86/NumOpe.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/NumOpe.cpp	(revision 676)
+++ trunk/ab5.0/abdev/compiler_x86/NumOpe.cpp	(revision 700)
@@ -353,21 +353,22 @@
 bool _TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, bool &isNeedHeapFreeStructure, bool *pIsClassName, bool isProcedureCallOnly, bool &isVariable, RELATIVE_VAR &relativeVar, bool isWriteAccess )
 {
+	extern void GetWithName(std::string&);
+
 	char parameter[VN_SIZE];
-
 	// Withを解決
-	char termFull[VN_SIZE];
+	std::string termFull;
 	if(term[0]=='.'){
 		GetWithName(termFull);
-		lstrcat(termFull,term);
-	}
-	else lstrcpy(termFull,term);
-
-	char termLeft[VN_SIZE];
-	lstrcpy(termLeft,termFull);
+		termFull.insert(termFull.end(),term,term+strlen(term));
+	}
+	else termFull.assign(term,term+strlen(term));
+
+	std::vector<char> termLeft(termFull.begin(), termFull.end());
+	termLeft.push_back('\0');
 
 	// パース
 	char member[VN_SIZE];
 	ReferenceKind refType;
-	if( SplitMemberName( termFull, termLeft, member, refType ) ){
+	if( SplitMemberName( termFull.c_str(), &termLeft[0], member, refType ) ){
 		///////////////////////////////////////////////////////////////////
 		// オブジェクトとメンバに分解できるとき
@@ -380,8 +381,8 @@
 		bool isClassName = false;
 		Type leftType;
-		if( GetTermType( termLeft, Type(), leftType, isLiteral, &isClassName ) ){
+		if( GetTermType( &termLeft[0], Type(), leftType, isLiteral, &isClassName ) ){
 			if( isClassName == false && compiler.GetObjectModule().meta.GetBlittableTypes().IsExist( leftType ) ){
 				// 左側のオブジェクト部分がBlittable型のとき
-
+/*
 				char temporary[VN_SIZE];
 				lstrcpy( temporary, termLeft );
@@ -389,8 +390,17 @@
 					compiler.GetObjectModule().meta.GetBlittableTypes().Find( leftType ).GetCreateStaticMethodFullName().c_str(),
 					temporary );
-			}
-		}
-
-		if( !TermOpe( termLeft, baseType, leftType, isLiteral, isNeedHeapFreeStructure, &isClassName ) ){
+*/
+				std::vector<char> temporary;
+				const std::string& staticMethodFullName = compiler.GetObjectModule().meta.GetBlittableTypes().Find( leftType ).GetCreateStaticMethodFullName();
+				temporary.reserve(VN_SIZE);
+				temporary.assign(staticMethodFullName.begin(), staticMethodFullName.end());
+				temporary.push_back('(');
+				temporary.insert(temporary.end(), termLeft.begin(), termLeft.end());
+				temporary.push_back(')');
+				temporary.swap(termLeft);
+			}
+		}
+
+		if( !TermOpe( &termLeft[0], baseType, leftType, isLiteral, isNeedHeapFreeStructure, &isClassName ) ){
 			goto globalArea;
 		}
@@ -410,5 +420,5 @@
 		}
 
-		return TermMemberOpe( leftType, isNeedHeapFreeStructure, baseType, resultType, termFull, termLeft, member, isVariable, relativeVar );
+		return TermMemberOpe( leftType, isNeedHeapFreeStructure, baseType, resultType, termFull.c_str(), &termLeft[0], member, isVariable, relativeVar );
 	}
 globalArea:
@@ -420,5 +430,5 @@
 
 	if( pIsClassName ){
-		if( compiler.GetObjectModule().meta.FindClassSupportedTypeDef( LexicalAnalyzer::FullNameToSymbol( termFull ) ) ){
+		if( compiler.GetObjectModule().meta.FindClassSupportedTypeDef( LexicalAnalyzer::FullNameToSymbol( termFull.c_str() ) ) ){
 			*pIsClassName = true;
 			return true;
@@ -434,5 +444,5 @@
 
 
-	if(lstrcmpi(termFull,"This")==0 && isProcedureCallOnly == false ){
+	if(lstrcmpi(termFull.c_str(),"This")==0 && isProcedureCallOnly == false ){
 		if( !compiler.IsCompilingClass() )
 		{
@@ -458,7 +468,7 @@
 	char temporary[8192];
 
-	int i2=GetCallProcName(termFull,procName);
+	int i2=GetCallProcName(termFull.c_str(),procName);
 	if(termFull[i2]=='('){
-		int i4=GetStringInPare_RemovePare(parameter,termFull+i2+1);
+		int i4=GetStringInPare_RemovePare(parameter,termFull.c_str()+i2+1);
 
 		void *pInfo;
@@ -557,5 +567,5 @@
 
 	char VarName[VN_SIZE],ArrayElements[VN_SIZE];
-	GetArrayElement(termFull,VarName,ArrayElements);
+	GetArrayElement(termFull.c_str(),VarName,ArrayElements);
 	if(ArrayElements[0]){
 		Type classType;
@@ -579,5 +589,5 @@
 		false,	//エラー表示なし
 		isWriteAccess,
-		termFull,
+		termFull.c_str(),
 		&relativeVar,resultType)){
 		//////////
@@ -599,10 +609,10 @@
 
 	//配列要素を排除
-	GetArrayElement(termFull,VarName,ArrayElements);
+	GetArrayElement(termFull.c_str(),VarName,ArrayElements);
 
 	if(GetSubHash(VarName,0)){
 
 		{
-			CallPropertyMethod(termFull,NULL,resultType);
+			CallPropertyMethod(termFull.c_str(),NULL,resultType);
 
 			//大きな型への暗黙の変換
@@ -636,5 +646,5 @@
 	if( isProcedureCallOnly )
 	{
-		compiler.errorMessenger.Output(3, termFull, cp );
+		compiler.errorMessenger.Output(3, termFull.c_str(), cp );
 	}
 
