Index: BasicCompiler32/Opcode.h
===================================================================
--- BasicCompiler32/Opcode.h	(revision 73)
+++ BasicCompiler32/Opcode.h	(revision 75)
@@ -102,5 +102,8 @@
 //NumOpe.cpp
 void PushReturnValue(int type);
-int NumOpe(const char *Command,int BaseType,LONG_PTR lpBaseIndex,LONG_PTR *plpIndex,BOOL *pbUseHeap=0);
+bool NumOpe( const char *Command,
+		   const Type &baseType,
+		   Type &resultType,
+		   BOOL *pbUseHeap = NULL );
 
 //NumOpe_Arithmetic.cpp
@@ -136,5 +139,5 @@
 //Compile_Set_Var.cpp
 BOOL IsUse_ecx(RELATIVE_VAR *pRelativeVar);
-void SetStructVariable(LONG_PTR lpVarIndex,int CalcType,LONG_PTR lpCalcIndex,BOOL bUseHeap);
+void SetStructVariable( const Type &varType, const Type &calcType, BOOL bUseHeap);
 void SetRealVariable(int VarType, int CalcType, RELATIVE_VAR *pRelativeVar);
 void SetWholeVariable( int varSize,int calcType, RELATIVE_VAR *pRelative );
@@ -174,6 +177,5 @@
 
 //Compile_Object.cpp
-void Operator_New( CClass &classObj, const char *objectSizeStr, const char *parameter, const TYPEINFO &baseTypeInfo );
-int Operator_New(const char *Parameter,LONG_PTR *plpIndex,const TYPEINFO &baseTypeInfo );
+void Operator_New( const CClass &classObj, const char *objectSizeStr, const char *parameter, const Type &baseType );
 void OpcodeDelete(const char *Parameter, bool isSweeping);
 
@@ -182,12 +184,11 @@
 void GetWithName(char *buffer);
 void SetThisPtrToReg(int reg);
-BOOL GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,int *pType,RELATIVE_VAR *pRelativeVar,LONG_PTR *plpIndex,int *pss=0);
-BOOL SetInitGlobalData(int offset,int type,LONG_PTR lpIndex,int *SubScripts,char *InitBuf);
+bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss = 0);
+bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,char *InitBuf);
 #define DIMFLAG_INITDEBUGVAR			1
 #define DIMFLAG_NONCALL_CONSTRACTOR		2
 #define DIMFLAG_STATIC					4
 #define DIMFLAG_CONST					8
-void dim(bool isRef, char *VarName,int *SubScripts,TYPEINFO &TypeInfo,int TypeSize,char *InitBuf,char *ConstractParameter,DWORD dwFlags);
-void OpcodeDim(char *Parameter,DWORD dwFlag);
+void dim(bool isRef, char *VarName,int *SubScripts,Type &type,char *InitBuf,char *ConstractParameter,DWORD dwFlags);
 void SetVarPtrToEax(RELATIVE_VAR *pRelativeVar);
 
@@ -201,8 +202,8 @@
 class ParamImpl{
 	char *Parms[255];
-	TYPEINFO types[255];
+	Type types[255];
 	int ParmsNum;
 
-	TYPEINFO ReturnTypeInfo;
+	Type ReturnTypeInfo;
 
 	//一時オブジェクト管理用
@@ -213,26 +214,21 @@
 public:
 	ParamImpl(const char *buffer);
-	ParamImpl(const PARAMETER_INFO *pParamInfo, const int ParmNum);
-	ParamImpl::ParamImpl(const Parameters &params);
+	ParamImpl(const Parameters &params);
 	~ParamImpl();
-	void SetReturnType(TYPEINFO *pTypeInfo);
+	void SetReturnType( const Type &returnType );
 
 private:
-	BOOL _overload_check( Parameters &params,TYPEINFO *pReturnTypeInfo,int overload_level);
-	SubInfo *OverloadSolutionWithReturnType( const char *name, std::vector<SubInfo *> &subs );
+	BOOL _overload_check( const Parameters &params,Type *pReturnTypeInfo,int overload_level);
+	UserProc *OverloadSolutionWithReturnType( const char *name, std::vector<UserProc *> &subs );
 public:
-	SubInfo *OverloadSolution( const char *name, std::vector<SubInfo *> &subs );
-
-	BOOL ErrorCheck(const char *FuncName,PARAMETER_INFO *ppi,int pi_num,int SecondParmNum);
-	bool ErrorCheck( const char *procName, const Parameters &params, int SecondParmNum );
-	void MacroParameterSupport(PARAMETER_INFO *ppi);
+	UserProc *OverloadSolution( const char *name, std::vector<UserProc *> &subs );
+
+	bool ErrorCheck( const string &procName, const Parameters &params, int SecondParmNum = -1 );
 	void MacroParameterSupport( const Parameters &params );
 	void SetStructParameter(CClass *pobj_Class,LPSTR Parameter);
-	int SetParameter(const char *FuncName,PARAMETER_INFO *ppi,int pi_num,int SecondParmNum);
-	int SetParameter( const char *procName, const Parameters &params, int SecondParmNum );
+	int SetParameter( const string &procName, const Parameters &params, int SecondParmNum = -1 );
 
 	//一時オブジェクトパラメータの生成と破棄
-	int NewTempParameters( const char *FuncName,PARAMETER_INFO *ppi,int pi_num,int SecondParmNum );
-	int NewTempParameters( const char *procName, const Parameters &params, int SecondParmNum );
+	int NewTempParameters( const string &procName, const Parameters &params, int SecondParmNum = -1 );
 	void DeleteTempParameters();
 };
@@ -241,7 +237,7 @@
 void AddLocalVarAddrSchedule();
 #define PROCFLAG_NEW	1
-int Opcode_CallProcPtr(char *variable,char *Parameter,PROCPTRINFO *pi,LONG_PTR *plpIndex);
-void Opcode_CallProc(const char *Parameter,SubInfo *psi,DWORD dwFlags,char *ObjectName,int RefType);
-int Opcode_CallDllProc(char *Parameter,DECLAREINFO *pdi,LONG_PTR *plpIndex);
+int Opcode_CallProcPtr(char *variable,char *Parameter,ProcPointer *pProcPointer,LONG_PTR *plpIndex);
+void Opcode_CallProc(const char *Parameter,UserProc *pUserProc,DWORD dwFlags,char *ObjectName,int RefType);
+int Opcode_CallDllProc(char *Parameter,DllProc *pDllProc,LONG_PTR *plpIndex);
 
 //Compile_ProcOp.cpp
@@ -251,11 +247,11 @@
 int GetFunctionType(int FuncNum);
 int GetFunctionFromName(char *FuncName);
-void Opcode_CallFunc( const char *Parameter, const int FuncNum, TYPEINFO &ReturnTypeInfo );
+void Opcode_CallFunc( const char *Parameter, const int FuncNum, Type &ReturnTypeInfo );
 
 //OperatorProc.cpp
 void FreeTempObject(int reg,CClass *pobj_c);
-int CallOperatorProc(int idCalc,TYPEINFO *pBaseTypeInfo,int *type,LONG_PTR *index_stack,BOOL *bUseHeap,int &sp);
-void CallCastOperatorProc(int &CalcType,LONG_PTR &lpCalcIndex,BOOL bCalcUseHeap,int ToType,LONG_PTR lpToIndex);
-void CallIndexerGetterProc(CClass *pobj_Class,char *ObjectName,char *Parameter,TYPEINFO &RetTypeInfo);
+int CallOperatorProc(int idCalc,Type *pBaseTypeInfo,int *type,LONG_PTR *index_stack,BOOL *bUseHeap,int &sp);
+void CallCastOperatorProc(Type &calcType,BOOL bCalcUseHeap,const Type &toType);
+void CallIndexerGetterProc(CClass *pobj_Class,char *ObjectName,char *Parameter,Type &RetTypeInfo);
 
 //Compile_Statement.cpp
@@ -268,5 +264,5 @@
 void OpcodeContinue(void);
 void OpcodeExitSub(void);
-void OpcodeSelect(char *Parameter);
+void OpcodeSelect(const char *Parameter);
 void OpcodeCase(char *Parameter);
 void OpcodeGosub(char *Parameter);
@@ -344,3 +340,3 @@
 void fpu_cast_end();
 
-void op_call(SubInfo *psi);
+void op_call(UserProc *pUserProc);
