2015-02-24 00:47:47 +01:00
|
|
|
// vim: set sts=2 ts=8 sw=2 tw=99 et:
|
|
|
|
//
|
|
|
|
// Copyright (C) 2006-2015 AlliedModders LLC
|
|
|
|
//
|
|
|
|
// This file is part of SourcePawn. SourcePawn is free software: you can
|
|
|
|
// redistribute it and/or modify it under the terms of the GNU General Public
|
|
|
|
// License as published by the Free Software Foundation, either version 3 of
|
|
|
|
// the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License along with
|
|
|
|
// SourcePawn. If not, see http://www.gnu.org/licenses/.
|
|
|
|
//
|
2015-02-24 01:04:57 +01:00
|
|
|
#include "compiled-function.h"
|
2015-02-24 07:36:10 +01:00
|
|
|
#include "x86/jit_x86.h"
|
2015-02-24 08:12:45 +01:00
|
|
|
#include "environment.h"
|
|
|
|
|
|
|
|
using namespace sp;
|
2008-08-15 07:22:26 +02:00
|
|
|
|
2015-02-24 01:27:57 +01:00
|
|
|
CompiledFunction::CompiledFunction(void *entry_addr, cell_t pcode_offs, FixedArray<LoopEdge> *edges)
|
2015-02-24 00:47:47 +01:00
|
|
|
: entry_(entry_addr),
|
|
|
|
code_offset_(pcode_offs),
|
|
|
|
edges_(edges)
|
2008-08-15 07:22:26 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-02-24 01:27:57 +01:00
|
|
|
CompiledFunction::~CompiledFunction()
|
2008-08-15 07:22:26 +02:00
|
|
|
{
|
2015-02-24 08:12:45 +01:00
|
|
|
Environment::get()->FreeCode(entry_);
|
2008-08-15 07:22:26 +02:00
|
|
|
}
|