move abort.h to include, add namespacing

This commit is contained in:
Joshua Warner 2013-02-19 22:42:07 -07:00
parent 987af120d8
commit 263c0dee4f
9 changed files with 29 additions and 10 deletions

View File

@ -11,6 +11,9 @@
#ifndef AVIAN_UTIL_ABORT_H
#define AVIAN_UTIL_ABORT_H
namespace avian {
namespace util {
class Aborter {
public:
virtual void NO_RETURN abort() = 0;
@ -37,5 +40,8 @@ inline void assert(T t, bool v) {
expect(t, v);
}
#endif
} // namespace util
} // namespace avian
#endif // AVIAN_UTIL_ABORT_H
#endif // AVIAN_UTIL_ABORT_H

View File

@ -12,7 +12,7 @@
#include <avian/vm/codegen/registers.h>
#include "alloc-vector.h"
#include "util/abort.h"
#include <avian/util/abort.h>
#include "util/runtime-array.h"
@ -23,6 +23,7 @@
using namespace vm;
using namespace avian::codegen;
using namespace avian::util;
namespace local {

View File

@ -14,7 +14,9 @@
#include <avian/vm/codegen/assembler.h>
#include <avian/vm/codegen/compiler.h>
#include "codegen/compiler/regalloc.h"
#include "regalloc.h"
using namespace avian::util;
namespace avian {
namespace codegen {

View File

@ -16,12 +16,17 @@
#include <avian/vm/codegen/lir.h>
#include <avian/vm/codegen/registers.h>
class Aborter;
namespace avian {
namespace util {
class Aborter;
} // namespace util
namespace codegen {
namespace compiler {
using namespace avian::util;
class Context;
class Value;
class SiteMask;

View File

@ -12,7 +12,7 @@
#include <avian/vm/codegen/registers.h>
#include "alloc-vector.h"
#include "util/abort.h"
#include <avian/util/abort.h>
#define CAST1(x) reinterpret_cast<UnaryOperationType>(x)
#define CAST2(x) reinterpret_cast<BinaryOperationType>(x)
@ -21,6 +21,7 @@
using namespace vm;
using namespace avian::codegen;
using namespace avian::util;
namespace {

View File

@ -16,7 +16,7 @@
#include <avian/vm/codegen/registers.h>
#include "util/runtime-array.h"
#include "util/abort.h"
#include <avian/util/abort.h>
#define CAST1(x) reinterpret_cast<UnaryOperationType>(x)
#define CAST2(x) reinterpret_cast<BinaryOperationType>(x)
@ -24,6 +24,7 @@
using namespace vm;
using namespace avian::codegen;
using namespace avian::util;
namespace {

View File

@ -14,6 +14,7 @@
#include "arch.h"
using namespace vm;
using namespace avian::util;
namespace {

View File

@ -19,6 +19,8 @@
#include "constants.h"
#include "arch.h"
using namespace avian::util;
#ifdef PLATFORM_WINDOWS
# define JNICALL __stdcall
#else

View File

@ -13,11 +13,11 @@
#include "common.h"
#include "allocator.h"
#include "util/abort.h"
#include <avian/util/abort.h>
namespace vm {
class System : public Aborter {
class System : public avian::util::Aborter {
public:
typedef intptr_t Status;
@ -165,7 +165,7 @@ allocate(System* s, unsigned size)
#define ACQUIRE_MONITOR(t, m) \
System::MonitorResource MAKE_NAME(monitorResource_) (t, m)
inline Aborter* getAborter(System* s) {
inline avian::util::Aborter* getAborter(System* s) {
return s;
}