view LightClone/Source/Compiler.h @ 72:9a9be3d8632e

Remove reference to World.h
author koryspansel
date Tue, 11 Oct 2011 13:49:40 -0700
parents 95677f648a2c
children
line wrap: on
line source

/*
 * Compiler
 */

#ifndef __COMPILER_H__
#define __COMPILER_H__

#include "Core.h"

/*
 * Program
 */
class Program;

/*
 * Compiler
 */
class Compiler
{
	/*
	 * nFunctionTable
	 */
	uint32 nFunctionTable[MaximumFunctionCount];

	/*
	 * nCallTable
	 */
	uint32 nCallTable[MaximumFunctionCount * MaximumInstructionCount];

public:

	/*
	 * Compiler
	 */
	Compiler();

	/*
	 * Compile
	 */
	ErrorCode Compile(const Program& kProgram, uint8* pData, uint32 nSize);

private:

	/*
	 * GetInstructionSizeFromAction
	 */
	uint32 GetInstructionSizeFromAction(uint32 nAction) const;
};

#endif //__COMPILER_H__