Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (36 sloc) 1.186 kb
#ifndef RBX_PRELUDE_HPP
#define RBX_PRELUDE_HPP
/**
* @file prelude.hpp
*
* Notably here, Symbols, Fixnums and true/false/nil are actually
* stored directly in the pointer value (and distinguished by the
* tag, see oop.hpp) but provided we do not attempt to dereference
* it, we can ALSO define a class and treat the pointer values as
* if they were real pointers to real objects of that class where
* typing is concerned. In the "instance methods", the this pointer
* is still the correct pointer value and can thus be used for the
* calculations needed.
*
* @see oop.hpp
*/
#include <stdint.h>
#include "util/optimize.hpp"
namespace rubinius {
class State;
class VM;
/** Platform-dependent integer type large enough for pointers too. */
typedef intptr_t native_int;
typedef uintptr_t native_uint;
typedef native_int hashval;
#define STATE rubinius::State* state
#define THREAD rubinius::ManagedThread* state
#define G(whatever) state->globals().whatever.get()
#define GO(whatever) state->globals().whatever
}
#if __GNUC__ >= 4
#define WARN_UNUSED __attribute__ ((warn_unused_result))
#else
#define WARN_UNUSED
#endif
#endif
Jump to Line
Something went wrong with that request. Please try again.