Index: trunk/abdev/BasicCompiler32/Compile_Object.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_Object.cpp	(revision 318)
+++ trunk/abdev/BasicCompiler32/Compile_Object.cpp	(revision 319)
@@ -205,4 +205,25 @@
 
 
+	//仮想関数テーブルを初期化
+	if( classObj.IsExistVirtualFunctions()
+		&& !classObj.IsAbstract() )
+	{
+		// mov ecx,vtblAddress
+		compiler.codeGenerator.op_mov_RV_vtbl( REG_ECX, &classObj );
+
+		//mov dword ptr[eax],ecx
+		compiler.codeGenerator.op_mov_MR( sizeof(long), REG_ECX, REG_EAX, 0, MOD_BASE );
+
+		// 仮想関数になるメソッドに使用チェックをつける
+		BOOST_FOREACH( const CMethod *pMethod, classObj.GetMethods() )
+		{
+			if( pMethod->IsVirtual() )
+			{
+				pMethod->GetUserProc().Using();
+			}
+		}
+	}
+
+
 	// ※ここでプッシュされた値はNew演算子の戻り値となる
 	//push eax
Index: trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp	(revision 318)
+++ trunk/abdev/BasicCompiler32/Compile_ProcOp.cpp	(revision 319)
@@ -536,28 +536,4 @@
 				}
 			}
-
-			//仮想関数テーブルを初期化
-			if( compiler.pCompilingClass->IsExistVirtualFunctions()
-				&& !compiler.pCompilingClass->IsAbstract() )
-			{
-				// mov eax,vtblAddress
-				compiler.codeGenerator.op_mov_RV_vtbl( REG_EAX, compiler.pCompilingClass );
-
-				//Thisポインタをecxにコピー
-				SetThisPtrToReg(REG_ECX);
-
-				//mov dword ptr[ecx],eax
-				compiler.codeGenerator.op_mov_MR( sizeof(long), REG_EAX, REG_ECX, 0, MOD_BASE );
-
-
-				// 仮想関数になるメソッドに使用チェックをつける
-				BOOST_FOREACH( const CMethod *pMethod, compiler.pCompilingClass->GetMethods() )
-				{
-					if( pMethod->IsVirtual() )
-					{
-						pMethod->GetUserProc().Using();
-					}
-				}
-			}
 		}
 		else if( pUserProc->IsDestructor() ){
Index: trunk/abdev/BasicCompiler32/NumOpe.cpp
===================================================================
--- trunk/abdev/BasicCompiler32/NumOpe.cpp	(revision 318)
+++ trunk/abdev/BasicCompiler32/NumOpe.cpp	(revision 319)
@@ -73,6 +73,5 @@
 
 	char *parameter = (char *)malloc( lstrlen( str ) + 32 );
-	sprintf( parameter, "\"%s\"%c%c*Char", str, 1, ESC_AS );
-	SetStringQuotes( parameter );
+	sprintf( parameter, "%s%c%c*Char", str, 1, ESC_AS );
 
 	Operator_New( *compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr(), "", parameter, Type( DEF_OBJECT, *compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr() ) );
@@ -763,14 +762,11 @@
 				}
 
-				if(term[0]=='\"'){
-					//リテラル文字列
-					if(!RemoveStringQuotes(term)){
-						SetError(43,NULL,cp);
-						goto error;
-					}
-					i3=lstrlen(term);
-StrLiteral:
-
-					if( baseType.IsObject() || baseType.IsNull() ){
+				if( (term[0]=='e'||term[0]=='E')
+					&& (term[1]=='x'||term[1]=='X')
+					&& term[2]=='\"'
+					|| term[0] == '\"' )
+				{
+					if( baseType.IsObject() || baseType.IsNull() )
+					{
 						//要求タイプがオブジェクト、または未定のとき
 
@@ -786,5 +782,30 @@
 					}
 
-
+					bool isEx = true;
+					if( term[0] == '\"' )
+					{
+						isEx = false;
+					}
+
+					if( isEx )
+					{
+						// 拡張版リテラル文字列（エスケープシーケンス可能）
+						if(!RemoveStringQuotes(term+2)){
+							SetError(43,NULL,cp);
+							goto error;
+						}
+						i3=FormatString_EscapeSequence(term+2);
+						term+=2;
+					}
+					else
+					{
+						// 通常文字列
+						if(!RemoveStringQuotes(term)){
+							SetError(43,NULL,cp);
+							goto error;
+						}
+						i3=lstrlen(term);
+					}
+StrLiteral:
 					type_stack[sp]=typeOfPtrChar;
 					bLiteralCalculation=0;
@@ -794,17 +815,4 @@
 					//push DataSize
 					compiler.codeGenerator.op_push_V( i2, Schedule::DataTable );
-				}
-				else if((term[0]=='e'||term[0]=='E')&&
-					(term[1]=='x'||term[1]=='X')&&
-					term[2]=='\"'){
-					//拡張版リテラル文字列（エスケープシーケンス可能）
-					if(!RemoveStringQuotes(term+2)){
-						SetError(43,NULL,cp);
-						goto error;
-					}
-					i3=FormatString_EscapeSequence(term+2);
-					term+=2;
-
-					goto StrLiteral;
 				}
 				else if(IsVariableTopChar(term[0])||
@@ -896,4 +904,19 @@
 							//リテラル文字列
 
+							if( baseType.IsObject() || baseType.IsNull() )
+							{
+								//要求タイプがオブジェクト、または未定のとき
+
+								//String型オブジェクトを生成
+								NewStringObject(term);
+
+								type_stack[sp]=DEF_OBJECT;
+								index_stack[sp]=(LONG_PTR)compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr();
+								bLiteralCalculation=0;
+
+								sp++;
+								break;
+							}
+
 							double dbl = compiler.GetObjectModule().meta.GetGlobalConsts().GetDoubleData(term);
 							memcpy(&i64data,&dbl,sizeof(double));
Index: trunk/abdev/BasicCompiler64/Compile_Object.cpp
===================================================================
--- trunk/abdev/BasicCompiler64/Compile_Object.cpp	(revision 318)
+++ trunk/abdev/BasicCompiler64/Compile_Object.cpp	(revision 319)
@@ -200,4 +200,26 @@
 
 
+	//仮想関数テーブルを初期化
+	if( classObj.IsExistVirtualFunctions()
+		&& !classObj.IsAbstract() )
+	{
+		// mov rcx,vtblAddress
+		compiler.codeGenerator.op_mov_RV_vtbl( REG_RCX, &classObj );
+
+		//mov qword ptr[rax],rcx
+		compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RCX,REG_RAX,0,MOD_BASE);
+
+
+		// 仮想関数になるメソッドに使用チェックをつける
+		BOOST_FOREACH( const CMethod *pMethod, classObj.GetMethods() )
+		{
+			if( pMethod->IsVirtual() )
+			{
+				pMethod->GetUserProc().Using();
+			}
+		}
+	}
+
+
 	/////////////////////////////////////////////////////////////////////
 
Index: trunk/abdev/BasicCompiler64/Compile_ProcOp.cpp
===================================================================
--- trunk/abdev/BasicCompiler64/Compile_ProcOp.cpp	(revision 318)
+++ trunk/abdev/BasicCompiler64/Compile_ProcOp.cpp	(revision 319)
@@ -507,28 +507,4 @@
 				}
 			}
-
-			//仮想関数テーブルを初期化
-			if( compiler.pCompilingClass->IsExistVirtualFunctions()
-				&& !compiler.pCompilingClass->IsAbstract() )
-			{
-				// mov rax,vtblAddress
-				compiler.codeGenerator.op_mov_RV_vtbl( REG_RAX, compiler.pCompilingClass );
-
-				//Thisポインタをrcxにコピー
-				SetThisPtrToReg(REG_RCX);
-
-				//mov qword ptr[rcx],rax
-				compiler.codeGenerator.op_mov_MR(sizeof(_int64),REG_RAX,REG_RCX,0,MOD_BASE);
-
-
-				// 仮想関数になるメソッドに使用チェックをつける
-				BOOST_FOREACH( const CMethod *pMethod, compiler.pCompilingClass->GetMethods() )
-				{
-					if( pMethod->IsVirtual() )
-					{
-						pMethod->GetUserProc().Using();
-					}
-				}
-			}
 		}
 		else if( pUserProc->IsDestructor() ){
Index: trunk/abdev/BasicCompiler64/NumOpe.cpp
===================================================================
--- trunk/abdev/BasicCompiler64/NumOpe.cpp	(revision 318)
+++ trunk/abdev/BasicCompiler64/NumOpe.cpp	(revision 319)
@@ -22,6 +22,5 @@
 
 		char *parameter = (char *)malloc( lstrlen( str ) + 32 );
-		sprintf( parameter, "\"%s\"%c%c*Char", str, 1, ESC_AS );
-		SetStringQuotes( parameter );
+		sprintf( parameter, "%s%c%c*Char", str, 1, ESC_AS );
 
 		Operator_New( *compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr(), "", parameter, Type( DEF_OBJECT, *compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr() ) );
@@ -429,7 +428,9 @@
 	GetArrayElement(termFull,VarName,ArrayElements);
 	if(ArrayElements[0]){
-		GetVarType(VarName,resultType,false);
-		if( resultType.IsObject() ){
-			CallIndexerGetterProc(UseReg,resultType,VarName,ArrayElements,resultType);
+		Type classType;
+		GetVarType(VarName,classType,false);
+		if( classType.IsObject() )
+		{
+			CallIndexerGetterProc(UseReg,classType,VarName,ArrayElements,resultType);
 
 			isLiteral = false;
@@ -788,14 +789,11 @@
 				}
 
-				if(term[0]=='\"'){
-					//リテラル文字列
-					if(!RemoveStringQuotes(term)){
-						SetError(43,NULL,cp);
-						goto error;
-					}
-					i3=lstrlen(term);
-StrLiteral:
-
-					if( baseType.IsObject() || baseType.IsNull() ){
+				if( (term[0]=='e'||term[0]=='E')
+					&& (term[1]=='x'||term[1]=='X')
+					&& term[2]=='\"'
+					|| term[0] == '\"' )
+				{
+					if( baseType.IsObject() || baseType.IsNull() )
+					{
 						//要求タイプがオブジェクト、または未定のとき
 
@@ -814,4 +812,31 @@
 					}
 
+					bool isEx = true;
+					if( term[0] == '\"' )
+					{
+						isEx = false;
+					}
+
+					if( isEx )
+					{
+						// 拡張版リテラル文字列（エスケープシーケンス可能）
+						if(!RemoveStringQuotes(term+2)){
+							SetError(43,NULL,cp);
+							goto error;
+						}
+						i3=FormatString_EscapeSequence(term+2);
+						term+=2;
+					}
+					else
+					{
+						// 通常文字列
+						if(!RemoveStringQuotes(term)){
+							SetError(43,NULL,cp);
+							goto error;
+						}
+						i3=lstrlen(term);
+					}
+StrLiteral:
+
 					type_stack[sp]=typeOfPtrChar;
 					bLiteralCalculation=0;
@@ -827,20 +852,8 @@
 					}
 				}
-				else if((term[0]=='e'||term[0]=='E')&&
-					(term[1]=='x'||term[1]=='X')&&
-					term[2]=='\"'){
-					//拡張版リテラル文字列（エスケープシーケンス可能）
-					if(!RemoveStringQuotes(term+2)){
-						SetError(43,NULL,cp);
-						goto error;
-					}
-					i3=FormatString_EscapeSequence(term+2);
-					term+=2;
-
-					goto StrLiteral;
-				}
 				else if(IsVariableTopChar(term[0])||
 					term[0]=='*'||
-					(term[0]=='.'&&IsVariableTopChar(term[1]))){
+					(term[0]=='.'&&IsVariableTopChar(term[1])))
+				{
 					//////////////////
 					// 何らかの識別子
@@ -938,4 +951,22 @@
 							//リテラル文字列
 
+							if( baseType.IsObject() || baseType.IsNull() )
+							{
+								//要求タイプがオブジェクト、または未定のとき
+
+								//String型オブジェクトを生成
+								NewStringObject(UseReg,term);
+
+								type_stack[sp]=DEF_OBJECT;
+								index_stack[sp]=(LONG_PTR)compiler.GetObjectModule().meta.GetClasses().GetStringClassPtr();
+								bLiteralCalculation=0;
+
+								if(bXmm) pobj_reg->LockXmmReg();
+								else pobj_reg->LockReg();
+
+								sp++;
+								break;
+							}
+
 							double dbl = compiler.GetObjectModule().meta.GetGlobalConsts().GetDoubleData(term);
 							memcpy(&i64data,&dbl,sizeof(double));
@@ -961,13 +992,4 @@
 							goto Literal;
 						}
-						/*else if(i3==DEF_STRING){
-							//リテラル文字列
-
-							//バイト数
-							i3=(int)dbl;
-
-							memcpy(term,temporary,i3);
-							goto StrLiteral;
-						}*/
 						else{
 							SetError(1,NULL,0);
Index: trunk/abdev/BasicCompiler_Common/ParamImpl.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/ParamImpl.cpp	(revision 318)
+++ trunk/abdev/BasicCompiler_Common/ParamImpl.cpp	(revision 319)
@@ -42,4 +42,9 @@
 				for(i++,i2++;;i++,i2++){
 					temporary[i2]=buffer[i];
+					if( buffer[i] == '\0' )
+					{
+						SetError();
+						break;
+					}
 					if(buffer[i]=='\"') break;
 				}
Index: trunk/abdev/BasicCompiler_Common/Subroutine.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 318)
+++ trunk/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 319)
@@ -494,4 +494,8 @@
 	pSub_System_Call_Destructor_of_GlobalObject->CompleteCompile();
 
+	// _System_CGarbageCollection.RegisterGlobalRootsは一番最後にコンパイル
+	extern const UserProc *pUserProc_System_CGarbageCollection_RegisterGlobalRoots;
+	pUserProc_System_CGarbageCollection_RegisterGlobalRoots->CompleteCompile();
+
 repeat:
 	compiler.GetObjectModule().meta.GetUserProcs().Iterator_Reset();
@@ -531,4 +535,8 @@
 		pSub_System_Call_Destructor_of_GlobalObject->KillCompileStatus();
 		CompileBufferInProcedure( *pSub_System_Call_Destructor_of_GlobalObject );
-	}
-}
+
+		// _System_CGarbageCollection.RegisterGlobalRootsは一番最後にコンパイル
+		pUserProc_System_CGarbageCollection_RegisterGlobalRoots->KillCompileStatus();
+		CompileBufferInProcedure( *pUserProc_System_CGarbageCollection_RegisterGlobalRoots );
+	}
+}
