don't fix what isn't broken I guess :\ (Fixed reserved slots once and for all...)
3 * ===============================================================
4 * SourceMod BinTools Extension
5 * Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
6 * ===============================================================
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #include "CallMaker.h"
25 #include "CallWrapper.h"
28 ICallWrapper *CallMaker::CreateCall(void *address,
30 const PassInfo *retInfo,
31 const PassInfo paramInfo[],
32 unsigned int numParams)
34 CallWrapper *pWrapper = new CallWrapper(cv, paramInfo, retInfo, numParams);
35 pWrapper->m_Addrs[ADDR_CALLEE] = address;
37 JIT_Compile(pWrapper, FuncAddr_Direct);
42 ICallWrapper *CallMaker::CreateVCall(unsigned int vtblIdx,
43 unsigned int vtblOffs,
44 unsigned int thisOffs,
45 const PassInfo *retInfo,
46 const PassInfo paramInfo[],
47 unsigned int numParams)
49 CallWrapper *pWrapper = new CallWrapper(CallConv_ThisCall, paramInfo, retInfo, numParams);
50 pWrapper->m_VtInfo.thisOffs = thisOffs;
51 pWrapper->m_VtInfo.vtblIdx = vtblIdx;
52 pWrapper->m_VtInfo.vtblOffs = vtblOffs;
54 JIT_Compile(pWrapper, FuncAddr_VTable);