sourcepawn/jit/BaseRuntime.cpp
changeset 2545 9cb1a1fefc2c
parent 2378 d812052c5821
child 3601 d3a2fb7b3a1e
     1.1 --- a/sourcepawn/jit/BaseRuntime.cpp	Sat Jan 31 22:51:48 2009 -0500
     1.2 +++ b/sourcepawn/jit/BaseRuntime.cpp	Sun Feb 01 02:03:03 2009 -0500
     1.3 @@ -535,3 +535,21 @@
     1.4  
     1.5  	return m_NumFuncs;
     1.6  }
     1.7 +
     1.8 +int BaseRuntime::CreateBlank(uint32_t heastk)
     1.9 +{
    1.10 +	memset(m_pPlugin, 0, sizeof(sp_plugin_t));
    1.11 +
    1.12 +	/* Align to cell_t bytes */
    1.13 +	heastk += sizeof(cell_t);
    1.14 +	heastk -= heastk % sizeof(cell_t);
    1.15 +
    1.16 +	m_pPlugin->mem_size = heastk;
    1.17 +	m_pPlugin->memory = new uint8_t[heastk];
    1.18 +
    1.19 +	m_pPlugin->profiler = g_engine2.GetProfiler();
    1.20 +	m_pCtx = new BaseContext(this);
    1.21 +	m_pCo = g_Jit.StartCompilation(this);
    1.22 +
    1.23 +	return SP_ERROR_NONE;
    1.24 +}